You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 15, 2025. It is now read-only.
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.
0 commit comments