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

getDependencyVersion should pin version to the installed version. #669

Closed
nathanhammond opened this issue Mar 12, 2019 · 1 comment
Closed

Comments

@nathanhammond
Copy link
Contributor

getDependencyVersion currently reads package.json to identify which version of a dependency to emit for the generated package.json. It should instead defer to the version that is presently installed in the application as the lockfile may trail the most-recent version, or there may be race conditions with builds and publishing (incredibly unlikely but possible).

function getDependencyVersion(pkg, dep) {
if (!pkg.dependencies) {
throw new Error(fmt("Could not find FastBoot dependency '%s' in %s/package.json dependencies.", dep, pkg.name));
}
return pkg.dependencies[dep];
}

@nathanhammond
Copy link
Contributor Author

Closing in favor of #668.

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

No branches or pull requests

1 participant