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

feat: support auto fix bug version of package #256

Merged
merged 1 commit into from
Dec 25, 2017

Conversation

fengmk2
Copy link
Member

@fengmk2 fengmk2 commented Dec 18, 2017

use --fix-bug-versions to enable this feature.


This change is Reviewable

bin/install.js Outdated
@@ -234,6 +241,14 @@ co(function* () {
};
}

if (argv['package-version-mapping-file']) {
const packageVersionMapping = yield utils.readJSON(argv['package-version-mapping-file']);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这样只能是本地文件了?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tnpm install 之前下载到本地?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/cnpm/bug-versions 不下载,去读 registry 里面拿到 package.json 的配置,然后写到 node_modules/.xxx 文件里面

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

为什么不直接 npminstall 读好了?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好的,改成 npminstall 内置功能。

@fengmk2
Copy link
Member Author

fengmk2 commented Dec 18, 2017

@dead-horse https://github.com/cnpm/bug-versions 目前是没有内置的,在 tnpm 配置此文件参数。

@codecov-io
Copy link

codecov-io commented Dec 18, 2017

Codecov Report

Merging #256 into master will increase coverage by 0.22%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #256      +/-   ##
==========================================
+ Coverage   89.95%   90.18%   +0.22%     
==========================================
  Files          27       27              
  Lines        1732     1742      +10     
  Branches      288      290       +2     
==========================================
+ Hits         1558     1571      +13     
+ Misses        174      171       -3
Impacted Files Coverage Δ
lib/download/npm.js 86.95% <100%> (+0.24%) ⬆️
bin/install.js 83.44% <100%> (+0.56%) ⬆️
lib/utils.js 84.08% <0%> (+0.4%) ⬆️
lib/install.js 98.44% <0%> (+1.03%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c497252...8c53d04. Read the comment docs.

use `--fix-bug-versions` to enable this feature.
@fengmk2 fengmk2 changed the title feat: support mapping package version to other feat: support auto fix bug version of package Dec 20, 2017
@fengmk2
Copy link
Member Author

fengmk2 commented Dec 20, 2017

@dead-horse 重构了,直接 npminstall 内置,默认不打开。

@fengmk2 fengmk2 merged commit 68164ea into master Dec 25, 2017
@fengmk2 fengmk2 deleted the package-versions-mapping branch December 25, 2017 09:37
@fengmk2
Copy link
Member Author

fengmk2 commented Dec 25, 2017

3.3.0

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

Successfully merging this pull request may close these issues.

3 participants