Updating all Meteor packages to latest versions

坚强是说给别人听的谎言 提交于 2019-12-20 10:24:23

问题


I'm developing a Meteor app that isn't yet in production, so I can afford to move quickly when adopting new package versions (useraccounts had a significant version bump a few hours after I'd integrated it, for instance.) This was what I thought meteor update was meant to accomplish. Yet when I run:

meteor update

from my project, I'm told that packages were updated but .meteor/versions remains unchanged.

I can upgrade the package by running meteor add someone:package@whatever, but this just shuffles the version dependency from .meteor/versions to .meteor/packages even though it seems to do the upgrade. I'm happy to lock versions down when I go to production, but it seems like in development I should be able to use the update command, especially as meteor list indicates that as a next step.

I've managed to upgrade all my packages by removing .meteor/versions and .meteor/local and running meteor update, but this seems messy.

I also found this issue but it was closed. Should it be reopened or should I open a new issue? I understand how semver works, but I think the issue is that Meteor isn't writing its constraint solver results to .meteor/versions so doesn't realize that package updates have been applied. Is that accurate or am I just misunderstanding something?


回答1:


For the time being it looks like that you have 2 options for packages which have updates you wish to use:

  1. remove and add the package of concern via meteor remove provider:package_name and meteor add provider:package_name
  2. update packages with their specific version manually via meteor add provider:package_name@X.X.X

Meteor won't update packages unless you remove and add them #2500




回答2:


now u can simply do

meteor update --all-packages



回答3:


Expanding on previous answers, you can update all packages with this:

grep -ve '^#' .meteor/packages | xargs meteor update



回答4:


You can also use meteor update provider:package_name




回答5:


Easiest way is to delete the contents of .meteor/versions and then save. Next time you run meteor it will update all packages to the latest version.




回答6:


Just tiny addition to @Meteorpoly answer:

You can also edit package version in .meteor/versions file manually and meteor will pick it up on next/current run




回答7:


From Meteor docs: meteor update --packages-only

This command will update all the packages which are not built locally, has an update available and is also compatible with the meteor version you are using.




回答8:


It seems that now

meteor update

is enough to update all packages



来源:https://stackoverflow.com/questions/28612459/updating-all-meteor-packages-to-latest-versions

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!