diff --git a/.github/actions/node/oldest/action.yml b/.github/actions/node/oldest/action.yml index 0dbaafccab8..a679a468d29 100644 --- a/.github/actions/node/oldest/action.yml +++ b/.github/actions/node/oldest/action.yml @@ -1,7 +1,7 @@ -name: Node 16 +name: Node 18 runs: using: composite steps: - uses: actions/setup-node@v3 with: - node-version: '16' + node-version: '18' diff --git a/.github/actions/node/setup/action.yml b/.github/actions/node/setup/action.yml index 46e5c70e944..c00c299f594 100644 --- a/.github/actions/node/setup/action.yml +++ b/.github/actions/node/setup/action.yml @@ -5,4 +5,4 @@ runs: - uses: actions/setup-node@v3 with: cache: yarn - node-version: '16' + node-version: '18' diff --git a/.github/workflows/appsec.yml b/.github/workflows/appsec.yml index 2a1e2440b56..f7716d0c9c0 100644 --- a/.github/workflows/appsec.yml +++ b/.github/workflows/appsec.yml @@ -27,9 +27,9 @@ jobs: - uses: actions/checkout@v4 - uses: ./.github/actions/node/setup - run: yarn install - - uses: ./.github/actions/node/16 + - uses: ./.github/actions/node/oldest - run: yarn test:appsec:ci - - uses: ./.github/actions/node/18 + - uses: ./.github/actions/node/20 - run: yarn test:appsec:ci - uses: ./.github/actions/node/latest - run: yarn test:appsec:ci @@ -88,8 +88,6 @@ jobs: - run: yarn install - uses: ./.github/actions/node/oldest - run: yarn test:appsec:plugins:ci - - uses: ./.github/actions/node/16 - - run: yarn test:appsec:plugins:ci - uses: ./.github/actions/node/18 - run: yarn test:appsec:plugins:ci - uses: ./.github/actions/node/20 @@ -113,8 +111,6 @@ jobs: - uses: actions/checkout@v4 - uses: ./.github/actions/node/setup - run: yarn install - - uses: ./.github/actions/node/16 - - run: yarn test:appsec:plugins:ci - uses: ./.github/actions/node/18 - run: yarn test:appsec:plugins:ci - uses: ./.github/actions/node/20 @@ -197,8 +193,6 @@ jobs: - uses: actions/checkout@v4 - uses: ./.github/actions/node/setup - run: yarn install - - uses: ./.github/actions/node/16 - - run: yarn test:appsec:plugins:ci - uses: ./.github/actions/node/18 - run: yarn test:appsec:plugins:ci - uses: ./.github/actions/node/20 @@ -226,8 +220,9 @@ jobs: - uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} - - run: yarn install - - run: yarn test:appsec:plugins:ci + - run: yarn install --ignore-engines + - run: yarn config set ignore-engines true + - run: yarn test:appsec:plugins:ci --ignore-engines - if: always() uses: ./.github/actions/testagent/logs - uses: codecov/codecov-action@v3 diff --git a/.github/workflows/lambda.yml b/.github/workflows/lambda.yml index f98b74914e5..1e64a4cf8b6 100644 --- a/.github/workflows/lambda.yml +++ b/.github/workflows/lambda.yml @@ -19,8 +19,6 @@ jobs: - uses: ./.github/actions/testagent/start - uses: ./.github/actions/node/setup - run: yarn install - - uses: ./.github/actions/node/16 - - run: yarn test:lambda:ci - uses: ./.github/actions/node/18 - run: yarn test:lambda:ci - uses: ./.github/actions/node/20 diff --git a/.github/workflows/package-size.yml b/.github/workflows/package-size.yml index 4b2934a20d1..b96163fe2a7 100644 --- a/.github/workflows/package-size.yml +++ b/.github/workflows/package-size.yml @@ -17,7 +17,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v2 with: - node-version: '16' + node-version: '18' - run: yarn - name: Compute module size tree and report uses: qard/heaviest-objects-in-the-universe@v1 diff --git a/.github/workflows/plugins.yml b/.github/workflows/plugins.yml index d76e3f55a3f..0f6e10bd2e1 100644 --- a/.github/workflows/plugins.yml +++ b/.github/workflows/plugins.yml @@ -89,9 +89,22 @@ jobs: - uses: actions/checkout@v4 - uses: ./.github/actions/testagent/start - uses: ./.github/actions/node/setup - - run: yarn install --ignore-engines + - id: pkg + run: | + content=`cat ./package.json | tr '\n' ' '` + echo "json=$content" >> $GITHUB_OUTPUT + - id: extract + run: | + version="${{fromJson(steps.pkg.outputs.json).version}}" + majorVersion=$(echo "$version" | cut -d '.' -f 1) + echo "Major Version: $majorVersion" + echo "MAJOR_VERSION=$majorVersion" >> $GITHUB_ENV - uses: ./.github/actions/node/oldest - - run: yarn test:plugins:ci + - name: Install dependencies and run tests + if: env.MAJOR_VERSION != '5' + run: | + yarn install --ignore-engines + yarn test:plugins:ci - if: always() uses: ./.github/actions/testagent/logs - uses: codecov/codecov-action@v3 @@ -99,8 +112,8 @@ jobs: aerospike-5: strategy: matrix: - node-version: [16] - range: ['5.5.0 - 5.7.0'] + node-version: [18] + range: ['5.2.0 - 5.7.0'] include: - node-version: 20 range: '>=5.8.0' @@ -132,7 +145,7 @@ jobs: with: node-version: ${{ matrix.node-version }} - name: Install dependencies and run tests - if: env.MAJOR_VERSION != '3' + if: env.MAJOR_VERSION == '5' run: | yarn install --ignore-engines yarn test:plugins:ci @@ -399,8 +412,6 @@ jobs: - uses: ./.github/actions/testagent/start - uses: ./.github/actions/node/setup - run: yarn install - - uses: ./.github/actions/node/16 - - run: yarn test:plugins:ci - uses: ./.github/actions/node/18 - run: yarn test:plugins:ci - uses: ./.github/actions/node/20 @@ -587,8 +598,6 @@ jobs: - uses: ./.github/actions/testagent/start - uses: ./.github/actions/node/setup - run: yarn install - - uses: ./.github/actions/node/16 - - run: yarn test:plugins:ci - uses: ./.github/actions/node/18 - run: yarn test:plugins:ci - uses: ./.github/actions/node/20 @@ -608,8 +617,6 @@ jobs: - uses: ./.github/actions/testagent/start - uses: ./.github/actions/node/setup - run: yarn install - - uses: ./.github/actions/node/16 - - run: yarn test:plugins:ci - uses: ./.github/actions/node/18 - run: yarn test:plugins:ci - uses: ./.github/actions/node/20 @@ -884,8 +891,6 @@ jobs: - uses: ./.github/actions/testagent/start - uses: ./.github/actions/node/setup - run: yarn install - - uses: ./.github/actions/node/16 - - run: yarn test:plugins:ci - uses: ./.github/actions/node/18 - run: yarn test:plugins:ci - uses: ./.github/actions/node/20 @@ -916,8 +921,9 @@ jobs: - uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} - - run: yarn install - - run: yarn test:plugins:ci + - run: yarn install --ignore-engines + - run: yarn config set ignore-engines true + - run: yarn test:plugins:ci --ignore-engines - if: always() uses: ./.github/actions/testagent/logs - uses: codecov/codecov-action@v3 @@ -992,12 +998,15 @@ jobs: SERVICES: oracledb DD_TEST_AGENT_URL: http://testagent:9126 steps: - # Needs to remain on v3 for now due to GLIBC version - uses: actions/checkout@v3 - - uses: ./.github/actions/node/setup + - uses: actions/setup-node@v3 + with: + cache: yarn + node-version: '16' - run: yarn install --ignore-engines - - run: yarn services - - run: yarn test:plugins + - run: yarn config set ignore-engines true + - run: yarn services --ignore-engines + - run: yarn test:plugins --ignore-engines - uses: codecov/codecov-action@v3 paperplane: @@ -1147,7 +1156,7 @@ jobs: - run: yarn install - uses: ./.github/actions/node/oldest - run: yarn test:plugins:ci - - uses: ./.github/actions/node/16 + - uses: ./.github/actions/node/latest - run: yarn test:plugins:ci - if: always() uses: ./.github/actions/testagent/logs diff --git a/.github/workflows/profiling.yml b/.github/workflows/profiling.yml index 90731d062cf..aca3a332399 100644 --- a/.github/workflows/profiling.yml +++ b/.github/workflows/profiling.yml @@ -27,8 +27,6 @@ jobs: - uses: actions/checkout@v4 - uses: ./.github/actions/node/setup - run: yarn install - - uses: ./.github/actions/node/16 - - run: yarn test:profiler:ci - uses: ./.github/actions/node/18 - run: yarn test:profiler:ci - uses: ./.github/actions/node/20 diff --git a/.github/workflows/project.yml b/.github/workflows/project.yml index 34793f3e111..74820a6c09a 100644 --- a/.github/workflows/project.yml +++ b/.github/workflows/project.yml @@ -18,7 +18,7 @@ jobs: # setting fail-fast to false in an attempt to prevent this from happening fail-fast: false matrix: - version: [16, 18, latest] + version: [18, 20, latest] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -33,7 +33,7 @@ jobs: integration-ci: strategy: matrix: - version: [16, latest] + version: [18, latest] framework: [cucumber, playwright] runs-on: ubuntu-latest env: @@ -64,11 +64,12 @@ jobs: steps: - uses: actions/checkout@v4 - uses: ./.github/actions/node/setup - - run: yarn install + - run: yarn install --ignore-engines - uses: actions/setup-node@v3 with: node-version: ${{ matrix.version }} - - run: yarn test:integration:cypress + - run: yarn config set ignore-engines true + - run: yarn test:integration:cypress --ignore-engines env: CYPRESS_VERSION: ${{ matrix.cypress-version }} NODE_OPTIONS: '-r ./ci/init' diff --git a/.github/workflows/serverless-integration-test.yml b/.github/workflows/serverless-integration-test.yml index be3eeede960..4e204b1a390 100644 --- a/.github/workflows/serverless-integration-test.yml +++ b/.github/workflows/serverless-integration-test.yml @@ -13,7 +13,7 @@ jobs: id-token: 'write' strategy: matrix: - version: [16, latest] + version: [18, latest] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/serverless-performance.yml b/.github/workflows/serverless-performance.yml index a23b18a9bf2..e124c0f1df9 100644 --- a/.github/workflows/serverless-performance.yml +++ b/.github/workflows/serverless-performance.yml @@ -10,8 +10,6 @@ jobs: max-parallel: 4 matrix: include: - - node-version: 16.14 - aws-runtime-name: "nodejs16.x" - node-version: 18.12 aws-runtime-name: "nodejs18.x" steps: diff --git a/.github/workflows/tracing.yml b/.github/workflows/tracing.yml index 3062df0166a..cd54e25eb7e 100644 --- a/.github/workflows/tracing.yml +++ b/.github/workflows/tracing.yml @@ -27,8 +27,6 @@ jobs: - uses: actions/checkout@v4 - uses: ./.github/actions/node/setup - run: yarn install - - uses: ./.github/actions/node/16 - - run: yarn test:trace:core:ci - uses: ./.github/actions/node/18 - run: yarn test:trace:core:ci - uses: ./.github/actions/node/20 diff --git a/.gitlab/benchmarks.yml b/.gitlab/benchmarks.yml index 864d76cb877..58d4ca89a0a 100644 --- a/.gitlab/benchmarks.yml +++ b/.gitlab/benchmarks.yml @@ -55,12 +55,6 @@ benchmark: extends: .benchmarks parallel: matrix: - - MAJOR_VERSION: 16 - GROUP: 1 - - MAJOR_VERSION: 16 - GROUP: 2 - - MAJOR_VERSION: 16 - GROUP: 3 - MAJOR_VERSION: 18 GROUP: 1 - MAJOR_VERSION: 18 diff --git a/.nvmrc b/.nvmrc index b6a7d89c68e..3c032078a4a 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -16 +18 diff --git a/README.md b/README.md index 8a3d9372125..341283a71ca 100644 --- a/README.md +++ b/README.md @@ -218,7 +218,7 @@ esbuild.build({ outfile: 'out.js', plugins: [ddPlugin], platform: 'node', // allows built-in modules to be required - target: ['node16'] + target: ['node18'] }).catch((err) => { console.error(err) process.exit(1) diff --git a/benchmark/sirun/Dockerfile b/benchmark/sirun/Dockerfile index f212bfd662c..6ce6d8557fe 100644 --- a/benchmark/sirun/Dockerfile +++ b/benchmark/sirun/Dockerfile @@ -30,7 +30,6 @@ RUN wget -O sirun.tar.gz https://github.com/DataDog/sirun/releases/download/v0.1 RUN mkdir -p /usr/local/nvm \ && wget -q -O - https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash \ && . $NVM_DIR/nvm.sh \ - && nvm install --no-progress 12.22.12 \ && nvm install --no-progress 14.21.3 \ && nvm install --no-progress 16.20.1 \ && nvm install --no-progress 18.16.1 \ diff --git a/docs/package.json b/docs/package.json index 3f58f83cbda..f435f473302 100644 --- a/docs/package.json +++ b/docs/package.json @@ -11,6 +11,6 @@ "private": true, "devDependencies": { "typedoc": "^0.17.3", - "typescript": "^3.8.3" + "typescript": "^4.6" } } diff --git a/docs/yarn.lock b/docs/yarn.lock index 1f1ffeef806..e4cf671e773 100644 --- a/docs/yarn.lock +++ b/docs/yarn.lock @@ -218,10 +218,10 @@ typedoc@^0.17.3: shelljs "^0.8.4" typedoc-default-themes "^0.10.2" -typescript@^3.8.3: - version "3.9.10" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.10.tgz#70f3910ac7a51ed6bef79da7800690b19bf778b8" - integrity sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q== +typescript@^4.6: + version "4.9.5" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" + integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== uglify-js@^3.1.4: version "3.14.5" diff --git a/integration-tests/esbuild/build-and-test-aws-sdk.js b/integration-tests/esbuild/build-and-test-aws-sdk.js index c9d46a5da78..116615f9f63 100755 --- a/integration-tests/esbuild/build-and-test-aws-sdk.js +++ b/integration-tests/esbuild/build-and-test-aws-sdk.js @@ -13,7 +13,7 @@ esbuild.build({ outfile: SCRIPT, plugins: [ddPlugin], platform: 'node', - target: ['node16'], + target: ['node18'], external: [ ] }).then(() => { const { status, stdout, stderr } = spawnSync('node', [SCRIPT]) diff --git a/integration-tests/esbuild/build-and-test-skip-external.js b/integration-tests/esbuild/build-and-test-skip-external.js index 51da8597ff4..b7a35d6026b 100755 --- a/integration-tests/esbuild/build-and-test-skip-external.js +++ b/integration-tests/esbuild/build-and-test-skip-external.js @@ -11,7 +11,7 @@ esbuild.build({ outfile: 'skip-external-out.js', plugins: [ddPlugin], platform: 'node', - target: ['node16'], + target: ['node18'], external: [ 'knex' ] diff --git a/integration-tests/esbuild/build.js b/integration-tests/esbuild/build.js index fa862f279ad..60ba653548f 100755 --- a/integration-tests/esbuild/build.js +++ b/integration-tests/esbuild/build.js @@ -9,7 +9,7 @@ esbuild.build({ outfile: 'out.js', plugins: [ddPlugin], platform: 'node', - target: ['node16'], + target: ['node18'], external: [ // dead code paths introduced by knex 'pg', diff --git a/lib-injection/Dockerfile b/lib-injection/Dockerfile index e062c325399..60670e4dcb7 100644 --- a/lib-injection/Dockerfile +++ b/lib-injection/Dockerfile @@ -2,7 +2,7 @@ FROM scratch AS nodejs_agent COPY . / -FROM node:16-alpine AS build +FROM node:18-alpine AS build ARG npm_pkg ARG UID=10000 diff --git a/package.json b/package.json index a54eab1239b..6fbdf8cf420 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,7 @@ }, "homepage": "https://github.com/DataDog/dd-trace-js#readme", "engines": { - "node": ">=16" + "node": ">=18" }, "dependencies": { "@datadog/native-appsec": "6.0.0", @@ -104,7 +104,7 @@ "semver": "^7.5.4" }, "devDependencies": { - "@types/node": ">=16", + "@types/node": ">=18", "autocannon": "^4.5.2", "aws-sdk": "^2.1446.0", "axios": "^0.21.2", diff --git a/packages/datadog-plugin-aws-sdk/test/lambda.spec.js b/packages/datadog-plugin-aws-sdk/test/lambda.spec.js index 4ccf3b8b46e..4092e933af7 100644 --- a/packages/datadog-plugin-aws-sdk/test/lambda.spec.js +++ b/packages/datadog-plugin-aws-sdk/test/lambda.spec.js @@ -46,7 +46,7 @@ describe('Plugin', () => { Code: { ZipFile }, Handler: 'handler.handle', Role: 'arn:aws:iam::123456:role/test', - Runtime: 'nodejs16.x' + Runtime: 'nodejs18.x' }, (err, res) => { if (err) return done(err) diff --git a/yarn.lock b/yarn.lock index 9ecfe4833eb..ebb28921157 100644 --- a/yarn.lock +++ b/yarn.lock @@ -841,10 +841,12 @@ resolved "https://registry.npmjs.org/@types/node/-/node-18.11.9.tgz" integrity sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg== -"@types/node@>=16": - version "18.7.23" - resolved "https://registry.npmjs.org/@types/node/-/node-18.7.23.tgz" - integrity sha512-DWNcCHolDq0ZKGizjx2DZjR/PqsYwAcYUJmfMWqtVU2MBMG5Mo+xFZrhGId5r/O5HOuMPyQEcM6KUBp5lBZZBg== +"@types/node@>=18": + version "20.10.6" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.10.6.tgz#a3ec84c22965802bf763da55b2394424f22bfbb5" + integrity sha512-Vac8H+NlRNNlAmDfGUP7b5h/KA+AtWIzuXy0E6OyP8f1tCLYAtPvKRRDJjAPqhpCb0t6U2j7/xqAuLEebW2kiw== + dependencies: + undici-types "~5.26.4" "@types/prop-types@*": version "15.7.5" @@ -5095,6 +5097,11 @@ unbox-primitive@^1.0.2: has-symbols "^1.0.3" which-boxed-primitive "^1.0.2" +undici-types@~5.26.4: + version "5.26.5" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" + integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== + unicode-length@^2.0.2: version "2.1.0" resolved "https://registry.npmjs.org/unicode-length/-/unicode-length-2.1.0.tgz"