Skip to content

Commit

Permalink
chore(deps): upgraded packages
Browse files Browse the repository at this point in the history
  • Loading branch information
polonel committed Jan 9, 2019
1 parent f400b71 commit 8c62a8c
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 108 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"cheerio": "1.0.0-rc.2",
"clone": "2.1.2",
"connect-flash": "0.1.1",
"connect-mongo": "2.0.1",
"connect-mongo": "2.0.3",
"cookie": "0.3.1",
"cookie-parser": "1.4.3",
"css-loader": "0.28.9",
Expand Down Expand Up @@ -65,7 +65,7 @@
"moment": "2.22.2",
"moment-duration-format": "2.2.2",
"moment-timezone": "0.5.21",
"mongoose": "5.2.6",
"mongoose": "5.2.17",
"nconf": "0.10.0",
"netmask": "1.0.6",
"node-cache": "4.2.0",
Expand Down
2 changes: 1 addition & 1 deletion src/database/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ var dbPassword = encodeURIComponent(nconf.get('mongo:password'));

var CONNECTION_URI = 'mongodb://' + nconf.get('mongo:username') + ':' + dbPassword + '@' + nconf.get('mongo:host') + ':' + nconf.get('mongo:port') + '/' + nconf.get('mongo:database');

var options = { keepAlive: 1, connectTimeoutMS: 30000, useNewUrlParser: true };
var options = { keepAlive: 1, connectTimeoutMS: 30000, useNewUrlParser: true, useCreateIndex: true };

module.exports.init = function(callback, connectionString, opts) {
if (connectionString) CONNECTION_URI = connectionString;
Expand Down
2 changes: 1 addition & 1 deletion src/models/ticket.js
Original file line number Diff line number Diff line change
Expand Up @@ -1154,7 +1154,7 @@ ticketSchema.statics.updateType = function(oldTypeId, newTypeId, callback) {
return callback('Invalid IDs - TicketSchema.UpdateType()', null);

var self = this;
return self.model(COLLECTION).update({type: oldTypeId}, {$set: {type: newTypeId}}, {multi: true, new: false}, callback);
return self.model(COLLECTION).updateMany({type: oldTypeId}, {$set: {type: newTypeId}}, callback);
};

ticketSchema.statics.getAssigned = function(userId, callback) {
Expand Down
6 changes: 3 additions & 3 deletions src/settings/defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ function checkPriorities(callback) {
PrioritySchema.getByMigrationNum(1, function(err, normal) {
if (!err) {
winston.debug('Converting Priority: Normal');
ticketSchema.collection.update({priority: 1}, { $set: { priority: normal._id }}, {multi: true}).then(function(res) {
ticketSchema.collection.updateMany({priority: 1}, { $set: { priority: normal._id }}).then(function(res) {
if (res && res.result) {
if (res.result.ok === 1)
return done();
Expand All @@ -277,7 +277,7 @@ function checkPriorities(callback) {
PrioritySchema.getByMigrationNum(2, function(err, urgent) {
if (!err) {
winston.debug('Converting Priority: Urgent');
ticketSchema.collection.update({priority: 2 }, {$set: {priority: urgent._id }}, {multi: true}).then(function(res) {
ticketSchema.collection.updateMany({priority: 2 }, {$set: {priority: urgent._id }}).then(function(res) {
if (res && res.result) {
if (res.result.ok === 1)
return done();
Expand All @@ -297,7 +297,7 @@ function checkPriorities(callback) {
PrioritySchema.getByMigrationNum(3, function(err, critical) {
if (!err) {
winston.debug('Converting Priority: Critical');
ticketSchema.collection.update({priority: 3}, { $set: { priority: critical._id }}, {multi: true}).then(function(res) {
ticketSchema.collection.updateMany({priority: 3}, { $set: { priority: critical._id }}).then(function(res) {
if (res && res.result) {
if (res.result.ok === 1)
return done();
Expand Down
2 changes: 1 addition & 1 deletion src/settings/settingsUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ util.setSetting = function(setting, value, callback) {
value: value
};

settingSchema.update({name: s.name}, s, {upsert: true}, callback);
settingSchema.updateOne({name: s.name}, s, {upsert: true}, callback);
};

util.getSettings = function(callback) {
Expand Down
145 changes: 45 additions & 100 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -358,27 +358,21 @@ acorn-globals@^3.0.0:
dependencies:
acorn "^4.0.4"

acorn-jsx@^3.0.0:
version "3.0.1"
resolved "http://registry.npmjs.org/acorn-jsx/-/acorn-jsx-3.0.1.tgz#afdf9488fb1ecefc8348f6fb22f464e32a58b36b"
dependencies:
acorn "^3.0.4"

acorn-jsx@^4.1.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-4.1.1.tgz#e8e41e48ea2fe0c896740610ab6a4ffd8add225e"
dependencies:
acorn "^5.0.3"

acorn@^3.0.4, acorn@^3.1.0:
acorn@^3.1.0:
version "3.3.0"
resolved "http://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a"

acorn@^4.0.3, acorn@^4.0.4, acorn@~4.0.2:
version "4.0.13"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787"

acorn@^5.0.0, acorn@^5.0.3, acorn@^5.5.0, acorn@^5.6.0:
acorn@^5.0.0, acorn@^5.0.3, acorn@^5.6.0:
version "5.7.3"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.3.tgz#67aa231bf8812974b85235a96771eb6bd07ea279"

Expand Down Expand Up @@ -753,7 +747,7 @@ axios@^0.16.2:
follow-redirects "^1.2.3"
is-buffer "^1.1.5"

babel-code-frame@^6.22.0, babel-code-frame@^6.26.0:
babel-code-frame@^6.26.0:
version "6.26.0"
resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b"
dependencies:
Expand Down Expand Up @@ -1071,6 +1065,10 @@ browserslist@^1.3.6, browserslist@^1.5.2, browserslist@^1.7.6:
caniuse-db "^1.0.30000639"
electron-to-chromium "^1.2.7"

bson@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/bson/-/bson-1.1.0.tgz#bee57d1fb6a87713471af4e32bcae36de814b5b0"

bson@~1.0.4, bson@~1.0.5:
version "1.0.9"
resolved "https://registry.yarnpkg.com/bson/-/bson-1.0.9.tgz#12319f8323b1254739b7c6bef8d3e89ae05a2f57"
Expand Down Expand Up @@ -1755,7 +1753,7 @@ [email protected]:
version "0.0.1"
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"

concat-stream@^1.5.0, concat-stream@^1.5.2, concat-stream@^1.6.0:
concat-stream@^1.5.0, concat-stream@^1.5.2:
version "1.6.2"
resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34"
dependencies:
Expand Down Expand Up @@ -1786,9 +1784,9 @@ [email protected]:
version "0.1.1"
resolved "https://registry.yarnpkg.com/connect-flash/-/connect-flash-0.1.1.tgz#d8630f26d95a7f851f9956b1e8cc6732f3b6aa30"

[email protected].1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/connect-mongo/-/connect-mongo-2.0.1.tgz#514d649cff1d5d5546c087193245bb54ff5b703b"
[email protected].3:
version "2.0.3"
resolved "https://registry.yarnpkg.com/connect-mongo/-/connect-mongo-2.0.3.tgz#db6cabe1e3add5acc9ef9c486681027675a58ee5"
dependencies:
mongodb "^2.0.36"

Expand Down Expand Up @@ -2481,7 +2479,7 @@ [email protected]:
version "0.5.0"
resolved "https://registry.yarnpkg.com/dive/-/dive-0.5.0.tgz#06d0e07edd25da849598bacab44d51f2809bec47"

doctrine@^2.0.2, doctrine@^2.1.0:
doctrine@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d"
dependencies:
Expand Down Expand Up @@ -2920,13 +2918,6 @@ [email protected]:
resolve "^1.8.1"
semver "^5.5.0"

eslint-scope@^3.7.1:
version "3.7.3"
resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-3.7.3.tgz#bb507200d3d17f60247636160b4826284b108535"
dependencies:
esrecurse "^4.1.0"
estraverse "^4.1.1"

eslint-scope@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.0.tgz#50bf3071e9338bcdc43331794a0cb533f0136172"
Expand All @@ -2942,48 +2933,6 @@ eslint-visitor-keys@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#3f3180fb2e291017716acb4c9d6d5b5c34a6a81d"

[email protected]:
version "4.14.0"
resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.14.0.tgz#96609768d1dd23304faba2d94b7fefe5a5447a82"
dependencies:
ajv "^5.3.0"
babel-code-frame "^6.22.0"
chalk "^2.1.0"
concat-stream "^1.6.0"
cross-spawn "^5.1.0"
debug "^3.1.0"
doctrine "^2.0.2"
eslint-scope "^3.7.1"
eslint-visitor-keys "^1.0.0"
espree "^3.5.2"
esquery "^1.0.0"
esutils "^2.0.2"
file-entry-cache "^2.0.0"
functional-red-black-tree "^1.0.1"
glob "^7.1.2"
globals "^11.0.1"
ignore "^3.3.3"
imurmurhash "^0.1.4"
inquirer "^3.0.6"
is-resolvable "^1.0.0"
js-yaml "^3.9.1"
json-stable-stringify-without-jsonify "^1.0.1"
levn "^0.3.0"
lodash "^4.17.4"
minimatch "^3.0.2"
mkdirp "^0.5.1"
natural-compare "^1.4.0"
optionator "^0.8.2"
path-is-inside "^1.0.2"
pluralize "^7.0.0"
progress "^2.0.0"
require-uncached "^1.0.3"
semver "^5.3.0"
strip-ansi "^4.0.0"
strip-json-comments "~2.0.1"
table "^4.0.1"
text-table "~0.2.0"

[email protected]:
version "5.4.0"
resolved "https://registry.yarnpkg.com/eslint/-/eslint-5.4.0.tgz#d068ec03006bb9e06b429dc85f7e46c1b69fac62"
Expand Down Expand Up @@ -3027,13 +2976,6 @@ [email protected]:
table "^4.0.3"
text-table "^0.2.0"

espree@^3.5.2:
version "3.5.4"
resolved "https://registry.yarnpkg.com/espree/-/espree-3.5.4.tgz#b0f447187c8a8bed944b815a660bddf5deb5d1a7"
dependencies:
acorn "^5.5.0"
acorn-jsx "^3.0.0"

espree@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/espree/-/espree-4.0.0.tgz#253998f20a0f82db5d866385799d912a83a36634"
Expand All @@ -3053,7 +2995,7 @@ esprima@^4.0.0, esprima@~4.0.0:
version "4.0.1"
resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71"

esquery@^1.0.0, esquery@^1.0.1:
esquery@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.0.1.tgz#406c51658b1f5991a5f9b62b1dc25b00e3e5c708"
dependencies:
Expand Down Expand Up @@ -3917,7 +3859,7 @@ global-prefix@^1.0.1:
is-windows "^1.0.1"
which "^1.2.14"

globals@^11.0.1, globals@^11.7.0:
globals@^11.7.0:
version "11.7.0"
resolved "https://registry.yarnpkg.com/globals/-/globals-11.7.0.tgz#a583faa43055b1aca771914bf68258e2fc125673"

Expand Down Expand Up @@ -4470,7 +4412,7 @@ ignore-walk@^3.0.1:
dependencies:
minimatch "^3.0.4"

ignore@^3.3.3, ignore@^3.3.5:
ignore@^3.3.5:
version "3.3.10"
resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.10.tgz#0a97fb876986e8081c631160f8f9f389157f0043"

Expand Down Expand Up @@ -4579,7 +4521,7 @@ init-package-json@^1.10.3:
validate-npm-package-license "^3.0.1"
validate-npm-package-name "^3.0.0"

inquirer@^3.0.0, inquirer@^3.0.6:
inquirer@^3.0.0:
version "3.3.0"
resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-3.3.0.tgz#9dd2f2ad765dcab1ff0443b491442a20ba227dc9"
dependencies:
Expand Down Expand Up @@ -4869,7 +4811,7 @@ is-regex@^1.0.3:
dependencies:
has "^1.0.1"

is-resolvable@^1.0.0, is-resolvable@^1.1.0:
is-resolvable@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.1.0.tgz#fb18f87ce1feb925169c9a407c19318a3206ed88"

Expand Down Expand Up @@ -5025,7 +4967,7 @@ js-tokens@^3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b"

[email protected], js-yaml@^3.11.0, js-yaml@^3.5.3, js-yaml@^3.9.0, js-yaml@^3.9.1:
[email protected], js-yaml@^3.11.0, js-yaml@^3.5.3, js-yaml@^3.9.0:
version "3.12.0"
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.12.0.tgz#eaed656ec8344f10f527c6bfa1b6e2244de167d1"
dependencies:
Expand Down Expand Up @@ -6126,20 +6068,22 @@ [email protected]:
bson "~1.0.4"
require_optional "~1.0.0"

[email protected].0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/mongodb-core/-/mongodb-core-3.1.0.tgz#af91f36fd560ed785f4e61e694432df4d3698aad"
[email protected].5:
version "3.1.5"
resolved "https://registry.yarnpkg.com/mongodb-core/-/mongodb-core-3.1.5.tgz#59ca67d7f6cea570d5437624a7afec8d752d477a"
dependencies:
bson "~1.0.4"
bson "^1.1.0"
require_optional "^1.0.1"
safe-buffer "^5.1.2"
optionalDependencies:
saslprep "^1.0.0"

[email protected].1:
version "3.1.1"
resolved "https://registry.yarnpkg.com/mongodb/-/mongodb-3.1.1.tgz#c018c4b277614e8b1e08426d5bcbe1a7e5cdbd74"
[email protected].6:
version "3.1.6"
resolved "https://registry.yarnpkg.com/mongodb/-/mongodb-3.1.6.tgz#6054641973b5bf5b5ae1c67dcbcf8fa88280273d"
dependencies:
mongodb-core "3.1.0"
mongodb-core "3.1.5"
safe-buffer "^5.1.2"

mongodb@^2.0.36:
version "2.2.36"
Expand All @@ -6153,21 +6097,22 @@ [email protected]:
version "1.0.2"
resolved "https://registry.yarnpkg.com/mongoose-legacy-pluralize/-/mongoose-legacy-pluralize-1.0.2.tgz#3ba9f91fa507b5186d399fb40854bff18fb563e4"

[email protected].6:
version "5.2.6"
resolved "https://registry.yarnpkg.com/mongoose/-/mongoose-5.2.6.tgz#de75870b97330aeca9b6f2e3b67a7a6b13973b0f"
[email protected].17:
version "5.2.17"
resolved "https://registry.yarnpkg.com/mongoose/-/mongoose-5.2.17.tgz#8baeb60a675d00da03633d679a72457dbb5b2285"
dependencies:
async "2.6.1"
bson "~1.0.5"
kareem "2.2.1"
lodash.get "4.4.2"
mongodb "3.1.1"
mongodb-core "3.1.0"
mongodb "3.1.6"
mongodb-core "3.1.5"
mongoose-legacy-pluralize "1.0.2"
mpath "0.4.1"
mquery "3.1.1"
mpath "0.5.1"
mquery "3.2.0"
ms "2.0.0"
regexp-clone "0.0.1"
safe-buffer "5.1.2"
sliced "1.0.1"

move-concurrently@^1.0.1:
Expand All @@ -6181,18 +6126,18 @@ move-concurrently@^1.0.1:
rimraf "^2.5.4"
run-queue "^1.0.3"

mpath@0.4.1:
version "0.4.1"
resolved "http://registry.npmjs.org/mpath/-/mpath-0.4.1.tgz#ed10388430380bf7bbb5be1391e5d6969cb08e89"
mpath@0.5.1:
version "0.5.1"
resolved "https://registry.yarnpkg.com/mpath/-/mpath-0.5.1.tgz#17131501f1ff9e6e4fbc8ffa875aa7065b5775ab"

mquery@3.1.1:
version "3.1.1"
resolved "https://registry.yarnpkg.com/mquery/-/mquery-3.1.1.tgz#1c00eb206f2cabc6649789257eae08128e8dc3c3"
mquery@3.2.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/mquery/-/mquery-3.2.0.tgz#e276472abd5109686a15eb2a8e0761db813c81cc"
dependencies:
bluebird "3.5.1"
debug "3.1.0"
eslint "4.14.0"
regexp-clone "0.0.1"
safe-buffer "5.1.2"
sliced "1.0.1"

[email protected]:
Expand Down Expand Up @@ -8522,7 +8467,7 @@ [email protected]:
version "5.1.1"
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853"

safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1:
safe-buffer@5.1.2, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1:
version "5.1.2"
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"

Expand Down Expand Up @@ -9589,7 +9534,7 @@ [email protected]:
version "1.0.1"
resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.0.1.tgz#8340fc4702c3122df5d22288f88283f513d3fdd4"

table@^4.0.1, table@^4.0.3:
table@^4.0.3:
version "4.0.3"
resolved "http://registry.npmjs.org/table/-/table-4.0.3.tgz#00b5e2b602f1794b9acaf9ca908a76386a7813bc"
dependencies:
Expand Down

0 comments on commit 8c62a8c

Please sign in to comment.