@voidzero-dev/vite-plus-core 0.2.6 → 0.2.8
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/LICENSE +35 -0
- package/dist/rolldown/cli.mjs +9 -10
- package/dist/rolldown/config.d.mts +1 -1
- package/dist/rolldown/config.mjs +2 -2
- package/dist/rolldown/experimental-default-runtime.mjs +116 -0
- package/dist/rolldown/experimental-index.d.mts +10 -4
- package/dist/rolldown/experimental-index.mjs +32 -16
- package/dist/rolldown/experimental-runtime-base.mjs +95 -0
- package/dist/rolldown/experimental-runtime.d.ts +177 -0
- package/dist/rolldown/experimental-runtime.mjs +257 -0
- package/dist/rolldown/filter-index.d.mts +1 -1
- package/dist/rolldown/filter-index.mjs +1 -3
- package/dist/rolldown/index.d.mts +3 -3
- package/dist/rolldown/index.mjs +4 -4
- package/dist/rolldown/parallel-plugin-worker.mjs +3 -3
- package/dist/rolldown/parallel-plugin.d.mts +1 -1
- package/dist/rolldown/parse-ast-index.d.mts +1 -1
- package/dist/rolldown/parse-ast-index.mjs +2 -2
- package/dist/rolldown/plugins-index.d.mts +3 -3
- package/dist/rolldown/plugins-index.mjs +2 -2
- package/dist/rolldown/shared/{binding-Dbbi0RbO.d.mts → binding-CVtkJvyl.d.mts} +11 -0
- package/dist/rolldown/shared/{binding-Dby9rwGk.mjs → binding-DwUQWZOo.mjs} +178 -104
- package/dist/rolldown/shared/{bindingify-input-options-DVQ4K-zY.mjs → bindingify-input-options-B03y7DfJ.mjs} +448 -268
- package/dist/rolldown/shared/{constructors-CSWbNgBZ.d.mts → constructors-ALilxAii.d.mts} +2 -2
- package/dist/rolldown/shared/{constructors-CuGa75s-.mjs → constructors-COwFYQna.mjs} +10 -6
- package/dist/rolldown/shared/{rolldown-build-BGXNOfvH.mjs → create-bundler-option-B-tSTZRt.mjs} +72 -179
- package/dist/rolldown/shared/{define-config-B-IDOhDz.d.mts → define-config-DSMNXceb.d.mts} +85 -22
- package/dist/rolldown/shared/{error-DFGNOCle.mjs → error-nLggAzpQ.mjs} +1 -1
- package/dist/rolldown/shared/{load-config-R0z2olkB.mjs → load-config-O4G7NVNA.mjs} +2 -2
- package/dist/rolldown/shared/{logs-ZGEh6uhb.mjs → logs-DmYCAKcW.mjs} +8 -1
- package/dist/rolldown/shared/{misc-CoQm4NHO.mjs → misc-DOSKtd97.mjs} +9 -1
- package/dist/rolldown/shared/{normalize-string-or-regex-SiXbePVH.mjs → normalize-string-or-regex-Cj-DgIV1.mjs} +2 -2
- package/dist/rolldown/shared/{parse-D5dkElpf.mjs → parse-CQfUbVuN.mjs} +2 -2
- package/dist/rolldown/shared/{prompt-pZFoa1TT.mjs → prompt-uaCPq0_A.mjs} +2 -6
- package/dist/rolldown/shared/{resolve-tsconfig-2TXRF_zr.mjs → resolve-tsconfig-CE3HNSOK.mjs} +2 -2
- package/dist/rolldown/shared/rolldown-qV_fUwyM.mjs +178 -0
- package/dist/rolldown/shared/{transform-Cs2bUDRH.d.mts → transform-WmU_cI8e.d.mts} +1 -1
- package/dist/rolldown/shared/{watch-DVucf-VG.mjs → watch-BNIsji74.mjs} +16 -13
- package/dist/rolldown/utils-index.d.mts +3 -3
- package/dist/rolldown/utils-index.mjs +5 -5
- package/dist/tsdown/{build-oq13wECG-Bymq3jT5.js → build-D_enfyvD-X5SFXZZc.js} +30 -28
- package/dist/tsdown/{debug-BntVTkRq-BGIoAiTa.js → debug-CKcBYQLP-avlAPNcV.js} +5 -7
- package/dist/tsdown/{detect-DGhJGEqb-S-tkSzpt.js → detect-DGhJGEqb-CGd2brAW.js} +1 -1
- package/dist/tsdown/{dist-CxIM8o7n.js → dist-BZO8q3c0.js} +48 -12
- package/dist/tsdown/{dist-DCMiHFrJ.js → dist-CMKwGGNp.js} +1 -3
- package/dist/tsdown/index-types.d.ts +21 -11
- package/dist/tsdown/index.js +4 -4
- package/dist/tsdown/internal-DyaNxVWW.js +3 -0
- package/dist/tsdown/{main-BdzlWPt6.js → main-Jz_9T-KA.js} +18 -10
- package/dist/tsdown/npm_entry_picomatch.cjs +1 -1
- package/dist/tsdown/npm_entry_tree-kill.cjs +11 -13
- package/dist/tsdown/{resolver-cwLsPb2o-oj1hqxK6.js → resolver-cwLsPb2o-BqQjnCbF.js} +3 -3
- package/dist/tsdown/run.js +5 -5
- package/dist/tsdown/{src-BV-UJr_R.js → src-D5keKqGd.js} +5 -5
- package/dist/tsdown/{target-CNxIDvSz-eoHNdJNs.js → target-Bab3CUeB-CERZYTwS.js} +34 -28
- package/dist/tsdown/{tsc-zcbB6ZVY.js → tsc-DmzrnJwy.js} +4 -5
- package/dist/tsdown/tsdown-css.js +13 -16
- package/dist/tsdown/tsdown-exe.js +4 -4
- package/dist/vite/client/bundledDevClient.mjs +1465 -0
- package/dist/vite/client/client.mjs +51 -82
- package/dist/vite/node/chunks/build.js +47 -43
- package/dist/vite/node/chunks/dist.js +26 -85
- package/dist/vite/node/chunks/dist2.js +5 -10
- package/dist/vite/node/chunks/node.js +2728 -2311
- package/dist/vite/node/chunks/postcss-import.js +10 -10
- package/dist/vite/node/index.d.ts +68 -14
- package/dist/vite/node/module-runner.js +21 -11
- package/dist/vite/types/customEvent.d.ts +3 -1
- package/dist/vite/types/hmrPayload.d.ts +20 -6
- package/package.json +32 -18
- package/dist/rolldown/shared/rolldown-BnV7isAX.mjs +0 -40
- package/dist/tsdown/internal-C7ewSPAZ.js +0 -3
- package/dist/tsdown/load-tsc-BKULZsrs-BFmeD6Bu.js +0 -18
- package/dist/tsdown/tsc-context-CA76SkkZ.js +0 -23
package/dist/tsdown/run.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { c as blue, f as hex, t as R } from "./main-
|
|
3
|
-
import { c as globalLogger, n as version, t as enableDebug } from "./debug-
|
|
2
|
+
import { c as blue, f as hex, t as R } from "./main-Jz_9T-KA.js";
|
|
3
|
+
import { c as globalLogger, n as version, t as enableDebug } from "./debug-CKcBYQLP-avlAPNcV.js";
|
|
4
4
|
import module from "node:module";
|
|
5
5
|
import process$1 from "node:process";
|
|
6
6
|
import { VERSION } from "@voidzero-dev/vite-plus-core/rolldown";
|
|
@@ -622,16 +622,16 @@ var CAC = class extends EventTarget {
|
|
|
622
622
|
*/
|
|
623
623
|
const cac = (name = "") => new CAC(name);
|
|
624
624
|
//#endregion
|
|
625
|
-
//#region ../../node_modules/.pnpm/tsdown@0.22.
|
|
625
|
+
//#region ../../node_modules/.pnpm/tsdown@0.22.14_@arethetypeswrong+core@0.18.2_@tsdown+css@0.22.14_@tsdown+exe@0.22.14_@t_3f66331a323f6503c9462b3ef80883b8/node_modules/tsdown/dist/run.mjs
|
|
626
626
|
const cli = cac("tsdown");
|
|
627
627
|
cli.help().version(version);
|
|
628
628
|
cli.command("[...files]", "Bundle files", {
|
|
629
629
|
ignoreOptionDefaultValue: true,
|
|
630
630
|
allowUnknownOptions: true
|
|
631
|
-
}).option("-c, --config <filename>", "Use a custom config file").option("--config-loader <loader>", "Config loader to use: auto, native, tsx, unrun", { default: "auto" }).option("--no-config", "Disable config file").option("-f, --format <format>", "Bundle format: esm, cjs, iife, umd", { default: "esm" }).option("--clean", "Clean output directory, --no-clean to disable").option("--deps.never-bundle <module>", "Mark dependencies as external").option("--minify", "Minify output").option("--devtools", "Enable devtools integration").option("--debug [feat]", "Show debug logs").option("--target <target>", "Bundle target, e.g \"es2015\", \"esnext\"").option("-l, --logLevel <level>", "Set log level: info, warn, error, silent").option("--fail-on-warn", "Fail on warnings", { default: true }).option("--no-write", "Disable writing files to disk, incompatible with watch mode").option("-d, --out-dir <dir>", "Output directory", { default: "dist" }).option("--treeshake", "Tree-shake bundle", { default: true }).option("--sourcemap", "Generate source map", { default: false }).option("--shims", "Enable cjs and esm shims ", { default: false }).option("--platform <platform>", "Target platform", { default: "node" }).option("--dts", "Generate dts files").option("--publint", "Enable publint", { default: false }).option("--attw", "Enable Are the types wrong integration", { default: false }).option("--unused", "Enable unused dependencies check", { default: false }).option("-w, --watch [path]", "Watch mode").option("--ignore-watch <path>", "Ignore custom paths in watch mode").option("--from-vite [vitest]", "Reuse config from Vite or Vitest").option("--report", "Size report", { default: true }).option("--env.* <value>", "Define compile-time env variables").option("--env-file <file>", "Load environment variables from a file, when used together with --env, variables in --env take precedence").option("--env-prefix <prefix>", "Prefix for env variables to inject into the bundle", { default: "TSDOWN_" }).option("--on-success <command>", "Command to run on success").option("--copy <dir>", "Copy files to output dir").option("--public-dir <dir>", "Alias for --copy, deprecated").option("--tsconfig <tsconfig>", "Set tsconfig path").option("--unbundle", "Unbundle mode").option("--root <dir>", "Root directory of input files").option("--exe", "Bundle as executable").option("-W, --workspace [dir]", "Enable workspace mode").option("-F, --filter <pattern>", "Filter configs (cwd or name), e.g. /pkg-name$/ or pkg-name").option("--exports", "Generate package exports for package.json").action(async (input, flags) => {
|
|
631
|
+
}).option("-c, --config <filename>", "Use a custom config file").option("--config-loader <loader>", "Config loader to use: auto, native, tsx, unrun", { default: "auto" }).option("--no-config", "Disable config file").option("-f, --format <format>", "Bundle format: esm, cjs, iife, umd", { default: "esm" }).option("--clean", "Clean output directory, --no-clean to disable").option("--deps.never-bundle <module>", "Mark dependencies as external").option("--minify", "Minify output").option("--devtools", "Enable devtools integration").option("--debug [feat]", "Show debug logs").option("--target <target>", "Bundle target, e.g \"es2015\", \"esnext\"").option("-l, --logLevel <level>", "Set log level: info, warn, error, silent").option("--fail-on-warn", "Fail on warnings", { default: true }).option("--no-write", "Disable writing files to disk, incompatible with watch mode").option("-d, --out-dir <dir>", "Output directory", { default: "dist" }).option("--treeshake", "Tree-shake bundle", { default: true }).option("--sourcemap", "Generate source map", { default: false }).option("--shims", "Enable cjs and esm shims ", { default: false }).option("--platform <platform>", "Target platform", { default: "node" }).option("--dts", "Generate dts files").option("--publint", "Enable publint", { default: false }).option("--attw", "Enable Are the types wrong integration", { default: false }).option("--unused", "Enable unused dependencies check", { default: false }).option("-w, --watch [path]", "Watch mode").option("--ignore-watch <path>", "Ignore custom paths in watch mode").option("--from-vite [vitest]", "Reuse config from Vite or Vitest").option("--report", "Size report", { default: true }).option("--env.* <value>", "Define compile-time env variables").option("--env-file <file>", "Load environment variables from a file, when used together with --env, variables in --env take precedence").option("--env-prefix <prefix>", "Prefix for env variables to inject into the bundle", { default: "TSDOWN_" }).option("--on-success <command>", "Command to run on success").option("--copy <dir>", "Copy files to output dir").option("--public-dir <dir>", "Alias for --copy, deprecated").option("--tsconfig <tsconfig>", "Set tsconfig path").option("--unbundle", "Unbundle mode").option("--root <dir>", "Root directory of input files").option("--exe", "Bundle as executable").option("-W, --workspace [dir]", "Enable workspace mode").option("--concurrency <count>", "Maximum number of Rolldown builds to run in parallel").option("-F, --filter <pattern>", "Filter configs (cwd or name), e.g. /pkg-name$/ or pkg-name").option("--exports", "Generate package exports for package.json").action(async (input, flags) => {
|
|
632
632
|
globalLogger.level = flags.logLevel || "info";
|
|
633
633
|
globalLogger.info(`${blue`tsdown v${version}`} powered by ${hex("#ff7e17")`rolldown v${VERSION}`}`);
|
|
634
|
-
const { build } = await import("./build-
|
|
634
|
+
const { build } = await import("./build-D_enfyvD-X5SFXZZc.js").then((n) => n.r).then((n) => n.r);
|
|
635
635
|
if (input.length > 0) flags.entry = input;
|
|
636
636
|
await build(flags);
|
|
637
637
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as __commonJSMin, k as __require } from "./main-
|
|
1
|
+
import { D as __commonJSMin, k as __require } from "./main-Jz_9T-KA.js";
|
|
2
2
|
//#region ../../node_modules/.pnpm/lilconfig@3.1.3/node_modules/lilconfig/src/index.js
|
|
3
3
|
var require_src$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4
4
|
const path = __require("path");
|
|
@@ -345,7 +345,7 @@ var require_src$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
345
345
|
};
|
|
346
346
|
}));
|
|
347
347
|
//#endregion
|
|
348
|
-
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.
|
|
348
|
+
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.25_tsx@4.23.1_yaml@2.9.0/node_modules/postcss-load-config/src/req.js
|
|
349
349
|
var require_req = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
350
350
|
const { createRequire } = __require("node:module");
|
|
351
351
|
const { pathToFileURL } = __require("node:url");
|
|
@@ -387,7 +387,7 @@ var require_req = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
387
387
|
module.exports = req;
|
|
388
388
|
}));
|
|
389
389
|
//#endregion
|
|
390
|
-
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.
|
|
390
|
+
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.25_tsx@4.23.1_yaml@2.9.0/node_modules/postcss-load-config/src/options.js
|
|
391
391
|
var require_options = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
392
392
|
const req = require_req();
|
|
393
393
|
/**
|
|
@@ -421,7 +421,7 @@ var require_options = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
421
421
|
module.exports = options;
|
|
422
422
|
}));
|
|
423
423
|
//#endregion
|
|
424
|
-
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.
|
|
424
|
+
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.25_tsx@4.23.1_yaml@2.9.0/node_modules/postcss-load-config/src/plugins.js
|
|
425
425
|
var require_plugins = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
426
426
|
const req = require_req();
|
|
427
427
|
/**
|
|
@@ -475,7 +475,7 @@ var require_plugins = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
475
475
|
module.exports = plugins;
|
|
476
476
|
}));
|
|
477
477
|
//#endregion
|
|
478
|
-
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.
|
|
478
|
+
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.25_tsx@4.23.1_yaml@2.9.0/node_modules/postcss-load-config/src/index.js
|
|
479
479
|
var require_src = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
480
480
|
const { resolve } = __require("node:path");
|
|
481
481
|
const config = require_src$1();
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { C as resolveComma, E as toArray, l as bold, p as red, r as createDebug, t as R, u as dim,
|
|
1
|
+
import { C as resolveComma, E as toArray, l as bold, p as red, r as createDebug, t as R, u as dim, y as importWithError } from "./main-Jz_9T-KA.js";
|
|
2
2
|
import process from "node:process";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { RUNTIME_MODULE_ID } from "@voidzero-dev/vite-plus-core/rolldown";
|
|
5
5
|
import { access, cp, mkdir, mkdtemp, rm, stat, writeFile } from "node:fs/promises";
|
|
6
6
|
import { exactRegex } from "@voidzero-dev/vite-plus-core/rolldown/filter";
|
|
7
7
|
import { tmpdir } from "node:os";
|
|
8
|
-
//#region ../../node_modules/.pnpm/tsdown@0.22.
|
|
8
|
+
//#region ../../node_modules/.pnpm/tsdown@0.22.14_@arethetypeswrong+core@0.18.2_@tsdown+css@0.22.14_@tsdown+exe@0.22.14_@t_3f66331a323f6503c9462b3ef80883b8/node_modules/tsdown/dist/format-DLxyxnif.mjs
|
|
9
9
|
function fsExists(path) {
|
|
10
10
|
return access(path).then(() => true, () => false);
|
|
11
11
|
}
|
|
@@ -53,7 +53,7 @@ function formatBytes(bytes) {
|
|
|
53
53
|
return `${(bytes / 1e3).toFixed(2)} kB`;
|
|
54
54
|
}
|
|
55
55
|
//#endregion
|
|
56
|
-
//#region ../../node_modules/.pnpm/rolldown-plugin-dts@0.27.
|
|
56
|
+
//#region ../../node_modules/.pnpm/rolldown-plugin-dts@0.27.13_@typescript+native-preview@7.0.0-dev.20260605.1_oxc-resolve_19173df252fb1b72b750fe1e656588b8/node_modules/rolldown-plugin-dts/dist/filename-BrNNypc2.mjs
|
|
57
57
|
const RE_JS = /\.([cm]?)jsx?$/;
|
|
58
58
|
const RE_TS = /\.([cm]?)tsx?$/;
|
|
59
59
|
const RE_DTS = /\.d\.([cm]?)ts$/;
|
|
@@ -79,7 +79,7 @@ function replaceTemplateName(template, name) {
|
|
|
79
79
|
return template.replaceAll("[name]", name);
|
|
80
80
|
}
|
|
81
81
|
//#endregion
|
|
82
|
-
//#region ../../node_modules/.pnpm/verkit@0.
|
|
82
|
+
//#region ../../node_modules/.pnpm/verkit@0.3.0/node_modules/verkit/dist/index.js
|
|
83
83
|
const LETTER_DASH_NUMBER = "[a-zA-Z0-9-]";
|
|
84
84
|
const NUMERIC_IDENTIFIER = String.raw`0|[1-9]\d*`;
|
|
85
85
|
const NUMERIC_IDENTIFIER_LOOSE = String.raw`\d+`;
|
|
@@ -134,11 +134,11 @@ const COERCE_FULL_EXACT = safeRegex(COERCE_FULL);
|
|
|
134
134
|
const NUMERIC = /^\d+$/;
|
|
135
135
|
function formatComparableVersion(version) {
|
|
136
136
|
const base = `${version.major}.${version.minor}.${version.patch}`;
|
|
137
|
-
return version.prerelease
|
|
137
|
+
return version.prerelease?.length ? `${base}-${version.prerelease.join(".")}` : base;
|
|
138
138
|
}
|
|
139
139
|
function formatFullVersion(version) {
|
|
140
140
|
const comparable = formatComparableVersion(version);
|
|
141
|
-
return version.build
|
|
141
|
+
return version.build?.length ? `${comparable}+${version.build.join(".")}` : comparable;
|
|
142
142
|
}
|
|
143
143
|
function parse$1(version, options = {}) {
|
|
144
144
|
if (typeof version !== "string") return version;
|
|
@@ -157,9 +157,9 @@ function parse$1(version, options = {}) {
|
|
|
157
157
|
if (numeric >= 0 && numeric < Number.MAX_SAFE_INTEGER) return numeric;
|
|
158
158
|
}
|
|
159
159
|
return identifier;
|
|
160
|
-
}) :
|
|
160
|
+
}) : void 0;
|
|
161
161
|
return {
|
|
162
|
-
build: match[5]
|
|
162
|
+
build: match[5]?.split("."),
|
|
163
163
|
major,
|
|
164
164
|
minor,
|
|
165
165
|
patch,
|
|
@@ -177,12 +177,14 @@ function compareMainParsed(left, right) {
|
|
|
177
177
|
return left.major === right.major ? left.minor === right.minor ? left.patch === right.patch ? 0 : left.patch < right.patch ? -1 : 1 : left.minor < right.minor ? -1 : 1 : left.major < right.major ? -1 : 1;
|
|
178
178
|
}
|
|
179
179
|
function comparePrereleaseParsed(left, right) {
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
if (
|
|
180
|
+
const leftPrerelease = left.prerelease;
|
|
181
|
+
const rightPrerelease = right.prerelease;
|
|
182
|
+
if (leftPrerelease?.length && !rightPrerelease?.length) return -1;
|
|
183
|
+
if (!leftPrerelease?.length && rightPrerelease?.length) return 1;
|
|
184
|
+
if (!leftPrerelease?.length && !rightPrerelease?.length) return 0;
|
|
183
185
|
for (let index = 0;; index++) {
|
|
184
|
-
const leftIdentifier =
|
|
185
|
-
const rightIdentifier =
|
|
186
|
+
const leftIdentifier = leftPrerelease?.[index];
|
|
187
|
+
const rightIdentifier = rightPrerelease?.[index];
|
|
186
188
|
if (leftIdentifier === void 0 && rightIdentifier === void 0) return 0;
|
|
187
189
|
if (rightIdentifier === void 0) return 1;
|
|
188
190
|
if (leftIdentifier === void 0) return -1;
|
|
@@ -303,8 +305,8 @@ function replaceXRange(comparator, options) {
|
|
|
303
305
|
const wildcardMinor = wildcardMajor || isWildcard(minor);
|
|
304
306
|
const wildcardPatch = wildcardMinor || isWildcard(patch);
|
|
305
307
|
if (operator === "=" && wildcardPatch) operator = "";
|
|
306
|
-
let prerelease = options.includePrerelease ? "-0" : "";
|
|
307
308
|
if (wildcardMajor) return operator === ">" || operator === "<" ? "<0.0.0-0" : "*";
|
|
309
|
+
let prerelease = options.includePrerelease ? "-0" : "";
|
|
308
310
|
if (operator && wildcardPatch) {
|
|
309
311
|
if (wildcardMinor) minor = 0;
|
|
310
312
|
patch = 0;
|
|
@@ -367,12 +369,12 @@ function parseRange(range, options = {}) {
|
|
|
367
369
|
if (typeof range !== "string") return range;
|
|
368
370
|
const parsedOptions = { ...options };
|
|
369
371
|
const raw = range.trim().replaceAll(/\s+/g, " ");
|
|
370
|
-
let sets = raw.split("||").map((part) => parseSimpleRange(part.trim(), parsedOptions)).filter((set) => set.length
|
|
371
|
-
if (sets.length
|
|
372
|
+
let sets = raw.split("||").map((part) => parseSimpleRange(part.trim(), parsedOptions)).filter((set) => set.length);
|
|
373
|
+
if (!sets.length) throw new TypeError(`Range contains no valid comparator sets: ${raw}`);
|
|
372
374
|
if (sets.length > 1) {
|
|
373
375
|
const first = sets[0];
|
|
374
376
|
sets = sets.filter((set) => set[0]?.value !== "<0.0.0-0");
|
|
375
|
-
if (sets.length
|
|
377
|
+
if (!sets.length) sets = [first];
|
|
376
378
|
else if (sets.length > 1) {
|
|
377
379
|
const any = sets.find((set) => set.length === 1 && set[0]?.value === "");
|
|
378
380
|
if (any) sets = [any];
|
|
@@ -393,11 +395,11 @@ function tryParseRange(range, options = {}) {
|
|
|
393
395
|
}
|
|
394
396
|
}
|
|
395
397
|
function testComparatorSet(set, version, options) {
|
|
396
|
-
if (
|
|
397
|
-
if (version.prerelease
|
|
398
|
+
if (set.some((comparator) => !testParsedComparator(comparator, version))) return false;
|
|
399
|
+
if (!version.prerelease?.length || options.includePrerelease) return true;
|
|
398
400
|
return set.some((comparator) => {
|
|
399
401
|
const allowed = comparator.version;
|
|
400
|
-
return allowed !== null && allowed.prerelease
|
|
402
|
+
return allowed !== null && allowed.prerelease?.length && allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch;
|
|
401
403
|
});
|
|
402
404
|
}
|
|
403
405
|
function testParsedRange(range, version) {
|
|
@@ -412,16 +414,16 @@ function satisfies(version, range, options = {}) {
|
|
|
412
414
|
return parsed ? testRangeVersion(parsed, version) : false;
|
|
413
415
|
}
|
|
414
416
|
function nextVersionAfter(version) {
|
|
415
|
-
|
|
417
|
+
const { prerelease } = version;
|
|
418
|
+
return parse$1(formatComparableVersion(prerelease?.length ? {
|
|
416
419
|
major: version.major,
|
|
417
420
|
minor: version.minor,
|
|
418
|
-
patch: version.patch
|
|
419
|
-
prerelease: []
|
|
420
|
-
}
|
|
421
|
+
patch: version.patch,
|
|
422
|
+
prerelease: [...prerelease, 0]
|
|
423
|
+
} : {
|
|
421
424
|
major: version.major,
|
|
422
425
|
minor: version.minor,
|
|
423
|
-
patch: version.patch
|
|
424
|
-
prerelease: [...version.prerelease, 0]
|
|
426
|
+
patch: version.patch + 1
|
|
425
427
|
}));
|
|
426
428
|
}
|
|
427
429
|
function findMinimumForRange(range, options = {}) {
|
|
@@ -451,9 +453,13 @@ function coerce(value, options = {}) {
|
|
|
451
453
|
return parsed ? formatFullVersion(parsed) : null;
|
|
452
454
|
}
|
|
453
455
|
//#endregion
|
|
454
|
-
//#region ../../node_modules/.pnpm/tsdown@0.22.
|
|
456
|
+
//#region ../../node_modules/.pnpm/tsdown@0.22.14_@arethetypeswrong+core@0.18.2_@tsdown+css@0.22.14_@tsdown+exe@0.22.14_@t_3f66331a323f6503c9462b3ef80883b8/node_modules/tsdown/dist/target-Bab3CUeB.mjs
|
|
455
457
|
const NODE_SEA_MIN_VERSION = "25.7.0";
|
|
456
|
-
const NODE_SEA_MIN_VERSION_PARSED =
|
|
458
|
+
const NODE_SEA_MIN_VERSION_PARSED = {
|
|
459
|
+
major: 25,
|
|
460
|
+
minor: 7,
|
|
461
|
+
patch: 0
|
|
462
|
+
};
|
|
457
463
|
const debug = createDebug("tsdown:exe");
|
|
458
464
|
function validateSea({ dts, entry, logger, nameLabel }) {
|
|
459
465
|
if (process.versions.bun || process.versions.deno) throw new Error("The `exe` option is not supported in Bun and Deno environments.");
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { r as createDebug } from "./main-
|
|
2
|
-
import { h as RE_DTS_MAP, m as RE_DTS } from "./target-
|
|
3
|
-
import { n as globalContext } from "./
|
|
4
|
-
import { t as requireTS } from "./load-tsc-BKULZsrs-BFmeD6Bu.js";
|
|
1
|
+
import { r as createDebug } from "./main-Jz_9T-KA.js";
|
|
2
|
+
import { h as RE_DTS_MAP, m as RE_DTS } from "./target-Bab3CUeB-CERZYTwS.js";
|
|
3
|
+
import { n as globalContext, t as requireTS } from "./dist-BZO8q3c0.js";
|
|
5
4
|
import path from "node:path";
|
|
6
5
|
import { pathToFileURL } from "node:url";
|
|
7
|
-
//#region ../../node_modules/.pnpm/rolldown-plugin-dts@0.27.
|
|
6
|
+
//#region ../../node_modules/.pnpm/rolldown-plugin-dts@0.27.13_@typescript+native-preview@7.0.0-dev.20260605.1_oxc-resolve_19173df252fb1b72b750fe1e656588b8/node_modules/rolldown-plugin-dts/dist/tsc-KtFHcISk.mjs
|
|
8
7
|
const debug$3 = createDebug("rolldown-plugin-dts:tsc-system");
|
|
9
8
|
const ts$3 = requireTS();
|
|
10
9
|
/**
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { A as __toESM, C as resolveComma, E as toArray,
|
|
2
|
-
import { i as expandBaselineTarget } from "./target-
|
|
3
|
-
import "./internal-
|
|
1
|
+
import { A as __toESM, C as resolveComma, E as toArray, y as importWithError } from "./main-Jz_9T-KA.js";
|
|
2
|
+
import { i as expandBaselineTarget } from "./target-Bab3CUeB-CERZYTwS.js";
|
|
3
|
+
import "./internal-DyaNxVWW.js";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import { readFileSync } from "node:fs";
|
|
6
6
|
import { readFile } from "node:fs/promises";
|
|
7
7
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
8
8
|
import { ResolverFactory } from "@voidzero-dev/vite-plus-core/rolldown/experimental";
|
|
9
|
-
//#region ../../node_modules/.pnpm/@tsdown+css@0.22.
|
|
9
|
+
//#region ../../node_modules/.pnpm/@tsdown+css@0.22.14_jiti@2.7.0_postcss-import@16.1.1_postcss@8.5.25__postcss@8.5.25_sas_6a16dd13a926d2b2137531bbae459a0e/node_modules/@tsdown/css/dist/index.mjs
|
|
10
10
|
const defaultCssBundleName = "style.css";
|
|
11
11
|
function resolveCssOptions(options = {}, topLevelTarget, unbundle) {
|
|
12
12
|
let cssTarget;
|
|
@@ -56,10 +56,8 @@ function applyLocalsConvention(modules, convention) {
|
|
|
56
56
|
result[key] = value;
|
|
57
57
|
if (key.includes("-")) result[camelized] = value;
|
|
58
58
|
break;
|
|
59
|
-
case "dashesOnly":
|
|
60
|
-
|
|
61
|
-
else result[key] = value;
|
|
62
|
-
break;
|
|
59
|
+
case "dashesOnly": if (key.includes("-")) result[camelized] = value;
|
|
60
|
+
else result[key] = value;
|
|
63
61
|
}
|
|
64
62
|
}
|
|
65
63
|
return result;
|
|
@@ -141,8 +139,8 @@ function compilePreprocessor(lang, code, filename, options) {
|
|
|
141
139
|
case "stylus": return compileStylus(code, filename, options);
|
|
142
140
|
}
|
|
143
141
|
}
|
|
144
|
-
const cssUrlRE = /(?<!@import\s+)(?<=^|[^\w\-\
|
|
145
|
-
const cssDataUriRE = /(?<=^|[^\w\-\
|
|
142
|
+
const cssUrlRE = /(?<!@import\s+)(?<=^|[^\w\-\u{80}-\u{10FFFF}])url\((\s*('[^']+'|"[^"]+")\s*|(?:\\.|[^'")\\])+)\)/u;
|
|
143
|
+
const cssDataUriRE = /(?<=^|[^\w\-\u{80}-\u{10FFFF}])data-uri\((\s*('[^']+'|"[^"]+")\s*|[^'")]+)\)/u;
|
|
146
144
|
const importCssRE = /@import\s+(?:url\()?('[^']+\.css'|"[^"]+\.css"|[^'"\s)]+\.css)/;
|
|
147
145
|
async function rebaseUrls(file, rootFile, ignoreUrl) {
|
|
148
146
|
file = path.resolve(file);
|
|
@@ -372,7 +370,7 @@ async function compileStylus(code, filename, options) {
|
|
|
372
370
|
...stylusOptions,
|
|
373
371
|
filename
|
|
374
372
|
});
|
|
375
|
-
if (define) for (const key of Object.
|
|
373
|
+
if (define) for (const [key, value] of Object.entries(define)) ref.define(key, value);
|
|
376
374
|
return new Promise((resolve, reject) => {
|
|
377
375
|
ref.render((err, css) => {
|
|
378
376
|
if (err) reject(/* @__PURE__ */ new Error(`[stylus] ${err.message}`));
|
|
@@ -467,7 +465,7 @@ const ESBUILD_LIGHTNINGCSS_MAPPING = {
|
|
|
467
465
|
safari: "safari"
|
|
468
466
|
};
|
|
469
467
|
function parseVersion(version) {
|
|
470
|
-
const [major, minor = 0, patch = 0] = version.split("-", 1)[0].split(".").map((v) =>
|
|
468
|
+
const [major, minor = 0, patch = 0] = version.split("-", 1)[0].split(".").map((v) => +v);
|
|
471
469
|
if (Number.isNaN(major) || Number.isNaN(minor) || Number.isNaN(patch)) return null;
|
|
472
470
|
return major << 16 | minor << 8 | patch;
|
|
473
471
|
}
|
|
@@ -606,7 +604,7 @@ async function loadFileConfig(searchPath) {
|
|
|
606
604
|
if (cached !== void 0) return cached;
|
|
607
605
|
const promise = (async () => {
|
|
608
606
|
try {
|
|
609
|
-
const postcssrc = (await import("./src-
|
|
607
|
+
const postcssrc = (await import("./src-D5keKqGd.js").then((m) => /* @__PURE__ */ __toESM(m.default, 1))).default;
|
|
610
608
|
const result = await postcssrc({}, searchPath);
|
|
611
609
|
return {
|
|
612
610
|
options: result.options,
|
|
@@ -770,15 +768,14 @@ function CssPlugin(config, { logger }) {
|
|
|
770
768
|
filter: { id: CSS_LANGS_RE },
|
|
771
769
|
handler(code, id) {
|
|
772
770
|
if (shouldSkipTransform(id, getCleanId(id))) return;
|
|
773
|
-
|
|
774
|
-
const modules = modulesMap.get(id);
|
|
775
|
-
if (isInline) return {
|
|
771
|
+
if (RE_INLINE.test(id)) return {
|
|
776
772
|
code: `export default ${JSON.stringify(code)};`,
|
|
777
773
|
map: null,
|
|
778
774
|
moduleSideEffects: false,
|
|
779
775
|
moduleType: "js"
|
|
780
776
|
};
|
|
781
777
|
if (code.length) styles.set(id, code);
|
|
778
|
+
const modules = modulesMap.get(id);
|
|
782
779
|
if (modules) return {
|
|
783
780
|
code: modulesToEsm(modules),
|
|
784
781
|
map: null,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as createDebug, t as R } from "./main-
|
|
2
|
-
import { O as fsExists, c as isGreaterOrEqual, f as tryParse, k as fsRemove, l as normalize$1, n as NODE_SEA_MIN_VERSION_PARSED, t as NODE_SEA_MIN_VERSION } from "./target-
|
|
3
|
-
import "./internal-
|
|
1
|
+
import { r as createDebug, t as R } from "./main-Jz_9T-KA.js";
|
|
2
|
+
import { O as fsExists, c as isGreaterOrEqual, f as tryParse, k as fsRemove, l as normalize$1, n as NODE_SEA_MIN_VERSION_PARSED, t as NODE_SEA_MIN_VERSION } from "./target-Bab3CUeB-CERZYTwS.js";
|
|
3
|
+
import "./internal-DyaNxVWW.js";
|
|
4
4
|
import process from "node:process";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import { pipeline } from "node:stream/promises";
|
|
@@ -9,7 +9,7 @@ import { createReadStream, createWriteStream } from "node:fs";
|
|
|
9
9
|
import { chmod, mkdir, rename } from "node:fs/promises";
|
|
10
10
|
import os from "node:os";
|
|
11
11
|
import { createHash } from "node:crypto";
|
|
12
|
-
//#region ../../node_modules/.pnpm/@tsdown+exe@0.22.
|
|
12
|
+
//#region ../../node_modules/.pnpm/@tsdown+exe@0.22.14_tsdown@0.22.14/node_modules/@tsdown/exe/dist/index.mjs
|
|
13
13
|
function getCacheDir() {
|
|
14
14
|
const home = os.homedir();
|
|
15
15
|
if (process.platform === "win32") {
|