This repository has been archived by the owner on Dec 6, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
594 additions
and
5 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
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
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,23 @@ | ||
# Source Package Validation | ||
|
||
This project is used to verify the output of the Source packages. | ||
|
||
## How? | ||
|
||
It runs two checks: | ||
|
||
1. Verify that no exports have changed in the published packages | ||
|
||
This works similar to a snapshot test in that, if anything does change, the test must be updated. This ensures that subsequent releases haven't broken the package structure or unexpectedly removed exports from the public API. It uses jest to run the test. | ||
|
||
2. Verify that no types have been removed | ||
|
||
This test works by importing all of the types from all packages into a file and then running `tsc`. It will capture types that have been removed but not fail when new types are added so, for now, the onus is on contributors and reviewers to **remember to add new types to this file**. | ||
|
||
## Running locally | ||
|
||
Validation requires all packages to be built before running. | ||
|
||
You can run the tests including the build step by running (from the root directory): `yarn package-validation:validate` | ||
|
||
If you are running locally and want to avoid rebuilding all packages each time then you can just rebuild the package(s) that have changed an then run: `yarn package-validation validate` |
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,5 @@ | ||
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */ | ||
module.exports = { | ||
preset: 'ts-jest', | ||
testEnvironment: 'node', | ||
}; |
Oops, something went wrong.