Closed agilgur5 closed 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
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
this plugin is largely borrowed from the React monorepo, consistently add FB's License headers to each file, not just to extractErrors.ts
also add comments pointing to the exact file and commit that each file was copied from
clean: bad whitespace and Flow types in extractErrors
deps: update extractErrors Babel plugins to Babel 7
this was using Babel 6's Babylon and babel-traverse, which meant two different versions of Babel were being used and a lot of unnecessary deps were in the tree
@babel/helper-module-imports
) while extractErrors was on Babel 6 just for extra inconsistency ๐ฌ@babel/parser
ships its own typings now, so no need to use thedeclare module
workaround for it anymorethis also helps remove an old version of core-js v2, the addition of which would give a deprecation warning on install:
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:
@babel/parser
: https://github.com/facebook/react/pull/17988Literal
addition inevalToString
: https://github.com/facebook/react/pull/17599TODO 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 itscore-js
v2 dep), this should remove the last deprecation warning I know of that TSDXv0.13.3
has from https://github.com/formium/tsdx/pull/789#issuecomment-695854530 by removing the lastcore-js
v2 usage: