Skip to content

Improvements and fixes#721

Merged
sindresorhus merged 9 commits intosindresorhus:mainfrom
mifi:improvements
Nov 27, 2023
Merged

Improvements and fixes#721
sindresorhus merged 9 commits intosindresorhus:mainfrom
mifi:improvements

Conversation

@mifi
Copy link
Copy Markdown
Contributor

@mifi mifi commented Nov 8, 2023

This PR fixes a few bugs and allow publishing scoped packages (to avoid 402 error). Actually these are all bugs I discovered while working on support for yarn berry in np.

I realize that you're not interested in supporting yarn berry #612 - however I use it a lot and I use np as well, so I figured I'd try to add support for it. I can submit a separate PR for berry support, but if you're still not interested I'll publish a fork of np instead. Here's the branch: mifi#1

for easier review, see each commit separately.

mifi added 5 commits November 8, 2023 22:58
enable2fa.getEnable2faArgs is not a function

probably from rewriting to esm
can be reproduced by running `np` without an internet connection
thereby it thinks that options.availability.isUnknown but the package is not scoped,
so it just exits with success (exit code 0)
where it was trying to call setFrom with the first argument as a Version instance
instead of a string
causing code to fail
otherwise it fails with:
Response Code: 402 (Payment Required)
You must sign up for private packages
@mifi mifi changed the title Improvements Improvements and fixes Nov 8, 2023
Comment thread source/cli-implementation.js Outdated
Comment thread source/cli-implementation.js Outdated
@sindresorhus
Copy link
Copy Markdown
Owner

I can submit a separate PR for berry support

Sorry, no interest. I don't want more code-paths to maintain. Everyone wants their feature supported, but no one stays around in the long-term to fix bugs.

@mifi
Copy link
Copy Markdown
Contributor Author

mifi commented Nov 27, 2023

I have now reverted the --publish-scoped option added a note to the readme, thanks!

@sindresorhus sindresorhus merged commit d7543ff into sindresorhus:main Nov 27, 2023
@sindresorhus
Copy link
Copy Markdown
Owner

Thanks :)

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