fix: non breaking align options naming#13532
Conversation
|
Let's see if it breaks e2e🤞 |
|
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/47767/ |
|
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 8917e57:
|
|
May we consider it a new feature because previously this was "shadowed" and not accessible? |
|
Yeah I'd consider this a new feature. |
nicolo-ribaudo
left a comment
There was a problem hiding this comment.
Can you also add a test that directly passes the sourceFileName option?
And also a test for the unknown special case (why do we need that special case?)
4d6046f to
0d172f3
Compare
| it("should parse using passed in configuration", function () { | ||
| const input = fs.readFileSync(fixture("input.js"), "utf8"); | ||
| const output = require(fixture("output.json")); | ||
| const input = fs.readFileSync( |
There was a problem hiding this comment.
@nicolo-ribaudo this tests the no-"unknown" handling because no filename, filenameRelative or sourceFileName is passed.
We need that special case handling because sourceFileName defaults to filenameRelative which defaults to "filename" (if provided) or to "unknown".
0d172f3 to
8917e57
Compare
|
This change breaks one of my babel plugins that relies on the |
|
That should be the right behaviour but yeah, since it breaks let's leave it entirely for babel-8. |
|
@fedeci thanks! Shouldn't we add filename as well to parserOpts then? Otherwise in the I have a babel plugin that transforms HTML Imports to es modules, and it transforms the HTML to valid JS in this hook. I need to know the folder of the file for resolving some references inside the HTML. |
|
Probably yes, I'll update the other PR in these days! |
|
Noticed this change is breaking this plugin here, which is probably the same/similar thing @LarsDenBakker is referring to. |
|
If we're already considering this a breaking change, would it not make more sense to standardize all uses of |
babel/babel#13532 Babel released a patch that included renaming a config property. They are planning to reverse this change. This patch works with both the previous and current versions of babel.
|
@DylanPiercey this was not to be considered as a breaking change initially because of my fault. It will be reverted in the next patch version. The "big breaking change" is already scheduled for babel 8. |
|
I'm releasing v7.15.5 to revert this. |
Uh oh!
There was an error while loading. Please reload this page.