Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: upgrade to mocha@10 #2481

Merged
merged 15 commits into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .mocharc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
require: 'ts-node/register/transpile-only'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer note: ts-node offers this way to specify the transpileOnly: true setting (which is what ts-mocha was using)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice finding 🎉

Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"lint:fix": "eslint . --fix",
"precompile": "tsc --version && lerna run version:update --scope @opentelemetry/browser-extension-autoinjection --include-dependencies",
"prewatch": "npm run precompile",
"test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'",
"test": "nyc mocha 'test/**/*.test.ts'",
"tdd": "npm run test -- --watch-extensions ts --watch",
"watch": "npx webpack --mode=development --watch",
"watch:mv2": "npx webpack --mode=development --watch --env MV=2",
Expand Down Expand Up @@ -47,15 +47,14 @@
"html-webpack-plugin": "5.3.2",
"jimp": "0.16.1",
"jsdom": "15.2.1",
"mocha": "7.2.0",
"mocha": "10.7.3",
"null-loader": "4.0.1",
"nyc": "15.1.0",
"responsive-loader": "2.3.0",
"rimraf": "4.2.0",
"sinon": "15.0.1",
"sinon-chrome": "3.0.1",
"ts-loader": "9.2.5",
"ts-mocha": "10.0.0",
"typescript": "4.4.4",
"webpack": "4.46.0",
"webpack-cli": "4.7.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"precompile": "tsc --version && lerna run version:update --scope @opentelemetry/resource-detector-alibaba-cloud --include-dependencies",
"prewatch": "npm run precompile",
"prepublishOnly": "npm run compile",
"test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'",
"test": "nyc mocha 'test/**/*.test.ts'",
"tdd": "npm run test -- --watch-extensions ts --watch",
"watch": "tsc -w"
},
Expand Down Expand Up @@ -44,20 +44,19 @@
"@types/mocha": "8.2.3",
"@types/node": "18.18.14",
"@types/sinon": "10.0.20",
"mocha": "7.2.0",
"mocha": "10.7.3",
"nock": "13.3.3",
"nyc": "15.1.0",
"rimraf": "5.0.10",
"sinon": "15.2.0",
"ts-mocha": "10.0.0",
"typescript": "4.4.4"
},
"peerDependencies": {
"@opentelemetry/api": "^1.0.0"
},
"dependencies": {
"@opentelemetry/resources": "^1.10.0",
"@opentelemetry/core": "^1.26.0",
"@opentelemetry/resources": "^1.10.0",
"@opentelemetry/semantic-conventions": "^1.27.0"
},
"homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/detectors/node/opentelemetry-resource-detector-alibaba-cloud#readme"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"precompile": "tsc --version && lerna run version:update --scope @opentelemetry/resource-detector-aws --include-dependencies",
"prewatch": "npm run precompile",
"prepublishOnly": "npm run compile",
"test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'",
"test": "nyc mocha 'test/**/*.test.ts'",
"tdd": "npm run test -- --watch-extensions ts --watch",
"watch": "tsc -w"
},
Expand Down Expand Up @@ -43,12 +43,11 @@
"@types/mocha": "8.2.3",
"@types/node": "18.18.14",
"@types/sinon": "10.0.20",
"mocha": "7.2.0",
"mocha": "10.7.3",
"nock": "13.3.3",
"nyc": "15.1.0",
"rimraf": "5.0.10",
"sinon": "15.2.0",
"ts-mocha": "10.0.0",
"typescript": "4.4.4"
},
"peerDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"precompile": "tsc --version && lerna run version:update --scope @opentelemetry/resource-detector-azure --include-dependencies",
"prewatch": "npm run precompile",
"prepublishOnly": "npm run compile",
"test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'",
"test": "nyc mocha 'test/**/*.test.ts'",
"tdd": "npm run test -- --watch-extensions ts --watch",
"watch": "tsc -w"
},
Expand All @@ -36,11 +36,10 @@
"@types/mocha": "8.2.3",
"@types/node": "18.18.14",
"@types/sinon": "10.0.20",
"mocha": "7.2.0",
"mocha": "10.7.3",
"nock": "13.3.3",
"nyc": "15.1.0",
"rimraf": "5.0.10",
"ts-mocha": "10.0.0",
"typescript": "4.4.4"
},
"peerDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"precompile": "tsc --version && lerna run version:update --scope @opentelemetry/resource-detector-container --include-dependencies",
"prewatch": "npm run precompile",
"prepublishOnly": "npm run compile",
"test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'",
"test": "nyc mocha 'test/**/*.test.ts'",
"tdd": "npm run test -- --watch-extensions ts --watch",
"version:update": "node ../../../scripts/version-update.js",
"watch": "tsc -w"
Expand All @@ -38,20 +38,19 @@
"@types/node": "18.18.14",
"@types/sinon": "10.0.20",
"eslint-plugin-header": "^3.1.1",
"mocha": "7.2.0",
"mocha": "10.7.3",
"nock": "13.3.3",
"nyc": "15.1.0",
"rimraf": "5.0.10",
"sinon": "15.2.0",
"ts-mocha": "10.0.0",
"typescript": "4.4.4"
},
"peerDependencies": {
"@opentelemetry/api": "^1.0.0"
},
"dependencies": {
"@opentelemetry/resources": "^1.10.0",
"@opentelemetry/core": "^1.26.0",
"@opentelemetry/resources": "^1.10.0",
"@opentelemetry/semantic-conventions": "^1.27.0"
},
"homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/detectors/node/opentelemetry-resource-detector-container#readme"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"precompile": "tsc --version && lerna run version:update --scope @opentelemetry/resource-detector-gcp --include-dependencies",
"prewatch": "npm run precompile",
"prepublishOnly": "npm run compile",
"test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'",
"test": "nyc mocha 'test/**/*.test.ts'",
"tdd": "npm run test -- --watch-extensions ts --watch",
"watch": "tsc -w"
},
Expand Down Expand Up @@ -43,11 +43,10 @@
"@types/mocha": "8.2.3",
"@types/node": "18.18.14",
"@types/semver": "7.5.8",
"mocha": "7.2.0",
"mocha": "10.7.3",
"nock": "13.3.3",
"nyc": "15.1.0",
"rimraf": "5.0.10",
"ts-mocha": "10.0.0",
"typescript": "4.4.4"
},
"peerDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"precompile": "tsc --version && lerna run version:update --scope @opentelemetry/resource-detector-github --include-dependencies",
"prewatch": "npm run precompile",
"prepublishOnly": "npm run compile",
"test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'",
"test": "nyc mocha 'test/**/*.test.ts'",
"tdd": "npm run test -- --watch-extensions ts --watch",
"watch": "tsc -w"
},
Expand Down Expand Up @@ -46,11 +46,10 @@
"@types/mocha": "8.2.3",
"@types/node": "18.18.14",
"@types/sinon": "10.0.20",
"mocha": "7.2.0",
"mocha": "10.7.3",
"nyc": "15.1.0",
"rimraf": "5.0.10",
"sinon": "15.2.0",
"ts-mocha": "10.0.0",
"typescript": "4.4.4"
},
"dependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"precompile": "tsc --version && lerna run version:update --scope @opentelemetry/resource-detector-instana --include-dependencies",
"prewatch": "npm run precompile",
"prepublishOnly": "npm run compile",
"test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'",
"test": "nyc mocha 'test/**/*.test.ts'",
"tdd": "npm run test -- --watch-extensions ts --watch",
"watch": "tsc -w"
},
Expand Down Expand Up @@ -43,11 +43,10 @@
"@types/mocha": "8.2.3",
"@types/node": "18.18.14",
"@types/semver": "7.5.8",
"mocha": "7.2.0",
"mocha": "10.7.3",
"nock": "13.3.3",
"nyc": "15.1.0",
"rimraf": "5.0.10",
"ts-mocha": "10.0.0",
"typescript": "4.4.4"
},
"dependencies": {
Expand Down
5 changes: 2 additions & 3 deletions incubator/opentelemetry-sampler-aws-xray/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"clean": "tsc --build --clean tsconfig.json tsconfig.esm.json",
"prepublishOnly": "npm run compile",
"tdd": "npm run test -- --watch-extensions ts --watch",
"test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'",
"test": "nyc mocha 'test/**/*.test.ts'",
"version:update": "node ../../scripts/version-update.js",
"watch": "tsc --build --watch tsconfig.json tsconfig.esm.json"
},
Expand All @@ -58,11 +58,10 @@
"@typescript-eslint/parser": "5.8.1",
"eslint": "8.7.0",
"expect": "29.2.0",
"mocha": "7.2.0",
"mocha": "10.7.3",
"nock": "13.3.3",
"nyc": "15.1.0",
"sinon": "15.2.0",
"ts-mocha": "10.0.0",
"typescript": "4.4.4"
},
"engines": {
Expand Down
5 changes: 2 additions & 3 deletions metapackages/auto-configuration-propagators/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"prewatch": "npm run precompile",
"prepublishOnly": "npm run compile",
"tdd": "npm run test -- --watch-extensions ts --watch",
"test": "nyc ts-mocha -p tsconfig.json 'test/**/*.ts'",
"test": "nyc mocha 'test/**/*.ts'",
"watch": "tsc -w"
},
"bugs": {
Expand All @@ -37,11 +37,10 @@
"@types/mocha": "7.0.2",
"@types/node": "18.18.14",
"@types/sinon": "10.0.20",
"mocha": "7.2.0",
"mocha": "10.7.3",
"nyc": "15.1.0",
"rimraf": "5.0.10",
"sinon": "15.2.0",
"ts-mocha": "10.0.0",
"typescript": "4.4.4"
},
"dependencies": {
Expand Down
5 changes: 2 additions & 3 deletions metapackages/auto-instrumentations-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"prewatch": "npm run precompile",
"prepublishOnly": "npm run compile",
"tdd": "yarn test -- --watch-extensions ts --watch",
"test": "nyc ts-mocha -p tsconfig.json 'test/**/*.ts'",
"test": "nyc mocha 'test/**/*.ts'",
"watch": "tsc -w"
},
"bugs": {
Expand All @@ -41,11 +41,10 @@
"@types/mocha": "7.0.2",
"@types/node": "18.18.14",
"@types/sinon": "10.0.20",
"mocha": "7.2.0",
"mocha": "10.7.3",
"nyc": "15.1.0",
"rimraf": "5.0.10",
"sinon": "15.2.0",
"ts-mocha": "10.0.0",
"typescript": "4.4.4"
},
"dependencies": {
Expand Down
3 changes: 1 addition & 2 deletions metapackages/auto-instrumentations-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,11 @@
"karma-mocha": "2.0.1",
"karma-spec-reporter": "0.0.36",
"karma-webpack": "5.0.1",
"mocha": "10.2.0",
"mocha": "10.7.3",
"nyc": "15.1.0",
"rimraf": "5.0.10",
"sinon": "15.1.2",
"ts-loader": "9.5.1",
"ts-mocha": "10.0.0",
"typescript": "4.4.4",
"webpack": "5.94.0",
"webpack-cli": "5.1.4",
Expand Down
Loading