Skip to content

Commit f4d3218

Browse files
authored
drop support for node 16 in preparation for v5 release (#3905)
* drop support for node 16 in preparation for v5 release
1 parent c0e0b2b commit f4d3218

24 files changed

+69
-72
lines changed
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
name: Node 16
1+
name: Node 18
22
runs:
33
using: composite
44
steps:
55
- uses: actions/setup-node@v3
66
with:
7-
node-version: '16'
7+
node-version: '18'

.github/actions/node/setup/action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ runs:
55
- uses: actions/setup-node@v3
66
with:
77
cache: yarn
8-
node-version: '16'
8+
node-version: '18'

.github/workflows/appsec.yml

+5-10
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ jobs:
2727
- uses: actions/checkout@v4
2828
- uses: ./.github/actions/node/setup
2929
- run: yarn install
30-
- uses: ./.github/actions/node/16
30+
- uses: ./.github/actions/node/oldest
3131
- run: yarn test:appsec:ci
32-
- uses: ./.github/actions/node/18
32+
- uses: ./.github/actions/node/20
3333
- run: yarn test:appsec:ci
3434
- uses: ./.github/actions/node/latest
3535
- run: yarn test:appsec:ci
@@ -88,8 +88,6 @@ jobs:
8888
- run: yarn install
8989
- uses: ./.github/actions/node/oldest
9090
- run: yarn test:appsec:plugins:ci
91-
- uses: ./.github/actions/node/16
92-
- run: yarn test:appsec:plugins:ci
9391
- uses: ./.github/actions/node/18
9492
- run: yarn test:appsec:plugins:ci
9593
- uses: ./.github/actions/node/20
@@ -113,8 +111,6 @@ jobs:
113111
- uses: actions/checkout@v4
114112
- uses: ./.github/actions/node/setup
115113
- run: yarn install
116-
- uses: ./.github/actions/node/16
117-
- run: yarn test:appsec:plugins:ci
118114
- uses: ./.github/actions/node/18
119115
- run: yarn test:appsec:plugins:ci
120116
- uses: ./.github/actions/node/20
@@ -197,8 +193,6 @@ jobs:
197193
- uses: actions/checkout@v4
198194
- uses: ./.github/actions/node/setup
199195
- run: yarn install
200-
- uses: ./.github/actions/node/16
201-
- run: yarn test:appsec:plugins:ci
202196
- uses: ./.github/actions/node/18
203197
- run: yarn test:appsec:plugins:ci
204198
- uses: ./.github/actions/node/20
@@ -226,8 +220,9 @@ jobs:
226220
- uses: actions/setup-node@v3
227221
with:
228222
node-version: ${{ matrix.node-version }}
229-
- run: yarn install
230-
- run: yarn test:appsec:plugins:ci
223+
- run: yarn install --ignore-engines
224+
- run: yarn config set ignore-engines true
225+
- run: yarn test:appsec:plugins:ci --ignore-engines
231226
- if: always()
232227
uses: ./.github/actions/testagent/logs
233228
- uses: codecov/codecov-action@v3

.github/workflows/lambda.yml

-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ jobs:
1919
- uses: ./.github/actions/testagent/start
2020
- uses: ./.github/actions/node/setup
2121
- run: yarn install
22-
- uses: ./.github/actions/node/16
23-
- run: yarn test:lambda:ci
2422
- uses: ./.github/actions/node/18
2523
- run: yarn test:lambda:ci
2624
- uses: ./.github/actions/node/20

.github/workflows/package-size.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: Setup Node.js
1818
uses: actions/setup-node@v2
1919
with:
20-
node-version: '16'
20+
node-version: '18'
2121
- run: yarn
2222
- name: Compute module size tree and report
2323
uses: qard/heaviest-objects-in-the-universe@v1

.github/workflows/plugins.yml

+29-20
Original file line numberDiff line numberDiff line change
@@ -89,18 +89,31 @@ jobs:
8989
- uses: actions/checkout@v4
9090
- uses: ./.github/actions/testagent/start
9191
- uses: ./.github/actions/node/setup
92-
- run: yarn install --ignore-engines
92+
- id: pkg
93+
run: |
94+
content=`cat ./package.json | tr '\n' ' '`
95+
echo "json=$content" >> $GITHUB_OUTPUT
96+
- id: extract
97+
run: |
98+
version="${{fromJson(steps.pkg.outputs.json).version}}"
99+
majorVersion=$(echo "$version" | cut -d '.' -f 1)
100+
echo "Major Version: $majorVersion"
101+
echo "MAJOR_VERSION=$majorVersion" >> $GITHUB_ENV
93102
- uses: ./.github/actions/node/oldest
94-
- run: yarn test:plugins:ci
103+
- name: Install dependencies and run tests
104+
if: env.MAJOR_VERSION != '5'
105+
run: |
106+
yarn install --ignore-engines
107+
yarn test:plugins:ci
95108
- if: always()
96109
uses: ./.github/actions/testagent/logs
97110
- uses: codecov/codecov-action@v3
98111

99112
aerospike-5:
100113
strategy:
101114
matrix:
102-
node-version: [16]
103-
range: ['5.5.0 - 5.7.0']
115+
node-version: [18]
116+
range: ['5.2.0 - 5.7.0']
104117
include:
105118
- node-version: 20
106119
range: '>=5.8.0'
@@ -132,7 +145,7 @@ jobs:
132145
with:
133146
node-version: ${{ matrix.node-version }}
134147
- name: Install dependencies and run tests
135-
if: env.MAJOR_VERSION != '3'
148+
if: env.MAJOR_VERSION == '5'
136149
run: |
137150
yarn install --ignore-engines
138151
yarn test:plugins:ci
@@ -399,8 +412,6 @@ jobs:
399412
- uses: ./.github/actions/testagent/start
400413
- uses: ./.github/actions/node/setup
401414
- run: yarn install
402-
- uses: ./.github/actions/node/16
403-
- run: yarn test:plugins:ci
404415
- uses: ./.github/actions/node/18
405416
- run: yarn test:plugins:ci
406417
- uses: ./.github/actions/node/20
@@ -587,8 +598,6 @@ jobs:
587598
- uses: ./.github/actions/testagent/start
588599
- uses: ./.github/actions/node/setup
589600
- run: yarn install
590-
- uses: ./.github/actions/node/16
591-
- run: yarn test:plugins:ci
592601
- uses: ./.github/actions/node/18
593602
- run: yarn test:plugins:ci
594603
- uses: ./.github/actions/node/20
@@ -608,8 +617,6 @@ jobs:
608617
- uses: ./.github/actions/testagent/start
609618
- uses: ./.github/actions/node/setup
610619
- run: yarn install
611-
- uses: ./.github/actions/node/16
612-
- run: yarn test:plugins:ci
613620
- uses: ./.github/actions/node/18
614621
- run: yarn test:plugins:ci
615622
- uses: ./.github/actions/node/20
@@ -884,8 +891,6 @@ jobs:
884891
- uses: ./.github/actions/testagent/start
885892
- uses: ./.github/actions/node/setup
886893
- run: yarn install
887-
- uses: ./.github/actions/node/16
888-
- run: yarn test:plugins:ci
889894
- uses: ./.github/actions/node/18
890895
- run: yarn test:plugins:ci
891896
- uses: ./.github/actions/node/20
@@ -916,8 +921,9 @@ jobs:
916921
- uses: actions/setup-node@v3
917922
with:
918923
node-version: ${{ matrix.node-version }}
919-
- run: yarn install
920-
- run: yarn test:plugins:ci
924+
- run: yarn install --ignore-engines
925+
- run: yarn config set ignore-engines true
926+
- run: yarn test:plugins:ci --ignore-engines
921927
- if: always()
922928
uses: ./.github/actions/testagent/logs
923929
- uses: codecov/codecov-action@v3
@@ -992,12 +998,15 @@ jobs:
992998
SERVICES: oracledb
993999
DD_TEST_AGENT_URL: http://testagent:9126
9941000
steps:
995-
# Needs to remain on v3 for now due to GLIBC version
9961001
- uses: actions/checkout@v3
997-
- uses: ./.github/actions/node/setup
1002+
- uses: actions/setup-node@v3
1003+
with:
1004+
cache: yarn
1005+
node-version: '16'
9981006
- run: yarn install --ignore-engines
999-
- run: yarn services
1000-
- run: yarn test:plugins
1007+
- run: yarn config set ignore-engines true
1008+
- run: yarn services --ignore-engines
1009+
- run: yarn test:plugins --ignore-engines
10011010
- uses: codecov/codecov-action@v3
10021011

10031012
paperplane:
@@ -1147,7 +1156,7 @@ jobs:
11471156
- run: yarn install
11481157
- uses: ./.github/actions/node/oldest
11491158
- run: yarn test:plugins:ci
1150-
- uses: ./.github/actions/node/16
1159+
- uses: ./.github/actions/node/latest
11511160
- run: yarn test:plugins:ci
11521161
- if: always()
11531162
uses: ./.github/actions/testagent/logs

.github/workflows/profiling.yml

-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ jobs:
2727
- uses: actions/checkout@v4
2828
- uses: ./.github/actions/node/setup
2929
- run: yarn install
30-
- uses: ./.github/actions/node/16
31-
- run: yarn test:profiler:ci
3230
- uses: ./.github/actions/node/18
3331
- run: yarn test:profiler:ci
3432
- uses: ./.github/actions/node/20

.github/workflows/project.yml

+5-4
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
# setting fail-fast to false in an attempt to prevent this from happening
1919
fail-fast: false
2020
matrix:
21-
version: [16, 18, latest]
21+
version: [18, 20, latest]
2222
runs-on: ubuntu-latest
2323
steps:
2424
- uses: actions/checkout@v4
@@ -33,7 +33,7 @@ jobs:
3333
integration-ci:
3434
strategy:
3535
matrix:
36-
version: [16, latest]
36+
version: [18, latest]
3737
framework: [cucumber, playwright]
3838
runs-on: ubuntu-latest
3939
env:
@@ -64,11 +64,12 @@ jobs:
6464
steps:
6565
- uses: actions/checkout@v4
6666
- uses: ./.github/actions/node/setup
67-
- run: yarn install
67+
- run: yarn install --ignore-engines
6868
- uses: actions/setup-node@v3
6969
with:
7070
node-version: ${{ matrix.version }}
71-
- run: yarn test:integration:cypress
71+
- run: yarn config set ignore-engines true
72+
- run: yarn test:integration:cypress --ignore-engines
7273
env:
7374
CYPRESS_VERSION: ${{ matrix.cypress-version }}
7475
NODE_OPTIONS: '-r ./ci/init'

.github/workflows/serverless-integration-test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
id-token: 'write'
1414
strategy:
1515
matrix:
16-
version: [16, latest]
16+
version: [18, latest]
1717
runs-on: ubuntu-latest
1818
steps:
1919
- uses: actions/checkout@v4

.github/workflows/serverless-performance.yml

-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ jobs:
1010
max-parallel: 4
1111
matrix:
1212
include:
13-
- node-version: 16.14
14-
aws-runtime-name: "nodejs16.x"
1513
- node-version: 18.12
1614
aws-runtime-name: "nodejs18.x"
1715
steps:

.github/workflows/tracing.yml

-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ jobs:
2727
- uses: actions/checkout@v4
2828
- uses: ./.github/actions/node/setup
2929
- run: yarn install
30-
- uses: ./.github/actions/node/16
31-
- run: yarn test:trace:core:ci
3230
- uses: ./.github/actions/node/18
3331
- run: yarn test:trace:core:ci
3432
- uses: ./.github/actions/node/20

.gitlab/benchmarks.yml

-6
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,6 @@ benchmark:
5555
extends: .benchmarks
5656
parallel:
5757
matrix:
58-
- MAJOR_VERSION: 16
59-
GROUP: 1
60-
- MAJOR_VERSION: 16
61-
GROUP: 2
62-
- MAJOR_VERSION: 16
63-
GROUP: 3
6458
- MAJOR_VERSION: 18
6559
GROUP: 1
6660
- MAJOR_VERSION: 18

.nvmrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
16
1+
18

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ esbuild.build({
218218
outfile: 'out.js',
219219
plugins: [ddPlugin],
220220
platform: 'node', // allows built-in modules to be required
221-
target: ['node16']
221+
target: ['node18']
222222
}).catch((err) => {
223223
console.error(err)
224224
process.exit(1)

benchmark/sirun/Dockerfile

-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ RUN wget -O sirun.tar.gz https://github.com/DataDog/sirun/releases/download/v0.1
3030
RUN mkdir -p /usr/local/nvm \
3131
&& wget -q -O - https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash \
3232
&& . $NVM_DIR/nvm.sh \
33-
&& nvm install --no-progress 12.22.12 \
3433
&& nvm install --no-progress 14.21.3 \
3534
&& nvm install --no-progress 16.20.1 \
3635
&& nvm install --no-progress 18.16.1 \

docs/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@
1111
"private": true,
1212
"devDependencies": {
1313
"typedoc": "^0.17.3",
14-
"typescript": "^3.8.3"
14+
"typescript": "^4.6"
1515
}
1616
}

docs/yarn.lock

+4-4
Original file line numberDiff line numberDiff line change
@@ -218,10 +218,10 @@ typedoc@^0.17.3:
218218
shelljs "^0.8.4"
219219
typedoc-default-themes "^0.10.2"
220220

221-
typescript@^3.8.3:
222-
version "3.9.10"
223-
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.10.tgz#70f3910ac7a51ed6bef79da7800690b19bf778b8"
224-
integrity sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==
221+
typescript@^4.6:
222+
version "4.9.5"
223+
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a"
224+
integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==
225225

226226
uglify-js@^3.1.4:
227227
version "3.14.5"

integration-tests/esbuild/build-and-test-aws-sdk.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ esbuild.build({
1313
outfile: SCRIPT,
1414
plugins: [ddPlugin],
1515
platform: 'node',
16-
target: ['node16'],
16+
target: ['node18'],
1717
external: [ ]
1818
}).then(() => {
1919
const { status, stdout, stderr } = spawnSync('node', [SCRIPT])

integration-tests/esbuild/build-and-test-skip-external.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ esbuild.build({
1111
outfile: 'skip-external-out.js',
1212
plugins: [ddPlugin],
1313
platform: 'node',
14-
target: ['node16'],
14+
target: ['node18'],
1515
external: [
1616
'knex'
1717
]

integration-tests/esbuild/build.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ esbuild.build({
99
outfile: 'out.js',
1010
plugins: [ddPlugin],
1111
platform: 'node',
12-
target: ['node16'],
12+
target: ['node18'],
1313
external: [
1414
// dead code paths introduced by knex
1515
'pg',

lib-injection/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ FROM scratch AS nodejs_agent
22
COPY . /
33

44

5-
FROM node:16-alpine AS build
5+
FROM node:18-alpine AS build
66

77
ARG npm_pkg
88
ARG UID=10000

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
},
6666
"homepage": "https://github.com/DataDog/dd-trace-js#readme",
6767
"engines": {
68-
"node": ">=16"
68+
"node": ">=18"
6969
},
7070
"dependencies": {
7171
"@datadog/native-appsec": "6.0.0",
@@ -104,7 +104,7 @@
104104
"semver": "^7.5.4"
105105
},
106106
"devDependencies": {
107-
"@types/node": ">=16",
107+
"@types/node": ">=18",
108108
"autocannon": "^4.5.2",
109109
"aws-sdk": "^2.1446.0",
110110
"axios": "^0.21.2",

packages/datadog-plugin-aws-sdk/test/lambda.spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ describe('Plugin', () => {
4646
Code: { ZipFile },
4747
Handler: 'handler.handle',
4848
Role: 'arn:aws:iam::123456:role/test',
49-
Runtime: 'nodejs16.x'
49+
Runtime: 'nodejs18.x'
5050
}, (err, res) => {
5151
if (err) return done(err)
5252

0 commit comments

Comments
 (0)