Skip to content

Remove transitive dependency type augmentations from build output - #1855

Merged
jclem merged 17 commits into
mainfrom
remove-storybook-types
Feb 10, 2022
Merged

Remove transitive dependency type augmentations from build output#1855
jclem merged 17 commits into
mainfrom
remove-storybook-types

Conversation

@jclem

@jclemjclem commented Feb 10, 2022

Copy link
Copy Markdown
Contributor

This removes tests and test utilities from our TypeScript builds. Some of them import Storybook types, and doing so forces Storybook types and its dependencies' React interface augmentations like those added by @emotion/core into our types output.

This also adds a new workflow (I didn't integrate it into CI while we test it out), that ensures that a consumer of Primer React can pass TypeScript compilation with "skipLibChecks": false.

@jclem
jclem requested review from a team and rezrahFebruary 10, 2022 16:26
@changeset-bot

changeset-botBot commented Feb 10, 2022

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: d47ca2c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
NameType
@primer/reactPatch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

github-actionsBot commented Feb 10, 2022

Copy link
Copy Markdown
Contributor

size-limit report 📦

PathSize
dist/browser.esm.js62.61 KB (0%)
dist/browser.umd.js63 KB (0%)

@jclem
jclemforce-pushed the remove-storybook-types branch from 8f949b7 to 879be67CompareFebruary 10, 2022 16:43
@jclem
jclem marked this pull request as draft February 10, 2022 17:09
@jclem
jclemforce-pushed the remove-storybook-types branch 3 times, most recently from a647712 to bd6ace0CompareFebruary 10, 2022 18:03
@jclem
jclem marked this pull request as ready for review February 10, 2022 18:07
@jclemjclem changed the title Remove tests from build outputRemove transitive dependency type augmentations from build outputFeb 10, 2022
@jclem
jclem marked this pull request as draft February 10, 2022 19:47
* Add annotation step to test_types workflow
* Remove branch restriction from `pull_request` event
* Make tsconfig.build.json fail consumer test
* Add always() to if clause in test_types workflow
* Use clearer failed() instead of always()
* Remove brackets from workflow if
* s/status/conclusion
* s/failed/failure
* Add longer annotation
* Format workflow echo
* Attempt to use cat for multi-line annotation
* Rename to consumer test
* Add issue context links
* Nicer links in consumer test readme
* Revert "Make tsconfig.build.json fail consumer test"
This reverts commit f6a3678.
* Add consumer-test to eslintrc ignore
@jclem
jclemforce-pushed the remove-storybook-types branch from ecf3e46 to a09d63dCompareFebruary 10, 2022 20:00
@jclem
jclem marked this pull request as ready for review February 10, 2022 20:00
@jclem
jclem requested review from colebemis and jfuchs and removed request for rezrahFebruary 10, 2022 20:00

@colebemiscolebemis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the fix and for adding tests! ✨

@jclem
jclem enabled auto-merge (squash) February 10, 2022 22:23
@jclem
jclem merged commit c3b4ad7 into mainFeb 10, 2022
@jclem
jclem deleted the remove-storybook-types branch February 10, 2022 22:28
@primer-cssprimer-css mentioned this pull request Feb 10, 2022
Sign up for freeto 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.

Storybook dependency changes types in build output

2 participants

@jclem@colebemis