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

Add a promise-returning *Async version of the transform and parse fns #8023

Merged
merged 2 commits into from May 25, 2018

Conversation

@loganfsmyth
Copy link
Member

loganfsmyth commented May 24, 2018

Q                       A
Fixed Issues?
Patch: Bug Fix? N
Major: Breaking Change? N
Minor: New Feature? Y
Tests Added + Pass? Yes
Documentation PR
Any Dependency Changes?
License MIT

We've already got transformFile and transformFileSync for instance, so this adds transformFileAsync as a promise-returing version.

@babel-bot

This comment has been minimized.

Copy link
Collaborator

babel-bot commented May 24, 2018

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/8161/


// For backward-compat with Babel 7's early betas, we allow sync parsing when
// no callback is given. Will be dropped in some future Babel major version.
if (callback === undefined) return parseSync(code, opts);

This comment has been minimized.

Copy link
@nicolo-ribaudo

nicolo-ribaudo May 24, 2018

Member

Q: If we wanted to introduce a warning, would it be a breaking change? Or we could do it in a minor/patch version?

This comment has been minimized.

Copy link
@loganfsmyth

loganfsmyth May 24, 2018

Author Member

I mostly added this to make lives easier for people, I actually thought about removing it in this PR, but since it's so trivial leaving it to 8.x isn't really that much of a problem.

@loganfsmyth loganfsmyth merged commit 98ff2ce into babel:master May 25, 2018
4 checks passed
4 checks passed
babel/repl REPL preview is available
Details
ci/circleci Your tests passed on CircleCI!
Details
codecov/project 80.61% (target 80%)
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@loganfsmyth loganfsmyth deleted the loganfsmyth:sync-async branch May 25, 2018
@lock lock bot added the outdated label Oct 4, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
4 participants
You can’t perform that action at this time.