gpt4 book ai didi

meteor - 自动更新本地 Meteor 包声明的依赖项

转载 作者:行者123 更新时间:2023-12-04 02:27:23 26 4
gpt4 key购买 nike

尝试获取最新的本地 Meteor 包的依赖项是相当乏味的。

目前,它们在 package.js 中指定喜欢,我必须检查使用的每个依赖项的最新版本并手动更新。

例如。

api.use([
'alanning:roles@1.2.14',
'aldeed:simple-schema@1.5.3',
'aldeed:collection2@2.8.0',
'iron:router@1.0.12',
'useraccounts:iron-routing@1.12.4'
]);

可以 meteor-tool这样做或者有更好的方法来更新包的依赖关系,当您在一个项目中有多个本地包时特别有用。

最佳答案

package.js 中提升依赖版本没有实际值(value),正如我在评论中提到的。它可能会导致反效果并破坏版本解析。
期望是提最小兼容版本 (具有相同的主要版本号)。当您的本地包更新时,其 .versions文件也会更新,这可能会提示构建系统首选使用哪个版本的依赖项(您的包是用哪个版本构建的)。
我能给出的最接近的答案是大卫格林斯潘的这句话* taken from the Meteor forums :

We have made some small improvements to meteor update over time, butwe don't have a way for a package to ask for one of its dependenciesto be upgraded more aggressively. meteor update with no arguments willtake patch updates to indirect dependencies, but not minor versions. Irecently improved the messages that meteor update prints, so in thenext release, it should tell you if an indirect dependency is not atthe latest version after it runs (rather than printing the very wrongmessage "All packages are at their latest compatible versions").

If you bump the minor version of a package, I think the expectation atthe moment is that you will republish the packages that depend on itif you want their users to get the new version (after running thetests to make sure all is well).


所以,当你依赖的包的作者发布一个新的:
  • 补丁版本 : 不需要你做什么。应自动使用新版本。
  • 次要版本 :检查一切正常并发布新的补丁版本,以确认新版本。
  • 主要版本 : 事情预计会破裂。根据 semver 规则进行所需的更改和发布。

  • 我不会指望事情会像现在这样,因为包装系统正在经历 相当重要的返工为了更兼容 NPM(包括直接从 Meteor 应用程序和包中要求 NPM 包的能力),预计将包含在 v1.3 中。
    *(实际上,Sacha Greif 发布了报价)。

    关于meteor - 自动更新本地 Meteor 包声明的依赖项,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34544476/

    26 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com