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: npm 10 bug with npm pack; issue 740 #743

Merged

Conversation

transitive-bullshit
Copy link
Contributor

@transitive-bullshit transitive-bullshit commented Apr 16, 2024

Fixes #740

Anyone using np with newer versions of Node.js and npm >= 10 is probably running into this issue. This PR just sanitizes the stdout from npm pack to look for the first [ character to start parsing the output JSON array, which should be backwards compatible with previous functionality.

@sindresorhus
Copy link
Owner

Can you open an issue or link to an existing npm issue about this as a code comment? I would like to be able to eventually remove that workaround.

@transitive-bullshit
Copy link
Contributor Author

Looks like this is the corresponding issue to track for npm/cli npm/cli#7354

@sindresorhus
Copy link
Owner

as a code comment

@transitive-bullshit
Copy link
Contributor Author

Ahhh missed that. Done 😃

@voxpelli
Copy link
Contributor

Random sidenote: Reminds the that this would be awesome: sindresorhus/eslint-plugin-unicorn#1858 (comment)

@sindresorhus sindresorhus merged commit 4caa295 into sindresorhus:main Apr 17, 2024
3 checks passed
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.

np with npm 10.5.1: Failed to parse output of npm pack
3 participants