From 08ce28fba34e00e4864dc969724ff52506f4d498 Mon Sep 17 00:00:00 2001 From: Randell Dawson <5313213+RandellDawson@users.noreply.github.com> Date: Tue, 2 Aug 2022 23:36:13 -0600 Subject: [PATCH] fix(curriculum): Changed Mongoose version to avoid warnings in boilerplate's Node console when working on Mongoose challenges (#47129) * fix: changed mongoose version to avoid warnings in console * fix: changed ~ to ^ for mongoose version Co-authored-by: Kristofer Koishigawa Co-authored-by: Kristofer Koishigawa --- .../install-and-set-up-mongoose.md | 28 +++---------------- 1 file changed, 4 insertions(+), 24 deletions(-) diff --git a/curriculum/challenges/english/05-back-end-development-and-apis/mongodb-and-mongoose/install-and-set-up-mongoose.md b/curriculum/challenges/english/05-back-end-development-and-apis/mongodb-and-mongoose/install-and-set-up-mongoose.md index b83d21129f1..826b4b3ab6c 100644 --- a/curriculum/challenges/english/05-back-end-development-and-apis/mongodb-and-mongoose/install-and-set-up-mongoose.md +++ b/curriculum/challenges/english/05-back-end-development-and-apis/mongodb-and-mongoose/install-and-set-up-mongoose.md @@ -22,7 +22,7 @@ Follow SECRETS tab to add the variable. Do not surround the values with quotes when using the SECRETS tab. @@ -34,27 +34,7 @@ mongoose.connect(, { useNewUrlParser: true, useUnifiedTopology: true } # --hints-- -"mongodb version ~3.6.0" dependency should be in package.json - -```js -(getUserInput) => - $.get(getUserInput('url') + '/_api/file/package.json').then( - (data) => { - var packJson = JSON.parse(data); - assert.property(packJson.dependencies, 'mongodb') - assert.match( - packJson.dependencies.mongodb, - /^\~3\.6\.0/, - 'Wrong version of "mongodb". It should be ~3.6.0' - ); - }, - (xhr) => { - throw new Error(xhr.responseText); - } - ); -``` - -"mongoose version ~5.4.0" dependency should be in package.json +"mongoose version ^5.11.15" dependency should be in package.json ```js (getUserInput) => @@ -64,8 +44,8 @@ mongoose.connect(, { useNewUrlParser: true, useUnifiedTopology: true } assert.property(packJson.dependencies, 'mongoose'); assert.match( packJson.dependencies.mongoose, - /^\~5\.4\.0/, - 'Wrong version of "mongoose". It should be ~5.4.0' + /^\^5\.11\.15/, + 'Wrong version of "mongoose". It should be ^5.11.15' ); }, (xhr) => {