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

Use the --use-npm flag also for version checking #3535

Merged
merged 5 commits into from
May 9, 2018

Conversation

Keraito
Copy link
Contributor

@Keraito Keraito commented May 6, 2018

Issue: While I was working on #3531, I noticed that the package manager responsible for checking the versions of dependencies in the generators was dependent on has_yarn, fully ignoring the --use-npm flag #3531 (comment).

What I did

I made the latestVersion function to adhere to the --use-npm flag.
How I currently did it is pass the npmOptions object all the way through generators in order to reach latestVersion.

@Hypnosphi
Copy link
Member

I think it's ok

@Hypnosphi Hypnosphi added bug cli patch:yes Bugfix & documentation PR that need to be picked to main branch labels May 6, 2018
@codecov
Copy link

codecov bot commented May 8, 2018

Codecov Report

Merging #3535 into master will decrease coverage by <.01%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3535      +/-   ##
==========================================
- Coverage   37.12%   37.11%   -0.01%     
==========================================
  Files         509      509              
  Lines       10848    10849       +1     
  Branches      971      973       +2     
==========================================
  Hits         4027     4027              
- Misses       6231     6238       +7     
+ Partials      590      584       -6
Impacted Files Coverage Δ
lib/cli/bin/generate.js 0% <0%> (ø) ⬆️
lib/cli/lib/helpers.js 0% <0%> (ø) ⬆️
lib/cli/lib/latest_version.js 0% <0%> (ø) ⬆️
lib/ui/src/modules/ui/components/layout/usplit.js 38.7% <0%> (ø) ⬆️
lib/ui/src/modules/ui/libs/is_mobile_device.js 42.85% <0%> (ø) ⬆️
...i/src/modules/ui/components/stories_panel/index.js 20.63% <0%> (ø) ⬆️
addons/actions/src/lib/types/nan/index.js 82.35% <0%> (ø) ⬆️
lib/core/src/client/manager/provider.js 0% <0%> (ø) ⬆️
lib/ui/src/modules/ui/configs/init_panels.js 25% <0%> (ø) ⬆️
...ns/viewport/src/manager/components/viewportInfo.js 33.33% <0%> (ø) ⬆️
... and 64 more

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 4f3137f...8d9fbb7. Read the comment docs.

@Keraito
Copy link
Contributor Author

Keraito commented May 8, 2018

Tried to make sure that I didn't miss a generator or call to either latestversion/getVersion. I ran the tests in lib/cli and everything went well except for some things at the end, but that could also have been caused by some internet issues on my side. Will test again tomorrow.

@Keraito
Copy link
Contributor Author

Keraito commented May 9, 2018

Ran the tests again and now they succeeded ( Done in 714.76s.), yesterday was very likely to be caused by network issues.

@Hypnosphi
Copy link
Member

Please update generators for new apps (html, marko) as well

@Keraito
Copy link
Contributor Author

Keraito commented May 9, 2018

Done, I'm not in a position atm to run the tests again though, I can do that in a few hours.

@Hypnosphi Hypnosphi merged commit f1e2d47 into storybookjs:master May 9, 2018
Hypnosphi added a commit that referenced this pull request May 17, 2018
Use the --use-npm flag also for version checking
# Conflicts:
#	lib/cli/bin/generate.js
#	lib/cli/generators/HTML/index.js
#	lib/cli/generators/MARKO/index.js
#	lib/cli/generators/MITHRIL/index.js
@Hypnosphi Hypnosphi added the patch:done Patch/release PRs already cherry-picked to main/release branch label May 17, 2018
@Hypnosphi
Copy link
Member

Released as 3.4.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug cli patch:done Patch/release PRs already cherry-picked to main/release branch patch:yes Bugfix & documentation PR that need to be picked to main branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants