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

Save non-standard tarball URLs in shrinkwrap.yaml #1072

Closed
zkochan opened this issue Mar 12, 2018 · 2 comments
Closed

Save non-standard tarball URLs in shrinkwrap.yaml #1072

zkochan opened this issue Mar 12, 2018 · 2 comments
Assignees

Comments

@zkochan
Copy link
Member

zkochan commented Mar 12, 2018

To reduce the size of shrinkwrap.yaml we don't save the tarball URLs of packages from registry.npmjs.org. We can create their tarballs URLs if we know their name and version (see related code in supi: https://github.com/pnpm/supi/blob/9eb87ce9f296097f1368f150725533b3933a1d60/src/resolveDependencies.ts#L227).

However, some packages have weird tarball URLs. For instance, the tarball URL of esprima-fb@3001.1.0-dev-harmony-fb is https://registry.npmjs.org/esprima-fb/-/esprima-fb-3001.0001.0000-dev-harmony-fb.tgz, so we have to save its tarball URL in shrinkwrap.yaml

Currently it would be saved to shrinkwrap.yaml like this:

  /esprima-fb/3001.1.0-dev-harmony-fb:
    dev: true
    engines:
      node: '>=0.4.0'
    resolution:
      integrity: sha1-t303q8046gt3Qmu4vCkizmtCZBE=

It should be saved like this:

  /esprima-fb/3001.1.0-dev-harmony-fb:
    dev: true
    engines:
      node: '>=0.4.0'
    resolution:
      integrity: sha1-t303q8046gt3Qmu4vCkizmtCZBE=
      tarball: https://registry.npmjs.org/esprima-fb/-/esprima-fb-3001.0001.0000-dev-harmony-fb.tgz
@etamponi
Copy link
Member

This issue is also worse if you happen to have a pnpm server running:

  1. pnpm server start on an empty store

  2. with a shrinkwrap.yaml present, run pnpm install: it will fail

  3. now removing shrinkwrap.yaml does not solve the issue anymore.

@zkochan
Copy link
Member Author

zkochan commented Mar 12, 2018

🚢 1.35.9

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

No branches or pull requests

2 participants