-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Fixes update-readme script #15679
Fixes update-readme script #15679
Conversation
Note that this is failing due to some syntax the parser doesn't understand. It looks like this broke with the introduction of short Fragment syntax #15120 |
The reason it got in was that errors weren't reported by the update-readme script #15680 |
v5 has removed the attachComment option that we rely on for JSDoc parsing. v4.1 is the latest version we can use.
acorn-jsx 5 provokes the parser to fail.
f2cd9bc
to
8e23039
Compare
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.
Looks good.
I tested it out running the update-readmes script and did not see any local changes around the core-data whitespace or other issues.
It doesn't seem we should need to make everything synchronous, vs. just those occurring in the same file. That being said, some recent similar explorations in build parallelization have not proved much value in naive implementations like The other option to explore if performance becomes a bottleneck is something more like what I'm considering in #15230. |
This PR does two things:
Fixes Documentation: core/data README is only updated for changes in selectors #15626 and Documentation: errors aren't reported when API docs can't be generated #15680 by making the script synchronous. In Core Data: Add docgen auto-documentation for actions, selectors #15200 we missed the fact that to fill tokens within the same file we need to execute docgen synchronously, otherwise, the last token process will overwrite the first.
Updates our
espree
dependency to 4.0.0. When error reporting was back, we uncovered that introducing short Fragment syntax in Babel plugin JSX: Implement Fragment handling #15120 caused docgen to fail. The reason is that theespree
version we used didn't support that. This fixes it by upgrading it to one that does. A couple of restrictions:acorn-jsx@4.1.0
added support for JSX fragment short syntax (patched in 4.1.1).espree@4.0.0
addedacorn-jsx@4.1.1
. We should use this at a minimum.espree@4.1.0
addedacorn@6
andacorn-jsx@5
for parsing. This caused an error I couldn't identify the source.espree@5.0.0
removed support for the attachComment. We use this for collocating the JSDoc comment with the proper export statement. Without this we can't migrate toespree@5.0.0
.Test
packages/a11y/src/index.js
and introduce a syntax error. For example, changeexport const setup = function() {
toexport c setup = function() {
. Make surenpm run docs:build
fails.