rolldown-require 2.0.11 → 2.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/index.mjs +5 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -139,14 +139,14 @@ unrun | avg 64.54ms | median 50.02ms | deps 201 | rssΔ median 1.33
|
|
|
139
139
|
|
|
140
140
|
Notes:
|
|
141
141
|
|
|
142
|
-
- Fixtures are synthetic TS module graphs (static and mixed dynamic imports) generated in `
|
|
142
|
+
- Fixtures are synthetic TS module graphs (static and mixed dynamic imports) generated in `benchmarks/rolldown-require-bench/benchmark/index.mjs`.
|
|
143
143
|
- Each unrun iteration clears `.unrun` caches to force cold runs. Use `BENCH_ITERATIONS` to change repetitions.
|
|
144
144
|
|
|
145
145
|
### Takeaways
|
|
146
146
|
|
|
147
147
|
- With 10 cold iterations on synthetic graphs, rolldown-require remains generally faster (avg/median) across scenarios; unrun shows lower RSS deltas.
|
|
148
148
|
- Dependency counts align (same or near-same), indicating comparable graph coverage.
|
|
149
|
-
- Numbers come from `
|
|
149
|
+
- Numbers come from `benchmarks/rolldown-require-bench/benchmark/index.mjs` on M3/Node 22.21.1; rerun on your workloads for final decisions.
|
|
150
150
|
|
|
151
151
|
### Cache
|
|
152
152
|
|
package/dist/index.mjs
CHANGED
|
@@ -32,7 +32,11 @@ function collectReferencedModules(bundle, fileName, allModules, analyzedModules
|
|
|
32
32
|
}
|
|
33
33
|
//#endregion
|
|
34
34
|
//#region src/constants.ts
|
|
35
|
-
const
|
|
35
|
+
const BOM_RE = /^\uFEFF/;
|
|
36
|
+
function stripBom(value) {
|
|
37
|
+
return value.replace(BOM_RE, "");
|
|
38
|
+
}
|
|
39
|
+
const { version } = JSON.parse(stripBom(readFileSync(new URL("../package.json", import.meta.url), "utf8")));
|
|
36
40
|
if (process.versions.pnp) try {
|
|
37
41
|
createRequire(import.meta.url)("pnpapi");
|
|
38
42
|
} catch {}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rolldown-require",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.13",
|
|
5
5
|
"description": "bundle and require a file using rolldown!",
|
|
6
6
|
"author": "ice breaker <1324318532@qq.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"node": "^20.19.0 || >=22.12.0"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
|
-
"rolldown": "1.0.0-rc.
|
|
51
|
+
"rolldown": "1.0.0-rc.15"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"@rollup/pluginutils": "^5.3.0",
|