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

Add jest environment's missing dependencies #195

Closed
wants to merge 1 commit into from

Conversation

BasixKOR
Copy link
Contributor

@BasixKOR BasixKOR commented Mar 1, 2022

Hello! While I use this project with Yarn, I noticed the environment package has some unlisted dependencies. This will ensure the packages are installed correctly (like jest-environment-node) but also improves the compatibility with more strict package managers such as pnpm or Yarn Berry.

@@ -45,7 +45,12 @@
"@miniflare/sites": "2.3.0",
"@miniflare/storage-memory": "2.3.0",
"@miniflare/web-sockets": "2.3.0",
"miniflare": "2.3.0"
"miniflare": "2.3.0",
"@jest/environment": ">=27",
Copy link
Contributor

Choose a reason for hiding this comment

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

@jest/environment and @jest/types are only used in type-only imports, so should probably be devDependencies.

Comment on lines +50 to +53
"@jest/fake-timers": ">=27",
"@jest/types": ">=27",
"jest-mock": ">=27",
"jest-util": ">=27"
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not too sure about this, but shouldn't these be peerDependencies instead, since we're expecting them to be installed by jest?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Although I followed what Meta did on their jest-environment-node the package managers (including npm) doesn't treat the nested dependencies as peer dependencies (AFAIK).

mrbbot added a commit that referenced this pull request May 27, 2022
Co-authored-by: BasixKOR <basix@basix.tech>
@mrbbot
Copy link
Contributor

mrbbot commented May 27, 2022

Closing in favour of 120a672. This was easier than rebasing. 😅 Thanks for the PR!

@mrbbot mrbbot closed this May 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants