Skip to content

Commit

Permalink
chore: move jest-junit dependency to top-level (aws#9004)
Browse files Browse the repository at this point in the history
`"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*
  • Loading branch information
rix0rrr authored Jul 10, 2020
1 parent 7e5367c commit 7e9d8c2
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 2 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"jsii-diff": "^1.8.0",
"jsii-pacmak": "^1.8.0",
"jsii-rosetta": "^1.8.0",
"jest-junit": "^11.0.1",
"lerna": "^3.22.1",
"standard-version": "^8.0.0",
"typescript": "~3.9.6"
Expand Down
1 change: 0 additions & 1 deletion tools/cdk-build-tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
"@types/fs-extra": "^8.1.0",
"@types/jest": "^26.0.3",
"@types/yargs": "^15.0.5",
"jest-junit": "^11.0.1",
"pkglint": "0.0.0"
},
"dependencies": {
Expand Down
1 change: 0 additions & 1 deletion tools/cdk-integ-tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
"@types/fs-extra": "^8.1.0",
"@types/yargs": "^15.0.5",
"cdk-build-tools": "0.0.0",
"jest-junit": "^11.0.1",
"pkglint": "0.0.0"
},
"dependencies": {
Expand Down

0 comments on commit 7e9d8c2

Please sign in to comment.