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

explicit types and remove cypress resolution override #638

Merged
merged 2 commits into from Apr 24, 2020
Merged

Conversation

Rugvip
Copy link
Member

@Rugvip Rugvip commented Apr 23, 2020

Explicitly list types used by each package. Without this anything inside @types dirs are included.

Each plugin can override the types used in their tsconfig.json, but tbh I don't know how that will affect the package and availability of types when importing the plugin in an app later.

I'm imagining this could increase build speed, but not seeing any big difference, at most a few % if anything.

The main reason for making this change was so that we can get rid of the version override of cypress, since the reason we had to do that was clashing types between jest and mocha. Now that we have to include types explicitly that's no longer an issue.

@Rugvip Rugvip requested a review from a team as a code owner April 23, 2020 19:11
Copy link
Member

@freben freben left a comment

Choose a reason for hiding this comment

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

What was the effect if you skip these tsconfig changes?

Will we make these changes on all public packages that don't inherit from the cli config dir? (Like the backend)

@Rugvip
Copy link
Member Author

Rugvip commented Apr 23, 2020

@freben omitting would give you the default behaviour, which is that all type definitions that can be found will be used. More info here: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html#types-typeroots-and-types

Backend package was supposed to have the change, removed it by mistake 😁 Added back now though.

@freben
Copy link
Member

freben commented Apr 23, 2020

Would have been nice to blacklist mocha instead of whitelisting these, but I guess that isn't possible :/

@Rugvip
Copy link
Member Author

Rugvip commented Apr 23, 2020

@freben, indeed... here's a thread on that: microsoft/TypeScript#18588

@Rugvip
Copy link
Member Author

Rugvip commented Apr 24, 2020

Build issues were because we ended up bringing in 2 versions of cypress, issue is being tracked here: cypress-io/cypress#4595

Fixed by making sure we're only installing one version, but it could pop up again.

@Rugvip Rugvip merged commit 241ee7f into master Apr 24, 2020
@Rugvip Rugvip deleted the rugvip/zetypes branch April 24, 2020 11:35
tjg184 pushed a commit to tjg184/backstage that referenced this pull request Sep 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants