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

v5 could export default trimNewlines #13

Closed
nealeu opened this issue Aug 11, 2023 · 2 comments
Closed

v5 could export default trimNewlines #13

nealeu opened this issue Aug 11, 2023 · 2 comments

Comments

@nealeu
Copy link

nealeu commented Aug 11, 2023

v5 causes an unnecessary breakage where you could still provide a default export of trimNewlines so that people don't get things like:

✖ stylelint scss:
file:///home/neale/dev/solum/solum-xplain-ui/node_modules/stylelint/node_modules/meow/index.js:9
import trimNewlines from 'trim-newlines';
       ^^^^^^^^^^^^
SyntaxError: The requested module 'trim-newlines' does not provide an export named 'default'
@sindresorhus
Copy link
Owner

It doesn't make sense to provide both default and named export of the same thing. The change was done in a major release.

@sindresorhus sindresorhus closed this as not planned Won't fix, can't repro, duplicate, stale Aug 11, 2023
@nealeu
Copy link
Author

nealeu commented Aug 11, 2023

Of course. Not sure why I didn't investigate why on earth npm 9.6.7 is providing v5 when meow has:

    "trim-newlines": "^4.0.2",

[edit] Because some other dev put an override in to v5! Sorry

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

No branches or pull requests

2 participants