Skip to content

Put types first in package exports#14

Open
Baijack-star wants to merge 1 commit into
unlight:masterfrom
Baijack-star:fix-types-export-order
Open

Put types first in package exports#14
Baijack-star wants to merge 1 commit into
unlight:masterfrom
Baijack-star:fix-types-export-order

Conversation

@Baijack-star
Copy link
Copy Markdown

Summary

  • move the types condition before default in the source package.json export map
  • update the release Taskfile rewrite so generated dist/package.json keeps the same order

Verification

  • git diff --check
  • static check that source package.json has types before default
  • static check that the Taskfile jq rewrite emits types before default
  • packed the patched package with npm pack --silent
  • installed the patched tarball into a clean TypeScript consumer with typescript@5.9.3, @prisma/client@7, @prisma/client-runtime-utils@7, and graphql@16; npx tsc --noEmit -p tsconfig.json passed with moduleResolution: "NodeNext"

Notes:

  • I also tried @arethetypeswrong/cli, but its current run failed with Cannot read properties of undefined (reading 'filename'), so I am not using that as verification.
  • Installing the repo's full dev dependency tree hit an upstream npm peer-resolution conflict unless --legacy-peer-deps was used, and the legacy install ran long enough that I stopped it. The package-shape change above is still covered by the source/generated metadata checks and clean consumer compile.

I used an AI coding assistant to prepare this patch.

Fixes #13

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.

package.json exports has default before types — breaks TypeScript module resolution

1 participant