From 96b64b292af00b7c86db88dedccdde8abad8d5b3 Mon Sep 17 00:00:00 2001 From: Daniel Dyla Date: Mon, 14 Dec 2020 15:28:51 -0500 Subject: [PATCH] chore: speed up builds - copy protos in postcompile - separate tsconfig for docs - add backwards compatibility check to regular build - bump version.ts as part of version change --- .github/workflows/backcompat.yml | 36 ------ .github/workflows/docs.yml | 11 +- .github/workflows/lint.yml | 10 +- .github/workflows/unit-test.yml | 4 + .github/workflows/w3c-integration-test.yml | 8 +- backwards-compatability/node10/tsconfig.json | 19 +++ backwards-compatability/node12/tsconfig.json | 19 +++ backwards-compatability/node8/tsconfig.json | 19 +++ .../package.json | 6 + .../tsconfig.json | 22 ++++ package.json | 15 +-- packages/opentelemetry-api/package.json | 9 +- packages/opentelemetry-api/tsconfig.docs.json | 15 +++ packages/opentelemetry-api/tsconfig.json | 13 +- .../package.json | 8 +- .../tsconfig.json | 7 +- .../opentelemetry-context-base/package.json | 8 +- .../opentelemetry-context-base/tsconfig.json | 2 +- .../package.json | 7 +- .../tsconfig.json | 11 +- .../opentelemetry-context-zone/package.json | 7 +- .../opentelemetry-context-zone/tsconfig.json | 11 +- packages/opentelemetry-core/package.json | 8 +- .../trace/fixtures/test-package/package.json | 2 + packages/opentelemetry-core/tsconfig.json | 13 +- .../package.json | 8 +- .../tsconfig.json | 22 +++- .../package.json | 8 +- .../tsconfig.json | 22 +++- .../package.json | 8 +- .../tsconfig.json | 19 ++- .../package.json | 8 +- .../tsconfig.json | 16 ++- .../package.json | 8 +- .../tsconfig.json | 13 +- .../package.json | 8 +- .../tsconfig.json | 16 ++- .../opentelemetry-grpc-utils/package.json | 8 +- .../opentelemetry-grpc-utils/tsconfig.json | 25 +++- .../package.json | 8 +- .../tsconfig.json | 28 ++++- .../package.json | 8 +- .../tsconfig.json | 28 ++++- .../package.json | 8 +- .../tsconfig.json | 7 +- packages/opentelemetry-metrics/package.json | 8 +- packages/opentelemetry-metrics/tsconfig.json | 13 +- packages/opentelemetry-node/package.json | 8 +- packages/opentelemetry-node/tsconfig.json | 22 +++- .../opentelemetry-plugin-fetch/package.json | 8 +- .../opentelemetry-plugin-fetch/tsconfig.json | 22 +++- .../opentelemetry-plugin-grpc-js/package.json | 8 +- .../tsconfig.json | 28 ++++- .../opentelemetry-plugin-grpc/package.json | 8 +- .../opentelemetry-plugin-grpc/tsconfig.json | 28 ++++- .../opentelemetry-plugin-http/package.json | 8 +- .../opentelemetry-plugin-http/tsconfig.json | 25 +++- .../opentelemetry-plugin-https/package.json | 8 +- .../opentelemetry-plugin-https/tsconfig.json | 28 ++++- .../opentelemetry-propagator-b3/package.json | 9 +- .../opentelemetry-propagator-b3/tsconfig.json | 10 +- .../package.json | 8 +- .../tsconfig.json | 18 ++- .../package.json | 8 +- .../tsconfig.json | 15 ++- packages/opentelemetry-resources/package.json | 8 +- .../opentelemetry-resources/tsconfig.json | 15 ++- packages/opentelemetry-sdk-node/package.json | 8 +- packages/opentelemetry-sdk-node/tsconfig.json | 34 +++++- .../package.json | 8 +- .../tsconfig.json | 2 +- .../package.json | 8 +- .../tsconfig.json | 13 +- packages/opentelemetry-tracing/package.json | 8 +- packages/opentelemetry-tracing/tsconfig.json | 19 ++- packages/opentelemetry-web/package.json | 8 +- packages/opentelemetry-web/tsconfig.json | 31 ++++- .../tsconfig.base.json => tsconfig.base.json | 1 + .../tsconfig.es5.json => tsconfig.es5.json | 0 tsconfig.json | 114 ++++++++++++++++++ 80 files changed, 880 insertions(+), 253 deletions(-) delete mode 100644 .github/workflows/backcompat.yml create mode 100644 backwards-compatability/node10/tsconfig.json create mode 100644 backwards-compatability/node12/tsconfig.json create mode 100644 backwards-compatability/node8/tsconfig.json create mode 100644 integration-tests/propagation-validation-server/tsconfig.json create mode 100644 packages/opentelemetry-api/tsconfig.docs.json rename packages/tsconfig.base.json => tsconfig.base.json (95%) rename packages/tsconfig.es5.json => tsconfig.es5.json (100%) create mode 100644 tsconfig.json diff --git a/.github/workflows/backcompat.yml b/.github/workflows/backcompat.yml deleted file mode 100644 index 93ef7428e28..00000000000 --- a/.github/workflows/backcompat.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: Backwards Compatability - -on: - push: - branches: [master] - pull_request: - -jobs: - types-node: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - - name: restore lerna - uses: actions/cache@master # must use unreleased master to cache multiple paths - id: cache - with: - path: | - node_modules - packages/*/node_modules - metapackages/*/node_modules - key: ${{ runner.os }}-${{ hashFiles('**/package.json') }} - - - name: Bootstrap - if: steps.cache.outputs.cache-hit != 'true' - run: | - npm install --only=dev --ignore-scripts - npx lerna bootstrap --no-ci --ignore-scripts -- --only=dev - - - name: Install and Build API Dependencies - run: npx lerna bootstrap --no-ci --scope backcompat-* --include-filtered-dependencies - - - name: - run: | - npm run test:backcompat diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index c7c67816fd7..9ed8ba8fbee 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -11,11 +11,14 @@ jobs: - name: Checkout 🛎️ uses: actions/checkout@v2 - - name: Install and Build 🔧 - run: | + - name: Install Dependencies npm install --ignore-scripts - npx lerna bootstrap --scope @opentelemetry/api --include-filtered-dependencies - npm run docs + npx lerna bootstrap --no-ci --scope @opentelemetry/api --include-dependencies + + - name: Build 🔧 + run: | + npx lerna run compile --scope @opentelemetry/api + npx lerna run docs - name: Deploy 🚀 uses: JamesIves/github-pages-deploy-action@releases/v3 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index f24f2dd2c51..29d432d5ed1 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -48,8 +48,14 @@ jobs: npm run lint npm run lint:examples - - name: Install and Build API Dependencies - run: npx lerna bootstrap --no-ci --scope @opentelemetry/api --include-filtered-dependencies + - name: Install API Dependencies + npm install --ignore-scripts + npx lerna bootstrap --no-ci --scope @opentelemetry/api --include-dependencies + + - name: Build API 🔧 + run: | + npx lerna run compile --scope @opentelemetry/api + npx lerna run docs - name: Test Docs run: npm run docs-test diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index a9e94981c43..d40859a1337 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -30,6 +30,8 @@ jobs: run: npm install --ignore-scripts - name: Boostrap Dependencies run: npx lerna bootstrap --no-ci + - name: Build + run: npm run compile - name: Unit tests run: npm run test - name: Report Coverage @@ -58,6 +60,8 @@ jobs: run: npm install --ignore-scripts - name: Boostrap Dependencies run: npx lerna bootstrap --no-ci + - name: Build + run: npm run compile - name: Unit tests run: npm run test:browser - name: Report Coverage diff --git a/.github/workflows/w3c-integration-test.yml b/.github/workflows/w3c-integration-test.yml index 4a1864d93ed..2ac16c3e461 100644 --- a/.github/workflows/w3c-integration-test.yml +++ b/.github/workflows/w3c-integration-test.yml @@ -12,10 +12,14 @@ jobs: - name: Checkout 🛎️ uses: actions/checkout@v2 - - name: Install and Build 🔧 + - name: Install run: | npm install --ignore-scripts - npx lerna bootstrap --scope=propagation-validation-server --include-dependencies + npx lerna bootstrap --no-ci --scope=propagation-validation-server --include-dependencies + + - name: Build 🔧 + run: npm run compile + working-directory: ./integration-tests/propagation-validation-server - name: Run W3C Test harness run: ./integration-tests/tracecontext-integration-test.sh diff --git a/backwards-compatability/node10/tsconfig.json b/backwards-compatability/node10/tsconfig.json new file mode 100644 index 00000000000..6ac9f474bd2 --- /dev/null +++ b/backwards-compatability/node10/tsconfig.json @@ -0,0 +1,19 @@ +{ + "extends": "../../tsconfig.es5.json", + "compilerOptions": { + "rootDir": ".", + "outDir": "build" + }, + "include": [ + "index.ts" + ], + "references": [ + { + "path": "../../packages/opentelemetry-sdk-node" + }, + { + "path": "../../packages/opentelemetry-tracing" + } + ] + } + \ No newline at end of file diff --git a/backwards-compatability/node12/tsconfig.json b/backwards-compatability/node12/tsconfig.json new file mode 100644 index 00000000000..6ac9f474bd2 --- /dev/null +++ b/backwards-compatability/node12/tsconfig.json @@ -0,0 +1,19 @@ +{ + "extends": "../../tsconfig.es5.json", + "compilerOptions": { + "rootDir": ".", + "outDir": "build" + }, + "include": [ + "index.ts" + ], + "references": [ + { + "path": "../../packages/opentelemetry-sdk-node" + }, + { + "path": "../../packages/opentelemetry-tracing" + } + ] + } + \ No newline at end of file diff --git a/backwards-compatability/node8/tsconfig.json b/backwards-compatability/node8/tsconfig.json new file mode 100644 index 00000000000..6ac9f474bd2 --- /dev/null +++ b/backwards-compatability/node8/tsconfig.json @@ -0,0 +1,19 @@ +{ + "extends": "../../tsconfig.es5.json", + "compilerOptions": { + "rootDir": ".", + "outDir": "build" + }, + "include": [ + "index.ts" + ], + "references": [ + { + "path": "../../packages/opentelemetry-sdk-node" + }, + { + "path": "../../packages/opentelemetry-tracing" + } + ] + } + \ No newline at end of file diff --git a/integration-tests/propagation-validation-server/package.json b/integration-tests/propagation-validation-server/package.json index 673a6cd08f6..cd7e5c5155f 100644 --- a/integration-tests/propagation-validation-server/package.json +++ b/integration-tests/propagation-validation-server/package.json @@ -7,6 +7,9 @@ "repository": "open-telemetry/opentelemetry-js", "author": "OpenTelemetry Authors", "license": "Apache-2.0", + "scripts": { + "compile": "tsc --build" + }, "dependencies": { "@opentelemetry/api": "^0.13.0", "@opentelemetry/context-async-hooks": "^0.13.0", @@ -15,5 +18,8 @@ "axios": "0.21.0", "body-parser": "1.19.0", "express": "4.17.1" + }, + "devDependencies": { + "typescript": "3.9.7" } } diff --git a/integration-tests/propagation-validation-server/tsconfig.json b/integration-tests/propagation-validation-server/tsconfig.json new file mode 100644 index 00000000000..187a1228e97 --- /dev/null +++ b/integration-tests/propagation-validation-server/tsconfig.json @@ -0,0 +1,22 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "rootDir": ".", + "outDir": "build" + }, + "include": [], + "references": [ + { + "path": "../../packages/opentelemetry-api" + }, + { + "path": "../../packages/opentelemetry-context-async-hooks" + }, + { + "path": "../../packages/opentelemetry-core" + }, + { + "path": "../../packages/opentelemetry-tracing" + } + ] +} diff --git a/package.json b/package.json index 206e8ff165a..3e1ed236a7f 100644 --- a/package.json +++ b/package.json @@ -5,20 +5,20 @@ "main": "build/src/index.js", "types": "build/src/index.d.ts", "scripts": { + "compile": "tsc --build", + "clean": "tsc --build --clean", "bench": "node benchmark", - "clean": "lerna run clean", - "postinstall": "npm run bootstrap", - "precompile": "tsc --version", + "postinstall": "update-ts-references && npm run bootstrap", + "postcompile": "npm run submodule && npm run protos:copy", + "submodule": "git submodule sync --recursive && git submodule update --init --recursive", + "protos:copy": "lerna run protos:copy", "version:update": "lerna run version:update", - "compile": "lerna run compile", "test": "lerna run test", "test:browser": "lerna run test:browser", "test:backcompat": "lerna run test:backcompat", "bootstrap": "lerna bootstrap", - "bump": "lerna publish", "codecov": "lerna run codecov", "codecov:browser": "lerna run codecov:browser", - "changelog": "lerna-changelog", "predocs-test": "npm run docs", "docs-test": "lerna run docs-test", "docs": "lerna run docs", @@ -57,7 +57,8 @@ "lerna": "3.22.1", "lerna-changelog": "1.0.1", "markdownlint-cli": "0.25.0", - "typescript": "3.9.7" + "typescript": "3.9.7", + "update-ts-references": "^1.3.0" }, "husky": { "hooks": { diff --git a/packages/opentelemetry-api/package.json b/packages/opentelemetry-api/package.json index 86daddc3597..6b07de500e2 100644 --- a/packages/opentelemetry-api/package.json +++ b/packages/opentelemetry-api/package.json @@ -10,6 +10,8 @@ }, "repository": "open-telemetry/opentelemetry-js", "scripts": { + "compile": "tsc --build", + "clean": "tsc --build --clean", "test": "nyc ts-mocha -p tsconfig.json test/**/*.test.ts", "test:browser": "nyc karma start --single-run", "codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../", @@ -17,12 +19,9 @@ "build": "npm run compile", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", - "precompile": "tsc --version", - "version:update": "node ../../scripts/version-update.js", - "compile": "npm run version:update && tsc -p .", + "version": "node ../../scripts/version-update.js", "docs-test": "linkinator docs/out --silent --skip david-dm.org", - "docs": "typedoc --tsconfig tsconfig.json --exclude test/**/*.ts", - "prepare": "npm run compile", + "docs": "typedoc --tsconfig tsconfig.docs.json", "watch": "tsc -w" }, "keywords": [ diff --git a/packages/opentelemetry-api/tsconfig.docs.json b/packages/opentelemetry-api/tsconfig.docs.json new file mode 100644 index 00000000000..627fa3ff3e5 --- /dev/null +++ b/packages/opentelemetry-api/tsconfig.docs.json @@ -0,0 +1,15 @@ +{ + "compilerOptions": { + "rootDir": ".", + "outDir": "build" + }, + "include": [ + "src/**/*.ts" + ], + "typedocOptions": { + "name": "OpenTelemetry API for JavaScript", + "out": "docs/out", + "mode": "file", + "hideGenerator": true + } +} diff --git a/packages/opentelemetry-api/tsconfig.json b/packages/opentelemetry-api/tsconfig.json index 79cc5cefac5..8223abee15b 100644 --- a/packages/opentelemetry-api/tsconfig.json +++ b/packages/opentelemetry-api/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../tsconfig.es5", + "extends": "../../tsconfig.es5.json", "compilerOptions": { "rootDir": ".", "outDir": "build" @@ -8,10 +8,9 @@ "src/**/*.ts", "test/**/*.ts" ], - "typedocOptions": { - "name": "OpenTelemetry API for JavaScript", - "out": "docs/out", - "mode": "file", - "hideGenerator": true - } + "references": [ + { + "path": "../opentelemetry-context-base" + } + ] } diff --git a/packages/opentelemetry-context-async-hooks/package.json b/packages/opentelemetry-context-async-hooks/package.json index a5404c3e0ff..d8f044142a2 100644 --- a/packages/opentelemetry-context-async-hooks/package.json +++ b/packages/opentelemetry-context-async-hooks/package.json @@ -6,16 +6,14 @@ "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js", "scripts": { + "compile": "tsc --build", + "clean": "tsc --build --clean", "test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'", "tdd": "npm run test -- --watch-extensions ts --watch", "codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../", - "clean": "rimraf build/*", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", - "precompile": "tsc --version", - "version:update": "node ../../scripts/version-update.js", - "compile": "npm run version:update && tsc -p .", - "prepare": "npm run compile" + "version": "node ../../scripts/version-update.js" }, "keywords": [ "opentelemetry", diff --git a/packages/opentelemetry-context-async-hooks/tsconfig.json b/packages/opentelemetry-context-async-hooks/tsconfig.json index a2042cd68b1..bf8999c67bf 100644 --- a/packages/opentelemetry-context-async-hooks/tsconfig.json +++ b/packages/opentelemetry-context-async-hooks/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../tsconfig.base", + "extends": "../../tsconfig.base.json", "compilerOptions": { "rootDir": ".", "outDir": "build" @@ -7,5 +7,10 @@ "include": [ "src/**/*.ts", "test/**/*.ts" + ], + "references": [ + { + "path": "../opentelemetry-context-base" + } ] } diff --git a/packages/opentelemetry-context-base/package.json b/packages/opentelemetry-context-base/package.json index 3ac9fd7a4c6..bc9927bca8a 100644 --- a/packages/opentelemetry-context-base/package.json +++ b/packages/opentelemetry-context-base/package.json @@ -6,16 +6,14 @@ "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js", "scripts": { + "compile": "tsc --build", + "clean": "tsc --build --clean", "test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'", "tdd": "npm run test -- --watch-extensions ts --watch", "codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../", - "clean": "rimraf build/*", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", - "precompile": "tsc --version", - "version:update": "node ../../scripts/version-update.js", - "compile": "npm run version:update && tsc -p .", - "prepare": "npm run compile", + "version": "node ../../scripts/version-update.js", "watch": "tsc -w" }, "keywords": [ diff --git a/packages/opentelemetry-context-base/tsconfig.json b/packages/opentelemetry-context-base/tsconfig.json index ca8d7656bbb..b8d88215e40 100644 --- a/packages/opentelemetry-context-base/tsconfig.json +++ b/packages/opentelemetry-context-base/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../tsconfig.es5", + "extends": "../../tsconfig.es5.json", "compilerOptions": { "rootDir": ".", "outDir": "build" diff --git a/packages/opentelemetry-context-zone-peer-dep/package.json b/packages/opentelemetry-context-zone-peer-dep/package.json index b851740e975..69a61aaa71c 100644 --- a/packages/opentelemetry-context-zone-peer-dep/package.json +++ b/packages/opentelemetry-context-zone-peer-dep/package.json @@ -6,13 +6,12 @@ "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js", "scripts": { + "compile": "tsc --build", + "clean": "tsc --build --clean", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", - "clean": "rimraf build/*", "codecov:browser": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../", - "version:update": "node ../../scripts/version-update.js", - "compile": "npm run version:update && tsc -p .", - "prepare": "npm run compile", + "version": "node ../../scripts/version-update.js", "tdd": "karma start", "test:browser": "nyc karma start --single-run", "watch": "tsc -w" diff --git a/packages/opentelemetry-context-zone-peer-dep/tsconfig.json b/packages/opentelemetry-context-zone-peer-dep/tsconfig.json index 33ecce9d6d5..2e7c26e39c2 100644 --- a/packages/opentelemetry-context-zone-peer-dep/tsconfig.json +++ b/packages/opentelemetry-context-zone-peer-dep/tsconfig.json @@ -1,13 +1,20 @@ { - "extends": "../tsconfig.base", + "extends": "../../tsconfig.base.json", "compilerOptions": { "rootDir": ".", "outDir": "build", "skipLibCheck": true }, - "files": [ "node_modules/zone.js/dist/zone.js.d.ts"], + "files": [ + "node_modules/zone.js/dist/zone.js.d.ts" + ], "include": [ "src/**/*.ts", "test/**/*.ts" + ], + "references": [ + { + "path": "../opentelemetry-context-base" + } ] } diff --git a/packages/opentelemetry-context-zone/package.json b/packages/opentelemetry-context-zone/package.json index e3e6756b8b0..6ea27e3394b 100644 --- a/packages/opentelemetry-context-zone/package.json +++ b/packages/opentelemetry-context-zone/package.json @@ -6,12 +6,11 @@ "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js", "scripts": { + "compile": "tsc --build", + "clean": "tsc --build --clean", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", - "clean": "rimraf build/*", - "version:update": "node ../../scripts/version-update.js", - "compile": "npm run version:update && tsc -p .", - "prepare": "npm run compile", + "version": "node ../../scripts/version-update.js", "watch": "tsc -w" }, "keywords": [ diff --git a/packages/opentelemetry-context-zone/tsconfig.json b/packages/opentelemetry-context-zone/tsconfig.json index 33ecce9d6d5..e714c6958f5 100644 --- a/packages/opentelemetry-context-zone/tsconfig.json +++ b/packages/opentelemetry-context-zone/tsconfig.json @@ -1,13 +1,20 @@ { - "extends": "../tsconfig.base", + "extends": "../../tsconfig.base.json", "compilerOptions": { "rootDir": ".", "outDir": "build", "skipLibCheck": true }, - "files": [ "node_modules/zone.js/dist/zone.js.d.ts"], + "files": [ + "node_modules/zone.js/dist/zone.js.d.ts" + ], "include": [ "src/**/*.ts", "test/**/*.ts" + ], + "references": [ + { + "path": "../opentelemetry-context-zone-peer-dep" + } ] } diff --git a/packages/opentelemetry-core/package.json b/packages/opentelemetry-core/package.json index c71daf853c2..b304f970ac1 100644 --- a/packages/opentelemetry-core/package.json +++ b/packages/opentelemetry-core/package.json @@ -10,6 +10,8 @@ "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js", "scripts": { + "compile": "tsc --build", + "clean": "tsc --build --clean", "test": "nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'", "test:browser": "nyc karma start --single-run", "tdd": "npm run tdd:node", @@ -17,13 +19,9 @@ "tdd:browser": "karma start", "codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../", "codecov:browser": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../", - "clean": "rimraf build/*", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", - "precompile": "tsc --version", - "compile": "npm run version:update && tsc -p .", - "prepare": "npm run compile", - "version:update": "node ../../scripts/version-update.js", + "version": "node ../../scripts/version-update.js", "watch": "tsc -w" }, "keywords": [ diff --git a/packages/opentelemetry-core/test/trace/fixtures/test-package/package.json b/packages/opentelemetry-core/test/trace/fixtures/test-package/package.json index e80faeea41b..b961b7676c2 100644 --- a/packages/opentelemetry-core/test/trace/fixtures/test-package/package.json +++ b/packages/opentelemetry-core/test/trace/fixtures/test-package/package.json @@ -4,6 +4,8 @@ "description": "", "main": "index.js", "scripts": { + "compile": "tsc --build", + "clean": "tsc --build --clean", "test": "echo \"Error: no test specified\" && exit 1" }, "author": "", diff --git a/packages/opentelemetry-core/tsconfig.json b/packages/opentelemetry-core/tsconfig.json index a2042cd68b1..838b29bc26a 100644 --- a/packages/opentelemetry-core/tsconfig.json +++ b/packages/opentelemetry-core/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../tsconfig.base", + "extends": "../../tsconfig.base.json", "compilerOptions": { "rootDir": ".", "outDir": "build" @@ -7,5 +7,16 @@ "include": [ "src/**/*.ts", "test/**/*.ts" + ], + "references": [ + { + "path": "../opentelemetry-api" + }, + { + "path": "../opentelemetry-context-base" + }, + { + "path": "../opentelemetry-propagator-b3" + } ] } diff --git a/packages/opentelemetry-exporter-collector-grpc/package.json b/packages/opentelemetry-exporter-collector-grpc/package.json index af5ed9a3dd7..3b671c44514 100644 --- a/packages/opentelemetry-exporter-collector-grpc/package.json +++ b/packages/opentelemetry-exporter-collector-grpc/package.json @@ -6,18 +6,16 @@ "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js", "scripts": { - "clean": "rimraf build/*", - "compile": "npm run version:update && tsc -p .", + "compile": "tsc --build", + "clean": "tsc --build --clean", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", "postcompile": "npm run submodule && npm run protos:copy", - "precompile": "tsc --version", - "prepare": "npm run compile", "protos:copy": "cpx protos/opentelemetry/**/*.* build/protos/opentelemetry", "submodule": "git submodule sync --recursive && git submodule update --init --recursive", "tdd": "npm run test -- --watch-extensions ts --watch", "test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'", - "version:update": "node ../../scripts/version-update.js", + "version": "node ../../scripts/version-update.js", "watch": "npm run protos:copy && tsc -w" }, "keywords": [ diff --git a/packages/opentelemetry-exporter-collector-grpc/tsconfig.json b/packages/opentelemetry-exporter-collector-grpc/tsconfig.json index a2042cd68b1..bfdc997b940 100644 --- a/packages/opentelemetry-exporter-collector-grpc/tsconfig.json +++ b/packages/opentelemetry-exporter-collector-grpc/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../tsconfig.base", + "extends": "../../tsconfig.base.json", "compilerOptions": { "rootDir": ".", "outDir": "build" @@ -7,5 +7,25 @@ "include": [ "src/**/*.ts", "test/**/*.ts" + ], + "references": [ + { + "path": "../opentelemetry-api" + }, + { + "path": "../opentelemetry-core" + }, + { + "path": "../opentelemetry-exporter-collector" + }, + { + "path": "../opentelemetry-metrics" + }, + { + "path": "../opentelemetry-resources" + }, + { + "path": "../opentelemetry-tracing" + } ] } diff --git a/packages/opentelemetry-exporter-collector-proto/package.json b/packages/opentelemetry-exporter-collector-proto/package.json index 0e0ad3783ad..f44034991e2 100644 --- a/packages/opentelemetry-exporter-collector-proto/package.json +++ b/packages/opentelemetry-exporter-collector-proto/package.json @@ -6,18 +6,16 @@ "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js", "scripts": { - "clean": "rimraf build/*", - "compile": "npm run version:update && tsc -p .", + "compile": "tsc --build", + "clean": "tsc --build --clean", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", "postcompile": "npm run submodule && npm run protos:copy", - "precompile": "tsc --version", - "prepare": "npm run compile", "protos:copy": "cpx protos/opentelemetry/**/*.* build/protos/opentelemetry", "submodule": "git submodule sync --recursive && git submodule update --init --recursive", "tdd": "npm run test -- --watch-extensions ts --watch", "test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'", - "version:update": "node ../../scripts/version-update.js", + "version": "node ../../scripts/version-update.js", "watch": "npm run protos:copy && tsc -w" }, "keywords": [ diff --git a/packages/opentelemetry-exporter-collector-proto/tsconfig.json b/packages/opentelemetry-exporter-collector-proto/tsconfig.json index a2042cd68b1..bfdc997b940 100644 --- a/packages/opentelemetry-exporter-collector-proto/tsconfig.json +++ b/packages/opentelemetry-exporter-collector-proto/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../tsconfig.base", + "extends": "../../tsconfig.base.json", "compilerOptions": { "rootDir": ".", "outDir": "build" @@ -7,5 +7,25 @@ "include": [ "src/**/*.ts", "test/**/*.ts" + ], + "references": [ + { + "path": "../opentelemetry-api" + }, + { + "path": "../opentelemetry-core" + }, + { + "path": "../opentelemetry-exporter-collector" + }, + { + "path": "../opentelemetry-metrics" + }, + { + "path": "../opentelemetry-resources" + }, + { + "path": "../opentelemetry-tracing" + } ] } diff --git a/packages/opentelemetry-exporter-collector/package.json b/packages/opentelemetry-exporter-collector/package.json index 1a78b7e36c9..6b542203f11 100644 --- a/packages/opentelemetry-exporter-collector/package.json +++ b/packages/opentelemetry-exporter-collector/package.json @@ -10,18 +10,16 @@ "./build/src/platform/index.js": "./build/src/platform/browser/index.js" }, "scripts": { - "clean": "rimraf build/*", + "compile": "tsc --build", + "clean": "tsc --build --clean", "codecov:browser": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../", - "compile": "npm run version:update && tsc -p .", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", - "precompile": "tsc --version", - "prepare": "npm run compile", "tdd": "npm run test -- --watch-extensions ts --watch", "tdd:browser": "karma start", "test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'", "test:browser": "nyc karma start --single-run", - "version:update": "node ../../scripts/version-update.js", + "version": "node ../../scripts/version-update.js", "watch": "tsc -w" }, "keywords": [ diff --git a/packages/opentelemetry-exporter-collector/tsconfig.json b/packages/opentelemetry-exporter-collector/tsconfig.json index a2042cd68b1..4410230d449 100644 --- a/packages/opentelemetry-exporter-collector/tsconfig.json +++ b/packages/opentelemetry-exporter-collector/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../tsconfig.base", + "extends": "../../tsconfig.base.json", "compilerOptions": { "rootDir": ".", "outDir": "build" @@ -7,5 +7,22 @@ "include": [ "src/**/*.ts", "test/**/*.ts" + ], + "references": [ + { + "path": "../opentelemetry-api" + }, + { + "path": "../opentelemetry-core" + }, + { + "path": "../opentelemetry-metrics" + }, + { + "path": "../opentelemetry-resources" + }, + { + "path": "../opentelemetry-tracing" + } ] } diff --git a/packages/opentelemetry-exporter-jaeger/package.json b/packages/opentelemetry-exporter-jaeger/package.json index 06ba6e1eeb7..f072e82be10 100644 --- a/packages/opentelemetry-exporter-jaeger/package.json +++ b/packages/opentelemetry-exporter-jaeger/package.json @@ -6,16 +6,14 @@ "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js", "scripts": { + "compile": "tsc --build", + "clean": "tsc --build --clean", "test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'", "tdd": "npm run test -- --watch-extensions ts --watch", "codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../", - "clean": "rimraf build/*", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", - "precompile": "tsc --version", - "version:update": "node ../../scripts/version-update.js", - "compile": "npm run version:update && tsc -p .", - "prepare": "npm run compile", + "version": "node ../../scripts/version-update.js", "watch": "tsc -w" }, "keywords": [ diff --git a/packages/opentelemetry-exporter-jaeger/tsconfig.json b/packages/opentelemetry-exporter-jaeger/tsconfig.json index a2042cd68b1..24964158810 100644 --- a/packages/opentelemetry-exporter-jaeger/tsconfig.json +++ b/packages/opentelemetry-exporter-jaeger/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../tsconfig.base", + "extends": "../../tsconfig.base.json", "compilerOptions": { "rootDir": ".", "outDir": "build" @@ -7,5 +7,19 @@ "include": [ "src/**/*.ts", "test/**/*.ts" + ], + "references": [ + { + "path": "../opentelemetry-api" + }, + { + "path": "../opentelemetry-core" + }, + { + "path": "../opentelemetry-resources" + }, + { + "path": "../opentelemetry-tracing" + } ] } diff --git a/packages/opentelemetry-exporter-prometheus/package.json b/packages/opentelemetry-exporter-prometheus/package.json index 51e9ce17fd3..74c2028ab9c 100644 --- a/packages/opentelemetry-exporter-prometheus/package.json +++ b/packages/opentelemetry-exporter-prometheus/package.json @@ -6,16 +6,14 @@ "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js", "scripts": { + "compile": "tsc --build", + "clean": "tsc --build --clean", "test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'", "tdd": "npm run test -- --watch-extensions ts --watch", "codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../", - "clean": "rimraf build/*", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", - "precompile": "tsc --version", - "version:update": "node ../../scripts/version-update.js", - "compile": "npm run version:update && tsc -p .", - "prepare": "npm run compile", + "version": "node ../../scripts/version-update.js", "watch": "tsc -w" }, "keywords": [ diff --git a/packages/opentelemetry-exporter-prometheus/tsconfig.json b/packages/opentelemetry-exporter-prometheus/tsconfig.json index a2042cd68b1..42b254c5492 100644 --- a/packages/opentelemetry-exporter-prometheus/tsconfig.json +++ b/packages/opentelemetry-exporter-prometheus/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../tsconfig.base", + "extends": "../../tsconfig.base.json", "compilerOptions": { "rootDir": ".", "outDir": "build" @@ -7,5 +7,16 @@ "include": [ "src/**/*.ts", "test/**/*.ts" + ], + "references": [ + { + "path": "../opentelemetry-api" + }, + { + "path": "../opentelemetry-core" + }, + { + "path": "../opentelemetry-metrics" + } ] } diff --git a/packages/opentelemetry-exporter-zipkin/package.json b/packages/opentelemetry-exporter-zipkin/package.json index f63db3a27a3..ad028b2393b 100644 --- a/packages/opentelemetry-exporter-zipkin/package.json +++ b/packages/opentelemetry-exporter-zipkin/package.json @@ -10,18 +10,16 @@ "./build/src/platform/index.js": "./build/src/platform/browser/index.js" }, "scripts": { - "clean": "rimraf build/*", + "compile": "tsc --build", + "clean": "tsc --build --clean", "codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../", "codecov:browser": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../", - "compile": "npm run version:update && tsc -p .", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", - "precompile": "tsc --version", - "prepare": "npm run compile", "tdd": "npm run test -- --watch-extensions ts --watch", "test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'", "test:browser": "nyc karma start --single-run", - "version:update": "node ../../scripts/version-update.js", + "version": "node ../../scripts/version-update.js", "watch": "tsc -w" }, "keywords": [ diff --git a/packages/opentelemetry-exporter-zipkin/tsconfig.json b/packages/opentelemetry-exporter-zipkin/tsconfig.json index a2042cd68b1..24964158810 100644 --- a/packages/opentelemetry-exporter-zipkin/tsconfig.json +++ b/packages/opentelemetry-exporter-zipkin/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../tsconfig.base", + "extends": "../../tsconfig.base.json", "compilerOptions": { "rootDir": ".", "outDir": "build" @@ -7,5 +7,19 @@ "include": [ "src/**/*.ts", "test/**/*.ts" + ], + "references": [ + { + "path": "../opentelemetry-api" + }, + { + "path": "../opentelemetry-core" + }, + { + "path": "../opentelemetry-resources" + }, + { + "path": "../opentelemetry-tracing" + } ] } diff --git a/packages/opentelemetry-grpc-utils/package.json b/packages/opentelemetry-grpc-utils/package.json index 96cff5421e4..04d003ab05b 100644 --- a/packages/opentelemetry-grpc-utils/package.json +++ b/packages/opentelemetry-grpc-utils/package.json @@ -7,16 +7,14 @@ "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js", "scripts": { + "compile": "tsc --build", + "clean": "tsc --build --clean", "test": "nyc ts-mocha -p tsconfig.json test/**/*.test.ts", "tdd": "npm run test -- --watch-extensions ts --watch", - "clean": "rimraf build/*", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", "codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../", - "precompile": "tsc --version", - "version:update": "node ../../scripts/version-update.js", - "compile": "npm run version:update && tsc -p .", - "prepare": "npm run compile" + "version": "node ../../scripts/version-update.js" }, "keywords": [ "opentelemetry", diff --git a/packages/opentelemetry-grpc-utils/tsconfig.json b/packages/opentelemetry-grpc-utils/tsconfig.json index a2042cd68b1..08f0364911d 100644 --- a/packages/opentelemetry-grpc-utils/tsconfig.json +++ b/packages/opentelemetry-grpc-utils/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../tsconfig.base", + "extends": "../../tsconfig.base.json", "compilerOptions": { "rootDir": ".", "outDir": "build" @@ -7,5 +7,28 @@ "include": [ "src/**/*.ts", "test/**/*.ts" + ], + "references": [ + { + "path": "../opentelemetry-api" + }, + { + "path": "../opentelemetry-context-async-hooks" + }, + { + "path": "../opentelemetry-context-base" + }, + { + "path": "../opentelemetry-core" + }, + { + "path": "../opentelemetry-node" + }, + { + "path": "../opentelemetry-semantic-conventions" + }, + { + "path": "../opentelemetry-tracing" + } ] } diff --git a/packages/opentelemetry-instrumentation-http/package.json b/packages/opentelemetry-instrumentation-http/package.json index bbce109a76f..d34643698ab 100644 --- a/packages/opentelemetry-instrumentation-http/package.json +++ b/packages/opentelemetry-instrumentation-http/package.json @@ -6,16 +6,14 @@ "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js", "scripts": { + "compile": "tsc --build", + "clean": "tsc --build --clean", "test": "nyc ts-mocha -p tsconfig.json test/**/*.test.ts", "tdd": "npm run test -- --watch-extensions ts --watch", - "clean": "rimraf build/*", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", "codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../", - "precompile": "tsc --version", - "version:update": "node ../../scripts/version-update.js", - "compile": "npm run version:update && tsc -p .", - "prepare": "npm run compile", + "version": "node ../../scripts/version-update.js", "watch": "tsc -w" }, "keywords": [ diff --git a/packages/opentelemetry-instrumentation-http/tsconfig.json b/packages/opentelemetry-instrumentation-http/tsconfig.json index a2042cd68b1..ea143a7be3c 100644 --- a/packages/opentelemetry-instrumentation-http/tsconfig.json +++ b/packages/opentelemetry-instrumentation-http/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../tsconfig.base", + "extends": "../../tsconfig.base.json", "compilerOptions": { "rootDir": ".", "outDir": "build" @@ -7,5 +7,31 @@ "include": [ "src/**/*.ts", "test/**/*.ts" + ], + "references": [ + { + "path": "../opentelemetry-api" + }, + { + "path": "../opentelemetry-context-async-hooks" + }, + { + "path": "../opentelemetry-context-base" + }, + { + "path": "../opentelemetry-core" + }, + { + "path": "../opentelemetry-instrumentation" + }, + { + "path": "../opentelemetry-node" + }, + { + "path": "../opentelemetry-semantic-conventions" + }, + { + "path": "../opentelemetry-tracing" + } ] } diff --git a/packages/opentelemetry-instrumentation-xml-http-request/package.json b/packages/opentelemetry-instrumentation-xml-http-request/package.json index a1e70bb23e1..7b4022b8661 100644 --- a/packages/opentelemetry-instrumentation-xml-http-request/package.json +++ b/packages/opentelemetry-instrumentation-xml-http-request/package.json @@ -6,14 +6,12 @@ "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js", "scripts": { + "compile": "tsc --build", + "clean": "tsc --build --clean", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", - "clean": "rimraf build/*", "codecov:browser": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../", - "precompile": "tsc --version", - "version:update": "node ../../scripts/version-update.js", - "compile": "npm run version:update && tsc -p .", - "prepare": "npm run compile", + "version": "node ../../scripts/version-update.js", "tdd": "karma start", "test:browser": "nyc karma start --single-run", "watch": "tsc -w" diff --git a/packages/opentelemetry-instrumentation-xml-http-request/tsconfig.json b/packages/opentelemetry-instrumentation-xml-http-request/tsconfig.json index 71661a842ee..76bcef51f22 100644 --- a/packages/opentelemetry-instrumentation-xml-http-request/tsconfig.json +++ b/packages/opentelemetry-instrumentation-xml-http-request/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../tsconfig.base", + "extends": "../../tsconfig.base.json", "compilerOptions": { "rootDir": ".", "outDir": "build", @@ -8,5 +8,31 @@ "include": [ "src/**/*.ts", "test/**/*.ts" + ], + "references": [ + { + "path": "../opentelemetry-api" + }, + { + "path": "../opentelemetry-context-zone" + }, + { + "path": "../opentelemetry-core" + }, + { + "path": "../opentelemetry-instrumentation" + }, + { + "path": "../opentelemetry-propagator-b3" + }, + { + "path": "../opentelemetry-semantic-conventions" + }, + { + "path": "../opentelemetry-tracing" + }, + { + "path": "../opentelemetry-web" + } ] } diff --git a/packages/opentelemetry-instrumentation/package.json b/packages/opentelemetry-instrumentation/package.json index 2832bfcfa0e..032958e4fc2 100644 --- a/packages/opentelemetry-instrumentation/package.json +++ b/packages/opentelemetry-instrumentation/package.json @@ -27,20 +27,18 @@ "README.md" ], "scripts": { - "clean": "rimraf build/*", + "compile": "tsc --build", + "clean": "tsc --build --clean", "codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../", "codecov:browser": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../", - "compile": "npm run version:update && tsc -p .", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", - "precompile": "tsc --version", - "prepare": "npm run compile", "tdd": "npm run tdd:node", "tdd:node": "npm run test -- --watch-extensions ts --watch", "tdd:browser": "karma start", "test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'", "test:browser": "nyc karma start --single-run", - "version:update": "node ../../scripts/version-update.js", + "version": "node ../../scripts/version-update.js", "watch": "tsc -w" }, "keywords": [ diff --git a/packages/opentelemetry-instrumentation/tsconfig.json b/packages/opentelemetry-instrumentation/tsconfig.json index a2042cd68b1..e73d377644e 100644 --- a/packages/opentelemetry-instrumentation/tsconfig.json +++ b/packages/opentelemetry-instrumentation/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../tsconfig.base", + "extends": "../../tsconfig.base.json", "compilerOptions": { "rootDir": ".", "outDir": "build" @@ -7,5 +7,10 @@ "include": [ "src/**/*.ts", "test/**/*.ts" + ], + "references": [ + { + "path": "../opentelemetry-api" + } ] } diff --git a/packages/opentelemetry-metrics/package.json b/packages/opentelemetry-metrics/package.json index 1e9b46b1946..6d1b77a5f42 100644 --- a/packages/opentelemetry-metrics/package.json +++ b/packages/opentelemetry-metrics/package.json @@ -6,16 +6,14 @@ "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js", "scripts": { + "compile": "tsc --build", + "clean": "tsc --build --clean", "test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'", "tdd": "npm run test -- --watch-extensions ts --watch", "codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../", - "clean": "rimraf build/*", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", - "precompile": "tsc --version", - "version:update": "node ../../scripts/version-update.js", - "compile": "npm run version:update && tsc -p .", - "prepare": "npm run compile", + "version": "node ../../scripts/version-update.js", "watch": "tsc -w" }, "keywords": [ diff --git a/packages/opentelemetry-metrics/tsconfig.json b/packages/opentelemetry-metrics/tsconfig.json index a2042cd68b1..954354a3a00 100644 --- a/packages/opentelemetry-metrics/tsconfig.json +++ b/packages/opentelemetry-metrics/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../tsconfig.base", + "extends": "../../tsconfig.base.json", "compilerOptions": { "rootDir": ".", "outDir": "build" @@ -7,5 +7,16 @@ "include": [ "src/**/*.ts", "test/**/*.ts" + ], + "references": [ + { + "path": "../opentelemetry-api" + }, + { + "path": "../opentelemetry-core" + }, + { + "path": "../opentelemetry-resources" + } ] } diff --git a/packages/opentelemetry-node/package.json b/packages/opentelemetry-node/package.json index 2f72dee27e6..0294c2c62a6 100644 --- a/packages/opentelemetry-node/package.json +++ b/packages/opentelemetry-node/package.json @@ -6,16 +6,14 @@ "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js", "scripts": { + "compile": "tsc --build", + "clean": "tsc --build --clean", "test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'", "tdd": "npm run test -- --watch-extensions ts --watch", "codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../", - "clean": "rimraf build/*", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", - "precompile": "tsc --version", - "version:update": "node ../../scripts/version-update.js", - "compile": "npm run version:update && tsc -p .", - "prepare": "npm run compile", + "version": "node ../../scripts/version-update.js", "watch": "tsc -w" }, "keywords": [ diff --git a/packages/opentelemetry-node/tsconfig.json b/packages/opentelemetry-node/tsconfig.json index a2042cd68b1..1295aa1d328 100644 --- a/packages/opentelemetry-node/tsconfig.json +++ b/packages/opentelemetry-node/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../tsconfig.base", + "extends": "../../tsconfig.base.json", "compilerOptions": { "rootDir": ".", "outDir": "build" @@ -7,5 +7,25 @@ "include": [ "src/**/*.ts", "test/**/*.ts" + ], + "references": [ + { + "path": "../opentelemetry-api" + }, + { + "path": "../opentelemetry-context-async-hooks" + }, + { + "path": "../opentelemetry-context-base" + }, + { + "path": "../opentelemetry-core" + }, + { + "path": "../opentelemetry-resources" + }, + { + "path": "../opentelemetry-tracing" + } ] } diff --git a/packages/opentelemetry-plugin-fetch/package.json b/packages/opentelemetry-plugin-fetch/package.json index 63d42bf23f5..f35def2760c 100644 --- a/packages/opentelemetry-plugin-fetch/package.json +++ b/packages/opentelemetry-plugin-fetch/package.json @@ -6,14 +6,12 @@ "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js", "scripts": { + "compile": "tsc --build", + "clean": "tsc --build --clean", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", - "clean": "rimraf build/*", "codecov:browser": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../", - "precompile": "tsc --version", - "version:update": "node ../../scripts/version-update.js", - "compile": "npm run version:update && tsc -p .", - "prepare": "npm run compile", + "version": "node ../../scripts/version-update.js", "tdd": "karma start", "test:browser": "nyc karma start --single-run", "watch": "tsc -w" diff --git a/packages/opentelemetry-plugin-fetch/tsconfig.json b/packages/opentelemetry-plugin-fetch/tsconfig.json index 71661a842ee..b06e28c796d 100644 --- a/packages/opentelemetry-plugin-fetch/tsconfig.json +++ b/packages/opentelemetry-plugin-fetch/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../tsconfig.base", + "extends": "../../tsconfig.base.json", "compilerOptions": { "rootDir": ".", "outDir": "build", @@ -8,5 +8,25 @@ "include": [ "src/**/*.ts", "test/**/*.ts" + ], + "references": [ + { + "path": "../opentelemetry-api" + }, + { + "path": "../opentelemetry-context-zone" + }, + { + "path": "../opentelemetry-core" + }, + { + "path": "../opentelemetry-propagator-b3" + }, + { + "path": "../opentelemetry-tracing" + }, + { + "path": "../opentelemetry-web" + } ] } diff --git a/packages/opentelemetry-plugin-grpc-js/package.json b/packages/opentelemetry-plugin-grpc-js/package.json index c30120eb012..07292e852b9 100644 --- a/packages/opentelemetry-plugin-grpc-js/package.json +++ b/packages/opentelemetry-plugin-grpc-js/package.json @@ -6,17 +6,15 @@ "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js", "scripts": { + "compile": "tsc --build", + "clean": "tsc --build --clean", "test": "nyc ts-mocha -p tsconfig.json test/**/*.test.ts", "test:deubg": "ts-mocha --inspect-brk -p tsconfig.json test/**/*.test.ts", "tdd": "npm run test -- --watch-extensions ts --watch", - "clean": "rimraf build/*", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", "codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../", - "precompile": "tsc --version", - "version:update": "node ../../scripts/version-update.js", - "compile": "npm run version:update && tsc -p .", - "prepare": "npm run compile" + "version": "node ../../scripts/version-update.js" }, "keywords": [ "opentelemetry", diff --git a/packages/opentelemetry-plugin-grpc-js/tsconfig.json b/packages/opentelemetry-plugin-grpc-js/tsconfig.json index a2042cd68b1..00e509fd191 100644 --- a/packages/opentelemetry-plugin-grpc-js/tsconfig.json +++ b/packages/opentelemetry-plugin-grpc-js/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../tsconfig.base", + "extends": "../../tsconfig.base.json", "compilerOptions": { "rootDir": ".", "outDir": "build" @@ -7,5 +7,31 @@ "include": [ "src/**/*.ts", "test/**/*.ts" + ], + "references": [ + { + "path": "../opentelemetry-api" + }, + { + "path": "../opentelemetry-context-async-hooks" + }, + { + "path": "../opentelemetry-context-base" + }, + { + "path": "../opentelemetry-core" + }, + { + "path": "../opentelemetry-grpc-utils" + }, + { + "path": "../opentelemetry-node" + }, + { + "path": "../opentelemetry-semantic-conventions" + }, + { + "path": "../opentelemetry-tracing" + } ] } diff --git a/packages/opentelemetry-plugin-grpc/package.json b/packages/opentelemetry-plugin-grpc/package.json index 6445d5c485a..a7c901d73a6 100644 --- a/packages/opentelemetry-plugin-grpc/package.json +++ b/packages/opentelemetry-plugin-grpc/package.json @@ -6,16 +6,14 @@ "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js", "scripts": { + "compile": "tsc --build", + "clean": "tsc --build --clean", "test": "nyc ts-mocha -p tsconfig.json test/**/*.test.ts", "tdd": "npm run test -- --watch-extensions ts --watch", - "clean": "rimraf build/*", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", "codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../", - "precompile": "tsc --version", - "version:update": "node ../../scripts/version-update.js", - "compile": "npm run version:update && tsc -p .", - "prepare": "npm run compile" + "version": "node ../../scripts/version-update.js" }, "keywords": [ "opentelemetry", diff --git a/packages/opentelemetry-plugin-grpc/tsconfig.json b/packages/opentelemetry-plugin-grpc/tsconfig.json index a2042cd68b1..00e509fd191 100644 --- a/packages/opentelemetry-plugin-grpc/tsconfig.json +++ b/packages/opentelemetry-plugin-grpc/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../tsconfig.base", + "extends": "../../tsconfig.base.json", "compilerOptions": { "rootDir": ".", "outDir": "build" @@ -7,5 +7,31 @@ "include": [ "src/**/*.ts", "test/**/*.ts" + ], + "references": [ + { + "path": "../opentelemetry-api" + }, + { + "path": "../opentelemetry-context-async-hooks" + }, + { + "path": "../opentelemetry-context-base" + }, + { + "path": "../opentelemetry-core" + }, + { + "path": "../opentelemetry-grpc-utils" + }, + { + "path": "../opentelemetry-node" + }, + { + "path": "../opentelemetry-semantic-conventions" + }, + { + "path": "../opentelemetry-tracing" + } ] } diff --git a/packages/opentelemetry-plugin-http/package.json b/packages/opentelemetry-plugin-http/package.json index fc420c31135..561da896df1 100644 --- a/packages/opentelemetry-plugin-http/package.json +++ b/packages/opentelemetry-plugin-http/package.json @@ -6,16 +6,14 @@ "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js", "scripts": { + "compile": "tsc --build", + "clean": "tsc --build --clean", "test": "nyc ts-mocha -p tsconfig.json test/**/*.test.ts", "tdd": "npm run test -- --watch-extensions ts --watch", - "clean": "rimraf build/*", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", "codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../", - "precompile": "tsc --version", - "version:update": "node ../../scripts/version-update.js", - "compile": "npm run version:update && tsc -p .", - "prepare": "npm run compile", + "version": "node ../../scripts/version-update.js", "watch": "tsc -w" }, "keywords": [ diff --git a/packages/opentelemetry-plugin-http/tsconfig.json b/packages/opentelemetry-plugin-http/tsconfig.json index a2042cd68b1..08f0364911d 100644 --- a/packages/opentelemetry-plugin-http/tsconfig.json +++ b/packages/opentelemetry-plugin-http/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../tsconfig.base", + "extends": "../../tsconfig.base.json", "compilerOptions": { "rootDir": ".", "outDir": "build" @@ -7,5 +7,28 @@ "include": [ "src/**/*.ts", "test/**/*.ts" + ], + "references": [ + { + "path": "../opentelemetry-api" + }, + { + "path": "../opentelemetry-context-async-hooks" + }, + { + "path": "../opentelemetry-context-base" + }, + { + "path": "../opentelemetry-core" + }, + { + "path": "../opentelemetry-node" + }, + { + "path": "../opentelemetry-semantic-conventions" + }, + { + "path": "../opentelemetry-tracing" + } ] } diff --git a/packages/opentelemetry-plugin-https/package.json b/packages/opentelemetry-plugin-https/package.json index 0e96b067d49..b60e3dea42c 100644 --- a/packages/opentelemetry-plugin-https/package.json +++ b/packages/opentelemetry-plugin-https/package.json @@ -6,16 +6,14 @@ "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js", "scripts": { + "compile": "tsc --build", + "clean": "tsc --build --clean", "test": "nyc ts-mocha -p tsconfig.json test/**/*.test.ts", "tdd": "npm run test -- --watch-extensions ts --watch", - "clean": "rimraf build/*", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", "codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../", - "precompile": "tsc --version", - "version:update": "node ../../scripts/version-update.js", - "compile": "npm run version:update && tsc -p .", - "prepare": "npm run compile" + "version": "node ../../scripts/version-update.js" }, "keywords": [ "opentelemetry", diff --git a/packages/opentelemetry-plugin-https/tsconfig.json b/packages/opentelemetry-plugin-https/tsconfig.json index a2042cd68b1..b4393cd5ea6 100644 --- a/packages/opentelemetry-plugin-https/tsconfig.json +++ b/packages/opentelemetry-plugin-https/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../tsconfig.base", + "extends": "../../tsconfig.base.json", "compilerOptions": { "rootDir": ".", "outDir": "build" @@ -7,5 +7,31 @@ "include": [ "src/**/*.ts", "test/**/*.ts" + ], + "references": [ + { + "path": "../opentelemetry-api" + }, + { + "path": "../opentelemetry-context-async-hooks" + }, + { + "path": "../opentelemetry-context-base" + }, + { + "path": "../opentelemetry-core" + }, + { + "path": "../opentelemetry-node" + }, + { + "path": "../opentelemetry-plugin-http" + }, + { + "path": "../opentelemetry-semantic-conventions" + }, + { + "path": "../opentelemetry-tracing" + } ] } diff --git a/packages/opentelemetry-propagator-b3/package.json b/packages/opentelemetry-propagator-b3/package.json index 798a70a4e88..b2b7e00bf12 100644 --- a/packages/opentelemetry-propagator-b3/package.json +++ b/packages/opentelemetry-propagator-b3/package.json @@ -6,16 +6,13 @@ "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js", "scripts": { + "compile": "tsc --build", + "clean": "tsc --build --clean", "test": "nyc ts-mocha -p tsconfig.json test/**/*.test.ts", "codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../", - "build": "npm run compile", - "clean": "rimraf build/*", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", - "precompile": "tsc --version", - "version:update": "node ../../scripts/version-update.js", - "compile": "npm run version:update && tsc -p .", - "prepare": "npm run compile", + "version": "node ../../scripts/version-update.js", "watch": "tsc -w" }, "keywords": [ diff --git a/packages/opentelemetry-propagator-b3/tsconfig.json b/packages/opentelemetry-propagator-b3/tsconfig.json index a2042cd68b1..6ab0e214c2b 100644 --- a/packages/opentelemetry-propagator-b3/tsconfig.json +++ b/packages/opentelemetry-propagator-b3/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../tsconfig.base", + "extends": "../../tsconfig.base.json", "compilerOptions": { "rootDir": ".", "outDir": "build" @@ -7,5 +7,13 @@ "include": [ "src/**/*.ts", "test/**/*.ts" + ], + "references": [ + { + "path": "../opentelemetry-api" + }, + { + "path": "../opentelemetry-context-base" + } ] } diff --git a/packages/opentelemetry-resource-detector-aws/package.json b/packages/opentelemetry-resource-detector-aws/package.json index e5bd9d4ec36..6b995e1ca42 100644 --- a/packages/opentelemetry-resource-detector-aws/package.json +++ b/packages/opentelemetry-resource-detector-aws/package.json @@ -6,16 +6,14 @@ "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js", "scripts": { + "compile": "tsc --build", + "clean": "tsc --build --clean", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", "test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'", "tdd": "npm run test -- --watch-extensions ts --watch", "codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../", - "clean": "rimraf build/*", - "precompile": "tsc --version", - "version:update": "node ../../scripts/version-update.js", - "compile": "npm run version:update && tsc -p .", - "prepare": "npm run compile" + "version": "node ../../scripts/version-update.js" }, "keywords": [ "opentelemetry", diff --git a/packages/opentelemetry-resource-detector-aws/tsconfig.json b/packages/opentelemetry-resource-detector-aws/tsconfig.json index e4b3b29e6a2..954354a3a00 100644 --- a/packages/opentelemetry-resource-detector-aws/tsconfig.json +++ b/packages/opentelemetry-resource-detector-aws/tsconfig.json @@ -1,8 +1,22 @@ { - "extends": "../tsconfig.base", + "extends": "../../tsconfig.base.json", "compilerOptions": { "rootDir": ".", "outDir": "build" }, - "include": ["src/**/*.ts", "test/**/*.ts"] + "include": [ + "src/**/*.ts", + "test/**/*.ts" + ], + "references": [ + { + "path": "../opentelemetry-api" + }, + { + "path": "../opentelemetry-core" + }, + { + "path": "../opentelemetry-resources" + } + ] } diff --git a/packages/opentelemetry-resource-detector-gcp/package.json b/packages/opentelemetry-resource-detector-gcp/package.json index af5980df071..814b0a10f98 100644 --- a/packages/opentelemetry-resource-detector-gcp/package.json +++ b/packages/opentelemetry-resource-detector-gcp/package.json @@ -6,16 +6,14 @@ "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js", "scripts": { + "compile": "tsc --build", + "clean": "tsc --build --clean", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", "test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'", "tdd": "npm run test -- --watch-extensions ts --watch", "codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../", - "clean": "rimraf build/*", - "precompile": "tsc --version", - "version:update": "node ../../scripts/version-update.js", - "compile": "npm run version:update && tsc -p .", - "prepare": "npm run compile" + "version": "node ../../scripts/version-update.js" }, "keywords": [ "opentelemetry", diff --git a/packages/opentelemetry-resource-detector-gcp/tsconfig.json b/packages/opentelemetry-resource-detector-gcp/tsconfig.json index e4b3b29e6a2..6549996003e 100644 --- a/packages/opentelemetry-resource-detector-gcp/tsconfig.json +++ b/packages/opentelemetry-resource-detector-gcp/tsconfig.json @@ -1,8 +1,19 @@ { - "extends": "../tsconfig.base", + "extends": "../../tsconfig.base.json", "compilerOptions": { "rootDir": ".", "outDir": "build" }, - "include": ["src/**/*.ts", "test/**/*.ts"] + "include": [ + "src/**/*.ts", + "test/**/*.ts" + ], + "references": [ + { + "path": "../opentelemetry-core" + }, + { + "path": "../opentelemetry-resources" + } + ] } diff --git a/packages/opentelemetry-resources/package.json b/packages/opentelemetry-resources/package.json index d3c33aa2083..feb31a4a705 100644 --- a/packages/opentelemetry-resources/package.json +++ b/packages/opentelemetry-resources/package.json @@ -10,16 +10,14 @@ "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js", "scripts": { + "compile": "tsc --build", + "clean": "tsc --build --clean", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", "test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'", "tdd": "npm run test -- --watch-extensions ts --watch", "codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../", - "clean": "rimraf build/*", - "precompile": "tsc --version", - "version:update": "node ../../scripts/version-update.js", - "compile": "npm run version:update && tsc -p .", - "prepare": "npm run compile" + "version": "node ../../scripts/version-update.js" }, "keywords": [ "opentelemetry", diff --git a/packages/opentelemetry-resources/tsconfig.json b/packages/opentelemetry-resources/tsconfig.json index e4b3b29e6a2..951358df054 100644 --- a/packages/opentelemetry-resources/tsconfig.json +++ b/packages/opentelemetry-resources/tsconfig.json @@ -1,8 +1,19 @@ { - "extends": "../tsconfig.base", + "extends": "../../tsconfig.base.json", "compilerOptions": { "rootDir": ".", "outDir": "build" }, - "include": ["src/**/*.ts", "test/**/*.ts"] + "include": [ + "src/**/*.ts", + "test/**/*.ts" + ], + "references": [ + { + "path": "../opentelemetry-api" + }, + { + "path": "../opentelemetry-core" + } + ] } diff --git a/packages/opentelemetry-sdk-node/package.json b/packages/opentelemetry-sdk-node/package.json index bf79edfb100..ad7b7d2589e 100644 --- a/packages/opentelemetry-sdk-node/package.json +++ b/packages/opentelemetry-sdk-node/package.json @@ -6,15 +6,13 @@ "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js", "scripts": { + "compile": "tsc --build", + "clean": "tsc --build --clean", "test": "nyc ts-mocha -p tsconfig.json test/**/*.test.ts", "codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../", - "build": "npm run compile", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", - "precompile": "tsc --version", - "version:update": "node ../../scripts/version-update.js", - "compile": "npm run version:update && tsc -p .", - "prepare": "npm run compile", + "version": "node ../../scripts/version-update.js", "watch": "tsc -w" }, "keywords": [ diff --git a/packages/opentelemetry-sdk-node/tsconfig.json b/packages/opentelemetry-sdk-node/tsconfig.json index a2042cd68b1..544fb350f17 100644 --- a/packages/opentelemetry-sdk-node/tsconfig.json +++ b/packages/opentelemetry-sdk-node/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../tsconfig.base", + "extends": "../../tsconfig.base.json", "compilerOptions": { "rootDir": ".", "outDir": "build" @@ -7,5 +7,37 @@ "include": [ "src/**/*.ts", "test/**/*.ts" + ], + "references": [ + { + "path": "../opentelemetry-api" + }, + { + "path": "../opentelemetry-context-async-hooks" + }, + { + "path": "../opentelemetry-context-base" + }, + { + "path": "../opentelemetry-core" + }, + { + "path": "../opentelemetry-metrics" + }, + { + "path": "../opentelemetry-node" + }, + { + "path": "../opentelemetry-resource-detector-aws" + }, + { + "path": "../opentelemetry-resource-detector-gcp" + }, + { + "path": "../opentelemetry-resources" + }, + { + "path": "../opentelemetry-tracing" + } ] } diff --git a/packages/opentelemetry-semantic-conventions/package.json b/packages/opentelemetry-semantic-conventions/package.json index 8f258d122f6..15f84570716 100644 --- a/packages/opentelemetry-semantic-conventions/package.json +++ b/packages/opentelemetry-semantic-conventions/package.json @@ -6,15 +6,13 @@ "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js", "scripts": { + "compile": "tsc --build", + "clean": "tsc --build --clean", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", "test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'", "tdd": "npm run test -- --watch-extensions ts --watch", - "clean": "rimraf build/*", - "precompile": "tsc --version", - "version:update": "node ../../scripts/version-update.js", - "compile": "npm run version:update && tsc -p .", - "prepare": "npm run compile", + "version": "node ../../scripts/version-update.js", "watch": "tsc -w" }, "keywords": [ diff --git a/packages/opentelemetry-semantic-conventions/tsconfig.json b/packages/opentelemetry-semantic-conventions/tsconfig.json index 4f50329e885..a388bb16f97 100644 --- a/packages/opentelemetry-semantic-conventions/tsconfig.json +++ b/packages/opentelemetry-semantic-conventions/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../tsconfig.es5", + "extends": "../../tsconfig.es5.json", "compilerOptions": { "rootDir": ".", "outDir": "build" diff --git a/packages/opentelemetry-shim-opentracing/package.json b/packages/opentelemetry-shim-opentracing/package.json index b5043d870e1..31968f0e3bf 100644 --- a/packages/opentelemetry-shim-opentracing/package.json +++ b/packages/opentelemetry-shim-opentracing/package.json @@ -6,16 +6,14 @@ "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js", "scripts": { + "compile": "tsc --build", + "clean": "tsc --build --clean", "test": "nyc ts-mocha -p tsconfig.json test/**/*.test.ts", "tdd": "npm run test -- --watch-extensions ts --watch", "codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../", - "clean": "rimraf build/*", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", - "precompile": "tsc --version", - "version:update": "node ../../scripts/version-update.js", - "compile": "npm run version:update && tsc -p .", - "prepare": "npm run compile" + "version": "node ../../scripts/version-update.js" }, "keywords": [ "opentelemetry", diff --git a/packages/opentelemetry-shim-opentracing/tsconfig.json b/packages/opentelemetry-shim-opentracing/tsconfig.json index a2042cd68b1..6f45e411475 100644 --- a/packages/opentelemetry-shim-opentracing/tsconfig.json +++ b/packages/opentelemetry-shim-opentracing/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../tsconfig.base", + "extends": "../../tsconfig.base.json", "compilerOptions": { "rootDir": ".", "outDir": "build" @@ -7,5 +7,16 @@ "include": [ "src/**/*.ts", "test/**/*.ts" + ], + "references": [ + { + "path": "../opentelemetry-api" + }, + { + "path": "../opentelemetry-core" + }, + { + "path": "../opentelemetry-tracing" + } ] } diff --git a/packages/opentelemetry-tracing/package.json b/packages/opentelemetry-tracing/package.json index 19c496c350c..f218ee5cfc6 100644 --- a/packages/opentelemetry-tracing/package.json +++ b/packages/opentelemetry-tracing/package.json @@ -10,6 +10,8 @@ "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js", "scripts": { + "compile": "tsc --build", + "clean": "tsc --build --clean", "test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/index-webpack.ts'", "test:browser": "nyc karma start --single-run", "tdd": "npm run tdd:node", @@ -17,12 +19,8 @@ "tdd:browser": "karma start", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", - "clean": "rimraf build/*", "codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../", - "precompile": "tsc --version", - "version:update": "node ../../scripts/version-update.js", - "compile": "npm run version:update && tsc -p .", - "prepare": "npm run compile", + "version": "node ../../scripts/version-update.js", "watch": "tsc -w" }, "keywords": [ diff --git a/packages/opentelemetry-tracing/tsconfig.json b/packages/opentelemetry-tracing/tsconfig.json index a2042cd68b1..62cad81a138 100644 --- a/packages/opentelemetry-tracing/tsconfig.json +++ b/packages/opentelemetry-tracing/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../tsconfig.base", + "extends": "../../tsconfig.base.json", "compilerOptions": { "rootDir": ".", "outDir": "build" @@ -7,5 +7,22 @@ "include": [ "src/**/*.ts", "test/**/*.ts" + ], + "references": [ + { + "path": "../opentelemetry-api" + }, + { + "path": "../opentelemetry-context-base" + }, + { + "path": "../opentelemetry-core" + }, + { + "path": "../opentelemetry-resources" + }, + { + "path": "../opentelemetry-semantic-conventions" + } ] } diff --git a/packages/opentelemetry-web/package.json b/packages/opentelemetry-web/package.json index a88984f2e00..f238c8519c0 100644 --- a/packages/opentelemetry-web/package.json +++ b/packages/opentelemetry-web/package.json @@ -6,14 +6,12 @@ "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js", "scripts": { + "compile": "tsc --build", + "clean": "tsc --build --clean", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", - "clean": "rimraf build/*", "codecov:browser": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../", - "precompile": "tsc --version", - "version:update": "node ../../scripts/version-update.js", - "compile": "npm run version:update && tsc -p .", - "prepare": "npm run compile", + "version": "node ../../scripts/version-update.js", "tdd": "karma start", "test:browser": "nyc karma start --single-run", "watch": "tsc -w" diff --git a/packages/opentelemetry-web/tsconfig.json b/packages/opentelemetry-web/tsconfig.json index 71661a842ee..950d91905bb 100644 --- a/packages/opentelemetry-web/tsconfig.json +++ b/packages/opentelemetry-web/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../tsconfig.base", + "extends": "../../tsconfig.base.json", "compilerOptions": { "rootDir": ".", "outDir": "build", @@ -8,5 +8,34 @@ "include": [ "src/**/*.ts", "test/**/*.ts" + ], + "references": [ + { + "path": "../opentelemetry-api" + }, + { + "path": "../opentelemetry-context-base" + }, + { + "path": "../opentelemetry-context-zone" + }, + { + "path": "../opentelemetry-core" + }, + { + "path": "../opentelemetry-instrumentation" + }, + { + "path": "../opentelemetry-propagator-b3" + }, + { + "path": "../opentelemetry-resources" + }, + { + "path": "../opentelemetry-semantic-conventions" + }, + { + "path": "../opentelemetry-tracing" + } ] } diff --git a/packages/tsconfig.base.json b/tsconfig.base.json similarity index 95% rename from packages/tsconfig.base.json rename to tsconfig.base.json index 1b7e8c62dd0..83c860a1689 100644 --- a/packages/tsconfig.base.json +++ b/tsconfig.base.json @@ -2,6 +2,7 @@ "compilerOptions": { "allowUnreachableCode": false, "allowUnusedLabels": false, + "composite": true, "declaration": true, "declarationMap": true, "forceConsistentCasingInFileNames": true, diff --git a/packages/tsconfig.es5.json b/tsconfig.es5.json similarity index 100% rename from packages/tsconfig.es5.json rename to tsconfig.es5.json diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 00000000000..fc42a783f3b --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,114 @@ +{ + "extends": "./tsconfig.base.json", + "files": [], + "references": [ + { + "path": "backwards-compatability/node10" + }, + { + "path": "backwards-compatability/node12" + }, + { + "path": "backwards-compatability/node8" + }, + { + "path": "packages/opentelemetry-api" + }, + { + "path": "packages/opentelemetry-context-async-hooks" + }, + { + "path": "packages/opentelemetry-context-base" + }, + { + "path": "packages/opentelemetry-context-zone-peer-dep" + }, + { + "path": "packages/opentelemetry-context-zone" + }, + { + "path": "packages/opentelemetry-core" + }, + { + "path": "packages/opentelemetry-exporter-collector-grpc" + }, + { + "path": "packages/opentelemetry-exporter-collector-proto" + }, + { + "path": "packages/opentelemetry-exporter-collector" + }, + { + "path": "packages/opentelemetry-exporter-jaeger" + }, + { + "path": "packages/opentelemetry-exporter-prometheus" + }, + { + "path": "packages/opentelemetry-exporter-zipkin" + }, + { + "path": "packages/opentelemetry-grpc-utils" + }, + { + "path": "packages/opentelemetry-instrumentation-http" + }, + { + "path": "packages/opentelemetry-instrumentation-xml-http-request" + }, + { + "path": "packages/opentelemetry-instrumentation" + }, + { + "path": "packages/opentelemetry-metrics" + }, + { + "path": "packages/opentelemetry-node" + }, + { + "path": "packages/opentelemetry-plugin-fetch" + }, + { + "path": "packages/opentelemetry-plugin-grpc-js" + }, + { + "path": "packages/opentelemetry-plugin-grpc" + }, + { + "path": "packages/opentelemetry-plugin-http" + }, + { + "path": "packages/opentelemetry-plugin-https" + }, + { + "path": "packages/opentelemetry-propagator-b3" + }, + { + "path": "packages/opentelemetry-resource-detector-aws" + }, + { + "path": "packages/opentelemetry-resource-detector-gcp" + }, + { + "path": "packages/opentelemetry-resources" + }, + { + "path": "packages/opentelemetry-sdk-node" + }, + { + "path": "packages/opentelemetry-semantic-conventions" + }, + { + "path": "packages/opentelemetry-shim-opentracing" + }, + { + "path": "packages/opentelemetry-tracing" + }, + { + "path": "packages/opentelemetry-web" + }, + { + "path": "integration-tests/propagation-validation-server" + } + ] +}