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

pnpm install exact version #1633

Closed
aleclarson opened this issue Jan 29, 2019 · 4 comments · Fixed by #1634
Closed

pnpm install exact version #1633

aleclarson opened this issue Jan 29, 2019 · 4 comments · Fixed by #1634
Assignees
Milestone

Comments

@aleclarson
Copy link

aleclarson commented Jan 29, 2019

pnpm version: 2.25.5

Code to reproduce the issue:

pnpm install @types/react@16.7.20

Expected behavior:

The @types/react version in package.json should be 16.7.20 exactly

Actual behavior:

A caret is prepended to the version in package.json (eg: ^16.7.20).

When I explicitly declare the version, it should use exactly what I give it, no?

Same with pnpm install @types/react@~16.7.20, which currently uses ^16.7.20 instead.

Note: The version that's actually installed is correct. Only the package.json version is incorrect.

Note: The same issue occurs for non-scoped packages, too.

Note: The shrinkwrap.yaml file also has this issue in its specifiers field.

Additional information:

  • node v11.7.0
  • macOS v10.14.3
@zkochan
Copy link
Member

zkochan commented Jan 29, 2019

The current behavior was copied from npm. I agree that it would make more sense to preserve the specs.

@zkochan zkochan added this to the v3.0.0 milestone Jan 29, 2019
@zkochan
Copy link
Member

zkochan commented Jan 30, 2019

@vjpr you were asking about this as well

@zkochan zkochan self-assigned this Jan 30, 2019
zkochan added a commit that referenced this issue Jan 30, 2019
close #1633

BREAKING CHANGE:

the specified version spec is prefered. It doesn't matter what are
the values of the save-exact and save-prefix configs.
@vjpr
Copy link
Contributor

vjpr commented Jan 30, 2019

Good to see this happening!

zkochan added a commit that referenced this issue Jan 31, 2019
close #1633

BREAKING CHANGE:

the specified version spec is prefered. It doesn't matter what are
the values of the save-exact and save-prefix configs.
@zkochan
Copy link
Member

zkochan commented Feb 3, 2019

🚢 3.0.0-alpha.2 (dist-tag: next-major)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants