Skip to content

Commit fc93bec

Browse files
authored
Upgrade various dependencies (#838)
* upgrade aws dependencies * migrate the npm-upgrade config file to an npm-check-updates config file * upgrade better-npm-audit * upgrade redocly and spectral * minor updates of serveral libraries * upgrade serverless to latest 3.x version and ignore in the future * upgrade express * upgrade winston and zod * upgrade webpack dependencies * upgrade nock * upgrade linting
1 parent 75593dd commit fc93bec

File tree

7 files changed

+6583
-1841
lines changed

7 files changed

+6583
-1841
lines changed

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ npm run audit-prod
55
npm run test:unit
66
npm run test:system
77
npm run build
8+
npm run build-api-docs

.ncurc.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
{
22
"upgrade": false,
3-
"reject": ["@types/node", "got", "ava", "@ava/typescript", "eslint"]
3+
"reject": [
4+
"@types/node",
5+
"got",
6+
"ava",
7+
"@ava/typescript",
8+
"eslint",
9+
"@opensearch-project/opensearch",
10+
"serverless",
11+
"serverless-offline"
12+
]
413
}

package-lock.json

Lines changed: 6535 additions & 1803 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@
5858
"@aws-sdk/s3-request-presigner": "^3.758.0",
5959
"@mapbox/extent": "^0.4.0",
6060
"@opensearch-project/opensearch": "^2.13.0",
61-
"@redocly/cli": "^1.12.2",
61+
"@redocly/cli": "^1.34.0",
6262
"cors": "^2.8.5",
63-
"express": "^4.19.2",
63+
"express": "^4.21.2",
6464
"got": "^13.0",
6565
"http-errors": "^2.0.0",
6666
"lodash-es": "^4.17.21",
@@ -69,54 +69,54 @@
6969
"p-filter": "^4.1.0",
7070
"serverless-http": "^3.2.0",
7171
"through2": "^4.0.2",
72-
"ts-loader": "^9.5.1",
73-
"winston": "^3.13.0",
72+
"ts-loader": "^9.5.2",
73+
"winston": "^3.17.0",
7474
"xml2js": "0.6.2",
75-
"zod": "^3.23.8"
75+
"zod": "^3.24.2"
7676
},
7777
"devDependencies": {
7878
"@ava/typescript": "^4.1.0",
79-
"@stoplight/spectral-cli": "^6.11.1",
79+
"@stoplight/spectral-cli": "^6.14.3",
8080
"@tsconfig/node20": "^20.1.4",
8181
"@types/aws-lambda": "^8.10.147",
8282
"@types/cors": "^2.8.17",
83-
"@types/express": "^4.17.21",
83+
"@types/express": "^5.0.1",
8484
"@types/http-errors": "^2.0.4",
8585
"@types/luxon": "^3.4.2",
8686
"@types/memorystream": "^0.3.4",
8787
"@types/morgan": "^1.9.9",
8888
"@types/node": "^20.14",
89-
"@types/sinon": "^17.0.3",
90-
"@typescript-eslint/eslint-plugin": "^7.9.0",
91-
"@typescript-eslint/parser": "^7.9.0",
89+
"@types/sinon": "^17.0.4",
90+
"@typescript-eslint/eslint-plugin": "^8.27.0",
91+
"@typescript-eslint/parser": "^8.27.0",
9292
"ava": "^5.3",
9393
"aws-event-mocks": "^0.0.0",
9494
"aws-sdk-client-mock": "^4.1.0",
95-
"better-npm-audit": "^3.7.3",
96-
"c8": "^9.1.0",
97-
"copy-webpack-plugin": "^12.0.2",
95+
"better-npm-audit": "^3.11.0",
96+
"c8": "^10.1.3",
97+
"copy-webpack-plugin": "^13.0.0",
9898
"crypto-random-string": "^5.0.0",
99-
"eslint": "^8.56.0",
99+
"eslint": "^8.57.0",
100100
"eslint-config-airbnb": "^19.0.4",
101-
"eslint-plugin-import": "^2.29.1",
102-
"eslint-plugin-jsdoc": "^48.2.4",
101+
"eslint-plugin-import": "^2.31.0",
102+
"eslint-plugin-jsdoc": "^50.6.8",
103103
"husky": "^9.1.7",
104-
"luxon": "^3.4.4",
105-
"nock": "^13.5.4",
106-
"nodemon": "^3.1.0",
107-
"prettier": "^3.2.5",
104+
"luxon": "^3.5.0",
105+
"nock": "^14.0.1",
106+
"nodemon": "^3.1.9",
107+
"prettier": "^3.5.3",
108108
"prettier-eslint": "^16.3.0",
109109
"prettier-eslint-cli": "^8.0.1",
110110
"proxyquire": "^2.1.3",
111-
"serverless": "^3.38.0",
112-
"serverless-offline": "^13.5.0",
111+
"serverless": "^3.40.0",
112+
"serverless-offline": "^13.9.0",
113113
"sinon": "^19.0.4",
114114
"ts-node": "^10.9.2",
115-
"tslib": "^2.6.2",
116-
"typescript": "^5.4.5",
117-
"webpack": "^5.91.0",
118-
"webpack-cli": "^5.1.4",
119-
"zip-webpack-plugin": "^4.0.1"
115+
"tslib": "^2.8.1",
116+
"typescript": "^5.8.2",
117+
"webpack": "^5.98.0",
118+
"webpack-cli": "^6.0.1",
119+
"zip-webpack-plugin": "^4.0.3"
120120
},
121121
"name": "stac-server"
122122
}

src/lib/api.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export const extractIntersects = function (params) {
6767
if (typeof intersects === 'string') {
6868
try {
6969
geojson = JSON.parse(intersects)
70-
} catch (e) {
70+
} catch (_) {
7171
throw new ValidationError('Invalid GeoJSON geometry')
7272
}
7373
} else {
@@ -91,7 +91,7 @@ export const extractBbox = function (params, httpMethod = 'GET') {
9191
if (httpMethod === 'GET' && typeof bbox === 'string') {
9292
try {
9393
bboxArray = bbox.split(',').map(parseFloat).filter((x) => !Number.isNaN(x))
94-
} catch (e2) {
94+
} catch (_) {
9595
throw new ValidationError('Invalid bbox')
9696
}
9797
} else if (httpMethod === 'POST' && Array.isArray(bbox)) {
@@ -121,7 +121,7 @@ export const extractLimit = function (params) {
121121
let limit
122122
try {
123123
limit = parseInt(limitStr)
124-
} catch (e) {
124+
} catch (_) {
125125
throw new ValidationError('Invalid limit value')
126126
}
127127

@@ -145,7 +145,7 @@ export const extractPrecision = function (params, name, min, max) {
145145
let precision
146146
try {
147147
precision = parseInt(precisionStr)
148-
} catch (e) {
148+
} catch (_) {
149149
throw new ValidationError(`Invalid precision value for ${name}`)
150150
}
151151

@@ -167,7 +167,7 @@ export const extractAggregations = function (params) {
167167
if (typeof aggregations === 'string') {
168168
try {
169169
aggs = JSON.parse(aggregations)
170-
} catch (e) {
170+
} catch (_) {
171171
aggs = aggregations.split(',')
172172
}
173173
} else {
@@ -184,7 +184,7 @@ export const extractPage = function (params) {
184184
let page
185185
try {
186186
page = parseInt(pageStr)
187-
} catch (e) {
187+
} catch (_) {
188188
throw new ValidationError('Invalid page value')
189189
}
190190

@@ -354,7 +354,7 @@ const extractIds = function (params) {
354354
if (typeof ids === 'string') {
355355
try {
356356
idsRules = JSON.parse(ids)
357-
} catch (e) {
357+
} catch (_) {
358358
idsRules = ids.split(',')
359359
}
360360
} else {
@@ -371,7 +371,7 @@ const extractCollectionIds = function (params) {
371371
if (typeof collections === 'string') {
372372
try {
373373
idsRules = JSON.parse(collections)
374-
} catch (e) {
374+
} catch (_) {
375375
idsRules = collections.split(',')
376376
}
377377
} else {

src/lib/database.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ async function populateCollectionToIndexMapping() {
598598
if (process.env['COLLECTION_TO_INDEX_MAPPINGS']) {
599599
try {
600600
collectionToIndexMapping = JSON.parse(process.env['COLLECTION_TO_INDEX_MAPPINGS'])
601-
} catch (e) {
601+
} catch (_) {
602602
logger.error('COLLECTION_TO_INDEX_MAPPINGS is not a valid JSON object.')
603603
collectionToIndexMapping = {}
604604
}

tests/helpers/ingest.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export async function testPostIngestSNS(t, record, shouldError = false) {
8585

8686
try {
8787
await sqsTriggerLambda(t.context.ingestQueueUrl, handler)
88-
} catch (e) {
88+
} catch (_) {
8989
if (!shouldError) {
9090
t.fail('Ingest had error, but should not have.')
9191
}

0 commit comments

Comments
 (0)