Skip to content

Commit 2853845

Browse files
authored
feat!: Require Node >=18 as minimum supported version (#14749)
We decided to require node 18+ in v9. This is to align with the upcoming changes in OpenTelemetry. We also believe it is a reasonable version requirement - Node 16 is EOL for some time now. This will also allow us to update a bunch of dev tooling (vitest, ...) properly and streamline some processes. For users requiring Node 14/16, they can remain on v8 (which will be continued to be supported with bug fixes for some time). ref #14257
1 parent 786c5ca commit 2853845

File tree

112 files changed

+203
-302
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

112 files changed

+203
-302
lines changed

.github/ISSUE_TEMPLATE/flaky.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ body:
1919
id: job-name
2020
attributes:
2121
label: Name of Job
22-
placeholder: "CI: Build & Test / Nextjs (Node 14) Tests"
22+
placeholder: "CI: Build & Test / Nextjs (Node 18) Tests"
2323
description: name of job as reported in the status report
2424
validations:
2525
required: true

.github/actions/restore-cache/action.yml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ inputs:
55
dependency_cache_key:
66
description: "The dependency cache key"
77
required: true
8-
node_version:
9-
description: "If set, temporarily set node version to default one before installing, then revert to this version after."
10-
required: false
118

129
runs:
1310
using: "composite"
@@ -24,19 +21,7 @@ runs:
2421
with:
2522
name: build-output
2623

27-
- name: Use default node version for install
28-
if: inputs.node_version && steps.dep-cache.outputs.cache-hit != 'true'
29-
uses: actions/setup-node@v4
30-
with:
31-
node-version-file: 'package.json'
32-
3324
- name: Install dependencies
3425
if: steps.dep-cache.outputs.cache-hit != 'true'
3526
run: yarn install --ignore-engines --frozen-lockfile
3627
shell: bash
37-
38-
- name: Revert node version to ${{ inputs.node_version }}
39-
if: inputs.node_version && steps.dep-cache.outputs.cache-hit != 'true'
40-
uses: actions/setup-node@v4
41-
with:
42-
node-version: ${{ inputs.node_version }}

.github/workflows/build.yml

Lines changed: 15 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ jobs:
459459
strategy:
460460
fail-fast: false
461461
matrix:
462-
node: [14, 16, 18, 20, 22]
462+
node: [18, 20, 22]
463463
steps:
464464
- name: Check out base commit (${{ github.event.pull_request.base.sha }})
465465
uses: actions/checkout@v4
@@ -478,7 +478,6 @@ jobs:
478478
uses: ./.github/actions/restore-cache
479479
with:
480480
dependency_cache_key: ${{ needs.job_build.outputs.dependency_cache_key }}
481-
node_version: ${{ matrix.node == 14 && '14' || '' }}
482481

483482
- name: Run affected tests
484483
run: yarn test:pr:node --base=${{ github.event.pull_request.base.sha }}
@@ -715,7 +714,7 @@ jobs:
715714
strategy:
716715
fail-fast: false
717716
matrix:
718-
node: [14, 16, 18, 20, 22]
717+
node: [18, 20, 22]
719718
typescript:
720719
- false
721720
include:
@@ -735,17 +734,13 @@ jobs:
735734
uses: ./.github/actions/restore-cache
736735
with:
737736
dependency_cache_key: ${{ needs.job_build.outputs.dependency_cache_key }}
738-
node_version: ${{ matrix.node == 14 && '14' || '' }}
739737

740738
- name: Overwrite typescript version
741-
if: matrix.typescript
742-
run: node ./scripts/use-ts-version.js ${{ matrix.typescript }}
739+
if: matrix.typescript == '3.8'
740+
run: node ./scripts/use-ts-3_8.js
743741
working-directory: dev-packages/node-integration-tests
744742

745743
- name: Run integration tests
746-
env:
747-
NODE_VERSION: ${{ matrix.node }}
748-
TS_VERSION: ${{ matrix.typescript }}
749744
working-directory: dev-packages/node-integration-tests
750745
run: yarn test
751746

@@ -760,10 +755,6 @@ jobs:
760755
matrix:
761756
node: [18, 20, 22]
762757
remix: [1, 2]
763-
# Remix v2 only supports Node 18+, so run 16 tests separately
764-
include:
765-
- node: 16
766-
remix: 1
767758
steps:
768759
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
769760
uses: actions/checkout@v4
@@ -1243,24 +1234,22 @@ jobs:
12431234
echo "One of the dependent jobs have failed. You may need to re-run it." && exit 1
12441235
12451236
job_compile_bindings_profiling_node:
1246-
name: Compile & Test Profiling Bindings (v${{ matrix.node }}) ${{ matrix.target_platform || matrix.os }}, ${{ matrix.node || matrix.container }}, ${{ matrix.arch || matrix.container }}, ${{ contains(matrix.container, 'alpine') && 'musl' || 'glibc' }}
1237+
name: Compile profiling-node (v${{ matrix.node }}) ${{ matrix.target_platform || matrix.os }}, ${{ matrix.arch || matrix.container }}, ${{ contains(matrix.container, 'alpine') && 'musl' || 'glibc' }}
12471238
needs: [job_get_metadata, job_build]
12481239
# Compiling bindings can be very slow (especially on windows), so only run precompile
12491240
# Skip precompile unless we are on a release branch as precompile slows down CI times.
12501241
if: |
12511242
(needs.job_get_metadata.outputs.changed_profiling_node == 'true') ||
12521243
(needs.job_get_metadata.outputs.is_release == 'true')
12531244
runs-on: ${{ matrix.os }}
1254-
container: ${{ matrix.container }}
1245+
container:
1246+
image: ${{ matrix.container }}
12551247
timeout-minutes: 30
12561248
strategy:
12571249
fail-fast: false
12581250
matrix:
12591251
include:
12601252
# x64 glibc
1261-
- os: ubuntu-20.04
1262-
node: 16
1263-
binary: linux-x64-glibc-93
12641253
- os: ubuntu-20.04
12651254
node: 18
12661255
binary: linux-x64-glibc-108
@@ -1272,10 +1261,6 @@ jobs:
12721261
binary: linux-x64-glibc-127
12731262

12741263
# x64 musl
1275-
- os: ubuntu-20.04
1276-
container: node:16-alpine3.16
1277-
binary: linux-x64-musl-93
1278-
node: 16
12791264
- os: ubuntu-20.04
12801265
container: node:18-alpine3.17
12811266
node: 18
@@ -1290,10 +1275,6 @@ jobs:
12901275
binary: linux-x64-musl-127
12911276

12921277
# arm64 glibc
1293-
- os: ubuntu-20.04
1294-
arch: arm64
1295-
node: 16
1296-
binary: linux-arm64-glibc-93
12971278
- os: ubuntu-20.04
12981279
arch: arm64
12991280
node: 18
@@ -1308,11 +1289,6 @@ jobs:
13081289
binary: linux-arm64-glibc-127
13091290

13101291
# arm64 musl
1311-
- os: ubuntu-20.04
1312-
container: node:16-alpine3.16
1313-
arch: arm64
1314-
node: 16
1315-
binary: linux-arm64-musl-93
13161292
- os: ubuntu-20.04
13171293
arch: arm64
13181294
container: node:18-alpine3.17
@@ -1330,10 +1306,6 @@ jobs:
13301306
binary: linux-arm64-musl-127
13311307

13321308
# macos x64
1333-
- os: macos-13
1334-
node: 16
1335-
arch: x64
1336-
binary: darwin-x64-93
13371309
- os: macos-13
13381310
node: 18
13391311
arch: x64
@@ -1348,11 +1320,6 @@ jobs:
13481320
binary: darwin-x64-127
13491321

13501322
# macos arm64
1351-
- os: macos-13
1352-
arch: arm64
1353-
node: 16
1354-
target_platform: darwin
1355-
binary: darwin-arm64-93
13561323
- os: macos-13
13571324
arch: arm64
13581325
node: 18
@@ -1370,10 +1337,6 @@ jobs:
13701337
binary: darwin-arm64-127
13711338

13721339
# windows x64
1373-
- os: windows-2022
1374-
node: 16
1375-
arch: x64
1376-
binary: win32-x64-93
13771340
- os: windows-2022
13781341
node: 18
13791342
arch: x64
@@ -1399,8 +1362,13 @@ jobs:
13991362
with:
14001363
ref: ${{ env.HEAD_COMMIT }}
14011364

1365+
# Note: On alpine images, this does nothing
1366+
# The node version will be the one that is installed in the image
1367+
# If you want to change the node version, you need to change the image
1368+
# For non-alpine imgages, this will install the correct version of node
14021369
- name: Setup Node
14031370
uses: actions/setup-node@v4
1371+
if: contains(matrix.container, 'alpine') == false
14041372
with:
14051373
node-version: ${{ matrix.node }}
14061374

@@ -1417,10 +1385,10 @@ jobs:
14171385
run: yarn config set network-timeout 600000 -g
14181386

14191387
- name: Install dependencies
1420-
env:
1421-
SKIP_PLAYWRIGHT_BROWSER_INSTALL: "1"
14221388
if: steps.restore-dependencies.outputs.cache-hit != 'true'
14231389
run: yarn install --ignore-engines --frozen-lockfile
1390+
env:
1391+
SKIP_PLAYWRIGHT_BROWSER_INSTALL: "1"
14241392

14251393
- name: Configure safe directory
14261394
run: |
@@ -1498,8 +1466,7 @@ jobs:
14981466
BUILD_ARCH=arm64 \
14991467
yarn build:bindings:arm64
15001468
1501-
- name: Build Monorepo
1502-
if: steps.restore-build.outputs.cache-hit != 'true'
1469+
- name: Build profiling-node & its dependencies
15031470
run: yarn build --scope @sentry/profiling-node
15041471

15051472
- name: Test Bindings

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ package. Please refer to the README and instructions of those SDKs for more deta
7979
The current version of the SDK is 8.x. Version 7.x of the SDK will continue to receive critical bugfixes until end
8080
of 2024.
8181

82+
All SDKs require Node v18+ to run. ESM-only SDKs require Node v18.19.1+ to run.
83+
8284
## Installation and Usage
8385

8486
To install a SDK, simply add the high-level package, for example:

dev-packages/browser-integration-tests/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
"main": "index.js",
55
"license": "MIT",
66
"engines": {
7-
"node": ">=14.18"
7+
"node": ">=18"
88
},
99
"private": true,
1010
"scripts": {
1111
"clean": "rimraf -g suites/**/dist loader-suites/**/dist tmp",
12-
"install-browsers": "[[ -z \"$SKIP_PLAYWRIGHT_BROWSER_INSTALL\" ]] && yarn npx playwright install --with-deps || echo 'Skipping browser installation'",
12+
"install-browsers": "[[ -z \"$SKIP_PLAYWRIGHT_BROWSER_INSTALL\" ]] && npx playwright install --with-deps || echo 'Skipping browser installation'",
1313
"lint": "eslint . --format stylish",
1414
"fix": "eslint . --format stylish --fix",
1515
"type-check": "tsc",
@@ -52,7 +52,7 @@
5252
},
5353
"devDependencies": {
5454
"@types/glob": "8.0.0",
55-
"@types/node": "^14.18.0",
55+
"@types/node": "^18.19.1",
5656
"@types/pako": "^2.0.0",
5757
"glob": "8.0.3"
5858
},

dev-packages/e2e-tests/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
},
2222
"devDependencies": {
2323
"@types/glob": "8.0.0",
24-
"@types/node": "^18.0.0",
24+
"@types/node": "^18.19.1",
2525
"dotenv": "16.0.3",
2626
"esbuild": "0.20.0",
2727
"glob": "8.0.3",

dev-packages/e2e-tests/test-applications/create-next-app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
},
1414
"dependencies": {
1515
"@sentry/nextjs": "latest || *",
16-
"@types/node": "18.11.17",
16+
"@types/node": "^18.19.1",
1717
"@types/react": "18.0.26",
1818
"@types/react-dom": "18.0.9",
1919
"next": "14.0.0",

dev-packages/e2e-tests/test-applications/create-react-app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"private": true,
55
"dependencies": {
66
"@sentry/react": "latest || *",
7-
"@types/node": "16.7.13",
7+
"@types/node": "^18.19.1",
88
"@types/react": "18.0.0",
99
"@types/react-dom": "18.0.0",
1010
"react": "18.2.0",

dev-packages/e2e-tests/test-applications/default-browser/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"private": true,
55
"dependencies": {
66
"@sentry/browser": "latest || *",
7-
"@types/node": "16.7.13",
7+
"@types/node": "^18.19.1",
88
"typescript": "4.9.5"
99
},
1010
"scripts": {

dev-packages/e2e-tests/test-applications/ember-classic/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"@types/ember__string": "~3.0.15",
4949
"@types/ember__template": "~4.0.7",
5050
"@types/ember__utils": "~4.0.7",
51-
"@types/node": "18.18.0",
51+
"@types/node": "^18.19.1",
5252
"@types/rsvp": "~4.0.9",
5353
"broccoli-asset-rev": "~3.0.0",
5454
"ember-auto-import": "~2.4.3",
@@ -72,7 +72,7 @@
7272
"webpack": "~5.97.0"
7373
},
7474
"engines": {
75-
"node": "14.* || 16.* || >= 18"
75+
"node": ">=18"
7676
},
7777
"resolutions": {
7878
"@babel/traverse": "~7.25.9"

dev-packages/e2e-tests/test-applications/ember-embroider/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,14 @@
5454
"@sentry/ember": "latest || *",
5555
"@sentry-internal/test-utils": "link:../../../test-utils",
5656
"@tsconfig/ember": "^3.0.6",
57-
"@types/node": "18.18.0",
57+
"@types/node": "^18.19.1",
5858
"@tsconfig/node18": "18.2.4",
5959
"@types/rsvp": "^4.0.9",
6060
"ts-node": "10.9.1",
6161
"typescript": "^5.4.5"
6262
},
6363
"engines": {
64-
"node": ">= 18"
64+
"node": ">=18"
6565
},
6666
"ember": {
6767
"edition": "octane"

dev-packages/e2e-tests/test-applications/generic-ts3.8/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
},
1212
"devDependencies": {
1313
"typescript": "3.8.3",
14-
"@types/node": "^14.18.0"
14+
"@types/node": "^14.0.0"
1515
},
1616
"dependencies": {
1717
"@sentry/browser": "latest || *",

dev-packages/e2e-tests/test-applications/nestjs-8/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"@nestjs/schematics": "^10.0.0",
3232
"@nestjs/testing": "^10.0.0",
3333
"@types/express": "^4.17.17",
34-
"@types/node": "18.15.1",
34+
"@types/node": "^18.19.1",
3535
"@types/supertest": "^6.0.0",
3636
"@typescript-eslint/eslint-plugin": "^6.0.0",
3737
"@typescript-eslint/parser": "^6.0.0",

dev-packages/e2e-tests/test-applications/nestjs-basic-with-graphql/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"@nestjs/schematics": "^10.0.0",
3434
"@nestjs/testing": "^10.0.0",
3535
"@types/express": "^4.17.17",
36-
"@types/node": "18.15.1",
36+
"@types/node": "^18.19.1",
3737
"@types/supertest": "^6.0.0",
3838
"@typescript-eslint/eslint-plugin": "^6.0.0",
3939
"@typescript-eslint/parser": "^6.0.0",

dev-packages/e2e-tests/test-applications/nestjs-basic/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"@nestjs/schematics": "^10.0.0",
3232
"@nestjs/testing": "^10.0.0",
3333
"@types/express": "^4.17.17",
34-
"@types/node": "18.15.1",
34+
"@types/node": "^18.19.1",
3535
"@types/supertest": "^6.0.0",
3636
"@typescript-eslint/eslint-plugin": "^6.0.0",
3737
"@typescript-eslint/parser": "^6.0.0",

dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"@nestjs/schematics": "^10.0.0",
3131
"@nestjs/testing": "^10.0.0",
3232
"@types/express": "^4.17.17",
33-
"@types/node": "18.15.1",
33+
"@types/node": "^18.19.1",
3434
"@types/supertest": "^6.0.0",
3535
"@typescript-eslint/eslint-plugin": "^6.0.0",
3636
"@typescript-eslint/parser": "^6.0.0",

dev-packages/e2e-tests/test-applications/nestjs-fastify/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"@nestjs/cli": "^10.0.0",
3232
"@nestjs/schematics": "^10.0.0",
3333
"@nestjs/testing": "^10.0.0",
34-
"@types/node": "18.15.1",
34+
"@types/node": "^18.19.1",
3535
"@types/supertest": "^6.0.0",
3636
"@typescript-eslint/eslint-plugin": "^6.0.0",
3737
"@typescript-eslint/parser": "^6.0.0",

dev-packages/e2e-tests/test-applications/nestjs-graphql/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"@nestjs/schematics": "^10.0.0",
3434
"@nestjs/testing": "^10.0.0",
3535
"@types/express": "^4.17.17",
36-
"@types/node": "18.15.1",
36+
"@types/node": "^18.19.1",
3737
"@types/supertest": "^6.0.0",
3838
"@typescript-eslint/eslint-plugin": "^6.0.0",
3939
"@typescript-eslint/parser": "^6.0.0",

0 commit comments

Comments
 (0)