Skip to content

Commit

Permalink
chore(sdk): bump min-supported node to ^18.19.0 || >=20.6.0
Browse files Browse the repository at this point in the history
This raises the min-supported Node.js version on all packages
except the 'api' and 'semantic-conventions' packages.
This new minimum allows the usage of 'module.register()'
for better ESM instrumentation support.

Closes: #5395
  • Loading branch information
trentm committed Jan 29, 2025
1 parent c00f36e commit 71416d7
Show file tree
Hide file tree
Showing 57 changed files with 121 additions and 110 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@ jobs:
fail-fast: false
matrix:
node_version:
- "18.19.0"
- "18"
- "20.6.0"
- "20"
- "22"
- "23"
runs-on: ubuntu-latest
env:
NPM_CONFIG_UNSAFE_PERM: true
Expand All @@ -30,11 +33,19 @@ jobs:
node-version: ${{ matrix.node_version }}

- run: npm install -g npm@latest
if: ${{ matrix.node_version == '20' || matrix.node_version == '22' }}
if: ${{
matrix.node_version == '20.6.0' ||
matrix.node_version == '20' ||
matrix.node_version == '22' ||
matrix.node_version == '23'
}}

# [email protected] drops support for Node.js v18
- run: npm install -g npm@"<11.0.0"
if: ${{ matrix.node_version == '18'}}
if: ${{
matrix.node_version == '18.19.0' ||
matrix.node_version == '18'
}}

- name: Bootstrap
run: npm ci
Expand Down
2 changes: 1 addition & 1 deletion examples/basic-tracer-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"tracing"
],
"engines": {
"node": ">=18"
"node": "^18.19.0 || >=20.6.0"
},
"author": "OpenTelemetry Authors",
"license": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/esm-http-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"typescript"
],
"engines": {
"node": ">=18"
"node": "^18.19.0 || >=20.6.0"
},
"author": "OpenTelemetry Authors",
"license": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/grpc-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"tracing"
],
"engines": {
"node": ">=18"
"node": "^18.19.0 || >=20.6.0"
},
"author": "OpenTelemetry Authors",
"license": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/http/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"tracing"
],
"engines": {
"node": ">=18"
"node": "^18.19.0 || >=20.6.0"
},
"author": "OpenTelemetry Authors",
"license": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/https/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"tracing"
],
"engines": {
"node": ">=18"
"node": "^18.19.0 || >=20.6.0"
},
"author": "OpenTelemetry Authors",
"license": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/opentelemetry-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"web"
],
"engines": {
"node": ">=18"
"node": "^18.19.0 || >=20.6.0"
},
"author": "OpenTelemetry Authors",
"license": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/opentracing-shim/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"opentracing"
],
"engines": {
"node": ">=18"
"node": "^18.19.0 || >=20.6.0"
},
"author": "OpenTelemetry Authors",
"license": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/otlp-exporter-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"tracing"
],
"engines": {
"node": ">=18"
"node": "^18.19.0 || >=20.6.0"
},
"author": "OpenTelemetry Authors",
"license": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion experimental/backwards-compatibility/node14/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
"author": "OpenTelemetry Authors",
"license": "Apache-2.0",
"engines": {
"node": ">=18"
"node": "^18.19.0 || >=20.6.0"
}
}
2 changes: 1 addition & 1 deletion experimental/backwards-compatibility/node16/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
"author": "OpenTelemetry Authors",
"license": "Apache-2.0",
"engines": {
"node": ">=18"
"node": "^18.19.0 || >=20.6.0"
}
}
2 changes: 1 addition & 1 deletion experimental/examples/opencensus-shim/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"opencensus"
],
"engines": {
"node": ">=18"
"node": "^18.19.0 || >=20.6.0"
},
"author": "OpenTelemetry Authors",
"license": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion experimental/packages/api-events/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"author": "OpenTelemetry Authors",
"license": "Apache-2.0",
"engines": {
"node": ">=18"
"node": "^18.19.0 || >=20.6.0"
},
"files": [
"build/esm/**/*.js",
Expand Down
2 changes: 1 addition & 1 deletion experimental/packages/api-logs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"author": "OpenTelemetry Authors",
"license": "Apache-2.0",
"engines": {
"node": ">=18"
"node": "^18.19.0 || >=20.6.0"
},
"files": [
"build/esm/**/*.js",
Expand Down
2 changes: 1 addition & 1 deletion experimental/packages/exporter-logs-otlp-grpc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"author": "OpenTelemetry Authors",
"license": "Apache-2.0",
"engines": {
"node": ">=18"
"node": "^18.19.0 || >=20.6.0"
},
"files": [
"build/src/**/*.js",
Expand Down
2 changes: 1 addition & 1 deletion experimental/packages/exporter-logs-otlp-http/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"url": "https://github.com/open-telemetry/opentelemetry-js/issues"
},
"engines": {
"node": ">=18"
"node": "^18.19.0 || >=20.6.0"
},
"scripts": {
"prepublishOnly": "npm run compile",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"author": "OpenTelemetry Authors",
"license": "Apache-2.0",
"engines": {
"node": ">=18"
"node": "^18.19.0 || >=20.6.0"
},
"files": [
"build/esm/**/*.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"author": "OpenTelemetry Authors",
"license": "Apache-2.0",
"engines": {
"node": ">=18"
"node": "^18.19.0 || >=20.6.0"
},
"files": [
"build/src/**/*.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"author": "OpenTelemetry Authors",
"license": "Apache-2.0",
"engines": {
"node": ">=18"
"node": "^18.19.0 || >=20.6.0"
},
"files": [
"build/esm/**/*.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"author": "OpenTelemetry Authors",
"license": "Apache-2.0",
"engines": {
"node": ">=18"
"node": "^18.19.0 || >=20.6.0"
},
"files": [
"build/esm/**/*.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"author": "OpenTelemetry Authors",
"license": "Apache-2.0",
"engines": {
"node": ">=18"
"node": "^18.19.0 || >=20.6.0"
},
"files": [
"build/esm/**/*.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"author": "OpenTelemetry Authors",
"license": "Apache-2.0",
"engines": {
"node": ">=18"
"node": "^18.19.0 || >=20.6.0"
},
"files": [
"build/src/**/*.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"author": "OpenTelemetry Authors",
"license": "Apache-2.0",
"engines": {
"node": ">=18"
"node": "^18.19.0 || >=20.6.0"
},
"files": [
"build/esm/**/*.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"author": "OpenTelemetry Authors",
"license": "Apache-2.0",
"engines": {
"node": ">=18"
"node": "^18.19.0 || >=20.6.0"
},
"files": [
"build/esm/**/*.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"author": "OpenTelemetry Authors",
"license": "Apache-2.0",
"engines": {
"node": ">=18"
"node": "^18.19.0 || >=20.6.0"
},
"files": [
"build/src/**/*.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"author": "OpenTelemetry Authors",
"license": "Apache-2.0",
"engines": {
"node": ">=18"
"node": "^18.19.0 || >=20.6.0"
},
"files": [
"build/esm/**/*.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"author": "OpenTelemetry Authors",
"license": "Apache-2.0",
"engines": {
"node": ">=18"
"node": "^18.19.0 || >=20.6.0"
},
"files": [
"build/src/**/*.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"author": "OpenTelemetry Authors",
"license": "Apache-2.0",
"engines": {
"node": ">=18"
"node": "^18.19.0 || >=20.6.0"
},
"files": [
"build/src/**/*.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"author": "OpenTelemetry Authors",
"license": "Apache-2.0",
"engines": {
"node": ">=18"
"node": "^18.19.0 || >=20.6.0"
},
"files": [
"build/esm/**/*.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
"webpack-cli": "6.0.1"
},
"engines": {
"node": ">=18"
"node": "^18.19.0 || >=20.6.0"
},
"sideEffects": false
}
2 changes: 1 addition & 1 deletion experimental/packages/opentelemetry-sdk-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"author": "OpenTelemetry Authors",
"license": "Apache-2.0",
"engines": {
"node": ">=18"
"node": "^18.19.0 || >=20.6.0"
},
"files": [
"build/src/**/*.js",
Expand Down
2 changes: 1 addition & 1 deletion experimental/packages/otlp-exporter-base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"author": "OpenTelemetry Authors",
"license": "Apache-2.0",
"engines": {
"node": ">=18"
"node": "^18.19.0 || >=20.6.0"
},
"files": [
"build/esm/**/*.js",
Expand Down
2 changes: 1 addition & 1 deletion experimental/packages/otlp-grpc-exporter-base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"author": "OpenTelemetry Authors",
"license": "Apache-2.0",
"engines": {
"node": ">=18"
"node": "^18.19.0 || >=20.6.0"
},
"files": [
"build/src/**/*.js",
Expand Down
2 changes: 1 addition & 1 deletion experimental/packages/otlp-transformer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"author": "OpenTelemetry Authors",
"license": "Apache-2.0",
"engines": {
"node": ">=18"
"node": "^18.19.0 || >=20.6.0"
},
"files": [
"build/esm/**/*.js",
Expand Down
2 changes: 1 addition & 1 deletion experimental/packages/sampler-jaeger-remote/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"author": "OpenTelemetry Authors",
"license": "Apache-2.0",
"engines": {
"node": ">=14"
"node": "^18.19.0 || >=20.6.0"
},
"files": [
"build/src/**/*.js",
Expand Down
2 changes: 1 addition & 1 deletion experimental/packages/sdk-events/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"url": "https://github.com/open-telemetry/opentelemetry-js/issues"
},
"engines": {
"node": ">=14"
"node": "^18.19.0 || >=20.6.0"
},
"scripts": {
"clean": "tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json",
Expand Down
2 changes: 1 addition & 1 deletion experimental/packages/sdk-logs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"url": "https://github.com/open-telemetry/opentelemetry-js/issues"
},
"engines": {
"node": ">=18"
"node": "^18.19.0 || >=20.6.0"
},
"scripts": {
"prepublishOnly": "npm run compile",
Expand Down
2 changes: 1 addition & 1 deletion experimental/packages/shim-opencensus/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"author": "OpenTelemetry Authors",
"license": "Apache-2.0",
"engines": {
"node": ">=18"
"node": "^18.19.0 || >=20.6.0"
},
"files": [
"build/src/**/*.js",
Expand Down
2 changes: 1 addition & 1 deletion experimental/packages/web-common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"url": "https://github.com/open-telemetry/opentelemetry-js/issues"
},
"engines": {
"node": ">=14"
"node": "^18.19.0 || >=20.6.0"
},
"scripts": {
"clean": "tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json",
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"url": "https://github.com/open-telemetry/opentelemetry-js/issues"
},
"engines": {
"node": ">=14"
"node": "^18.19.0 || >=20.6.0"
},
"scripts": {
"compile": "cross-var lerna run version --scope $npm_package_name --include-dependencies",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@
"typescript": "5.0.4"
},
"engines": {
"node": ">=18"
"node": "^18.19.0 || >=20.6.0"
}
}
Loading

0 comments on commit 71416d7

Please sign in to comment.