Skip to content

Commit ff0f2f7

Browse files
authored
NodeJS 18x support (#518)
Drop suporting nodejs < 18x. Remove node_fetch from the dependencies. Update development dependencies. Relates-To: OLPEDGE-2889 Signed-off-by: Oleksii Zubko <ext-oleksii.zubko@here.com>
1 parent f6b8762 commit ff0f2f7

File tree

31 files changed

+1369
-977
lines changed

31 files changed

+1369
-977
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,27 @@ jobs:
1313
name: PSV / Linux Build / Tests / Code coverage
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v3
16+
- uses: actions/checkout@v4
1717
- name: Use Node.js
18-
uses: actions/setup-node@v3
18+
uses: actions/setup-node@v4
1919
with:
20-
node-version: 16
20+
node-version: 18
2121
cache: npm
2222
- name: Build / Tests / Coverage
2323
run: scripts/linux/psv/build_test_psv.sh
2424
- name: Upload coverage to Codecov
25-
uses: codecov/codecov-action@v3
25+
uses: codecov/codecov-action@v4
26+
with:
27+
fail_ci_if_error: true # optional (default = false)
28+
verbose: true # optional (default = false)
29+
env:
30+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
2631

2732
psv-commit-checker:
2833
name: PSV.Commit.Checker
2934
runs-on: ubuntu-latest
3035
steps:
31-
- uses: actions/checkout@v3
36+
- uses: actions/checkout@v4
3237
with:
3338
fetch-depth: 0
3439
- name: Commit checker script. Verify commit text

.github/workflows/deploy.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ jobs:
2626
echo "Package to deploy: $PACKAGE_NAME"
2727
env:
2828
PACKAGE_NAME: ${{ inputs.chooseDeploy }}
29-
- uses: actions/checkout@v2
29+
- uses: actions/checkout@v4
3030
- name: Use Node.js
31-
uses: actions/setup-node@v1
31+
uses: actions/setup-node@v4
3232
with:
33-
node-version: '16'
33+
node-version: '18'
3434
cache: npm
3535
- name: Build / Tests
3636
run: scripts/linux/psv/build_test_psv.sh && env

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,4 @@ heaptrack_report.html
2424
CertificateAuthorityCertificate.pem
2525
demo-app
2626
build
27+
.DS_Store

@here/olp-sdk-authentication/package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@here/olp-sdk-authentication",
3-
"version": "1.13.1",
3+
"version": "2.0.0",
44
"description": "Wrapper around the HERE Authentication and Authorization REST API obtaining short-lived access tokens that are used to authenticate requests to HERE services.",
55
"main": "index.js",
66
"browser": "index.web.js",
@@ -49,20 +49,20 @@
4949
},
5050
"license": "Apache-2.0",
5151
"dependencies": {
52-
"@here/olp-sdk-core": "^1.8.0",
53-
"@here/olp-sdk-fetch": "^1.9.0",
54-
"properties-reader": "2.2.0"
52+
"@here/olp-sdk-core": "^2.0.0",
53+
"@here/olp-sdk-fetch": "^2.0.0",
54+
"properties-reader": "2.3.0"
5555
},
5656
"devDependencies": {
57-
"@types/properties-reader": "^0.0.1",
57+
"@types/properties-reader": "^2.1.3",
5858
"@types/chai": "^4.2.7",
5959
"@types/fetch-mock": "^7.3.2",
6060
"@types/mocha": "^5.2.7",
61-
"@types/node": "^14.11.8",
61+
"@types/node": "18.7.14",
6262
"@types/sinon-chai": "^3.2.3",
6363
"@types/sinon": "7.0.3",
6464
"chai": "^4.2.0",
65-
"fetch-mock": "^8.3.1",
65+
"fetch-mock": "^9.11.0",
6666
"husky": "^3.1.0",
6767
"lint-staged": "^9.5.0",
6868
"mocha": "^6.2.2",
@@ -71,16 +71,16 @@
7171
"sinon-chai": "^3.4.0",
7272
"sinon": "7.4.2",
7373
"source-map-support": "^0.5.16",
74-
"ts-node": "^8.5.4",
74+
"ts-node": "10.9.2",
7575
"tslint": "^6.1.3",
7676
"tslint-config-prettier": "^1.18.0",
7777
"typedoc": "^0.22.13",
7878
"typescript": "4.0.3",
79-
"tslib": "1.13.0",
8079
"webpack": "^4.46.0",
81-
"webpack-cli": "^3.3.10"
80+
"webpack-cli": "^3.3.10",
81+
"terser-webpack-plugin": "^1.4.5"
8282
},
8383
"engines": {
84-
"node": ">= 10.18.0"
84+
"node": ">= 18.0.0"
8585
}
8686
}

@here/olp-sdk-authentication/webpack.config.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const path = require("path");
2-
2+
const TerserPlugin = require("terser-webpack-plugin");
33

44
module.exports = env => {
55
const isProd = env.NODE_ENV === "production";
@@ -17,6 +17,10 @@ module.exports = env => {
1717
path: path.resolve(__dirname),
1818
libraryTarget: "umd",
1919
globalObject: 'this'
20+
},
21+
optimization: {
22+
minimize: true,
23+
minimizer: [new TerserPlugin()],
2024
}
2125
};
2226
};

@here/olp-sdk-core/lib.version.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2020-2021 HERE Europe B.V.
2+
* Copyright (C) 2020-2024 HERE Europe B.V.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -17,4 +17,4 @@
1717
* License-Filename: LICENSE
1818
*/
1919

20-
export const LIB_VERSION = "1.12.0";
20+
export const LIB_VERSION = "2.0.0";

@here/olp-sdk-core/package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@here/olp-sdk-core",
3-
"version": "1.8.1",
3+
"version": "2.0.0",
44
"description": "Core features of the HERE Data Platform",
55
"main": "index.js",
66
"browser": "index.web.js",
@@ -49,13 +49,13 @@
4949
},
5050
"license": "Apache-2.0",
5151
"dependencies": {
52-
"@here/olp-sdk-fetch": "^1.9.0",
53-
"@here/olp-sdk-dataservice-api": "^1.13.0"
52+
"@here/olp-sdk-fetch": "^2.0.0",
53+
"@here/olp-sdk-dataservice-api": "^2.0.0"
5454
},
5555
"devDependencies": {
5656
"@types/chai": "^4.2.7",
5757
"@types/mocha": "^5.2.7",
58-
"@types/node": "^14.11.8",
58+
"@types/node": "18.7.14",
5959
"@types/sinon": "7.0.3",
6060
"@types/sinon-chai": "^3.2.3",
6161
"chai": "^4.2.0",
@@ -68,16 +68,16 @@
6868
"sinon": "7.4.2",
6969
"sinon-chai": "^3.4.0",
7070
"source-map-support": "^0.5.16",
71-
"ts-node": "^8.5.4",
71+
"ts-node": "10.9.2",
7272
"tslint": "^6.1.3",
7373
"tslint-config-prettier": "^1.18.0",
7474
"typedoc": "^0.22.13",
7575
"typescript": "4.0.3",
76-
"tslib": "1.13.0",
7776
"webpack": "^4.46.0",
78-
"webpack-cli": "^3.3.10"
77+
"webpack-cli": "^3.3.10",
78+
"terser-webpack-plugin": "^1.4.5"
7979
},
8080
"engines": {
81-
"node": ">= 10.18.0"
81+
"node": ">= 18.0.0"
8282
}
8383
}

@here/olp-sdk-core/webpack.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
const path = require("path");
2+
const TerserPlugin = require("terser-webpack-plugin");
23

34
module.exports = env => {
45
const isProd = env.NODE_ENV === "production";
@@ -16,6 +17,10 @@ module.exports = env => {
1617
path: path.resolve(__dirname),
1718
libraryTarget: "umd",
1819
globalObject: 'this'
20+
},
21+
optimization: {
22+
minimize: true,
23+
minimizer: [new TerserPlugin()],
1924
}
2025
};
2126
};

@here/olp-sdk-dataservice-api/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@here/olp-sdk-dataservice-api",
3-
"version": "1.13.1",
3+
"version": "2.0.0",
44
"description": "Generated from the OpenAPI specification of the HERE Open Location Platform Data API",
55
"main": "index.js",
66
"typings": "index",
@@ -61,17 +61,17 @@
6161
"sinon": "7.4.2",
6262
"nyc": "^15.0.0",
6363
"prettier": "^1.19.1",
64-
"ts-node": "^8.5.4",
64+
"ts-node": "10.9.2",
6565
"source-map-support": "^0.5.16",
6666
"tslint": "^6.1.3",
6767
"tslint-config-prettier": "^1.18.0",
6868
"typescript": "4.0.3",
69-
"tslib": "1.13.0",
7069
"webpack": "^4.46.0",
7170
"webpack-cli": "^3.3.10",
72-
"typedoc": "^0.22.13"
71+
"typedoc": "^0.22.13",
72+
"terser-webpack-plugin": "^1.4.5"
7373
},
7474
"engines": {
75-
"node": ">= 10.18.0"
75+
"node": ">= 18.0.0"
7676
}
7777
}

@here/olp-sdk-dataservice-api/webpack.config.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
const path = require("path");
2+
const TerserPlugin = require("terser-webpack-plugin");
23

34
module.exports = env => {
45
const isProd = env.NODE_ENV === "production";
@@ -16,6 +17,10 @@ module.exports = env => {
1617
path: path.resolve(__dirname),
1718
libraryTarget: "umd",
1819
globalObject: 'this'
19-
}
20+
},
21+
optimization: {
22+
minimize: true,
23+
minimizer: [new TerserPlugin()],
24+
}
2025
};
2126
};

@here/olp-sdk-dataservice-read/lib/utils/getTile.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ export async function getTile(
150150

151151
if (!quadTreeIndex.subQuads || !quadTreeIndex.subQuads.length) {
152152
return Promise.resolve(
153-
new Response("No Content", {
153+
new Response(null, {
154154
status: 204,
155155
statusText: "No Content"
156156
})

@here/olp-sdk-dataservice-read/package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@here/olp-sdk-dataservice-read",
3-
"version": "1.13.1",
3+
"version": "2.0.0",
44
"description": "Wrapper around a subset of the HERE Open Location Platform Data REST API related to reading data from OLP catalogs",
55
"main": "index.js",
66
"browser": "index.web.js",
@@ -49,14 +49,14 @@
4949
},
5050
"license": "Apache-2.0",
5151
"dependencies": {
52-
"@here/olp-sdk-core": "^1.8.0",
53-
"@here/olp-sdk-dataservice-api": "^1.13.0",
54-
"@here/olp-sdk-fetch": "^1.9.0"
52+
"@here/olp-sdk-core": "^2.0.0",
53+
"@here/olp-sdk-dataservice-api": "^2.0.0",
54+
"@here/olp-sdk-fetch": "^2.0.0"
5555
},
5656
"devDependencies": {
5757
"@types/chai": "^4.2.7",
5858
"@types/mocha": "^5.2.7",
59-
"@types/node": "^14.11.8",
59+
"@types/node": "18.7.14",
6060
"@types/sinon": "7.0.3",
6161
"@types/sinon-chai": "^3.2.3",
6262
"chai": "^4.2.0",
@@ -69,16 +69,16 @@
6969
"sinon": "7.4.2",
7070
"sinon-chai": "^3.4.0",
7171
"source-map-support": "^0.5.16",
72-
"ts-node": "^8.5.4",
72+
"ts-node": "10.9.2",
7373
"tslint": "^6.1.3",
7474
"tslint-config-prettier": "^1.18.0",
7575
"typedoc": "^0.22.13",
7676
"typescript": "4.0.3",
77-
"tslib": "1.13.0",
7877
"webpack": "^4.46.0",
79-
"webpack-cli": "^3.3.10"
78+
"webpack-cli": "^3.3.10",
79+
"terser-webpack-plugin": "^1.4.5"
8080
},
8181
"engines": {
82-
"node": ">= 10.18.0"
82+
"node": ">= 18.0.0"
8383
}
8484
}

@here/olp-sdk-dataservice-read/webpack.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
const path = require("path");
2+
const TerserPlugin = require("terser-webpack-plugin");
23

34
module.exports = env => {
45
const isProd = env.NODE_ENV === "production";
@@ -16,6 +17,10 @@ module.exports = env => {
1617
path: path.resolve(__dirname),
1718
libraryTarget: "umd",
1819
globalObject: 'this'
20+
},
21+
optimization: {
22+
minimize: true,
23+
minimizer: [new TerserPlugin()],
1924
}
2025
};
2126
};

@here/olp-sdk-dataservice-write/package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@here/olp-sdk-dataservice-write",
3-
"version": "1.8.1",
3+
"version": "2.0.0",
44
"description": "Wrapper around a subset of the HERE Open Location Platform Data REST API related to writing data to OLP catalogs",
55
"main": "index.js",
66
"browser": "index.web.js",
@@ -50,14 +50,14 @@
5050
},
5151
"license": "Apache-2.0",
5252
"dependencies": {
53-
"@here/olp-sdk-core": "^1.8.0",
54-
"@here/olp-sdk-dataservice-api": "^1.13.0",
55-
"@here/olp-sdk-fetch": "^1.9.0"
53+
"@here/olp-sdk-core": "^2.0.0",
54+
"@here/olp-sdk-dataservice-api": "^2.0.0",
55+
"@here/olp-sdk-fetch": "^2.0.0"
5656
},
5757
"devDependencies": {
5858
"@types/chai": "^4.2.7",
5959
"@types/mocha": "^5.2.7",
60-
"@types/node": "^14.11.8",
60+
"@types/node": "18.7.14",
6161
"@types/sinon": "7.0.3",
6262
"@types/sinon-chai": "^3.2.3",
6363
"chai": "^4.2.0",
@@ -70,16 +70,16 @@
7070
"sinon": "7.4.2",
7171
"sinon-chai": "^3.4.0",
7272
"source-map-support": "^0.5.16",
73-
"ts-node": "^8.5.4",
73+
"ts-node": "10.9.2",
7474
"tslint": "^6.1.3",
7575
"tslint-config-prettier": "^1.18.0",
7676
"typedoc": "^0.22.13",
7777
"typescript": "4.0.3",
78-
"tslib": "1.13.0",
7978
"webpack": "^4.46.0",
80-
"webpack-cli": "^3.3.10"
79+
"webpack-cli": "^3.3.10",
80+
"terser-webpack-plugin": "^1.4.5"
8181
},
8282
"engines": {
83-
"node": ">= 10.18.0"
83+
"node": ">= 18.0.0"
8484
}
8585
}

@here/olp-sdk-dataservice-write/webpack.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
const path = require("path");
2+
const TerserPlugin = require("terser-webpack-plugin");
23

34
module.exports = env => {
45
const isProd = env.NODE_ENV === "production";
@@ -16,6 +17,10 @@ module.exports = env => {
1617
path: path.resolve(__dirname),
1718
libraryTarget: "umd",
1819
globalObject: 'this'
20+
},
21+
optimization: {
22+
minimize: true,
23+
minimizer: [new TerserPlugin()],
1924
}
2025
};
2126
};

0 commit comments

Comments
 (0)