Skip to content

Commit c17d070

Browse files
committed
Merge branch 'master' into share-url-too-large
2 parents 13012a7 + 37e5c15 commit c17d070

File tree

6 files changed

+302
-162
lines changed

6 files changed

+302
-162
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
strategy:
1515
fail-fast: false
1616
matrix:
17-
node-version: [16.x, 18.x, 20.x, 22.x]
17+
node-version: [20.x, 22.x, 23.x]
1818

1919
steps:
2020
- uses: actions/checkout@v4

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
### Next version
22

33
* Exposed the `shareMaxRequestSize` value and the 413 status code to the client for a more meaningful error handling when the story causes shareData to exceed the limit.
4+
* Require Node 20.
45

56
### 4.0.1
67

lib/controllers/share.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ function resolveGist(serviceOptions, id) {
7070
*/
7171
function shortId(body, length) {
7272
var hmac = require('crypto').createHmac('sha1', body).digest();
73-
var base62 = require("base-x")('0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ');
73+
var base62 = require("base-x").default('0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ');
7474
var fullkey = base62.encode(hmac);
7575
return fullkey.slice(0, length); // if length undefined, return the whole thing
7676
}

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "NodeJS server for TerriaJS, consisting of a CORS proxy, proj4 CRS lookup service, and express static server.",
55
"engineStrict": true,
66
"engines": {
7-
"node": ">=12.0.0"
7+
"node": ">=20.0.0"
88
},
99
"resolutions": {
1010
"underscore": "^1.12.1"
@@ -33,12 +33,12 @@
3333
"homepage": "https://github.com/TerriaJS/TerriaJS-Server",
3434
"dependencies": {
3535
"aws-sdk": "^2.1336.0",
36-
"base-x": "^3.0.5",
36+
"base-x": "^5.0.1",
3737
"basic-auth": "^2.0.1",
38-
"body-parser": "^1.15.0",
38+
"body-parser": "^1.20.3",
3939
"compression": "^1.6.0",
4040
"cors": "^2.7.1",
41-
"express": "^4.8.0",
41+
"express": "^4.21.2",
4242
"express-brute": "^1.0.1",
4343
"json5": "^2.2.3",
4444
"morgan": "^1.7.0",
@@ -50,8 +50,8 @@
5050
"yargs": "^13.2.4"
5151
},
5252
"devDependencies": {
53-
"jasmine": "^3.4.0",
53+
"jasmine": "^4.6.0",
5454
"nock": "^13.5.6",
55-
"supertest": "^4.0.0"
55+
"supertest": "^7.0.0"
5656
}
5757
}

spec/proj4lookup.spec.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ describe('proj4lookup', function() {
2222
it('should 404 unknown projection', function(done) {
2323
request(server)
2424
.get('/api/v1/proj4def/EPSG:Notarealthing')
25-
.expect(404, done);
25+
.expect(404)
26+
.end(assert(done));
2627
});
2728
});
2829

0 commit comments

Comments
 (0)