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

Angular: Update TypeScript peerDep version to support Angular 11 #12866

Merged
merged 1 commit into from Oct 23, 2020

Conversation

twerske
Copy link
Contributor

@twerske twerske commented Oct 22, 2020

Issue: #12859

@storybook/angular should be compatible with Angular 11 which requires TypeScript 4.0
This resolves #12859 by supporting any version above Angular 6 through the latest RC

`@storybook/angular` should be compatible with Angular 11 which requires TypeScript 4.0
This resolves storybookjs#12859 by supporting any version above Angular 6 through the latest RC
@shilman shilman added this to the 6.1 core milestone Oct 22, 2020
@shilman
Copy link
Member

shilman commented Oct 22, 2020

Thanks for the PR @twerske! Unfortunately, it appears to be breaking our CI tests:

ERR! => Failed to build the preview
ERR! /tmp/storybook-e2e-testing/angular-latest/node_modules/@types/webpack-env/index.d.ts
ERR! ERROR in /tmp/storybook-e2e-testing/angular-latest/node_modules/@types/webpack-env/index.d.ts(349,15):
ERR! TS2430: Interface 'NodeJS.Module' incorrectly extends interface '__WebpackModuleApi.Module'.
ERR!   Types of property 'parent' are incompatible.
ERR!     Type 'Module | null | undefined' is not assignable to type 'NodeModule | null | undefined'.
ERR!       Type 'Module' is not assignable to type 'NodeModule'.
ERR!         Types of property 'parent' are incompatible.
ERR!           Type 'Module | null | undefined' is not assignable to type 'NodeModule | null'.
ERR!             Type 'undefined' is not assignable to type 'NodeModule | null'.
ERR! delegated ./highlight.js/lib/languages/verilog.js from dll-reference storybook_docs_dll

It looks like this change is causing the CI test to use TS4 and that's exposing a bug (?) in the @types packages somehow (maybe this one DefinitelyTyped/DefinitelyTyped#45927)

I'm not sure the best course of action here cc @tooppaaa @gaetanmaisse

@twerske
Copy link
Contributor Author

twerske commented Oct 22, 2020

@shilman I saw that :(
yarn test:e2e-framework angular@latest angular@v9-lts does run and pass locally for me so I'm wondering in there's a better way to keep existing e2e tests in the CI running TS 3.X.X and allow the devDependency to be TS4.0 so that you don't need to update or worry about the bug in the @types package.

@gaetanmaisse
Copy link
Member

Hmm it's weird as yarn test:e2e-framework angular@v9-lts is still using TS 3.8 but throws the same error... 🤔

@shilman @twerske I will investigate a bit and let you know

@shilman
Copy link
Member

shilman commented Oct 22, 2020

Thanks @gaetanmaisse. As always, you rock!!!

@gaetanmaisse
Copy link
Member

gaetanmaisse commented Oct 22, 2020

It looks like the error is not related to the changes in this PR but to the latest versions of @types/node (12.19.x) released earlier today and 2 hours ago (https://github.com/DefinitelyTyped/DefinitelyTyped/pull/48570/files#diff-fbb362680b965a40c12d1baf1c1380c6963ce86b2106ca8fafaba7323d91c009R1186), so the same CI job will also fail for all other branches. Everything is fine with the previous version (12.12.70). I'm taking a look at DefinitelyTyped side.

@shilman shilman changed the title chore: update TypeScript peerDep version in @storybook/angular Angular: Update TypeScript peerDep version to support Angular 11 Oct 23, 2020
@shilman shilman merged commit fd74441 into storybookjs:next Oct 23, 2020
@twerske twerske deleted the patch-issue-12859 branch October 23, 2020 16:10
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.

[storybook/angular] Incompatible dependency with TypeScript 4.0
3 participants