-
Notifications
You must be signed in to change notification settings - Fork 32
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
semver 和 publish 的调整 #81
Conversation
完成了。 @afc163 看下有没有问题。 |
@@ -361,7 +365,7 @@ function abortify(res, options) { | |||
406: 'Not acceptable.', | |||
415: 'Unsupported media type.', | |||
426: 'Upgrade required.', | |||
444: 'Force option required.' | |||
444: 'Cannot modify pre-existing version.' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pre-existing -> existed ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
从 npm 上 copy 来的。。两个意思差不多。
|
var project = new Project({ | ||
name: req.params.name | ||
}); | ||
var version = semver.maxSatisfying(Object.keys(project.packages), req.params.version); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个方法其实已经同时支持了 ~
^
*
1.x
>1.0.0
等各种情况吧?会不会太激进了。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
版本的问题我觉得可以让使用者自己判断,信任一个库才使用他,如果一个库使用了 *
这样的版本范围,则可以选择不用他。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
内部组件(arale, alipay, anima)可以约定下只能用 patch range ~1.1.x
。另外,内部工具在构建时候可以判断下范围是否过大,然后给予提示。
|
unpublished 的模块展现已加,类似 npm . |
安装模块、查询模块、查询模块版本列表时,对于 unpublished 的模块也需要处理吧? |
install, info 等和源相关的操作测试过了,原来的逻辑都兼容的。 |
This reverts commit 9a79839.
增加 package 对于 semver 支持
删除
publish -f
支持调整
unpublish
。不直接删除 package 或 project,只做信息清空,避免变相达到publish -f
的操作unpublish
Package 时,添加unpublished
信息,删除 tar 包unpublish
Project 时,添加unpublished
信息,同时对所有的 Package 做unpublish
处理publish
Package 时,Project 删除unpublished
信息,Package 不允许覆盖unpublished
信息的增加 Project unpublish 后的页面展现
相关 issue: spmjs/spm/issues/1001 , spmjs/spm/issues/1000