-
-
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.
- Loading branch information
1 parent
046b18a
commit fa4918a
Showing
19 changed files
with
55 additions
and
50 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
4 changes: 2 additions & 2 deletions
4
...gin-transform-for-of/test/fixtures/assumption-iterableIsArray/for-of-import-amd/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,8 +1,8 @@ | ||
define(["foo"], function (_foo) { | ||
"use strict"; | ||
|
||
for (let _i = 0; _i < _foo.array.length; _i++) { | ||
const elm = _foo.array[_i]; | ||
for (let _i = 0, _arr = _foo.array; _i < _arr.length; _i++) { | ||
const elm = _arr[_i]; | ||
console.log(elm); | ||
} | ||
}); |
4 changes: 2 additions & 2 deletions
4
...ransform-for-of/test/fixtures/assumption-iterableIsArray/for-of-import-commonjs/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,7 +1,7 @@ | ||
"use strict"; | ||
|
||
var _foo = require("foo"); | ||
for (let _i = 0; _i < _foo.array.length; _i++) { | ||
const elm = _foo.array[_i]; | ||
for (let _i = 0, _arr = _foo.array; _i < _arr.length; _i++) { | ||
const elm = _arr[_i]; | ||
console.log(elm); | ||
} |
4 changes: 2 additions & 2 deletions
4
...transform-for-of/test/fixtures/assumption-iterableIsArray/for-of-import-es2015/output.mjs
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 @@ | ||
import { array } from "foo"; | ||
for (let _i = 0; _i < array.length; _i++) { | ||
const elm = array[_i]; | ||
for (let _i = 0, _arr = array; _i < _arr.length; _i++) { | ||
const elm = _arr[_i]; | ||
console.log(elm); | ||
} |
3 changes: 3 additions & 0 deletions
3
...transform-for-of/test/fixtures/assumption-iterableIsArray/for-of-modify-iterable/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,3 @@ | ||
for (let o of arr) { | ||
arr = null; | ||
} |
4 changes: 4 additions & 0 deletions
4
...ransform-for-of/test/fixtures/assumption-iterableIsArray/for-of-modify-iterable/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,4 @@ | ||
for (let _i = 0, _arr = arr; _i < _arr.length; _i++) { | ||
let o = _arr[_i]; | ||
arr = null; | ||
} |
4 changes: 1 addition & 3 deletions
4
...sform-for-of/test/fixtures/assumption-iterableIsArray/for-of-redeclare-iterable/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,6 +1,4 @@ | ||
for (let _i = 0, _arr = arr; _i < _arr.length; _i++) { | ||
let o = _arr[_i]; | ||
{ | ||
const arr = o; | ||
} | ||
const arr = o; | ||
} |
4 changes: 2 additions & 2 deletions
4
...sform-for-of/test/fixtures/assumption-iterableIsArray/for-of-static-declaration/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 @@ | ||
const array = []; | ||
for (let _i = 0; _i < array.length; _i++) { | ||
const elm = array[_i]; | ||
for (let _i = 0, _arr = array; _i < _arr.length; _i++) { | ||
const elm = _arr[_i]; | ||
console.log(elm); | ||
} |
4 changes: 2 additions & 2 deletions
4
...-plugin-transform-for-of/test/fixtures/assumption-iterableIsArray/for-of-static/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,6 +1,6 @@ | ||
const array = []; | ||
let elm; | ||
for (let _i = 0; _i < array.length; _i++) { | ||
elm = array[_i]; | ||
for (let _i = 0, _arr = array; _i < _arr.length; _i++) { | ||
elm = _arr[_i]; | ||
console.log(elm); | ||
} |
4 changes: 2 additions & 2 deletions
4
...s/babel-plugin-transform-for-of/test/fixtures/for-of-as-array/for-of-import-amd/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,8 +1,8 @@ | ||
define(["foo"], function (_foo) { | ||
"use strict"; | ||
|
||
for (let _i = 0; _i < _foo.array.length; _i++) { | ||
const elm = _foo.array[_i]; | ||
for (let _i = 0, _arr = _foo.array; _i < _arr.length; _i++) { | ||
const elm = _arr[_i]; | ||
console.log(elm); | ||
} | ||
}); |
4 changes: 2 additions & 2 deletions
4
...el-plugin-transform-for-of/test/fixtures/for-of-as-array/for-of-import-commonjs/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,7 +1,7 @@ | ||
"use strict"; | ||
|
||
var _foo = require("foo"); | ||
for (let _i = 0; _i < _foo.array.length; _i++) { | ||
const elm = _foo.array[_i]; | ||
for (let _i = 0, _arr = _foo.array; _i < _arr.length; _i++) { | ||
const elm = _arr[_i]; | ||
console.log(elm); | ||
} |
4 changes: 2 additions & 2 deletions
4
...bel-plugin-transform-for-of/test/fixtures/for-of-as-array/for-of-import-es2015/output.mjs
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 @@ | ||
import { array } from "foo"; | ||
for (let _i = 0; _i < array.length; _i++) { | ||
const elm = array[_i]; | ||
for (let _i = 0, _arr = array; _i < _arr.length; _i++) { | ||
const elm = _arr[_i]; | ||
console.log(elm); | ||
} |
4 changes: 1 addition & 3 deletions
4
...plugin-transform-for-of/test/fixtures/for-of-as-array/for-of-redeclare-iterable/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,6 +1,4 @@ | ||
for (let _i = 0, _arr = arr; _i < _arr.length; _i++) { | ||
let o = _arr[_i]; | ||
{ | ||
const arr = o; | ||
} | ||
const arr = o; | ||
} |
4 changes: 2 additions & 2 deletions
4
...plugin-transform-for-of/test/fixtures/for-of-as-array/for-of-static-declaration/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 @@ | ||
const array = []; | ||
for (let _i = 0; _i < array.length; _i++) { | ||
const elm = array[_i]; | ||
for (let _i = 0, _arr = array; _i < _arr.length; _i++) { | ||
const elm = _arr[_i]; | ||
console.log(elm); | ||
} |
4 changes: 2 additions & 2 deletions
4
packages/babel-plugin-transform-for-of/test/fixtures/for-of-as-array/for-of-static/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,6 +1,6 @@ | ||
const array = []; | ||
let elm; | ||
for (let _i = 0; _i < array.length; _i++) { | ||
elm = array[_i]; | ||
for (let _i = 0, _arr = array; _i < _arr.length; _i++) { | ||
elm = _arr[_i]; | ||
console.log(elm); | ||
} |
4 changes: 1 addition & 3 deletions
4
...ges/babel-plugin-transform-for-of/test/fixtures/regression/redeclare-array-8913/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,8 +1,6 @@ | ||
function f(...t) { | ||
for (var _i = 0, _t = t; _i < _t.length; _i++) { | ||
let o = _t[_i]; | ||
{ | ||
const t = o; | ||
} | ||
const t = o; | ||
} | ||
} |
7 changes: 5 additions & 2 deletions
7
...ges/babel-preset-env/test/fixtures/plugins-integration/for-of-array-block-scoping/exec.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
7 changes: 5 additions & 2 deletions
7
...es/babel-preset-env/test/fixtures/plugins-integration/for-of-array-block-scoping/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
9 changes: 5 additions & 4 deletions
9
...s/babel-preset-env/test/fixtures/plugins-integration/for-of-array-block-scoping/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