Skip to content
This repository was archived by the owner on Aug 11, 2022. It is now read-only.

Fix #10974 - deprecate works on all version by default#12079

Closed
polm wants to merge 1 commit intonpm:masterfrom
polm:master
Closed

Fix #10974 - deprecate works on all version by default#12079
polm wants to merge 1 commit intonpm:masterfrom
polm:master

Conversation

@polm
Copy link
Copy Markdown
Contributor

@polm polm commented Mar 26, 2016

When a semver spec is not supplied, npa supplies a default spec of
'latest'. This is usually correct, but for deprecation the default has
been to apply to all versions of a package.

This patch just checks the raw spec and if it's empty it overrides with
with the '*' version range, which is what people in the issue discussion
were doing anyway.

This includes a working test. -POLM

When a semver spec is not supplied, npa supplies a default spec of
'latest'. This is usually correct, but for deprecation the default has
been to apply to all versions of a package.

This patch just checks the raw spec and if it's empty it overrides with
with the '*' version range, which is what people in the issue discussion
were doing anyway.

This includes a working test. -POLM
@zkat
Copy link
Copy Markdown
Contributor

zkat commented Mar 30, 2016

LGTM! 🎉 Thanks for the patch!

@zkat zkat added this to the next milestone Mar 30, 2016
zkat pushed a commit that referenced this pull request Mar 31, 2016
When a semver spec is not supplied, npa supplies a default spec of
'latest'. This is usually correct, but for deprecation the default has
been to apply to all versions of a package.

This patch just checks the raw spec and if it's empty it overrides with
with the '*' version range, which is what people in the issue discussion
were doing anyway.

Fixes: #10974
PR-URL: #12079
Credit: @polm
Reviewed-By: @zkat
zkat pushed a commit that referenced this pull request Mar 31, 2016
When a semver spec is not supplied, npm supplies a default spec of
`latest`. This is usually correct, but for deprecation the default has
been to apply to all versions of a package.

This patch just checks the raw spec and if it's empty it overrides with
with the `*` version range, which is what people in the issue discussion
were doing anyway.

Fixes: #10974
PR-URL: #12079
Credit: @polm
Reviewed-By: @zkat
@zkat
Copy link
Copy Markdown
Contributor

zkat commented Apr 1, 2016

This fix was included with npm@3.8.6 and npm@2.15.3. Thanks a bunch for the patch, @polm! This was kind of a thorn on our side for a bit, there. 🎉

@zkat zkat closed this Apr 1, 2016
michaelnisi pushed a commit to michaelnisi/npm that referenced this pull request Apr 2, 2016
When a semver spec is not supplied, npa supplies a default spec of
'latest'. This is usually correct, but for deprecation the default has
been to apply to all versions of a package.

This patch just checks the raw spec and if it's empty it overrides with
with the '*' version range, which is what people in the issue discussion
were doing anyway.

Fixes: npm#10974
PR-URL: npm#12079
Credit: @polm
Reviewed-By: @zkat
@zkat zkat mentioned this pull request Apr 11, 2016
4 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants