From c146248d57e168e7d9f8b3421b6ffca6157113ba Mon Sep 17 00:00:00 2001 From: "Mateusz \"mat\" Rumian" <58699800+mat-rumian@users.noreply.github.com> Date: Fri, 26 Jan 2024 13:32:59 +0100 Subject: [PATCH] feat: switch from node 14 to 16 (#1118) * feat: switch nodejs to 16, fix linter * feat: switch nodejs to 16, fix linter for sample app * feat: switch builder to node 16 * feat: update runtimes list --- .github/workflows/ci-nodejs.yml | 2 +- .github/workflows/release-layer-nodejs.yml | 4 ++-- nodejs/packages/layer/package.json | 6 +++--- nodejs/sample-apps/aws-sdk/package.json | 8 +++----- 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci-nodejs.yml b/.github/workflows/ci-nodejs.yml index cd0700f127..b8125b8d68 100644 --- a/.github/workflows/ci-nodejs.yml +++ b/.github/workflows/ci-nodejs.yml @@ -19,7 +19,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: 14 + node-version: 16 - uses: actions/cache@v4 with: path: ~/.npm diff --git a/.github/workflows/release-layer-nodejs.yml b/.github/workflows/release-layer-nodejs.yml index 46aa38c9cf..8b83acdbf5 100644 --- a/.github/workflows/release-layer-nodejs.yml +++ b/.github/workflows/release-layer-nodejs.yml @@ -20,7 +20,7 @@ jobs: - uses: actions/setup-node@v4 with: - node-version: 14 + node-version: 16 - name: Build run: | @@ -71,7 +71,7 @@ jobs: layer-name: opentelemetry-nodejs component-version: ${{needs.build-layer.outputs.NODEJS_VERSION}} # architecture: - runtimes: nodejs14.x nodejs16.x nodejs18.x + runtimes: nodejs16.x nodejs18.x nodejs20.x release-group: prod aws_region: ${{ matrix.aws_region }} secrets: inherit diff --git a/nodejs/packages/layer/package.json b/nodejs/packages/layer/package.json index e1abb23597..a902131b2b 100644 --- a/nodejs/packages/layer/package.json +++ b/nodejs/packages/layer/package.json @@ -6,8 +6,8 @@ "repository": "open-telemetry/opentelemetry-lambda", "scripts": { "clean": "rimraf build/*", - "lint": "eslint . --ext .ts", - "lint:fix": "eslint . --ext .ts --fix", + "lint": "ESLINT_USE_FLAT_CONFIG=false eslint . --ext .ts", + "lint:fix": "ESLINT_USE_FLAT_CONFIG=false eslint . --ext .ts --fix", "prepare": "npm run compile", "compile": "tsc -p .", "postcompile": "copyfiles 'node_modules/**' build/workspace/nodejs && copyfiles -f 'scripts/*' build/workspace && copyfiles -f 'build/src/*' build/workspace && cd build/workspace && bestzip ../layer.zip *" @@ -23,7 +23,7 @@ "author": "OpenTelemetry Authors", "license": "Apache-2.0", "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0" }, "dependencies": { "@opentelemetry/api": "^1.7.0", diff --git a/nodejs/sample-apps/aws-sdk/package.json b/nodejs/sample-apps/aws-sdk/package.json index b6c46ca801..565697c362 100644 --- a/nodejs/sample-apps/aws-sdk/package.json +++ b/nodejs/sample-apps/aws-sdk/package.json @@ -8,8 +8,8 @@ "repository": "open-telemetry/opentelemetry-lambda", "scripts": { "clean": "rimraf build/*", - "lint": "eslint . --ext .ts", - "lint:fix": "eslint . --ext .ts --fix", + "lint": "ESLINT_USE_FLAT_CONFIG=false eslint . --ext .ts", + "lint:fix": "ESLINT_USE_FLAT_CONFIG=false eslint . --ext .ts --fix", "precompile": "tsc --version", "prepare": "npm run compile", "compile": "tsc -p .", @@ -26,7 +26,7 @@ "author": "OpenTelemetry Authors", "license": "Apache-2.0", "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0" }, "files": [ "build/src/**/*.js", @@ -42,8 +42,6 @@ "copyfiles": "2.4.1", "rimraf": "5.0.5", "ts-node": "10.9.2", - "tslint-consistent-codestyle": "1.16.0", - "tslint-microsoft-contrib": "6.2.0", "typescript": "5.3.3" }, "dependencies": {