-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
fix: relativize file links when inflating shrinkwrap #758
Commits on Feb 3, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 08dd4ad - Browse repository at this point
Copy the full SHA 08dd4adView commit details -
Configuration menu - View commit details
-
Copy full SHA for e453b41 - Browse repository at this point
Copy the full SHA e453b41View commit details
Commits on Feb 4, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 1a893fc - Browse repository at this point
Copy the full SHA 1a893fcView commit details
Commits on Feb 5, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 1b597b1 - Browse repository at this point
Copy the full SHA 1b597b1View commit details
Commits on Feb 14, 2020
-
getRequested: look also at optDeps when determining package spec
If the shrinkwrap code calls `getRequested` on an optional dependency, the `spec` passed to `npa.resolve` is null. `npa.resolve` then thinks it's a request `fromRegistry`, with spec defaulting to `latest`. And in case the real spec is a tarball, returns nonsensical result where `isRegistry` is true, `fetchSpec` is `1.0.0` instead of `file:...` and the record written to the shrinkwrap is wrong. It contains a `resolved` field, which should be used only for packages downloaded from the registry.
Configuration menu - View commit details
-
Copy full SHA for 83358bc - Browse repository at this point
Copy the full SHA 83358bcView commit details -
Configuration menu - View commit details
-
Copy full SHA for ce2936f - Browse repository at this point
Copy the full SHA ce2936fView commit details
Commits on Feb 17, 2020
-
Don't use tree.package._where when resolving shrinkwrap dependency
The path in `sw.requires` is always relative to the requesting package location, and the default from `packageRelativePath(tree)` is always correct. For `type=file` dependencies, `tree.package._where` contains the `realpath` of the requesting tarball, which is the location where it was unpacked in `node_modules`. That's completely useless for resolving dependency paths. We're interested in the source location of the packed tarball. That's the path against which the dependency spec should be resolved.
Configuration menu - View commit details
-
Copy full SHA for b8a5e05 - Browse repository at this point
Copy the full SHA b8a5e05View commit details -
doesChildVersionMatch: take fetchSpec into account
When comparing specs like `file:../b-1.0.0.tgz`, the `rawSpec` and `saveSpec` contain paths that are relative against different roots. We need to compare the `fetchSpec`, too, which is absolute.
Configuration menu - View commit details
-
Copy full SHA for 3963e5a - Browse repository at this point
Copy the full SHA 3963e5aView commit details -
getRequested: don't use reqBy.realpath when resolving dependency paths
`realpath` contains the location of the unpacked tarball, and that's useless when resolving relative dependency paths in `package.json`. For that resolution, the location of the packed tarball is important.
Configuration menu - View commit details
-
Copy full SHA for e8ab363 - Browse repository at this point
Copy the full SHA e8ab363View commit details