Skip to content

ali teaches connor a lesson in publishing#1

Merged
cnrstvns merged 1 commit intomainfrom
fix/publishing
May 11, 2023
Merged

ali teaches connor a lesson in publishing#1
cnrstvns merged 1 commit intomainfrom
fix/publishing

Conversation

@cnrstvns
Copy link
Copy Markdown
Owner

No description provided.

@cnrstvns cnrstvns merged commit 2d91ef9 into main May 11, 2023
@cnrstvns cnrstvns deleted the fix/publishing branch May 11, 2023 06:08
@alii
Copy link
Copy Markdown
Collaborator

alii commented May 11, 2023

This PR

  • implements required fields in package.json exports field to tell TypeScript how to resolve the types.
  • uses tsup for bundling instead of tsc

Before, the types were incorrect for importing as an ESM package from an ESM runtime, or importing as a CJS package from an ESM runtime. You can run pnpm pack on an older commit, and upload to https://arethetypeswrong.github.io/ to see for yourselves.

@alii
Copy link
Copy Markdown
Collaborator

alii commented Dec 28, 2023

Fwiw you can remove the copy-types build step as tsup >= 8.0.0 (at least) correctly generates the .d.cts file. See egoist/tsup#934

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.

2 participants