-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Suggest using BABEL_SHOW_CONFIG_FOR for config problems
- Loading branch information
1 parent
eccbd20
commit f5645c5
Showing
24 changed files
with
246 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
...test/fixtures/loose-class-features-precedence/methods-loose-preset-not-loose-win/input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
class A { | ||
x = 2; | ||
|
||
#foo() {} | ||
} |
15 changes: 15 additions & 0 deletions
15
.../fixtures/loose-class-features-precedence/methods-loose-preset-not-loose-win/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"BABEL_8_BREAKING": false, | ||
"os": ["win32"], | ||
"validateLogs": true, | ||
"presets": [ | ||
[ | ||
"env", | ||
{ | ||
"targets": { "node": 10 }, | ||
"shippedProposals": true | ||
} | ||
] | ||
], | ||
"plugins": [["proposal-private-methods", { "loose": true }]] | ||
} |
17 changes: 17 additions & 0 deletions
17
...est/fixtures/loose-class-features-precedence/methods-loose-preset-not-loose-win/output.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
var id = 0; | ||
|
||
function _classPrivateFieldLooseKey(name) { return "__private_" + id++ + "_" + name; } | ||
|
||
var _foo = _classPrivateFieldLooseKey("foo"); | ||
|
||
class A { | ||
constructor() { | ||
Object.defineProperty(this, _foo, { | ||
value: _foo2 | ||
}); | ||
this.x = 2; | ||
} | ||
|
||
} | ||
|
||
var _foo2 = function _foo2() {}; |
5 changes: 5 additions & 0 deletions
5
...st/fixtures/loose-class-features-precedence/methods-loose-preset-not-loose-win/stderr.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Though the "loose" option was set to "false" in your @babel/preset-env config, it will not be used for @babel/plugin-proposal-class-properties since the "loose" mode option was set to "true" for @babel/plugin-proposal-private-methods. | ||
The "loose" option must be the same for @babel/plugin-proposal-class-properties, @babel/plugin-proposal-private-methods and @babel/plugin-proposal-private-property-in-object (when they are enabled): you can silence this warning by explicitly adding | ||
["@babel/plugin-proposal-class-properties", { "loose": true }] | ||
to the "plugins" section of your Babel config. | ||
You can re-run Babel with the BABEL_SHOW_CONFIG_FOR=<CWD>\packages\babel-preset-env\test\fixtures\loose-class-features-precedence\methods-loose-preset-not-loose\input.js environment variable to show the loaded configuration. |
14 changes: 8 additions & 6 deletions
14
...test/fixtures/loose-class-features-precedence/methods-loose-preset-not-loose/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
{ | ||
"BABEL_8_BREAKING": false, | ||
"os": ["darwin", "linux"], | ||
"validateLogs": true, | ||
"presets": [ | ||
["env", { | ||
"targets": { "node": 10 } | ||
}] | ||
[ | ||
"env", | ||
{ | ||
"targets": { "node": 10 } | ||
} | ||
] | ||
], | ||
"plugins": [ | ||
["transform-private-methods", { "loose": true }] | ||
] | ||
"plugins": [["transform-private-methods", { "loose": true }]] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
...t/fixtures/loose-class-features-precedence/properties-loose-preset-not-loose-win/input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
class A { | ||
x = 2; | ||
|
||
#foo() {} | ||
} |
15 changes: 15 additions & 0 deletions
15
...xtures/loose-class-features-precedence/properties-loose-preset-not-loose-win/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"BABEL_8_BREAKING": false, | ||
"os": ["win32"], | ||
"validateLogs": true, | ||
"presets": [ | ||
[ | ||
"env", | ||
{ | ||
"targets": { "node": 10 }, | ||
"shippedProposals": true | ||
} | ||
] | ||
], | ||
"plugins": [["proposal-class-properties", { "loose": true }]] | ||
} |
17 changes: 17 additions & 0 deletions
17
.../fixtures/loose-class-features-precedence/properties-loose-preset-not-loose-win/output.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
var id = 0; | ||
|
||
function _classPrivateFieldLooseKey(name) { return "__private_" + id++ + "_" + name; } | ||
|
||
var _foo = _classPrivateFieldLooseKey("foo"); | ||
|
||
class A { | ||
constructor() { | ||
Object.defineProperty(this, _foo, { | ||
value: _foo2 | ||
}); | ||
this.x = 2; | ||
} | ||
|
||
} | ||
|
||
var _foo2 = function _foo2() {}; |
5 changes: 5 additions & 0 deletions
5
...fixtures/loose-class-features-precedence/properties-loose-preset-not-loose-win/stderr.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Though the "loose" option was set to "false" in your @babel/preset-env config, it will not be used for @babel/plugin-proposal-private-methods since the "loose" mode option was set to "true" for @babel/plugin-proposal-class-properties. | ||
The "loose" option must be the same for @babel/plugin-proposal-class-properties, @babel/plugin-proposal-private-methods and @babel/plugin-proposal-private-property-in-object (when they are enabled): you can silence this warning by explicitly adding | ||
["@babel/plugin-proposal-private-methods", { "loose": true }] | ||
to the "plugins" section of your Babel config. | ||
You can re-run Babel with the BABEL_SHOW_CONFIG_FOR=<CWD>\packages\babel-preset-env\test\fixtures\loose-class-features-precedence\properties-loose-preset-not-loose\input.js environment variable to show the loaded configuration. |
14 changes: 8 additions & 6 deletions
14
...t/fixtures/loose-class-features-precedence/properties-loose-preset-not-loose/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
{ | ||
"BABEL_8_BREAKING": false, | ||
"os": ["darwin", "linux"], | ||
"validateLogs": true, | ||
"presets": [ | ||
["env", { | ||
"targets": { "node": 10 } | ||
}] | ||
[ | ||
"env", | ||
{ | ||
"targets": { "node": 10 } | ||
} | ||
] | ||
], | ||
"plugins": [ | ||
["transform-class-properties", { "loose": true }] | ||
] | ||
"plugins": [["transform-class-properties", { "loose": true }]] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
...t/fixtures/loose-class-features-precedence/properties-not-loose-preset-loose-win/input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
class A { | ||
x = 2; | ||
|
||
#foo() {} | ||
} |
16 changes: 16 additions & 0 deletions
16
...xtures/loose-class-features-precedence/properties-not-loose-preset-loose-win/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"BABEL_8_BREAKING": false, | ||
"os": ["win32"], | ||
"validateLogs": true, | ||
"presets": [ | ||
[ | ||
"env", | ||
{ | ||
"targets": { "node": 10 }, | ||
"shippedProposals": true, | ||
"loose": true | ||
} | ||
] | ||
], | ||
"plugins": [["proposal-class-properties", { "loose": false }]] | ||
} |
14 changes: 14 additions & 0 deletions
14
.../fixtures/loose-class-features-precedence/properties-not-loose-preset-loose-win/output.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
|
||
var _foo = new WeakSet(); | ||
|
||
class A { | ||
constructor() { | ||
_foo.add(this); | ||
|
||
_defineProperty(this, "x", 2); | ||
} | ||
|
||
} | ||
|
||
var _foo2 = function _foo2() {}; |
5 changes: 5 additions & 0 deletions
5
...fixtures/loose-class-features-precedence/properties-not-loose-preset-loose-win/stderr.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Though the "loose" option was set to "true" in your @babel/preset-env config, it will not be used for @babel/plugin-proposal-private-methods since the "loose" mode option was set to "false" for @babel/plugin-proposal-class-properties. | ||
The "loose" option must be the same for @babel/plugin-proposal-class-properties, @babel/plugin-proposal-private-methods and @babel/plugin-proposal-private-property-in-object (when they are enabled): you can silence this warning by explicitly adding | ||
["@babel/plugin-proposal-private-methods", { "loose": false }] | ||
to the "plugins" section of your Babel config. | ||
You can re-run Babel with the BABEL_SHOW_CONFIG_FOR=<CWD>\packages\babel-preset-env\test\fixtures\loose-class-features-precedence\properties-not-loose-preset-loose\input.js environment variable to show the loaded configuration. |
16 changes: 9 additions & 7 deletions
16
...t/fixtures/loose-class-features-precedence/properties-not-loose-preset-loose/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
{ | ||
"BABEL_8_BREAKING": false, | ||
"os": ["darwin", "linux"], | ||
"validateLogs": true, | ||
"presets": [ | ||
["env", { | ||
"targets": { "node": 10 }, | ||
"loose": true | ||
}] | ||
[ | ||
"env", | ||
{ | ||
"targets": { "node": 10 }, | ||
"loose": true | ||
} | ||
] | ||
], | ||
"plugins": [ | ||
["transform-class-properties", { "loose": false }] | ||
] | ||
"plugins": [["transform-class-properties", { "loose": false }]] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters