From 2853845bf7ccae81c3651bf975b5a71b62d915b4 Mon Sep 17 00:00:00 2001 From: Francesco Gringl-Novy Date: Wed, 18 Dec 2024 11:13:37 +0100 Subject: [PATCH] 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 https://github.com/getsentry/sentry-javascript/issues/14257 --- .github/ISSUE_TEMPLATE/flaky.yml | 2 +- .github/actions/restore-cache/action.yml | 15 ---- .github/workflows/build.yml | 63 ++++--------- README.md | 2 + .../browser-integration-tests/package.json | 6 +- dev-packages/e2e-tests/package.json | 2 +- .../create-next-app/package.json | 2 +- .../create-react-app/package.json | 2 +- .../default-browser/package.json | 2 +- .../ember-classic/package.json | 4 +- .../ember-embroider/package.json | 4 +- .../generic-ts3.8/package.json | 2 +- .../test-applications/nestjs-8/package.json | 2 +- .../nestjs-basic-with-graphql/package.json | 2 +- .../nestjs-basic/package.json | 2 +- .../nestjs-distributed-tracing/package.json | 2 +- .../nestjs-fastify/package.json | 2 +- .../nestjs-graphql/package.json | 2 +- .../package.json | 2 +- .../nestjs-with-submodules/package.json | 2 +- .../test-applications/nextjs-13/package.json | 2 +- .../test-applications/nextjs-14/package.json | 2 +- .../test-applications/nextjs-15/package.json | 2 +- .../nextjs-app-dir/package.json | 2 +- .../test-applications/nextjs-t3/package.json | 2 +- .../nextjs-turbo/package.json | 2 +- .../node-connect/package.json | 2 +- .../node-exports-test-app/package.json | 2 +- .../package.json | 2 +- .../node-express-send-to-sentry/package.json | 2 +- .../node-express/package.json | 2 +- .../node-fastify-5/package.json | 2 +- .../node-fastify/package.json | 2 +- .../test-applications/node-koa/package.json | 2 +- .../node-otel-custom-sampler/package.json | 2 +- .../node-otel-sdk-node/package.json | 2 +- .../node-otel-without-tracing/package.json | 2 +- .../test-applications/react-19/package.json | 2 +- .../react-create-hash-router/package.json | 2 +- .../react-router-5/package.json | 2 +- .../react-send-to-sentry/package.json | 2 +- .../test-applications/vue-3/package.json | 2 +- .../node-integration-tests/package.json | 4 +- .../{use-ts-version.js => use-ts-3_8.js} | 9 +- .../node-integration-tests/suites/anr/test.ts | 3 +- .../suites/contextLines/test.ts | 3 +- .../suites/esm/import-in-the-middle/test.ts | 3 +- .../suites/esm/modules-integration/test.ts | 3 +- .../suites/no-code/test.ts | 3 +- .../suites/public-api/LocalVariables/test.ts | 2 +- .../suites/tracing/ai/test.ts | 3 +- .../suites/tracing/prisma-orm/package.json | 2 +- .../suites/tracing/prisma-orm/setup.ts | 18 ---- .../suites/tracing/prisma-orm/test.ts | 3 +- .../requests/fetch-breadcrumbs/test.ts | 3 +- .../tracing/requests/fetch-no-tracing/test.ts | 3 +- .../fetch-sampled-no-active-span/test.ts | 3 +- .../tracing/requests/fetch-unsampled/test.ts | 3 +- .../tracing/requests/http-sampled-esm/test.ts | 3 +- .../suites/tracing/tedious/test.ts | 3 +- dev-packages/test-utils/package.json | 2 +- docs/migration/v8-to-v9.md | 4 +- package.json | 6 +- packages/angular/package.json | 3 +- packages/astro/package.json | 2 +- packages/aws-serverless/package.json | 4 +- packages/browser-utils/package.json | 2 +- packages/browser/package.json | 2 +- packages/bun/package.json | 2 +- packages/cloudflare/package.json | 4 +- packages/core/package.json | 2 +- packages/deno/package.json | 2 +- packages/ember/package.json | 2 +- packages/eslint-config-sdk/package.json | 2 +- packages/eslint-plugin-sdk/package.json | 2 +- packages/feedback/package.json | 2 +- packages/gatsby/package.json | 2 +- packages/google-cloud-serverless/package.json | 4 +- .../test/gcpfunction/cloud_event.test.ts | 2 +- .../test/gcpfunction/events.test.ts | 2 +- .../test/gcpfunction/http.test.ts | 1 + packages/integration-shims/package.json | 2 +- packages/nestjs/package.json | 2 +- packages/nextjs/package.json | 2 +- packages/nextjs/test/types/package.json | 2 +- packages/nextjs/test/types/test.ts | 12 --- packages/nitro-utils/package.json | 2 +- packages/node/package.json | 4 +- .../node/src/proxy/parse-proxy-response.ts | 2 +- packages/nuxt/package.json | 2 +- packages/opentelemetry/package.json | 2 +- packages/profiling-node/README.md | 5 +- packages/profiling-node/package.json | 4 +- packages/profiling-node/src/utils.ts | 6 +- packages/react/package.json | 2 +- packages/remix/package.json | 2 +- packages/remix/test/integration/package.json | 2 +- packages/replay-canvas/package.json | 2 +- packages/replay-internal/package.json | 2 +- packages/replay-worker/package.json | 2 +- packages/solid/package.json | 2 +- packages/solidstart/package.json | 2 +- packages/svelte/package.json | 2 +- packages/sveltekit/package.json | 2 +- packages/types/package.json | 2 +- packages/utils/package.json | 2 +- packages/vercel-edge/package.json | 2 +- .../async-local-storage-context-manager.ts | 2 +- packages/vue/package.json | 2 +- packages/wasm/package.json | 2 +- scripts/ci-unit-tests.ts | 43 --------- yarn.lock | 89 +++++++++++++------ 112 files changed, 203 insertions(+), 302 deletions(-) rename dev-packages/node-integration-tests/scripts/{use-ts-version.js => use-ts-3_8.js} (80%) delete mode 100755 dev-packages/node-integration-tests/suites/tracing/prisma-orm/setup.ts delete mode 100644 packages/nextjs/test/types/test.ts diff --git a/.github/ISSUE_TEMPLATE/flaky.yml b/.github/ISSUE_TEMPLATE/flaky.yml index a679cf98d328..2e86f8ebd869 100644 --- a/.github/ISSUE_TEMPLATE/flaky.yml +++ b/.github/ISSUE_TEMPLATE/flaky.yml @@ -19,7 +19,7 @@ body: id: job-name attributes: label: Name of Job - placeholder: "CI: Build & Test / Nextjs (Node 14) Tests" + placeholder: "CI: Build & Test / Nextjs (Node 18) Tests" description: name of job as reported in the status report validations: required: true diff --git a/.github/actions/restore-cache/action.yml b/.github/actions/restore-cache/action.yml index 6cd63a6550e4..e523cca6d904 100644 --- a/.github/actions/restore-cache/action.yml +++ b/.github/actions/restore-cache/action.yml @@ -5,9 +5,6 @@ inputs: dependency_cache_key: description: "The dependency cache key" required: true - node_version: - description: "If set, temporarily set node version to default one before installing, then revert to this version after." - required: false runs: using: "composite" @@ -24,19 +21,7 @@ runs: with: name: build-output - - name: Use default node version for install - if: inputs.node_version && steps.dep-cache.outputs.cache-hit != 'true' - uses: actions/setup-node@v4 - with: - node-version-file: 'package.json' - - name: Install dependencies if: steps.dep-cache.outputs.cache-hit != 'true' run: yarn install --ignore-engines --frozen-lockfile shell: bash - - - name: Revert node version to ${{ inputs.node_version }} - if: inputs.node_version && steps.dep-cache.outputs.cache-hit != 'true' - uses: actions/setup-node@v4 - with: - node-version: ${{ inputs.node_version }} diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 31f5cea28bda..6dc65ca48a99 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -459,7 +459,7 @@ jobs: strategy: fail-fast: false matrix: - node: [14, 16, 18, 20, 22] + node: [18, 20, 22] steps: - name: Check out base commit (${{ github.event.pull_request.base.sha }}) uses: actions/checkout@v4 @@ -478,7 +478,6 @@ jobs: uses: ./.github/actions/restore-cache with: dependency_cache_key: ${{ needs.job_build.outputs.dependency_cache_key }} - node_version: ${{ matrix.node == 14 && '14' || '' }} - name: Run affected tests run: yarn test:pr:node --base=${{ github.event.pull_request.base.sha }} @@ -715,7 +714,7 @@ jobs: strategy: fail-fast: false matrix: - node: [14, 16, 18, 20, 22] + node: [18, 20, 22] typescript: - false include: @@ -735,17 +734,13 @@ jobs: uses: ./.github/actions/restore-cache with: dependency_cache_key: ${{ needs.job_build.outputs.dependency_cache_key }} - node_version: ${{ matrix.node == 14 && '14' || '' }} - name: Overwrite typescript version - if: matrix.typescript - run: node ./scripts/use-ts-version.js ${{ matrix.typescript }} + if: matrix.typescript == '3.8' + run: node ./scripts/use-ts-3_8.js working-directory: dev-packages/node-integration-tests - name: Run integration tests - env: - NODE_VERSION: ${{ matrix.node }} - TS_VERSION: ${{ matrix.typescript }} working-directory: dev-packages/node-integration-tests run: yarn test @@ -760,10 +755,6 @@ jobs: matrix: node: [18, 20, 22] remix: [1, 2] - # Remix v2 only supports Node 18+, so run 16 tests separately - include: - - node: 16 - remix: 1 steps: - name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }}) uses: actions/checkout@v4 @@ -1243,7 +1234,7 @@ jobs: echo "One of the dependent jobs have failed. You may need to re-run it." && exit 1 job_compile_bindings_profiling_node: - 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' }} + name: Compile profiling-node (v${{ matrix.node }}) ${{ matrix.target_platform || matrix.os }}, ${{ matrix.arch || matrix.container }}, ${{ contains(matrix.container, 'alpine') && 'musl' || 'glibc' }} needs: [job_get_metadata, job_build] # Compiling bindings can be very slow (especially on windows), so only run precompile # Skip precompile unless we are on a release branch as precompile slows down CI times. @@ -1251,16 +1242,14 @@ jobs: (needs.job_get_metadata.outputs.changed_profiling_node == 'true') || (needs.job_get_metadata.outputs.is_release == 'true') runs-on: ${{ matrix.os }} - container: ${{ matrix.container }} + container: + image: ${{ matrix.container }} timeout-minutes: 30 strategy: fail-fast: false matrix: include: # x64 glibc - - os: ubuntu-20.04 - node: 16 - binary: linux-x64-glibc-93 - os: ubuntu-20.04 node: 18 binary: linux-x64-glibc-108 @@ -1272,10 +1261,6 @@ jobs: binary: linux-x64-glibc-127 # x64 musl - - os: ubuntu-20.04 - container: node:16-alpine3.16 - binary: linux-x64-musl-93 - node: 16 - os: ubuntu-20.04 container: node:18-alpine3.17 node: 18 @@ -1290,10 +1275,6 @@ jobs: binary: linux-x64-musl-127 # arm64 glibc - - os: ubuntu-20.04 - arch: arm64 - node: 16 - binary: linux-arm64-glibc-93 - os: ubuntu-20.04 arch: arm64 node: 18 @@ -1308,11 +1289,6 @@ jobs: binary: linux-arm64-glibc-127 # arm64 musl - - os: ubuntu-20.04 - container: node:16-alpine3.16 - arch: arm64 - node: 16 - binary: linux-arm64-musl-93 - os: ubuntu-20.04 arch: arm64 container: node:18-alpine3.17 @@ -1330,10 +1306,6 @@ jobs: binary: linux-arm64-musl-127 # macos x64 - - os: macos-13 - node: 16 - arch: x64 - binary: darwin-x64-93 - os: macos-13 node: 18 arch: x64 @@ -1348,11 +1320,6 @@ jobs: binary: darwin-x64-127 # macos arm64 - - os: macos-13 - arch: arm64 - node: 16 - target_platform: darwin - binary: darwin-arm64-93 - os: macos-13 arch: arm64 node: 18 @@ -1370,10 +1337,6 @@ jobs: binary: darwin-arm64-127 # windows x64 - - os: windows-2022 - node: 16 - arch: x64 - binary: win32-x64-93 - os: windows-2022 node: 18 arch: x64 @@ -1399,8 +1362,13 @@ jobs: with: ref: ${{ env.HEAD_COMMIT }} + # Note: On alpine images, this does nothing + # The node version will be the one that is installed in the image + # If you want to change the node version, you need to change the image + # For non-alpine imgages, this will install the correct version of node - name: Setup Node uses: actions/setup-node@v4 + if: contains(matrix.container, 'alpine') == false with: node-version: ${{ matrix.node }} @@ -1417,10 +1385,10 @@ jobs: run: yarn config set network-timeout 600000 -g - name: Install dependencies - env: - SKIP_PLAYWRIGHT_BROWSER_INSTALL: "1" if: steps.restore-dependencies.outputs.cache-hit != 'true' run: yarn install --ignore-engines --frozen-lockfile + env: + SKIP_PLAYWRIGHT_BROWSER_INSTALL: "1" - name: Configure safe directory run: | @@ -1498,8 +1466,7 @@ jobs: BUILD_ARCH=arm64 \ yarn build:bindings:arm64 - - name: Build Monorepo - if: steps.restore-build.outputs.cache-hit != 'true' + - name: Build profiling-node & its dependencies run: yarn build --scope @sentry/profiling-node - name: Test Bindings diff --git a/README.md b/README.md index db7000a9d51f..ed4fc189f11b 100644 --- a/README.md +++ b/README.md @@ -79,6 +79,8 @@ package. Please refer to the README and instructions of those SDKs for more deta The current version of the SDK is 8.x. Version 7.x of the SDK will continue to receive critical bugfixes until end of 2024. +All SDKs require Node v18+ to run. ESM-only SDKs require Node v18.19.1+ to run. + ## Installation and Usage To install a SDK, simply add the high-level package, for example: diff --git a/dev-packages/browser-integration-tests/package.json b/dev-packages/browser-integration-tests/package.json index 31a7ce76727e..eced2725a93b 100644 --- a/dev-packages/browser-integration-tests/package.json +++ b/dev-packages/browser-integration-tests/package.json @@ -4,12 +4,12 @@ "main": "index.js", "license": "MIT", "engines": { - "node": ">=14.18" + "node": ">=18" }, "private": true, "scripts": { "clean": "rimraf -g suites/**/dist loader-suites/**/dist tmp", - "install-browsers": "[[ -z \"$SKIP_PLAYWRIGHT_BROWSER_INSTALL\" ]] && yarn npx playwright install --with-deps || echo 'Skipping browser installation'", + "install-browsers": "[[ -z \"$SKIP_PLAYWRIGHT_BROWSER_INSTALL\" ]] && npx playwright install --with-deps || echo 'Skipping browser installation'", "lint": "eslint . --format stylish", "fix": "eslint . --format stylish --fix", "type-check": "tsc", @@ -52,7 +52,7 @@ }, "devDependencies": { "@types/glob": "8.0.0", - "@types/node": "^14.18.0", + "@types/node": "^18.19.1", "@types/pako": "^2.0.0", "glob": "8.0.3" }, diff --git a/dev-packages/e2e-tests/package.json b/dev-packages/e2e-tests/package.json index e1ff6f84550a..958b1645e1c0 100644 --- a/dev-packages/e2e-tests/package.json +++ b/dev-packages/e2e-tests/package.json @@ -21,7 +21,7 @@ }, "devDependencies": { "@types/glob": "8.0.0", - "@types/node": "^18.0.0", + "@types/node": "^18.19.1", "dotenv": "16.0.3", "esbuild": "0.20.0", "glob": "8.0.3", diff --git a/dev-packages/e2e-tests/test-applications/create-next-app/package.json b/dev-packages/e2e-tests/test-applications/create-next-app/package.json index e91c0ee135e5..fc8f48c822d6 100644 --- a/dev-packages/e2e-tests/test-applications/create-next-app/package.json +++ b/dev-packages/e2e-tests/test-applications/create-next-app/package.json @@ -13,7 +13,7 @@ }, "dependencies": { "@sentry/nextjs": "latest || *", - "@types/node": "18.11.17", + "@types/node": "^18.19.1", "@types/react": "18.0.26", "@types/react-dom": "18.0.9", "next": "14.0.0", diff --git a/dev-packages/e2e-tests/test-applications/create-react-app/package.json b/dev-packages/e2e-tests/test-applications/create-react-app/package.json index 916a17260a2a..ee98e1ec3f48 100644 --- a/dev-packages/e2e-tests/test-applications/create-react-app/package.json +++ b/dev-packages/e2e-tests/test-applications/create-react-app/package.json @@ -4,7 +4,7 @@ "private": true, "dependencies": { "@sentry/react": "latest || *", - "@types/node": "16.7.13", + "@types/node": "^18.19.1", "@types/react": "18.0.0", "@types/react-dom": "18.0.0", "react": "18.2.0", diff --git a/dev-packages/e2e-tests/test-applications/default-browser/package.json b/dev-packages/e2e-tests/test-applications/default-browser/package.json index dc31366f2ea8..635a4bef1955 100644 --- a/dev-packages/e2e-tests/test-applications/default-browser/package.json +++ b/dev-packages/e2e-tests/test-applications/default-browser/package.json @@ -4,7 +4,7 @@ "private": true, "dependencies": { "@sentry/browser": "latest || *", - "@types/node": "16.7.13", + "@types/node": "^18.19.1", "typescript": "4.9.5" }, "scripts": { diff --git a/dev-packages/e2e-tests/test-applications/ember-classic/package.json b/dev-packages/e2e-tests/test-applications/ember-classic/package.json index 4c887cda10ea..a0c0b4101d09 100644 --- a/dev-packages/e2e-tests/test-applications/ember-classic/package.json +++ b/dev-packages/e2e-tests/test-applications/ember-classic/package.json @@ -48,7 +48,7 @@ "@types/ember__string": "~3.0.15", "@types/ember__template": "~4.0.7", "@types/ember__utils": "~4.0.7", - "@types/node": "18.18.0", + "@types/node": "^18.19.1", "@types/rsvp": "~4.0.9", "broccoli-asset-rev": "~3.0.0", "ember-auto-import": "~2.4.3", @@ -72,7 +72,7 @@ "webpack": "~5.97.0" }, "engines": { - "node": "14.* || 16.* || >= 18" + "node": ">=18" }, "resolutions": { "@babel/traverse": "~7.25.9" diff --git a/dev-packages/e2e-tests/test-applications/ember-embroider/package.json b/dev-packages/e2e-tests/test-applications/ember-embroider/package.json index a8a4db191d81..b96b70876f53 100644 --- a/dev-packages/e2e-tests/test-applications/ember-embroider/package.json +++ b/dev-packages/e2e-tests/test-applications/ember-embroider/package.json @@ -54,14 +54,14 @@ "@sentry/ember": "latest || *", "@sentry-internal/test-utils": "link:../../../test-utils", "@tsconfig/ember": "^3.0.6", - "@types/node": "18.18.0", + "@types/node": "^18.19.1", "@tsconfig/node18": "18.2.4", "@types/rsvp": "^4.0.9", "ts-node": "10.9.1", "typescript": "^5.4.5" }, "engines": { - "node": ">= 18" + "node": ">=18" }, "ember": { "edition": "octane" diff --git a/dev-packages/e2e-tests/test-applications/generic-ts3.8/package.json b/dev-packages/e2e-tests/test-applications/generic-ts3.8/package.json index 77bebc280ea4..c9b564bf1651 100644 --- a/dev-packages/e2e-tests/test-applications/generic-ts3.8/package.json +++ b/dev-packages/e2e-tests/test-applications/generic-ts3.8/package.json @@ -11,7 +11,7 @@ }, "devDependencies": { "typescript": "3.8.3", - "@types/node": "^14.18.0" + "@types/node": "^14.0.0" }, "dependencies": { "@sentry/browser": "latest || *", diff --git a/dev-packages/e2e-tests/test-applications/nestjs-8/package.json b/dev-packages/e2e-tests/test-applications/nestjs-8/package.json index 20724e8d3b78..15ae8cf64bc8 100644 --- a/dev-packages/e2e-tests/test-applications/nestjs-8/package.json +++ b/dev-packages/e2e-tests/test-applications/nestjs-8/package.json @@ -31,7 +31,7 @@ "@nestjs/schematics": "^10.0.0", "@nestjs/testing": "^10.0.0", "@types/express": "^4.17.17", - "@types/node": "18.15.1", + "@types/node": "^18.19.1", "@types/supertest": "^6.0.0", "@typescript-eslint/eslint-plugin": "^6.0.0", "@typescript-eslint/parser": "^6.0.0", diff --git a/dev-packages/e2e-tests/test-applications/nestjs-basic-with-graphql/package.json b/dev-packages/e2e-tests/test-applications/nestjs-basic-with-graphql/package.json index 62606e825e33..04c1cfc27fb7 100644 --- a/dev-packages/e2e-tests/test-applications/nestjs-basic-with-graphql/package.json +++ b/dev-packages/e2e-tests/test-applications/nestjs-basic-with-graphql/package.json @@ -33,7 +33,7 @@ "@nestjs/schematics": "^10.0.0", "@nestjs/testing": "^10.0.0", "@types/express": "^4.17.17", - "@types/node": "18.15.1", + "@types/node": "^18.19.1", "@types/supertest": "^6.0.0", "@typescript-eslint/eslint-plugin": "^6.0.0", "@typescript-eslint/parser": "^6.0.0", diff --git a/dev-packages/e2e-tests/test-applications/nestjs-basic/package.json b/dev-packages/e2e-tests/test-applications/nestjs-basic/package.json index 44dcda348383..b51f6e74d3bc 100644 --- a/dev-packages/e2e-tests/test-applications/nestjs-basic/package.json +++ b/dev-packages/e2e-tests/test-applications/nestjs-basic/package.json @@ -31,7 +31,7 @@ "@nestjs/schematics": "^10.0.0", "@nestjs/testing": "^10.0.0", "@types/express": "^4.17.17", - "@types/node": "18.15.1", + "@types/node": "^18.19.1", "@types/supertest": "^6.0.0", "@typescript-eslint/eslint-plugin": "^6.0.0", "@typescript-eslint/parser": "^6.0.0", diff --git a/dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/package.json b/dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/package.json index 6efae6b1c0d5..15392e604a75 100644 --- a/dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/package.json +++ b/dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/package.json @@ -30,7 +30,7 @@ "@nestjs/schematics": "^10.0.0", "@nestjs/testing": "^10.0.0", "@types/express": "^4.17.17", - "@types/node": "18.15.1", + "@types/node": "^18.19.1", "@types/supertest": "^6.0.0", "@typescript-eslint/eslint-plugin": "^6.0.0", "@typescript-eslint/parser": "^6.0.0", diff --git a/dev-packages/e2e-tests/test-applications/nestjs-fastify/package.json b/dev-packages/e2e-tests/test-applications/nestjs-fastify/package.json index 6da132e74a4c..d456c22370df 100644 --- a/dev-packages/e2e-tests/test-applications/nestjs-fastify/package.json +++ b/dev-packages/e2e-tests/test-applications/nestjs-fastify/package.json @@ -31,7 +31,7 @@ "@nestjs/cli": "^10.0.0", "@nestjs/schematics": "^10.0.0", "@nestjs/testing": "^10.0.0", - "@types/node": "18.15.1", + "@types/node": "^18.19.1", "@types/supertest": "^6.0.0", "@typescript-eslint/eslint-plugin": "^6.0.0", "@typescript-eslint/parser": "^6.0.0", diff --git a/dev-packages/e2e-tests/test-applications/nestjs-graphql/package.json b/dev-packages/e2e-tests/test-applications/nestjs-graphql/package.json index 2463d24df940..640889424a87 100644 --- a/dev-packages/e2e-tests/test-applications/nestjs-graphql/package.json +++ b/dev-packages/e2e-tests/test-applications/nestjs-graphql/package.json @@ -33,7 +33,7 @@ "@nestjs/schematics": "^10.0.0", "@nestjs/testing": "^10.0.0", "@types/express": "^4.17.17", - "@types/node": "18.15.1", + "@types/node": "^18.19.1", "@types/supertest": "^6.0.0", "@typescript-eslint/eslint-plugin": "^6.0.0", "@typescript-eslint/parser": "^6.0.0", diff --git a/dev-packages/e2e-tests/test-applications/nestjs-with-submodules-decorator/package.json b/dev-packages/e2e-tests/test-applications/nestjs-with-submodules-decorator/package.json index 0b03e38ccbdb..e1dd3d4b3030 100644 --- a/dev-packages/e2e-tests/test-applications/nestjs-with-submodules-decorator/package.json +++ b/dev-packages/e2e-tests/test-applications/nestjs-with-submodules-decorator/package.json @@ -29,7 +29,7 @@ "@nestjs/schematics": "^10.0.0", "@nestjs/testing": "^10.0.0", "@types/express": "^4.17.17", - "@types/node": "18.15.1", + "@types/node": "^18.19.1", "@types/supertest": "^6.0.0", "@typescript-eslint/eslint-plugin": "^6.0.0", "@typescript-eslint/parser": "^6.0.0", diff --git a/dev-packages/e2e-tests/test-applications/nestjs-with-submodules/package.json b/dev-packages/e2e-tests/test-applications/nestjs-with-submodules/package.json index 8f90e1582598..78e661aa7d4f 100644 --- a/dev-packages/e2e-tests/test-applications/nestjs-with-submodules/package.json +++ b/dev-packages/e2e-tests/test-applications/nestjs-with-submodules/package.json @@ -29,7 +29,7 @@ "@nestjs/schematics": "^10.0.0", "@nestjs/testing": "^10.0.0", "@types/express": "^4.17.17", - "@types/node": "18.15.1", + "@types/node": "^18.19.1", "@types/supertest": "^6.0.0", "@typescript-eslint/eslint-plugin": "^6.0.0", "@typescript-eslint/parser": "^6.0.0", diff --git a/dev-packages/e2e-tests/test-applications/nextjs-13/package.json b/dev-packages/e2e-tests/test-applications/nextjs-13/package.json index de03f89fce27..fa16079822b8 100644 --- a/dev-packages/e2e-tests/test-applications/nextjs-13/package.json +++ b/dev-packages/e2e-tests/test-applications/nextjs-13/package.json @@ -14,7 +14,7 @@ }, "dependencies": { "@sentry/nextjs": "latest || *", - "@types/node": "18.11.17", + "@types/node": "^18.19.1", "@types/react": "18.0.26", "@types/react-dom": "18.0.9", "next": "13.5.7", diff --git a/dev-packages/e2e-tests/test-applications/nextjs-14/package.json b/dev-packages/e2e-tests/test-applications/nextjs-14/package.json index d1ef013e6ccc..5e42830d0874 100644 --- a/dev-packages/e2e-tests/test-applications/nextjs-14/package.json +++ b/dev-packages/e2e-tests/test-applications/nextjs-14/package.json @@ -14,7 +14,7 @@ }, "dependencies": { "@sentry/nextjs": "latest || *", - "@types/node": "18.11.17", + "@types/node": "^18.19.1", "@types/react": "18.0.26", "@types/react-dom": "18.0.9", "next": "14.1.3", diff --git a/dev-packages/e2e-tests/test-applications/nextjs-15/package.json b/dev-packages/e2e-tests/test-applications/nextjs-15/package.json index ca92feb9c254..ace02f6a1924 100644 --- a/dev-packages/e2e-tests/test-applications/nextjs-15/package.json +++ b/dev-packages/e2e-tests/test-applications/nextjs-15/package.json @@ -15,7 +15,7 @@ }, "dependencies": { "@sentry/nextjs": "latest || *", - "@types/node": "18.11.17", + "@types/node": "^18.19.1", "@types/react": "18.0.26", "@types/react-dom": "18.0.9", "next": "15.0.0-canary.182", diff --git a/dev-packages/e2e-tests/test-applications/nextjs-app-dir/package.json b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/package.json index 4b09aff7f937..81f576ef016b 100644 --- a/dev-packages/e2e-tests/test-applications/nextjs-app-dir/package.json +++ b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/package.json @@ -16,7 +16,7 @@ }, "dependencies": { "@sentry/nextjs": "latest || *", - "@types/node": "18.11.17", + "@types/node": "^18.19.1", "@types/react": "18.0.26", "@types/react-dom": "18.0.9", "next": "14.0.2", diff --git a/dev-packages/e2e-tests/test-applications/nextjs-t3/package.json b/dev-packages/e2e-tests/test-applications/nextjs-t3/package.json index 304e26d83433..1ebef0ce37ae 100644 --- a/dev-packages/e2e-tests/test-applications/nextjs-t3/package.json +++ b/dev-packages/e2e-tests/test-applications/nextjs-t3/package.json @@ -32,7 +32,7 @@ "@playwright/test": "^1.44.1", "@sentry-internal/test-utils": "link:../../../test-utils", "@types/eslint": "^8.56.10", - "@types/node": "^20.14.10", + "@types/node": "^18.19.1", "@types/react": "18.3.1", "@types/react-dom": "^18.3.0", "@typescript-eslint/eslint-plugin": "^8.1.0", diff --git a/dev-packages/e2e-tests/test-applications/nextjs-turbo/package.json b/dev-packages/e2e-tests/test-applications/nextjs-turbo/package.json index 10630c257349..9db87a43cd49 100644 --- a/dev-packages/e2e-tests/test-applications/nextjs-turbo/package.json +++ b/dev-packages/e2e-tests/test-applications/nextjs-turbo/package.json @@ -14,7 +14,7 @@ }, "dependencies": { "@sentry/nextjs": "latest || *", - "@types/node": "18.11.17", + "@types/node": "^18.19.1", "@types/react": "18.0.26", "@types/react-dom": "18.0.9", "next": "15.0.0", diff --git a/dev-packages/e2e-tests/test-applications/node-connect/package.json b/dev-packages/e2e-tests/test-applications/node-connect/package.json index 276e8654f8f4..ffd692a2175e 100644 --- a/dev-packages/e2e-tests/test-applications/node-connect/package.json +++ b/dev-packages/e2e-tests/test-applications/node-connect/package.json @@ -14,7 +14,7 @@ "@sentry/node": "latest || *", "@sentry/core": "latest || *", "@sentry/opentelemetry": "latest || *", - "@types/node": "18.15.1", + "@types/node": "^18.19.1", "connect": "3.7.0", "typescript": "4.9.5", "ts-node": "10.9.1" diff --git a/dev-packages/e2e-tests/test-applications/node-exports-test-app/package.json b/dev-packages/e2e-tests/test-applications/node-exports-test-app/package.json index 5be4d29bbb38..975553194815 100644 --- a/dev-packages/e2e-tests/test-applications/node-exports-test-app/package.json +++ b/dev-packages/e2e-tests/test-applications/node-exports-test-app/package.json @@ -20,7 +20,7 @@ "@sentry/aws-serverless": "latest || *", "@sentry/google-cloud-serverless": "latest || *", "@sentry/bun": "latest || *", - "@types/node": "18.15.1", + "@types/node": "^18.19.1", "typescript": "4.9.5" }, "volta": { diff --git a/dev-packages/e2e-tests/test-applications/node-express-incorrect-instrumentation/package.json b/dev-packages/e2e-tests/test-applications/node-express-incorrect-instrumentation/package.json index 391514a2c1dd..2931b2bea72f 100644 --- a/dev-packages/e2e-tests/test-applications/node-express-incorrect-instrumentation/package.json +++ b/dev-packages/e2e-tests/test-applications/node-express-incorrect-instrumentation/package.json @@ -16,7 +16,7 @@ "@trpc/server": "10.45.2", "@trpc/client": "10.45.2", "@types/express": "4.17.17", - "@types/node": "18.15.1", + "@types/node": "^18.19.1", "express": "4.20.0", "typescript": "4.9.5", "zod": "~3.22.4" diff --git a/dev-packages/e2e-tests/test-applications/node-express-send-to-sentry/package.json b/dev-packages/e2e-tests/test-applications/node-express-send-to-sentry/package.json index 49e98e2c49ad..5e964bbdd8bd 100644 --- a/dev-packages/e2e-tests/test-applications/node-express-send-to-sentry/package.json +++ b/dev-packages/e2e-tests/test-applications/node-express-send-to-sentry/package.json @@ -14,7 +14,7 @@ "@sentry/core": "latest || *", "@sentry/node": "latest || *", "@types/express": "4.17.17", - "@types/node": "18.15.1", + "@types/node": "^18.19.1", "express": "4.19.2", "typescript": "4.9.5" }, diff --git a/dev-packages/e2e-tests/test-applications/node-express/package.json b/dev-packages/e2e-tests/test-applications/node-express/package.json index bc0b9b4dead7..684a6ae1a3da 100644 --- a/dev-packages/e2e-tests/test-applications/node-express/package.json +++ b/dev-packages/e2e-tests/test-applications/node-express/package.json @@ -16,7 +16,7 @@ "@trpc/server": "10.45.2", "@trpc/client": "10.45.2", "@types/express": "4.17.17", - "@types/node": "18.15.1", + "@types/node": "^18.19.1", "express": "4.20.0", "typescript": "4.9.5", "zod": "~3.22.4" diff --git a/dev-packages/e2e-tests/test-applications/node-fastify-5/package.json b/dev-packages/e2e-tests/test-applications/node-fastify-5/package.json index e0a000572a25..f720b711d1fa 100644 --- a/dev-packages/e2e-tests/test-applications/node-fastify-5/package.json +++ b/dev-packages/e2e-tests/test-applications/node-fastify-5/package.json @@ -14,7 +14,7 @@ "@sentry/node": "latest || *", "@sentry/core": "latest || *", "@sentry/opentelemetry": "latest || *", - "@types/node": "22.7.5", + "@types/node": "^18.19.1", "fastify": "5.0.0", "typescript": "5.6.3", "ts-node": "10.9.2" diff --git a/dev-packages/e2e-tests/test-applications/node-fastify/package.json b/dev-packages/e2e-tests/test-applications/node-fastify/package.json index b657eddd1de1..1a3847ef3b12 100644 --- a/dev-packages/e2e-tests/test-applications/node-fastify/package.json +++ b/dev-packages/e2e-tests/test-applications/node-fastify/package.json @@ -14,7 +14,7 @@ "@sentry/node": "latest || *", "@sentry/core": "latest || *", "@sentry/opentelemetry": "latest || *", - "@types/node": "18.15.1", + "@types/node": "^18.19.1", "fastify": "4.23.2", "typescript": "4.9.5", "ts-node": "10.9.1" diff --git a/dev-packages/e2e-tests/test-applications/node-koa/package.json b/dev-packages/e2e-tests/test-applications/node-koa/package.json index 0f6ed61216db..7962f3153682 100644 --- a/dev-packages/e2e-tests/test-applications/node-koa/package.json +++ b/dev-packages/e2e-tests/test-applications/node-koa/package.json @@ -13,7 +13,7 @@ "@koa/bodyparser": "^5.1.1", "@koa/router": "^12.0.1", "@sentry/node": "latest || *", - "@types/node": "18.15.1", + "@types/node": "^18.19.1", "koa": "^2.15.2", "typescript": "4.9.5" }, diff --git a/dev-packages/e2e-tests/test-applications/node-otel-custom-sampler/package.json b/dev-packages/e2e-tests/test-applications/node-otel-custom-sampler/package.json index 30cd21643eb8..c5ffdf039553 100644 --- a/dev-packages/e2e-tests/test-applications/node-otel-custom-sampler/package.json +++ b/dev-packages/e2e-tests/test-applications/node-otel-custom-sampler/package.json @@ -16,7 +16,7 @@ "@sentry/node": "latest || *", "@sentry/opentelemetry": "latest || *", "@types/express": "4.17.17", - "@types/node": "18.15.1", + "@types/node": "^18.19.1", "express": "4.19.2", "typescript": "4.9.5" }, diff --git a/dev-packages/e2e-tests/test-applications/node-otel-sdk-node/package.json b/dev-packages/e2e-tests/test-applications/node-otel-sdk-node/package.json index fd2b9bf4aafe..88c6f4c3eef9 100644 --- a/dev-packages/e2e-tests/test-applications/node-otel-sdk-node/package.json +++ b/dev-packages/e2e-tests/test-applications/node-otel-sdk-node/package.json @@ -17,7 +17,7 @@ "@sentry/node": "latest || *", "@sentry/opentelemetry": "latest || *", "@types/express": "4.17.17", - "@types/node": "18.15.1", + "@types/node": "^18.19.1", "express": "4.19.2", "typescript": "4.9.5" }, diff --git a/dev-packages/e2e-tests/test-applications/node-otel-without-tracing/package.json b/dev-packages/e2e-tests/test-applications/node-otel-without-tracing/package.json index efe84d86604e..905c94449732 100644 --- a/dev-packages/e2e-tests/test-applications/node-otel-without-tracing/package.json +++ b/dev-packages/e2e-tests/test-applications/node-otel-without-tracing/package.json @@ -20,7 +20,7 @@ "@sentry/node": "latest || *", "@sentry/opentelemetry": "latest || *", "@types/express": "4.17.17", - "@types/node": "18.15.1", + "@types/node": "^18.19.1", "express": "4.19.2", "typescript": "4.9.5" }, diff --git a/dev-packages/e2e-tests/test-applications/react-19/package.json b/dev-packages/e2e-tests/test-applications/react-19/package.json index 5de946437a44..b5d3d25d5fb7 100644 --- a/dev-packages/e2e-tests/test-applications/react-19/package.json +++ b/dev-packages/e2e-tests/test-applications/react-19/package.json @@ -6,7 +6,7 @@ "@sentry/react": "latest || *", "history": "4.9.0", "@types/history": "4.7.11", - "@types/node": "16.7.13", + "@types/node": "^18.19.1", "@types/react": "npm:types-react@rc", "@types/react-dom": "npm:types-react-dom@rc", "react": "19.0.0-rc-935180c7e0-20240524", diff --git a/dev-packages/e2e-tests/test-applications/react-create-hash-router/package.json b/dev-packages/e2e-tests/test-applications/react-create-hash-router/package.json index e475fb505fc8..bfe148db10a6 100644 --- a/dev-packages/e2e-tests/test-applications/react-create-hash-router/package.json +++ b/dev-packages/e2e-tests/test-applications/react-create-hash-router/package.json @@ -4,7 +4,7 @@ "private": true, "dependencies": { "@sentry/react": "latest || *", - "@types/node": "16.7.13", + "@types/node": "^18.19.1", "@types/react": "18.0.0", "@types/react-dom": "18.0.0", "react": "18.2.0", diff --git a/dev-packages/e2e-tests/test-applications/react-router-5/package.json b/dev-packages/e2e-tests/test-applications/react-router-5/package.json index 0b208b3f5a65..b23643e8be31 100644 --- a/dev-packages/e2e-tests/test-applications/react-router-5/package.json +++ b/dev-packages/e2e-tests/test-applications/react-router-5/package.json @@ -6,7 +6,7 @@ "@sentry/react": "latest || *", "history": "4.9.0", "@types/history": "4.7.11", - "@types/node": "16.7.13", + "@types/node": "^18.19.1", "@types/react": "18.0.0", "@types/react-dom": "18.0.0", "@types/react-router": "5.1.20", diff --git a/dev-packages/e2e-tests/test-applications/react-send-to-sentry/package.json b/dev-packages/e2e-tests/test-applications/react-send-to-sentry/package.json index 836707b3017f..9be121c97312 100644 --- a/dev-packages/e2e-tests/test-applications/react-send-to-sentry/package.json +++ b/dev-packages/e2e-tests/test-applications/react-send-to-sentry/package.json @@ -4,7 +4,7 @@ "private": true, "dependencies": { "@sentry/react": "latest || *", - "@types/node": "16.7.13", + "@types/node": "^18.19.1", "@types/react": "18.0.0", "@types/react-dom": "18.0.0", "react": "18.2.0", diff --git a/dev-packages/e2e-tests/test-applications/vue-3/package.json b/dev-packages/e2e-tests/test-applications/vue-3/package.json index f34bdf6d6c0e..06436101eee8 100644 --- a/dev-packages/e2e-tests/test-applications/vue-3/package.json +++ b/dev-packages/e2e-tests/test-applications/vue-3/package.json @@ -25,7 +25,7 @@ "@sentry-internal/test-utils": "link:../../../test-utils", "@sentry/core": "latest || *", "@tsconfig/node20": "^20.1.2", - "@types/node": "^20.11.10", + "@types/node": "^18.19.1", "@vitejs/plugin-vue": "^5.0.3", "@vitejs/plugin-vue-jsx": "^3.1.0", "@vue/tsconfig": "^0.5.1", diff --git a/dev-packages/node-integration-tests/package.json b/dev-packages/node-integration-tests/package.json index 4be4b830f1c2..f27d4c7e750e 100644 --- a/dev-packages/node-integration-tests/package.json +++ b/dev-packages/node-integration-tests/package.json @@ -3,7 +3,7 @@ "version": "8.45.0", "license": "MIT", "engines": { - "node": ">=14.18" + "node": ">=18" }, "private": true, "main": "build/cjs/index.js", @@ -16,7 +16,7 @@ "build:types": "tsc -p tsconfig.types.json", "clean": "rimraf -g **/node_modules && run-p clean:script", "clean:script": "node scripts/clean.js", - "prisma:init": "(cd suites/tracing/prisma-orm && ts-node ./setup.ts)", + "prisma:init": "cd suites/tracing/prisma-orm && yarn && yarn setup", "lint": "eslint . --format stylish", "fix": "eslint . --format stylish --fix", "type-check": "tsc", diff --git a/dev-packages/node-integration-tests/scripts/use-ts-version.js b/dev-packages/node-integration-tests/scripts/use-ts-3_8.js similarity index 80% rename from dev-packages/node-integration-tests/scripts/use-ts-version.js rename to dev-packages/node-integration-tests/scripts/use-ts-3_8.js index 0b64d735436c..e8b43ecfe6f2 100644 --- a/dev-packages/node-integration-tests/scripts/use-ts-version.js +++ b/dev-packages/node-integration-tests/scripts/use-ts-3_8.js @@ -5,11 +5,14 @@ const { writeFileSync } = require('fs'); const cwd = join(__dirname, '../../..'); -const tsVersion = process.argv[2] || '3.8'; +const tsVersion = '3.8'; -console.log(`Installing typescript@${tsVersion}...`); +console.log(`Installing typescript@${tsVersion}, and @types/node@14...`); -execSync(`yarn add --dev --ignore-workspace-root-check typescript@${tsVersion}`, { stdio: 'inherit', cwd }); +execSync(`yarn add --dev --ignore-workspace-root-check typescript@${tsVersion} @types/node@^14`, { + stdio: 'inherit', + cwd, +}); console.log('Removing unsupported tsconfig options...'); diff --git a/dev-packages/node-integration-tests/suites/anr/test.ts b/dev-packages/node-integration-tests/suites/anr/test.ts index d1d9c684bf60..1366600d5280 100644 --- a/dev-packages/node-integration-tests/suites/anr/test.ts +++ b/dev-packages/node-integration-tests/suites/anr/test.ts @@ -1,5 +1,4 @@ import type { Event } from '@sentry/core'; -import { conditionalTest } from '../../utils'; import { cleanupChildProcesses, createRunner } from '../../utils/runner'; const ANR_EVENT = { @@ -107,7 +106,7 @@ const ANR_EVENT_WITH_DEBUG_META: Event = { }, }; -conditionalTest({ min: 16 })('should report ANR when event loop blocked', () => { +describe('should report ANR when event loop blocked', () => { afterAll(() => { cleanupChildProcesses(); }); diff --git a/dev-packages/node-integration-tests/suites/contextLines/test.ts b/dev-packages/node-integration-tests/suites/contextLines/test.ts index 1912f0b57f04..06591bcfbe8e 100644 --- a/dev-packages/node-integration-tests/suites/contextLines/test.ts +++ b/dev-packages/node-integration-tests/suites/contextLines/test.ts @@ -1,8 +1,7 @@ import { join } from 'path'; -import { conditionalTest } from '../../utils'; import { createRunner } from '../../utils/runner'; -conditionalTest({ min: 18 })('ContextLines integration in ESM', () => { +describe('ContextLines integration in ESM', () => { test('reads encoded context lines from filenames with spaces', done => { expect.assertions(1); const instrumentPath = join(__dirname, 'instrument.mjs'); diff --git a/dev-packages/node-integration-tests/suites/esm/import-in-the-middle/test.ts b/dev-packages/node-integration-tests/suites/esm/import-in-the-middle/test.ts index d1584c2ea32d..828ff702f45b 100644 --- a/dev-packages/node-integration-tests/suites/esm/import-in-the-middle/test.ts +++ b/dev-packages/node-integration-tests/suites/esm/import-in-the-middle/test.ts @@ -1,13 +1,12 @@ import { spawnSync } from 'child_process'; import { join } from 'path'; -import { conditionalTest } from '../../../utils'; import { cleanupChildProcesses } from '../../../utils/runner'; afterAll(() => { cleanupChildProcesses(); }); -conditionalTest({ min: 18 })('import-in-the-middle', () => { +describe('import-in-the-middle', () => { test('onlyIncludeInstrumentedModules', () => { const result = spawnSync('node', [join(__dirname, 'app.mjs')], { encoding: 'utf-8' }); expect(result.stderr).not.toMatch('should be the only hooked modules but we just hooked'); diff --git a/dev-packages/node-integration-tests/suites/esm/modules-integration/test.ts b/dev-packages/node-integration-tests/suites/esm/modules-integration/test.ts index 556ec1d52a57..eaee003781f3 100644 --- a/dev-packages/node-integration-tests/suites/esm/modules-integration/test.ts +++ b/dev-packages/node-integration-tests/suites/esm/modules-integration/test.ts @@ -1,11 +1,10 @@ -import { conditionalTest } from '../../../utils'; import { cleanupChildProcesses, createRunner } from '../../../utils/runner'; afterAll(() => { cleanupChildProcesses(); }); -conditionalTest({ min: 18 })('modulesIntegration', () => { +describe('modulesIntegration', () => { test('does not crash ESM setups', done => { createRunner(__dirname, 'app.mjs').ensureNoErrorOutput().start(done); }); diff --git a/dev-packages/node-integration-tests/suites/no-code/test.ts b/dev-packages/node-integration-tests/suites/no-code/test.ts index dfaae9de7cdc..fdcd5bd25fc6 100644 --- a/dev-packages/node-integration-tests/suites/no-code/test.ts +++ b/dev-packages/node-integration-tests/suites/no-code/test.ts @@ -1,4 +1,3 @@ -import { conditionalTest } from '../../utils'; import { cleanupChildProcesses, createRunner } from '../../utils/runner'; const EVENT = { @@ -25,7 +24,7 @@ describe('no-code init', () => { .start(done); }); - conditionalTest({ min: 18 })('--import', () => { + describe('--import', () => { test('ESM', done => { createRunner(__dirname, 'app.mjs') .withFlags('--import=@sentry/node/init') diff --git a/dev-packages/node-integration-tests/suites/public-api/LocalVariables/test.ts b/dev-packages/node-integration-tests/suites/public-api/LocalVariables/test.ts index 779b341d9f40..7ed9d352474a 100644 --- a/dev-packages/node-integration-tests/suites/public-api/LocalVariables/test.ts +++ b/dev-packages/node-integration-tests/suites/public-api/LocalVariables/test.ts @@ -37,7 +37,7 @@ const EXPECTED_LOCAL_VARIABLES_EVENT = { }, }; -conditionalTest({ min: 18 })('LocalVariables integration', () => { +describe('LocalVariables integration', () => { afterAll(() => { cleanupChildProcesses(); }); diff --git a/dev-packages/node-integration-tests/suites/tracing/ai/test.ts b/dev-packages/node-integration-tests/suites/tracing/ai/test.ts index e269f9da9db3..bc263e9fc610 100644 --- a/dev-packages/node-integration-tests/suites/tracing/ai/test.ts +++ b/dev-packages/node-integration-tests/suites/tracing/ai/test.ts @@ -1,8 +1,7 @@ -import { conditionalTest } from '../../../utils'; import { cleanupChildProcesses, createRunner } from '../../../utils/runner'; // `ai` SDK only support Node 18+ -conditionalTest({ min: 18 })('ai', () => { +describe('ai', () => { afterAll(() => { cleanupChildProcesses(); }); diff --git a/dev-packages/node-integration-tests/suites/tracing/prisma-orm/package.json b/dev-packages/node-integration-tests/suites/tracing/prisma-orm/package.json index 70e2c29be629..b8721038c83b 100644 --- a/dev-packages/node-integration-tests/suites/tracing/prisma-orm/package.json +++ b/dev-packages/node-integration-tests/suites/tracing/prisma-orm/package.json @@ -4,7 +4,7 @@ "description": "", "main": "index.js", "engines": { - "node": ">=16" + "node": ">=18" }, "scripts": { "db-up": "docker compose up -d", diff --git a/dev-packages/node-integration-tests/suites/tracing/prisma-orm/setup.ts b/dev-packages/node-integration-tests/suites/tracing/prisma-orm/setup.ts deleted file mode 100755 index a0052511b380..000000000000 --- a/dev-packages/node-integration-tests/suites/tracing/prisma-orm/setup.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { execSync } from 'child_process'; -import { parseSemver } from '@sentry/core'; - -const NODE_VERSION = parseSemver(process.versions.node); - -// Prisma v5 requires Node.js v16+ -// https://www.prisma.io/docs/orm/more/upgrade-guides/upgrading-versions/upgrading-to-prisma-5#nodejs-minimum-version-change -if (NODE_VERSION.major && NODE_VERSION.major < 16) { - // eslint-disable-next-line no-console - console.warn(`Skipping Prisma tests on Node: ${NODE_VERSION.major}`); - process.exit(0); -} - -try { - execSync('yarn && yarn setup'); -} catch (_) { - process.exit(1); -} diff --git a/dev-packages/node-integration-tests/suites/tracing/prisma-orm/test.ts b/dev-packages/node-integration-tests/suites/tracing/prisma-orm/test.ts index 4cc1757c0d19..d5e9f7ba372f 100644 --- a/dev-packages/node-integration-tests/suites/tracing/prisma-orm/test.ts +++ b/dev-packages/node-integration-tests/suites/tracing/prisma-orm/test.ts @@ -1,7 +1,6 @@ -import { conditionalTest } from '../../../utils'; import { createRunner } from '../../../utils/runner'; -conditionalTest({ min: 16 })('Prisma ORM Tests', () => { +describe('Prisma ORM Tests', () => { test('CJS - should instrument PostgreSQL queries from Prisma ORM', done => { createRunner(__dirname, 'scenario.js') .expect({ diff --git a/dev-packages/node-integration-tests/suites/tracing/requests/fetch-breadcrumbs/test.ts b/dev-packages/node-integration-tests/suites/tracing/requests/fetch-breadcrumbs/test.ts index c0d783aaa594..254d197c85c3 100644 --- a/dev-packages/node-integration-tests/suites/tracing/requests/fetch-breadcrumbs/test.ts +++ b/dev-packages/node-integration-tests/suites/tracing/requests/fetch-breadcrumbs/test.ts @@ -1,8 +1,7 @@ -import { conditionalTest } from '../../../../utils'; import { createRunner } from '../../../../utils/runner'; import { createTestServer } from '../../../../utils/server'; -conditionalTest({ min: 18 })('outgoing fetch', () => { +describe('outgoing fetch', () => { test('outgoing fetch requests create breadcrumbs', done => { createTestServer(done) .start() diff --git a/dev-packages/node-integration-tests/suites/tracing/requests/fetch-no-tracing/test.ts b/dev-packages/node-integration-tests/suites/tracing/requests/fetch-no-tracing/test.ts index 9c732d899cde..906fa6541dd6 100644 --- a/dev-packages/node-integration-tests/suites/tracing/requests/fetch-no-tracing/test.ts +++ b/dev-packages/node-integration-tests/suites/tracing/requests/fetch-no-tracing/test.ts @@ -1,8 +1,7 @@ -import { conditionalTest } from '../../../../utils'; import { createRunner } from '../../../../utils/runner'; import { createTestServer } from '../../../../utils/server'; -conditionalTest({ min: 18 })('outgoing fetch', () => { +describe('outgoing fetch', () => { test('outgoing fetch requests are correctly instrumented with tracing disabled', done => { expect.assertions(11); diff --git a/dev-packages/node-integration-tests/suites/tracing/requests/fetch-sampled-no-active-span/test.ts b/dev-packages/node-integration-tests/suites/tracing/requests/fetch-sampled-no-active-span/test.ts index fde1c787829a..afe60d27b22a 100644 --- a/dev-packages/node-integration-tests/suites/tracing/requests/fetch-sampled-no-active-span/test.ts +++ b/dev-packages/node-integration-tests/suites/tracing/requests/fetch-sampled-no-active-span/test.ts @@ -1,8 +1,7 @@ -import { conditionalTest } from '../../../../utils'; import { createRunner } from '../../../../utils/runner'; import { createTestServer } from '../../../../utils/server'; -conditionalTest({ min: 18 })('outgoing fetch', () => { +describe('outgoing fetch', () => { test('outgoing sampled fetch requests without active span are correctly instrumented', done => { expect.assertions(11); diff --git a/dev-packages/node-integration-tests/suites/tracing/requests/fetch-unsampled/test.ts b/dev-packages/node-integration-tests/suites/tracing/requests/fetch-unsampled/test.ts index d288e9a03fbf..cb85ca98ca0b 100644 --- a/dev-packages/node-integration-tests/suites/tracing/requests/fetch-unsampled/test.ts +++ b/dev-packages/node-integration-tests/suites/tracing/requests/fetch-unsampled/test.ts @@ -1,8 +1,7 @@ -import { conditionalTest } from '../../../../utils'; import { createRunner } from '../../../../utils/runner'; import { createTestServer } from '../../../../utils/server'; -conditionalTest({ min: 18 })('outgoing fetch', () => { +describe('outgoing fetch', () => { test('outgoing fetch requests are correctly instrumented when not sampled', done => { expect.assertions(11); diff --git a/dev-packages/node-integration-tests/suites/tracing/requests/http-sampled-esm/test.ts b/dev-packages/node-integration-tests/suites/tracing/requests/http-sampled-esm/test.ts index 72f625aedeb7..f3d58877c8f3 100644 --- a/dev-packages/node-integration-tests/suites/tracing/requests/http-sampled-esm/test.ts +++ b/dev-packages/node-integration-tests/suites/tracing/requests/http-sampled-esm/test.ts @@ -1,9 +1,8 @@ import { join } from 'path'; -import { conditionalTest } from '../../../../utils'; import { createRunner } from '../../../../utils/runner'; import { createTestServer } from '../../../../utils/server'; -conditionalTest({ min: 18 })('outgoing http in ESM', () => { +describe('outgoing http in ESM', () => { test('outgoing sampled http requests are correctly instrumented in ESM', done => { expect.assertions(11); diff --git a/dev-packages/node-integration-tests/suites/tracing/tedious/test.ts b/dev-packages/node-integration-tests/suites/tracing/tedious/test.ts index c4a0ae29fe38..6c5fd17f833a 100644 --- a/dev-packages/node-integration-tests/suites/tracing/tedious/test.ts +++ b/dev-packages/node-integration-tests/suites/tracing/tedious/test.ts @@ -1,11 +1,10 @@ -import { conditionalTest } from '../../../utils'; import { cleanupChildProcesses, createRunner } from '../../../utils/runner'; jest.setTimeout(75000); // Tedious version we are testing against only supports Node 18+ // https://github.com/tediousjs/tedious/blob/8310c455a2cc1cba83c1ca3c16677da4f83e12a9/package.json#L38 -conditionalTest({ min: 18 })('tedious auto instrumentation', () => { +describe('tedious auto instrumentation', () => { afterAll(() => { cleanupChildProcesses(); }); diff --git a/dev-packages/test-utils/package.json b/dev-packages/test-utils/package.json index 09ad4cf5a55d..8e8afec9f698 100644 --- a/dev-packages/test-utils/package.json +++ b/dev-packages/test-utils/package.json @@ -28,7 +28,7 @@ }, "sideEffects": false, "engines": { - "node": ">=14.18" + "node": ">=18" }, "scripts": { "fix": "eslint . --format stylish --fix", diff --git a/docs/migration/v8-to-v9.md b/docs/migration/v8-to-v9.md index d6d49a0e72aa..3854a5b44ae3 100644 --- a/docs/migration/v8-to-v9.md +++ b/docs/migration/v8-to-v9.md @@ -24,8 +24,8 @@ This includes features like Nullish Coalescing (`??`), Optional Chaining (`?.`), If you observe failures due to syntax or features listed above, it may be an indicator that your current runtime does not support ES2020. If your runtime does not support ES2020, we recommend transpiling the SDK using Babel or similar tooling. -**Node.js:** The minimum supported Node.js versions are TBD, TBD, and TBD. -We no longer test against Node TBD, TBD, or TBD and cannot guarantee that the SDK will work as expected on these versions. +**Node.js:** The minimum supported Node.js version is **18.0.0**, except for ESM-only SDKs (nuxt, solidstart, astro) which require Node **18.19.1** or up. +We no longer test against Node 14 and Node 16 and cannot guarantee that the SDK will work as expected on these versions. **Browsers:** Due to SDK code now including ES2020 features, the minimum supported browser list now looks as follows: diff --git a/package.json b/package.json index e948ae773c72..c326f88d1347 100644 --- a/package.json +++ b/package.json @@ -44,9 +44,9 @@ "yalc:publish": "lerna run yalc:publish" }, "volta": { - "node": "18.20.3", + "node": "18.20.5", "yarn": "1.22.22", - "pnpm": "9.4.0" + "pnpm": "9.15.0" }, "workspaces": [ "packages/angular", @@ -112,7 +112,7 @@ "@size-limit/webpack": "~11.1.6", "@types/jest": "^27.4.1", "@types/jsdom": "^21.1.6", - "@types/node": "^14.18.0", + "@types/node": "^18.19.1", "@vitest/coverage-v8": "^1.6.0", "deepmerge": "^4.2.2", "downlevel-dts": "~0.11.0", diff --git a/packages/angular/package.json b/packages/angular/package.json index 06bb0492c2f7..1ec948299d01 100644 --- a/packages/angular/package.json +++ b/packages/angular/package.json @@ -7,7 +7,7 @@ "author": "Sentry", "license": "MIT", "engines": { - "node": ">=14.18" + "node": ">=18" }, "type": "module", "module": "build/fesm2015/sentry-angular.mjs", @@ -35,6 +35,7 @@ "@angular/platform-browser": "^14.3.0", "@angular/platform-browser-dynamic": "^14.3.0", "@angular/router": "^14.3.0", + "@types/node": "^14.8.0", "ng-packagr": "^14.2.2", "rxjs": "7.8.1", "typescript": "4.6.4", diff --git a/packages/astro/package.json b/packages/astro/package.json index 43c374a766cc..3d52f1145cd4 100644 --- a/packages/astro/package.json +++ b/packages/astro/package.json @@ -14,7 +14,7 @@ "author": "Sentry", "license": "MIT", "engines": { - "node": ">=18.14.1" + "node": ">=18.19.1" }, "type": "module", "files": [ diff --git a/packages/aws-serverless/package.json b/packages/aws-serverless/package.json index 856a7dc4f51f..716b1c3fa5f7 100644 --- a/packages/aws-serverless/package.json +++ b/packages/aws-serverless/package.json @@ -7,7 +7,7 @@ "author": "Sentry", "license": "MIT", "engines": { - "node": ">=14.18" + "node": ">=18" }, "files": [ "/build/npm", @@ -73,7 +73,7 @@ "@types/aws-lambda": "^8.10.62" }, "devDependencies": { - "@types/node": "^14.18.0" + "@types/node": "^18.19.1" }, "scripts": { "build": "run-p build:transpile build:types build:bundle", diff --git a/packages/browser-utils/package.json b/packages/browser-utils/package.json index 15d5bde00065..57730a1032f2 100644 --- a/packages/browser-utils/package.json +++ b/packages/browser-utils/package.json @@ -7,7 +7,7 @@ "author": "Sentry", "license": "MIT", "engines": { - "node": ">=14.18" + "node": ">=18" }, "files": [ "/build" diff --git a/packages/browser/package.json b/packages/browser/package.json index f588f2801eb0..bb659245699e 100644 --- a/packages/browser/package.json +++ b/packages/browser/package.json @@ -7,7 +7,7 @@ "author": "Sentry", "license": "MIT", "engines": { - "node": ">=14.18" + "node": ">=18" }, "files": [ "/build/npm" diff --git a/packages/bun/package.json b/packages/bun/package.json index ce1c85cbcd0f..753046173a9c 100644 --- a/packages/bun/package.json +++ b/packages/bun/package.json @@ -7,7 +7,7 @@ "author": "Sentry", "license": "MIT", "engines": { - "node": ">=14.18" + "node": ">=18" }, "files": [ "/build" diff --git a/packages/cloudflare/package.json b/packages/cloudflare/package.json index efec51c5c0f5..aa84ff96c596 100644 --- a/packages/cloudflare/package.json +++ b/packages/cloudflare/package.json @@ -7,7 +7,7 @@ "author": "Sentry", "license": "MIT", "engines": { - "node": ">=14.18" + "node": ">=18" }, "files": [ "/build" @@ -46,7 +46,7 @@ }, "devDependencies": { "@cloudflare/workers-types": "^4.20240725.0", - "@types/node": "^14.18.0", + "@types/node": "^18.19.1", "wrangler": "^3.67.1" }, "scripts": { diff --git a/packages/core/package.json b/packages/core/package.json index ab43b79117b9..c9079fcf5a14 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -7,7 +7,7 @@ "author": "Sentry", "license": "MIT", "engines": { - "node": ">=14.18" + "node": ">=18" }, "files": [ "/build" diff --git a/packages/deno/package.json b/packages/deno/package.json index 851252d0435f..0bd8498ceae9 100644 --- a/packages/deno/package.json +++ b/packages/deno/package.json @@ -28,7 +28,7 @@ }, "devDependencies": { "@rollup/plugin-typescript": "^11.1.5", - "@types/node": "20.8.2", + "@types/node": "^18.19.1", "rollup-plugin-dts": "^6.1.0" }, "scripts": { diff --git a/packages/ember/package.json b/packages/ember/package.json index 1547eed88d94..1e111f752d71 100644 --- a/packages/ember/package.json +++ b/packages/ember/package.json @@ -72,7 +72,7 @@ "webpack": "~5.95.0" }, "engines": { - "node": ">=14.18" + "node": ">=18" }, "ember": { "edition": "octane" diff --git a/packages/eslint-config-sdk/package.json b/packages/eslint-config-sdk/package.json index 246f51ed6dcf..fc85554ac878 100644 --- a/packages/eslint-config-sdk/package.json +++ b/packages/eslint-config-sdk/package.json @@ -12,7 +12,7 @@ "sentry" ], "engines": { - "node": ">=14.18" + "node": ">=18" }, "files": [ "/src" diff --git a/packages/eslint-plugin-sdk/package.json b/packages/eslint-plugin-sdk/package.json index 7a6a729fc0cd..402a304747d5 100644 --- a/packages/eslint-plugin-sdk/package.json +++ b/packages/eslint-plugin-sdk/package.json @@ -12,7 +12,7 @@ "sentry" ], "engines": { - "node": ">=14.18" + "node": ">=18" }, "files": [ "/src" diff --git a/packages/feedback/package.json b/packages/feedback/package.json index a5e44856378e..ec9451115a27 100644 --- a/packages/feedback/package.json +++ b/packages/feedback/package.json @@ -7,7 +7,7 @@ "author": "Sentry", "license": "MIT", "engines": { - "node": ">=14.18" + "node": ">=18" }, "files": [ "/build/npm" diff --git a/packages/gatsby/package.json b/packages/gatsby/package.json index 2c03fae30f14..3fe9850166dd 100644 --- a/packages/gatsby/package.json +++ b/packages/gatsby/package.json @@ -11,7 +11,7 @@ "gatsby-plugin" ], "engines": { - "node": ">=14.18" + "node": ">=18" }, "files": [ "/build", diff --git a/packages/google-cloud-serverless/package.json b/packages/google-cloud-serverless/package.json index 52008df49931..236674dc37d3 100644 --- a/packages/google-cloud-serverless/package.json +++ b/packages/google-cloud-serverless/package.json @@ -7,7 +7,7 @@ "author": "Sentry", "license": "MIT", "engines": { - "node": ">=14.18" + "node": ">=18" }, "files": [ "/build" @@ -57,7 +57,7 @@ "@google-cloud/common": "^3.4.1", "@google-cloud/functions-framework": "^1.7.1", "@google-cloud/pubsub": "^2.5.0", - "@types/node": "^14.18.0", + "@types/node": "^18.19.1", "google-gax": "^2.9.0", "nock": "^13.5.5" }, diff --git a/packages/google-cloud-serverless/test/gcpfunction/cloud_event.test.ts b/packages/google-cloud-serverless/test/gcpfunction/cloud_event.test.ts index 941d4d259930..95323881828d 100644 --- a/packages/google-cloud-serverless/test/gcpfunction/cloud_event.test.ts +++ b/packages/google-cloud-serverless/test/gcpfunction/cloud_event.test.ts @@ -44,8 +44,8 @@ describe('wrapCloudEventFunction', () => { function handleCloudEvent(fn: CloudEventFunctionWithCallback): Promise { return new Promise((resolve, reject) => { + // eslint-disable-next-line deprecation/deprecation const d = domain.create(); - // d.on('error', () => res.end()); const context = { type: 'event.type', }; diff --git a/packages/google-cloud-serverless/test/gcpfunction/events.test.ts b/packages/google-cloud-serverless/test/gcpfunction/events.test.ts index 363147409fd2..aa449f5407c9 100644 --- a/packages/google-cloud-serverless/test/gcpfunction/events.test.ts +++ b/packages/google-cloud-serverless/test/gcpfunction/events.test.ts @@ -45,8 +45,8 @@ describe('wrapEventFunction', () => { function handleEvent(fn: EventFunctionWithCallback): Promise { return new Promise((resolve, reject) => { + // eslint-disable-next-line deprecation/deprecation const d = domain.create(); - // d.on('error', () => res.end()); const context = { eventType: 'event.type', resource: 'some.resource', diff --git a/packages/google-cloud-serverless/test/gcpfunction/http.test.ts b/packages/google-cloud-serverless/test/gcpfunction/http.test.ts index 5590add6f618..08d53df50b31 100644 --- a/packages/google-cloud-serverless/test/gcpfunction/http.test.ts +++ b/packages/google-cloud-serverless/test/gcpfunction/http.test.ts @@ -58,6 +58,7 @@ describe('GCPFunction', () => { headers = { ...headers, ...trace_headers }; } return new Promise((resolve, _reject) => { + // eslint-disable-next-line deprecation/deprecation const d = domain.create(); const req = { method: 'POST', diff --git a/packages/integration-shims/package.json b/packages/integration-shims/package.json index 322922a945a0..c5e3c3b4d3f8 100644 --- a/packages/integration-shims/package.json +++ b/packages/integration-shims/package.json @@ -58,7 +58,7 @@ "@sentry/core": "8.45.0" }, "engines": { - "node": ">=14.18" + "node": ">=18" }, "volta": { "extends": "../../package.json" diff --git a/packages/nestjs/package.json b/packages/nestjs/package.json index a11de76a0c31..18f83f3b36f4 100644 --- a/packages/nestjs/package.json +++ b/packages/nestjs/package.json @@ -7,7 +7,7 @@ "author": "Sentry", "license": "MIT", "engines": { - "node": ">=16" + "node": ">=18" }, "files": [ "/build", diff --git a/packages/nextjs/package.json b/packages/nextjs/package.json index baafbe149a1d..b1412a670d8b 100644 --- a/packages/nextjs/package.json +++ b/packages/nextjs/package.json @@ -7,7 +7,7 @@ "author": "Sentry", "license": "MIT", "engines": { - "node": ">=14.18" + "node": ">=18" }, "main": "build/cjs/index.server.js", "module": "build/esm/index.server.js", diff --git a/packages/nextjs/test/types/package.json b/packages/nextjs/test/types/package.json index 86f74bfe060a..a3df1aed6d76 100644 --- a/packages/nextjs/test/types/package.json +++ b/packages/nextjs/test/types/package.json @@ -1,7 +1,7 @@ { "description": "This is used to install the nextjs v12 so we can test against those types", "scripts": { - "test": "ts-node test.ts" + "test": "yarn && yarn tsc --noEmit --project tsconfig.json" }, "dependencies": { "next": "13.2.0" diff --git a/packages/nextjs/test/types/test.ts b/packages/nextjs/test/types/test.ts deleted file mode 100644 index f9f45d29f29b..000000000000 --- a/packages/nextjs/test/types/test.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { execSync } from 'child_process'; -/* eslint-disable no-console */ -import { parseSemver } from '@sentry/core'; - -const NODE_VERSION = parseSemver(process.versions.node); - -if (NODE_VERSION.major && NODE_VERSION.major >= 12) { - console.log('Installing next@v12...'); - execSync('yarn install', { stdio: 'inherit' }); - console.log('Testing some types...'); - execSync('tsc --noEmit --project tsconfig.json', { stdio: 'inherit' }); -} diff --git a/packages/nitro-utils/package.json b/packages/nitro-utils/package.json index 06ec390ef87f..2f7061aa1479 100644 --- a/packages/nitro-utils/package.json +++ b/packages/nitro-utils/package.json @@ -8,7 +8,7 @@ "license": "MIT", "private": true, "engines": { - "node": ">=16.20" + "node": ">=18.19.1" }, "files": [ "/build" diff --git a/packages/node/package.json b/packages/node/package.json index 2724bb85a7ad..ca564b0e8fb7 100644 --- a/packages/node/package.json +++ b/packages/node/package.json @@ -7,7 +7,7 @@ "author": "Sentry", "license": "MIT", "engines": { - "node": ">=14.18" + "node": ">=18" }, "files": [ "/build" @@ -101,7 +101,7 @@ "import-in-the-middle": "^1.11.2" }, "devDependencies": { - "@types/node": "^14.18.0" + "@types/node": "^18.19.1" }, "scripts": { "build": "run-p build:transpile build:types", diff --git a/packages/node/src/proxy/parse-proxy-response.ts b/packages/node/src/proxy/parse-proxy-response.ts index a2c05b1dbe2c..afad0d2435f4 100644 --- a/packages/node/src/proxy/parse-proxy-response.ts +++ b/packages/node/src/proxy/parse-proxy-response.ts @@ -89,7 +89,7 @@ export function parseProxyResponse(socket: Readable): Promise<{ connect: Connect return; } - const headerParts = buffered.slice(0, endOfHeaders).toString('ascii').split('\r\n'); + const headerParts = buffered.subarray(0, endOfHeaders).toString('ascii').split('\r\n'); const firstLine = headerParts.shift(); if (!firstLine) { socket.destroy(); diff --git a/packages/nuxt/package.json b/packages/nuxt/package.json index 86ce75ba76f8..bee5e78f7582 100644 --- a/packages/nuxt/package.json +++ b/packages/nuxt/package.json @@ -7,7 +7,7 @@ "author": "Sentry", "license": "MIT", "engines": { - "node": ">=16" + "node": ">=18.19.1" }, "files": [ "/build" diff --git a/packages/opentelemetry/package.json b/packages/opentelemetry/package.json index e342a8d34be8..db008ad65f62 100644 --- a/packages/opentelemetry/package.json +++ b/packages/opentelemetry/package.json @@ -7,7 +7,7 @@ "author": "Sentry", "license": "MIT", "engines": { - "node": ">=14.18" + "node": ">=18" }, "files": [ "/build" diff --git a/packages/profiling-node/README.md b/packages/profiling-node/README.md index 890022ae2e88..e96bc41eb569 100644 --- a/packages/profiling-node/README.md +++ b/packages/profiling-node/README.md @@ -12,8 +12,7 @@ ## Installation -Profiling works as an extension of tracing so you will need both @sentry/node and @sentry/profiling-node installed. The -minimum required major version of @sentry/node that supports profiling is 7.x. +Profiling works as an extension of tracing so you will need both @sentry/node and @sentry/profiling-node installed. ```bash # Using yarn @@ -84,7 +83,7 @@ After the binaries are built, you should see them inside the profiling-node/lib ### Prebuilt binaries -We currently ship prebuilt binaries for a few of the most common platforms and node versions (v16-22). +We currently ship prebuilt binaries for a few of the most common platforms and node versions (v18-22). - macOS x64 - Linux ARM64 (musl) diff --git a/packages/profiling-node/package.json b/packages/profiling-node/package.json index 19ecb062875e..80a35a718838 100644 --- a/packages/profiling-node/package.json +++ b/packages/profiling-node/package.json @@ -32,7 +32,7 @@ "sentry-prune-profiler-binaries": "scripts/prune-profiler-binaries.js" }, "engines": { - "node": ">=14.18" + "node": ">=18" }, "publishConfig": { "access": "public" @@ -81,7 +81,7 @@ "node-abi": "^3.61.0" }, "devDependencies": { - "@types/node": "16.18.70", + "@types/node": "^18.19.1", "@types/node-abi": "^3.0.3", "clang-format": "^1.8.0", "cross-env": "^7.0.3", diff --git a/packages/profiling-node/src/utils.ts b/packages/profiling-node/src/utils.ts index 1c0828a5468c..78844af5fa8e 100644 --- a/packages/profiling-node/src/utils.ts +++ b/packages/profiling-node/src/utils.ts @@ -37,16 +37,12 @@ export const PROFILER_THREAD_NAME = isMainThread ? 'main' : 'worker'; const FORMAT_VERSION = '1'; const CONTINUOUS_FORMAT_VERSION = '2'; -// Os machine was backported to 16.18, but this was not reflected in the types -// @ts-expect-error ignore missing -const machine = typeof os.machine === 'function' ? os.machine() : os.arch(); - // Machine properties (eval only once) const PLATFORM = os.platform(); const RELEASE = os.release(); const VERSION = os.version(); const TYPE = os.type(); -const MODEL = machine; +const MODEL = os.machine(); const ARCH = os.arch(); /** diff --git a/packages/react/package.json b/packages/react/package.json index d14ad2f112a8..81596144ae79 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -7,7 +7,7 @@ "author": "Sentry", "license": "MIT", "engines": { - "node": ">=14.18" + "node": ">=18" }, "files": [ "/build" diff --git a/packages/remix/package.json b/packages/remix/package.json index 9967c77676bc..05d9c5ef157a 100644 --- a/packages/remix/package.json +++ b/packages/remix/package.json @@ -10,7 +10,7 @@ "sentry-upload-sourcemaps": "scripts/sentry-upload-sourcemaps.js" }, "engines": { - "node": ">=14.18" + "node": ">=18" }, "files": [ "/build", diff --git a/packages/remix/test/integration/package.json b/packages/remix/test/integration/package.json index b00f17b330f9..82c46d519f63 100644 --- a/packages/remix/test/integration/package.json +++ b/packages/remix/test/integration/package.json @@ -40,6 +40,6 @@ "**/path-scurry/lru-cache": "10.2.0" }, "engines": { - "node": ">=14.18" + "node": ">=18" } } diff --git a/packages/replay-canvas/package.json b/packages/replay-canvas/package.json index 4faeb7db1ef7..3f0367c201e0 100644 --- a/packages/replay-canvas/package.json +++ b/packages/replay-canvas/package.json @@ -72,7 +72,7 @@ "@sentry/core": "8.45.0" }, "engines": { - "node": ">=14.18" + "node": ">=18" }, "volta": { "extends": "../../package.json" diff --git a/packages/replay-internal/package.json b/packages/replay-internal/package.json index 4267723b8b67..9c24ba5f5511 100644 --- a/packages/replay-internal/package.json +++ b/packages/replay-internal/package.json @@ -80,7 +80,7 @@ "@sentry/core": "8.45.0" }, "engines": { - "node": ">=14.18" + "node": ">=18" }, "volta": { "extends": "../../package.json" diff --git a/packages/replay-worker/package.json b/packages/replay-worker/package.json index 7a1596319e4f..43ea5e9c0d1e 100644 --- a/packages/replay-worker/package.json +++ b/packages/replay-worker/package.json @@ -49,7 +49,7 @@ "fflate": "0.8.1" }, "engines": { - "node": ">=14.18" + "node": ">=18" }, "volta": { "extends": "../../package.json" diff --git a/packages/solid/package.json b/packages/solid/package.json index f718a1374a11..266e1b197b52 100644 --- a/packages/solid/package.json +++ b/packages/solid/package.json @@ -7,7 +7,7 @@ "author": "Sentry", "license": "MIT", "engines": { - "node": ">=14.18" + "node": ">=18" }, "files": [ "/build", diff --git a/packages/solidstart/package.json b/packages/solidstart/package.json index dba27d321153..e64c0d5d4b20 100644 --- a/packages/solidstart/package.json +++ b/packages/solidstart/package.json @@ -7,7 +7,7 @@ "author": "Sentry", "license": "MIT", "engines": { - "node": ">=16" + "node": ">=18.19.1" }, "files": [ "/build", diff --git a/packages/svelte/package.json b/packages/svelte/package.json index fb95251cf35b..887ae19b02da 100644 --- a/packages/svelte/package.json +++ b/packages/svelte/package.json @@ -7,7 +7,7 @@ "author": "Sentry", "license": "MIT", "engines": { - "node": ">=14.18" + "node": ">=18" }, "files": [ "/build" diff --git a/packages/sveltekit/package.json b/packages/sveltekit/package.json index 7ae146015a74..4961d2727696 100644 --- a/packages/sveltekit/package.json +++ b/packages/sveltekit/package.json @@ -7,7 +7,7 @@ "author": "Sentry", "license": "MIT", "engines": { - "node": ">=16" + "node": ">=18" }, "files": [ "/build" diff --git a/packages/types/package.json b/packages/types/package.json index 26927c6882b9..5be24f954f1b 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -7,7 +7,7 @@ "author": "Sentry", "license": "MIT", "engines": { - "node": ">=14.18" + "node": ">=18" }, "files": [ "/build" diff --git a/packages/utils/package.json b/packages/utils/package.json index b35f0087434b..c8e04a5dac75 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -7,7 +7,7 @@ "author": "Sentry", "license": "MIT", "engines": { - "node": ">=14.18" + "node": ">=18" }, "files": [ "/build" diff --git a/packages/vercel-edge/package.json b/packages/vercel-edge/package.json index 4e7f81e055af..90fc7cd39534 100644 --- a/packages/vercel-edge/package.json +++ b/packages/vercel-edge/package.json @@ -7,7 +7,7 @@ "author": "Sentry", "license": "MIT", "engines": { - "node": ">=14.18" + "node": ">=18" }, "files": [ "/build" diff --git a/packages/vercel-edge/src/vendored/async-local-storage-context-manager.ts b/packages/vercel-edge/src/vendored/async-local-storage-context-manager.ts index 67828f4c852e..8d8a1e6dd171 100644 --- a/packages/vercel-edge/src/vendored/async-local-storage-context-manager.ts +++ b/packages/vercel-edge/src/vendored/async-local-storage-context-manager.ts @@ -52,7 +52,7 @@ export class AsyncLocalStorageContextManager extends AbstractAsyncHooksContextMa getStore() { return undefined; }, - run(_store, callback, ...args) { + run(_store: unknown, callback: () => Context, ...args: unknown[]) { return callback.apply(this, args); }, disable() { diff --git a/packages/vue/package.json b/packages/vue/package.json index 167352a6289b..bf2256e30e11 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -7,7 +7,7 @@ "author": "Sentry", "license": "MIT", "engines": { - "node": ">=14.18" + "node": ">=18" }, "files": [ "/build" diff --git a/packages/wasm/package.json b/packages/wasm/package.json index a45a87130c7c..ed871a604375 100644 --- a/packages/wasm/package.json +++ b/packages/wasm/package.json @@ -7,7 +7,7 @@ "author": "Sentry", "license": "MIT", "engines": { - "node": ">=14.18" + "node": ">=18" }, "files": [ "/build/npm" diff --git a/scripts/ci-unit-tests.ts b/scripts/ci-unit-tests.ts index 08459e9eabba..85f852052bac 100644 --- a/scripts/ci-unit-tests.ts +++ b/scripts/ci-unit-tests.ts @@ -2,16 +2,7 @@ import * as childProcess from 'child_process'; import * as fs from 'fs'; import * as path from 'path'; -type NodeVersion = '14' | '16' | '18' | '20' | '21'; - -interface VersionConfig { - ignoredPackages: Array<`@${'sentry' | 'sentry-internal'}/${string}`>; -} - const UNIT_TEST_ENV = process.env.UNIT_TEST_ENV as 'node' | 'browser' | undefined; - -const CURRENT_NODE_VERSION = process.version.replace('v', '').split('.')[0] as NodeVersion; - const RUN_AFFECTED = process.argv.includes('--affected'); // These packages are tested separately in CI, so no need to run them here @@ -35,35 +26,6 @@ const BROWSER_TEST_PACKAGES = [ '@sentry/wasm', ]; -// These are Node-version specific tests that need to be skipped because of support -const SKIP_TEST_PACKAGES: Record = { - '14': { - ignoredPackages: [ - '@sentry/cloudflare', - '@sentry/solidstart', - '@sentry/sveltekit', - '@sentry/vercel-edge', - '@sentry/astro', - '@sentry/nuxt', - '@sentry/nestjs', - '@sentry-internal/eslint-plugin-sdk', - '@sentry-internal/nitro-utils', - ], - }, - '16': { - ignoredPackages: ['@sentry/cloudflare', '@sentry/vercel-edge', '@sentry/astro', '@sentry/solidstart'], - }, - '18': { - ignoredPackages: [], - }, - '20': { - ignoredPackages: [], - }, - '21': { - ignoredPackages: [], - }, -}; - function getAllPackages(): string[] { const { workspaces }: { workspaces: string[] } = JSON.parse( fs.readFileSync(path.join(process.cwd(), 'package.json'), 'utf-8'), @@ -96,11 +58,6 @@ function runTests(): void { BROWSER_TEST_PACKAGES.forEach(pkg => ignores.add(pkg)); } - const versionConfig = SKIP_TEST_PACKAGES[CURRENT_NODE_VERSION]; - if (versionConfig) { - versionConfig.ignoredPackages.forEach(dep => ignores.add(dep)); - } - if (RUN_AFFECTED) { runAffectedTests(ignores); } else { diff --git a/yarn.lock b/yarn.lock index ea225a675006..c6867bdf6f75 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10085,7 +10085,17 @@ dependencies: "@types/unist" "*" -"@types/history-4@npm:@types/history@4.7.8", "@types/history-5@npm:@types/history@4.7.8", "@types/history@*": +"@types/history-4@npm:@types/history@4.7.8": + version "4.7.8" + resolved "https://registry.yarnpkg.com/@types/history/-/history-4.7.8.tgz#49348387983075705fe8f4e02fb67f7daaec4934" + integrity sha512-S78QIYirQcUoo6UJZx9CSP0O2ix9IaeAXwQi26Rhr/+mg7qqPy8TzaxHSUut7eGjL8WmLccT7/MXf304WjqHcA== + +"@types/history-5@npm:@types/history@4.7.8": + version "4.7.8" + resolved "https://registry.yarnpkg.com/@types/history/-/history-4.7.8.tgz#49348387983075705fe8f4e02fb67f7daaec4934" + integrity sha512-S78QIYirQcUoo6UJZx9CSP0O2ix9IaeAXwQi26Rhr/+mg7qqPy8TzaxHSUut7eGjL8WmLccT7/MXf304WjqHcA== + +"@types/history@*": version "4.7.8" resolved "https://registry.yarnpkg.com/@types/history/-/history-4.7.8.tgz#49348387983075705fe8f4e02fb67f7daaec4934" integrity sha512-S78QIYirQcUoo6UJZx9CSP0O2ix9IaeAXwQi26Rhr/+mg7qqPy8TzaxHSUut7eGjL8WmLccT7/MXf304WjqHcA== @@ -10294,36 +10304,26 @@ "@types/node" "*" "@types/node@*", "@types/node@>=10.0.0", "@types/node@>=12.12.47", "@types/node@>=13.7.0", "@types/node@>=18": - version "22.9.0" - resolved "https://registry.yarnpkg.com/@types/node/-/node-22.9.0.tgz#b7f16e5c3384788542c72dc3d561a7ceae2c0365" - integrity sha512-vuyHg81vvWA1Z1ELfvLko2c8f34gyA0zaic0+Rllc5lbCnbSyuvb2Oxpm6TAUAC/2xZN3QGqxBNggD1nNR2AfQ== + version "22.10.2" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.10.2.tgz#a485426e6d1fdafc7b0d4c7b24e2c78182ddabb9" + integrity sha512-Xxr6BBRCAOQixvonOye19wnzyDiUtTeqldOOmj3CkeblonbccA12PFwlufvRdrpjXxqnmUaeiU5EOA+7s5diUQ== dependencies: - undici-types "~6.19.8" - -"@types/node@16.18.70": - version "16.18.70" - resolved "https://registry.yarnpkg.com/@types/node/-/node-16.18.70.tgz#d4c819be1e9f8b69a794d6f2fd929d9ff76f6d4b" - integrity sha512-8eIk20G5VVVQNZNouHjLA2b8utE2NvGybLjMaF4lyhA9uhGwnmXF8o+icdXKGSQSNANJewXva/sFUoZLwAaYAg== - -"@types/node@20.8.2": - version "20.8.2" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.8.2.tgz#d76fb80d87d0d8abfe334fc6d292e83e5524efc4" - integrity sha512-Vvycsc9FQdwhxE3y3DzeIxuEJbWGDsnrxvMADzTDF/lcdR9/K+AQIeAghTQsHtotg/q0j3WEOYS/jQgSdWue3w== + undici-types "~6.20.0" "@types/node@^10.1.0": version "10.17.60" resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.60.tgz#35f3d6213daed95da7f0f73e75bcc6980e90597b" integrity sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw== -"@types/node@^14.18.0": +"@types/node@^14.8.0": version "14.18.63" resolved "https://registry.yarnpkg.com/@types/node/-/node-14.18.63.tgz#1788fa8da838dbb5f9ea994b834278205db6ca2b" integrity sha512-fAtCfv4jJg+ExtXhvCkCqUKZ+4ok/JQk01qDKhL5BDDoS3AxKXhV5/MAVUZyQnSEd2GT92fkgZl0pz0Q0AzcIQ== -"@types/node@^18.0.0": - version "18.19.64" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.64.tgz#122897fb79f2a9ec9c979bded01c11461b2b1478" - integrity sha512-955mDqvO2vFf/oL7V3WiUtiz+BugyX8uVbaT2H8oj3+8dRyH2FLiNdowe7eNqRM7IOIZvzDH76EoAT+gwm6aIQ== +"@types/node@^18.19.1": + version "18.19.68" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.68.tgz#f4f10d9927a7eaf3568c46a6d739cc0967ccb701" + integrity sha512-QGtpFH1vB99ZmTa63K4/FU8twThj4fuVSBkGddTp7uIL/cuoLWIUSL2RcOaigBhfR+hg5pgGkBnkoOxrTVBMKw== dependencies: undici-types "~5.26.4" @@ -10412,7 +10412,15 @@ "@types/history" "^3" "@types/react" "*" -"@types/react-router-4@npm:@types/react-router@5.1.14", "@types/react-router-5@npm:@types/react-router@5.1.14": +"@types/react-router-4@npm:@types/react-router@5.1.14": + version "5.1.14" + resolved "https://registry.yarnpkg.com/@types/react-router/-/react-router-5.1.14.tgz#e0442f4eb4c446541ad7435d44a97f8fe6df40da" + integrity sha512-LAJpqYUaCTMT2anZheoidiIymt8MuX286zoVFPM3DVb23aQBH0mAkFvzpd4LKqiolV8bBtZWT5Qp7hClCNDENw== + dependencies: + "@types/history" "*" + "@types/react" "*" + +"@types/react-router-5@npm:@types/react-router@5.1.14": version "5.1.14" resolved "https://registry.yarnpkg.com/@types/react-router/-/react-router-5.1.14.tgz#e0442f4eb4c446541ad7435d44a97f8fe6df40da" integrity sha512-LAJpqYUaCTMT2anZheoidiIymt8MuX286zoVFPM3DVb23aQBH0mAkFvzpd4LKqiolV8bBtZWT5Qp7hClCNDENw== @@ -31246,7 +31254,16 @@ string-template@~0.2.1: resolved "https://registry.yarnpkg.com/string-template/-/string-template-0.2.1.tgz#42932e598a352d01fc22ec3367d9d84eec6c9add" integrity sha1-QpMuWYo1LQH8IuwzZ9nYTuxsmt0= -"string-width-cjs@npm:string-width@^4.2.0", string-width@4.2.3, string-width@^4.2.0, string-width@^4.2.2, string-width@^4.2.3: +"string-width-cjs@npm:string-width@^4.2.0": + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +string-width@4.2.3, string-width@^4.2.0, string-width@^4.2.2, string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -31358,7 +31375,14 @@ stringify-object@^3.2.1: is-obj "^1.0.1" is-regexp "^1.0.0" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@6.0.1, strip-ansi@^6.0.0, strip-ansi@^6.0.1: +"strip-ansi-cjs@npm:strip-ansi@^6.0.1": + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-ansi@6.0.1, strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -32742,10 +32766,10 @@ undici-types@~5.26.4: resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== -undici-types@~6.19.8: - version "6.19.8" - resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.19.8.tgz#35111c9d1437ab83a7cdc0abae2f26d88eda0a02" - integrity sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw== +undici-types@~6.20.0: + version "6.20.0" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.20.0.tgz#8171bf22c1f588d1554d55bf204bc624af388433" + integrity sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg== undici@^5.25.4: version "5.28.3" @@ -34387,7 +34411,16 @@ wrangler@^3.67.1: optionalDependencies: fsevents "~2.3.2" -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@7.0.0, wrap-ansi@^7.0.0: +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + +wrap-ansi@7.0.0, wrap-ansi@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==