Skip to content

Commit

Permalink
feat(es/module): Add an option to make resolver fully resolve `index.…
Browse files Browse the repository at this point in the history
…js` (#7945)

**Description:**

 - `jsc.module.resolveFully` is added to support resolving as `.js`.

**Related issue:**

 - Closes #7861
 - Closes #7898
  • Loading branch information
kdy1 authored Sep 14, 2023
1 parent 9f8d454 commit 7e8d72d
Show file tree
Hide file tree
Showing 32 changed files with 266 additions and 160 deletions.
4 changes: 2 additions & 2 deletions crates/swc/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ impl<'a, 'b, P: swc_ecma_visit::Fold> PassBuilder<'a, 'b, P> {
(true, c.config.import_interop(), c.config.ignore_dynamic)
}
Some(ModuleConfig::SystemJs(_))
| Some(ModuleConfig::Es6)
| Some(ModuleConfig::NodeNext)
| Some(ModuleConfig::Es6(..))
| Some(ModuleConfig::NodeNext(..))
| None => (false, true.into(), true),
};

Expand Down
53 changes: 36 additions & 17 deletions crates/swc/src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ use swc_ecma_parser::{parse_file_as_expr, Syntax, TsConfig};
use swc_ecma_transforms::{
feature::FeatureFlag,
hygiene, modules,
modules::{path::NodeImportResolver, rewriter::import_rewriter},
modules::{path::NodeImportResolver, rewriter::import_rewriter, EsModuleConfig},
optimization::{const_modules, json_parse, simplifier},
pass::{noop, Optional},
proposals::{
Expand Down Expand Up @@ -419,7 +419,7 @@ impl Options {

if matches!(
cfg.module,
None | Some(ModuleConfig::Es6 | ModuleConfig::NodeNext)
None | Some(ModuleConfig::Es6(..) | ModuleConfig::NodeNext(..))
) {
c.module = true;
}
Expand Down Expand Up @@ -609,11 +609,11 @@ impl Options {
);

let import_export_assign_config = match cfg.module {
Some(ModuleConfig::Es6) => TsImportExportAssignConfig::EsNext,
Some(ModuleConfig::Es6(..)) => TsImportExportAssignConfig::EsNext,
Some(ModuleConfig::CommonJs(..))
| Some(ModuleConfig::Amd(..))
| Some(ModuleConfig::Umd(..)) => TsImportExportAssignConfig::Preserve,
Some(ModuleConfig::NodeNext) => TsImportExportAssignConfig::NodeNext,
Some(ModuleConfig::NodeNext(..)) => TsImportExportAssignConfig::NodeNext,
// TODO: should Preserve for SystemJS
_ => TsImportExportAssignConfig::Classic,
};
Expand Down Expand Up @@ -1571,9 +1571,9 @@ pub enum ModuleConfig {
#[serde(rename = "systemjs")]
SystemJs(modules::system_js::Config),
#[serde(rename = "es6")]
Es6,
Es6(EsModuleConfig),
#[serde(rename = "nodenext")]
NodeNext,
NodeNext(EsModuleConfig),
}

impl ModuleConfig {
Expand All @@ -1596,11 +1596,20 @@ impl ModuleConfig {
let skip_resolver = base_url.as_os_str().is_empty() && paths.is_empty();

match config {
None | Some(ModuleConfig::Es6) | Some(ModuleConfig::NodeNext) => {
None => {
if skip_resolver {
Box::new(noop())
} else {
let resolver = build_resolver(base_url, paths);
let resolver = build_resolver(base_url, paths, false);

Box::new(import_rewriter(base, resolver))
}
}
Some(ModuleConfig::Es6(config)) | Some(ModuleConfig::NodeNext(config)) => {
if skip_resolver {
Box::new(noop())
} else {
let resolver = build_resolver(base_url, paths, config.resolve_fully);

Box::new(import_rewriter(base, resolver))
}
Expand All @@ -1614,7 +1623,7 @@ impl ModuleConfig {
comments,
))
} else {
let resolver = build_resolver(base_url, paths);
let resolver = build_resolver(base_url, paths, config.resolve_fully);
Box::new(modules::common_js::common_js_with_resolver(
resolver,
base,
Expand All @@ -1635,7 +1644,7 @@ impl ModuleConfig {
comments,
))
} else {
let resolver = build_resolver(base_url, paths);
let resolver = build_resolver(base_url, paths, config.config.resolve_fully);

Box::new(modules::umd::umd_with_resolver(
cm,
Expand All @@ -1657,7 +1666,7 @@ impl ModuleConfig {
comments,
))
} else {
let resolver = build_resolver(base_url, paths);
let resolver = build_resolver(base_url, paths, config.config.resolve_fully);

Box::new(modules::amd::amd_with_resolver(
resolver,
Expand All @@ -1673,7 +1682,7 @@ impl ModuleConfig {
if skip_resolver {
Box::new(modules::system_js::system_js(unresolved_mark, config))
} else {
let resolver = build_resolver(base_url, paths);
let resolver = build_resolver(base_url, paths, config.resolve_fully);

Box::new(modules::system_js::system_js_with_resolver(
resolver,
Expand Down Expand Up @@ -1999,8 +2008,12 @@ fn default_env_name() -> String {
}
}

fn build_resolver(mut base_url: PathBuf, paths: CompiledPaths) -> Box<SwcImportResolver> {
static CACHE: Lazy<DashMap<(PathBuf, CompiledPaths), SwcImportResolver, ARandomState>> =
fn build_resolver(
mut base_url: PathBuf,
paths: CompiledPaths,
resolve_fully: bool,
) -> Box<SwcImportResolver> {
static CACHE: Lazy<DashMap<(PathBuf, CompiledPaths, bool), SwcImportResolver, ARandomState>> =
Lazy::new(Default::default);

// On Windows, we need to normalize path as UNC path.
Expand All @@ -2017,7 +2030,7 @@ fn build_resolver(mut base_url: PathBuf, paths: CompiledPaths) -> Box<SwcImportR
.unwrap();
}

if let Some(cached) = CACHE.get(&(base_url.clone(), paths.clone())) {
if let Some(cached) = CACHE.get(&(base_url.clone(), paths.clone(), resolve_fully)) {
return Box::new((*cached).clone());
}

Expand All @@ -2029,11 +2042,17 @@ fn build_resolver(mut base_url: PathBuf, paths: CompiledPaths) -> Box<SwcImportR
);
let r = CachingResolver::new(40, r);

let r = NodeImportResolver::with_base_dir(r, Some(base_url.clone()));
let r = NodeImportResolver::with_config(
r,
swc_ecma_transforms::modules::path::Config {
base_dir: Some(base_url.clone()),
resolve_fully,
},
);
Arc::new(r)
};

CACHE.insert((base_url, paths), r.clone());
CACHE.insert((base_url, paths, resolve_fully), r.clone());

Box::new(r)
}
2 changes: 1 addition & 1 deletion crates/swc/tests/exec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ fn create_matrix(entry: &Path) -> Vec<Options> {
..Default::default()
},
module: if entry.extension().unwrap() == "mjs" {
Some(ModuleConfig::Es6)
Some(ModuleConfig::Es6(Default::default()))
} else {
Some(ModuleConfig::CommonJs(Default::default()))
},
Expand Down
7 changes: 1 addition & 6 deletions crates/swc/tests/fixture/deno/paths/issue-3447/input/.swcrc
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@
}
},
"module": {
"type": "es6",
"strict": false,
"strictMode": true,
"lazy": false,
"noInterop": false,
"ignoreDynamic": true
"type": "es6"
}
}
4 changes: 1 addition & 3 deletions crates/swc/tests/fixture/issues-3xxx/3882/input/.swcrc
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
},
"module": {
"type": "es6",
"strict": false,
"strictMode": false
},
"minify": false
}
}
14 changes: 8 additions & 6 deletions crates/swc/tests/fixture/issues-4xxx/4120/1/input/.swcrc
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{
"sourceMaps": true,
"module": {
"type": "es6",
"strict": true,
"noInterop": false
"type": "es6"
},
"env": {
"targets": "node 12"
Expand Down Expand Up @@ -72,11 +70,15 @@
},
"keepClassNames": false,
"paths": {
"@/*": ["./*"],
"__shared-fixtures__/*": ["./test/__shared-fixtures__/*"]
"@/*": [
"./*"
],
"__shared-fixtures__/*": [
"./test/__shared-fixtures__/*"
]
},
"baseUrl": ".",
"loose": false
},
"minify": true
}
}
8 changes: 2 additions & 6 deletions crates/swc/tests/fixture/issues-4xxx/4225/1/input/.swcrc
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,7 @@
}
},
"module": {
"type": "es6",
"strict": false,
"strictMode": false,
"lazy": false,
"noInterop": false
"type": "es6"
},
"minify": false
}
}
8 changes: 2 additions & 6 deletions crates/swc/tests/fixture/issues-4xxx/4225/2/input/.swcrc
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,7 @@
}
},
"module": {
"type": "es6",
"strict": false,
"strictMode": false,
"lazy": false,
"noInterop": false
"type": "es6"
},
"minify": false
}
}
8 changes: 2 additions & 6 deletions crates/swc/tests/fixture/issues-4xxx/4226/1/input/.swcrc
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,7 @@
}
},
"module": {
"type": "es6",
"strict": false,
"strictMode": false,
"lazy": false,
"noInterop": false
"type": "es6"
},
"minify": false
}
}
8 changes: 2 additions & 6 deletions crates/swc/tests/fixture/issues-4xxx/4226/2/input/.swcrc
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,7 @@
}
},
"module": {
"type": "es6",
"strict": false,
"strictMode": false,
"lazy": false,
"noInterop": false
"type": "es6"
},
"minify": false
}
}
6 changes: 1 addition & 5 deletions crates/swc/tests/fixture/issues-5xxx/5556/input/.swcrc
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,7 @@
}
},
"module": {
"type": "es6",
"strict": false,
"strictMode": false,
"lazy": false,
"noInterop": false
"type": "es6"
},
"minify": false
}
6 changes: 1 addition & 5 deletions crates/swc/tests/fixture/issues-5xxx/5557/input/.swcrc
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,7 @@
}
},
"module": {
"type": "es6",
"strict": false,
"strictMode": false,
"lazy": false,
"noInterop": false
"type": "es6"
},
"minify": false
}
6 changes: 1 addition & 5 deletions crates/swc/tests/fixture/issues-5xxx/5558/2/input/.swcrc
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,7 @@
}
},
"module": {
"type": "es6",
"strict": false,
"strictMode": false,
"lazy": false,
"noInterop": false
"type": "es6"
},
"minify": false
}
18 changes: 18 additions & 0 deletions crates/swc/tests/fixture/issues-7xxx/7898/1/input/.swcrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"jsc": {
"parser": {
"syntax": "typescript"
},
"target": "es2020",
"baseUrl": ".",
"paths": {
"@print/a": [
"./packages/a/src/index.ts"
]
}
},
"module": {
"type": "commonjs",
"resolveFully": true
}
}
3 changes: 3 additions & 0 deletions crates/swc/tests/fixture/issues-7xxx/7898/1/input/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { displayA } from "@print/a";

console.log(`${displayA()}`);
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export function displayA() {
return "Display A";
}
6 changes: 6 additions & 0 deletions crates/swc/tests/fixture/issues-7xxx/7898/1/output/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
const _a = require("./packages/a/src/index.js");
console.log(`${(0, _a.displayA)()}`);
13 changes: 13 additions & 0 deletions crates/swc/tests/fixture/issues-7xxx/7898/1/output/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "displayA", {
enumerable: true,
get: function() {
return displayA;
}
});
function displayA() {
return "Display A";
}
15 changes: 15 additions & 0 deletions crates/swc/tests/fixture/issues-7xxx/7898/2/input/.swcrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"jsc": {
"parser": {
"syntax": "typescript"
},
"target": "es2020",
"baseUrl": ".",
"paths": {
"@print/a": ["./packages/a/src/index.ts"]
}
},
"module": {
"type": "commonjs"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export function displayA() {
return "Display A";
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { displayA } from "@print/a";

console.log(`${displayA()}`);
Loading

1 comment on commit 7e8d72d

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark

Benchmark suite Current: 7e8d72d Previous: a80aec4 Ratio
es/full/bugs-1 285293 ns/iter (± 9546) 284271 ns/iter (± 9470) 1.00
es/full/minify/libraries/antd 1307296262 ns/iter (± 15210962) 1311410939 ns/iter (± 11917629) 1.00
es/full/minify/libraries/d3 275492908 ns/iter (± 5889773) 271836234 ns/iter (± 4913074) 1.01
es/full/minify/libraries/echarts 1053814591 ns/iter (± 6269158) 1038578275 ns/iter (± 9535148) 1.01
es/full/minify/libraries/jquery 83982419 ns/iter (± 173497) 83637176 ns/iter (± 164179) 1.00
es/full/minify/libraries/lodash 96651087 ns/iter (± 266382) 97236760 ns/iter (± 400228) 0.99
es/full/minify/libraries/moment 49592144 ns/iter (± 46179) 49998393 ns/iter (± 167760) 0.99
es/full/minify/libraries/react 17925904 ns/iter (± 23651) 17984402 ns/iter (± 55740) 1.00
es/full/minify/libraries/terser 216787436 ns/iter (± 572698) 216192023 ns/iter (± 683243) 1.00
es/full/minify/libraries/three 381039701 ns/iter (± 1791402) 381695700 ns/iter (± 975099) 1.00
es/full/minify/libraries/typescript 2623359961 ns/iter (± 6521591) 2640079138 ns/iter (± 20884423) 0.99
es/full/minify/libraries/victory 563447232 ns/iter (± 2734796) 559822482 ns/iter (± 7464891) 1.01
es/full/minify/libraries/vue 118782752 ns/iter (± 355270) 118599385 ns/iter (± 310238) 1.00
es/full/codegen/es3 34151 ns/iter (± 125) 34597 ns/iter (± 94) 0.99
es/full/codegen/es5 34160 ns/iter (± 119) 34546 ns/iter (± 71) 0.99
es/full/codegen/es2015 34168 ns/iter (± 95) 34630 ns/iter (± 53) 0.99
es/full/codegen/es2016 34118 ns/iter (± 128) 34548 ns/iter (± 99) 0.99
es/full/codegen/es2017 34083 ns/iter (± 126) 34580 ns/iter (± 134) 0.99
es/full/codegen/es2018 34106 ns/iter (± 117) 34654 ns/iter (± 229) 0.98
es/full/codegen/es2019 34123 ns/iter (± 73) 34624 ns/iter (± 115) 0.99
es/full/codegen/es2020 34144 ns/iter (± 104) 34635 ns/iter (± 80) 0.99
es/full/all/es3 169748439 ns/iter (± 1038063) 170501516 ns/iter (± 1458958) 1.00
es/full/all/es5 161616997 ns/iter (± 1471914) 161344709 ns/iter (± 911095) 1.00
es/full/all/es2015 121368227 ns/iter (± 657757) 120686963 ns/iter (± 423598) 1.01
es/full/all/es2016 119576258 ns/iter (± 1000317) 119810408 ns/iter (± 661741) 1.00
es/full/all/es2017 119269054 ns/iter (± 799090) 119751063 ns/iter (± 702624) 1.00
es/full/all/es2018 116798943 ns/iter (± 553823) 116764353 ns/iter (± 1075834) 1.00
es/full/all/es2019 116843917 ns/iter (± 805350) 116416187 ns/iter (± 624481) 1.00
es/full/all/es2020 112916601 ns/iter (± 528551) 112478501 ns/iter (± 708523) 1.00
es/full/parser 492575 ns/iter (± 7449) 492697 ns/iter (± 5386) 1.00
es/full/base/fixer 17997 ns/iter (± 51) 17494 ns/iter (± 80) 1.03
es/full/base/resolver_and_hygiene 79114 ns/iter (± 145) 81252 ns/iter (± 187) 0.97
serialization of serde 285 ns/iter (± 5) 292 ns/iter (± 0) 0.98
css/minify/libraries/bootstrap 29489790 ns/iter (± 153856) 29482659 ns/iter (± 96334) 1.00
css/visitor/compare/clone 1668600 ns/iter (± 2239) 1669060 ns/iter (± 4543) 1.00
css/visitor/compare/visit_mut_span 1780836 ns/iter (± 4231) 1788613 ns/iter (± 9409) 1.00
css/visitor/compare/visit_mut_span_panic 1840406 ns/iter (± 4921) 1862995 ns/iter (± 8287) 0.99
css/visitor/compare/fold_span 2563500 ns/iter (± 5194) 2580479 ns/iter (± 11280) 0.99
css/visitor/compare/fold_span_panic 2750061 ns/iter (± 10883) 2775565 ns/iter (± 8577) 0.99
css/lexer/bootstrap_5_1_3 4386985 ns/iter (± 5295) 4477557 ns/iter (± 17451) 0.98
css/lexer/foundation_6_7_4 3689126 ns/iter (± 1567) 3770274 ns/iter (± 7280) 0.98
css/lexer/tailwind_3_1_1 701842 ns/iter (± 282) 719856 ns/iter (± 1399) 0.97
css/parser/bootstrap_5_1_3 19206662 ns/iter (± 29258) 19767349 ns/iter (± 31762) 0.97
css/parser/foundation_6_7_4 15141551 ns/iter (± 32688) 15490660 ns/iter (± 25436) 0.98
css/parser/tailwind_3_1_1 2916344 ns/iter (± 2883) 3028942 ns/iter (± 2427) 0.96
es/codegen/colors 727221 ns/iter (± 395891) 727698 ns/iter (± 396549) 1.00
es/codegen/large 3132555 ns/iter (± 1664527) 3144628 ns/iter (± 1667572) 1.00
es/codegen/with-parser/colors 44419 ns/iter (± 489) 45757 ns/iter (± 216) 0.97
es/codegen/with-parser/large 485913 ns/iter (± 522) 491938 ns/iter (± 1571) 0.99
es/minify/libraries/antd 1128608039 ns/iter (± 9760872) 1124576494 ns/iter (± 8294225) 1.00
es/minify/libraries/d3 236909459 ns/iter (± 416706) 237349071 ns/iter (± 476614) 1.00
es/minify/libraries/echarts 880956752 ns/iter (± 1209574) 889034145 ns/iter (± 7709722) 0.99
es/minify/libraries/jquery 72889534 ns/iter (± 128730) 73724500 ns/iter (± 262288) 0.99
es/minify/libraries/lodash 87177546 ns/iter (± 312187) 86387324 ns/iter (± 291927) 1.01
es/minify/libraries/moment 43337801 ns/iter (± 78203) 43531499 ns/iter (± 91611) 1.00
es/minify/libraries/react 15949007 ns/iter (± 32598) 15972194 ns/iter (± 49533) 1.00
es/minify/libraries/terser 182824510 ns/iter (± 263581) 184984941 ns/iter (± 1028381) 0.99
es/minify/libraries/three 315528255 ns/iter (± 1010794) 319369161 ns/iter (± 1555146) 0.99
es/minify/libraries/typescript 2184459454 ns/iter (± 8738171) 2225240826 ns/iter (± 9019324) 0.98
es/minify/libraries/victory 467913740 ns/iter (± 1126304) 468551206 ns/iter (± 10829534) 1.00
es/minify/libraries/vue 105333693 ns/iter (± 263659) 106668535 ns/iter (± 352153) 0.99
es/visitor/compare/clone 1950087 ns/iter (± 8466) 1951922 ns/iter (± 12371) 1.00
es/visitor/compare/visit_mut_span 2260405 ns/iter (± 3484) 2283128 ns/iter (± 31791) 0.99
es/visitor/compare/visit_mut_span_panic 2311991 ns/iter (± 1986) 2328793 ns/iter (± 3145) 0.99
es/visitor/compare/fold_span 3329759 ns/iter (± 5482) 3392756 ns/iter (± 8169) 0.98
es/visitor/compare/fold_span_panic 3496985 ns/iter (± 6867) 3524562 ns/iter (± 5312) 0.99
es/lexer/colors 13039 ns/iter (± 9) 13025 ns/iter (± 32) 1.00
es/lexer/angular 6079440 ns/iter (± 3935) 6034211 ns/iter (± 1722) 1.01
es/lexer/backbone 787542 ns/iter (± 1609) 785455 ns/iter (± 1865) 1.00
es/lexer/jquery 4480607 ns/iter (± 3942) 4449954 ns/iter (± 6708) 1.01
es/lexer/jquery mobile 6852983 ns/iter (± 14544) 6831372 ns/iter (± 4718) 1.00
es/lexer/mootools 3556743 ns/iter (± 2937) 3555412 ns/iter (± 2882) 1.00
es/lexer/underscore 663742 ns/iter (± 1943) 657245 ns/iter (± 276) 1.01
es/lexer/three 21488264 ns/iter (± 9321) 21253163 ns/iter (± 16819) 1.01
es/lexer/yui 3850876 ns/iter (± 3933) 3825512 ns/iter (± 2512) 1.01
es/parser/colors 27127 ns/iter (± 52) 28025 ns/iter (± 63) 0.97
es/parser/angular 13422093 ns/iter (± 48910) 13599637 ns/iter (± 70818) 0.99
es/parser/backbone 1960763 ns/iter (± 14235) 1996560 ns/iter (± 8473) 0.98
es/parser/jquery 10717540 ns/iter (± 48012) 10890970 ns/iter (± 41498) 0.98
es/parser/jquery mobile 16493680 ns/iter (± 65033) 16703974 ns/iter (± 87391) 0.99
es/parser/mootools 8257864 ns/iter (± 17409) 8389579 ns/iter (± 14416) 0.98
es/parser/underscore 1696468 ns/iter (± 9071) 1719562 ns/iter (± 8824) 0.99
es/parser/three 46103985 ns/iter (± 104683) 46748590 ns/iter (± 93375) 0.99
es/parser/yui 8234280 ns/iter (± 40936) 8292622 ns/iter (± 29405) 0.99
es/preset-env/usage/builtin_type 137466 ns/iter (± 32637) 137942 ns/iter (± 32867) 1.00
es/preset-env/usage/property 16914 ns/iter (± 29) 16595 ns/iter (± 64) 1.02
es/resolver/typescript 88794346 ns/iter (± 1046854) 90878950 ns/iter (± 761530) 0.98
es/fixer/typescript 63467963 ns/iter (± 540378) 63874927 ns/iter (± 657112) 0.99
es/hygiene/typescript 130006671 ns/iter (± 1025850) 130552054 ns/iter (± 555814) 1.00
es/resolver_with_hygiene/typescript 242761061 ns/iter (± 2385110) 240644468 ns/iter (± 1030574) 1.01
es/visitor/base-perf/module_clone 58491 ns/iter (± 361) 58793 ns/iter (± 1248) 0.99
es/visitor/base-perf/fold_empty 62857 ns/iter (± 320) 62573 ns/iter (± 495) 1.00
es/visitor/base-perf/fold_noop_impl_all 63024 ns/iter (± 280) 63838 ns/iter (± 219) 0.99
es/visitor/base-perf/fold_noop_impl_vec 62988 ns/iter (± 384) 63880 ns/iter (± 160) 0.99
es/visitor/base-perf/boxing_boxed_clone 56 ns/iter (± 0) 56 ns/iter (± 0) 1
es/visitor/base-perf/boxing_unboxed_clone 42 ns/iter (± 0) 40 ns/iter (± 0) 1.05
es/visitor/base-perf/boxing_boxed 107 ns/iter (± 0) 106 ns/iter (± 0) 1.01
es/visitor/base-perf/boxing_unboxed 77 ns/iter (± 0) 76 ns/iter (± 0) 1.01
es/visitor/base-perf/visit_empty 0 ns/iter (± 0) 0 ns/iter (± 0) NaN
es/visitor/base-perf/visit_contains_this 2523 ns/iter (± 45) 2509 ns/iter (± 15) 1.01
es/base/parallel/resolver/typescript 3895339782 ns/iter (± 301217749) 3762004552 ns/iter (± 229125836) 1.04
es/base/parallel/hygiene/typescript 1464736766 ns/iter (± 31208135) 1461261398 ns/iter (± 28268064) 1.00
misc/visitors/time-complexity/time 5 153 ns/iter (± 3) 150 ns/iter (± 2) 1.02
misc/visitors/time-complexity/time 10 421 ns/iter (± 1) 421 ns/iter (± 31) 1
misc/visitors/time-complexity/time 15 772 ns/iter (± 54) 798 ns/iter (± 100) 0.97
misc/visitors/time-complexity/time 20 1283 ns/iter (± 1) 1438 ns/iter (± 4) 0.89
misc/visitors/time-complexity/time 40 4329 ns/iter (± 6) 4348 ns/iter (± 249) 1.00
misc/visitors/time-complexity/time 60 9041 ns/iter (± 9) 9007 ns/iter (± 311) 1.00
es/full-target/es2016 235957 ns/iter (± 4063) 234651 ns/iter (± 1032) 1.01
es/full-target/es2017 223260 ns/iter (± 603) 223578 ns/iter (± 1045) 1.00
es/full-target/es2018 212141 ns/iter (± 537) 211793 ns/iter (± 496) 1.00
es2020_nullish_coalescing 70941 ns/iter (± 474) 72506 ns/iter (± 532) 0.98
es2020_optional_chaining 78927 ns/iter (± 348) 80812 ns/iter (± 231) 0.98
es2022_class_properties 115915 ns/iter (± 637) 118033 ns/iter (± 349) 0.98
es2018_object_rest_spread 74484 ns/iter (± 346) 77315 ns/iter (± 310) 0.96
es2019_optional_catch_binding 64899 ns/iter (± 246) 65820 ns/iter (± 428) 0.99
es2017_async_to_generator 64201 ns/iter (± 229) 65821 ns/iter (± 227) 0.98
es2016_exponentiation 68017 ns/iter (± 216) 69712 ns/iter (± 223) 0.98
es2015_arrow 71897 ns/iter (± 174) 72921 ns/iter (± 816) 0.99
es2015_block_scoped_fn 68167 ns/iter (± 777) 69639 ns/iter (± 200) 0.98
es2015_block_scoping 123398 ns/iter (± 639) 124870 ns/iter (± 4168) 0.99

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.