Skip to content
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(valibot-validator): use tsup and fix esm/cjs #753

Merged
merged 4 commits into from
Sep 28, 2024

Conversation

MonsterDeveloper
Copy link
Contributor

Issue

Currently valibot-validator export always resolve to CJS ones, even from ESM environments:
CleanShot 2024-09-27 at 21 09 26@2x
See on AreTheTypesWrong

Changes made

This PR fixes package's exports and replaces tsc builds with tsup for correct file extensions (.cjs) (as per Matt Pocock's guide to NPM packages.

Now ESM resolves correctly:
CleanShot 2024-09-27 at 21 12 23@2x

Copy link

changeset-bot bot commented Sep 27, 2024

🦋 Changeset detected

Latest commit: 9cca8e7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@hono/valibot-validator Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Member

@yusukebe yusukebe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@yusukebe
Copy link
Member

Hi @MonsterDeveloper

Looks good to me. We have problems like this with other middleware. This change is a good reference for fixing it. Thank you!

@yusukebe yusukebe merged commit 9639103 into honojs:main Sep 28, 2024
1 check passed
@github-actions github-actions bot mentioned this pull request Sep 28, 2024
@MonsterDeveloper MonsterDeveloper deleted the valibot-validator-exports branch September 28, 2024 19:28
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