This repository has been archived by the owner on Jan 15, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 129
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make prepack scripts more consistent (#1020)
Somewhere between Typescript 3.5.x and 4.0.x, the behavior of the compiler changed in a subtle way when using the `-b` flag. In 3.5.x, if `outDir` was removed after a build but `tsconfig.tsbuildinfo` remained, running `tsc -b` again would fully reproduce `outDir`. Technically, this is incorrect behavior because the compiler state should be fully derived from the `include`/`rootDir` files and the `tsconfig.tsbuildinfo` file. In 4.0.x, `outDir` is not reproduced because the compiler properly loads its state from `tsconfig.tsbuildinfo` and does not perform any recompilation. Why did this affect `packages/plugins`? The `prepack` script runs `rimraf lib && tsc -b`. In the 3.5.x compiler version, this would reproduce the `lib` directory. In 4.0.x, it would not. This, the packaged set of files does not include the `lib` directory. This commit makes `prepack` scripts more consistent by using `npm run clean` and `npm run build`. The `clean` scripts already properly clean up both `outDir` and the `tsconfig.tsbuildinfo` file.
- Loading branch information
1 parent
e6ea353
commit 24ec3b9
Showing
8 changed files
with
8 additions
and
4 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
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