Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 60dda46

Browse files
committed
fix(test-runner-mocha): move @types/mocha to dev dependency
Having an `@types/*` package with global symbols like `it` and `describe` forces these global types on downstream consumers which may not use them. For example, Jasmine types overlap and conflict with Mocha types, but transitively including `@types/mocha` through `@web/test-runner-mocha` makes Jasmine impossible to use with Web Test Runner. See [this commit](angular/angular-cli@d95bb63) for a motivating example.
1 parent 5a81704 commit 60dda46

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

.changeset/twenty-pants-draw.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@web/test-runner-mocha': patch
3+
---
4+
5+
Remove `@types/mocha` from dependencies so its global types don't leak into user code.

package-lock.json

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/test-runner-mocha/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@
3535
"framework"
3636
],
3737
"dependencies": {
38-
"@types/mocha": "^10.0.1",
3938
"@web/test-runner-core": "^0.11.1"
4039
},
4140
"devDependencies": {
41+
"@types/mocha": "^10.0.1",
4242
"deepmerge": "^4.2.2",
4343
"mocha": "^10.2.0"
4444
}

0 commit comments

Comments
 (0)