diff --git a/services/backend/package.json b/services/backend/package.json index 28e94254..78be747d 100644 --- a/services/backend/package.json +++ b/services/backend/package.json @@ -16,7 +16,7 @@ "bottlejs": "~2.0.0", "config": "~3.3.7", "form-data": "~4.0.0", - "knex": "~0.95.15", + "knex": "~3.1.0", "node-fetch": "~2.6.7", "pg": "~8.7.3", "restify": "~10.0.0", diff --git a/services/connectivity/package.json b/services/connectivity/package.json index f73f66fb..97a50e95 100644 --- a/services/connectivity/package.json +++ b/services/connectivity/package.json @@ -18,7 +18,7 @@ "bookshelf": "~1.2.0", "bottlejs": "~2.0.0", "config": "~3.3.7", - "knex": "~0.95.15", + "knex": "~3.1.0", "pg": "~8.7.3", "restify": "~10.0.0", "restify-cors-middleware": "~1.1.1", diff --git a/services/diversity/package.json b/services/diversity/package.json index 3ff0bf95..a8a341df 100644 --- a/services/diversity/package.json +++ b/services/diversity/package.json @@ -18,7 +18,7 @@ "bookshelf": "~1.2.0", "bottlejs": "~2.0.0", "config": "~3.3.7", - "knex": "~0.95.15", + "knex": "~3.1.0", "node-fetch": "~2.6.7", "pg": "~8.7.3", "restify": "~10.0.0", diff --git a/services/ecosystems/package.json b/services/ecosystems/package.json index d868b9be..d8acc554 100644 --- a/services/ecosystems/package.json +++ b/services/ecosystems/package.json @@ -18,7 +18,7 @@ "bookshelf": "~1.2.0", "bottlejs": "~2.0.0", "config": "~3.3.7", - "knex": "~1.0.7", + "knex": "~3.1.0", "node-fetch": "~2.6.7", "pg": "~8.7.3", "restify": "~10.0.0", diff --git a/services/forest/package.json b/services/forest/package.json index a51b4d43..f1271b6a 100644 --- a/services/forest/package.json +++ b/services/forest/package.json @@ -18,7 +18,7 @@ "bookshelf": "~1.2.0", "bottlejs": "~2.0.0", "config": "~3.3.7", - "knex": "~0.95.15", + "knex": "~3.1.0", "node-fetch": "~2.6.7", "pg": "~8.7.3", "restify": "~10.0.0", diff --git a/services/forest/src/persistence/SCIHF.js b/services/forest/src/persistence/SCIHF.js index 569f873b..b7330a7e 100644 --- a/services/forest/src/persistence/SCIHF.js +++ b/services/forest/src/persistence/SCIHF.js @@ -17,7 +17,7 @@ module.exports = (db, { geoIntegrity }, logger) => ({ .select('hf_pers', 'sci_cat', 'binary_protected') .sum('area_ha as area') .groupBy('binary_protected', 'sci_cat', 'hf_pers') - .orderBy('binary_protected', 'sci_cat', 'hf_pers') + .orderBy(['binary_protected', 'sci_cat', 'hf_pers']) .catch((e) => { logger.error(e.stack || e.Error || e.message || e); throw new RestifyErrors.InternalServerError('Error getting data'); @@ -39,7 +39,7 @@ module.exports = (db, { geoIntegrity }, logger) => ({ .select('hf_pers', 'sci_cat', 'binary_protected') .sum('area_ha as area') .groupBy('binary_protected', 'sci_cat', 'hf_pers') - .orderBy('binary_protected', 'sci_cat', 'hf_pers') + .orderBy(['binary_protected', 'sci_cat', 'hf_pers']) .catch((e) => { logger.error(e.stack || e.Error || e.message || e); throw new RestifyErrors.InternalServerError('Error getting data'); @@ -61,7 +61,7 @@ module.exports = (db, { geoIntegrity }, logger) => ({ .select('hf_pers', 'sci_cat', 'binary_protected') .sum('area_ha as area') .groupBy('binary_protected', 'sci_cat', 'hf_pers') - .orderBy('binary_protected', 'sci_cat', 'hf_pers') + .orderBy(['binary_protected', 'sci_cat', 'hf_pers']) .catch((e) => { logger.error(e.stack || e.Error || e.message || e); throw new RestifyErrors.InternalServerError('Error getting data'); @@ -83,7 +83,7 @@ module.exports = (db, { geoIntegrity }, logger) => ({ .select('hf_pers', 'sci_cat', 'binary_protected') .sum('area_ha as area') .groupBy('binary_protected', 'sci_cat', 'hf_pers') - .orderBy('binary_protected', 'sci_cat', 'hf_pers') + .orderBy(['binary_protected', 'sci_cat', 'hf_pers']) .catch((e) => { logger.error(e.stack || e.Error || e.message || e); throw new RestifyErrors.InternalServerError('Error getting data'); diff --git a/services/util/package.json b/services/util/package.json index 1e460ee8..747e584f 100644 --- a/services/util/package.json +++ b/services/util/package.json @@ -19,7 +19,7 @@ "bookshelf": "~1.2.0", "bottlejs": "~2.0.0", "config": "~3.3.7", - "knex": "~1.0.7", + "knex": "~3.1.0", "multer": "~1.4.5-lts.1", "pg": "~8.7.3", "restify": "~10.0.0", diff --git a/yarn.lock b/yarn.lock index ece0be61..8b9d8aea 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1137,7 +1137,7 @@ __metadata: bottlejs: ~2.0.0 config: ~3.3.7 form-data: ~4.0.0 - knex: ~0.95.15 + knex: ~3.1.0 node-fetch: ~2.6.7 nodemon: ~2.0.16 pg: ~8.7.3 @@ -1593,7 +1593,14 @@ __metadata: languageName: node linkType: hard -"colorette@npm:2.0.16, colorette@npm:^2.0.14": +"colorette@npm:2.0.19": + version: 2.0.19 + resolution: "colorette@npm:2.0.19" + checksum: 888cf5493f781e5fcf54ce4d49e9d7d698f96ea2b2ef67906834bb319a392c667f9ec69f4a10e268d2946d13a9503d2d19b3abaaaf174e3451bfe91fb9d82427 + languageName: node + linkType: hard + +"colorette@npm:^2.0.14": version: 2.0.16 resolution: "colorette@npm:2.0.16" checksum: cd55596a3a2d1071c1a28eee7fd8a5387593ff1bd10a3e8d0a6221499311fe34a9f2b9272d77c391e0e003dcdc8934fb2f8d106e7ef1f7516f8060c901d41a27 @@ -1626,6 +1633,13 @@ __metadata: languageName: node linkType: hard +"commander@npm:^10.0.0": + version: 10.0.1 + resolution: "commander@npm:10.0.1" + checksum: 436901d64a818295803c1996cd856621a74f30b9f9e28a588e726b2b1670665bccd7c1a77007ebf328729f0139838a88a19265858a0fa7a8728c4656796db948 + languageName: node + linkType: hard + "commander@npm:^2.11.0, commander@npm:^2.20.0": version: 2.20.3 resolution: "commander@npm:2.20.3" @@ -1640,13 +1654,6 @@ __metadata: languageName: node linkType: hard -"commander@npm:^7.1.0": - version: 7.1.0 - resolution: "commander@npm:7.1.0" - checksum: 99c120b939b610b1fb4a14424b48dc6431643ec46836f251a26434ad77b1eed22577a36378cfd66ed4b56fc69f98553f7dcb30f1539e3685874fd77cfb6e52fb - languageName: node - linkType: hard - "commander@npm:^8.3.0": version: 8.3.0 resolution: "commander@npm:8.3.0" @@ -1654,7 +1661,7 @@ __metadata: languageName: node linkType: hard -"commander@npm:^9.1.0, commander@npm:^9.2.0": +"commander@npm:^9.2.0": version: 9.3.0 resolution: "commander@npm:9.3.0" checksum: d421ce66fee25792a1470c69aa8d1b86434bf873a96483aa92c8267f81a6f20c6f7c426f5e82f88ac50a8ec4855d3f2787aebcdef8aa559e1080a2337a95a217 @@ -1731,7 +1738,7 @@ __metadata: bookshelf: ~1.2.0 bottlejs: ~2.0.0 config: ~3.3.7 - knex: ~0.95.15 + knex: ~3.1.0 nodemon: ~2.0.16 pg: ~8.7.3 restify: ~10.0.0 @@ -1863,18 +1870,6 @@ __metadata: languageName: node linkType: hard -"debug@npm:4.3.2, debug@npm:^4.1.0": - version: 4.3.2 - resolution: "debug@npm:4.3.2" - dependencies: - ms: 2.1.2 - peerDependenciesMeta: - supports-color: - optional: true - checksum: 820ea160e267e23c953c9ed87e7ad93494d8cda2f7349af5e7e3bb236d23707ee3022f477d5a7d2ee86ef2bf7d60aa9ab22d1f58080d7deb9dccd073585e1e43 - languageName: node - linkType: hard - "debug@npm:4.3.4, debug@npm:^4.3.4": version: 4.3.4 resolution: "debug@npm:4.3.4" @@ -1908,6 +1903,18 @@ __metadata: languageName: node linkType: hard +"debug@npm:^4.1.0": + version: 4.3.2 + resolution: "debug@npm:4.3.2" + dependencies: + ms: 2.1.2 + peerDependenciesMeta: + supports-color: + optional: true + checksum: 820ea160e267e23c953c9ed87e7ad93494d8cda2f7349af5e7e3bb236d23707ee3022f477d5a7d2ee86ef2bf7d60aa9ab22d1f58080d7deb9dccd073585e1e43 + languageName: node + linkType: hard + "decompress-response@npm:^3.3.0": version: 3.3.0 resolution: "decompress-response@npm:3.3.0" @@ -2022,7 +2029,7 @@ __metadata: bookshelf: ~1.2.0 bottlejs: ~2.0.0 config: ~3.3.7 - knex: ~0.95.15 + knex: ~3.1.0 node-fetch: ~2.6.7 nodemon: ~2.0.16 pg: ~8.7.3 @@ -2102,7 +2109,7 @@ __metadata: bookshelf: ~1.2.0 bottlejs: ~2.0.0 config: ~3.3.7 - knex: ~1.0.7 + knex: ~3.1.0 node-fetch: ~2.6.7 nodemon: ~2.0.16 pg: ~8.7.3 @@ -3127,7 +3134,7 @@ __metadata: bookshelf: ~1.2.0 bottlejs: ~2.0.0 config: ~3.3.7 - knex: ~0.95.15 + knex: ~3.1.0 node-fetch: ~2.6.7 nodemon: ~2.0.16 pg: ~8.7.3 @@ -3341,13 +3348,6 @@ __metadata: languageName: node linkType: hard -"getopts@npm:2.2.5": - version: 2.2.5 - resolution: "getopts@npm:2.2.5" - checksum: f8b21793e6c548fbc4f2ecfd8a51a74aba71fa118638fbdf00200207b8a8d44e21709611366d0c3366602b7ae29ae27fbe599f6ad6a55f7a2e451ca581af923f - languageName: node - linkType: hard - "getopts@npm:2.3.0": version: 2.3.0 resolution: "getopts@npm:2.3.0" @@ -4421,48 +4421,12 @@ __metadata: languageName: node linkType: hard -"knex@npm:~0.95.15": - version: 0.95.15 - resolution: "knex@npm:0.95.15" - dependencies: - colorette: 2.0.16 - commander: ^7.1.0 - debug: 4.3.2 - escalade: ^3.1.1 - esm: ^3.2.25 - getopts: 2.2.5 - interpret: ^2.2.0 - lodash: ^4.17.21 - pg-connection-string: 2.5.0 - rechoir: 0.7.0 - resolve-from: ^5.0.0 - tarn: ^3.0.1 - tildify: 2.0.0 - peerDependenciesMeta: - mysql: - optional: true - mysql2: - optional: true - pg: - optional: true - pg-native: - optional: true - sqlite3: - optional: true - tedious: - optional: true - bin: - knex: bin/cli.js - checksum: f70ad630c1a829b785514070a67d472511877c8fd17ef75df9dcadf9f7a244356a16dc85cd61a1c0a91a24a5a8d6355bfc29d1ff037092d0e1c7dfb3d19f9ff6 - languageName: node - linkType: hard - -"knex@npm:~1.0.7": - version: 1.0.7 - resolution: "knex@npm:1.0.7" +"knex@npm:~3.1.0": + version: 3.1.0 + resolution: "knex@npm:3.1.0" dependencies: - colorette: 2.0.16 - commander: ^9.1.0 + colorette: 2.0.19 + commander: ^10.0.0 debug: 4.3.4 escalade: ^3.1.1 esm: ^3.2.25 @@ -4470,14 +4434,12 @@ __metadata: getopts: 2.3.0 interpret: ^2.2.0 lodash: ^4.17.21 - pg-connection-string: 2.5.0 + pg-connection-string: 2.6.2 rechoir: ^0.8.0 resolve-from: ^5.0.0 tarn: ^3.0.2 tildify: 2.0.0 peerDependenciesMeta: - "@vscode/sqlite3": - optional: true better-sqlite3: optional: true mysql: @@ -4488,11 +4450,13 @@ __metadata: optional: true pg-native: optional: true + sqlite3: + optional: true tedious: optional: true bin: knex: bin/cli.js - checksum: 57608a3a6813cb66da6f5a078016338166c53ab2cbaab66e81492352023db88fc158e4ad6bbd2156cd9d7c9cac14a4b1e581dd8232b4f9bab2285ea6f1efc5cf + checksum: 3905f8d27960975f7f57f3f488d1ef3ccf47784acc8eb627e8a28cbbe1f296c6879c8ef0cbd9e17e867be80117d305cd948545f3fbd4c74b24c90d2413bbc021 languageName: node linkType: hard @@ -5512,7 +5476,14 @@ __metadata: languageName: node linkType: hard -"pg-connection-string@npm:2.5.0, pg-connection-string@npm:^2.5.0": +"pg-connection-string@npm:2.6.2": + version: 2.6.2 + resolution: "pg-connection-string@npm:2.6.2" + checksum: 22265882c3b6f2320785378d0760b051294a684989163d5a1cde4009e64e84448d7bf67d9a7b9e7f69440c3ee9e2212f9aa10dd17ad6773f6143c6020cebbcb5 + languageName: node + linkType: hard + +"pg-connection-string@npm:^2.5.0": version: 2.5.0 resolution: "pg-connection-string@npm:2.5.0" checksum: a6f3a068f7c9416a5b33a326811caf0dfaaee045c225b7c628b4c9b4e9a2b25bdd12a21e4c48940e1000ea223a4e608ca122d2ff3dd08c8b1db0fc9f5705133a @@ -5965,7 +5936,7 @@ __metadata: languageName: node linkType: hard -"rechoir@npm:0.7.0, rechoir@npm:^0.7.0": +"rechoir@npm:^0.7.0": version: 0.7.0 resolution: "rechoir@npm:0.7.0" dependencies: @@ -7039,13 +7010,6 @@ resolve@^1.9.0: languageName: node linkType: hard -"tarn@npm:^3.0.1": - version: 3.0.1 - resolution: "tarn@npm:3.0.1" - checksum: c7347ce8c4dfd8017495d7d334d9d930dfdeb5bf67c6b4d0f5c040557457b9c5502d40f67c7f766d00b49e7a8a602d0341047b38c6864fefe66373a74d06f098 - languageName: node - linkType: hard - "tarn@npm:^3.0.2": version: 3.0.2 resolution: "tarn@npm:3.0.2" @@ -7502,7 +7466,7 @@ resolve@^1.9.0: bookshelf: ~1.2.0 bottlejs: ~2.0.0 config: ~3.3.7 - knex: ~1.0.7 + knex: ~3.1.0 multer: ~1.4.5-lts.1 nodemon: ~2.0.16 pg: ~8.7.3