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 'cwd' option, and misc refactoring and tweaks before simple config merging #6904

Merged
merged 6 commits into from
Nov 25, 2017

Conversation

loganfsmyth
Copy link
Member

Q                       A
Fixed Issues? Fixes #1, Fixes #2
Patch: Bug Fix? N
Major: Breaking Change? N
Minor: New Feature? Y (added cwd option)
Tests Added + Pass? Yes
Documentation PR
Any Dependency Changes?
License MIT

Only new feature is adding a cwd option that Babel will used to resolve relative paths passed programmatically. Defaults to the global cwd. This I think is the last place where we were relying on global state, so technically we would have used the wrong filename in the transform if someone did

var opts = babel.loadOptions({ filename: "./file.js"});
process.chdir("/other");
babel.transform("", opts);

so now we allow an option for it, and loadOptions includes the value that was used in the opts it returns.

Everything else in here should be entirely non-controversial too.

@loganfsmyth loganfsmyth added the PR: New Feature 🚀 A type of pull request used for our changelog categories label Nov 25, 2017
@babel-bot
Copy link
Collaborator

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

@babel babel deleted a comment from babel-bot Nov 25, 2017
@loganfsmyth loganfsmyth merged commit 66ee192 into babel:master Nov 25, 2017
@loganfsmyth loganfsmyth deleted the config-merge-prep branch November 25, 2017 06:54
@lock lock bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Oct 5, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated A closed issue/PR that is archived due to age. Recommended to make a new issue PR: New Feature 🚀 A type of pull request used for our changelog categories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants