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

CLI: Add flag to disable version checks #8488

Merged
merged 9 commits into from
Oct 24, 2019
Merged

Conversation

ndelangen
Copy link
Member

Issue: #6194

What I did

I made it so the version check only happens once in node, so it's less disruptive
I added a CLI flag that disables the feature entirely

How to test

run an example with --no-version-updates, it should not do the version check
run an example without --no-version-updates, it should do the version check

@vercel
Copy link

vercel bot commented Oct 20, 2019

This pull request is being automatically deployed with ZEIT Now (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://zeit.co/storybook/monorepo/hquqoself
🌍 Preview: https://monorepo-git-tech-versioncheck-overhaul.storybook.now.sh

@ndelangen ndelangen requested a review from shilman October 20, 2019 10:43
Copy link
Member

@shilman shilman left a comment

Choose a reason for hiding this comment

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

Looks great! There are some deleted tests that need to get ported to the new structure.

lib/api/src/tests/versions.test.js Show resolved Hide resolved
Copy link
Member

@shilman shilman left a comment

Choose a reason for hiding this comment

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

Possibly one more case to handle?

lib/api/src/tests/versions.test.js Show resolved Hide resolved
@ndelangen
Copy link
Member Author

added the test @shilman

@@ -239,5 +239,23 @@ describe('versions API', () => {

expect(api.versionUpdateAvailable()).toEqual(true);
});

it('new prerelease version', async () => {
Copy link
Member

Choose a reason for hiding this comment

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

Will it work when the user is upgrading from one prerelease to another?

Copy link
Member Author

Choose a reason for hiding this comment

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

added code & tests for this

…date when user is on prerelease that's newer
Copy link
Member

@shilman shilman left a comment

Choose a reason for hiding this comment

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

BINGO!!! 💥

@shilman shilman changed the title Tech/versioncheck overhaul Core: Add disable version checks Oct 24, 2019
@shilman shilman changed the title Core: Add disable version checks CLI: Add flag to disable version checks Oct 24, 2019
@shilman shilman merged commit d53b13d into next Oct 24, 2019
@shilman shilman deleted the tech/versioncheck-overhaul branch October 24, 2019 12:49
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.

2 participants