diff --git a/experimental/packages/opentelemetry-api-metrics/package.json b/experimental/packages/opentelemetry-api-metrics/package.json index c577c9a1cb..e4a17b9943 100644 --- a/experimental/packages/opentelemetry-api-metrics/package.json +++ b/experimental/packages/opentelemetry-api-metrics/package.json @@ -5,16 +5,18 @@ "description": "Public metrics API for OpenTelemetry", "main": "build/src/index.js", "module": "build/esm/index.js", + "esm2015": "build/esm2015/index.js", "types": "build/src/index.d.ts", "browser": { "./src/platform/index.ts": "./src/platform/browser/index.ts", "./build/esm/platform/index.js": "./build/esm/platform/browser/index.js", + "./build/esm2015/platform/index.js": "./build/esm2015/platform/browser/index.js", "./build/src/platform/index.js": "./build/src/platform/browser/index.js" }, "repository": "open-telemetry/opentelemetry-js", "scripts": { - "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": "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 ../../", @@ -23,7 +25,7 @@ "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-filtered-dependencies", "prewatch": "node ../../../scripts/version-update.js" }, @@ -45,6 +47,9 @@ "build/esm/**/*.js", "build/esm/**/*.js.map", "build/esm/**/*.d.ts", + "build/esm2015/**/*.js", + "build/esm2015/**/*.js.map", + "build/esm2015/**/*.d.ts", "build/src/**/*.js", "build/src/**/*.js.map", "build/src/**/*.d.ts", diff --git a/experimental/packages/opentelemetry-api-metrics/tsconfig.all.json b/experimental/packages/opentelemetry-api-metrics/tsconfig.all.json new file mode 100644 index 0000000000..1a2f9e96aa --- /dev/null +++ b/experimental/packages/opentelemetry-api-metrics/tsconfig.all.json @@ -0,0 +1,9 @@ +{ + "extends": "../../../tsconfig.base.json", + "files": [], + "references": [ + { "path": "./tsconfig.json" }, + { "path": "./tsconfig.esm.json" }, + { "path": "./tsconfig.esm2015.json" } + ] +} diff --git a/experimental/packages/opentelemetry-api-metrics/tsconfig.esm2015.json b/experimental/packages/opentelemetry-api-metrics/tsconfig.esm2015.json new file mode 100644 index 0000000000..b1a5a79f6b --- /dev/null +++ b/experimental/packages/opentelemetry-api-metrics/tsconfig.esm2015.json @@ -0,0 +1,11 @@ +{ + "extends": "../../../tsconfig.base.esm2015.json", + "compilerOptions": { + "rootDir": "src", + "outDir": "build/esm2015", + "tsBuildInfoFile": "build/esm2015/tsconfig.esm2015.tsbuildinfo" + }, + "include": [ + "src/**/*.ts" + ] +} diff --git a/experimental/packages/opentelemetry-api-metrics/tsconfig.json b/experimental/packages/opentelemetry-api-metrics/tsconfig.json index ff9d6942fb..ed9d0830bd 100644 --- a/experimental/packages/opentelemetry-api-metrics/tsconfig.json +++ b/experimental/packages/opentelemetry-api-metrics/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../../tsconfig.es5.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { "rootDir": ".", "outDir": "build" diff --git a/experimental/packages/opentelemetry-exporter-metrics-otlp-http/package.json b/experimental/packages/opentelemetry-exporter-metrics-otlp-http/package.json index fa3310c8cd..26eaafa001 100644 --- a/experimental/packages/opentelemetry-exporter-metrics-otlp-http/package.json +++ b/experimental/packages/opentelemetry-exporter-metrics-otlp-http/package.json @@ -4,16 +4,18 @@ "description": "OpenTelemetry Collector Metrics Exporter allows user to send collected metrics to the OpenTelemetry Collector", "main": "build/src/index.js", "module": "build/esm/index.js", + "esm2015": "build/esm2015/index.js", "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js", "browser": { "./src/platform/index.ts": "./src/platform/browser/index.ts", "./build/esm/platform/index.js": "./build/esm/platform/browser/index.js", + "./build/esm2015/platform/index.js": "./build/esm2015/platform/browser/index.js", "./build/src/platform/index.js": "./build/src/platform/browser/index.js" }, "scripts": { - "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", "codecov:browser": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", @@ -22,7 +24,7 @@ "test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'", "test:browser": "nyc karma start --single-run", "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-filtered-dependencies", "prewatch": "npm run precompile" }, @@ -44,6 +46,9 @@ "build/esm/**/*.js", "build/esm/**/*.js.map", "build/esm/**/*.d.ts", + "build/esm2015/**/*.js", + "build/esm2015/**/*.js.map", + "build/esm2015/**/*.d.ts", "build/src/**/*.js", "build/src/**/*.js.map", "build/src/**/*.d.ts", diff --git a/experimental/packages/opentelemetry-exporter-metrics-otlp-http/tsconfig.all.json b/experimental/packages/opentelemetry-exporter-metrics-otlp-http/tsconfig.all.json new file mode 100644 index 0000000000..1a2f9e96aa --- /dev/null +++ b/experimental/packages/opentelemetry-exporter-metrics-otlp-http/tsconfig.all.json @@ -0,0 +1,9 @@ +{ + "extends": "../../../tsconfig.base.json", + "files": [], + "references": [ + { "path": "./tsconfig.json" }, + { "path": "./tsconfig.esm.json" }, + { "path": "./tsconfig.esm2015.json" } + ] +} diff --git a/experimental/packages/opentelemetry-exporter-metrics-otlp-http/tsconfig.esm2015.json b/experimental/packages/opentelemetry-exporter-metrics-otlp-http/tsconfig.esm2015.json new file mode 100644 index 0000000000..709c58f870 --- /dev/null +++ b/experimental/packages/opentelemetry-exporter-metrics-otlp-http/tsconfig.esm2015.json @@ -0,0 +1,16 @@ +{ + "extends": "../../../tsconfig.base.esm2015.json", + "compilerOptions": { + "rootDir": "src", + "outDir": "build/esm2015", + "tsBuildInfoFile": "build/esm2015/tsconfig.esm2015.tsbuildinfo" + }, + "include": [ + "src/**/*.ts" + ], + "references": [ + { + "path": "../opentelemetry-exporter-trace-otlp-http/tsconfig.esm2015.json" + } + ] +} \ No newline at end of file diff --git a/experimental/packages/opentelemetry-exporter-trace-otlp-http/package.json b/experimental/packages/opentelemetry-exporter-trace-otlp-http/package.json index b9ad99b716..490a7ee07c 100644 --- a/experimental/packages/opentelemetry-exporter-trace-otlp-http/package.json +++ b/experimental/packages/opentelemetry-exporter-trace-otlp-http/package.json @@ -4,16 +4,18 @@ "description": "OpenTelemetry Collector Trace Exporter allows user to send collected traces to the OpenTelemetry Collector", "main": "build/src/index.js", "module": "build/esm/index.js", + "esm2015": "build/esm2015/index.js", "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js", "browser": { "./src/platform/index.ts": "./src/platform/browser/index.ts", "./build/esm/platform/index.js": "./build/esm/platform/browser/index.js", + "./build/esm2015/platform/index.js": "./build/esm2015/platform/browser/index.js", "./build/src/platform/index.js": "./build/src/platform/browser/index.js" }, "scripts": { - "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", "codecov:browser": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", @@ -22,7 +24,7 @@ "test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'", "test:browser": "nyc karma start --single-run", "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-filtered-dependencies", "prewatch": "npm run precompile" }, @@ -44,6 +46,9 @@ "build/esm/**/*.js", "build/esm/**/*.js.map", "build/esm/**/*.d.ts", + "build/esm2015/**/*.js", + "build/esm2015/**/*.js.map", + "build/esm2015/**/*.d.ts", "build/src/**/*.js", "build/src/**/*.js.map", "build/src/**/*.d.ts", diff --git a/experimental/packages/opentelemetry-exporter-trace-otlp-http/tsconfig.all.json b/experimental/packages/opentelemetry-exporter-trace-otlp-http/tsconfig.all.json new file mode 100644 index 0000000000..1a2f9e96aa --- /dev/null +++ b/experimental/packages/opentelemetry-exporter-trace-otlp-http/tsconfig.all.json @@ -0,0 +1,9 @@ +{ + "extends": "../../../tsconfig.base.json", + "files": [], + "references": [ + { "path": "./tsconfig.json" }, + { "path": "./tsconfig.esm.json" }, + { "path": "./tsconfig.esm2015.json" } + ] +} diff --git a/experimental/packages/opentelemetry-exporter-trace-otlp-http/tsconfig.esm2015.json b/experimental/packages/opentelemetry-exporter-trace-otlp-http/tsconfig.esm2015.json new file mode 100644 index 0000000000..b1a5a79f6b --- /dev/null +++ b/experimental/packages/opentelemetry-exporter-trace-otlp-http/tsconfig.esm2015.json @@ -0,0 +1,11 @@ +{ + "extends": "../../../tsconfig.base.esm2015.json", + "compilerOptions": { + "rootDir": "src", + "outDir": "build/esm2015", + "tsBuildInfoFile": "build/esm2015/tsconfig.esm2015.tsbuildinfo" + }, + "include": [ + "src/**/*.ts" + ] +} diff --git a/experimental/packages/opentelemetry-instrumentation-fetch/package.json b/experimental/packages/opentelemetry-instrumentation-fetch/package.json index 1777b5f11f..342002661e 100644 --- a/experimental/packages/opentelemetry-instrumentation-fetch/package.json +++ b/experimental/packages/opentelemetry-instrumentation-fetch/package.json @@ -4,18 +4,19 @@ "description": "OpenTelemetry fetch automatic instrumentation package.", "main": "build/src/index.js", "module": "build/esm/index.js", + "esm2015": "build/esm2015/index.js", "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js", "scripts": { - "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", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", "codecov:browser": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../", "version": "node ../../../scripts/version-update.js", "tdd": "karma start", "test:browser": "nyc karma start --single-run", - "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-filtered-dependencies", "prewatch": "node ../../../scripts/version-update.js" }, @@ -37,6 +38,9 @@ "build/esm/**/*.js", "build/esm/**/*.js.map", "build/esm/**/*.d.ts", + "build/esm2015/**/*.js", + "build/esm2015/**/*.js.map", + "build/esm2015/**/*.d.ts", "build/src/**/*.js", "build/src/**/*.js.map", "build/src/**/*.d.ts", diff --git a/experimental/packages/opentelemetry-instrumentation-fetch/tsconfig.all.json b/experimental/packages/opentelemetry-instrumentation-fetch/tsconfig.all.json new file mode 100644 index 0000000000..1a2f9e96aa --- /dev/null +++ b/experimental/packages/opentelemetry-instrumentation-fetch/tsconfig.all.json @@ -0,0 +1,9 @@ +{ + "extends": "../../../tsconfig.base.json", + "files": [], + "references": [ + { "path": "./tsconfig.json" }, + { "path": "./tsconfig.esm.json" }, + { "path": "./tsconfig.esm2015.json" } + ] +} diff --git a/experimental/packages/opentelemetry-instrumentation-fetch/tsconfig.esm2015.json b/experimental/packages/opentelemetry-instrumentation-fetch/tsconfig.esm2015.json new file mode 100644 index 0000000000..b309182079 --- /dev/null +++ b/experimental/packages/opentelemetry-instrumentation-fetch/tsconfig.esm2015.json @@ -0,0 +1,16 @@ +{ + "extends": "../../../tsconfig.base.esm2015.json", + "compilerOptions": { + "rootDir": "src", + "outDir": "build/esm2015", + "tsBuildInfoFile": "build/esm2015/tsconfig.esm2015.tsbuildinfo" + }, + "include": [ + "src/**/*.ts" + ], + "references": [ + { + "path": "../opentelemetry-instrumentation/tsconfig.esm2015.json" + } + ] +} diff --git a/experimental/packages/opentelemetry-instrumentation-xml-http-request/package.json b/experimental/packages/opentelemetry-instrumentation-xml-http-request/package.json index 166d09c72a..897517fe8c 100644 --- a/experimental/packages/opentelemetry-instrumentation-xml-http-request/package.json +++ b/experimental/packages/opentelemetry-instrumentation-xml-http-request/package.json @@ -4,18 +4,19 @@ "description": "OpenTelemetry XMLHttpRequest automatic instrumentation package.", "main": "build/src/index.js", "module": "build/esm/index.js", + "esm2015": "build/esm2015/index.js", "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js", "scripts": { - "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", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", "codecov:browser": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../", "version": "node ../../../scripts/version-update.js", "tdd": "karma start", "test:browser": "nyc karma start --single-run", - "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-filtered-dependencies", "prewatch": "node ../../../scripts/version-update.js" }, @@ -37,6 +38,9 @@ "build/esm/**/*.js", "build/esm/**/*.js.map", "build/esm/**/*.d.ts", + "build/esm2015/**/*.js", + "build/esm2015/**/*.js.map", + "build/esm2015/**/*.d.ts", "build/src/**/*.js", "build/src/**/*.js.map", "build/src/**/*.d.ts", diff --git a/experimental/packages/opentelemetry-instrumentation-xml-http-request/tsconfig.all.json b/experimental/packages/opentelemetry-instrumentation-xml-http-request/tsconfig.all.json new file mode 100644 index 0000000000..1a2f9e96aa --- /dev/null +++ b/experimental/packages/opentelemetry-instrumentation-xml-http-request/tsconfig.all.json @@ -0,0 +1,9 @@ +{ + "extends": "../../../tsconfig.base.json", + "files": [], + "references": [ + { "path": "./tsconfig.json" }, + { "path": "./tsconfig.esm.json" }, + { "path": "./tsconfig.esm2015.json" } + ] +} diff --git a/experimental/packages/opentelemetry-instrumentation-xml-http-request/tsconfig.esm2015.json b/experimental/packages/opentelemetry-instrumentation-xml-http-request/tsconfig.esm2015.json new file mode 100644 index 0000000000..b309182079 --- /dev/null +++ b/experimental/packages/opentelemetry-instrumentation-xml-http-request/tsconfig.esm2015.json @@ -0,0 +1,16 @@ +{ + "extends": "../../../tsconfig.base.esm2015.json", + "compilerOptions": { + "rootDir": "src", + "outDir": "build/esm2015", + "tsBuildInfoFile": "build/esm2015/tsconfig.esm2015.tsbuildinfo" + }, + "include": [ + "src/**/*.ts" + ], + "references": [ + { + "path": "../opentelemetry-instrumentation/tsconfig.esm2015.json" + } + ] +} diff --git a/experimental/packages/opentelemetry-instrumentation/package.json b/experimental/packages/opentelemetry-instrumentation/package.json index 77aedb2d5b..a96b3ff1c6 100644 --- a/experimental/packages/opentelemetry-instrumentation/package.json +++ b/experimental/packages/opentelemetry-instrumentation/package.json @@ -7,6 +7,7 @@ "license": "Apache-2.0", "main": "build/src/index.js", "module": "build/esm/index.js", + "esm2015": "build/esm2015/index.js", "types": "build/src/index.d.ts", "publishConfig": { "access": "public" @@ -18,6 +19,7 @@ "browser": { "./src/platform/index.ts": "./src/platform/browser/index.ts", "./build/esm/platform/index.js": "./build/esm/platform/browser/index.js", + "./build/esm2015/platform/index.js": "./build/esm2015/platform/browser/index.js", "./build/src/platform/index.js": "./build/src/platform/browser/index.js" }, "files": [ @@ -32,8 +34,8 @@ "README.md" ], "scripts": { - "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", "codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../", "codecov:browser": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../", "lint": "eslint . --ext .ts", @@ -44,7 +46,7 @@ "test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'", "test:browser": "nyc karma start --single-run", "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-filtered-dependencies", "prewatch": "node ../../../scripts/version-update.js" }, diff --git a/experimental/packages/opentelemetry-instrumentation/tsconfig.all.json b/experimental/packages/opentelemetry-instrumentation/tsconfig.all.json new file mode 100644 index 0000000000..1a2f9e96aa --- /dev/null +++ b/experimental/packages/opentelemetry-instrumentation/tsconfig.all.json @@ -0,0 +1,9 @@ +{ + "extends": "../../../tsconfig.base.json", + "files": [], + "references": [ + { "path": "./tsconfig.json" }, + { "path": "./tsconfig.esm.json" }, + { "path": "./tsconfig.esm2015.json" } + ] +} diff --git a/experimental/packages/opentelemetry-instrumentation/tsconfig.esm2015.json b/experimental/packages/opentelemetry-instrumentation/tsconfig.esm2015.json new file mode 100644 index 0000000000..90055f46c9 --- /dev/null +++ b/experimental/packages/opentelemetry-instrumentation/tsconfig.esm2015.json @@ -0,0 +1,16 @@ +{ + "extends": "../../../tsconfig.base.esm2015.json", + "compilerOptions": { + "rootDir": "src", + "outDir": "build/esm2015", + "tsBuildInfoFile": "build/esm2015/tsconfig.esm2015.tsbuildinfo" + }, + "include": [ + "src/**/*.ts" + ], + "references": [ + { + "path": "../opentelemetry-api-metrics/tsconfig.esm2015.json" + } + ] +} diff --git a/experimental/packages/opentelemetry-sdk-metrics-base/package.json b/experimental/packages/opentelemetry-sdk-metrics-base/package.json index eba32a5a15..2f37a9d304 100644 --- a/experimental/packages/opentelemetry-sdk-metrics-base/package.json +++ b/experimental/packages/opentelemetry-sdk-metrics-base/package.json @@ -5,18 +5,19 @@ "description": "Work in progress OpenTelemetry metrics SDK", "main": "build/src/index.js", "module": "build/esm/index.js", + "esm2015": "build/esm2015/index.js", "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js", "scripts": { - "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": "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 ../../", "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-filtered-dependencies", "prewatch": "node ../../../scripts/version-update.js" }, @@ -36,6 +37,9 @@ "build/esm/**/*.js", "build/esm/**/*.js.map", "build/esm/**/*.d.ts", + "build/esm2015/**/*.js", + "build/esm2015/**/*.js.map", + "build/esm2015/**/*.d.ts", "build/src/**/*.js", "build/src/**/*.js.map", "build/src/**/*.d.ts", diff --git a/experimental/packages/opentelemetry-sdk-metrics-base/tsconfig.all.json b/experimental/packages/opentelemetry-sdk-metrics-base/tsconfig.all.json new file mode 100644 index 0000000000..1a2f9e96aa --- /dev/null +++ b/experimental/packages/opentelemetry-sdk-metrics-base/tsconfig.all.json @@ -0,0 +1,9 @@ +{ + "extends": "../../../tsconfig.base.json", + "files": [], + "references": [ + { "path": "./tsconfig.json" }, + { "path": "./tsconfig.esm.json" }, + { "path": "./tsconfig.esm2015.json" } + ] +} diff --git a/experimental/packages/opentelemetry-sdk-metrics-base/tsconfig.esm2015.json b/experimental/packages/opentelemetry-sdk-metrics-base/tsconfig.esm2015.json new file mode 100644 index 0000000000..90055f46c9 --- /dev/null +++ b/experimental/packages/opentelemetry-sdk-metrics-base/tsconfig.esm2015.json @@ -0,0 +1,16 @@ +{ + "extends": "../../../tsconfig.base.esm2015.json", + "compilerOptions": { + "rootDir": "src", + "outDir": "build/esm2015", + "tsBuildInfoFile": "build/esm2015/tsconfig.esm2015.tsbuildinfo" + }, + "include": [ + "src/**/*.ts" + ], + "references": [ + { + "path": "../opentelemetry-api-metrics/tsconfig.esm2015.json" + } + ] +} diff --git a/experimental/tsconfig.esm.json b/experimental/tsconfig.esm.json deleted file mode 100644 index 69fc2f9475..0000000000 --- a/experimental/tsconfig.esm.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "extends": "../tsconfig.base.esm.json", - "files": [], - "references": [ - { - "path": "packages/opentelemetry-api-metrics/tsconfig.esm.json" - }, - { - "path": "packages/opentelemetry-exporter-metrics-otlp-grpc" - }, - { - "path": "packages/opentelemetry-exporter-metrics-otlp-http/tsconfig.esm.json" - }, - { - "path": "packages/opentelemetry-exporter-metrics-otlp-proto" - }, - { - "path": "packages/opentelemetry-exporter-prometheus" - }, - { - "path": "packages/opentelemetry-exporter-trace-otlp-grpc" - }, - { - "path": "packages/opentelemetry-exporter-trace-otlp-http/tsconfig.esm.json" - }, - { - "path": "packages/opentelemetry-exporter-trace-otlp-proto" - }, - { - "path": "packages/opentelemetry-instrumentation-fetch/tsconfig.esm.json" - }, - { - "path": "packages/opentelemetry-instrumentation-grpc" - }, - { - "path": "packages/opentelemetry-instrumentation-http" - }, - { - "path": "packages/opentelemetry-instrumentation-xml-http-request/tsconfig.esm.json" - }, - { - "path": "packages/opentelemetry-instrumentation/tsconfig.esm.json" - }, - { - "path": "packages/opentelemetry-sdk-metrics-base/tsconfig.esm.json" - }, - { - "path": "packages/opentelemetry-sdk-node" - }, - { - "path": "backwards-compatability/node10" - }, - { - "path": "backwards-compatability/node12" - }, - { - "path": "backwards-compatability/node8" - } - ] -} diff --git a/experimental/tsconfig.json b/experimental/tsconfig.json index b741eeff48..641b1e1833 100644 --- a/experimental/tsconfig.json +++ b/experimental/tsconfig.json @@ -3,13 +3,13 @@ "files": [], "references": [ { - "path": "packages/opentelemetry-api-metrics" + "path": "packages/opentelemetry-api-metrics/tsconfig.all.json" }, { "path": "packages/opentelemetry-exporter-metrics-otlp-grpc" }, { - "path": "packages/opentelemetry-exporter-metrics-otlp-http" + "path": "packages/opentelemetry-exporter-metrics-otlp-http/tsconfig.all.json" }, { "path": "packages/opentelemetry-exporter-metrics-otlp-proto" @@ -21,13 +21,13 @@ "path": "packages/opentelemetry-exporter-trace-otlp-grpc" }, { - "path": "packages/opentelemetry-exporter-trace-otlp-http" + "path": "packages/opentelemetry-exporter-trace-otlp-http/tsconfig.all.json" }, { "path": "packages/opentelemetry-exporter-trace-otlp-proto" }, { - "path": "packages/opentelemetry-instrumentation-fetch" + "path": "packages/opentelemetry-instrumentation-fetch/tsconfig.all.json" }, { "path": "packages/opentelemetry-instrumentation-grpc" @@ -36,13 +36,13 @@ "path": "packages/opentelemetry-instrumentation-http" }, { - "path": "packages/opentelemetry-instrumentation-xml-http-request" + "path": "packages/opentelemetry-instrumentation-xml-http-request/tsconfig.all.json" }, { - "path": "packages/opentelemetry-instrumentation" + "path": "packages/opentelemetry-instrumentation/tsconfig.all.json" }, { - "path": "packages/opentelemetry-sdk-metrics-base" + "path": "packages/opentelemetry-sdk-metrics-base/tsconfig.all.json" }, { "path": "packages/opentelemetry-sdk-node" diff --git a/package.json b/package.json index 984ea0aa45..2a2dc9bf8f 100644 --- a/package.json +++ b/package.json @@ -6,10 +6,10 @@ "types": "build/src/index.d.ts", "scripts": { "precompile": "lerna run version", - "compile": "tsc --build tsconfig.json tsconfig.esm.json", + "compile": "tsc --build", "prewatch": "npm run precompile", - "watch": "tsc --build --watch tsconfig.json tsconfig.esm.json", - "clean": "tsc --build --clean tsconfig.json tsconfig.esm.json", + "watch": "tsc --build --watch", + "clean": "tsc --build --clean", "bench": "node benchmark", "postinstall": "npm run update-ts-references && npm run bootstrap", "postcompile": "npm run submodule && npm run protos:copy", @@ -35,7 +35,7 @@ "lint:markdown": "./node_modules/.bin/markdownlint $(git ls-files '*.md') -i ./CHANGELOG.md", "lint:markdown:fix": "./node_modules/.bin/markdownlint $(git ls-files '*.md') -i ./CHANGELOG.md --fix", "reset": "lerna clean -y && rm -rf node_modules && npm i && npm run compile && npm run lint:fix", - "update-ts-references": "update-ts-references --configName tsconfig.esm.json && update-ts-references" + "update-ts-references": "update-ts-references" }, "repository": "open-telemetry/opentelemetry-js", "keywords": [ diff --git a/packages/opentelemetry-context-zone-peer-dep/package.json b/packages/opentelemetry-context-zone-peer-dep/package.json index fa6d4a2a01..e4741ec251 100644 --- a/packages/opentelemetry-context-zone-peer-dep/package.json +++ b/packages/opentelemetry-context-zone-peer-dep/package.json @@ -4,18 +4,19 @@ "description": "OpenTelemetry Context Zone with peer dependency for zone.js", "main": "build/src/index.js", "module": "build/esm/index.js", + "esm2015": "build/esm2015/index.js", "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js", "scripts": { - "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", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", "codecov:browser": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../", "version": "node ../../scripts/version-update.js", "tdd": "karma start", "test:browser": "nyc karma start --single-run", - "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-filtered-dependencies", "prewatch": "npm run precompile" }, @@ -36,6 +37,9 @@ "build/esm/**/*.js", "build/esm/**/*.js.map", "build/esm/**/*.d.ts", + "build/esm2015/**/*.js", + "build/esm2015/**/*.js.map", + "build/esm2015/**/*.d.ts", "build/src/**/*.js", "build/src/**/*.js.map", "build/src/**/*.d.ts", diff --git a/packages/opentelemetry-context-zone-peer-dep/tsconfig.all.json b/packages/opentelemetry-context-zone-peer-dep/tsconfig.all.json new file mode 100644 index 0000000000..7414597cb3 --- /dev/null +++ b/packages/opentelemetry-context-zone-peer-dep/tsconfig.all.json @@ -0,0 +1,9 @@ +{ + "extends": "../../tsconfig.base.json", + "files": [], + "references": [ + { "path": "./tsconfig.json" }, + { "path": "./tsconfig.esm.json" }, + { "path": "./tsconfig.esm2015.json" } + ] +} diff --git a/packages/opentelemetry-context-zone-peer-dep/tsconfig.esm2015.json b/packages/opentelemetry-context-zone-peer-dep/tsconfig.esm2015.json new file mode 100644 index 0000000000..e95e9f15fa --- /dev/null +++ b/packages/opentelemetry-context-zone-peer-dep/tsconfig.esm2015.json @@ -0,0 +1,14 @@ +{ + "extends": "../../tsconfig.base.esm2015.json", + "compilerOptions": { + "rootDir": "src", + "outDir": "build/esm2015", + "tsBuildInfoFile": "build/esm2015/tsconfig.esm2015.tsbuildinfo" + }, + "files": [ + "node_modules/zone.js/dist/zone.js.d.ts" + ], + "include": [ + "src/**/*.ts" + ] +} diff --git a/packages/opentelemetry-context-zone/package.json b/packages/opentelemetry-context-zone/package.json index c11b4d09a4..caace574ae 100644 --- a/packages/opentelemetry-context-zone/package.json +++ b/packages/opentelemetry-context-zone/package.json @@ -4,15 +4,16 @@ "description": "OpenTelemetry Context Zone", "main": "build/src/index.js", "module": "build/esm/index.js", + "esm2015": "build/esm2015/index.js", "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js", "scripts": { - "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", "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-filtered-dependencies", "prewatch": "npm run precompile" }, @@ -33,6 +34,9 @@ "build/esm/**/*.js", "build/esm/**/*.js.map", "build/esm/**/*.d.ts", + "build/esm2015/**/*.js", + "build/esm2015/**/*.js.map", + "build/esm2015/**/*.d.ts", "build/src/**/*.js", "build/src/**/*.js.map", "build/src/**/*.d.ts", diff --git a/packages/opentelemetry-context-zone/tsconfig.all.json b/packages/opentelemetry-context-zone/tsconfig.all.json new file mode 100644 index 0000000000..7414597cb3 --- /dev/null +++ b/packages/opentelemetry-context-zone/tsconfig.all.json @@ -0,0 +1,9 @@ +{ + "extends": "../../tsconfig.base.json", + "files": [], + "references": [ + { "path": "./tsconfig.json" }, + { "path": "./tsconfig.esm.json" }, + { "path": "./tsconfig.esm2015.json" } + ] +} diff --git a/packages/opentelemetry-context-zone/tsconfig.esm2015.json b/packages/opentelemetry-context-zone/tsconfig.esm2015.json new file mode 100644 index 0000000000..862efe751b --- /dev/null +++ b/packages/opentelemetry-context-zone/tsconfig.esm2015.json @@ -0,0 +1,16 @@ +{ + "extends": "../../tsconfig.base.esm2015.json", + "compilerOptions": { + "rootDir": "src", + "outDir": "build/esm2015", + "tsBuildInfoFile": "build/esm2015/tsconfig.esm2015.tsbuildinfo" + }, + "include": [ + "src/**/*.ts" + ], + "references": [ + { + "path": "../opentelemetry-context-zone-peer-dep/tsconfig.esm2015.json" + } + ] +} diff --git a/packages/opentelemetry-core/package.json b/packages/opentelemetry-core/package.json index 206e7df7d9..bedf0f7d83 100644 --- a/packages/opentelemetry-core/package.json +++ b/packages/opentelemetry-core/package.json @@ -4,16 +4,18 @@ "description": "OpenTelemetry Core provides constants and utilities shared by all OpenTelemetry SDK packages.", "main": "build/src/index.js", "module": "build/esm/index.js", + "esm2015": "build/esm2015/index.js", "browser": { "./src/platform/index.ts": "./src/platform/browser/index.ts", "./build/esm/platform/index.js": "./build/esm/platform/browser/index.js", + "./build/esm2015/platform/index.js": "./build/esm2015/platform/browser/index.js", "./build/src/platform/index.js": "./build/src/platform/browser/index.js" }, "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js", "scripts": { - "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": "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", @@ -24,7 +26,7 @@ "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-filtered-dependencies", "prewatch": "npm run precompile" }, @@ -46,6 +48,9 @@ "build/esm/**/*.js", "build/esm/**/*.js.map", "build/esm/**/*.d.ts", + "build/esm2015/**/*.js", + "build/esm2015/**/*.js.map", + "build/esm2015/**/*.d.ts", "build/src/**/*.js", "build/src/**/*.js.map", "build/src/**/*.d.ts", diff --git a/packages/opentelemetry-core/tsconfig.all.json b/packages/opentelemetry-core/tsconfig.all.json new file mode 100644 index 0000000000..7414597cb3 --- /dev/null +++ b/packages/opentelemetry-core/tsconfig.all.json @@ -0,0 +1,9 @@ +{ + "extends": "../../tsconfig.base.json", + "files": [], + "references": [ + { "path": "./tsconfig.json" }, + { "path": "./tsconfig.esm.json" }, + { "path": "./tsconfig.esm2015.json" } + ] +} diff --git a/packages/opentelemetry-core/tsconfig.esm2015.json b/packages/opentelemetry-core/tsconfig.esm2015.json new file mode 100644 index 0000000000..3f985ee8b6 --- /dev/null +++ b/packages/opentelemetry-core/tsconfig.esm2015.json @@ -0,0 +1,16 @@ +{ + "extends": "../../tsconfig.base.esm2015.json", + "compilerOptions": { + "rootDir": "src", + "outDir": "build/esm2015", + "tsBuildInfoFile": "build/esm2015/tsconfig.esm2015.tsbuildinfo" + }, + "include": [ + "src/**/*.ts" + ], + "references": [ + { + "path": "../opentelemetry-semantic-conventions/tsconfig.esm2015.json" + } + ] +} diff --git a/packages/opentelemetry-exporter-zipkin/package.json b/packages/opentelemetry-exporter-zipkin/package.json index 7b84136e46..063555c51c 100644 --- a/packages/opentelemetry-exporter-zipkin/package.json +++ b/packages/opentelemetry-exporter-zipkin/package.json @@ -4,16 +4,18 @@ "description": "OpenTelemetry Zipkin Exporter allows the user to send collected traces to Zipkin.", "main": "build/src/index.js", "module": "build/esm/index.js", + "esm2015": "build/esm2015/index.js", "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js", "browser": { "./src/platform/index.ts": "./src/platform/browser/index.ts", "./build/esm/platform/index.js": "./build/esm/platform/browser/index.js", + "./build/esm2015/platform/index.js": "./build/esm2015/platform/browser/index.js", "./build/src/platform/index.js": "./build/src/platform/browser/index.js" }, "scripts": { - "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", "codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../", "codecov:browser": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../", "lint": "eslint . --ext .ts", @@ -22,7 +24,7 @@ "test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'", "test:browser": "nyc karma start --single-run", "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-filtered-dependencies", "prewatch": "npm run precompile" }, @@ -42,6 +44,9 @@ "build/esm/**/*.js", "build/esm/**/*.js.map", "build/esm/**/*.d.ts", + "build/esm2015/**/*.js", + "build/esm2015/**/*.js.map", + "build/esm2015/**/*.d.ts", "build/src/**/*.js", "build/src/**/*.js.map", "build/src/**/*.d.ts", diff --git a/packages/opentelemetry-exporter-zipkin/tsconfig.all.json b/packages/opentelemetry-exporter-zipkin/tsconfig.all.json new file mode 100644 index 0000000000..7414597cb3 --- /dev/null +++ b/packages/opentelemetry-exporter-zipkin/tsconfig.all.json @@ -0,0 +1,9 @@ +{ + "extends": "../../tsconfig.base.json", + "files": [], + "references": [ + { "path": "./tsconfig.json" }, + { "path": "./tsconfig.esm.json" }, + { "path": "./tsconfig.esm2015.json" } + ] +} diff --git a/packages/opentelemetry-exporter-zipkin/tsconfig.esm2015.json b/packages/opentelemetry-exporter-zipkin/tsconfig.esm2015.json new file mode 100644 index 0000000000..6e8bbb4a5f --- /dev/null +++ b/packages/opentelemetry-exporter-zipkin/tsconfig.esm2015.json @@ -0,0 +1,25 @@ +{ + "extends": "../../tsconfig.base.esm2015.json", + "compilerOptions": { + "rootDir": "src", + "outDir": "build/esm2015", + "tsBuildInfoFile": "build/esm2015/tsconfig.esm2015.tsbuildinfo" + }, + "include": [ + "src/**/*.ts" + ], + "references": [ + { + "path": "../opentelemetry-core/tsconfig.esm2015.json" + }, + { + "path": "../opentelemetry-resources/tsconfig.esm2015.json" + }, + { + "path": "../opentelemetry-sdk-trace-base/tsconfig.esm2015.json" + }, + { + "path": "../opentelemetry-semantic-conventions/tsconfig.esm2015.json" + } + ] +} diff --git a/packages/opentelemetry-propagator-b3/package.json b/packages/opentelemetry-propagator-b3/package.json index fedfa3764e..ba03744813 100644 --- a/packages/opentelemetry-propagator-b3/package.json +++ b/packages/opentelemetry-propagator-b3/package.json @@ -4,17 +4,18 @@ "description": "OpenTelemetry B3 propagator provides context propagation for systems that are using the B3 header format", "main": "build/src/index.js", "module": "build/esm/index.js", + "esm2015": "build/esm2015/index.js", "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js", "scripts": { - "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": "nyc ts-mocha -p tsconfig.json test/**/*.test.ts", "codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../", "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-filtered-dependencies", "prewatch": "npm run precompile" }, @@ -35,6 +36,9 @@ "build/esm/**/*.js", "build/esm/**/*.js.map", "build/esm/**/*.d.ts", + "build/esm2015/**/*.js", + "build/esm2015/**/*.js.map", + "build/esm2015/**/*.d.ts", "build/src/**/*.js", "build/src/**/*.js.map", "build/src/**/*.d.ts", diff --git a/packages/opentelemetry-propagator-b3/tsconfig.all.json b/packages/opentelemetry-propagator-b3/tsconfig.all.json new file mode 100644 index 0000000000..7414597cb3 --- /dev/null +++ b/packages/opentelemetry-propagator-b3/tsconfig.all.json @@ -0,0 +1,9 @@ +{ + "extends": "../../tsconfig.base.json", + "files": [], + "references": [ + { "path": "./tsconfig.json" }, + { "path": "./tsconfig.esm.json" }, + { "path": "./tsconfig.esm2015.json" } + ] +} diff --git a/packages/opentelemetry-propagator-b3/tsconfig.esm2015.json b/packages/opentelemetry-propagator-b3/tsconfig.esm2015.json new file mode 100644 index 0000000000..f5d6279909 --- /dev/null +++ b/packages/opentelemetry-propagator-b3/tsconfig.esm2015.json @@ -0,0 +1,16 @@ +{ + "extends": "../../tsconfig.base.esm2015.json", + "compilerOptions": { + "rootDir": "src", + "outDir": "build/esm2015", + "tsBuildInfoFile": "build/esm2015/tsconfig.esm2015.tsbuildinfo" + }, + "include": [ + "src/**/*.ts" + ], + "references": [ + { + "path": "../opentelemetry-core/tsconfig.esm2015.json" + } + ] +} diff --git a/packages/opentelemetry-resources/package.json b/packages/opentelemetry-resources/package.json index a7fb9b38e5..655f318550 100644 --- a/packages/opentelemetry-resources/package.json +++ b/packages/opentelemetry-resources/package.json @@ -4,16 +4,18 @@ "description": "OpenTelemetry SDK resources", "main": "build/src/index.js", "module": "build/esm/index.js", + "esm2015": "build/esm2015/index.js", "browser": { "./src/platform/index.ts": "./src/platform/browser/index.ts", "./build/esm/platform/index.js": "./build/esm/platform/browser/index.js", + "./build/esm2015/platform/index.js": "./build/esm2015/platform/browser/index.js", "./build/src/platform/index.js": "./build/src/platform/browser/index.js" }, "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js", "scripts": { - "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", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", "test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'", @@ -39,6 +41,9 @@ "build/esm/**/*.js", "build/esm/**/*.js.map", "build/esm/**/*.d.ts", + "build/esm2015/**/*.js", + "build/esm2015/**/*.js.map", + "build/esm2015/**/*.d.ts", "build/src/**/*.js", "build/src/**/*.js.map", "build/src/**/*.d.ts", diff --git a/packages/opentelemetry-resources/tsconfig.all.json b/packages/opentelemetry-resources/tsconfig.all.json new file mode 100644 index 0000000000..7414597cb3 --- /dev/null +++ b/packages/opentelemetry-resources/tsconfig.all.json @@ -0,0 +1,9 @@ +{ + "extends": "../../tsconfig.base.json", + "files": [], + "references": [ + { "path": "./tsconfig.json" }, + { "path": "./tsconfig.esm.json" }, + { "path": "./tsconfig.esm2015.json" } + ] +} diff --git a/packages/opentelemetry-resources/tsconfig.esm2015.json b/packages/opentelemetry-resources/tsconfig.esm2015.json new file mode 100644 index 0000000000..6a8b824e52 --- /dev/null +++ b/packages/opentelemetry-resources/tsconfig.esm2015.json @@ -0,0 +1,19 @@ +{ + "extends": "../../tsconfig.base.esm2015.json", + "compilerOptions": { + "rootDir": "src", + "outDir": "build/esm2015", + "tsBuildInfoFile": "build/esm2015/tsconfig.esm2015.tsbuildinfo" + }, + "include": [ + "src/**/*.ts" + ], + "references": [ + { + "path": "../opentelemetry-core/tsconfig.esm2015.json" + }, + { + "path": "../opentelemetry-semantic-conventions/tsconfig.esm2015.json" + } + ] +} diff --git a/packages/opentelemetry-sdk-trace-base/package.json b/packages/opentelemetry-sdk-trace-base/package.json index add351c68d..21885ee250 100644 --- a/packages/opentelemetry-sdk-trace-base/package.json +++ b/packages/opentelemetry-sdk-trace-base/package.json @@ -4,16 +4,18 @@ "description": "OpenTelemetry Tracing", "main": "build/src/index.js", "module": "build/esm/index.js", + "esm2015": "build/esm2015/index.js", "browser": { "./src/platform/index.ts": "./src/platform/browser/index.ts", "./build/esm/platform/index.js": "./build/esm/platform/browser/index.js", + "./build/esm2015/platform/index.js": "./build/esm2015/platform/browser/index.js", "./build/src/platform/index.js": "./build/src/platform/browser/index.js" }, "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js", "scripts": { - "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": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'", "test:browser": "nyc karma start --single-run", "tdd": "npm run tdd:node", @@ -23,7 +25,7 @@ "lint:fix": "eslint . --ext .ts --fix", "codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../", "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-filtered-dependencies", "prewatch": "npm run precompile" }, @@ -44,6 +46,9 @@ "build/esm/**/*.js", "build/esm/**/*.js.map", "build/esm/**/*.d.ts", + "build/esm2015/**/*.js", + "build/esm2015/**/*.js.map", + "build/esm2015/**/*.d.ts", "build/src/**/*.js", "build/src/**/*.js.map", "build/src/**/*.d.ts", diff --git a/packages/opentelemetry-sdk-trace-base/tsconfig.all.json b/packages/opentelemetry-sdk-trace-base/tsconfig.all.json new file mode 100644 index 0000000000..7414597cb3 --- /dev/null +++ b/packages/opentelemetry-sdk-trace-base/tsconfig.all.json @@ -0,0 +1,9 @@ +{ + "extends": "../../tsconfig.base.json", + "files": [], + "references": [ + { "path": "./tsconfig.json" }, + { "path": "./tsconfig.esm.json" }, + { "path": "./tsconfig.esm2015.json" } + ] +} diff --git a/packages/opentelemetry-sdk-trace-base/tsconfig.esm2015.json b/packages/opentelemetry-sdk-trace-base/tsconfig.esm2015.json new file mode 100644 index 0000000000..b3d6da6c4c --- /dev/null +++ b/packages/opentelemetry-sdk-trace-base/tsconfig.esm2015.json @@ -0,0 +1,22 @@ +{ + "extends": "../../tsconfig.base.esm2015.json", + "compilerOptions": { + "rootDir": "src", + "outDir": "build/esm2015", + "tsBuildInfoFile": "build/esm2015/tsconfig.esm2015.tsbuildinfo" + }, + "include": [ + "src/**/*.ts" + ], + "references": [ + { + "path": "../opentelemetry-core/tsconfig.esm2015.json" + }, + { + "path": "../opentelemetry-resources/tsconfig.esm2015.json" + }, + { + "path": "../opentelemetry-semantic-conventions/tsconfig.esm2015.json" + } + ] +} diff --git a/packages/opentelemetry-sdk-trace-web/package.json b/packages/opentelemetry-sdk-trace-web/package.json index b17e520d47..21d2f7fbd9 100644 --- a/packages/opentelemetry-sdk-trace-web/package.json +++ b/packages/opentelemetry-sdk-trace-web/package.json @@ -4,18 +4,19 @@ "description": "OpenTelemetry Web Tracer", "main": "build/src/index.js", "module": "build/esm/index.js", + "esm2015": "build/esm2015/index.js", "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js", "scripts": { - "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", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", "codecov:browser": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../", "version": "node ../../scripts/version-update.js", "tdd": "karma start", "test:browser": "nyc karma start --single-run", - "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-filtered-dependencies", "prewatch": "npm run precompile" }, @@ -36,6 +37,9 @@ "build/esm/**/*.js", "build/esm/**/*.js.map", "build/esm/**/*.d.ts", + "build/esm2015/**/*.js", + "build/esm2015/**/*.js.map", + "build/esm2015/**/*.d.ts", "build/src/**/*.js", "build/src/**/*.js.map", "build/src/**/*.d.ts", diff --git a/packages/opentelemetry-sdk-trace-web/tsconfig.all.json b/packages/opentelemetry-sdk-trace-web/tsconfig.all.json new file mode 100644 index 0000000000..7414597cb3 --- /dev/null +++ b/packages/opentelemetry-sdk-trace-web/tsconfig.all.json @@ -0,0 +1,9 @@ +{ + "extends": "../../tsconfig.base.json", + "files": [], + "references": [ + { "path": "./tsconfig.json" }, + { "path": "./tsconfig.esm.json" }, + { "path": "./tsconfig.esm2015.json" } + ] +} diff --git a/packages/opentelemetry-sdk-trace-web/tsconfig.esm2015.json b/packages/opentelemetry-sdk-trace-web/tsconfig.esm2015.json new file mode 100644 index 0000000000..d9c25d1fca --- /dev/null +++ b/packages/opentelemetry-sdk-trace-web/tsconfig.esm2015.json @@ -0,0 +1,31 @@ +{ + "extends": "../../tsconfig.base.esm2015.json", + "compilerOptions": { + "rootDir": "src", + "outDir": "build/esm2015", + "tsBuildInfoFile": "build/esm2015/tsconfig.esm2015.tsbuildinfo" + }, + "include": [ + "src/**/*.ts" + ], + "references": [ + { + "path": "../opentelemetry-context-zone/tsconfig.esm2015.json" + }, + { + "path": "../opentelemetry-core/tsconfig.esm2015.json" + }, + { + "path": "../opentelemetry-propagator-b3/tsconfig.esm2015.json" + }, + { + "path": "../opentelemetry-resources/tsconfig.esm2015.json" + }, + { + "path": "../opentelemetry-sdk-trace-base/tsconfig.esm2015.json" + }, + { + "path": "../opentelemetry-semantic-conventions/tsconfig.esm2015.json" + } + ] +} diff --git a/packages/opentelemetry-semantic-conventions/package.json b/packages/opentelemetry-semantic-conventions/package.json index bcf19d6817..30b1fd9cea 100644 --- a/packages/opentelemetry-semantic-conventions/package.json +++ b/packages/opentelemetry-semantic-conventions/package.json @@ -4,17 +4,18 @@ "description": "OpenTelemetry semantic conventions", "main": "build/src/index.js", "module": "build/esm/index.js", + "esm2015": "build/esm2015/index.js", "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js", "scripts": { - "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", "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", "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-filtered-dependencies", "prewatch": "npm run precompile" }, @@ -34,6 +35,9 @@ "build/esm/**/*.js", "build/esm/**/*.js.map", "build/esm/**/*.d.ts", + "build/esm2015/**/*.js", + "build/esm2015/**/*.js.map", + "build/esm2015/**/*.d.ts", "build/src/**/*.js", "build/src/**/*.js.map", "build/src/**/*.d.ts", diff --git a/packages/opentelemetry-semantic-conventions/tsconfig.all.json b/packages/opentelemetry-semantic-conventions/tsconfig.all.json new file mode 100644 index 0000000000..7414597cb3 --- /dev/null +++ b/packages/opentelemetry-semantic-conventions/tsconfig.all.json @@ -0,0 +1,9 @@ +{ + "extends": "../../tsconfig.base.json", + "files": [], + "references": [ + { "path": "./tsconfig.json" }, + { "path": "./tsconfig.esm.json" }, + { "path": "./tsconfig.esm2015.json" } + ] +} diff --git a/packages/opentelemetry-semantic-conventions/tsconfig.esm2015.json b/packages/opentelemetry-semantic-conventions/tsconfig.esm2015.json new file mode 100644 index 0000000000..06f2e5a873 --- /dev/null +++ b/packages/opentelemetry-semantic-conventions/tsconfig.esm2015.json @@ -0,0 +1,11 @@ +{ + "extends": "../../tsconfig.base.esm2015.json", + "compilerOptions": { + "rootDir": "src", + "outDir": "build/esm2015", + "tsBuildInfoFile": "build/esm2015/tsconfig.esm2015.tsbuildinfo" + }, + "include": [ + "src/**/*.ts" + ] +} diff --git a/tsconfig.base.esm2015.json b/tsconfig.base.esm2015.json new file mode 100644 index 0000000000..39d76c9a7e --- /dev/null +++ b/tsconfig.base.esm2015.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.base.json", + "compilerOptions": { + "module": "es6", + "target": "es6", + "moduleResolution": "node" + }, +} diff --git a/tsconfig.esm.json b/tsconfig.esm.json deleted file mode 100644 index 4bbf108bfc..0000000000 --- a/tsconfig.esm.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "extends": "./tsconfig.base.esm.json", - "files": [], - "references": [ - { - "path": "packages/opentelemetry-context-async-hooks" - }, - { - "path": "packages/opentelemetry-context-zone-peer-dep/tsconfig.esm.json" - }, - { - "path": "packages/opentelemetry-context-zone/tsconfig.esm.json" - }, - { - "path": "packages/opentelemetry-core/tsconfig.esm.json" - }, - { - "path": "packages/opentelemetry-exporter-jaeger" - }, - { - "path": "packages/opentelemetry-exporter-zipkin/tsconfig.esm.json" - }, - { - "path": "packages/opentelemetry-propagator-b3/tsconfig.esm.json" - }, - { - "path": "packages/opentelemetry-propagator-jaeger/tsconfig.esm.json" - }, - { - "path": "packages/opentelemetry-resources/tsconfig.esm.json" - }, - { - "path": "packages/opentelemetry-sdk-trace-base/tsconfig.esm.json" - }, - { - "path": "packages/opentelemetry-sdk-trace-node" - }, - { - "path": "packages/opentelemetry-sdk-trace-web/tsconfig.esm.json" - }, - { - "path": "packages/opentelemetry-semantic-conventions/tsconfig.esm.json" - }, - { - "path": "packages/opentelemetry-shim-opentracing" - }, - { - "path": "packages/template/tsconfig.esm.json" - }, - { - "path": "integration-tests/propagation-validation-server" - } - ] -} diff --git a/tsconfig.json b/tsconfig.json index 44577914a9..642d15e794 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -48,40 +48,40 @@ "path": "packages/opentelemetry-context-async-hooks" }, { - "path": "packages/opentelemetry-context-zone-peer-dep" + "path": "packages/opentelemetry-context-zone-peer-dep/tsconfig.all.json" }, { - "path": "packages/opentelemetry-context-zone" + "path": "packages/opentelemetry-context-zone/tsconfig.all.json" }, { - "path": "packages/opentelemetry-core" + "path": "packages/opentelemetry-core/tsconfig.all.json" }, { "path": "packages/opentelemetry-exporter-jaeger" }, { - "path": "packages/opentelemetry-exporter-zipkin" + "path": "packages/opentelemetry-exporter-zipkin/tsconfig.all.json" }, { - "path": "packages/opentelemetry-propagator-b3" + "path": "packages/opentelemetry-propagator-b3/tsconfig.all.json" }, { "path": "packages/opentelemetry-propagator-jaeger" }, { - "path": "packages/opentelemetry-resources" + "path": "packages/opentelemetry-resources/tsconfig.all.json" }, { - "path": "packages/opentelemetry-sdk-trace-base" + "path": "packages/opentelemetry-sdk-trace-base/tsconfig.all.json" }, { "path": "packages/opentelemetry-sdk-trace-node" }, { - "path": "packages/opentelemetry-sdk-trace-web" + "path": "packages/opentelemetry-sdk-trace-web/tsconfig.all.json" }, { - "path": "packages/opentelemetry-semantic-conventions" + "path": "packages/opentelemetry-semantic-conventions/tsconfig.all.json" }, { "path": "packages/opentelemetry-shim-opentracing"