forked from babel/babel
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #47 from babel/main
[pull] main from babel:main
- Loading branch information
Showing
615 changed files
with
5,724 additions
and
2,497 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
yarn lint-staged |
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
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
22 changes: 22 additions & 0 deletions
22
benchmark/babel-parser/many-nested-block-elements/bench.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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import Benchmark from "benchmark"; | ||
import baseline from "@babel-baseline/parser"; | ||
import current from "@babel/parser"; | ||
import { report } from "../../util.mjs"; | ||
|
||
const suite = new Benchmark.Suite(); | ||
function createInput(length) { | ||
return "{".repeat(length) + "0" + "}".repeat(length); | ||
} | ||
function benchCases(name, implementation, options) { | ||
for (const length of [128, 256, 512, 1024]) { | ||
const input = createInput(length); | ||
suite.add(`${name} ${length} nested template elements`, () => { | ||
implementation.parse(input, options); | ||
}); | ||
} | ||
} | ||
|
||
benchCases("baseline", baseline); | ||
benchCases("current", current); | ||
|
||
suite.on("cycle", report).run(); |
25 changes: 25 additions & 0 deletions
25
benchmark/babel-parser/many-nested-jsx-elements-with-attributes/bench.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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import Benchmark from "benchmark"; | ||
import baseline from "@babel-baseline/parser"; | ||
import current from "@babel/parser"; | ||
import { report } from "../../util.mjs"; | ||
|
||
const suite = new Benchmark.Suite(); | ||
function createInput(length) { | ||
return "<t a={x}>{y}".repeat(length) + "</t>".repeat(length); | ||
} | ||
function benchCases(name, implementation, options) { | ||
for (const length of [128, 256, 512, 1024]) { | ||
const input = createInput(length); | ||
suite.add( | ||
`${name} ${length} nested jsx elements with one attribute and text`, | ||
() => { | ||
implementation.parse(input, options); | ||
} | ||
); | ||
} | ||
} | ||
|
||
benchCases("baseline", baseline, { plugins: ["jsx"] }); | ||
benchCases("current", current, { plugins: ["jsx"] }); | ||
|
||
suite.on("cycle", report).run(); |
22 changes: 22 additions & 0 deletions
22
benchmark/babel-parser/many-nested-template-elements/bench.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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import Benchmark from "benchmark"; | ||
import baseline from "@babel-baseline/parser"; | ||
import current from "@babel/parser"; | ||
import { report } from "../../util.mjs"; | ||
|
||
const suite = new Benchmark.Suite(); | ||
function createInput(length) { | ||
return "` ${".repeat(length) + "0" + "}`".repeat(length); | ||
} | ||
function benchCases(name, implementation, options) { | ||
for (const length of [128, 256, 512, 1024]) { | ||
const input = createInput(length); | ||
suite.add(`${name} ${length} nested template elements`, () => { | ||
implementation.parse(input, options); | ||
}); | ||
} | ||
} | ||
|
||
benchCases("baseline", baseline); | ||
benchCases("current", current); | ||
|
||
suite.on("cycle", report).run(); |
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 @@ | ||
import Benchmark from "benchmark"; | ||
import baseline from "@babel-baseline/parser"; | ||
import current from "@babel/parser"; | ||
import { report } from "../../util.mjs"; | ||
|
||
const suite = new Benchmark.Suite(); | ||
function createInput(length) { | ||
return "`" + " ${0}".repeat(length) + "`"; | ||
} | ||
function benchCases(name, implementation, options) { | ||
for (const length of [128, 256, 512, 1024]) { | ||
const input = createInput(length); | ||
suite.add(`${name} ${length} template elements`, () => { | ||
implementation.parse(input, options); | ||
}); | ||
} | ||
} | ||
|
||
current.parse(createInput(1)); | ||
benchCases("baseline", baseline); | ||
benchCases("current", current); | ||
|
||
suite.on("cycle", report).run(); |
File renamed without changes.
1 change: 1 addition & 0 deletions
1
codemods/babel-plugin-codemod-object-assign-to-object-spread/test/package.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 @@ | ||
{ "type": "module" } |
File renamed without changes.
1 change: 1 addition & 0 deletions
1
codemods/babel-plugin-codemod-optional-catch-binding/test/package.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 @@ | ||
{ "type": "module" } |
Oops, something went wrong.