Conversation
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 60f3126:
|
|
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/47487/ |
| "@babel/parser": "workspace:*", | ||
| "chalk": "^4.1.0" | ||
| "chalk": "^4.1.0", | ||
| "fs-extra": "^10.0.0", |
There was a problem hiding this comment.
I guess we can replace fs-extra by JSON.parse(fs.readFileSync(#))?
There was a problem hiding this comment.
I just switched it to promisify(fs.readFile), wouldn't want to block the entire process
There was a problem hiding this comment.
argh, didn't realize tests run on node 8 though,I'll promisify it manually
|
There are lint errors I didn't cause: |
|
Whops thanks, I'll fix them on |
No, but we still set it for consistency with the other export and import declarations. |
|
@nicolo-ribaudo okay, well it sets |
|
@jedwards1211 The linting failures seem to be caused but this PR, but it's a good thing since we were just telling TS "we know that our code doesn't respect the declared type, so there is an error here". You can just delete those three |
|
Oh now I get it, someone put those |
|
It's just that we use Flow and TS nodes in the plugins way less than JS nodes, so we never noticed it. Thanks for this PR! |
* test: add fields test * fix(babel-types): add missing NODE_FIELDS and tests fix babel#13558 fix babel#13563 * chore: avoid using fs-extra * chore: code cleanup * chore: avoid util.promisify * fix: remove bad ts-expect-error suppressions
fix #13558
fix #13563
QUESTION: Can
ExportDefaultDeclaration.exportKindbe anything other than"value"? I looked through the parser code and tried to come up with Flow or TS example that would result inexportKind: "type", but couldn't find any.Fixes #1, Fixes #2globandfs-extratodevDependenciesof@babel/types