robuild 0.1.1 → 0.1.2
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 +31 -5
- package/dist/_chunks/build-DsVOIGdc.mjs +3 -0
- package/dist/_chunks/{build-D6PKwgm3.mjs → build-ZPgEqYgE.mjs} +4 -3
- package/dist/_chunks/{package-BJHhPF4v.mjs → package-Cq3r5Qfx.mjs} +26 -26
- package/dist/cli.mjs +1 -1
- package/dist/config.d.mts +0 -1
- package/dist/index.d.mts +0 -1
- package/dist/index.mjs +1 -1
- package/package.json +26 -26
- package/dist/_chunks/build-BKisdK3B.mjs +0 -3
package/README.md
CHANGED
|
@@ -6,9 +6,8 @@
|
|
|
6
6
|
|
|
7
7
|
[![npm version][npm-version-src]][npm-version-href]
|
|
8
8
|
[![npm downloads][npm-downloads-src]][npm-downloads-href]
|
|
9
|
-
[![bundle][bundle-src]][bundle-href]
|
|
10
|
-
[![JSDocs][jsdocs-src]][jsdocs-href]
|
|
11
9
|
[![License][license-src]][license-href]
|
|
10
|
+
[![Coverage][coverage-src]][coverage-href]
|
|
12
11
|
|
|
13
12
|
English | <a href="./README-zh.md">简体中文</a>
|
|
14
13
|
|
|
@@ -93,6 +92,34 @@ Visit our documentation site for detailed guides, API reference, and examples.
|
|
|
93
92
|
- [unbuild](https://github.com/unjs/unbuild): Stable solution based on rollup and [mkdist](https://github.com/unjs/mkdist).
|
|
94
93
|
- [tsdown](https://tsdown.dev/): Alternative bundler based on rolldown.
|
|
95
94
|
|
|
95
|
+
## Test Coverage
|
|
96
|
+
|
|
97
|
+
<!-- coverage-start -->
|
|
98
|
+
| File | Stmts | Branch | Funcs | Lines |
|
|
99
|
+
|------|-------|--------|-------|-------|
|
|
100
|
+
| **All files** | **30.90%** | **64.07%** | **51.02%** | **30.90%** |
|
|
101
|
+
| src/build.ts | 70.93% | 55.56% | 100.00% | 70.93% |
|
|
102
|
+
| src/builders | 58.78% | 57.38% | 41.18% | 58.78% |
|
|
103
|
+
| src/config | 19.62% | 65.00% | 46.67% | 19.62% |
|
|
104
|
+
| src/config.ts | 0.00% | 100.00% | 100.00% | 0.00% |
|
|
105
|
+
| src/core | 63.86% | 90.91% | 50.00% | 63.86% |
|
|
106
|
+
| src/deprecated | 0.00% | 100.00% | 100.00% | 0.00% |
|
|
107
|
+
| src/index.ts | 0.00% | 0.00% | 0.00% | 0.00% |
|
|
108
|
+
| src/plugins | 13.62% | 68.75% | 47.37% | 13.62% |
|
|
109
|
+
| src/plugins/builtin | 7.65% | 92.31% | 23.33% | 7.65% |
|
|
110
|
+
| src/plugins/extras | 0.00% | 100.00% | 100.00% | 0.00% |
|
|
111
|
+
| src/transforms | 16.94% | 78.95% | 66.67% | 16.94% |
|
|
112
|
+
| src/types.ts | 0.00% | 100.00% | 100.00% | 0.00% |
|
|
113
|
+
| src/utils | 75.87% | 62.50% | 77.27% | 75.87% |
|
|
114
|
+
| src/watch.ts | 4.24% | 0.00% | 0.00% | 4.24% |
|
|
115
|
+
<!-- coverage-end -->
|
|
116
|
+
|
|
117
|
+
Run coverage locally:
|
|
118
|
+
|
|
119
|
+
```sh
|
|
120
|
+
pnpm test:coverage
|
|
121
|
+
```
|
|
122
|
+
|
|
96
123
|
## License
|
|
97
124
|
|
|
98
125
|
💛 [MIT](./LICENSE) License © [Sunny-117](https://github.com/Sunny-117)
|
|
@@ -102,9 +129,8 @@ Visit our documentation site for detailed guides, API reference, and examples.
|
|
|
102
129
|
[npm-version-href]: https://npmjs.com/package/robuild
|
|
103
130
|
[npm-downloads-src]: https://img.shields.io/npm/dm/robuild?style=flat&colorA=080f12&colorB=1fa669
|
|
104
131
|
[npm-downloads-href]: https://npmjs.com/package/robuild
|
|
105
|
-
[bundle-src]: https://img.shields.io/bundlephobia/minzip/robuild?style=flat&colorA=080f12&colorB=1fa669&label=minzip
|
|
106
132
|
[bundle-href]: https://bundlephobia.com/result?p=robuild
|
|
107
133
|
[license-src]: https://img.shields.io/github/license/Sunny-117/robuild.svg?style=flat&colorA=080f12&colorB=1fa669
|
|
108
134
|
[license-href]: https://github.com/Sunny-117/robuild/blob/main/LICENSE
|
|
109
|
-
[
|
|
110
|
-
[
|
|
135
|
+
[coverage-src]: https://img.shields.io/badge/coverage-30.9%25-orange?style=flat&colorA=080f12
|
|
136
|
+
[coverage-href]: #test-coverage
|
|
@@ -465,9 +465,10 @@ function hasValidInput(entry) {
|
|
|
465
465
|
* This is the shared logic used by both bundle and watch modes.
|
|
466
466
|
*/
|
|
467
467
|
function buildExternalDeps(ctx) {
|
|
468
|
+
const excludedBuiltins = new Set(["module"]);
|
|
468
469
|
return [
|
|
469
|
-
...builtinModules,
|
|
470
|
-
...builtinModules.map((m) => `node:${m}`),
|
|
470
|
+
...builtinModules.filter((m) => !excludedBuiltins.has(m)),
|
|
471
|
+
...builtinModules.filter((m) => !excludedBuiltins.has(m)).map((m) => `node:${m}`),
|
|
471
472
|
...[...Object.keys(ctx.pkg.dependencies || {}), ...Object.keys(ctx.pkg.peerDependencies || {})].flatMap((p) => [p, new RegExp(`^${p}/`)])
|
|
472
473
|
];
|
|
473
474
|
}
|
|
@@ -1618,7 +1619,7 @@ function createBuildResult(entries, startTime) {
|
|
|
1618
1619
|
* Perform watch build using rolldown's built-in watch mode
|
|
1619
1620
|
*/
|
|
1620
1621
|
async function performWatchBuild(config, ctx, startTime) {
|
|
1621
|
-
const { performBuild } = await import("./build-
|
|
1622
|
+
const { performBuild } = await import("./build-DsVOIGdc.mjs");
|
|
1622
1623
|
await performBuild(config, ctx, startTime);
|
|
1623
1624
|
const bundleEntries = (config.entries || []).filter((entry) => {
|
|
1624
1625
|
if (typeof entry === "string") return !entry.endsWith("/");
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
var package_default = {
|
|
3
3
|
name: "robuild",
|
|
4
4
|
type: "module",
|
|
5
|
-
version: "0.1.
|
|
5
|
+
version: "0.1.2",
|
|
6
6
|
packageManager: "pnpm@10.11.1",
|
|
7
7
|
description: "Zero-config ESM/TS package builder. Powered by Rolldown and Oxc",
|
|
8
8
|
license: "MIT",
|
|
@@ -29,7 +29,7 @@ var package_default = {
|
|
|
29
29
|
"test:raw": "vitest run",
|
|
30
30
|
"test:watch": "vitest",
|
|
31
31
|
"test:coverage": "turbo test:coverage:raw --filter=robuild",
|
|
32
|
-
"test:coverage:raw": "vitest run --coverage",
|
|
32
|
+
"test:coverage:raw": "vitest run --coverage && node scripts/update-coverage.mjs",
|
|
33
33
|
"test:coverage:watch": "vitest --coverage",
|
|
34
34
|
"test:ui": "vitest --ui",
|
|
35
35
|
"test:types": "tsc --noEmit --skipLibCheck src/**/*.ts",
|
|
@@ -41,38 +41,38 @@ var package_default = {
|
|
|
41
41
|
"clean": "rm -rf .turbo dist coverage"
|
|
42
42
|
},
|
|
43
43
|
dependencies: {
|
|
44
|
-
"c12": "
|
|
44
|
+
"c12": "4.0.0-beta.2",
|
|
45
45
|
"cac": "^6.7.14",
|
|
46
|
-
"chokidar": "^
|
|
46
|
+
"chokidar": "^5.0.0",
|
|
47
47
|
"consola": "^3.4.2",
|
|
48
|
-
"exsolve": "^1.0.
|
|
49
|
-
"glob": "^
|
|
50
|
-
"js-yaml": "^4.1.
|
|
51
|
-
"magic-string": "^0.30.
|
|
52
|
-
"minimatch": "^10.0
|
|
53
|
-
"oxc-minify": "^0.
|
|
54
|
-
"oxc-parser": "^0.
|
|
55
|
-
"oxc-transform": "^0.
|
|
56
|
-
"pretty-bytes": "^7.0
|
|
57
|
-
"rolldown": "1.0.0-rc.
|
|
58
|
-
"rolldown-plugin-dts": "^0.
|
|
59
|
-
"tinyglobby": "^0.2.
|
|
60
|
-
"typescript": "^5.
|
|
48
|
+
"exsolve": "^1.0.8",
|
|
49
|
+
"glob": "^13.0.3",
|
|
50
|
+
"js-yaml": "^4.1.1",
|
|
51
|
+
"magic-string": "^0.30.21",
|
|
52
|
+
"minimatch": "^10.2.0",
|
|
53
|
+
"oxc-minify": "^0.112.0",
|
|
54
|
+
"oxc-parser": "^0.112.0",
|
|
55
|
+
"oxc-transform": "^0.112.0",
|
|
56
|
+
"pretty-bytes": "^7.1.0",
|
|
57
|
+
"rolldown": "1.0.0-rc.4",
|
|
58
|
+
"rolldown-plugin-dts": "^0.22.1",
|
|
59
|
+
"tinyglobby": "^0.2.15",
|
|
60
|
+
"typescript": "^5.9.3"
|
|
61
61
|
},
|
|
62
62
|
devDependencies: {
|
|
63
|
-
"@antfu/eslint-config": "^
|
|
63
|
+
"@antfu/eslint-config": "^7.4.3",
|
|
64
64
|
"@types/js-yaml": "^4.0.9",
|
|
65
|
-
"@types/node": "^
|
|
66
|
-
"@vitest/coverage-v8": "^
|
|
67
|
-
"automd": "^0.4.
|
|
68
|
-
"changelogen": "^0.6.
|
|
69
|
-
"eslint": "^
|
|
65
|
+
"@types/node": "^25.2.3",
|
|
66
|
+
"@vitest/coverage-v8": "^4.0.18",
|
|
67
|
+
"automd": "^0.4.3",
|
|
68
|
+
"changelogen": "^0.6.2",
|
|
69
|
+
"eslint": "^10.0.0",
|
|
70
70
|
"esno": "^4.8.0",
|
|
71
71
|
"git-cz": "^4.9.0",
|
|
72
|
-
"prettier": "^3.
|
|
72
|
+
"prettier": "^3.8.1",
|
|
73
73
|
"turbo": "^2.8.7",
|
|
74
|
-
"vitepress": "^1.6.
|
|
75
|
-
"vitest": "^
|
|
74
|
+
"vitepress": "^1.6.4",
|
|
75
|
+
"vitest": "^4.0.18"
|
|
76
76
|
}
|
|
77
77
|
};
|
|
78
78
|
|
package/dist/cli.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { g as logger, h as configureLogger, t as build } from "./_chunks/build-
|
|
2
|
+
import { g as logger, h as configureLogger, t as build } from "./_chunks/build-ZPgEqYgE.mjs";
|
|
3
3
|
import { colors } from "consola/utils";
|
|
4
4
|
import process from "node:process";
|
|
5
5
|
import { loadConfig } from "c12";
|
package/dist/config.d.mts
CHANGED
package/dist/index.d.mts
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as createBrowserShimsPlugin, c as SHEBANG_RE, d as shebangPlugin, f as nodeProtocolPlugin, g as logger, i as DEFAULT_SHIMS_CONFIG, l as hasShebang, m as hasGlobImports, o as createNodeShimsPlugin, p as createGlobImportPlugin, r as createSkipNodeModulesPlugin, s as createShimsPlugin, t as build, u as makeExecutable } from "./_chunks/build-
|
|
1
|
+
import { a as createBrowserShimsPlugin, c as SHEBANG_RE, d as shebangPlugin, f as nodeProtocolPlugin, g as logger, i as DEFAULT_SHIMS_CONFIG, l as hasShebang, m as hasGlobImports, o as createNodeShimsPlugin, p as createGlobImportPlugin, r as createSkipNodeModulesPlugin, s as createShimsPlugin, t as build, u as makeExecutable } from "./_chunks/build-ZPgEqYgE.mjs";
|
|
2
2
|
import { t as RobuildPluginManager } from "./_chunks/manager-DyYf90Z5.mjs";
|
|
3
3
|
import { defineConfig } from "./config.mjs";
|
|
4
4
|
import { extname } from "node:path";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "robuild",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.2",
|
|
5
5
|
"packageManager": "pnpm@10.11.1",
|
|
6
6
|
"description": "Zero-config ESM/TS package builder. Powered by Rolldown and Oxc",
|
|
7
7
|
"license": "MIT",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"test:raw": "vitest run",
|
|
31
31
|
"test:watch": "vitest",
|
|
32
32
|
"test:coverage": "turbo test:coverage:raw --filter=robuild",
|
|
33
|
-
"test:coverage:raw": "vitest run --coverage",
|
|
33
|
+
"test:coverage:raw": "vitest run --coverage && node scripts/update-coverage.mjs",
|
|
34
34
|
"test:coverage:watch": "vitest --coverage",
|
|
35
35
|
"test:ui": "vitest --ui",
|
|
36
36
|
"test:types": "tsc --noEmit --skipLibCheck src/**/*.ts",
|
|
@@ -42,37 +42,37 @@
|
|
|
42
42
|
"clean": "rm -rf .turbo dist coverage"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"c12": "
|
|
45
|
+
"c12": "4.0.0-beta.2",
|
|
46
46
|
"cac": "^6.7.14",
|
|
47
|
-
"chokidar": "^
|
|
47
|
+
"chokidar": "^5.0.0",
|
|
48
48
|
"consola": "^3.4.2",
|
|
49
|
-
"exsolve": "^1.0.
|
|
50
|
-
"glob": "^
|
|
51
|
-
"js-yaml": "^4.1.
|
|
52
|
-
"magic-string": "^0.30.
|
|
53
|
-
"minimatch": "^10.0
|
|
54
|
-
"oxc-minify": "^0.
|
|
55
|
-
"oxc-parser": "^0.
|
|
56
|
-
"oxc-transform": "^0.
|
|
57
|
-
"pretty-bytes": "^7.0
|
|
58
|
-
"rolldown": "1.0.0-rc.
|
|
59
|
-
"rolldown-plugin-dts": "^0.
|
|
60
|
-
"tinyglobby": "^0.2.
|
|
61
|
-
"typescript": "^5.
|
|
49
|
+
"exsolve": "^1.0.8",
|
|
50
|
+
"glob": "^13.0.3",
|
|
51
|
+
"js-yaml": "^4.1.1",
|
|
52
|
+
"magic-string": "^0.30.21",
|
|
53
|
+
"minimatch": "^10.2.0",
|
|
54
|
+
"oxc-minify": "^0.112.0",
|
|
55
|
+
"oxc-parser": "^0.112.0",
|
|
56
|
+
"oxc-transform": "^0.112.0",
|
|
57
|
+
"pretty-bytes": "^7.1.0",
|
|
58
|
+
"rolldown": "1.0.0-rc.4",
|
|
59
|
+
"rolldown-plugin-dts": "^0.22.1",
|
|
60
|
+
"tinyglobby": "^0.2.15",
|
|
61
|
+
"typescript": "^5.9.3"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
|
-
"@antfu/eslint-config": "^
|
|
64
|
+
"@antfu/eslint-config": "^7.4.3",
|
|
65
65
|
"@types/js-yaml": "^4.0.9",
|
|
66
|
-
"@types/node": "^
|
|
67
|
-
"@vitest/coverage-v8": "^
|
|
68
|
-
"automd": "^0.4.
|
|
69
|
-
"changelogen": "^0.6.
|
|
70
|
-
"eslint": "^
|
|
66
|
+
"@types/node": "^25.2.3",
|
|
67
|
+
"@vitest/coverage-v8": "^4.0.18",
|
|
68
|
+
"automd": "^0.4.3",
|
|
69
|
+
"changelogen": "^0.6.2",
|
|
70
|
+
"eslint": "^10.0.0",
|
|
71
71
|
"esno": "^4.8.0",
|
|
72
72
|
"git-cz": "^4.9.0",
|
|
73
|
-
"prettier": "^3.
|
|
73
|
+
"prettier": "^3.8.1",
|
|
74
74
|
"turbo": "^2.8.7",
|
|
75
|
-
"vitepress": "^1.6.
|
|
76
|
-
"vitest": "^
|
|
75
|
+
"vitepress": "^1.6.4",
|
|
76
|
+
"vitest": "^4.0.18"
|
|
77
77
|
}
|
|
78
78
|
}
|