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

Improvements and fixes #721

Merged
merged 9 commits into from
Nov 27, 2023
Merged

Improvements and fixes #721

merged 9 commits into from
Nov 27, 2023

Conversation

mifi
Copy link
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.

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
source/cli-implementation.js Outdated Show resolved Hide resolved
source/cli-implementation.js Outdated Show resolved Hide resolved
@sindresorhus
Copy link
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
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
1 check passed
@sindresorhus
Copy link
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