-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add 12 missing NODE_FIELDS #13577
add 12 missing NODE_FIELDS #13577
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/ |
packages/babel-types/package.json
Outdated
@@ -30,7 +30,9 @@ | |||
"devDependencies": { | |||
"@babel/generator": "workspace:*", | |||
"@babel/parser": "workspace:*", | |||
"chalk": "^4.1.0" | |||
"chalk": "^4.1.0", | |||
"fs-extra": "^10.0.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we can replace fs-extra
by JSON.parse(fs.readFileSync(#))
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just switched it to promisify(fs.readFile)
, wouldn't want to block the entire process
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.exportKind
be 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 #2
glob
andfs-extra
todevDependencies
of@babel/types