Skip to content

jest-worker: Move @types/node to devDependencies #13374

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

Closed
wants to merge 1 commit into from

Conversation

donatj
Copy link

@donatj donatj commented Oct 3, 2022

Summary

Currently, when you npm require jest-worker, it has @types/node as a sub-requirement. It should be a dev requirement as @types/node is in no way required for using jest-worker, just development of jest-worker.

This is a bigger problem because TypeScript projects which include jest-worker are forced into targeting node instead of a browser. This is a because @types/node for instance redefines setTimeout among other things.

I had previously opened this as #12544 - it got closed for being stale. I am reopening as I am once again actively butting heads with the issue.

Test plan

Not really "testable" perse.

@github-actions
Copy link

github-actions bot commented Jan 1, 2023

This PR is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 30 days.

@github-actions github-actions bot added the Stale label Jan 1, 2023
@SimenB
Copy link
Member

SimenB commented Jan 1, 2023

jest-worker has Node types in its published types, so we cannot do this: https://www.runpkg.com/?jest-worker@29.3.1/build/index.d.ts#9

@SimenB SimenB closed this Jan 1, 2023
@github-actions
Copy link

github-actions bot commented Feb 1, 2023

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants