-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reimplement publish-types script with recast
This is far more robust against all the kinds of things our modules do: - It supports having `declare module` and similar in the input source. - It does not do dumb string replacement to remove `declare`, which can easily remove things from comments or the like. - It correctly handles relative imports (`./` and chains of `../`). For this to work correctly, we needed to have more recent versions of the Babel parser, so this freshens the lock file for all `@babel/*` dependencies. It also adds `recast` and drops `magic-string`. This has been tested by enabling more than 50% of the unpublished modules; the resulting output is correct from the point of view of this script but exposes a number of fixes we will need to make for our types as we enable more and more of those.
- Loading branch information
1 parent
301b76f
commit 9adcd15
Showing
4 changed files
with
821 additions
and
1,124 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
Oops, something went wrong.