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: move jest-junit dependency to top-level #9004

Merged
merged 1 commit into from
Jul 10, 2020

Conversation

rix0rrr
Copy link
Contributor

@rix0rrr rix0rrr commented Jul 10, 2020

"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

`"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.
@rix0rrr rix0rrr requested a review from NetaNir July 10, 2020 15:21
@rix0rrr rix0rrr self-assigned this Jul 10, 2020
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Jul 10, 2020
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: 06e34ac
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify
Copy link
Contributor

mergify bot commented Jul 10, 2020

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit 7e9d8c2 into master Jul 10, 2020
@mergify mergify bot deleted the huijbers/move-junit-dep branch July 10, 2020 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution/core This is a PR that came from AWS.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants