jaredpalmer / tsdx

Zero-config CLI for TypeScript package development
https://tsdx.io
MIT License
11.26k stars 508 forks source link

deps: update extractErrors plugin to Babel 7 and more #878

Closed agilgur5 closed 4 years ago

agilgur5 commented 4 years ago

Description

This plugin was out-of-date by a good bit, so have updated a good bit to a more current version.

Commits

license: add FB License header to all extractErrors code

clean: bad whitespace and Flow types in extractErrors

deps: update extractErrors Babel plugins to Babel 7

EDIT: forgot to mention I also checked the Babel 7 migration guide which mentions babel-traverse, babylon, and AST changes in general, which all seemed compatible to me (and React team must have checked it already too).

deps: update extractErrors plugin's evalToString file

Tags

Follow-up to #138 I suppose

Some React PRs that updated this part of their monorepo:

TODO to be added to transformErrorMessages... well I'd prefer asking FB/React to split out their code as a separate package than maintaining this though:

In tandem with #795 which removed the unused @babel/polyfill dep (and its core-js v2 dep), this should remove the last deprecation warning I know of that TSDX v0.13.3 has from https://github.com/formium/tsdx/pull/789#issuecomment-695854530 by removing the last core-js v2 usage:

npm WARN deprecated core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3. // @babel/polyfill and babel-traverse
vercel[bot] commented 4 years ago

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

๐Ÿ” Inspect: https://vercel.com/formium/tsdx/pwyf5dy7m
โœ… Preview: https://tsdx-git-fork-agilgur5-update-extract-error-plugin.formium.vercel.app