Skip to content

Commit

Permalink
chore: use npm workspaces and a package-lock.json
Browse files Browse the repository at this point in the history
- use npm workspaces instead of lerna for monorepo install handling
  (requires at least npm@7, so node v14 users will have to update their npm)
- updates to lerna@6, which brings parallel
- add package-lock.json for more reliable dev and testing

Refs: open-telemetry/opentelemetry-js#4238
  • Loading branch information
trentm committed Nov 3, 2023
1 parent 1b0caa6 commit 4f94b63
Show file tree
Hide file tree
Showing 67 changed files with 57,342 additions and 84 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ typings/

# lock files
yarn.lock
package-lock.json
packages/**/yarn.lock
packages/**/package-lock.json

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"lint:fix": "eslint . --ext .ts --fix",
"precompile": "tsc --version && lerna run version:update --scope @opentelemetry/resource-detector-alibaba-cloud --include-dependencies",
"prewatch": "npm run precompile",
"prepare": "npm run compile",
"prepublishOnly": "npm run compile",
"test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'",
"tdd": "npm run test -- --watch-extensions ts --watch",
"watch": "tsc -w"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"lint:fix": "eslint . --ext .ts --fix",
"precompile": "tsc --version && lerna run version:update --scope @opentelemetry/resource-detector-aws --include-dependencies",
"prewatch": "npm run precompile",
"prepare": "npm run compile",
"prepublishOnly": "npm run compile",
"test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'",
"tdd": "npm run test -- --watch-extensions ts --watch",
"watch": "tsc -w"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"lint:fix": "eslint . --ext .ts --fix",
"precompile": "tsc --version && lerna run version:update --scope @opentelemetry/resource-detector-azure --include-dependencies",
"prewatch": "npm run precompile",
"prepare": "npm run compile",
"prepublishOnly": "npm run compile",
"test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'",
"tdd": "npm run test -- --watch-extensions ts --watch",
"watch": "tsc -w"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"lint:fix": "eslint . --ext .ts --fix",
"precompile": "tsc --version && lerna run version --scope @opentelemetry/resource-detector-container --include-dependencies",
"prewatch": "npm run precompile",
"prepare": "npm run compile",
"prepublishOnly": "npm run compile",
"test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'",
"tdd": "npm run test -- --watch-extensions ts --watch",
"version:update": "node ../../../scripts/version-update.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"lint:fix": "eslint . --ext .ts --fix",
"precompile": "tsc --version && lerna run version:update --scope @opentelemetry/resource-detector-gcp --include-dependencies",
"prewatch": "npm run precompile",
"prepare": "npm run compile",
"prepublishOnly": "npm run compile",
"test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'",
"tdd": "npm run test -- --watch-extensions ts --watch",
"watch": "tsc -w"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"lint:fix": "eslint . --ext .ts --fix",
"precompile": "tsc --version && lerna run version:update --scope @opentelemetry/resource-detector-github --include-dependencies",
"prewatch": "npm run precompile",
"prepare": "npm run compile",
"prepublishOnly": "npm run compile",
"test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'",
"tdd": "npm run test -- --watch-extensions ts --watch",
"watch": "tsc -w"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"lint:fix": "eslint . --ext .ts --fix",
"precompile": "tsc --version && lerna run version:update --scope @opentelemetry/resource-detector-instana --include-dependencies",
"prewatch": "npm run precompile",
"prepare": "npm run compile",
"prepublishOnly": "npm run compile",
"test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'",
"tdd": "npm run test -- --watch-extensions ts --watch",
"watch": "tsc -w"
Expand Down
11 changes: 1 addition & 10 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
{
"npmClient": "npm",
"packages": [
"packages/*",
"metapackages/*",
"plugins/node/*",
"plugins/node/*/examples",
"plugins/web/*",
"plugins/web/*/examples",
"propagators/*",
"detectors/node/*"
],
"useWorkspaces": true,
"version": "independent",
"changelog": {
"repo": "open-telemetry/opentelemetry-js-contrib",
Expand Down
2 changes: 1 addition & 1 deletion metapackages/auto-instrumentations-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"lint:fix": "eslint . --ext .ts --fix",
"precompile": "tsc --version && lerna run version:update --scope @opentelemetry/auto-instrumentations-node --include-dependencies",
"prewatch": "npm run precompile",
"prepare": "npm run compile",
"prepublishOnly": "npm run compile",
"tdd": "yarn test -- --watch-extensions ts --watch",
"test": "nyc ts-mocha -p tsconfig.json 'test/**/*.ts'",
"watch": "tsc -w"
Expand Down
2 changes: 1 addition & 1 deletion metapackages/auto-instrumentations-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"lint:fix": "eslint . --ext .ts --fix",
"precompile": "tsc --version && lerna run version:update --scope @opentelemetry/auto-instrumentations-web --include-dependencies",
"prewatch": "npm run precompile",
"prepare": "npm run compile",
"prepublishOnly": "npm run compile",
"test:browser": "nyc karma start --single-run",
"watch": "tsc --build --watch tsconfig.json tsconfig.esm.json"
},
Expand Down
Loading

0 comments on commit 4f94b63

Please sign in to comment.