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: add types exports declaration for ./locales/* #3700

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

disintegrator
Copy link

@disintegrator disintegrator commented Aug 10, 2024

Fixes #2698 #1461

This change fixes an issue that prevented Zod from being build and served through the Skypack CDN. Namely, Skypack was unable to resolve the declaration file lib/locales/en.d.ts because it was not exposed by the package.json#exports declaration.

I was able to verify this fix by publishing this branch to NPM (link) and comparing the result of the following in a Chrome console:

const z = await import ('https://cdn.skypack.dev/zod')
const zfixed = await import ('https://cdn.skypack.dev/@disintegrator/zod')

There was also a hint from other issues that Zod v3.18.x worked through Skypack but 3.19.0 did not. The latter is where the malformed exports declaration for ./locales/* was introduced.

This change fixes an issue that prevented Zod from being build and
served through the Skypack CDN. Namely, Skypack was unable to resolve
the declaration file `lib/locales/en.d.ts` because it was not exposed by
the `exports` definition in `package.json`.
Copy link

netlify bot commented Aug 10, 2024

Deploy Preview for guileless-rolypoly-866f8a ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 0542198
🔍 Latest deploy log https://app.netlify.com/sites/guileless-rolypoly-866f8a/deploys/66b79e2495449b00083a66de
😎 Deploy Preview https://deploy-preview-3700--guileless-rolypoly-866f8a.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

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.

Skypack error on 3.19+
1 participant