-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
fix: don't /// <reference types="jest" /> #9875
Conversation
Hi @jablko! Thank you for your pull request and welcome to our community.We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks! |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
Thanks! I'll see if I can add some test that verifies no |
Thanks @jablko! |
Awesome, thank you! |
* upstream/master: Prints the Symbol name into the error message with a custom asymmetric matcher (jestjs#9888) Show coverage of sources related to tests in changed files (jestjs#9769) fix: don't /// <reference types="jest" /> (jestjs#9875)
…pshots * upstream/master: (39 commits) Prints the Symbol name into the error message with a custom asymmetric matcher (jestjs#9888) Show coverage of sources related to tests in changed files (jestjs#9769) fix: don't /// <reference types="jest" /> (jestjs#9875) noCodeFrame respects noStackTrace (jestjs#9866) chore: update example to react-native@0.62 (jestjs#9746) Improve source map handling when instrumenting transformed code (jestjs#9811) Update .vscode/launch.json settings (jestjs#9868) chore: verify all packages have the same engine requirement (jestjs#9871) fix: pass custom cached realpath function to `resolve` (jestjs#9873) chore: mock stealthy-require in tests (jestjs#9855) chore: update resolve (jestjs#9872) chore: run CircleCI on node 14 (jestjs#9870) Add an option to vscode settings to always use workspace TS (jestjs#9869) fix(esm): handle parallel imports (jestjs#9858) chore: run CI on Node 14 (jestjs#9861) feat: add `@jest/globals` package for importing globals explici… (jestjs#9849) chore: bump resolve package (jestjs#9859) chore(runtime): simplify `createJestObjectFor` (jestjs#9857) chore: fix symlink creation failures on windows in tests (jestjs#9852) chore: skip mercurial tests when no hg installed (jestjs#9840) ...
…pshots * upstream/master: (39 commits) Prints the Symbol name into the error message with a custom asymmetric matcher (jestjs#9888) Show coverage of sources related to tests in changed files (jestjs#9769) fix: don't /// <reference types="jest" /> (jestjs#9875) noCodeFrame respects noStackTrace (jestjs#9866) chore: update example to react-native@0.62 (jestjs#9746) Improve source map handling when instrumenting transformed code (jestjs#9811) Update .vscode/launch.json settings (jestjs#9868) chore: verify all packages have the same engine requirement (jestjs#9871) fix: pass custom cached realpath function to `resolve` (jestjs#9873) chore: mock stealthy-require in tests (jestjs#9855) chore: update resolve (jestjs#9872) chore: run CircleCI on node 14 (jestjs#9870) Add an option to vscode settings to always use workspace TS (jestjs#9869) fix(esm): handle parallel imports (jestjs#9858) chore: run CI on Node 14 (jestjs#9861) feat: add `@jest/globals` package for importing globals explici… (jestjs#9849) chore: bump resolve package (jestjs#9859) chore(runtime): simplify `createJestObjectFor` (jestjs#9857) chore: fix symlink creation failures on windows in tests (jestjs#9852) chore: skip mercurial tests when no hg installed (jestjs#9840) ...
@jablko out it 25.5 |
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. |
Summary
DefinitelyTyped/DefinitelyTyped#44033 (comment)
@jest/environment
referencestypes="jest"
without a dependency on@types/jest
:I'm assuming that the
/// <reference types="jest" />
is unintended? but I haven't gotten to the bottom of why it gets added/whether it's a bug in the compiler?By default, all visible
@types
packages are included in your compilation, but there are plenty of other visible@types
packages that aren't added to the generated declaration. Presumablytsc
only adds those that are actually used, but@jest/environment
doesn't use@types/jest
? at least it compiles fine with"types": ["node"]
.Perhaps it's a symptom of microsoft/TypeScript#35343? I haven't dug any deeper. Meanwhile this workaround is cribbed from https://github.com/facebook/jest/blob/6cbd3cbbb4a6d261b65f8eec034146e4be426ff2/packages/jest-globals/tsconfig.json#L4-L5
Test plan
I ran
yarn build
and confirmed that after this change, the generatedpackages/jest-environment/build/index.d.ts
no longer contains/// <reference types="jest" />