Skip to content

Commit

Permalink
feat: add esnext target for web instrumentations (#1776)
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel Dyla <[email protected]>
Co-authored-by: Marc Pichler <[email protected]>
  • Loading branch information
3 people authored Nov 10, 2023
1 parent da94ee9 commit 2698bb1
Show file tree
Hide file tree
Showing 9 changed files with 85 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,21 @@
"description": "OpenTelemetry document-load automatic instrumentation package.",
"main": "build/src/index.js",
"module": "build/esm/index.js",
"esnext": "build/esnext/index.js",
"types": "build/src/index.d.ts",
"repository": "open-telemetry/opentelemetry-js-contrib",
"scripts": {
"clean": "tsc --build --clean tsconfig.json tsconfig.esm.json",
"clean": "tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json",
"lint": "eslint . --ext .ts",
"lint:fix": "eslint . --ext .ts --fix",
"precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-document-load --include-dependencies",
"prewatch": "npm run precompile",
"version:update": "node ../../../scripts/version-update.js",
"compile": "npm run version:update && tsc --build tsconfig.json tsconfig.esm.json",
"compile": "npm run version:update && tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json",
"prepare": "npm run compile",
"tdd": "karma start",
"test:browser": "nyc karma start --single-run",
"watch": "tsc --build -watch tsconfig.json tsconfig.esm.json"
"watch": "tsc --build -watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json"
},
"keywords": [
"opentelemetry",
Expand All @@ -36,6 +37,9 @@
"build/esm/**/*.js",
"build/esm/**/*.map",
"build/esm/**/*.d.ts",
"build/esnext/**/*.js",
"build/esnext/**/*.map",
"build/esnext/**/*.d.ts",
"build/src/**/*.js",
"build/src/**/*.map",
"build/src/**/*.d.ts",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": "../../../tsconfig.base.esnext.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "build/esnext",
"tsBuildInfoFile": "build/esnext/tsconfig.esnext.tsbuildinfo"
},
"include": [
"src/**/*.ts"
]
}
10 changes: 7 additions & 3 deletions plugins/web/opentelemetry-instrumentation-long-task/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,21 @@
"description": "OpenTelemetry long task API automatic instrumentation package.",
"main": "build/src/index.js",
"module": "build/esm/index.js",
"esnext": "build/esnext/index.js",
"types": "build/src/index.d.ts",
"repository": "open-telemetry/opentelemetry-js-contrib",
"scripts": {
"lint": "eslint . --ext .ts",
"lint:fix": "eslint . --ext .ts --fix",
"clean": "tsc --build --clean tsconfig.json tsconfig.esm.json",
"clean": "tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json",
"precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-user-interaction --include-dependencies",
"prewatch": "npm run precompile",
"version:update": "node ../../../scripts/version-update.js",
"compile": "npm run version:update && tsc --build tsconfig.json tsconfig.esm.json",
"compile": "npm run version:update && tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json",
"prepare": "npm run compile",
"tdd": "karma start",
"test:browser": "nyc karma start --single-run",
"watch": "tsc --build --watch tsconfig.json tsconfig.esm.json"
"watch": "tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json"
},
"keywords": [
"opentelemetry",
Expand All @@ -36,6 +37,9 @@
"build/esm/**/*.js",
"build/esm/**/*.map",
"build/esm/**/*.d.ts",
"build/esnext/**/*.js",
"build/esnext/**/*.map",
"build/esnext/**/*.d.ts",
"build/src/**/*.js",
"build/src/**/*.map",
"build/src/**/*.d.ts",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"extends": "../../../tsconfig.base.esnext.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "build/esnext",
"tsBuildInfoFile": "build/esnext/tsconfig.esnext.tsbuildinfo"
},
"files": [ "node_modules/zone.js/dist/zone.js.d.ts"],
"include": [
"src/**/*.ts"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,21 @@
"description": "OpenTelemetry UserInteraction automatic instrumentation package.",
"main": "build/src/index.js",
"module": "build/esm/index.js",
"esnext": "build/esnext/index.js",
"types": "build/src/index.d.ts",
"repository": "open-telemetry/opentelemetry-js-contrib",
"scripts": {
"lint": "eslint . --ext .ts",
"lint:fix": "eslint . --ext .ts --fix",
"clean": "tsc --build --clean tsconfig.json tsconfig.esm.json",
"clean": "tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json",
"precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-user-interaction --include-dependencies",
"prewatch": "npm run precompile",
"version:update": "node ../../../scripts/version-update.js",
"compile": "npm run version:update && tsc --build tsconfig.json tsconfig.esm.json",
"compile": "npm run version:update && tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json",
"prepare": "npm run compile",
"tdd": "karma start",
"test:browser": "nyc karma start --single-run",
"watch": "tsc --build --watch tsconfig.json tsconfig.esm.json"
"watch": "tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json"
},
"keywords": [
"opentelemetry",
Expand All @@ -36,6 +37,9 @@
"build/esm/**/*.js",
"build/esm/**/*.map",
"build/esm/**/*.d.ts",
"build/esnext/**/*.js",
"build/esnext/**/*.map",
"build/esnext/**/*.d.ts",
"build/src/**/*.js",
"build/src/**/*.map",
"build/src/**/*.d.ts",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"extends": "../../../tsconfig.base.esnext.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "build/esnext",
"skipLibCheck": true,
"tsBuildInfoFile": "build/esnext/tsconfig.esnext.tsbuildinfo"
},
"files": [ "node_modules/zone.js/dist/zone.js.d.ts"],
"include": [
"src/**/*.ts"
]
}
10 changes: 7 additions & 3 deletions plugins/web/opentelemetry-plugin-react-load/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,21 @@
"description": "OpenTelemetry React loading automatic instrumentation package.",
"main": "build/src/index.js",
"module": "build/esm/index.js",
"esnext": "build/esnext/index.js",
"types": "build/src/index.d.ts",
"repository": "open-telemetry/opentelemetry-js-contrib",
"scripts": {
"clean": "tsc --build --clean tsconfig.json tsconfig.esm.json",
"clean": "tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json",
"lint": "eslint . --ext .ts",
"lint:fix": "eslint . --ext .ts --fix",
"precompile": "tsc --version && lerna run version:update --scope @opentelemetry/plugin-react-load --include-dependencies",
"prewatch": "npm run precompile",
"version:update": "node ../../../scripts/version-update.js",
"compile": "npm run version:update && tsc --build tsconfig.json tsconfig.esm.json",
"compile": "npm run version:update && tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json",
"prepare": "npm run compile",
"tdd": "karma start",
"test:browser": "nyc karma start --single-run",
"watch": "tsc --build --watch tsconfig.json tsconfig.esm.json"
"watch": "tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json"
},
"keywords": [
"opentelemetry",
Expand All @@ -36,6 +37,9 @@
"build/esm/**/*.js",
"build/esm/**/*.map",
"build/esm/**/*.d.ts",
"build/esnext/**/*.js",
"build/esnext/**/*.map",
"build/esnext/**/*.d.ts",
"build/src/**/*.js",
"build/src/**/*.map",
"build/src/**/*.d.ts",
Expand Down
12 changes: 12 additions & 0 deletions plugins/web/opentelemetry-plugin-react-load/tsconfig.esnext.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"extends": "../../../tsconfig.base.esnext.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "build/esnext",
"jsx": "react",
"tsBuildInfoFile": "build/esnext/tsconfig.esnext.tsbuildinfo"
},
"include": [
"src/**/*.ts"
]
}
9 changes: 9 additions & 0 deletions tsconfig.base.esnext.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": "./tsconfig.base.json",
"compilerOptions": {
"module": "esnext",
// target should be aligned with tsconfig.base.json
"target": "es2017",
"moduleResolution": "node"
},
}

0 comments on commit 2698bb1

Please sign in to comment.