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 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
- [jsdocs-src]: https://img.shields.io/badge/jsdocs-reference-080f12?style=flat&colorA=080f12&colorB=1fa669
110
- [jsdocs-href]: https://www.jsdocs.io/package/robuild
135
+ [coverage-src]: https://img.shields.io/badge/coverage-30.9%25-orange?style=flat&colorA=080f12
136
+ [coverage-href]: #test-coverage
@@ -0,0 +1,3 @@
1
+ import { n as performBuild, t as build } from "./build-ZPgEqYgE.mjs";
2
+
3
+ export { performBuild };
@@ -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-BKisdK3B.mjs");
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.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": "^3.0.4",
44
+ "c12": "4.0.0-beta.2",
45
45
  "cac": "^6.7.14",
46
- "chokidar": "^3.0.3",
46
+ "chokidar": "^5.0.0",
47
47
  "consola": "^3.4.2",
48
- "exsolve": "^1.0.5",
49
- "glob": "^11.0.3",
50
- "js-yaml": "^4.1.0",
51
- "magic-string": "^0.30.17",
52
- "minimatch": "^10.0.3",
53
- "oxc-minify": "^0.98.0",
54
- "oxc-parser": "^0.98.0",
55
- "oxc-transform": "^0.98.0",
56
- "pretty-bytes": "^7.0.1",
57
- "rolldown": "1.0.0-rc.3",
58
- "rolldown-plugin-dts": "^0.16.5",
59
- "tinyglobby": "^0.2.14",
60
- "typescript": "^5.8.3"
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": "^5.3.0",
63
+ "@antfu/eslint-config": "^7.4.3",
64
64
  "@types/js-yaml": "^4.0.9",
65
- "@types/node": "^24.4.0",
66
- "@vitest/coverage-v8": "^3.2.2",
67
- "automd": "^0.4.0",
68
- "changelogen": "^0.6.1",
69
- "eslint": "^9.28.0",
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.5.3",
72
+ "prettier": "^3.8.1",
73
73
  "turbo": "^2.8.7",
74
- "vitepress": "^1.6.3",
75
- "vitest": "^3.2.2"
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-D6PKwgm3.mjs";
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
@@ -5,7 +5,6 @@ import { MinifyOptions as MinifyOptions$1 } from "oxc-minify";
5
5
  import { TransformOptions } from "oxc-transform";
6
6
 
7
7
  //#region src/types.d.ts
8
-
9
8
  /**
10
9
  * Target platform
11
10
  */
package/dist/index.d.mts CHANGED
@@ -8,7 +8,6 @@ import { Plugin } from "rolldown";
8
8
  declare function build(config: BuildConfig): Promise<void>;
9
9
  //#endregion
10
10
  //#region src/plugins/builtin/cjs-default.d.ts
11
-
12
11
  /**
13
12
  * Create CJS default export handling plugin
14
13
  */
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-D6PKwgm3.mjs";
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.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": "^3.0.4",
45
+ "c12": "4.0.0-beta.2",
46
46
  "cac": "^6.7.14",
47
- "chokidar": "^3.0.3",
47
+ "chokidar": "^5.0.0",
48
48
  "consola": "^3.4.2",
49
- "exsolve": "^1.0.5",
50
- "glob": "^11.0.3",
51
- "js-yaml": "^4.1.0",
52
- "magic-string": "^0.30.17",
53
- "minimatch": "^10.0.3",
54
- "oxc-minify": "^0.98.0",
55
- "oxc-parser": "^0.98.0",
56
- "oxc-transform": "^0.98.0",
57
- "pretty-bytes": "^7.0.1",
58
- "rolldown": "1.0.0-rc.3",
59
- "rolldown-plugin-dts": "^0.16.5",
60
- "tinyglobby": "^0.2.14",
61
- "typescript": "^5.8.3"
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": "^5.3.0",
64
+ "@antfu/eslint-config": "^7.4.3",
65
65
  "@types/js-yaml": "^4.0.9",
66
- "@types/node": "^24.4.0",
67
- "@vitest/coverage-v8": "^3.2.2",
68
- "automd": "^0.4.0",
69
- "changelogen": "^0.6.1",
70
- "eslint": "^9.28.0",
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.5.3",
73
+ "prettier": "^3.8.1",
74
74
  "turbo": "^2.8.7",
75
- "vitepress": "^1.6.3",
76
- "vitest": "^3.2.2"
75
+ "vitepress": "^1.6.4",
76
+ "vitest": "^4.0.18"
77
77
  }
78
78
  }
@@ -1,3 +0,0 @@
1
- import { n as performBuild, t as build } from "./build-D6PKwgm3.mjs";
2
-
3
- export { performBuild };