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

Fix: upgrade and add some missing dependencies in core, router, api #10825

Merged
merged 2 commits into from
May 19, 2020

Conversation

gaetanmaisse
Copy link
Member

@gaetanmaisse gaetanmaisse commented May 18, 2020

What I did

When building @storybook/api we are generating types that are based on @types/reach__router (see in dist/index.d.ts: location: import("@reach/router").WindowLocation<{}>).
And as in the monorepo we have the latest version of @types/reach__router we are using generic version of WindowLocation added by DefinitelyTyped/DefinitelyTyped@4109455

So we need to update the required version of @types/reach__router in the dependency otherwise users can try to run SB with an old version of @types/reach__router (like I did when upgrading to the latest beta 😁) and face the following error 💥 :

ERROR in /.../my-project/node_modules/@storybook/api/dist/index.d.ts(75,19):
TS2315: Type 'WindowLocation' is not generic.

I also updated the version in @storybook/router to be consistent across the different packages.

--

Also, added some missing dependencies in @storybook/core, making SB fails with Yarn 2. Related to #10725.

How to test

  • Everything should be 🟢 on CI, even Yarn 2 :wow:

When building `@storybook/api` we are generating types that are based on `@types/reach__router` (see in dist/index.d.ts: `location: import("@reach/router").WindowLocation<{}>`).
And as in the monorepo we have the latest version of `@types/reach__router` we are using generic version of `WindowLocation` added by DefinitelyTyped/DefinitelyTyped@4109455

So we need to update the required version of `@types/reach__router` in the dependency otherwise users can try to run SB with an old version of `@types/reach__router` and face the following error:
```
ERROR in /.../my-project/node_modules/@storybook/api/dist/index.d.ts(75,19):
TS2315: Type 'WindowLocation' is not generic.
```

I also updated the version in `@storybook/router` to be consistent across the different packages.
"@types/node" "*"

"@types/puppeteer@^2.0.0":
"@types/puppeteer@*", "@types/puppeteer@^2.0.0":
Copy link
Member Author

Choose a reason for hiding this comment

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

Why not 🤷

@gaetanmaisse gaetanmaisse added bug maintenance User-facing maintenance tasks and removed maintenance User-facing maintenance tasks labels May 18, 2020
All theses deps have been used in `@storybook/core` in #10725
But haven't been properly added as dependencies.
@gaetanmaisse gaetanmaisse force-pushed the fix-required-version-of-reach-router-types branch from 452b483 to 52f7f4e Compare May 18, 2020 20:24
@gaetanmaisse gaetanmaisse marked this pull request as ready for review May 18, 2020 20:59
@gaetanmaisse gaetanmaisse changed the title fix: bump required version of @types/reach__router Fix: upgrade and add some dependencies in @storybook/core May 18, 2020
@gaetanmaisse gaetanmaisse changed the title Fix: upgrade and add some dependencies in @storybook/core Fix: upgrade and add some missing dependencies in @storybook/core May 18, 2020
@gaetanmaisse gaetanmaisse changed the title Fix: upgrade and add some missing dependencies in @storybook/core Fix: upgrade and add some missing dependencies in core, router, api May 18, 2020
@ndelangen ndelangen merged commit 4c1a662 into next May 19, 2020
@ndelangen ndelangen deleted the fix-required-version-of-reach-router-types branch May 19, 2020 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants