Skip to content
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

Replacing "babylon" with "babel" #5647

Merged
merged 20 commits into from
Dec 27, 2018
Merged

Conversation

wuweiweiwu
Copy link
Contributor

Replace babylon with babel in all js files, directories, md files, tests, updated tests

closes #4508

would this be a breaking change?

prettier.format("lodash ( )", {
  parser(text, { babel }) { // <-- babel instead of babylon
    const ast = babel(text);
    ast.program.body[0].expression.callee.name = "_";
    return ast;
  }
});
  • I’ve added tests to confirm my change works. NA
  • (If changing the API or CLI) I’ve documented the changes I’ve made (in the docs/ directory)
  • I’ve read the contributing guidelines.

Try the playground for this PR

@j-f1
Copy link
Member

j-f1 commented Dec 17, 2018

I think this would be a breaking change unfortunately since anyone specifying parser: babylon would get an error now.

@duailibe
Copy link
Member

@wuweiweiwu if we go through with this change, we need to accept "babylon" as a parser and print a warning saying it changed to "babel".

docs/options.md Outdated Show resolved Hide resolved
src/language-js/parser-babel.js Outdated Show resolved Hide resolved
src/main/core-options.js Outdated Show resolved Hide resolved
src/main/core-options.js Outdated Show resolved Hide resolved
scripts/build/config.js Outdated Show resolved Hide resolved
docs/options.md Outdated Show resolved Hide resolved
src/main/range-util.js Outdated Show resolved Hide resolved
tests/jsx_escape/jsfmt.spec.js Outdated Show resolved Hide resolved
tests/markdown/real-world-case.md Outdated Show resolved Hide resolved
tests_integration/__tests__/check.js Outdated Show resolved Hide resolved
tests_integration/__tests__/check.js Outdated Show resolved Hide resolved
website/static/worker.js Outdated Show resolved Hide resolved
website/static/worker.js Outdated Show resolved Hide resolved
website/static/worker.js Outdated Show resolved Hide resolved
website/static/worker.js Outdated Show resolved Hide resolved
website/static/worker.js Outdated Show resolved Hide resolved
ikatyang and others added 7 commits December 25, 2018 21:43
Co-Authored-By: wuweiweiwu <wuxx1045@umn.edu>
Co-Authored-By: wuweiweiwu <wuxx1045@umn.edu>
Co-Authored-By: wuweiweiwu <wuxx1045@umn.edu>
Co-Authored-By: wuweiweiwu <wuxx1045@umn.edu>
Co-Authored-By: wuweiweiwu <wuxx1045@umn.edu>
Co-Authored-By: wuweiweiwu <wuxx1045@umn.edu>
Co-Authored-By: wuweiweiwu <wuxx1045@umn.edu>
@ikatyang
Copy link
Member

@wuweiweiwu FYI, there's an Add suggestion to batch button that you can combine all suggestions in a single commit.

@wuweiweiwu
Copy link
Contributor Author

Oh I see. Will use next time. Thanks!

@ikatyang ikatyang added this to the 1.16 milestone Dec 26, 2018
@ikatyang ikatyang merged commit 91c20f7 into prettier:master Dec 27, 2018
@ikatyang
Copy link
Member

Thanks!

ndelangen added a commit to storybookjs/storybook that referenced this pull request Jan 24, 2019
@lala010addict
Copy link

I keep getting errors Couldn't resolve parser "babel" after this update. Any ideas on how to fix it? Thanks

@duailibe
Copy link
Member

@lala010addict Please open a new issue, filling the template

@prettier prettier locked as resolved and limited conversation to collaborators Jan 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rename babylon to babel
6 participants