-
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Thanks to `tsup`, we publish CommonJS- and ESM-compatible versions of our libraries. However, there are two problems with our builds: 1. We produce two versions of JavaScript files, but we only produce one version of TypeScript type declaration files (which happens to be CommonJS-compatible). This violates best practices communicated both by from the TypeScript team and also the "Are the Types Wrong" tool, which both dictate that there be a 1-to-1 mapping between source and declaration files. You can read more about this problem here: <https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/FalseCJS.md> 2. `tsup` identifies and extracts common code to "chunk" files. These make tree shaking possible, but make debugging difficult for our client teams. This commit replaces `tsup` with `ts-bridge`, which solves both of these problems and more. It also adds `attw` to the `test` script so that we ensure that we don't have incompatibilities with builds in the future.
- Loading branch information
Showing
5 changed files
with
314 additions
and
568 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 was deleted.
Oops, something went wrong.
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
Oops, something went wrong.