Skip to content

Commit

Permalink
feat(opentelemetry-instrumentation-{http|grpc}): generate esm build f…
Browse files Browse the repository at this point in the history
…iles too
  • Loading branch information
serkan-ozal committed Jan 19, 2025
1 parent fc0edd8 commit 06acb2b
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,19 @@
"version": "0.57.0",
"description": "OpenTelemetry instrumentation for `@grpc/grpc-js` rpc client and server for gRPC framework",
"main": "build/src/index.js",
"module": "build/esm/index.js",
"types": "build/src/index.d.ts",
"repository": "open-telemetry/opentelemetry-js",
"scripts": {
"prepublishOnly": "npm run compile",
"compile": "tsc --build",
"clean": "tsc --build --clean",
"compile": "tsc --build tsconfig.json tsconfig.esm.json",
"clean": "tsc --build --clean tsconfig.json tsconfig.esm.json",
"test": "npm run protos:generate && nyc mocha test/**/*.test.ts",
"tdd": "npm run test -- --watch-extensions ts --watch",
"lint": "eslint . --ext .ts",
"lint:fix": "eslint . --ext .ts --fix",
"version": "node ../../../scripts/version-update.js",
"watch": "tsc --build --watch",
"watch": "tsc --build --watch tsconfig.json tsconfig.esm.json",
"precompile": "cross-var lerna run version --scope $npm_package_name --include-dependencies",
"prewatch": "node ../../../scripts/version-update.js",
"peer-api-check": "node ../../../scripts/peer-api-check.js",
Expand All @@ -35,6 +36,9 @@
"node": ">=18"
},
"files": [
"build/esm/**/*.js",
"build/esm/**/*.js.map",
"build/esm/**/*.d.ts",
"build/src/**/*.js",
"build/src/**/*.js.map",
"build/src/**/*.d.ts",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"extends": "../../../tsconfig.base.esm.json",
"compilerOptions": {
"outDir": "build/esm",
"rootDir": "src",
"tsBuildInfoFile": "build/esm/tsconfig.esm.tsbuildinfo"
},
"include": [
"src/**/*.ts"
],
"references": [
{
"path": "../opentelemetry-instrumentation"
},
{
"path": "../../../semantic-conventions"
},
{
"path": "../../../api"
},
{
"path": "../../../packages/opentelemetry-context-async-hooks"
},
{
"path": "../../../packages/opentelemetry-core"
},
{
"path": "../../../packages/opentelemetry-sdk-trace-base"
},
{
"path": "../../../packages/opentelemetry-sdk-trace-node"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,21 @@
"version": "0.57.0",
"description": "OpenTelemetry instrumentation for `node:http` and `node:https` http client and server modules",
"main": "build/src/index.js",
"module": "build/esm/index.js",
"types": "build/src/index.d.ts",
"repository": "open-telemetry/opentelemetry-js",
"scripts": {
"prepublishOnly": "npm run compile",
"compile": "tsc --build",
"clean": "tsc --build --clean",
"compile": "tsc --build tsconfig.json tsconfig.esm.json",
"clean": "tsc --build --clean tsconfig.json tsconfig.esm.json",
"test:cjs": "nyc mocha test/**/*.test.ts",
"test:esm": "nyc node --experimental-loader=@opentelemetry/instrumentation/hook.mjs ../../../node_modules/mocha/bin/mocha 'test/**/*.test.mjs'",
"test": "npm run test:cjs && npm run test:esm",
"tdd": "npm run test -- --watch-extensions ts --watch",
"lint": "eslint . --ext .ts",
"lint:fix": "eslint . --ext .ts --fix",
"version": "node ../../../scripts/version-update.js",
"watch": "tsc --build --watch",
"watch": "tsc --build --watch tsconfig.json tsconfig.esm.json",
"precompile": "cross-var lerna run version --scope $npm_package_name --include-dependencies",
"prewatch": "node ../../../scripts/version-update.js",
"peer-api-check": "node ../../../scripts/peer-api-check.js",
Expand All @@ -37,6 +38,9 @@
"node": ">=18"
},
"files": [
"build/esm/**/*.js",
"build/esm/**/*.js.map",
"build/esm/**/*.d.ts",
"build/src/**/*.js",
"build/src/**/*.js.map",
"build/src/**/*.d.ts",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"extends": "../../../tsconfig.base.esm.json",
"compilerOptions": {
"outDir": "build/esm",
"rootDir": "src",
"tsBuildInfoFile": "build/esm/tsconfig.esm.tsbuildinfo"
},
"include": [
"src/**/*.ts"
],
"references": [
{
"path": "../../../packages/opentelemetry-core"
},
{
"path": "../opentelemetry-instrumentation"
},
{
"path": "../../../semantic-conventions"
},
{
"path": "../../../api"
},
{
"path": "../../../packages/opentelemetry-context-async-hooks"
},
{
"path": "../../../packages/sdk-metrics"
},
{
"path": "../../../packages/opentelemetry-sdk-trace-base"
},
{
"path": "../../../packages/opentelemetry-sdk-trace-node"
}
]
}

0 comments on commit 06acb2b

Please sign in to comment.