fix: correct jest-either type exports#1684
Merged
Merged
Conversation
goblindegook
requested changes
Jun 21, 2026
| @@ -0,0 +1,87 @@ | |||
| import { execFileSync } from 'node:child_process' | |||
Member
There was a problem hiding this comment.
Thanks for the patch but a script to validate the format of a declarative file such as package.json should not be necessary. Happy to merge if you remove this.
Contributor
Author
There was a problem hiding this comment.
Thanks for reviewing. I removed the package entrypoint verification script and the root test:package hook, leaving only the @pacote/jest-either package metadata fix. I also updated the PR description with the current validation commands.
09e6978 to
1548ff8
Compare
goblindegook
approved these changes
Jun 22, 2026
Contributor
Author
|
Thanks for the review and for merging this. I appreciate the guidance on keeping the package metadata fix focused. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@pacote/jest-eitherpackagetypesmetadata at the generated ESM declaration fileexports["."].typescondition so TypeScript NodeNext consumers can resolve the root package typesWhy
The published
@pacote/jest-either@6.0.1package declarestypes: lib/index.d.ts, but the npm tarball containslib/esm/index.d.tsandlib/cjs/index.d.tsinstead. Because the package also definesexports, TypeScript NodeNext consumers cannot resolve the root package declarations without an explicittypesexport condition.Validation
COREPACK_ENABLE_PROJECT_SPEC=0 corepack pnpm exec biome check package.json packages/jest-either/package.jsonCOREPACK_ENABLE_PROJECT_SPEC=0 corepack pnpm --filter @pacote/jest-either... buildCOREPACK_ENABLE_PROJECT_SPEC=0 corepack pnpm vitest run packages/jest-either/testCOREPACK_ENABLE_PROJECT_SPEC=0 corepack pnpm lint— exits 0; reports two existing unused-suppression warnings inpackages/error/src/index.tsnpm pack --dry-run --ignore-scripts --json ./packages/jest-eitherpackages/jest-either, installed it into a temporary NodeNext TypeScript consumer, and verifiedimport matchers, * as named from "@pacote/jest-either"compiles withtsc --noEmitgit diff --check