-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* [babel 8] Remove `loose` and `spec` options from `preset-env` * Add tests for good error messages * [babel 8] Remove env's loose special-handling in class features plugins
- Loading branch information
1 parent
cce807f
commit 8fa2a91
Showing
39 changed files
with
110 additions
and
115 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
File renamed without changes.
1 change: 1 addition & 0 deletions
1
...e-and-assumptions-preset-env/options.json → ...sumptions-preset-env-babel-7/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
File renamed without changes.
File renamed without changes.
6 changes: 4 additions & 2 deletions
6
...fixtures/flow-comments/transformed-class-method-loose-return-type-annotation/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,4 +1,6 @@ | ||
{ | ||
"presets": [["env", { "loose": true, "targets": { "browsers": "ie 6" } }]], | ||
"plugins": ["transform-flow-comments"] | ||
"plugins": [ | ||
"transform-flow-comments", | ||
["transform-classes", { "loose": true }] | ||
] | ||
} |
2 changes: 1 addition & 1 deletion
2
...st/fixtures/flow-comments/transformed-class-method-loose-return-type-annotation/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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
// @flow | ||
var C = /*#__PURE__*/function () { | ||
let C = /*#__PURE__*/function () { | ||
"use strict"; | ||
|
||
function C() {} | ||
|
6 changes: 4 additions & 2 deletions
6
...st/fixtures/regression/transformed-class-method-loose-return-type-annotation/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,4 +1,6 @@ | ||
{ | ||
"presets": [["env", { "loose": true, "targets": { "browsers": "ie 6" } }]], | ||
"plugins": ["transform-flow-strip-types"] | ||
"plugins": [ | ||
"transform-flow-strip-types", | ||
["transform-classes", { "loose": true }] | ||
] | ||
} |
2 changes: 1 addition & 1 deletion
2
.../test/fixtures/regression/transformed-class-method-loose-return-type-annotation/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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
var C = /*#__PURE__*/function () { | ||
let C = /*#__PURE__*/function () { | ||
"use strict"; | ||
|
||
function C() {} | ||
|
5 changes: 0 additions & 5 deletions
5
packages/babel-preset-env/src/get-option-specific-excludes.ts
This file was deleted.
Oops, something went wrong.
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
1 change: 1 addition & 0 deletions
1
...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,4 +1,5 @@ | ||
{ | ||
"BABEL_8_BREAKING": false, | ||
"validateLogs": true, | ||
"presets": [ | ||
["env", { | ||
|
1 change: 1 addition & 0 deletions
1
...et-env/test/fixtures/loose-class-features-precedence/preset-loose-no-plugins/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,4 +1,5 @@ | ||
{ | ||
"BABEL_8_BREAKING": false, | ||
"validateLogs": true, | ||
"presets": [ | ||
["env", { | ||
|
1 change: 1 addition & 0 deletions
1
...nv/test/fixtures/loose-class-features-precedence/preset-not-loose-no-plugins/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,4 +1,5 @@ | ||
{ | ||
"BABEL_8_BREAKING": false, | ||
"validateLogs": true, | ||
"presets": [ | ||
["env", { | ||
|
1 change: 1 addition & 0 deletions
1
...oose-class-features-precedence/properties-and-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,4 +1,5 @@ | ||
{ | ||
"BABEL_8_BREAKING": false, | ||
"validateLogs": true, | ||
"presets": [ | ||
["env", { | ||
|
1 change: 1 addition & 0 deletions
1
...oose-class-features-precedence/properties-and-methods-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,4 +1,5 @@ | ||
{ | ||
"BABEL_8_BREAKING": false, | ||
"validateLogs": true, | ||
"presets": [ | ||
["env", { | ||
|
1 change: 1 addition & 0 deletions
1
.../test/fixtures/loose-class-features-precedence/properties-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,4 +1,5 @@ | ||
{ | ||
"BABEL_8_BREAKING": false, | ||
"validateLogs": true, | ||
"presets": [ | ||
["env", { | ||
|
1 change: 1 addition & 0 deletions
1
...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,4 +1,5 @@ | ||
{ | ||
"BABEL_8_BREAKING": false, | ||
"validateLogs": true, | ||
"presets": [ | ||
["env", { | ||
|
1 change: 1 addition & 0 deletions
1
...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,4 +1,5 @@ | ||
{ | ||
"BABEL_8_BREAKING": false, | ||
"validateLogs": true, | ||
"presets": [ | ||
["env", { | ||
|
File renamed without changes.
1 change: 1 addition & 0 deletions
1
...es/modules/modules-amd-loose/options.json → ...es/modules-amd-loose-babel-7/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,4 +1,5 @@ | ||
{ | ||
"BABEL_8_BREAKING": false, | ||
"presets": [ | ||
[ | ||
"env", | ||
|
File renamed without changes.
1 change: 0 additions & 1 deletion
1
packages/babel-preset-env/test/fixtures/preset-options/loose-typeof-symbol/input.mjs
This file was deleted.
Oops, something went wrong.
10 changes: 0 additions & 10 deletions
10
packages/babel-preset-env/test/fixtures/preset-options/loose-typeof-symbol/options.json
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
packages/babel-preset-env/test/fixtures/preset-options/loose-typeof-symbol/output.js
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
...babel-preset-env/test/fixtures/preset-options/loose-with-typeof-symbol-includes/input.mjs
This file was deleted.
Oops, something went wrong.
12 changes: 0 additions & 12 deletions
12
...el-preset-env/test/fixtures/preset-options/loose-with-typeof-symbol-includes/options.json
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
...babel-preset-env/test/fixtures/preset-options/loose-with-typeof-symbol-includes/output.js
This file was deleted.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
packages/babel-preset-env/test/fixtures/preset-options/removed-loose/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 changes: 5 additions & 0 deletions
5
packages/babel-preset-env/test/fixtures/preset-options/removed-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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"BABEL_8_BREAKING": true, | ||
"presets": [["env", { "loose": true }]], | ||
"throws": "@babel/preset-env: The 'loose' and 'spec' options have been removed, and you should configure granular compiler assumptions instead. See https://babeljs.io/assumptions for more information." | ||
} |
1 change: 1 addition & 0 deletions
1
packages/babel-preset-env/test/fixtures/preset-options/removed-spec/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 @@ | ||
; |
Oops, something went wrong.