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

Upgrade warning to error #95

Open
benmccann opened this issue May 3, 2024 · 1 comment
Open

Upgrade warning to error #95

benmccann opened this issue May 3, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@benmccann
Copy link
Contributor

https://publint.dev/@growthbook/[email protected]

./dist/esm/index.js is written in ESM, but is interpreted as CJS. Consider using the .mjs extension, e.g. ./dist/esm/index.mjs (More info) - this is breaking the library for users in SvelteKit/Vites, so it would be nice to see if be an error

Also, the one about "types" needing to come first in exports to satisfy TypeScript. I've never actually seen that break an app, so I wonder if it should be a warning?

@bluwy
Copy link
Owner

bluwy commented May 5, 2024

Escalating the written in ESM... message as an error makes sense to me. Initially I have it as a warning because the library may not be meant for normal nodejs usage, but I think it's rare these days and is always worth aligning the node default. Might be safer to only change this in the next minor.

I think the types message still makes sense as an error. Because it implies an intention for types to work, but it'll never work in practice. Warnings are reserved for things that still may work in certain environments.

@bluwy bluwy added the enhancement New feature or request label May 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants