Skip to content

Commit 7e9d8c2

Browse files
authored
chore: move jest-junit dependency to top-level (aws#9004)
`"jest-junit"` is a new dependency for all packages, used as a Jest reporter in the default Jest config located in `cdk-build-tools`. `jest-junit` was added as a dependency to `cdk-build-tools`, but when resolving reporters Jest starts resolving from the *package under test*. That means that `jest-junit` should be a `devDependency` for every individual package; or more easily: add the dependency to the root of the repository so that it is automatically in scope for every package inside it. It used to accidentally work before this change, because the dependency hoisting performed by Yarn moved the dependency up to the root of the tree where it would be found by the jest run. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 7e5367c commit 7e9d8c2

File tree

3 files changed

+1
-2
lines changed

3 files changed

+1
-2
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"jsii-diff": "^1.8.0",
2121
"jsii-pacmak": "^1.8.0",
2222
"jsii-rosetta": "^1.8.0",
23+
"jest-junit": "^11.0.1",
2324
"lerna": "^3.22.1",
2425
"standard-version": "^8.0.0",
2526
"typescript": "~3.9.6"

tools/cdk-build-tools/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
"@types/fs-extra": "^8.1.0",
3737
"@types/jest": "^26.0.3",
3838
"@types/yargs": "^15.0.5",
39-
"jest-junit": "^11.0.1",
4039
"pkglint": "0.0.0"
4140
},
4241
"dependencies": {

tools/cdk-integ-tools/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
"@types/fs-extra": "^8.1.0",
3333
"@types/yargs": "^15.0.5",
3434
"cdk-build-tools": "0.0.0",
35-
"jest-junit": "^11.0.1",
3635
"pkglint": "0.0.0"
3736
},
3837
"dependencies": {

0 commit comments

Comments
 (0)