Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix unshiftContainer and insertBefore
- Loading branch information
Showing
18 changed files
with
160 additions
and
43 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
35 changes: 23 additions & 12 deletions
35
...ages/babel-plugin-proposal-class-properties/test/fixtures/public-loose/computed/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
4 changes: 3 additions & 1 deletion
4
...l-plugin-proposal-class-properties/test/fixtures/public-loose/instance-computed/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,7 @@ | ||
function test(x) { | ||
var _x = x; | ||
var _x; | ||
|
||
_x = x; | ||
|
||
var F = function F() { | ||
"use strict"; | ||
|
35 changes: 23 additions & 12 deletions
35
packages/babel-plugin-proposal-class-properties/test/fixtures/public/computed/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
4 changes: 3 additions & 1 deletion
4
...s/babel-plugin-proposal-class-properties/test/fixtures/public/instance-computed/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,7 @@ | ||
function test(x) { | ||
var _x = x; | ||
var _x; | ||
|
||
_x = x; | ||
|
||
var F = function F() { | ||
"use strict"; | ||
|
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
23 changes: 23 additions & 0 deletions
23
packages/babel-plugin-proposal-class-properties/test/fixtures/regression/8882/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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
const classes = []; | ||
for (let i = 0; i <= 10; ++i) { | ||
classes.push( | ||
class A { | ||
[i] = `computed field ${i}`; | ||
static foo = `static field ${i}`; | ||
#bar = `private field ${i}`; | ||
getBar() { | ||
return this.#bar; | ||
} | ||
} | ||
); | ||
} | ||
|
||
for(let i=0; i<= 10; ++i) { | ||
const clazz = classes[i]; | ||
expect(clazz.foo).toBe('static field ' + i); | ||
|
||
const instance = new clazz(); | ||
expect(Object.getOwnPropertyNames(instance)).toEqual([String(i)]) | ||
expect(instance[i]).toBe('computed field ' + i); | ||
expect(instance.getBar()).toBe('private field ' + i); | ||
} |
13 changes: 13 additions & 0 deletions
13
packages/babel-plugin-proposal-class-properties/test/fixtures/regression/8882/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,13 @@ | ||
const classes = []; | ||
for (let i = 0; i <= 10; ++i) { | ||
classes.push( | ||
class A { | ||
[i] = `computed field ${i}`; | ||
static foo = `static field ${i}`; | ||
#bar = `private field ${i}`; | ||
getBar() { | ||
return this.#bar; | ||
} | ||
} | ||
); | ||
} |
3 changes: 3 additions & 0 deletions
3
packages/babel-plugin-proposal-class-properties/test/fixtures/regression/8882/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,3 @@ | ||
{ | ||
"plugins": ["external-helpers", "proposal-class-properties"] | ||
} |
23 changes: 23 additions & 0 deletions
23
packages/babel-plugin-proposal-class-properties/test/fixtures/regression/8882/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,23 @@ | ||
const classes = []; | ||
|
||
for (let i = 0; i <= 10; ++i) { | ||
var _class, _temp, _bar; | ||
|
||
let _i; | ||
|
||
classes.push((_temp = (_i = i, _class = class A { | ||
constructor() { | ||
babelHelpers.defineProperty(this, _i, `computed field ${i}`); | ||
|
||
_bar.set(this, { | ||
writable: true, | ||
value: `private field ${i}` | ||
}); | ||
} | ||
|
||
getBar() { | ||
return babelHelpers.classPrivateFieldGet(this, _bar); | ||
} | ||
|
||
}), _bar = new WeakMap(), babelHelpers.defineProperty(_class, "foo", `static field ${i}`), _temp)); | ||
} |
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
4 changes: 3 additions & 1 deletion
4
.../babel-plugin-proposal-class-properties/test/fixtures/static-property-tdz/loose/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
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