diff --git a/experimental/packages/opentelemetry-api-metrics/package.json b/experimental/packages/opentelemetry-api-metrics/package.json index 0f83155dff..d83afa0395 100644 --- a/experimental/packages/opentelemetry-api-metrics/package.json +++ b/experimental/packages/opentelemetry-api-metrics/package.json @@ -15,6 +15,7 @@ }, "repository": "open-telemetry/opentelemetry-js", "scripts": { + "publishOnly": "npm run compile", "compile": "tsc --build tsconfig.all.json", "clean": "tsc --build --clean tsconfig.all.json", "test": "nyc ts-mocha -p tsconfig.json test/**/*.test.ts", diff --git a/experimental/packages/opentelemetry-exporter-metrics-otlp-grpc/package.json b/experimental/packages/opentelemetry-exporter-metrics-otlp-grpc/package.json index b630a9575c..d6248ce3d4 100644 --- a/experimental/packages/opentelemetry-exporter-metrics-otlp-grpc/package.json +++ b/experimental/packages/opentelemetry-exporter-metrics-otlp-grpc/package.json @@ -6,6 +6,7 @@ "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js", "scripts": { + "publishOnly": "npm run compile", "compile": "tsc --build", "clean": "tsc --build --clean", "lint": "eslint . --ext .ts", diff --git a/experimental/packages/opentelemetry-exporter-metrics-otlp-http/package.json b/experimental/packages/opentelemetry-exporter-metrics-otlp-http/package.json index d7fcb2fa6c..318955f8e2 100644 --- a/experimental/packages/opentelemetry-exporter-metrics-otlp-http/package.json +++ b/experimental/packages/opentelemetry-exporter-metrics-otlp-http/package.json @@ -14,6 +14,7 @@ "./build/src/platform/index.js": "./build/src/platform/browser/index.js" }, "scripts": { + "publishOnly": "npm run compile", "compile": "tsc --build tsconfig.all.json", "clean": "tsc --build --clean tsconfig.all.json", "codecov:browser": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../", diff --git a/experimental/packages/opentelemetry-exporter-metrics-otlp-proto/package.json b/experimental/packages/opentelemetry-exporter-metrics-otlp-proto/package.json index bb4fb0539b..ad532cb692 100644 --- a/experimental/packages/opentelemetry-exporter-metrics-otlp-proto/package.json +++ b/experimental/packages/opentelemetry-exporter-metrics-otlp-proto/package.json @@ -6,6 +6,7 @@ "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js", "scripts": { + "publishOnly": "npm run compile", "compile": "tsc --build", "clean": "tsc --build --clean", "lint": "eslint . --ext .ts", diff --git a/experimental/packages/opentelemetry-exporter-prometheus/package.json b/experimental/packages/opentelemetry-exporter-prometheus/package.json index 536f61e136..e7743aecf8 100644 --- a/experimental/packages/opentelemetry-exporter-prometheus/package.json +++ b/experimental/packages/opentelemetry-exporter-prometheus/package.json @@ -6,6 +6,7 @@ "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js", "scripts": { + "publishOnly": "npm run compile", "compile": "tsc --build", "clean": "tsc --build --clean", "test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'", diff --git a/experimental/packages/opentelemetry-instrumentation-fetch/package.json b/experimental/packages/opentelemetry-instrumentation-fetch/package.json index 715e8cae53..ef3db93b11 100644 --- a/experimental/packages/opentelemetry-instrumentation-fetch/package.json +++ b/experimental/packages/opentelemetry-instrumentation-fetch/package.json @@ -8,6 +8,7 @@ "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js", "scripts": { + "publishOnly": "npm run compile", "compile": "tsc --build tsconfig.all.json", "clean": "tsc --build --clean tsconfig.all.json", "lint": "eslint . --ext .ts", diff --git a/experimental/packages/opentelemetry-instrumentation-grpc/package.json b/experimental/packages/opentelemetry-instrumentation-grpc/package.json index 126e8e53f8..674106bd68 100644 --- a/experimental/packages/opentelemetry-instrumentation-grpc/package.json +++ b/experimental/packages/opentelemetry-instrumentation-grpc/package.json @@ -6,6 +6,7 @@ "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js", "scripts": { + "publishOnly": "npm run compile", "compile": "tsc --build", "clean": "tsc --build --clean", "test": "nyc ts-mocha -p tsconfig.json test/**/*.test.ts", diff --git a/experimental/packages/opentelemetry-instrumentation-http/package.json b/experimental/packages/opentelemetry-instrumentation-http/package.json index e287d9429a..d1860ae151 100644 --- a/experimental/packages/opentelemetry-instrumentation-http/package.json +++ b/experimental/packages/opentelemetry-instrumentation-http/package.json @@ -6,6 +6,7 @@ "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js", "scripts": { + "publishOnly": "npm run compile", "compile": "tsc --build", "clean": "tsc --build --clean", "test": "nyc ts-mocha -p tsconfig.json test/**/*.test.ts", diff --git a/experimental/packages/opentelemetry-instrumentation-xml-http-request/package.json b/experimental/packages/opentelemetry-instrumentation-xml-http-request/package.json index 434171f642..011d6d7723 100644 --- a/experimental/packages/opentelemetry-instrumentation-xml-http-request/package.json +++ b/experimental/packages/opentelemetry-instrumentation-xml-http-request/package.json @@ -8,6 +8,7 @@ "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js", "scripts": { + "publishOnly": "npm run compile", "compile": "tsc --build tsconfig.all.json", "clean": "tsc --build --clean tsconfig.all.json", "lint": "eslint . --ext .ts", diff --git a/experimental/packages/opentelemetry-instrumentation/package.json b/experimental/packages/opentelemetry-instrumentation/package.json index f70dc719da..a0be9ed8ee 100644 --- a/experimental/packages/opentelemetry-instrumentation/package.json +++ b/experimental/packages/opentelemetry-instrumentation/package.json @@ -26,6 +26,9 @@ "build/esm/**/*.js", "build/esm/**/*.js.map", "build/esm/**/*.d.ts", + "build/esnext/**/*.js", + "build/esnext/**/*.js.map", + "build/esnext/**/*.d.ts", "build/src/**/*.js", "build/src/**/*.js.map", "build/src/**/*.d.ts", @@ -34,6 +37,7 @@ "README.md" ], "scripts": { + "publishOnly": "npm run compile", "compile": "tsc --build tsconfig.all.json", "clean": "tsc --build --clean tsconfig.all.json", "codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../", diff --git a/experimental/packages/opentelemetry-sdk-metrics-base/package.json b/experimental/packages/opentelemetry-sdk-metrics-base/package.json index 35f62cfb15..e87c4c7a4f 100644 --- a/experimental/packages/opentelemetry-sdk-metrics-base/package.json +++ b/experimental/packages/opentelemetry-sdk-metrics-base/package.json @@ -9,6 +9,7 @@ "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js", "scripts": { + "publishOnly": "npm run compile", "compile": "tsc --build tsconfig.all.json", "clean": "tsc --build --clean tsconfig.all.json", "test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'", diff --git a/experimental/packages/opentelemetry-sdk-node/package.json b/experimental/packages/opentelemetry-sdk-node/package.json index 88c35e48dc..a330bd70ad 100644 --- a/experimental/packages/opentelemetry-sdk-node/package.json +++ b/experimental/packages/opentelemetry-sdk-node/package.json @@ -6,6 +6,7 @@ "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js", "scripts": { + "publishOnly": "npm run compile", "compile": "tsc --build", "clean": "tsc --build --clean", "test": "nyc ts-mocha -p tsconfig.json test/**/*.test.ts", diff --git a/packages/exporter-trace-otlp-grpc/package.json b/packages/exporter-trace-otlp-grpc/package.json index fedbc60311..d02baaefe0 100644 --- a/packages/exporter-trace-otlp-grpc/package.json +++ b/packages/exporter-trace-otlp-grpc/package.json @@ -7,6 +7,7 @@ "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js", "scripts": { + "publishOnly": "npm run compile", "compile": "tsc --build", "clean": "tsc --build --clean", "lint": "eslint . --ext .ts", diff --git a/packages/exporter-trace-otlp-http/package.json b/packages/exporter-trace-otlp-http/package.json index 789febaf33..1f457b96df 100644 --- a/packages/exporter-trace-otlp-http/package.json +++ b/packages/exporter-trace-otlp-http/package.json @@ -15,6 +15,7 @@ "./build/src/platform/index.js": "./build/src/platform/browser/index.js" }, "scripts": { + "publishOnly": "npm run compile", "compile": "tsc --build tsconfig.all.json", "clean": "tsc --build --clean tsconfig.all.json", "codecov:browser": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../", diff --git a/packages/exporter-trace-otlp-proto/package.json b/packages/exporter-trace-otlp-proto/package.json index 72d827078e..009ca74601 100644 --- a/packages/exporter-trace-otlp-proto/package.json +++ b/packages/exporter-trace-otlp-proto/package.json @@ -7,6 +7,7 @@ "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js", "scripts": { + "publishOnly": "npm run compile", "compile": "tsc --build", "clean": "tsc --build --clean", "lint": "eslint . --ext .ts", diff --git a/packages/opentelemetry-context-async-hooks/package.json b/packages/opentelemetry-context-async-hooks/package.json index 65bac61d60..088d7f0da7 100644 --- a/packages/opentelemetry-context-async-hooks/package.json +++ b/packages/opentelemetry-context-async-hooks/package.json @@ -6,6 +6,7 @@ "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js", "scripts": { + "publishOnly": "npm run compile", "compile": "tsc --build", "clean": "tsc --build --clean", "test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'", diff --git a/packages/opentelemetry-context-zone-peer-dep/package.json b/packages/opentelemetry-context-zone-peer-dep/package.json index 4c8953720e..c8db4277d2 100644 --- a/packages/opentelemetry-context-zone-peer-dep/package.json +++ b/packages/opentelemetry-context-zone-peer-dep/package.json @@ -8,6 +8,7 @@ "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js", "scripts": { + "publishOnly": "npm run compile", "compile": "tsc --build tsconfig.all.json", "clean": "tsc --build --clean tsconfig.all.json", "lint": "eslint . --ext .ts", diff --git a/packages/opentelemetry-context-zone/package.json b/packages/opentelemetry-context-zone/package.json index 72bfb0c158..04bd8caf4e 100644 --- a/packages/opentelemetry-context-zone/package.json +++ b/packages/opentelemetry-context-zone/package.json @@ -8,6 +8,7 @@ "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js", "scripts": { + "publishOnly": "npm run compile", "compile": "tsc --build tsconfig.all.json", "clean": "tsc --build --clean tsconfig.all.json", "lint": "eslint . --ext .ts", diff --git a/packages/opentelemetry-core/package.json b/packages/opentelemetry-core/package.json index 1dadfa8f90..5f4eb88ab6 100644 --- a/packages/opentelemetry-core/package.json +++ b/packages/opentelemetry-core/package.json @@ -14,6 +14,7 @@ "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js", "scripts": { + "publishOnly": "npm run compile", "compile": "tsc --build tsconfig.all.json", "clean": "tsc --build --clean tsconfig.all.json", "test": "nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'", diff --git a/packages/opentelemetry-exporter-jaeger/package.json b/packages/opentelemetry-exporter-jaeger/package.json index 7345601ac8..187edb3673 100644 --- a/packages/opentelemetry-exporter-jaeger/package.json +++ b/packages/opentelemetry-exporter-jaeger/package.json @@ -6,6 +6,7 @@ "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js", "scripts": { + "publishOnly": "npm run compile", "compile": "tsc --build", "clean": "tsc --build --clean", "test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'", diff --git a/packages/opentelemetry-exporter-zipkin/package.json b/packages/opentelemetry-exporter-zipkin/package.json index cc8d50317b..40682f3156 100644 --- a/packages/opentelemetry-exporter-zipkin/package.json +++ b/packages/opentelemetry-exporter-zipkin/package.json @@ -14,6 +14,7 @@ "./build/src/platform/index.js": "./build/src/platform/browser/index.js" }, "scripts": { + "publishOnly": "npm run compile", "compile": "tsc --build tsconfig.all.json", "clean": "tsc --build --clean tsconfig.all.json", "codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../", diff --git a/packages/opentelemetry-propagator-b3/package.json b/packages/opentelemetry-propagator-b3/package.json index 7296aef40a..21d8b07e1b 100644 --- a/packages/opentelemetry-propagator-b3/package.json +++ b/packages/opentelemetry-propagator-b3/package.json @@ -8,6 +8,7 @@ "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js", "scripts": { + "publishOnly": "npm run compile", "compile": "tsc --build tsconfig.all.json", "clean": "tsc --build --clean tsconfig.all.json", "test": "nyc ts-mocha -p tsconfig.json test/**/*.test.ts", diff --git a/packages/opentelemetry-propagator-jaeger/package.json b/packages/opentelemetry-propagator-jaeger/package.json index 63484082b5..101554f96d 100644 --- a/packages/opentelemetry-propagator-jaeger/package.json +++ b/packages/opentelemetry-propagator-jaeger/package.json @@ -7,18 +7,19 @@ "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js", "scripts": { - "compile": "tsc --build tsconfig.json tsconfig.esm.json", + "publishOnly": "npm run compile", + "compile": "tsc --build tsconfig.all.json", "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", "tdd:node": "npm run test -- --watch-extensions ts --watch", "tdd:browser": "karma start", "codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../", - "clean": "tsc --build --clean tsconfig.json tsconfig.esm.json", + "clean": "tsc --build --clean tsconfig.all.json", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", "version": "node ../../scripts/version-update.js", - "watch": "tsc --build --watch tsconfig.json tsconfig.esm.json", + "watch": "tsc --build --watch tsconfig.all.json", "precompile": "lerna run version --scope $(npm pkg get name) --include-dependencies", "prewatch": "npm run precompile" }, @@ -38,6 +39,9 @@ "build/esm/**/*.js", "build/esm/**/*.js.map", "build/esm/**/*.d.ts", + "build/esnext/**/*.js", + "build/esnext/**/*.js.map", + "build/esnext/**/*.d.ts", "build/src/**/*.js", "build/src/**/*.js.map", "build/src/**/*.d.ts", diff --git a/packages/opentelemetry-propagator-jaeger/tsconfig.all.json b/packages/opentelemetry-propagator-jaeger/tsconfig.all.json new file mode 100644 index 0000000000..4d28a993d3 --- /dev/null +++ b/packages/opentelemetry-propagator-jaeger/tsconfig.all.json @@ -0,0 +1,9 @@ +{ + "extends": "../../tsconfig.base.json", + "files": [], + "references": [ + { "path": "./tsconfig.json" }, + { "path": "./tsconfig.esm.json" }, + { "path": "./tsconfig.esnext.json" } + ] +} diff --git a/packages/opentelemetry-propagator-jaeger/tsconfig.esnext.json b/packages/opentelemetry-propagator-jaeger/tsconfig.esnext.json new file mode 100644 index 0000000000..14b360b653 --- /dev/null +++ b/packages/opentelemetry-propagator-jaeger/tsconfig.esnext.json @@ -0,0 +1,16 @@ +{ + "extends": "../../tsconfig.base.esnext.json", + "compilerOptions": { + "rootDir": "src", + "outDir": "build/esnext", + "tsBuildInfoFile": "build/esnext/tsconfig.esnext.tsbuildinfo" + }, + "include": [ + "src/**/*.ts" + ], + "references": [ + { + "path": "../opentelemetry-core/tsconfig.esnext.json" + } + ] +} diff --git a/packages/opentelemetry-resources/package.json b/packages/opentelemetry-resources/package.json index a9cff4b122..20298d451b 100644 --- a/packages/opentelemetry-resources/package.json +++ b/packages/opentelemetry-resources/package.json @@ -14,6 +14,7 @@ "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js", "scripts": { + "publishOnly": "npm run compile", "compile": "tsc --build tsconfig.all.json", "clean": "tsc --build --clean tsconfig.all.json", "codecov:browser": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../", diff --git a/packages/opentelemetry-sdk-trace-base/package.json b/packages/opentelemetry-sdk-trace-base/package.json index abe1898566..a03fdda16f 100644 --- a/packages/opentelemetry-sdk-trace-base/package.json +++ b/packages/opentelemetry-sdk-trace-base/package.json @@ -14,6 +14,7 @@ "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js", "scripts": { + "publishOnly": "npm run compile", "compile": "tsc --build tsconfig.all.json", "clean": "tsc --build --clean tsconfig.all.json", "test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'", diff --git a/packages/opentelemetry-sdk-trace-node/package.json b/packages/opentelemetry-sdk-trace-node/package.json index 06a8b56044..8fb815def9 100644 --- a/packages/opentelemetry-sdk-trace-node/package.json +++ b/packages/opentelemetry-sdk-trace-node/package.json @@ -6,6 +6,7 @@ "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js", "scripts": { + "publishOnly": "npm run compile", "compile": "tsc --build", "clean": "tsc --build --clean", "test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'", diff --git a/packages/opentelemetry-sdk-trace-web/package.json b/packages/opentelemetry-sdk-trace-web/package.json index 594f68deda..2bb0324710 100644 --- a/packages/opentelemetry-sdk-trace-web/package.json +++ b/packages/opentelemetry-sdk-trace-web/package.json @@ -8,6 +8,7 @@ "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js", "scripts": { + "publishOnly": "npm run compile", "compile": "tsc --build tsconfig.all.json", "clean": "tsc --build --clean tsconfig.all.json", "lint": "eslint . --ext .ts", diff --git a/packages/opentelemetry-semantic-conventions/package.json b/packages/opentelemetry-semantic-conventions/package.json index 8e2718f672..722ce659f6 100644 --- a/packages/opentelemetry-semantic-conventions/package.json +++ b/packages/opentelemetry-semantic-conventions/package.json @@ -8,6 +8,7 @@ "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js", "scripts": { + "publishOnly": "npm run compile", "compile": "tsc --build tsconfig.all.json", "clean": "tsc --build --clean tsconfig.all.json", "lint": "eslint . --ext .ts", diff --git a/packages/opentelemetry-shim-opentracing/package.json b/packages/opentelemetry-shim-opentracing/package.json index 98d00b265e..88a824ef65 100644 --- a/packages/opentelemetry-shim-opentracing/package.json +++ b/packages/opentelemetry-shim-opentracing/package.json @@ -6,6 +6,7 @@ "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js", "scripts": { + "publishOnly": "npm run compile", "compile": "tsc --build", "clean": "tsc --build --clean", "test": "nyc ts-mocha -p tsconfig.json test/**/*.test.ts", diff --git a/packages/template/package.json b/packages/template/package.json index 99e565083d..515aa6159f 100644 --- a/packages/template/package.json +++ b/packages/template/package.json @@ -11,6 +11,10 @@ "license": "Apache-2.0", "main": "build/src/index.js", "types": "build/src/index.d.ts", + "Add these entries if browser is supported": { + "module": "build/esm/index.js", + "esnext": "build/esnext/index.js" + }, "repository": { "type": "git", "url": "git+https://github.com/open-telemetry/opentelemetry-js.git" @@ -22,6 +26,7 @@ "node": ">=8.5.0" }, "scripts": { + "publishOnly": "npm run compile", "compile": "tsc --build", "version": "node ../../scripts/version-update.js", "clean": "tsc --build --clean", @@ -39,11 +44,11 @@ "watch": "tsc --build --watch" }, "Add/change these to scripts if browser is supported": { - "compile": "tsc --build tsconfig.json tsconfig.esm.json", - "clean": "tsc --build --clean tsconfig.json tsconfig.esm.json", + "compile": "tsc --build tsconfig.all.json", + "clean": "tsc --build --clean tsconfig.all.json", "test:browser": "nyc karma start --single-run", "codecov:browser": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../", - "watch": "tsc --build --watch tsconfig.json tsconfig.esm.json" + "watch": "tsc --build --watch tsconfig.all.json" }, "keywords": [ "opentelemetry", @@ -65,7 +70,10 @@ "Add these to files if browser is supported": [ "build/esm/**/*.js", "build/esm/**/*.js.map", - "build/esm/**/*.d.ts" + "build/esm/**/*.d.ts", + "build/esnext/**/*.js", + "build/esnext/**/*.js.map", + "build/esnext/**/*.d.ts" ], "devDependencies": { "@types/node": "14.17.33", diff --git a/packages/template/tsconfig.all.json b/packages/template/tsconfig.all.json new file mode 100644 index 0000000000..4d28a993d3 --- /dev/null +++ b/packages/template/tsconfig.all.json @@ -0,0 +1,9 @@ +{ + "extends": "../../tsconfig.base.json", + "files": [], + "references": [ + { "path": "./tsconfig.json" }, + { "path": "./tsconfig.esm.json" }, + { "path": "./tsconfig.esnext.json" } + ] +} diff --git a/packages/template/tsconfig.esnext.json b/packages/template/tsconfig.esnext.json new file mode 100644 index 0000000000..65a918cf6b --- /dev/null +++ b/packages/template/tsconfig.esnext.json @@ -0,0 +1,11 @@ +{ + "extends": "../../tsconfig.base.esnext.json", + "compilerOptions": { + "rootDir": "src", + "outDir": "build/esnext", + "tsBuildInfoFile": "build/esnext/tsconfig.esnext.tsbuildinfo" + }, + "include": [ + "src/**/*.ts" + ] +}