From 22e58cd3bde0d1f8e24fc2f032de5d9db1996ea8 Mon Sep 17 00:00:00 2001 From: David Luna Date: Fri, 18 Oct 2024 17:43:35 +0200 Subject: [PATCH 01/17] chore: use nx commands --- .github/workflows/unit-test.yml | 4 +- .../package.json | 1 - .../package.json | 1 - .../package.json | 1 - .../package.json | 2 +- .../package.json | 1 - .../package.json | 1 - .../package.json | 1 - .../package.json | 1 - .../auto-instrumentations-node/package.json | 1 - .../auto-instrumentations-web/package.json | 1 - nx.json | 43 +++++++++++++++++++ package-lock.json | 1 + package.json | 38 +++++++++++----- packages/baggage-span-processor/package.json | 1 - .../opentelemetry-host-metrics/package.json | 1 - .../package.json | 1 - .../package.json | 1 - .../opentelemetry-redis-common/package.json | 1 - .../opentelemetry-sql-common/package.json | 1 - .../opentelemetry-test-utils/package.json | 1 - packages/winston-transport/package.json | 1 - .../node/instrumentation-amqplib/package.json | 1 - .../instrumentation-cucumber/package.json | 1 - .../instrumentation-dataloader/package.json | 1 - plugins/node/instrumentation-fs/package.json | 1 - .../node/instrumentation-kafkajs/package.json | 1 - .../instrumentation-lru-memoizer/package.json | 1 - .../instrumentation-mongoose/package.json | 1 - .../instrumentation-runtime-node/package.json | 1 - .../instrumentation-socket.io/package.json | 1 - .../node/instrumentation-tedious/package.json | 1 - .../node/instrumentation-undici/package.json | 1 - .../package.json | 1 - .../package.json | 1 - .../package.json | 1 - .../package.json | 1 - .../package.json | 1 - .../package.json | 1 - .../package.json | 1 - .../package.json | 1 - .../package.json | 1 - .../package.json | 1 - .../package.json | 1 - .../package.json | 1 - .../package.json | 1 - .../package.json | 1 - .../package.json | 1 - .../package.json | 1 - .../package.json | 1 - .../package.json | 1 - .../package.json | 1 - .../package.json | 1 - .../package.json | 1 - .../package.json | 1 - .../package.json | 1 - .../package.json | 1 - .../package.json | 1 - .../package.json | 1 - .../package.json | 1 - .../package.json | 1 - .../package.json | 1 - .../package.json | 1 - .../package.json | 1 - .../package.json | 1 - .../package.json | 1 - 66 files changed, 75 insertions(+), 74 deletions(-) create mode 100644 nx.json diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 390ceabfb5..4bca0bf8fa 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -129,7 +129,7 @@ jobs: - name: Install run: npm ci - name: Build - run: npm run compile + run: npm run version:update - name: Unit tests (Full) if: matrix.code-coverage run: npm run test @@ -167,7 +167,7 @@ jobs: - name: Install run: npm ci - name: Build - run: npm run compile + run: npm run version:update - name: Unit tests run: npm run test:browser - name: Report Coverage diff --git a/detectors/node/opentelemetry-resource-detector-alibaba-cloud/package.json b/detectors/node/opentelemetry-resource-detector-alibaba-cloud/package.json index 8bc7b29fcd..d928c85ba5 100644 --- a/detectors/node/opentelemetry-resource-detector-alibaba-cloud/package.json +++ b/detectors/node/opentelemetry-resource-detector-alibaba-cloud/package.json @@ -10,7 +10,6 @@ "compile": "tsc -p .", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", - "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/resource-detector-alibaba-cloud --include-dependencies", "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", "test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'", diff --git a/detectors/node/opentelemetry-resource-detector-aws/package.json b/detectors/node/opentelemetry-resource-detector-aws/package.json index e500037938..2eb3167831 100644 --- a/detectors/node/opentelemetry-resource-detector-aws/package.json +++ b/detectors/node/opentelemetry-resource-detector-aws/package.json @@ -10,7 +10,6 @@ "compile": "tsc -p .", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", - "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/resource-detector-aws --include-dependencies", "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", "test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'", diff --git a/detectors/node/opentelemetry-resource-detector-azure/package.json b/detectors/node/opentelemetry-resource-detector-azure/package.json index 5258ca9ac5..66dd41170d 100644 --- a/detectors/node/opentelemetry-resource-detector-azure/package.json +++ b/detectors/node/opentelemetry-resource-detector-azure/package.json @@ -10,7 +10,6 @@ "compile": "tsc -p .", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", - "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/resource-detector-azure --include-dependencies", "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", "test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'", diff --git a/detectors/node/opentelemetry-resource-detector-container/package.json b/detectors/node/opentelemetry-resource-detector-container/package.json index a84471a345..d41b2e95bc 100644 --- a/detectors/node/opentelemetry-resource-detector-container/package.json +++ b/detectors/node/opentelemetry-resource-detector-container/package.json @@ -10,7 +10,6 @@ "compile": "tsc -p .", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", - "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/resource-detector-container --include-dependencies", "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", "test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'", @@ -34,6 +33,7 @@ "devDependencies": { "@opentelemetry/api": "^1.0.0", "@opentelemetry/contrib-test-utils": "^0.41.0", + "@opentelemetry/instrumentation-fs": "*", "@types/mocha": "8.2.3", "@types/node": "18.18.14", "@types/sinon": "10.0.20", diff --git a/detectors/node/opentelemetry-resource-detector-gcp/package.json b/detectors/node/opentelemetry-resource-detector-gcp/package.json index 21c9e34688..ea537ff167 100644 --- a/detectors/node/opentelemetry-resource-detector-gcp/package.json +++ b/detectors/node/opentelemetry-resource-detector-gcp/package.json @@ -10,7 +10,6 @@ "compile": "tsc -p .", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", - "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/resource-detector-gcp --include-dependencies", "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", "test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'", diff --git a/detectors/node/opentelemetry-resource-detector-github/package.json b/detectors/node/opentelemetry-resource-detector-github/package.json index 05cb016d89..3eff36ad2a 100644 --- a/detectors/node/opentelemetry-resource-detector-github/package.json +++ b/detectors/node/opentelemetry-resource-detector-github/package.json @@ -10,7 +10,6 @@ "compile": "tsc -p .", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", - "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/resource-detector-github --include-dependencies", "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", "test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'", diff --git a/detectors/node/opentelemetry-resource-detector-instana/package.json b/detectors/node/opentelemetry-resource-detector-instana/package.json index 0b1df4356b..9b7366de92 100644 --- a/detectors/node/opentelemetry-resource-detector-instana/package.json +++ b/detectors/node/opentelemetry-resource-detector-instana/package.json @@ -10,7 +10,6 @@ "compile": "tsc -p .", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", - "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/resource-detector-instana --include-dependencies", "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", "test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'", diff --git a/metapackages/auto-configuration-propagators/package.json b/metapackages/auto-configuration-propagators/package.json index 04e0ebe720..d7a74a9f6f 100644 --- a/metapackages/auto-configuration-propagators/package.json +++ b/metapackages/auto-configuration-propagators/package.json @@ -19,7 +19,6 @@ "compile": "tsc -p .", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", - "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/auto-configuration-propagators --include-dependencies", "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", "tdd": "npm run test -- --watch-extensions ts --watch", diff --git a/metapackages/auto-instrumentations-node/package.json b/metapackages/auto-instrumentations-node/package.json index c1b30d2a91..dc0d4ff701 100644 --- a/metapackages/auto-instrumentations-node/package.json +++ b/metapackages/auto-instrumentations-node/package.json @@ -23,7 +23,6 @@ "compile": "tsc -p .", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", - "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/auto-instrumentations-node --include-dependencies", "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", "tdd": "yarn test -- --watch-extensions ts --watch", diff --git a/metapackages/auto-instrumentations-web/package.json b/metapackages/auto-instrumentations-web/package.json index e0c40b4eda..e8e3f59074 100644 --- a/metapackages/auto-instrumentations-web/package.json +++ b/metapackages/auto-instrumentations-web/package.json @@ -21,7 +21,6 @@ "compile": "tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", - "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/auto-instrumentations-web --include-dependencies", "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", "test:browser": "nyc karma start --single-run", diff --git a/nx.json b/nx.json new file mode 100644 index 0000000000..749bcb13d4 --- /dev/null +++ b/nx.json @@ -0,0 +1,43 @@ +{ + "tasksRunnerOptions": { + "default": { + "runner": "nx/tasks-runners/default", + "options": { + "cacheableOperations": [ + "compile", + "lint", + "version:update" + ] + } + } + }, + "targetDefaults": { + "compile": { + "dependsOn": [ + "version:update", + "^compile" + ], + "inputs": [ + "{projectRoot}/src", + "{projectRoot}/test" + ], + "outputs": [ + "{projectRoot}/build" + ] + }, + "lint": { + "inputs": [ + "{projectRoot}/src", + "{projectRoot}/test" + ] + }, + "version:update": { + "inputs": [ + "{projectRoot}/package.json" + ], + "outputs": [ + "{projectRoot}/src/version.ts" + ] + } + } +} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 503be5bead..e544c36ecd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -31,6 +31,7 @@ "lerna-changelog": "2.2.0", "markdownlint-cli2": "0.13.0", "minimatch": "^9.0.3", + "nx": "15.9.7", "prettier": "2.8.8", "process": "0.11.10", "semver": "^7.6.0", diff --git a/package.json b/package.json index dfee7ad5aa..d1b30973ea 100644 --- a/package.json +++ b/package.json @@ -12,24 +12,41 @@ "main": "build/src/index.js", "types": "build/src/index.d.ts", "scripts": { - "clean": "lerna run clean", - "precompile": "tsc --version && npm run version:update", - "version:update": "lerna run version:update", - "compile": "lerna run compile", - "prewatch": "npm run precompile", - "test": "lerna run test", - "test:ci:changed": "lerna run test --since origin/main", - "test:browser": "lerna run test:browser --concurrency 1", + "lerna:clean": "lerna run clean", + "lerna:precompile": "tsc --version && npm run version:update", + "lerna:version:update": "lerna run version:update", + "lerna:compile": "lerna run compile", + "lerna:prewatch": "npm run precompile", + "lerna:test": "lerna run test", + "lerna:test:ci:changed": "lerna run test --since origin/main", + "lerna:test:browser": "lerna run test:browser --concurrency 1", + "lerna:test-all-versions": "npm run --if-present --workspaces test-all-versions", + "lerna:bump": "lerna publish", + "lerna:changelog": "lerna-changelog", + "lerna:lint": "lerna run lint && npm run lint:readme && npm run lint:markdown", + "lerna:lint:fix": "lerna run lint:fix && npm run lint:markdown:fix", + "lerna:lint:examples": "eslint ./examples/**/*.js", + "lerna:lint:examples:fix": "eslint ./examples/**/*.js --fix", + "lerna:lint:markdown": "markdownlint-cli2 $(git ls-files '*.md')", + "lerna:lint:markdown:fix": "markdownlint-cli2 --fix $(git ls-files '*.md')", + "lerna:lint:readme": "lerna run lint:readme", + "// NEW SECTION OF SCRIPTS WITH NX": "", + "clean": "nx run-many -t clean", + "compile": "nx run-many -t compile", + "test": "nx run-many -t test", + "test:browser": "nx run-many -t test:browser", + "test:ci:changed": "nx affected -t lint --base=origin/main --head=HEAD", "test-all-versions": "npm run --if-present --workspaces test-all-versions", "bump": "lerna publish", "changelog": "lerna-changelog", - "lint": "lerna run lint && npm run lint:readme && npm run lint:markdown", + "lint": "nx run-many -t lint && npm run lint:readme && npm run lint:markdown", "lint:fix": "lerna run lint:fix && npm run lint:markdown:fix", "lint:examples": "eslint ./examples/**/*.js", "lint:examples:fix": "eslint ./examples/**/*.js --fix", "lint:markdown": "markdownlint-cli2 $(git ls-files '*.md')", "lint:markdown:fix": "markdownlint-cli2 --fix $(git ls-files '*.md')", - "lint:readme": "lerna run lint:readme" + "lint:readme": "nx run-many -t lint:readme", + "version:update": "nx run-many -t version:update" }, "keywords": [ "opentelemetry", @@ -56,6 +73,7 @@ "lerna-changelog": "2.2.0", "markdownlint-cli2": "0.13.0", "minimatch": "^9.0.3", + "nx": "15.9.7", "prettier": "2.8.8", "semver": "^7.6.0", "process": "0.11.10", diff --git a/packages/baggage-span-processor/package.json b/packages/baggage-span-processor/package.json index d994aee493..8c5836b67f 100644 --- a/packages/baggage-span-processor/package.json +++ b/packages/baggage-span-processor/package.json @@ -10,7 +10,6 @@ "compile": "tsc -p .", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", - "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/baggage-span-processor --include-dependencies", "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", "tdd": "npm run test -- --watch-extensions ts --watch", diff --git a/packages/opentelemetry-host-metrics/package.json b/packages/opentelemetry-host-metrics/package.json index cbb4b4017d..75acb49cfa 100644 --- a/packages/opentelemetry-host-metrics/package.json +++ b/packages/opentelemetry-host-metrics/package.json @@ -10,7 +10,6 @@ "compile": "tsc -p .", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", - "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/host-metrics --include-dependencies", "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", "tdd": "npm run test -- --watch-extensions ts --watch", diff --git a/packages/opentelemetry-id-generator-aws-xray/package.json b/packages/opentelemetry-id-generator-aws-xray/package.json index 6405f48df4..3df8335138 100644 --- a/packages/opentelemetry-id-generator-aws-xray/package.json +++ b/packages/opentelemetry-id-generator-aws-xray/package.json @@ -15,7 +15,6 @@ "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js-contrib", "scripts": { - "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/id-generator-aws-xray --include-dependencies", "prewatch": "npm run precompile", "compile": "tsc --build tsconfig.json tsconfig.esm.json", "clean": "tsc --build --clean tsconfig.json tsconfig.esm.json", diff --git a/packages/opentelemetry-propagation-utils/package.json b/packages/opentelemetry-propagation-utils/package.json index 4c7c98a830..a1015c4894 100644 --- a/packages/opentelemetry-propagation-utils/package.json +++ b/packages/opentelemetry-propagation-utils/package.json @@ -12,7 +12,6 @@ "compile": "tsc --build tsconfig.json tsconfig.esm.json", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", - "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/propagation-utils --include-dependencies", "prepublishOnly": "npm run compile", "prewatch": "npm run precompile", "tdd": "npm run test -- --watch-extensions ts --watch", diff --git a/packages/opentelemetry-redis-common/package.json b/packages/opentelemetry-redis-common/package.json index f90415ab30..39fe6b65c8 100644 --- a/packages/opentelemetry-redis-common/package.json +++ b/packages/opentelemetry-redis-common/package.json @@ -11,7 +11,6 @@ "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", "compile": "tsc --build tsconfig.json", - "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/redis-common --include-dependencies", "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", "test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'", diff --git a/packages/opentelemetry-sql-common/package.json b/packages/opentelemetry-sql-common/package.json index f560b6c01c..5c9507e46d 100644 --- a/packages/opentelemetry-sql-common/package.json +++ b/packages/opentelemetry-sql-common/package.json @@ -11,7 +11,6 @@ "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", "compile": "tsc --build tsconfig.json", - "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/sql-common --include-dependencies", "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", "test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'", diff --git a/packages/opentelemetry-test-utils/package.json b/packages/opentelemetry-test-utils/package.json index 3a1e09384b..e1bcb2a742 100644 --- a/packages/opentelemetry-test-utils/package.json +++ b/packages/opentelemetry-test-utils/package.json @@ -11,7 +11,6 @@ "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", "compile": "tsc -p .", - "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/contrib-test-utils --include-dependencies", "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", "watch": "tsc -w" diff --git a/packages/winston-transport/package.json b/packages/winston-transport/package.json index acb34451cf..5c944ba9d8 100644 --- a/packages/winston-transport/package.json +++ b/packages/winston-transport/package.json @@ -11,7 +11,6 @@ "clean": "rimraf build/*", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", - "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/winston-transport --include-dependencies", "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", "version:update": "node ../../scripts/version-update.js", diff --git a/plugins/node/instrumentation-amqplib/package.json b/plugins/node/instrumentation-amqplib/package.json index 886a1b9918..b746708e2b 100644 --- a/plugins/node/instrumentation-amqplib/package.json +++ b/plugins/node/instrumentation-amqplib/package.json @@ -31,7 +31,6 @@ "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", "lint:readme": "node ../../../scripts/lint-readme.js", - "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-amqplib --include-dependencies", "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", "tdd": "npm run test -- --watch-extensions ts --watch", diff --git a/plugins/node/instrumentation-cucumber/package.json b/plugins/node/instrumentation-cucumber/package.json index ba2329ba73..64bccca1cd 100644 --- a/plugins/node/instrumentation-cucumber/package.json +++ b/plugins/node/instrumentation-cucumber/package.json @@ -13,7 +13,6 @@ "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", "lint:readme": "node ../../../scripts/lint-readme.js", - "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-cucumber --include-dependencies", "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", "version:update": "node ../../../scripts/version-update.js", diff --git a/plugins/node/instrumentation-dataloader/package.json b/plugins/node/instrumentation-dataloader/package.json index 77824e10ac..7b43fded61 100644 --- a/plugins/node/instrumentation-dataloader/package.json +++ b/plugins/node/instrumentation-dataloader/package.json @@ -10,7 +10,6 @@ "compile": "tsc -p .", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", - "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-dataloader --include-dependencies", "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", "tdd": "npm run test -- --watch-extensions ts --watch", diff --git a/plugins/node/instrumentation-fs/package.json b/plugins/node/instrumentation-fs/package.json index 87d7cd0f8b..7242296ba6 100644 --- a/plugins/node/instrumentation-fs/package.json +++ b/plugins/node/instrumentation-fs/package.json @@ -12,7 +12,6 @@ "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", "lint:readme": "node ../../../scripts/lint-readme.js", - "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-fs --include-dependencies", "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", "version:update": "node ../../../scripts/version-update.js", diff --git a/plugins/node/instrumentation-kafkajs/package.json b/plugins/node/instrumentation-kafkajs/package.json index c7b0e8bedd..bdbc970072 100644 --- a/plugins/node/instrumentation-kafkajs/package.json +++ b/plugins/node/instrumentation-kafkajs/package.json @@ -12,7 +12,6 @@ "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", "lint:readme": "node ../../../scripts/lint-readme", - "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-kafkajs --include-dependencies", "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", "version:update": "node ../../../scripts/version-update.js", diff --git a/plugins/node/instrumentation-lru-memoizer/package.json b/plugins/node/instrumentation-lru-memoizer/package.json index 07dde7fb2c..e537410c95 100644 --- a/plugins/node/instrumentation-lru-memoizer/package.json +++ b/plugins/node/instrumentation-lru-memoizer/package.json @@ -13,7 +13,6 @@ "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", "lint:readme": "node ../../../scripts/lint-readme.js", - "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-lru-memoizer --include-dependencies", "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", "version:update": "node ../../../scripts/version-update.js", diff --git a/plugins/node/instrumentation-mongoose/package.json b/plugins/node/instrumentation-mongoose/package.json index 49622017af..990b5c0587 100644 --- a/plugins/node/instrumentation-mongoose/package.json +++ b/plugins/node/instrumentation-mongoose/package.json @@ -16,7 +16,6 @@ "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", "lint:readme": "node ../../../scripts/lint-readme.js", - "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-mongoose --include-dependencies", "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", "version:update": "node ../../../scripts/version-update.js", diff --git a/plugins/node/instrumentation-runtime-node/package.json b/plugins/node/instrumentation-runtime-node/package.json index 703628d776..5c6c056152 100644 --- a/plugins/node/instrumentation-runtime-node/package.json +++ b/plugins/node/instrumentation-runtime-node/package.json @@ -11,7 +11,6 @@ "compile": "tsc -p .", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", - "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-runtime-node --include-dependencies", "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", "test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'", diff --git a/plugins/node/instrumentation-socket.io/package.json b/plugins/node/instrumentation-socket.io/package.json index a9b25ea644..ef8de12d33 100644 --- a/plugins/node/instrumentation-socket.io/package.json +++ b/plugins/node/instrumentation-socket.io/package.json @@ -13,7 +13,6 @@ "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", "lint:readme": "node ../../../scripts/lint-readme.js", - "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-socket.io --include-dependencies", "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", "version:update": "node ../../../scripts/version-update.js", diff --git a/plugins/node/instrumentation-tedious/package.json b/plugins/node/instrumentation-tedious/package.json index d000b34a57..b549550b3a 100644 --- a/plugins/node/instrumentation-tedious/package.json +++ b/plugins/node/instrumentation-tedious/package.json @@ -10,7 +10,6 @@ "compile": "tsc -p .", "lint:fix": "eslint . --ext .ts --fix", "lint": "eslint . --ext .ts", - "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-tedious --include-dependencies", "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", "tdd": "npm run test -- --watch-extensions ts --watch", diff --git a/plugins/node/instrumentation-undici/package.json b/plugins/node/instrumentation-undici/package.json index 18fcb7ad20..646b66cc42 100644 --- a/plugins/node/instrumentation-undici/package.json +++ b/plugins/node/instrumentation-undici/package.json @@ -15,7 +15,6 @@ "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", "watch": "tsc -w", - "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-undici --include-dependencies", "prewatch": "npm run precompile", "version:update": "node ../../../scripts/version-update.js" }, diff --git a/plugins/node/opentelemetry-instrumentation-aws-lambda/package.json b/plugins/node/opentelemetry-instrumentation-aws-lambda/package.json index 67a3944786..52ed49ce9f 100644 --- a/plugins/node/opentelemetry-instrumentation-aws-lambda/package.json +++ b/plugins/node/opentelemetry-instrumentation-aws-lambda/package.json @@ -12,7 +12,6 @@ "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", "lint:readme": "node ../../../scripts/lint-readme.js", - "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-aws-lambda --include-dependencies", "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", "version:update": "node ../../../scripts/version-update.js", diff --git a/plugins/node/opentelemetry-instrumentation-aws-sdk/package.json b/plugins/node/opentelemetry-instrumentation-aws-sdk/package.json index 04fdb6b748..84b03fcfb7 100644 --- a/plugins/node/opentelemetry-instrumentation-aws-sdk/package.json +++ b/plugins/node/opentelemetry-instrumentation-aws-sdk/package.json @@ -32,7 +32,6 @@ "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", "lint:readme": "node ../../../scripts/lint-readme.js", - "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-aws-sdk --include-dependencies", "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", "tdd": "npm run test -- --watch-extensions ts --watch", diff --git a/plugins/node/opentelemetry-instrumentation-bunyan/package.json b/plugins/node/opentelemetry-instrumentation-bunyan/package.json index 5f1743293f..c14a1ddb19 100644 --- a/plugins/node/opentelemetry-instrumentation-bunyan/package.json +++ b/plugins/node/opentelemetry-instrumentation-bunyan/package.json @@ -10,7 +10,6 @@ "compile": "tsc -p .", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", - "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-bunyan --include-dependencies", "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", "tdd": "npm run test -- --watch-extensions ts --watch", diff --git a/plugins/node/opentelemetry-instrumentation-cassandra/package.json b/plugins/node/opentelemetry-instrumentation-cassandra/package.json index ee56edb04f..3309109007 100644 --- a/plugins/node/opentelemetry-instrumentation-cassandra/package.json +++ b/plugins/node/opentelemetry-instrumentation-cassandra/package.json @@ -12,7 +12,6 @@ "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", "lint:readme": "node ../../../scripts/lint-readme.js", - "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-cassandra-driver --include-dependencies", "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", "version:update": "node ../../../scripts/version-update.js", diff --git a/plugins/node/opentelemetry-instrumentation-connect/package.json b/plugins/node/opentelemetry-instrumentation-connect/package.json index 308a129bf7..0dd9ca3847 100644 --- a/plugins/node/opentelemetry-instrumentation-connect/package.json +++ b/plugins/node/opentelemetry-instrumentation-connect/package.json @@ -11,7 +11,6 @@ "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", "lint:readme": "node ../../../scripts/lint-readme.js", - "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-connect --include-dependencies", "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", "test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'", diff --git a/plugins/node/opentelemetry-instrumentation-dns/package.json b/plugins/node/opentelemetry-instrumentation-dns/package.json index 25a724858c..40cf689983 100644 --- a/plugins/node/opentelemetry-instrumentation-dns/package.json +++ b/plugins/node/opentelemetry-instrumentation-dns/package.json @@ -11,7 +11,6 @@ "clean": "rimraf build/*", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", - "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-dns --include-dependencies", "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", "version:update": "node ../../../scripts/version-update.js", diff --git a/plugins/node/opentelemetry-instrumentation-express/package.json b/plugins/node/opentelemetry-instrumentation-express/package.json index 0954fa5a44..4ec3e4a9c2 100644 --- a/plugins/node/opentelemetry-instrumentation-express/package.json +++ b/plugins/node/opentelemetry-instrumentation-express/package.json @@ -13,7 +13,6 @@ "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", "lint:readme": "node ../../../scripts/lint-readme.js", - "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-express --include-dependencies", "prewatch": "npm run precompile", "version:update": "node ../../../scripts/version-update.js", "compile": "tsc -p .", diff --git a/plugins/node/opentelemetry-instrumentation-fastify/package.json b/plugins/node/opentelemetry-instrumentation-fastify/package.json index 31a1ff53d6..a7e315bd32 100644 --- a/plugins/node/opentelemetry-instrumentation-fastify/package.json +++ b/plugins/node/opentelemetry-instrumentation-fastify/package.json @@ -11,7 +11,6 @@ "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", "lint:readme": "node ../../../scripts/lint-readme.js", - "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-fastify --include-dependencies", "prepublishOnly": "npm run compile", "test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'", "test-all-versions": "tav", diff --git a/plugins/node/opentelemetry-instrumentation-generic-pool/package.json b/plugins/node/opentelemetry-instrumentation-generic-pool/package.json index cd62c9bad2..d060c83586 100644 --- a/plugins/node/opentelemetry-instrumentation-generic-pool/package.json +++ b/plugins/node/opentelemetry-instrumentation-generic-pool/package.json @@ -12,7 +12,6 @@ "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", "lint:readme": "node ../../../scripts/lint-readme.js", - "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-generic-pool --include-dependencies", "prewatch": "npm run precompile", "version:update": "node ../../../scripts/version-update.js", "compile": "tsc -p .", diff --git a/plugins/node/opentelemetry-instrumentation-graphql/package.json b/plugins/node/opentelemetry-instrumentation-graphql/package.json index ea4bd9efd0..e138a2ac85 100644 --- a/plugins/node/opentelemetry-instrumentation-graphql/package.json +++ b/plugins/node/opentelemetry-instrumentation-graphql/package.json @@ -11,7 +11,6 @@ "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", "lint:readme": "node ../../../scripts/lint-readme.js", - "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-graphql --include-dependencies", "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", "test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'", diff --git a/plugins/node/opentelemetry-instrumentation-hapi/package.json b/plugins/node/opentelemetry-instrumentation-hapi/package.json index fed9ee631a..c60bf104b1 100644 --- a/plugins/node/opentelemetry-instrumentation-hapi/package.json +++ b/plugins/node/opentelemetry-instrumentation-hapi/package.json @@ -13,7 +13,6 @@ "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", "lint:readme": "node ../../../scripts/lint-readme.js", - "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-hapi --include-dependencies", "prewatch": "npm run precompile", "version:update": "node ../../../scripts/version-update.js", "compile": "tsc -p .", diff --git a/plugins/node/opentelemetry-instrumentation-ioredis/package.json b/plugins/node/opentelemetry-instrumentation-ioredis/package.json index e1102f146d..f83d692f06 100644 --- a/plugins/node/opentelemetry-instrumentation-ioredis/package.json +++ b/plugins/node/opentelemetry-instrumentation-ioredis/package.json @@ -16,7 +16,6 @@ "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", "lint:readme": "node ../../../scripts/lint-readme.js", - "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-ioredis --include-dependencies", "prewatch": "npm run precompile", "version:update": "node ../../../scripts/version-update.js", "compile": "tsc -p .", diff --git a/plugins/node/opentelemetry-instrumentation-knex/package.json b/plugins/node/opentelemetry-instrumentation-knex/package.json index 1a8aa01ef1..ec8a68a017 100644 --- a/plugins/node/opentelemetry-instrumentation-knex/package.json +++ b/plugins/node/opentelemetry-instrumentation-knex/package.json @@ -11,7 +11,6 @@ "clean": "rimraf build/*", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", - "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-knex --include-dependencies", "prewatch": "npm run precompile", "version:update": "node ../../../scripts/version-update.js", "lint:readme": "node ../../../scripts/lint-readme", diff --git a/plugins/node/opentelemetry-instrumentation-koa/package.json b/plugins/node/opentelemetry-instrumentation-koa/package.json index 76158ff21d..8b595a2de9 100644 --- a/plugins/node/opentelemetry-instrumentation-koa/package.json +++ b/plugins/node/opentelemetry-instrumentation-koa/package.json @@ -13,7 +13,6 @@ "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", "lint:readme": "node ../../../scripts/lint-readme.js", - "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-koa --include-dependencies", "prewatch": "npm run precompile", "version:update": "node ../../../scripts/version-update.js", "compile": "tsc -p .", diff --git a/plugins/node/opentelemetry-instrumentation-memcached/package.json b/plugins/node/opentelemetry-instrumentation-memcached/package.json index 22c32184fa..5bcb41b7a8 100644 --- a/plugins/node/opentelemetry-instrumentation-memcached/package.json +++ b/plugins/node/opentelemetry-instrumentation-memcached/package.json @@ -10,7 +10,6 @@ "compile": "tsc -p .", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", - "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-memcached --include-dependencies", "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", "tdd": "npm run test -- --watch-extensions ts --watch", diff --git a/plugins/node/opentelemetry-instrumentation-mongodb/package.json b/plugins/node/opentelemetry-instrumentation-mongodb/package.json index 7a9c406a07..bb763d860c 100644 --- a/plugins/node/opentelemetry-instrumentation-mongodb/package.json +++ b/plugins/node/opentelemetry-instrumentation-mongodb/package.json @@ -17,7 +17,6 @@ "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", "lint:readme": "node ../../../scripts/lint-readme.js", - "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-mongodb --include-dependencies", "prewatch": "npm run precompile", "version:update": "node ../../../scripts/version-update.js", "compile": "tsc -p .", diff --git a/plugins/node/opentelemetry-instrumentation-mysql/package.json b/plugins/node/opentelemetry-instrumentation-mysql/package.json index c79226bf5e..363c58242e 100644 --- a/plugins/node/opentelemetry-instrumentation-mysql/package.json +++ b/plugins/node/opentelemetry-instrumentation-mysql/package.json @@ -10,7 +10,6 @@ "compile": "tsc -p .", "lint:fix": "eslint . --ext .ts --fix", "lint": "eslint . --ext .ts", - "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-mysql --include-dependencies", "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", "tdd": "npm run test -- --watch-extensions ts --watch", diff --git a/plugins/node/opentelemetry-instrumentation-mysql2/package.json b/plugins/node/opentelemetry-instrumentation-mysql2/package.json index 988b5ddf32..9126b25068 100644 --- a/plugins/node/opentelemetry-instrumentation-mysql2/package.json +++ b/plugins/node/opentelemetry-instrumentation-mysql2/package.json @@ -10,7 +10,6 @@ "compile": "tsc -p .", "lint:fix": "eslint . --ext .ts --fix", "lint": "eslint . --ext .ts", - "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-mysql2 --include-dependencies", "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", "tdd": "npm run test -- --watch-extensions ts --watch", diff --git a/plugins/node/opentelemetry-instrumentation-nestjs-core/package.json b/plugins/node/opentelemetry-instrumentation-nestjs-core/package.json index ba291c1e21..21ff286706 100644 --- a/plugins/node/opentelemetry-instrumentation-nestjs-core/package.json +++ b/plugins/node/opentelemetry-instrumentation-nestjs-core/package.json @@ -11,7 +11,6 @@ "compile:watch": "tsc -w", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", - "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-nestjs-core --include-dependencies", "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", "tdd": "npm run test -- --watch-extensions ts --watch", diff --git a/plugins/node/opentelemetry-instrumentation-net/package.json b/plugins/node/opentelemetry-instrumentation-net/package.json index e3390afad2..ce464813ba 100644 --- a/plugins/node/opentelemetry-instrumentation-net/package.json +++ b/plugins/node/opentelemetry-instrumentation-net/package.json @@ -12,7 +12,6 @@ "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", "lint:readme": "node ../../../scripts/lint-readme.js", - "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-net --include-dependencies", "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", "version:update": "node ../../../scripts/version-update.js", diff --git a/plugins/node/opentelemetry-instrumentation-pg/package.json b/plugins/node/opentelemetry-instrumentation-pg/package.json index 76deba667a..73a8020079 100644 --- a/plugins/node/opentelemetry-instrumentation-pg/package.json +++ b/plugins/node/opentelemetry-instrumentation-pg/package.json @@ -11,7 +11,6 @@ "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", "lint:readme": "node ../../../scripts/lint-readme.js", - "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-pg --include-dependencies", "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", "tdd": "npm run test -- --watch-extensions ts --watch", diff --git a/plugins/node/opentelemetry-instrumentation-pino/package.json b/plugins/node/opentelemetry-instrumentation-pino/package.json index 407dd20a2e..40fa73561f 100644 --- a/plugins/node/opentelemetry-instrumentation-pino/package.json +++ b/plugins/node/opentelemetry-instrumentation-pino/package.json @@ -13,7 +13,6 @@ "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", "lint:readme": "node ../../../scripts/lint-readme.js", - "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-pino --include-dependencies", "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", "version:update": "node ../../../scripts/version-update.js", diff --git a/plugins/node/opentelemetry-instrumentation-redis-4/package.json b/plugins/node/opentelemetry-instrumentation-redis-4/package.json index ef0b363bcd..896cd06516 100644 --- a/plugins/node/opentelemetry-instrumentation-redis-4/package.json +++ b/plugins/node/opentelemetry-instrumentation-redis-4/package.json @@ -18,7 +18,6 @@ "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", "lint:readme": "node ../../../scripts/lint-readme.js", - "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-redis-4 --include-dependencies", "prewatch": "npm run precompile", "version:update": "node ../../../scripts/version-update.js", "compile": "tsc -p .", diff --git a/plugins/node/opentelemetry-instrumentation-redis/package.json b/plugins/node/opentelemetry-instrumentation-redis/package.json index 5cee505817..747686c054 100644 --- a/plugins/node/opentelemetry-instrumentation-redis/package.json +++ b/plugins/node/opentelemetry-instrumentation-redis/package.json @@ -18,7 +18,6 @@ "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", "lint:readme": "node ../../../scripts/lint-readme.js", - "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-redis --include-dependencies", "prewatch": "npm run precompile", "version:update": "node ../../../scripts/version-update.js", "compile": "tsc -p .", diff --git a/plugins/node/opentelemetry-instrumentation-restify/package.json b/plugins/node/opentelemetry-instrumentation-restify/package.json index 02da7d63dd..f7cbb4a672 100644 --- a/plugins/node/opentelemetry-instrumentation-restify/package.json +++ b/plugins/node/opentelemetry-instrumentation-restify/package.json @@ -11,7 +11,6 @@ "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", "lint:readme": "node ../../../scripts/lint-readme.js", - "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-restify --include-dependencies", "prepublishOnly": "npm run compile", "prewatch": "npm run precompile", "tdd": "yarn test -- --watch-extensions ts --watch", diff --git a/plugins/node/opentelemetry-instrumentation-router/package.json b/plugins/node/opentelemetry-instrumentation-router/package.json index f81fcc56a0..7f1c6366f6 100644 --- a/plugins/node/opentelemetry-instrumentation-router/package.json +++ b/plugins/node/opentelemetry-instrumentation-router/package.json @@ -12,7 +12,6 @@ "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", "lint:readme": "node ../../../scripts/lint-readme.js", - "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-router --include-dependencies", "prewatch": "npm run precompile", "version:update": "node ../../../scripts/version-update.js", "compile": "tsc -p .", diff --git a/plugins/node/opentelemetry-instrumentation-winston/package.json b/plugins/node/opentelemetry-instrumentation-winston/package.json index c7390acd82..bdb674e2d7 100644 --- a/plugins/node/opentelemetry-instrumentation-winston/package.json +++ b/plugins/node/opentelemetry-instrumentation-winston/package.json @@ -13,7 +13,6 @@ "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", "lint:readme": "node ../../../scripts/lint-readme.js", - "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-winston --include-dependencies", "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", "version:update": "node ../../../scripts/version-update.js", diff --git a/plugins/web/opentelemetry-instrumentation-document-load/package.json b/plugins/web/opentelemetry-instrumentation-document-load/package.json index d2a18deed6..9a44905613 100644 --- a/plugins/web/opentelemetry-instrumentation-document-load/package.json +++ b/plugins/web/opentelemetry-instrumentation-document-load/package.json @@ -12,7 +12,6 @@ "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", "lint:readme": "node ../../../scripts/lint-readme.js", - "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-document-load --include-dependencies", "prewatch": "npm run precompile", "version:update": "node ../../../scripts/version-update.js", "compile": "tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json", diff --git a/plugins/web/opentelemetry-instrumentation-long-task/package.json b/plugins/web/opentelemetry-instrumentation-long-task/package.json index b9506130dd..a245bcb68c 100644 --- a/plugins/web/opentelemetry-instrumentation-long-task/package.json +++ b/plugins/web/opentelemetry-instrumentation-long-task/package.json @@ -12,7 +12,6 @@ "lint:fix": "eslint . --ext .ts --fix", "lint:readme": "node ../../../scripts/lint-readme.js", "clean": "tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json", - "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-user-interaction --include-dependencies", "prewatch": "npm run precompile", "version:update": "node ../../../scripts/version-update.js", "compile": "tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json", diff --git a/plugins/web/opentelemetry-instrumentation-user-interaction/package.json b/plugins/web/opentelemetry-instrumentation-user-interaction/package.json index def7b99a7a..0b52775d19 100644 --- a/plugins/web/opentelemetry-instrumentation-user-interaction/package.json +++ b/plugins/web/opentelemetry-instrumentation-user-interaction/package.json @@ -12,7 +12,6 @@ "lint:fix": "eslint . --ext .ts --fix", "lint:readme": "node ../../../scripts/lint-readme.js", "clean": "tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json", - "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-user-interaction --include-dependencies", "prewatch": "npm run precompile", "version:update": "node ../../../scripts/version-update.js", "compile": "tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json", diff --git a/plugins/web/opentelemetry-plugin-react-load/package.json b/plugins/web/opentelemetry-plugin-react-load/package.json index 372ef84962..c5b400f31c 100644 --- a/plugins/web/opentelemetry-plugin-react-load/package.json +++ b/plugins/web/opentelemetry-plugin-react-load/package.json @@ -12,7 +12,6 @@ "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", "lint:readme": "node ../../../scripts/lint-readme.js", - "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/plugin-react-load --include-dependencies", "prewatch": "npm run precompile", "version:update": "node ../../../scripts/version-update.js", "compile": "tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json", diff --git a/propagators/opentelemetry-propagator-instana/package.json b/propagators/opentelemetry-propagator-instana/package.json index bb8cbf7b27..acf1554950 100644 --- a/propagators/opentelemetry-propagator-instana/package.json +++ b/propagators/opentelemetry-propagator-instana/package.json @@ -7,7 +7,6 @@ "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js-contrib", "scripts": { - "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/propagator-instana --include-dependencies", "prewatch": "npm run precompile", "compile": "tsc --build tsconfig.json tsconfig.esm.json", "clean": "tsc --build --clean tsconfig.json tsconfig.esm.json", diff --git a/propagators/opentelemetry-propagator-ot-trace/package.json b/propagators/opentelemetry-propagator-ot-trace/package.json index a297f7db45..217868c41e 100644 --- a/propagators/opentelemetry-propagator-ot-trace/package.json +++ b/propagators/opentelemetry-propagator-ot-trace/package.json @@ -7,7 +7,6 @@ "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js-contrib", "scripts": { - "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/propagator-ot-trace --include-dependencies", "prewatch": "npm run precompile", "compile": "tsc --build tsconfig.json tsconfig.esm.json", "clean": "tsc --build --clean tsconfig.json tsconfig.esm.json", From d71f1cc544b5f7032f08aa6070a0a37306847a96 Mon Sep 17 00:00:00 2001 From: David Luna Date: Mon, 21 Oct 2024 09:59:41 +0200 Subject: [PATCH 02/17] chore: rever unit tests workflow --- .github/workflows/unit-test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 4bca0bf8fa..390ceabfb5 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -129,7 +129,7 @@ jobs: - name: Install run: npm ci - name: Build - run: npm run version:update + run: npm run compile - name: Unit tests (Full) if: matrix.code-coverage run: npm run test @@ -167,7 +167,7 @@ jobs: - name: Install run: npm ci - name: Build - run: npm run version:update + run: npm run compile - name: Unit tests run: npm run test:browser - name: Report Coverage From 8fc80349486c00f5f6a3b7b608b3d8fb9a8c7a92 Mon Sep 17 00:00:00 2001 From: David Luna Date: Mon, 21 Oct 2024 10:37:30 +0200 Subject: [PATCH 03/17] chore: fix test:changed script --- package.json | 6 +++--- scripts/update-otel-deps.js | 30 +++++++++++++++++++++++++----- 2 files changed, 28 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index d1b30973ea..9dd1334fbe 100644 --- a/package.json +++ b/package.json @@ -35,12 +35,12 @@ "compile": "nx run-many -t compile", "test": "nx run-many -t test", "test:browser": "nx run-many -t test:browser", - "test:ci:changed": "nx affected -t lint --base=origin/main --head=HEAD", - "test-all-versions": "npm run --if-present --workspaces test-all-versions", + "test:ci:changed": "nx affected -t test --base=origin/main --head=HEAD", + "test-all-versions": "nx run-many -t test-all-versions", "bump": "lerna publish", "changelog": "lerna-changelog", "lint": "nx run-many -t lint && npm run lint:readme && npm run lint:markdown", - "lint:fix": "lerna run lint:fix && npm run lint:markdown:fix", + "lint:fix": "nx run-many -t lint:fix && npm run lint:markdown:fix", "lint:examples": "eslint ./examples/**/*.js", "lint:examples:fix": "eslint ./examples/**/*.js --fix", "lint:markdown": "markdownlint-cli2 $(git ls-files '*.md')", diff --git a/scripts/update-otel-deps.js b/scripts/update-otel-deps.js index 410d6d592b..f23a82f5f0 100755 --- a/scripts/update-otel-deps.js +++ b/scripts/update-otel-deps.js @@ -331,12 +331,32 @@ function updateNpmWorkspacesDeps({patterns, allowRangeBumpFor0x, dryRun}) { ); } -async function main() { - updateNpmWorkspacesDeps({ - patterns: ['@opentelemetry/*'], - allowRangeBumpFor0x: true, - dryRun: false, +function removePrecompile() { + const dirs = getAllWorkspaceDirs(); + + dirs.forEach(d => { + const pkgPath = path.join(d, 'package.json'); + const pkgText = fs.readFileSync(pkgPath, 'utf-8'); + const pkgLines = pkgText.split('\n'); + + const removeIndex = pkgLines.findIndex(l => l.indexOf('"precompile":') !== -1) + const shouldRemove = removeIndex !== -1; + + console.log(d, removeIndex) + if (shouldRemove) { + pkgLines.splice(removeIndex, 1); + fs.writeFileSync(pkgPath, pkgLines.join('\n'), 'utf-8'); + } }); } +async function main() { + // updateNpmWorkspacesDeps({ + // patterns: ['@opentelemetry/*'], + // allowRangeBumpFor0x: true, + // dryRun: false, + // }); + removePrecompile(); +} + main(); From 8c9ec9a4fc0d473c27bb1f04383512fca9fb3c76 Mon Sep 17 00:00:00 2001 From: David Luna Date: Mon, 21 Oct 2024 11:52:56 +0200 Subject: [PATCH 04/17] chore: add compile cache to unit tests --- .github/workflows/unit-test.yml | 34 +++++++++++++++++++++++++++++++-- package-lock.json | 2 ++ 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 390ceabfb5..f51445139d 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -5,7 +5,26 @@ on: pull_request: jobs: + build-with-cache: + strategy: + fail-fast: false + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: actions/setup-node@v4 + with: + node-version: 16 + - name: Install + run: npm ci + - name: Build with Cache + run: | + echo "setting cache dir to $(npm get cache)/$GITHUB_REF_NAME" + NX_CACHE_DIRECTORY=$(npm get cache)/$GITHUB_REF_NAME npm run compile unit-test: + needs: build-with-cache strategy: fail-fast: false matrix: @@ -129,7 +148,7 @@ jobs: - name: Install run: npm ci - name: Build - run: npm run compile + run: npm run compile:ci - name: Unit tests (Full) if: matrix.code-coverage run: npm run test @@ -145,6 +164,7 @@ jobs: verbose: true browser-test: + needs: build-with-cache strategy: fail-fast: false matrix: @@ -167,7 +187,7 @@ jobs: - name: Install run: npm ci - name: Build - run: npm run compile + run: npm run compile:ci - name: Unit tests run: npm run test:browser - name: Report Coverage @@ -176,3 +196,13 @@ jobs: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} with: verbose: true + empty-cache: + needs: [unit-test, browser-test] + strategy: + fail-fast: false + runs-on: ubuntu-latest + steps: + - name: Clear Build Cache + run: | + echo "deleting cache dir $(npm get cache)/$GITHUB_REF_NAME" + rm -rf $(npm get cache)/$GITHUB_REF_NAME diff --git a/package-lock.json b/package-lock.json index e544c36ecd..659f968be9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -184,6 +184,7 @@ "devDependencies": { "@opentelemetry/api": "^1.0.0", "@opentelemetry/contrib-test-utils": "^0.41.0", + "@opentelemetry/instrumentation-fs": "*", "@types/mocha": "8.2.3", "@types/node": "18.18.14", "@types/sinon": "10.0.20", @@ -55211,6 +55212,7 @@ "@opentelemetry/api": "^1.0.0", "@opentelemetry/contrib-test-utils": "^0.41.0", "@opentelemetry/core": "^1.26.0", + "@opentelemetry/instrumentation-fs": "*", "@opentelemetry/resources": "^1.10.0", "@opentelemetry/semantic-conventions": "^1.27.0", "@types/mocha": "8.2.3", From 858fa77fdece424d4ac04b76aaf5406698904ee1 Mon Sep 17 00:00:00 2001 From: David Luna Date: Mon, 21 Oct 2024 12:05:51 +0200 Subject: [PATCH 05/17] chore: fix compile task in unit tests --- .github/workflows/unit-test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index f51445139d..64738d7cb2 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -148,7 +148,7 @@ jobs: - name: Install run: npm ci - name: Build - run: npm run compile:ci + run: npm run compile - name: Unit tests (Full) if: matrix.code-coverage run: npm run test @@ -187,7 +187,7 @@ jobs: - name: Install run: npm ci - name: Build - run: npm run compile:ci + run: npm run compile - name: Unit tests run: npm run test:browser - name: Report Coverage From e5c6bb73e2dae58b7e22c700f5cb5c68a455a931 Mon Sep 17 00:00:00 2001 From: David Luna Date: Mon, 21 Oct 2024 12:21:38 +0200 Subject: [PATCH 06/17] chore: setup cache in test jobs --- .github/workflows/unit-test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 64738d7cb2..91f9096cb6 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -148,7 +148,7 @@ jobs: - name: Install run: npm ci - name: Build - run: npm run compile + run: NX_CACHE_DIRECTORY=$(npm get cache)/$GITHUB_REF_NAME npm run compile - name: Unit tests (Full) if: matrix.code-coverage run: npm run test @@ -187,7 +187,7 @@ jobs: - name: Install run: npm ci - name: Build - run: npm run compile + run: NX_CACHE_DIRECTORY=$(npm get cache)/$GITHUB_REF_NAME npm run compile - name: Unit tests run: npm run test:browser - name: Report Coverage From 97e769581d0523966f3cd51c38259121513b42de Mon Sep 17 00:00:00 2001 From: David Luna Date: Mon, 21 Oct 2024 12:55:29 +0200 Subject: [PATCH 07/17] chore: rever cache in unit-test workflow --- .github/workflows/unit-test.yml | 34 ++------------------------------- 1 file changed, 2 insertions(+), 32 deletions(-) diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 91f9096cb6..390ceabfb5 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -5,26 +5,7 @@ on: pull_request: jobs: - build-with-cache: - strategy: - fail-fast: false - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - uses: actions/setup-node@v4 - with: - node-version: 16 - - name: Install - run: npm ci - - name: Build with Cache - run: | - echo "setting cache dir to $(npm get cache)/$GITHUB_REF_NAME" - NX_CACHE_DIRECTORY=$(npm get cache)/$GITHUB_REF_NAME npm run compile unit-test: - needs: build-with-cache strategy: fail-fast: false matrix: @@ -148,7 +129,7 @@ jobs: - name: Install run: npm ci - name: Build - run: NX_CACHE_DIRECTORY=$(npm get cache)/$GITHUB_REF_NAME npm run compile + run: npm run compile - name: Unit tests (Full) if: matrix.code-coverage run: npm run test @@ -164,7 +145,6 @@ jobs: verbose: true browser-test: - needs: build-with-cache strategy: fail-fast: false matrix: @@ -187,7 +167,7 @@ jobs: - name: Install run: npm ci - name: Build - run: NX_CACHE_DIRECTORY=$(npm get cache)/$GITHUB_REF_NAME npm run compile + run: npm run compile - name: Unit tests run: npm run test:browser - name: Report Coverage @@ -196,13 +176,3 @@ jobs: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} with: verbose: true - empty-cache: - needs: [unit-test, browser-test] - strategy: - fail-fast: false - runs-on: ubuntu-latest - steps: - - name: Clear Build Cache - run: | - echo "deleting cache dir $(npm get cache)/$GITHUB_REF_NAME" - rm -rf $(npm get cache)/$GITHUB_REF_NAME From 83781d0ada27b57553cb2a133f57e65ea233572e Mon Sep 17 00:00:00 2001 From: David Luna Date: Mon, 21 Oct 2024 15:22:35 +0200 Subject: [PATCH 08/17] chore: use actions to upload/download artifacts --- .github/workflows/unit-test.yml | 38 +++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 390ceabfb5..15cd5fb1e3 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -5,7 +5,34 @@ on: pull_request: jobs: + build: + strategy: + fail-fast: false + runs-on: ubuntu-latest + env: + NPM_CONFIG_UNSAFE_PERM: true + NODE_OPTIONS: --max-old-space-size=4096 + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: actions/setup-node@v4 + with: + node-version: 16 + - name: Install + run: npm ci + - name: Build + run: npm run compile + - name: Upload build artifact + uses: actions/upload-artifact@v4 + with: + name: build-cache-${{ github.ref_name }} + path: node_modules/.cache/nx + retention-days: 1 + unit-test: + needs: build strategy: fail-fast: false matrix: @@ -128,6 +155,11 @@ jobs: run: npm install -g npm@9 # npm@9 supports node >=14.17.0 - name: Install run: npm ci + - name: Dowload Artifacts + uses: actions/download-artifact@v4 + with: + name: $build-cache-${{ github.ref_name }} + path: node_modules/.cache/nx - name: Build run: npm run compile - name: Unit tests (Full) @@ -145,6 +177,7 @@ jobs: verbose: true browser-test: + needs: build strategy: fail-fast: false matrix: @@ -166,6 +199,11 @@ jobs: run: npm install -g npm@9 # npm@9 supports node >=14.17.0 - name: Install run: npm ci + - name: Dowload Artifacts + uses: actions/download-artifact@v4 + with: + name: $build-cache-${{ github.ref_name }} + path: node_modules/.cache/nx - name: Build run: npm run compile - name: Unit tests From 16122d539880cc1aa51b73820701885b387fe4fc Mon Sep 17 00:00:00 2001 From: David Luna Date: Mon, 21 Oct 2024 15:46:37 +0200 Subject: [PATCH 09/17] chore: change cache name --- .github/workflows/unit-test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 15cd5fb1e3..6fcf025fe9 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -27,7 +27,7 @@ jobs: - name: Upload build artifact uses: actions/upload-artifact@v4 with: - name: build-cache-${{ github.ref_name }} + name: build-cache-${{ github.run_number }} path: node_modules/.cache/nx retention-days: 1 @@ -158,7 +158,7 @@ jobs: - name: Dowload Artifacts uses: actions/download-artifact@v4 with: - name: $build-cache-${{ github.ref_name }} + name: $build-cache-${{ github.run_number }} path: node_modules/.cache/nx - name: Build run: npm run compile @@ -202,7 +202,7 @@ jobs: - name: Dowload Artifacts uses: actions/download-artifact@v4 with: - name: $build-cache-${{ github.ref_name }} + name: $build-cache-${{ github.run_number }} path: node_modules/.cache/nx - name: Build run: npm run compile From f062d990f8c9c4d9e1c868353716bb3ae07422a6 Mon Sep 17 00:00:00 2001 From: David Luna Date: Mon, 21 Oct 2024 16:26:02 +0200 Subject: [PATCH 10/17] chore: fix cache name --- .github/workflows/unit-test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 6fcf025fe9..5235c50028 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -158,7 +158,7 @@ jobs: - name: Dowload Artifacts uses: actions/download-artifact@v4 with: - name: $build-cache-${{ github.run_number }} + name: build-cache-${{ github.run_number }} path: node_modules/.cache/nx - name: Build run: npm run compile @@ -202,7 +202,7 @@ jobs: - name: Dowload Artifacts uses: actions/download-artifact@v4 with: - name: $build-cache-${{ github.run_number }} + name: build-cache-${{ github.run_number }} path: node_modules/.cache/nx - name: Build run: npm run compile From 6acd05111753e877360db93ad57b5c8325284883 Mon Sep 17 00:00:00 2001 From: David Luna Date: Mon, 21 Oct 2024 16:58:14 +0200 Subject: [PATCH 11/17] chore: add cache to TAV workflow --- .github/workflows/test-all-versions.yml | 31 +++++++++++++++++++++++++ .github/workflows/unit-test.yml | 2 +- 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-all-versions.yml b/.github/workflows/test-all-versions.yml index 4d7f2b0ffd..8508d533cd 100644 --- a/.github/workflows/test-all-versions.yml +++ b/.github/workflows/test-all-versions.yml @@ -13,6 +13,32 @@ on: type: string jobs: + build: + strategy: + fail-fast: false + runs-on: ubuntu-latest + env: + NPM_CONFIG_UNSAFE_PERM: true + NODE_OPTIONS: --max-old-space-size=4096 + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: actions/setup-node@v4 + with: + node-version: 16 + - name: Install + run: npm ci + - name: Build + run: npm run compile + - name: Upload Build Artifacts + uses: actions/upload-artifact@v4 + with: + name: build-cache-${{ github.run_number }} + path: node_modules/.cache/nx + retention-days: 1 + tav: name: Run test-all-versions strategy: @@ -120,6 +146,11 @@ jobs: run: npm install -g npm@9 # npm@9 supports node >=14.17.0 - name: Install run: npm ci + - name: Download Build Artifacts + uses: actions/download-artifact@v4 + with: + name: build-cache-${{ github.run_number }} + path: node_modules/.cache/nx - name: Build run: npm run compile - name: Run test-all-versions diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 5235c50028..0124399b01 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -155,7 +155,7 @@ jobs: run: npm install -g npm@9 # npm@9 supports node >=14.17.0 - name: Install run: npm ci - - name: Dowload Artifacts + - name: Download Build Artifacts uses: actions/download-artifact@v4 with: name: build-cache-${{ github.run_number }} From b1819357cf2afe52ab411fe945482279db4651ee Mon Sep 17 00:00:00 2001 From: David Luna Date: Mon, 21 Oct 2024 17:00:49 +0200 Subject: [PATCH 12/17] chore: use different cache names between unti tests and TAV --- .github/workflows/test-all-versions.yml | 4 ++-- .github/workflows/unit-test.yml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test-all-versions.yml b/.github/workflows/test-all-versions.yml index 8508d533cd..25576ecf5d 100644 --- a/.github/workflows/test-all-versions.yml +++ b/.github/workflows/test-all-versions.yml @@ -35,7 +35,7 @@ jobs: - name: Upload Build Artifacts uses: actions/upload-artifact@v4 with: - name: build-cache-${{ github.run_number }} + name: tav-build-cache-${{ github.run_number }} path: node_modules/.cache/nx retention-days: 1 @@ -149,7 +149,7 @@ jobs: - name: Download Build Artifacts uses: actions/download-artifact@v4 with: - name: build-cache-${{ github.run_number }} + name: tav-build-cache-${{ github.run_number }} path: node_modules/.cache/nx - name: Build run: npm run compile diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 0124399b01..4d5fad104c 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -27,7 +27,7 @@ jobs: - name: Upload build artifact uses: actions/upload-artifact@v4 with: - name: build-cache-${{ github.run_number }} + name: tests-build-cache-${{ github.run_number }} path: node_modules/.cache/nx retention-days: 1 @@ -158,7 +158,7 @@ jobs: - name: Download Build Artifacts uses: actions/download-artifact@v4 with: - name: build-cache-${{ github.run_number }} + name: tests-build-cache-${{ github.run_number }} path: node_modules/.cache/nx - name: Build run: npm run compile @@ -202,7 +202,7 @@ jobs: - name: Dowload Artifacts uses: actions/download-artifact@v4 with: - name: build-cache-${{ github.run_number }} + name: tests-build-cache-${{ github.run_number }} path: node_modules/.cache/nx - name: Build run: npm run compile From 6b5df3042b3c3dd62582e1acc6c3bcd39a5d63fd Mon Sep 17 00:00:00 2001 From: David Luna Date: Mon, 21 Oct 2024 17:05:45 +0200 Subject: [PATCH 13/17] chore: add dependency between jobs in TAV workflow --- .github/workflows/test-all-versions.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test-all-versions.yml b/.github/workflows/test-all-versions.yml index 25576ecf5d..4425c17989 100644 --- a/.github/workflows/test-all-versions.yml +++ b/.github/workflows/test-all-versions.yml @@ -41,6 +41,7 @@ jobs: tav: name: Run test-all-versions + needs: build strategy: fail-fast: false matrix: From 6cec5543a8af9586fa6dbf55bb2a7106b9ff859a Mon Sep 17 00:00:00 2001 From: David Luna Date: Mon, 21 Oct 2024 22:53:12 +0200 Subject: [PATCH 14/17] chore: remove old scripts --- package.json | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/package.json b/package.json index 9dd1334fbe..e7e2004e90 100644 --- a/package.json +++ b/package.json @@ -12,32 +12,13 @@ "main": "build/src/index.js", "types": "build/src/index.d.ts", "scripts": { - "lerna:clean": "lerna run clean", - "lerna:precompile": "tsc --version && npm run version:update", - "lerna:version:update": "lerna run version:update", - "lerna:compile": "lerna run compile", - "lerna:prewatch": "npm run precompile", - "lerna:test": "lerna run test", - "lerna:test:ci:changed": "lerna run test --since origin/main", - "lerna:test:browser": "lerna run test:browser --concurrency 1", - "lerna:test-all-versions": "npm run --if-present --workspaces test-all-versions", - "lerna:bump": "lerna publish", - "lerna:changelog": "lerna-changelog", - "lerna:lint": "lerna run lint && npm run lint:readme && npm run lint:markdown", - "lerna:lint:fix": "lerna run lint:fix && npm run lint:markdown:fix", - "lerna:lint:examples": "eslint ./examples/**/*.js", - "lerna:lint:examples:fix": "eslint ./examples/**/*.js --fix", - "lerna:lint:markdown": "markdownlint-cli2 $(git ls-files '*.md')", - "lerna:lint:markdown:fix": "markdownlint-cli2 --fix $(git ls-files '*.md')", - "lerna:lint:readme": "lerna run lint:readme", - "// NEW SECTION OF SCRIPTS WITH NX": "", "clean": "nx run-many -t clean", + "version:update": "nx run-many -t version:update", "compile": "nx run-many -t compile", "test": "nx run-many -t test", "test:browser": "nx run-many -t test:browser", "test:ci:changed": "nx affected -t test --base=origin/main --head=HEAD", "test-all-versions": "nx run-many -t test-all-versions", - "bump": "lerna publish", "changelog": "lerna-changelog", "lint": "nx run-many -t lint && npm run lint:readme && npm run lint:markdown", "lint:fix": "nx run-many -t lint:fix && npm run lint:markdown:fix", @@ -45,8 +26,7 @@ "lint:examples:fix": "eslint ./examples/**/*.js --fix", "lint:markdown": "markdownlint-cli2 $(git ls-files '*.md')", "lint:markdown:fix": "markdownlint-cli2 --fix $(git ls-files '*.md')", - "lint:readme": "nx run-many -t lint:readme", - "version:update": "nx run-many -t version:update" + "lint:readme": "nx run-many -t lint:readme" }, "keywords": [ "opentelemetry", From 437637edda11e555a313337da93bc702e4458695 Mon Sep 17 00:00:00 2001 From: David Luna Date: Tue, 22 Oct 2024 09:32:58 +0200 Subject: [PATCH 15/17] chore: restore script --- scripts/update-otel-deps.js | 30 +++++------------------------- 1 file changed, 5 insertions(+), 25 deletions(-) diff --git a/scripts/update-otel-deps.js b/scripts/update-otel-deps.js index f23a82f5f0..410d6d592b 100755 --- a/scripts/update-otel-deps.js +++ b/scripts/update-otel-deps.js @@ -331,32 +331,12 @@ function updateNpmWorkspacesDeps({patterns, allowRangeBumpFor0x, dryRun}) { ); } -function removePrecompile() { - const dirs = getAllWorkspaceDirs(); - - dirs.forEach(d => { - const pkgPath = path.join(d, 'package.json'); - const pkgText = fs.readFileSync(pkgPath, 'utf-8'); - const pkgLines = pkgText.split('\n'); - - const removeIndex = pkgLines.findIndex(l => l.indexOf('"precompile":') !== -1) - const shouldRemove = removeIndex !== -1; - - console.log(d, removeIndex) - if (shouldRemove) { - pkgLines.splice(removeIndex, 1); - fs.writeFileSync(pkgPath, pkgLines.join('\n'), 'utf-8'); - } - }); -} - async function main() { - // updateNpmWorkspacesDeps({ - // patterns: ['@opentelemetry/*'], - // allowRangeBumpFor0x: true, - // dryRun: false, - // }); - removePrecompile(); + updateNpmWorkspacesDeps({ + patterns: ['@opentelemetry/*'], + allowRangeBumpFor0x: true, + dryRun: false, + }); } main(); From cef08476ba9d1e83065eeef294fa0b7366e5bbe5 Mon Sep 17 00:00:00 2001 From: David Luna Date: Thu, 31 Oct 2024 16:48:10 +0100 Subject: [PATCH 16/17] chore: add missing dev dependencies --- .github/workflows/test-all-versions.yml | 4 ++-- .github/workflows/unit-test.yml | 6 +++--- .../node/opentelemetry-resource-detector-aws/package.json | 2 ++ .../node/opentelemetry-resource-detector-azure/package.json | 1 + .../opentelemetry-resource-detector-container/package.json | 2 +- .../node/opentelemetry-resource-detector-gcp/package.json | 1 + 6 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test-all-versions.yml b/.github/workflows/test-all-versions.yml index 4425c17989..5603746428 100644 --- a/.github/workflows/test-all-versions.yml +++ b/.github/workflows/test-all-versions.yml @@ -13,7 +13,7 @@ on: type: string jobs: - build: + build-and-cache: strategy: fail-fast: false runs-on: ubuntu-latest @@ -41,7 +41,7 @@ jobs: tav: name: Run test-all-versions - needs: build + needs: build-and-cache strategy: fail-fast: false matrix: diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 4d5fad104c..8fb209d690 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -5,7 +5,7 @@ on: pull_request: jobs: - build: + build-and-cache: strategy: fail-fast: false runs-on: ubuntu-latest @@ -32,7 +32,7 @@ jobs: retention-days: 1 unit-test: - needs: build + needs: build-and-cache strategy: fail-fast: false matrix: @@ -177,7 +177,7 @@ jobs: verbose: true browser-test: - needs: build + needs: build-and-cache strategy: fail-fast: false matrix: diff --git a/detectors/node/opentelemetry-resource-detector-aws/package.json b/detectors/node/opentelemetry-resource-detector-aws/package.json index 3033618600..0a8602ffbf 100644 --- a/detectors/node/opentelemetry-resource-detector-aws/package.json +++ b/detectors/node/opentelemetry-resource-detector-aws/package.json @@ -39,6 +39,8 @@ "devDependencies": { "@opentelemetry/api": "^1.0.0", "@opentelemetry/contrib-test-utils": "^0.42.0", + "@opentelemetry/instrumentation-fs": "^0.16.0", + "@opentelemetry/instrumentation-http": "^0.54.0", "@types/mocha": "8.2.3", "@types/node": "18.18.14", "@types/sinon": "10.0.20", diff --git a/detectors/node/opentelemetry-resource-detector-azure/package.json b/detectors/node/opentelemetry-resource-detector-azure/package.json index 250b005b42..5badf125ec 100644 --- a/detectors/node/opentelemetry-resource-detector-azure/package.json +++ b/detectors/node/opentelemetry-resource-detector-azure/package.json @@ -32,6 +32,7 @@ "devDependencies": { "@opentelemetry/api": "^1.0.0", "@opentelemetry/contrib-test-utils": "^0.42.0", + "@opentelemetry/instrumentation-http": "^0.54.0", "@types/mocha": "8.2.3", "@types/node": "18.18.14", "@types/sinon": "10.0.20", diff --git a/detectors/node/opentelemetry-resource-detector-container/package.json b/detectors/node/opentelemetry-resource-detector-container/package.json index c4de7d8422..d27c5b659e 100644 --- a/detectors/node/opentelemetry-resource-detector-container/package.json +++ b/detectors/node/opentelemetry-resource-detector-container/package.json @@ -33,7 +33,7 @@ "devDependencies": { "@opentelemetry/api": "^1.0.0", "@opentelemetry/contrib-test-utils": "^0.42.0", - "@opentelemetry/instrumentation-fs": "*", + "@opentelemetry/instrumentation-fs": "^0.16.0", "@types/mocha": "8.2.3", "@types/node": "18.18.14", "@types/sinon": "10.0.20", diff --git a/detectors/node/opentelemetry-resource-detector-gcp/package.json b/detectors/node/opentelemetry-resource-detector-gcp/package.json index d2eb702e4d..1199a0c8ed 100644 --- a/detectors/node/opentelemetry-resource-detector-gcp/package.json +++ b/detectors/node/opentelemetry-resource-detector-gcp/package.json @@ -39,6 +39,7 @@ "devDependencies": { "@opentelemetry/api": "^1.0.0", "@opentelemetry/contrib-test-utils": "^0.42.0", + "@opentelemetry/instrumentation-http": "^0.54.0", "@types/mocha": "8.2.3", "@types/node": "18.18.14", "@types/semver": "7.5.8", From 3ad305c51aaf37582007b895e66639d44deab680 Mon Sep 17 00:00:00 2001 From: David Luna Date: Tue, 5 Nov 2024 11:35:54 +0100 Subject: [PATCH 17/17] chore: update node versions in test workflows --- .github/workflows/release-please.yml | 3 +++ .github/workflows/test-all-versions.yml | 3 ++- .github/workflows/unit-test.yml | 5 +++-- nx.json | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 259069339c..529ce9257e 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -16,6 +16,9 @@ jobs: with: fetch-depth: 0 + # If you update this version make sure to keep in sync: + # - `build-and-cache` job of unit-test workflow + # - `build-and-cache` job of test-all-versions workflow - name: Setup Node uses: actions/setup-node@v4 with: diff --git a/.github/workflows/test-all-versions.yml b/.github/workflows/test-all-versions.yml index 5603746428..2433cf5c9f 100644 --- a/.github/workflows/test-all-versions.yml +++ b/.github/workflows/test-all-versions.yml @@ -25,9 +25,10 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 + # Use the same Node.js version used for `release-please` workflow. - uses: actions/setup-node@v4 with: - node-version: 16 + node-version: 18 - name: Install run: npm ci - name: Build diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 8fb209d690..4e6b92b3fd 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -17,9 +17,10 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 + # Use the same Node.js version used for `release-please` workflow. - uses: actions/setup-node@v4 with: - node-version: 16 + node-version: 18 - name: Install run: npm ci - name: Build @@ -199,7 +200,7 @@ jobs: run: npm install -g npm@9 # npm@9 supports node >=14.17.0 - name: Install run: npm ci - - name: Dowload Artifacts + - name: Download Build Artifacts uses: actions/download-artifact@v4 with: name: tests-build-cache-${{ github.run_number }} diff --git a/nx.json b/nx.json index 749bcb13d4..6d80c55ce6 100644 --- a/nx.json +++ b/nx.json @@ -40,4 +40,4 @@ ] } } -} \ No newline at end of file +}