-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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: Migrate CLI to TypeScript #10802
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
⚠️ All files in `template*` directories are ignored because they must be as it in the `dist`.
gaetanmaisse
force-pushed
the
tech/migrate-cli-to-TS
branch
from
May 15, 2020 19:41
892bb25
to
237aa9a
Compare
- Add needed @types packages - remove `silent: true` option in `sync` calls as it looks like it's not a valid option - remove `encoding: 'utf-8'` option in `spawn` calls as it looks like it's not a valid option
Activating `strictNullChecks` makes TS compilation throw a lot of errors that need to refactor some part of the code. These refactoring will be done in another commit.
gaetanmaisse
force-pushed
the
tech/migrate-cli-to-TS
branch
from
May 15, 2020 19:49
237aa9a
to
d4b2203
Compare
gaetanmaisse
requested review from
ndelangen,
shilman and
stijnkoopal
as code owners
May 15, 2020 20:37
tooppaaa
reviewed
May 16, 2020
This is golden 💕 |
shilman
reviewed
May 17, 2020
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.
Great job @gaetanmaisse 💯
In order to be able to extend types in global scope with an `import` at the top of the file we have to create a new dedicated file (and can not use already existing typings.d.ts). For details, see https://stackoverflow.com/questions/30960386/how-to-extend-the-window-typescript-interface/30961346#30961346
tooppaaa
approved these changes
May 17, 2020
ndelangen
approved these changes
May 18, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Somehow related to #5030
What I did
Migrate
@storybook/cli
to TypeScript.I tried to introduce as little change as possible because we are already in the beta phase. The goal of this PR is just to migrate the code to TS to simplify future refactoring and work on E2E and CLI (see #10723 for details). Some refactoring will come later.
Sidenote: there are a lot of commits because I worked with small steps, if needed I can squash them in a single one.
How to test