Conversation
ljharb
left a comment
There was a problem hiding this comment.
Will versions of npm without this feature fail loudly on , in the argument? (i believe so)
Co-authored-by: Jordan Harband <ljharb@gmail.com>
Good question, no it won't. I was under the impression that dist-tags could not contain values that would url encode but apparently I am wrong. This means we have to either choose the new cli flag approach, or find a syntax that will error out with the current cli, and hopefully current registries. ~/D/n/gar-create-test (main↑4|✔) $ npm dist-tag add @gar/create-test@1.0.0 foo,bar
This operation requires a one-time password.
Enter OTP: ******
+foo,bar: @gar/create-test@1.0.0
~/D/n/gar-create-test (main↑4|✔) $ npm dist-tag ls @gar/create-test
false: 1.0.11
foo,bar: 1.0.0
latest: 1.0.13ETA: you can also see here the |
|
Multiple values for the same parameter might be better implemented as multiple declarations on the cli i.e. npm publish --tag latest --tag lts --tag nextnpm tag rm npm next-2 next-3 next-4 |
|
What happens in npm already with multiple tags in those fashions? |
It takes the last one you gave ~/D/n/gar-create-test (main↑5|✔) $ npm publish --tag latest --tag next --tag false
...
~/D/n/gar-create-test (main↑5|✔) $ npm dist-tag ls @gar/create-test
false: 1.0.15
latest: 1.0.13 |
|
I have packages with all sorts of weird tags because of accidental typos or bugs in the generated tags. For example |
|
In my opinion, it is weird to have the same version with mutiple tags attached to it, version is either stable ( Most of npm packages are using tags (others that the default As far as I understand to the issue, we can already publish a version to mutiple tags by doing multiple time the command ? npm publish --tag latest
npm publish --tag next
npm publish --tag canaryIs it right ? As I said, I don't think it's a good idea to publish a version to mutiple tags, but I agree that it's better to do it like that : |
This is a suggestion that grew out of a discussion surrounding #317.
It will afford a way for end-users to set all the dist-tags they want at once, at the time they intend to.
Examples: