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

Solution on how to update package.json manually #6116

Closed
JamesVanWaza opened this issue Jul 17, 2018 · 5 comments
Closed

Solution on how to update package.json manually #6116

JamesVanWaza opened this issue Jul 17, 2018 · 5 comments
Assignees
Labels

Comments

@JamesVanWaza
Copy link

JamesVanWaza commented Jul 17, 2018

Solution so Far - Do It Manually

Run yarn outdated - The list of packages show up
Run yarn remove package name
Run yarn add package name

The new modules are now saved to package.json

@ghost ghost assigned imsnif Jul 17, 2018
@ghost ghost added the triaged label Jul 17, 2018
@JamesVanWaza JamesVanWaza changed the title Please Create Documentation on How to Resolve the package-update.json Solution on how to update package.json manually Aug 23, 2018
@cpxPratik
Copy link

I use versionlens extension with visual studio code for updating dependencies on package.json. https://github.com/vscode-contrib/vscode-versionlens

@bartvanandel
Copy link

We use this solution for some of our packages as well. Seems that the yarn remove step isn't really necessary, we just do a yarn add <some_pkg(s)> and package.json gets updated.

@cpxPratik
Copy link

I do following to update package.json:

yarn global add syncyarnlock // install syncyarnlock globally
yarn upgrade // update dependencies, updates yarn.lock
syncyarnlock -s -k // updates package.json with versions installed from yarn.lock
yarn install // updates yarn.lock with current version constraint from package.json

@metasean
Copy link

Note for anyone using the syncyarnlock package —it hardcodes package versions— for example "demopackage": "^5.0.0", which would normally have an upgrade range including any version in the 5.x.x range becomes exclusively "demopackage": "5.0.1",

@cpxPratik
Copy link

@metasean , there is -k, --keepUpArrow flag to keep them, if you just read readme.

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

No branches or pull requests

5 participants