-
Notifications
You must be signed in to change notification settings - Fork 536
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add annotations when consumer test fails (#1857)
* 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
- Loading branch information
Showing
6 changed files
with
37 additions
and
6 deletions.
There are no files selected for viewing
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
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
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Primer React Consumer Test | ||
|
||
This directory is used to run a simple test that asserts that a consumer of | ||
Primer React can build their own project with strict TypeScript options enabled, | ||
including `"skipLibCheck": false`. | ||
|
||
During Primer React's build process, we run the TypeScript compiler and output | ||
`.d.ts` declaration files for consumers of Primer React that are using | ||
TypeScript. If the build script runs with a TypeScript configuration that has | ||
any files in its `types` or `typeRoots` that import any of our development | ||
dependencies, it's possible for our build output to be polluted by interface | ||
augmentations in those dependencies, or in transitive dependencies. | ||
|
||
The best way to avoid this is to ensure that any files that import development | ||
dependencies are excluded in our `tsconfig.build.json` file we use to build | ||
Primer React. | ||
|
||
If a mistake is made and a file is omitted, we will catch those when we attempt | ||
to build this consumer library, which has `"skipLibCheck": false` in its | ||
TypeScript configuration. | ||
|
||
For historical context, see these issues: | ||
|
||
- [v27.0.0 breaks TypeScript typings](https://github.com/primer/react/issues/1163) | ||
- [Storybook dependency changes types in build output](https://github.com/primer/react/issues/1849) |
File renamed without changes.
File renamed without changes.