Skip to content

Commit

Permalink
Merge branch 'main' into prefer-global-providers
Browse files Browse the repository at this point in the history
  • Loading branch information
vmarchaud authored Apr 23, 2021
2 parents b57929c + 23ba4bf commit 9766d51
Show file tree
Hide file tree
Showing 61 changed files with 572 additions and 160 deletions.
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,9 @@ npm run lint:fix

### Adding a package

To add a new package, copy `packages/template` to your new package directory and modify the `package.json` file to reflect your desired package settings. If the package will not support browser, the `karma.conf` file may be deleted. If the package will support es5 targets, the reference to `tsconfig.base.json` in `tsconfig.json` should be changed to `tsconfig.es5.json`.
To add a new package, copy `packages/template` to your new package directory and modify the `package.json` file to reflect your desired package settings. If the package will not support browser, the `karma.conf` and `tsconifg.esm.json` files may be deleted. If the package will support es5 targets, the reference to `tsconfig.base.json` in `tsconfig.json` should be changed to `tsconfig.es5.json`.

After adding the package, run `npm install` from the root of the project. This will update the `tsconfig.json` project references automatically and install all dependencies in your new package.
After adding the package, run `npm install` from the root of the project. This will update the `tsconfig.json` project references automatically and install all dependencies in your new package. For packages supporting browser, file `tsconfig.esm.json` needs to be manually updated to include reference to ES modules build.

### Guidelines for Pull Requests

Expand Down
2 changes: 1 addition & 1 deletion backwards-compatability/node10/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"@opentelemetry/tracing": "0.19.0"
},
"devDependencies": {
"@types/node": "10.17.56",
"@types/node": "10.17.58",
"typescript": "4.2.4"
},
"author": "OpenTelemetry Authors",
Expand Down
2 changes: 1 addition & 1 deletion backwards-compatability/node12/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"@opentelemetry/tracing": "0.19.0"
},
"devDependencies": {
"@types/node": "12.20.7",
"@types/node": "12.20.10",
"typescript": "4.2.4"
},
"author": "OpenTelemetry Authors",
Expand Down
2 changes: 1 addition & 1 deletion getting-started/ts-example/example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"license": "Apache-2.0",
"devDependencies": {
"@types/express": "4.17.11",
"@types/node": "14.14.37",
"@types/node": "14.14.41",
"ts-node": "8.10.2"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion getting-started/ts-example/monitored-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"license": "Apache-2.0",
"devDependencies": {
"@types/express": "4.17.11",
"@types/node": "14.14.37",
"@types/node": "14.14.41",
"ts-node": "8.10.2"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion getting-started/ts-example/traced-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"license": "Apache-2.0",
"devDependencies": {
"@types/express": "4.17.11",
"@types/node": "14.14.37",
"@types/node": "14.14.41",
"ts-node": "9.1.1"
},
"dependencies": {
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
"main": "build/src/index.js",
"types": "build/src/index.d.ts",
"scripts": {
"compile": "tsc --build",
"watch": "tsc --build --watch",
"clean": "tsc --build --clean",
"compile": "tsc --build tsconfig.json tsconfig.esm.json",
"watch": "tsc --build --watch tsconfig.json tsconfig.esm.json",
"clean": "tsc --build --clean tsconfig.json tsconfig.esm.json",
"bench": "node benchmark",
"postinstall": "update-ts-references && npm run bootstrap",
"postcompile": "npm run submodule && npm run protos:copy",
Expand Down
13 changes: 9 additions & 4 deletions packages/opentelemetry-api-metrics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,17 @@
"version": "0.19.0",
"description": "Public metrics API for OpenTelemetry",
"main": "build/src/index.js",
"module": "build/esm/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/src/platform/index.js": "./build/src/platform/browser/index.js"
},
"repository": "open-telemetry/opentelemetry-js",
"scripts": {
"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": "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 ../../",
Expand All @@ -20,7 +22,7 @@
"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"
},
"keywords": [
"opentelemetry",
Expand All @@ -37,6 +39,9 @@
"node": ">=8.0.0"
},
"files": [
"build/esm/**/*.js",
"build/esm/**/*.js.map",
"build/esm/**/*.d.ts",
"build/src/**/*.js",
"build/src/**/*.js.map",
"build/src/**/*.d.ts",
Expand All @@ -53,7 +58,7 @@
"devDependencies": {
"@opentelemetry/api": "^1.0.0-rc.0",
"@types/mocha": "8.2.2",
"@types/node": "14.14.37",
"@types/node": "14.14.41",
"@types/webpack-env": "1.16.0",
"codecov": "3.8.1",
"gts": "3.1.0",
Expand Down
11 changes: 11 additions & 0 deletions packages/opentelemetry-api-metrics/tsconfig.esm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": "../../tsconfig.base.esm.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "build/esm",
"tsBuildInfoFile": "build/esm/tsconfig.esm.tsbuildinfo"
},
"include": [
"src/**/*.ts"
]
}
2 changes: 1 addition & 1 deletion packages/opentelemetry-context-async-hooks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"devDependencies": {
"@opentelemetry/api": "^1.0.0-rc.0",
"@types/mocha": "8.2.2",
"@types/node": "14.14.37",
"@types/node": "14.14.41",
"@types/shimmer": "1.0.1",
"codecov": "3.8.1",
"gts": "3.1.0",
Expand Down
14 changes: 9 additions & 5 deletions packages/opentelemetry-context-zone-peer-dep/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,19 @@
"version": "0.19.0",
"description": "OpenTelemetry Context Zone with peer dependency for zone.js",
"main": "build/src/index.js",
"module": "build/esm/index.js",
"types": "build/src/index.d.ts",
"repository": "open-telemetry/opentelemetry-js",
"scripts": {
"compile": "tsc --build",
"clean": "tsc --build --clean",
"compile": "tsc --build tsconfig.json tsconfig.esm.json",
"clean": "tsc --build --clean tsconfig.json tsconfig.esm.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"
"watch": "tsc --build --watch tsconfig.json tsconfig.esm.json"
},
"keywords": [
"opentelemetry",
Expand All @@ -30,6 +31,9 @@
"node": ">=8.0.0"
},
"files": [
"build/esm/**/*.js",
"build/esm/**/*.js.map",
"build/esm/**/*.d.ts",
"build/src/**/*.js",
"build/src/**/*.js.map",
"build/src/**/*.d.ts",
Expand All @@ -41,10 +45,10 @@
"access": "public"
},
"devDependencies": {
"@babel/core": "7.13.15",
"@babel/core": "7.13.16",
"@opentelemetry/api": "^1.0.0-rc.0",
"@types/mocha": "8.2.2",
"@types/node": "14.14.37",
"@types/node": "14.14.41",
"@types/sinon": "9.0.11",
"@types/webpack-env": "1.16.0",
"@types/zone.js": "0.5.12",
Expand Down
14 changes: 14 additions & 0 deletions packages/opentelemetry-context-zone-peer-dep/tsconfig.esm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"extends": "../../tsconfig.base.esm.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "build/esm",
"tsBuildInfoFile": "build/esm/tsconfig.esm.tsbuildinfo"
},
"files": [
"node_modules/zone.js/dist/zone.js.d.ts"
],
"include": [
"src/**/*.ts"
]
}
14 changes: 9 additions & 5 deletions packages/opentelemetry-context-zone/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@
"version": "0.19.0",
"description": "OpenTelemetry Context Zone",
"main": "build/src/index.js",
"module": "build/esm/index.js",
"types": "build/src/index.d.ts",
"repository": "open-telemetry/opentelemetry-js",
"scripts": {
"compile": "tsc --build",
"clean": "tsc --build --clean",
"compile": "tsc --build tsconfig.json tsconfig.esm.json",
"clean": "tsc --build --clean tsconfig.json tsconfig.esm.json",
"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"
},
"keywords": [
"opentelemetry",
Expand All @@ -27,6 +28,9 @@
"node": ">=8.0.0"
},
"files": [
"build/esm/**/*.js",
"build/esm/**/*.js.map",
"build/esm/**/*.d.ts",
"build/src/**/*.js",
"build/src/**/*.js.map",
"build/src/**/*.d.ts",
Expand All @@ -38,9 +42,9 @@
"access": "public"
},
"devDependencies": {
"@babel/core": "7.13.15",
"@babel/core": "7.13.16",
"@types/mocha": "8.2.2",
"@types/node": "14.14.37",
"@types/node": "14.14.41",
"@types/sinon": "9.0.11",
"@types/webpack-env": "1.16.0",
"babel-loader": "8.2.2",
Expand Down
11 changes: 11 additions & 0 deletions packages/opentelemetry-context-zone/tsconfig.esm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": "../../tsconfig.base.esm.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "build/esm",
"tsBuildInfoFile": "build/esm/tsconfig.esm.tsbuildinfo"
},
"include": [
"src/**/*.ts"
]
}
13 changes: 9 additions & 4 deletions packages/opentelemetry-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,17 @@
"version": "0.19.0",
"description": "OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics",
"main": "build/src/index.js",
"module": "build/esm/index.js",
"browser": {
"./src/platform/index.ts": "./src/platform/browser/index.ts",
"./build/esm/platform/index.js": "./build/esm/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",
"clean": "tsc --build --clean",
"compile": "tsc --build tsconfig.json tsconfig.esm.json",
"clean": "tsc --build --clean tsconfig.json tsconfig.esm.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",
Expand All @@ -22,7 +24,7 @@
"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"
},
"keywords": [
"opentelemetry",
Expand All @@ -39,6 +41,9 @@
"node": ">=8.5.0"
},
"files": [
"build/esm/**/*.js",
"build/esm/**/*.js.map",
"build/esm/**/*.d.ts",
"build/src/**/*.js",
"build/src/**/*.js.map",
"build/src/**/*.d.ts",
Expand All @@ -53,7 +58,7 @@
"@opentelemetry/api": "^1.0.0-rc.0",
"@opentelemetry/propagator-b3": "0.19.0",
"@types/mocha": "8.2.2",
"@types/node": "14.14.37",
"@types/node": "14.14.41",
"@types/semver": "7.3.4",
"@types/sinon": "9.0.11",
"@types/webpack-env": "1.16.0",
Expand Down
11 changes: 11 additions & 0 deletions packages/opentelemetry-core/tsconfig.esm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": "../../tsconfig.base.esm.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "build/esm",
"tsBuildInfoFile": "build/esm/tsconfig.esm.tsbuildinfo"
},
"include": [
"src/**/*.ts"
]
}
4 changes: 2 additions & 2 deletions packages/opentelemetry-exporter-collector-grpc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@
"access": "public"
},
"devDependencies": {
"@babel/core": "7.13.15",
"@babel/core": "7.13.16",
"@opentelemetry/api": "^1.0.0-rc.0",
"@opentelemetry/api-metrics": "0.19.0",
"@types/mocha": "8.2.2",
"@types/node": "14.14.37",
"@types/node": "14.14.41",
"@types/sinon": "9.0.11",
"codecov": "3.8.1",
"cpx": "1.5.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/opentelemetry-exporter-collector-proto/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@
"access": "public"
},
"devDependencies": {
"@babel/core": "7.13.15",
"@babel/core": "7.13.16",
"@opentelemetry/api": "^1.0.0-rc.0",
"@opentelemetry/api-metrics": "0.19.0",
"@types/mocha": "8.2.2",
"@types/node": "14.14.37",
"@types/node": "14.14.41",
"@types/sinon": "9.0.11",
"codecov": "3.8.1",
"cpx": "1.5.0",
Expand Down
15 changes: 10 additions & 5 deletions packages/opentelemetry-exporter-collector/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,17 @@
"version": "0.19.0",
"description": "OpenTelemetry Collector Exporter allows user to send collected traces to the OpenTelemetry Collector",
"main": "build/src/index.js",
"module": "build/esm/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/src/platform/index.js": "./build/src/platform/browser/index.js"
},
"scripts": {
"compile": "tsc --build",
"clean": "tsc --build --clean",
"compile": "tsc --build tsconfig.json tsconfig.esm.json",
"clean": "tsc --build --clean tsconfig.json tsconfig.esm.json",
"codecov:browser": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../",
"lint": "eslint . --ext .ts",
"lint:fix": "eslint . --ext .ts --fix",
Expand All @@ -20,7 +22,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"
"watch": "tsc --build --watch tsconfig.json tsconfig.esm.json"
},
"keywords": [
"opentelemetry",
Expand All @@ -37,6 +39,9 @@
"node": ">=8.0.0"
},
"files": [
"build/esm/**/*.js",
"build/esm/**/*.js.map",
"build/esm/**/*.d.ts",
"build/src/**/*.js",
"build/src/**/*.js.map",
"build/src/**/*.d.ts",
Expand All @@ -48,10 +53,10 @@
"access": "public"
},
"devDependencies": {
"@babel/core": "7.13.15",
"@babel/core": "7.13.16",
"@opentelemetry/api": "^1.0.0-rc.0",
"@types/mocha": "8.2.2",
"@types/node": "14.14.37",
"@types/node": "14.14.41",
"@types/sinon": "9.0.11",
"@types/webpack-env": "1.16.0",
"babel-loader": "8.2.2",
Expand Down
Loading

0 comments on commit 9766d51

Please sign in to comment.