@ariestools/toolchain 8.7.27 → 8.7.29
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 +27 -0
- package/dist/actions/analyze.d.ts +27 -9
- package/dist/actions/analyze.d.ts.map +1 -1
- package/dist/actions/api-exposure/analyzer/analyzePackage.d.ts +6 -2
- package/dist/actions/api-exposure/analyzer/analyzePackage.d.ts.map +1 -1
- package/dist/actions/api-exposure/analyzer/couplingWalk.d.ts.map +1 -1
- package/dist/actions/api-exposure/analyzer/depSignals.d.ts +12 -4
- package/dist/actions/api-exposure/analyzer/depSignals.d.ts.map +1 -1
- package/dist/actions/api-exposure/analyzer/exposureWalk.d.ts +9 -3
- package/dist/actions/api-exposure/analyzer/exposureWalk.d.ts.map +1 -1
- package/dist/actions/api-exposure/analyzer/importedPackages.d.ts +6 -2
- package/dist/actions/api-exposure/analyzer/importedPackages.d.ts.map +1 -1
- package/dist/actions/api-exposure/apiExposure.d.ts +9 -3
- package/dist/actions/api-exposure/apiExposure.d.ts.map +1 -1
- package/dist/actions/api-exposure/config.d.ts +12 -4
- package/dist/actions/api-exposure/config.d.ts.map +1 -1
- package/dist/actions/api-exposure/installStrategy.d.ts +6 -2
- package/dist/actions/api-exposure/installStrategy.d.ts.map +1 -1
- package/dist/actions/api-exposure/reporters.d.ts +3 -1
- package/dist/actions/api-exposure/reporters.d.ts.map +1 -1
- package/dist/actions/api-exposure/scoring.d.ts +3 -1
- package/dist/actions/api-exposure/scoring.d.ts.map +1 -1
- package/dist/actions/api-exposure/types.d.ts +48 -16
- package/dist/actions/api-exposure/types.d.ts.map +1 -1
- package/dist/actions/barrel/index.d.ts +0 -1
- package/dist/actions/barrel/index.d.ts.map +1 -1
- package/dist/actions/barrel/restrictionHelpers.d.ts +0 -19
- package/dist/actions/barrel/restrictionHelpers.d.ts.map +1 -1
- package/dist/actions/compile.d.ts +9 -3
- package/dist/actions/compile.d.ts.map +1 -1
- package/dist/actions/dead/analyzePackage.d.ts +18 -6
- package/dist/actions/dead/analyzePackage.d.ts.map +1 -1
- package/dist/actions/dead/collectSymbols.d.ts +12 -4
- package/dist/actions/dead/collectSymbols.d.ts.map +1 -1
- package/dist/actions/dead/evaluateRules.d.ts +3 -1
- package/dist/actions/dead/evaluateRules.d.ts.map +1 -1
- package/dist/actions/dead/findWorkspaceFile.d.ts +3 -1
- package/dist/actions/dead/findWorkspaceFile.d.ts.map +1 -1
- package/dist/actions/dead/ruleNames.d.ts +3 -1
- package/dist/actions/dead/ruleNames.d.ts.map +1 -1
- package/dist/actions/dead/runDeadAnalysis.d.ts +3 -1
- package/dist/actions/dead/runDeadAnalysis.d.ts.map +1 -1
- package/dist/actions/dead/sourceEdits.d.ts +3 -1
- package/dist/actions/dead/sourceEdits.d.ts.map +1 -1
- package/dist/actions/deplint/checkPackage/checkPackage.d.ts +3 -1
- package/dist/actions/deplint/checkPackage/checkPackage.d.ts.map +1 -1
- package/dist/actions/deplint/checkPackage/getUnsatisfiedPeerDependencies.d.ts +6 -2
- package/dist/actions/deplint/checkPackage/getUnsatisfiedPeerDependencies.d.ts.map +1 -1
- package/dist/actions/deplint/collectPickRows.d.ts +24 -8
- package/dist/actions/deplint/collectPickRows.d.ts.map +1 -1
- package/dist/actions/deplint/deplint.d.ts +9 -3
- package/dist/actions/deplint/deplint.d.ts.map +1 -1
- package/dist/actions/deplint/deplintPick.d.ts +3 -1
- package/dist/actions/deplint/deplintPick.d.ts.map +1 -1
- package/dist/actions/deplint/editXyConfigPackages.d.ts +9 -3
- package/dist/actions/deplint/editXyConfigPackages.d.ts.map +1 -1
- package/dist/actions/deplint/fetchPackageManifest.d.ts +6 -2
- package/dist/actions/deplint/fetchPackageManifest.d.ts.map +1 -1
- package/dist/actions/deplint/findFiles.d.ts +6 -2
- package/dist/actions/deplint/findFiles.d.ts.map +1 -1
- package/dist/actions/deplint/getExternalImportsFromFiles.d.ts.map +1 -1
- package/dist/actions/deplint/interactivePick.d.ts +3 -1
- package/dist/actions/deplint/interactivePick.d.ts.map +1 -1
- package/dist/actions/deplint/isTerminalPackage.d.ts +12 -4
- package/dist/actions/deplint/isTerminalPackage.d.ts.map +1 -1
- package/dist/actions/deplint/resolvePeerBumpFixes.d.ts +3 -1
- package/dist/actions/deplint/resolvePeerBumpFixes.d.ts.map +1 -1
- package/dist/actions/deplint/snapshot.d.ts +24 -8
- package/dist/actions/deplint/snapshot.d.ts.map +1 -1
- package/dist/actions/deplint/sourceFileCache.d.ts +3 -1
- package/dist/actions/deplint/sourceFileCache.d.ts.map +1 -1
- package/dist/actions/deplint/types.d.ts +66 -22
- package/dist/actions/deplint/types.d.ts.map +1 -1
- package/dist/actions/gitignore.d.ts +3 -1
- package/dist/actions/gitignore.d.ts.map +1 -1
- package/dist/actions/lint.d.ts +15 -5
- package/dist/actions/lint.d.ts.map +1 -1
- package/dist/actions/lintNext.d.ts +6 -2
- package/dist/actions/lintNext.d.ts.map +1 -1
- package/dist/actions/lintNextWorker.d.ts +36 -12
- package/dist/actions/lintNextWorker.d.ts.map +1 -1
- package/dist/actions/lintPackageFilter.d.ts +15 -5
- package/dist/actions/lintPackageFilter.d.ts.map +1 -1
- package/dist/actions/package/clean-outputs.d.ts +3 -1
- package/dist/actions/package/clean-outputs.d.ts.map +1 -1
- package/dist/actions/package/clean-typescript.d.ts +3 -1
- package/dist/actions/package/clean-typescript.d.ts.map +1 -1
- package/dist/actions/package/cleanGitignore.d.ts +6 -2
- package/dist/actions/package/cleanGitignore.d.ts.map +1 -1
- package/dist/actions/package/cleanPlan.d.ts +6 -2
- package/dist/actions/package/cleanPlan.d.ts.map +1 -1
- package/dist/actions/package/cleanRules.d.ts +15 -5
- package/dist/actions/package/cleanRules.d.ts.map +1 -1
- package/dist/actions/package/compile/ApiExposureConfig.d.ts +24 -8
- package/dist/actions/package/compile/ApiExposureConfig.d.ts.map +1 -1
- package/dist/actions/package/compile/CleanConfig.d.ts +3 -1
- package/dist/actions/package/compile/CleanConfig.d.ts.map +1 -1
- package/dist/actions/package/compile/MonolithConfig.d.ts +39 -13
- package/dist/actions/package/compile/MonolithConfig.d.ts.map +1 -1
- package/dist/actions/package/compile/PublintConfig.d.ts +6 -2
- package/dist/actions/package/compile/PublintConfig.d.ts.map +1 -1
- package/dist/actions/package/compile/XyConfig.d.ts +162 -54
- package/dist/actions/package/compile/XyConfig.d.ts.map +1 -1
- package/dist/actions/package/compile/createProgramFromConfig.d.ts +18 -6
- package/dist/actions/package/compile/createProgramFromConfig.d.ts.map +1 -1
- package/dist/actions/package/compile/inputs.d.ts.map +1 -1
- package/dist/actions/package/compile/monolithCompileDeclarations.d.ts +3 -1
- package/dist/actions/package/compile/monolithCompileDeclarations.d.ts.map +1 -1
- package/dist/actions/package/compile/monolithCompileEntries.d.ts.map +1 -1
- package/dist/actions/package/compile/monolithCompileLayout.d.ts +15 -5
- package/dist/actions/package/compile/monolithCompileLayout.d.ts.map +1 -1
- package/dist/actions/package/compile/monolithCopyEntries.d.ts +6 -2
- package/dist/actions/package/compile/monolithCopyEntries.d.ts.map +1 -1
- package/dist/actions/package/compile/monolithReexport.d.ts +12 -4
- package/dist/actions/package/compile/monolithReexport.d.ts.map +1 -1
- package/dist/actions/package/compile/packageCompileMonolith.d.ts.map +1 -1
- package/dist/actions/recompile.d.ts +3 -1
- package/dist/actions/recompile.d.ts.map +1 -1
- package/dist/actions/repo-init/index.d.ts +7 -0
- package/dist/actions/repo-init/index.d.ts.map +1 -0
- package/dist/actions/repo-init/prompts.d.ts +4 -0
- package/dist/actions/repo-init/prompts.d.ts.map +1 -0
- package/dist/actions/repo-init/resolvePlan.d.ts +7 -0
- package/dist/actions/repo-init/resolvePlan.d.ts.map +1 -0
- package/dist/actions/repo-init/scaffold.d.ts +10 -0
- package/dist/actions/repo-init/scaffold.d.ts.map +1 -0
- package/dist/actions/repo-init/skillsInstall.d.ts +12 -0
- package/dist/actions/repo-init/skillsInstall.d.ts.map +1 -0
- package/dist/actions/repo-init/templateVars.d.ts +5 -0
- package/dist/actions/repo-init/templateVars.d.ts.map +1 -0
- package/dist/actions/repo-init/types.d.ts +40 -0
- package/dist/actions/repo-init/types.d.ts.map +1 -0
- package/dist/actions/repo-init.d.ts +1 -13
- package/dist/actions/repo-init.d.ts.map +1 -1
- package/dist/actions/skills/defaults.d.ts +14 -6
- package/dist/actions/skills/defaults.d.ts.map +1 -1
- package/dist/actions/skills/passthrough.d.ts +4 -0
- package/dist/actions/skills/passthrough.d.ts.map +1 -1
- package/dist/actions/skills/skillRules.d.ts +4 -2
- package/dist/actions/skills/skillRules.d.ts.map +1 -1
- package/dist/actions/tsc-validate/sharedValidate.d.ts +6 -2
- package/dist/actions/tsc-validate/sharedValidate.d.ts.map +1 -1
- package/dist/actions/tsc-validate/tscValidate.d.ts.map +1 -1
- package/dist/actions/work/github.d.ts +9 -3
- package/dist/actions/work/github.d.ts.map +1 -1
- package/dist/actions/work/helpers.d.ts +3 -1
- package/dist/actions/work/helpers.d.ts.map +1 -1
- package/dist/actions/work/index.d.ts +6 -2
- package/dist/actions/work/index.d.ts.map +1 -1
- package/dist/actions/work/list.d.ts +6 -2
- package/dist/actions/work/list.d.ts.map +1 -1
- package/dist/actions/work/move.d.ts +3 -1
- package/dist/actions/work/move.d.ts.map +1 -1
- package/dist/actions/work/store.d.ts +3 -1
- package/dist/actions/work/store.d.ts.map +1 -1
- package/dist/actions/work/sync.d.ts +15 -5
- package/dist/actions/work/sync.d.ts.map +1 -1
- package/dist/actions/work/workspace.d.ts +15 -5
- package/dist/actions/work/workspace.d.ts.map +1 -1
- package/dist/bin/package/build.mjs +269 -185
- package/dist/bin/package/build.mjs.map +1 -1
- package/dist/bin/package/clean.mjs +137 -96
- package/dist/bin/package/clean.mjs.map +1 -1
- package/dist/bin/package/compile.mjs +149 -100
- package/dist/bin/package/compile.mjs.map +1 -1
- package/dist/bin/package/copy-assets-cjs.mjs +16 -14
- package/dist/bin/package/copy-assets-cjs.mjs.map +1 -1
- package/dist/bin/package/copy-assets-esm.mjs +16 -14
- package/dist/bin/package/copy-assets-esm.mjs.map +1 -1
- package/dist/bin/package/fix.mjs +4 -3
- package/dist/bin/package/fix.mjs.map +1 -1
- package/dist/bin/package/lint-verbose.mjs +4 -3
- package/dist/bin/package/lint-verbose.mjs.map +1 -1
- package/dist/bin/package/lint.mjs +4 -3
- package/dist/bin/package/lint.mjs.map +1 -1
- package/dist/bin/package/publint.mjs +220 -165
- package/dist/bin/package/publint.mjs.map +1 -1
- package/dist/bin/package/recompile.mjs +173 -108
- package/dist/bin/package/recompile.mjs.map +1 -1
- package/dist/bin/package/relint.mjs +4 -3
- package/dist/bin/package/relint.mjs.map +1 -1
- package/dist/bin/package/sync-layout.mjs +97 -71
- package/dist/bin/package/sync-layout.mjs.map +1 -1
- package/dist/bin/run-or-exec.mjs +8 -4
- package/dist/bin/run-or-exec.mjs.map +1 -1
- package/dist/bin/skills.mjs +494 -222
- package/dist/bin/skills.mjs.map +1 -1
- package/dist/bin/xy.mjs +2962 -2549
- package/dist/bin/xy.mjs.map +1 -1
- package/dist/lib/copyAssetFiles.d.ts +3 -1
- package/dist/lib/copyAssetFiles.d.ts.map +1 -1
- package/dist/lib/licenseCheck/checkLicenses.d.ts +18 -6
- package/dist/lib/licenseCheck/checkLicenses.d.ts.map +1 -1
- package/dist/lib/licenseCheck/collectProductionLicenses.d.ts +9 -3
- package/dist/lib/licenseCheck/collectProductionLicenses.d.ts.map +1 -1
- package/dist/lib/licenseCheck/readPackageLicense.d.ts +6 -2
- package/dist/lib/licenseCheck/readPackageLicense.d.ts.map +1 -1
- package/dist/lib/loadConfig.d.ts.map +1 -1
- package/dist/lib/match.d.ts +6 -2
- package/dist/lib/match.d.ts.map +1 -1
- package/dist/lib/pnpmConfig/readMinReleaseAge.d.ts +12 -4
- package/dist/lib/pnpmConfig/readMinReleaseAge.d.ts.map +1 -1
- package/dist/lib/safeExit.d.ts +3 -1
- package/dist/lib/safeExit.d.ts.map +1 -1
- package/dist/lib/updo/fetchRegistryInfo.d.ts.map +1 -1
- package/dist/lib/updo/interactiveSelect.d.ts +6 -2
- package/dist/lib/updo/interactiveSelect.d.ts.map +1 -1
- package/dist/lib/updo/interfaces.d.ts +15 -5
- package/dist/lib/updo/interfaces.d.ts.map +1 -1
- package/dist/lib/updo/resolveVersions.d.ts +15 -5
- package/dist/lib/updo/resolveVersions.d.ts.map +1 -1
- package/dist/lib/updo/runUpdo.d.ts +12 -4
- package/dist/lib/updo/runUpdo.d.ts.map +1 -1
- package/dist/pm/PackageManager.d.ts +45 -15
- package/dist/pm/PackageManager.d.ts.map +1 -1
- package/dist/xy/common/repo/initCommand.d.ts.map +1 -1
- package/dist/xy/common/work/options.d.ts +3 -1
- package/dist/xy/common/work/options.d.ts.map +1 -1
- package/package.json +19 -19
- package/templates/repo/cli/package/package.json.tmpl +5 -5
- package/templates/repo/cli/package/tsconfig.json.tmpl +4 -0
- package/templates/repo/cli/root/AGENTS.md.tmpl +34 -0
- package/templates/repo/cli/root/CLAUDE.md.tmpl +15 -15
- package/templates/repo/cli/root/eslint.config.ts.tmpl +16 -0
- package/templates/repo/cli/root/gitignore.tmpl +6 -9
- package/templates/repo/cli/root/package.json.tmpl +16 -14
- package/templates/repo/cli/root/tsconfig.json.tmpl +4 -0
- package/templates/repo/cli/root/{vitest.config.ts → vitest.config.ts.tmpl} +2 -2
- package/templates/repo/cli/package/tsconfig.json +0 -4
- package/templates/repo/cli/root/eslint.config.ts +0 -20
- package/templates/repo/cli/root/tsconfig.json +0 -4
|
@@ -1609,7 +1609,7 @@ globstar while`, t, d, e, f, m), this.matchOne(t.slice(d), e.slice(f), s)) retur
|
|
|
1609
1609
|
}
|
|
1610
1610
|
}
|
|
1611
1611
|
getRemainingTTL(t) {
|
|
1612
|
-
return this.#f.has(t) ?
|
|
1612
|
+
return this.#f.has(t) ? 1 / 0 : 0;
|
|
1613
1613
|
}
|
|
1614
1614
|
#M() {
|
|
1615
1615
|
let t = new Tt(this.#t), e = new Tt(this.#t);
|
|
@@ -1645,7 +1645,7 @@ globstar while`, t, d, e, f, m), this.matchOne(t.slice(d), e.slice(f), s)) retur
|
|
|
1645
1645
|
let h = this.#f.get(o);
|
|
1646
1646
|
if (h === void 0) return 0;
|
|
1647
1647
|
let a = t[h], l = e[h];
|
|
1648
|
-
if (!a || !l) return
|
|
1648
|
+
if (!a || !l) return 1 / 0;
|
|
1649
1649
|
return a - ((i || r()) - l);
|
|
1650
1650
|
}, this.#v = (o) => {
|
|
1651
1651
|
let h = e[o], a = t[o];
|
|
@@ -2433,14 +2433,14 @@ while (this[Le$1](this[Ft]()) && this[C$2].length);
|
|
|
2433
2433
|
Ie$1 = yt | j$1 | Lt;
|
|
2434
2434
|
Fi = 1023;
|
|
2435
2435
|
ie$1 = (n) => n.isFile() ? Ke$1 : n.isDirectory() ? U : n.isSymbolicLink() ? X$1 : n.isCharacterDevice() ? He$1 : n.isBlockDevice() ? qe$1 : n.isSocket() ? Ve$1 : n.isFIFO() ? Ge$1 : L$1;
|
|
2436
|
-
ze$1 = new ft({ max:
|
|
2436
|
+
ze$1 = new ft({ max: 4096 });
|
|
2437
2437
|
bt = (n) => {
|
|
2438
2438
|
let t = ze$1.get(n);
|
|
2439
2439
|
if (t) return t;
|
|
2440
2440
|
let e = n.normalize("NFKD");
|
|
2441
2441
|
return ze$1.set(n, e), e;
|
|
2442
2442
|
};
|
|
2443
|
-
Be$1 = new ft({ max:
|
|
2443
|
+
Be$1 = new ft({ max: 4096 });
|
|
2444
2444
|
_t = (n) => {
|
|
2445
2445
|
let t = Be$1.get(n);
|
|
2446
2446
|
if (t) return t;
|
|
@@ -3490,7 +3490,7 @@ while (this[Le$1](this[Ft]()) && this[C$2].length);
|
|
|
3490
3490
|
includeChildMatches;
|
|
3491
3491
|
constructor(t, e, s) {
|
|
3492
3492
|
if (this.patterns = t, this.path = e, this.opts = s, this.#n = !s.posix && s.platform === "win32" ? "\\" : "/", this.includeChildMatches = s.includeChildMatches !== !1, (s.ignore || !this.includeChildMatches) && (this.#s = Li(s.ignore ?? [], s), !this.includeChildMatches && typeof this.#s.add != "function")) throw new Error("cannot ignore child matches, ignore lacks add() method.");
|
|
3493
|
-
this.maxDepth = s.maxDepth ||
|
|
3493
|
+
this.maxDepth = s.maxDepth || 1 / 0, s.signal && (this.signal = s.signal, this.signal.addEventListener("abort", () => {
|
|
3494
3494
|
this.#t.length = 0;
|
|
3495
3495
|
}));
|
|
3496
3496
|
}
|
|
@@ -3527,7 +3527,7 @@ while (this[Le$1](this[Ft]()) && this[C$2].length);
|
|
|
3527
3527
|
return this.matchCheckTest(r, e);
|
|
3528
3528
|
}
|
|
3529
3529
|
matchCheckTest(t, e) {
|
|
3530
|
-
return t && (this.maxDepth ===
|
|
3530
|
+
return t && (this.maxDepth === 1 / 0 || t.depth() <= this.maxDepth) && (!e || t.canReaddir()) && (!this.opts.nodir || !t.isDirectory()) && (!this.opts.nodir || !this.opts.follow || !t.isSymbolicLink() || !t.realpathCached()?.isDirectory()) && !this.#r(t) ? t : void 0;
|
|
3531
3531
|
}
|
|
3532
3532
|
matchCheckSync(t, e) {
|
|
3533
3533
|
if (e && this.opts.nodir) return;
|
|
@@ -3584,7 +3584,7 @@ while (this[Le$1](this[Ft]()) && this[C$2].length);
|
|
|
3584
3584
|
};
|
|
3585
3585
|
for (let [h, a, l] of s.matches.entries()) this.#r(h) || (r++, this.match(h, a, l).then(() => o()));
|
|
3586
3586
|
for (let h of s.subwalkTargets()) {
|
|
3587
|
-
if (this.maxDepth !==
|
|
3587
|
+
if (this.maxDepth !== 1 / 0 && h.depth() >= this.maxDepth) continue;
|
|
3588
3588
|
r++;
|
|
3589
3589
|
let a = h.readdirCached();
|
|
3590
3590
|
h.calledReaddir() ? this.walkCB3(h, a, s, o) : h.readdirCB((l, u) => this.walkCB3(h, u, s, o), !0);
|
|
@@ -3615,7 +3615,7 @@ while (this[Le$1](this[Ft]()) && this[C$2].length);
|
|
|
3615
3615
|
};
|
|
3616
3616
|
for (let [h, a, l] of s.matches.entries()) this.#r(h) || this.matchSync(h, a, l);
|
|
3617
3617
|
for (let h of s.subwalkTargets()) {
|
|
3618
|
-
if (this.maxDepth !==
|
|
3618
|
+
if (this.maxDepth !== 1 / 0 && h.depth() >= this.maxDepth) continue;
|
|
3619
3619
|
r++;
|
|
3620
3620
|
let a = h.readdirSync();
|
|
3621
3621
|
this.walkCB3Sync(h, a, s, o);
|
|
@@ -3707,7 +3707,7 @@ while (this[Le$1](this[Ft]()) && this[C$2].length);
|
|
|
3707
3707
|
patterns;
|
|
3708
3708
|
constructor(t, e) {
|
|
3709
3709
|
if (!e) throw new TypeError("glob options required");
|
|
3710
|
-
if (this.withFileTypes = !!e.withFileTypes, this.signal = e.signal, this.follow = !!e.follow, this.dot = !!e.dot, this.dotRelative = !!e.dotRelative, this.nodir = !!e.nodir, this.mark = !!e.mark, e.cwd ? (e.cwd instanceof URL || e.cwd.startsWith("file://")) && (e.cwd = fileURLToPath(e.cwd)) : this.cwd = "", this.cwd = e.cwd || "", this.root = e.root, this.magicalBraces = !!e.magicalBraces, this.nobrace = !!e.nobrace, this.noext = !!e.noext, this.realpath = !!e.realpath, this.absolute = e.absolute, this.includeChildMatches = e.includeChildMatches !== !1, this.noglobstar = !!e.noglobstar, this.matchBase = !!e.matchBase, this.maxDepth = typeof e.maxDepth == "number" ? e.maxDepth :
|
|
3710
|
+
if (this.withFileTypes = !!e.withFileTypes, this.signal = e.signal, this.follow = !!e.follow, this.dot = !!e.dot, this.dotRelative = !!e.dotRelative, this.nodir = !!e.nodir, this.mark = !!e.mark, e.cwd ? (e.cwd instanceof URL || e.cwd.startsWith("file://")) && (e.cwd = fileURLToPath(e.cwd)) : this.cwd = "", this.cwd = e.cwd || "", this.root = e.root, this.magicalBraces = !!e.magicalBraces, this.nobrace = !!e.nobrace, this.noext = !!e.noext, this.realpath = !!e.realpath, this.absolute = e.absolute, this.includeChildMatches = e.includeChildMatches !== !1, this.noglobstar = !!e.noglobstar, this.matchBase = !!e.matchBase, this.maxDepth = typeof e.maxDepth == "number" ? e.maxDepth : 1 / 0, this.stat = !!e.stat, this.ignore = e.ignore, this.withFileTypes && this.absolute !== void 0) throw new Error("cannot set absolute and withFileTypes:true");
|
|
3711
3711
|
if (typeof t == "string" && (t = [t]), this.windowsPathsNoEscape = !!e.windowsPathsNoEscape || e.allowWindowsEscape === !1, this.windowsPathsNoEscape && (t = t.map((a) => a.replace(/\\/g, "/"))), this.matchBase) {
|
|
3712
3712
|
if (e.noglobstar) throw new TypeError("base matching requires globstar");
|
|
3713
3713
|
t = t.map((a) => a.includes("/") ? a : `./**/${a}`);
|
|
@@ -3750,7 +3750,7 @@ while (this[Le$1](this[Ft]()) && this[C$2].length);
|
|
|
3750
3750
|
async walk() {
|
|
3751
3751
|
return [...await new xt(this.patterns, this.scurry.cwd, {
|
|
3752
3752
|
...this.opts,
|
|
3753
|
-
maxDepth: this.maxDepth !==
|
|
3753
|
+
maxDepth: this.maxDepth !== 1 / 0 ? this.maxDepth + this.scurry.cwd.depth() : 1 / 0,
|
|
3754
3754
|
platform: this.platform,
|
|
3755
3755
|
nocase: this.nocase,
|
|
3756
3756
|
includeChildMatches: this.includeChildMatches
|
|
@@ -3759,7 +3759,7 @@ while (this[Le$1](this[Ft]()) && this[C$2].length);
|
|
|
3759
3759
|
walkSync() {
|
|
3760
3760
|
return [...new xt(this.patterns, this.scurry.cwd, {
|
|
3761
3761
|
...this.opts,
|
|
3762
|
-
maxDepth: this.maxDepth !==
|
|
3762
|
+
maxDepth: this.maxDepth !== 1 / 0 ? this.maxDepth + this.scurry.cwd.depth() : 1 / 0,
|
|
3763
3763
|
platform: this.platform,
|
|
3764
3764
|
nocase: this.nocase,
|
|
3765
3765
|
includeChildMatches: this.includeChildMatches
|
|
@@ -3768,7 +3768,7 @@ while (this[Le$1](this[Ft]()) && this[C$2].length);
|
|
|
3768
3768
|
stream() {
|
|
3769
3769
|
return new vt(this.patterns, this.scurry.cwd, {
|
|
3770
3770
|
...this.opts,
|
|
3771
|
-
maxDepth: this.maxDepth !==
|
|
3771
|
+
maxDepth: this.maxDepth !== 1 / 0 ? this.maxDepth + this.scurry.cwd.depth() : 1 / 0,
|
|
3772
3772
|
platform: this.platform,
|
|
3773
3773
|
nocase: this.nocase,
|
|
3774
3774
|
includeChildMatches: this.includeChildMatches
|
|
@@ -3777,7 +3777,7 @@ while (this[Le$1](this[Ft]()) && this[C$2].length);
|
|
|
3777
3777
|
streamSync() {
|
|
3778
3778
|
return new vt(this.patterns, this.scurry.cwd, {
|
|
3779
3779
|
...this.opts,
|
|
3780
|
-
maxDepth: this.maxDepth !==
|
|
3780
|
+
maxDepth: this.maxDepth !== 1 / 0 ? this.maxDepth + this.scurry.cwd.depth() : 1 / 0,
|
|
3781
3781
|
platform: this.platform,
|
|
3782
3782
|
nocase: this.nocase,
|
|
3783
3783
|
includeChildMatches: this.includeChildMatches
|
|
@@ -3973,8 +3973,10 @@ var require_which = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3973
3973
|
if (ii === pathExt.length) return resolve(step(i + 1));
|
|
3974
3974
|
const ext = pathExt[ii];
|
|
3975
3975
|
isexe(p + ext, { pathExt: pathExtExe }, (er, is) => {
|
|
3976
|
-
if (!er && is)
|
|
3977
|
-
|
|
3976
|
+
if (!er && is) {
|
|
3977
|
+
if (opt.all) found.push(p + ext);
|
|
3978
|
+
else return resolve(p + ext);
|
|
3979
|
+
}
|
|
3978
3980
|
return resolve(subStep(p, i, ii + 1));
|
|
3979
3981
|
});
|
|
3980
3982
|
});
|
|
@@ -3992,8 +3994,10 @@ var require_which = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3992
3994
|
for (let j = 0; j < pathExt.length; j++) {
|
|
3993
3995
|
const cur = p + pathExt[j];
|
|
3994
3996
|
try {
|
|
3995
|
-
if (isexe.sync(cur, { pathExt: pathExtExe }))
|
|
3996
|
-
|
|
3997
|
+
if (isexe.sync(cur, { pathExt: pathExtExe })) {
|
|
3998
|
+
if (opt.all) found.push(cur);
|
|
3999
|
+
else return cur;
|
|
4000
|
+
}
|
|
3997
4001
|
} catch (ex) {}
|
|
3998
4002
|
}
|
|
3999
4003
|
}
|
|
@@ -4515,9 +4519,10 @@ var require_semver = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4515
4519
|
module.exports = class SemVer {
|
|
4516
4520
|
constructor(version, options) {
|
|
4517
4521
|
options = parseOptions(options);
|
|
4518
|
-
if (version instanceof SemVer)
|
|
4519
|
-
|
|
4520
|
-
|
|
4522
|
+
if (version instanceof SemVer) {
|
|
4523
|
+
if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) return version;
|
|
4524
|
+
else version = version.version;
|
|
4525
|
+
} else if (typeof version !== "string") throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`);
|
|
4521
4526
|
if (version.length > MAX_LENGTH) throw new TypeError(`version is longer than ${MAX_LENGTH} characters`);
|
|
4522
4527
|
debug("SemVer", version, options);
|
|
4523
4528
|
this.options = options;
|
|
@@ -4804,8 +4809,10 @@ var require_range = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4804
4809
|
module.exports = class Range {
|
|
4805
4810
|
constructor(range, options) {
|
|
4806
4811
|
options = parseOptions(options);
|
|
4807
|
-
if (range instanceof Range)
|
|
4808
|
-
|
|
4812
|
+
if (range instanceof Range) {
|
|
4813
|
+
if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) return range;
|
|
4814
|
+
else return new Range(range.raw, options);
|
|
4815
|
+
}
|
|
4809
4816
|
if (range instanceof Comparator) {
|
|
4810
4817
|
this.raw = range.value;
|
|
4811
4818
|
this.set = [[range]];
|
|
@@ -4975,18 +4982,21 @@ var require_range = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4975
4982
|
let ret;
|
|
4976
4983
|
if (isX(M)) ret = "";
|
|
4977
4984
|
else if (isX(m)) ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`;
|
|
4978
|
-
else if (isX(p))
|
|
4979
|
-
|
|
4980
|
-
|
|
4985
|
+
else if (isX(p)) {
|
|
4986
|
+
if (M === "0") ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`;
|
|
4987
|
+
else ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`;
|
|
4988
|
+
} else if (pr) {
|
|
4981
4989
|
debug("replaceCaret pr", pr);
|
|
4982
|
-
if (M === "0")
|
|
4983
|
-
|
|
4984
|
-
|
|
4990
|
+
if (M === "0") {
|
|
4991
|
+
if (m === "0") ret = `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0`;
|
|
4992
|
+
else ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
|
|
4993
|
+
} else ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`;
|
|
4985
4994
|
} else {
|
|
4986
4995
|
debug("no pr");
|
|
4987
|
-
if (M === "0")
|
|
4988
|
-
|
|
4989
|
-
|
|
4996
|
+
if (M === "0") {
|
|
4997
|
+
if (m === "0") ret = `>=${M}.${m}.${p} <${M}.${m}.${+p + 1}-0`;
|
|
4998
|
+
else ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`;
|
|
4999
|
+
} else ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`;
|
|
4990
5000
|
}
|
|
4991
5001
|
debug("caret return", ret);
|
|
4992
5002
|
return ret;
|
|
@@ -5008,9 +5018,10 @@ var require_range = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
5008
5018
|
const anyX = xp;
|
|
5009
5019
|
if (gtlt === "=" && anyX) gtlt = "";
|
|
5010
5020
|
pr = options.includePrerelease ? "-0" : "";
|
|
5011
|
-
if (xM)
|
|
5012
|
-
|
|
5013
|
-
|
|
5021
|
+
if (xM) {
|
|
5022
|
+
if (gtlt === ">" || gtlt === "<") ret = "<0.0.0-0";
|
|
5023
|
+
else ret = "*";
|
|
5024
|
+
} else if (gtlt && anyX) {
|
|
5014
5025
|
if (xm) m = 0;
|
|
5015
5026
|
p = 0;
|
|
5016
5027
|
if (gtlt === ">") {
|
|
@@ -5084,8 +5095,10 @@ var require_comparator = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
5084
5095
|
}
|
|
5085
5096
|
constructor(comp, options) {
|
|
5086
5097
|
options = parseOptions(options);
|
|
5087
|
-
if (comp instanceof Comparator)
|
|
5088
|
-
|
|
5098
|
+
if (comp instanceof Comparator) {
|
|
5099
|
+
if (comp.loose === !!options.loose) return comp;
|
|
5100
|
+
else comp = comp.value;
|
|
5101
|
+
}
|
|
5089
5102
|
comp = comp.trim().split(/\s+/).join(" ");
|
|
5090
5103
|
debug("comparator", comp, options);
|
|
5091
5104
|
this.options = options;
|
|
@@ -5897,8 +5910,10 @@ var require_omap = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
5897
5910
|
let pairHasKey = false;
|
|
5898
5911
|
if (_toString.call(pair) !== "[object Object]") return false;
|
|
5899
5912
|
let pairKey;
|
|
5900
|
-
for (pairKey in pair) if (_hasOwnProperty.call(pair, pairKey))
|
|
5901
|
-
|
|
5913
|
+
for (pairKey in pair) if (_hasOwnProperty.call(pair, pairKey)) {
|
|
5914
|
+
if (!pairHasKey) pairHasKey = true;
|
|
5915
|
+
else return false;
|
|
5916
|
+
}
|
|
5902
5917
|
if (!pairHasKey) return false;
|
|
5903
5918
|
if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey);
|
|
5904
5919
|
else return false;
|
|
@@ -6238,9 +6253,10 @@ var require_loader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
6238
6253
|
if (typeof keyNode === "object" && _class(keyNode) === "[object Object]") keyNode = "[object Object]";
|
|
6239
6254
|
keyNode = String(keyNode);
|
|
6240
6255
|
if (_result === null) _result = {};
|
|
6241
|
-
if (keyTag === "tag:yaml.org,2002:merge")
|
|
6242
|
-
|
|
6243
|
-
|
|
6256
|
+
if (keyTag === "tag:yaml.org,2002:merge") {
|
|
6257
|
+
if (Array.isArray(valueNode)) for (let index = 0, quantity = valueNode.length; index < quantity; index += 1) mergeMappings(state, _result, valueNode[index], overridableKeys);
|
|
6258
|
+
else mergeMappings(state, _result, valueNode, overridableKeys);
|
|
6259
|
+
} else {
|
|
6244
6260
|
if (!state.json && !_hasOwnProperty.call(overridableKeys, keyNode) && _hasOwnProperty.call(_result, keyNode)) {
|
|
6245
6261
|
state.line = startLine || state.line;
|
|
6246
6262
|
state.lineStart = startLineStart || state.lineStart;
|
|
@@ -6525,14 +6541,16 @@ var require_loader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
6525
6541
|
state.result = "";
|
|
6526
6542
|
while (ch !== 0) {
|
|
6527
6543
|
ch = state.input.charCodeAt(++state.position);
|
|
6528
|
-
if (ch === 43 || ch === 45)
|
|
6529
|
-
|
|
6530
|
-
|
|
6531
|
-
else if (
|
|
6532
|
-
|
|
6533
|
-
detectedIndent
|
|
6534
|
-
|
|
6535
|
-
|
|
6544
|
+
if (ch === 43 || ch === 45) {
|
|
6545
|
+
if (CHOMPING_CLIP === chomping) chomping = ch === 43 ? CHOMPING_KEEP : CHOMPING_STRIP;
|
|
6546
|
+
else throwError(state, "repeat of a chomping mode identifier");
|
|
6547
|
+
} else if ((tmp = fromDecimalCode(ch)) >= 0) {
|
|
6548
|
+
if (tmp === 0) throwError(state, "bad explicit indentation width of a block scalar; it cannot be less than one");
|
|
6549
|
+
else if (!detectedIndent) {
|
|
6550
|
+
textIndent = nodeIndent + tmp - 1;
|
|
6551
|
+
detectedIndent = true;
|
|
6552
|
+
} else throwError(state, "repeat of an indentation width identifier");
|
|
6553
|
+
} else break;
|
|
6536
6554
|
}
|
|
6537
6555
|
if (isWhiteSpace(ch)) {
|
|
6538
6556
|
do
|
|
@@ -6563,16 +6581,17 @@ var require_loader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
6563
6581
|
}
|
|
6564
6582
|
break;
|
|
6565
6583
|
}
|
|
6566
|
-
if (folding)
|
|
6567
|
-
|
|
6568
|
-
|
|
6569
|
-
|
|
6570
|
-
atMoreIndented
|
|
6571
|
-
|
|
6572
|
-
|
|
6573
|
-
if (
|
|
6574
|
-
|
|
6575
|
-
|
|
6584
|
+
if (folding) {
|
|
6585
|
+
if (isWhiteSpace(ch)) {
|
|
6586
|
+
atMoreIndented = true;
|
|
6587
|
+
state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines);
|
|
6588
|
+
} else if (atMoreIndented) {
|
|
6589
|
+
atMoreIndented = false;
|
|
6590
|
+
state.result += common.repeat("\n", emptyLines + 1);
|
|
6591
|
+
} else if (emptyLines === 0) {
|
|
6592
|
+
if (didReadContent) state.result += " ";
|
|
6593
|
+
} else state.result += common.repeat("\n", emptyLines);
|
|
6594
|
+
} else state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines);
|
|
6576
6595
|
didReadContent = true;
|
|
6577
6596
|
detectedIndent = true;
|
|
6578
6597
|
emptyLines = 0;
|
|
@@ -6701,8 +6720,10 @@ var require_loader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
6701
6720
|
_keyLineStart = state.lineStart;
|
|
6702
6721
|
_keyPos = state.position;
|
|
6703
6722
|
}
|
|
6704
|
-
if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact))
|
|
6705
|
-
|
|
6723
|
+
if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) {
|
|
6724
|
+
if (atExplicitKey) keyNode = state.result;
|
|
6725
|
+
else valueNode = state.result;
|
|
6726
|
+
}
|
|
6706
6727
|
if (!atExplicitKey) {
|
|
6707
6728
|
storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _keyLine, _keyLineStart, _keyPos);
|
|
6708
6729
|
keyTag = keyNode = valueNode = null;
|
|
@@ -6750,12 +6771,14 @@ var require_loader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
6750
6771
|
} else throwError(state, "unexpected end of the stream within a verbatim tag");
|
|
6751
6772
|
} else {
|
|
6752
6773
|
while (ch !== 0 && !isWsOrEol(ch)) {
|
|
6753
|
-
if (ch === 33)
|
|
6754
|
-
|
|
6755
|
-
|
|
6756
|
-
|
|
6757
|
-
|
|
6758
|
-
|
|
6774
|
+
if (ch === 33) {
|
|
6775
|
+
if (!isNamed) {
|
|
6776
|
+
tagHandle = state.input.slice(_position - 1, state.position + 1);
|
|
6777
|
+
if (!PATTERN_TAG_HANDLE.test(tagHandle)) throwError(state, "named tag handle cannot contain such characters");
|
|
6778
|
+
isNamed = true;
|
|
6779
|
+
_position = state.position + 1;
|
|
6780
|
+
} else throwError(state, "tag suffix cannot contain exclamation marks");
|
|
6781
|
+
}
|
|
6759
6782
|
ch = state.input.charCodeAt(++state.position);
|
|
6760
6783
|
}
|
|
6761
6784
|
tagName = state.input.slice(_position, state.position);
|
|
@@ -6859,21 +6882,22 @@ var require_loader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
6859
6882
|
if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) flowIndent = parentIndent;
|
|
6860
6883
|
else flowIndent = parentIndent + 1;
|
|
6861
6884
|
blockIndent = state.position - state.lineStart;
|
|
6862
|
-
if (indentStatus === 1)
|
|
6863
|
-
|
|
6864
|
-
|
|
6865
|
-
|
|
6866
|
-
|
|
6867
|
-
|
|
6868
|
-
|
|
6869
|
-
|
|
6870
|
-
|
|
6871
|
-
|
|
6872
|
-
|
|
6885
|
+
if (indentStatus === 1) {
|
|
6886
|
+
if (allowBlockCollections && (readBlockSequence(state, blockIndent) || readBlockMapping(state, blockIndent, flowIndent)) || readFlowCollection(state, flowIndent)) hasContent = true;
|
|
6887
|
+
else {
|
|
6888
|
+
const ch = state.input.charCodeAt(state.position);
|
|
6889
|
+
if (propertyStart !== null && allowBlockStyles && !allowBlockCollections && ch !== 124 && ch !== 62 && tryReadBlockMappingFromProperty(state, propertyStart, propertyStart.position - propertyStart.lineStart, flowIndent)) hasContent = true;
|
|
6890
|
+
else if (allowBlockScalars && readBlockScalar(state, flowIndent) || readSingleQuotedScalar(state, flowIndent) || readDoubleQuotedScalar(state, flowIndent)) hasContent = true;
|
|
6891
|
+
else if (readAlias(state)) {
|
|
6892
|
+
hasContent = true;
|
|
6893
|
+
if (state.tag !== null || state.anchor !== null) throwError(state, "alias node should not have any properties");
|
|
6894
|
+
} else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) {
|
|
6895
|
+
hasContent = true;
|
|
6896
|
+
if (state.tag === null) state.tag = "?";
|
|
6897
|
+
}
|
|
6898
|
+
if (state.anchor !== null) storeAnchor(state, state.anchor, state.result);
|
|
6873
6899
|
}
|
|
6874
|
-
|
|
6875
|
-
}
|
|
6876
|
-
else if (indentStatus === 0) hasContent = allowBlockCollections && readBlockSequence(state, blockIndent);
|
|
6900
|
+
} else if (indentStatus === 0) hasContent = allowBlockCollections && readBlockSequence(state, blockIndent);
|
|
6877
6901
|
}
|
|
6878
6902
|
if (state.tag === null) {
|
|
6879
6903
|
if (state.anchor !== null) storeAnchor(state, state.anchor, state.result);
|
|
@@ -7379,8 +7403,10 @@ var require_dumper = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
7379
7403
|
if (state.replacer) objectValue = state.replacer.call(object, objectKey, objectValue);
|
|
7380
7404
|
if (!writeNode(state, level + 1, objectKey, true, true, true)) continue;
|
|
7381
7405
|
const explicitPair = state.tag !== null && state.tag !== "?" || state.dump && state.dump.length > 1024;
|
|
7382
|
-
if (explicitPair)
|
|
7383
|
-
|
|
7406
|
+
if (explicitPair) {
|
|
7407
|
+
if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) pairBuffer += "?";
|
|
7408
|
+
else pairBuffer += "? ";
|
|
7409
|
+
}
|
|
7384
7410
|
pairBuffer += state.dump;
|
|
7385
7411
|
if (explicitPair) pairBuffer += generateNextLine(state, level);
|
|
7386
7412
|
if (!writeNode(state, level + 1, objectValue, true, explicitPair)) continue;
|
|
@@ -7397,9 +7423,10 @@ var require_dumper = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
7397
7423
|
for (let index = 0, length = typeList.length; index < length; index += 1) {
|
|
7398
7424
|
const type = typeList[index];
|
|
7399
7425
|
if ((type.instanceOf || type.predicate) && (!type.instanceOf || typeof object === "object" && object instanceof type.instanceOf) && (!type.predicate || type.predicate(object))) {
|
|
7400
|
-
if (explicit)
|
|
7401
|
-
|
|
7402
|
-
|
|
7426
|
+
if (explicit) {
|
|
7427
|
+
if (type.multi && type.representName) state.tag = type.representName(object);
|
|
7428
|
+
else state.tag = type.tag;
|
|
7429
|
+
} else state.tag = "?";
|
|
7403
7430
|
if (type.represent) {
|
|
7404
7431
|
const style = state.styleMap[type.tag] || type.defaultStyle;
|
|
7405
7432
|
let _result;
|
|
@@ -7431,22 +7458,24 @@ var require_dumper = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
7431
7458
|
if (duplicate && state.usedDuplicates[duplicateIndex]) state.dump = "*ref_" + duplicateIndex;
|
|
7432
7459
|
else {
|
|
7433
7460
|
if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) state.usedDuplicates[duplicateIndex] = true;
|
|
7434
|
-
if (type === "[object Object]")
|
|
7435
|
-
|
|
7436
|
-
|
|
7437
|
-
|
|
7438
|
-
|
|
7439
|
-
|
|
7440
|
-
|
|
7441
|
-
|
|
7442
|
-
|
|
7443
|
-
|
|
7444
|
-
|
|
7445
|
-
|
|
7446
|
-
|
|
7447
|
-
|
|
7448
|
-
|
|
7449
|
-
|
|
7461
|
+
if (type === "[object Object]") {
|
|
7462
|
+
if (block && Object.keys(state.dump).length !== 0) {
|
|
7463
|
+
writeBlockMapping(state, level, state.dump, compact);
|
|
7464
|
+
if (duplicate) state.dump = "&ref_" + duplicateIndex + state.dump;
|
|
7465
|
+
} else {
|
|
7466
|
+
writeFlowMapping(state, level, state.dump);
|
|
7467
|
+
if (duplicate) state.dump = "&ref_" + duplicateIndex + " " + state.dump;
|
|
7468
|
+
}
|
|
7469
|
+
} else if (type === "[object Array]") {
|
|
7470
|
+
if (block && state.dump.length !== 0) {
|
|
7471
|
+
if (state.noArrayIndent && !isblockseq && level > 0) writeBlockSequence(state, level - 1, state.dump, compact);
|
|
7472
|
+
else writeBlockSequence(state, level, state.dump, compact);
|
|
7473
|
+
if (duplicate) state.dump = "&ref_" + duplicateIndex + state.dump;
|
|
7474
|
+
} else {
|
|
7475
|
+
writeFlowSequence(state, level, state.dump);
|
|
7476
|
+
if (duplicate) state.dump = "&ref_" + duplicateIndex + " " + state.dump;
|
|
7477
|
+
}
|
|
7478
|
+
} else if (type === "[object String]") {
|
|
7450
7479
|
if (state.tag !== "?") writeScalar(state, state.dump, level, iskey, inblock);
|
|
7451
7480
|
} else if (type === "[object Undefined]") return false;
|
|
7452
7481
|
else {
|
|
@@ -8556,12 +8585,16 @@ function deprecatedRuleConfigAliases(configKey) {
|
|
|
8556
8585
|
var import_dist = require_dist();
|
|
8557
8586
|
const configState = {
|
|
8558
8587
|
config: void 0,
|
|
8559
|
-
/**
|
|
8588
|
+
/**
|
|
8589
|
+
In-flight root load so concurrent callers share one cosmiconfig search.
|
|
8590
|
+
*/
|
|
8560
8591
|
loadPromise: void 0,
|
|
8561
8592
|
rootConfigPath: void 0
|
|
8562
8593
|
};
|
|
8563
8594
|
const workspaceConfigCache = /* @__PURE__ */ new Map();
|
|
8564
|
-
/**
|
|
8595
|
+
/**
|
|
8596
|
+
In-flight workspace loads — concurrent jobs for the same dir share one search.
|
|
8597
|
+
*/
|
|
8565
8598
|
const workspaceConfigLoadPromises = /* @__PURE__ */ new Map();
|
|
8566
8599
|
const deprecationWarned = /* @__PURE__ */ new Set();
|
|
8567
8600
|
function isRecord$1(value) {
|
|
@@ -8629,7 +8662,9 @@ async function loadWorkspaceConfig(workspaceDir) {
|
|
|
8629
8662
|
workspaceConfigLoadPromises.delete(workspaceDir);
|
|
8630
8663
|
}
|
|
8631
8664
|
}
|
|
8632
|
-
/**
|
|
8665
|
+
/**
|
|
8666
|
+
Deprecated top-level fields that should be under `commands`.
|
|
8667
|
+
*/
|
|
8633
8668
|
const DEPRECATED_COMMAND_FIELDS = /* @__PURE__ */ new Set(["deplint", "publint"]);
|
|
8634
8669
|
function warnOnce(key, message) {
|
|
8635
8670
|
if (deprecationWarned.has(key)) return;
|
|
@@ -10164,9 +10199,10 @@ var Minimatch = class {
|
|
|
10164
10199
|
const next = pp[i + 1];
|
|
10165
10200
|
const prev = pp[i - 1];
|
|
10166
10201
|
if (p !== GLOBSTAR || prev === GLOBSTAR) return;
|
|
10167
|
-
if (prev === void 0)
|
|
10168
|
-
|
|
10169
|
-
|
|
10202
|
+
if (prev === void 0) {
|
|
10203
|
+
if (next !== void 0 && next !== GLOBSTAR) pp[i + 1] = "(?:\\/|" + twoStar + "\\/)?" + next;
|
|
10204
|
+
else pp[i] = twoStar;
|
|
10205
|
+
} else if (next === void 0) pp[i - 1] = prev + "(?:\\/|\\/" + twoStar + ")?";
|
|
10170
10206
|
else if (next !== GLOBSTAR) {
|
|
10171
10207
|
pp[i - 1] = prev + "(?:\\/|\\/" + twoStar + "\\/)" + next;
|
|
10172
10208
|
pp[i + 1] = GLOBSTAR;
|
|
@@ -10240,7 +10276,9 @@ function makeMatcher(pattern, options = {}) {
|
|
|
10240
10276
|
const patterns = Array.isArray(pattern) ? pattern : [pattern];
|
|
10241
10277
|
return (input) => patterns.some((p) => minimatch(input, p, options));
|
|
10242
10278
|
}
|
|
10243
|
-
/**
|
|
10279
|
+
/**
|
|
10280
|
+
Convenience one-shot test: `isMatch(input, pattern)`.
|
|
10281
|
+
*/
|
|
10244
10282
|
function isMatch(input, pattern, options = {}) {
|
|
10245
10283
|
return makeMatcher(pattern, options)(input);
|
|
10246
10284
|
}
|
|
@@ -12654,11 +12692,15 @@ function normalizeReexportTargets(value) {
|
|
|
12654
12692
|
if (value === void 0) return [];
|
|
12655
12693
|
return Array.isArray(value) ? value : [value];
|
|
12656
12694
|
}
|
|
12657
|
-
/**
|
|
12695
|
+
/**
|
|
12696
|
+
Package-like specifier: not a hash alias and not a relative/absolute path.
|
|
12697
|
+
*/
|
|
12658
12698
|
function isPackageLikeSpecifier(spec) {
|
|
12659
12699
|
return !spec.startsWith("#") && !spec.startsWith(".") && !spec.startsWith("/");
|
|
12660
12700
|
}
|
|
12661
|
-
/**
|
|
12701
|
+
/**
|
|
12702
|
+
Configured `reexport` targets for a module, if any.
|
|
12703
|
+
*/
|
|
12662
12704
|
function moduleReexportTargets(mod) {
|
|
12663
12705
|
return normalizeReexportTargets(mod.reexport);
|
|
12664
12706
|
}
|
|
@@ -12687,7 +12729,9 @@ function moduleShimTargets(mod) {
|
|
|
12687
12729
|
if (fromReexport.length > 0) return fromReexport;
|
|
12688
12730
|
return [`#${mod.name}`];
|
|
12689
12731
|
}
|
|
12690
|
-
/**
|
|
12732
|
+
/**
|
|
12733
|
+
Builds a pure star-reexport TypeScript (or mjs) source body (no header).
|
|
12734
|
+
*/
|
|
12691
12735
|
function buildStarReexportLines(targets, options = {}) {
|
|
12692
12736
|
const semi = options.semi === false ? "" : ";";
|
|
12693
12737
|
return `${targets.map((target) => `export * from '${target}'${semi}`).join("\n")}\n`;
|
|
@@ -12905,7 +12949,9 @@ function buildAliasDistPaths(aliasImports = {}) {
|
|
|
12905
12949
|
for (const [alias, srcPath] of Object.entries(aliasImports)) result[alias] = srcPathToDistPath(srcPath);
|
|
12906
12950
|
return result;
|
|
12907
12951
|
}
|
|
12908
|
-
/**
|
|
12952
|
+
/**
|
|
12953
|
+
Resolves a `#hash` import specifier to its dist path for a platform.
|
|
12954
|
+
*/
|
|
12909
12955
|
function hashToDistPath(spec, platform, config) {
|
|
12910
12956
|
const conditional = buildConditionalDistPaths(config.conditionalImports)[spec];
|
|
12911
12957
|
if (conditional?.[platform] !== void 0) return conditional[platform];
|
|
@@ -12991,7 +13037,9 @@ function buildModelTs(modules) {
|
|
|
12991
13037
|
function buildModuleShim(mod) {
|
|
12992
13038
|
return `${GENERATED_HEADER}${buildStarReexportLines(moduleShimTargets(mod), { semi: false })}`;
|
|
12993
13039
|
}
|
|
12994
|
-
/**
|
|
13040
|
+
/**
|
|
13041
|
+
Generated module body for facade modules with `reexport` targets.
|
|
13042
|
+
*/
|
|
12995
13043
|
function buildModuleReexportIndex(mod) {
|
|
12996
13044
|
return `${GENERATED_HEADER}${buildStarReexportLines(moduleReexportTargets(mod), { semi: false })}`;
|
|
12997
13045
|
}
|
|
@@ -13017,7 +13065,9 @@ function listDistPlatforms(config) {
|
|
|
13017
13065
|
...fromEntries
|
|
13018
13066
|
])];
|
|
13019
13067
|
}
|
|
13020
|
-
/**
|
|
13068
|
+
/**
|
|
13069
|
+
True when the package publishes a type-only model barrel (`src/model.ts`).
|
|
13070
|
+
*/
|
|
13021
13071
|
function monolithHasModelBarrel(config) {
|
|
13022
13072
|
return config.modules.some((mod) => mod.model ?? false);
|
|
13023
13073
|
}
|
|
@@ -13141,7 +13191,9 @@ function rewriteDtsFile(file, platform, platformDir, config) {
|
|
|
13141
13191
|
}
|
|
13142
13192
|
return false;
|
|
13143
13193
|
}
|
|
13144
|
-
/**
|
|
13194
|
+
/**
|
|
13195
|
+
Returns the number of declaration files rewritten.
|
|
13196
|
+
*/
|
|
13145
13197
|
function fixMonolithDeclarations(distDir, config) {
|
|
13146
13198
|
const platforms = listDistPlatforms(config).filter((platform) => fs.existsSync(PATH.join(distDir, platform)));
|
|
13147
13199
|
const platformShimDirs = buildPlatformShimDirs(config.platformEntries);
|
|
@@ -13243,7 +13295,9 @@ function modulesPlatformEntries(mod, config, isExternal, modulesPlatform) {
|
|
|
13243
13295
|
};
|
|
13244
13296
|
return shims;
|
|
13245
13297
|
}
|
|
13246
|
-
/**
|
|
13298
|
+
/**
|
|
13299
|
+
Master barrel entry for a platform (`index.entries` override or `./index.ts`).
|
|
13300
|
+
*/
|
|
13247
13301
|
function masterBarrelEntry(config, platform) {
|
|
13248
13302
|
return config.index?.entries?.[platform] ?? "./index.ts";
|
|
13249
13303
|
}
|
|
@@ -13306,7 +13360,9 @@ function isPathInside(parent, candidate) {
|
|
|
13306
13360
|
const relative = PATH.relative(parent, candidate);
|
|
13307
13361
|
return relative.length > 0 && relative !== ".." && !relative.startsWith(`..${PATH.sep}`) && !PATH.isAbsolute(relative);
|
|
13308
13362
|
}
|
|
13309
|
-
/**
|
|
13363
|
+
/**
|
|
13364
|
+
Resolves configured copy destinations without requiring their sources to exist.
|
|
13365
|
+
*/
|
|
13310
13366
|
function listMonolithCopyEntries(packageDir, config) {
|
|
13311
13367
|
const distDir = PATH.resolve(packageDir, "dist");
|
|
13312
13368
|
const entries = [];
|
|
@@ -13344,7 +13400,9 @@ function resolveCopySource(packageDir, source) {
|
|
|
13344
13400
|
if (!fs.existsSync(resolved) || !fs.statSync(resolved).isFile()) throw new Error(`Monolith copy entry source is not a file: "${source}" (${resolved})`);
|
|
13345
13401
|
return resolved;
|
|
13346
13402
|
}
|
|
13347
|
-
/**
|
|
13403
|
+
/**
|
|
13404
|
+
Copies configured opaque entries into their exact dist destinations.
|
|
13405
|
+
*/
|
|
13348
13406
|
function copyMonolithEntries(packageDir, config) {
|
|
13349
13407
|
const entries = listMonolithCopyEntries(packageDir, config);
|
|
13350
13408
|
for (const entry of entries) {
|
|
@@ -13368,7 +13426,9 @@ function assertNoManualEntries(compile) {
|
|
|
13368
13426
|
for (const options of Object.values(target)) if (options?.entry !== void 0) throw new Error(`monolith mode computes entries; remove compile.${platform} entry`);
|
|
13369
13427
|
}
|
|
13370
13428
|
}
|
|
13371
|
-
/**
|
|
13429
|
+
/**
|
|
13430
|
+
Merges computed entries into a platform target, preserving other options.
|
|
13431
|
+
*/
|
|
13372
13432
|
function platformTarget(existing, entry, isExternalLinkage) {
|
|
13373
13433
|
const base = typeof existing === "object" && existing !== null ? existing : {};
|
|
13374
13434
|
const src = typeof base.src === "object" && base.src !== null ? base.src : {};
|
|
@@ -13403,7 +13463,9 @@ function resolveMonolithCompile(config, mode) {
|
|
|
13403
13463
|
shouldRunFullValidation: !(mode.emitOnly ?? false) && (compile.validate ?? true)
|
|
13404
13464
|
};
|
|
13405
13465
|
}
|
|
13406
|
-
/**
|
|
13466
|
+
/**
|
|
13467
|
+
Builds the library-mode config carrying the computed monolith entries.
|
|
13468
|
+
*/
|
|
13407
13469
|
function deriveEsbuildConfig(config, compile, monolith) {
|
|
13408
13470
|
const entries = buildMonolithEntries(monolith);
|
|
13409
13471
|
const isExternalLinkage = (monolith.moduleLinkage ?? "bundle") === "external";
|
|
@@ -14035,7 +14097,9 @@ function publintRuleId$1(check) {
|
|
|
14035
14097
|
return `pub.${check}`;
|
|
14036
14098
|
}
|
|
14037
14099
|
ALL_PUBLINT_CHECKS.map(publintRuleId$1);
|
|
14038
|
-
/**
|
|
14100
|
+
/**
|
|
14101
|
+
Checks that only apply to published (non-private) packages
|
|
14102
|
+
*/
|
|
14039
14103
|
const PUBLISH_ONLY_CHECKS = [
|
|
14040
14104
|
"defaultExportOrder",
|
|
14041
14105
|
"files",
|
|
@@ -15423,8 +15487,10 @@ async function pack(dir, opts) {
|
|
|
15423
15487
|
const tarballFile = await fs$1.readdir(packDestination).then((files) => {
|
|
15424
15488
|
return files.find((file) => file.endsWith(".tgz") && output.stdout.includes(file));
|
|
15425
15489
|
});
|
|
15426
|
-
if (!tarballFile)
|
|
15427
|
-
|
|
15490
|
+
if (!tarballFile) {
|
|
15491
|
+
if (output.stdout.startsWith("yarn pack v1")) throw new Error(`Yarn 1 is not supported to pack files. Command output:\n${JSON.stringify(output, null, 2)}`);
|
|
15492
|
+
else throw new Error(`Failed to find packed tarball file in ${packDestination}. Command output:\n${JSON.stringify(output, null, 2)}`);
|
|
15493
|
+
}
|
|
15428
15494
|
return PATH.join(packDestination, tarballFile);
|
|
15429
15495
|
}
|
|
15430
15496
|
var init_pack = __esmMin((() => {
|
|
@@ -15683,7 +15749,7 @@ var init_index_node$1 = __esmMin((() => {
|
|
|
15683
15749
|
init_constants$2();
|
|
15684
15750
|
}));
|
|
15685
15751
|
//#endregion
|
|
15686
|
-
//#region ../../node_modules/.pnpm/publint@0.3.
|
|
15752
|
+
//#region ../../node_modules/.pnpm/publint@0.3.23/node_modules/publint/src/node/vfs-node.js
|
|
15687
15753
|
/**
|
|
15688
15754
|
* Creates a node-compatible Vfs object
|
|
15689
15755
|
* @returns {import('../shared/core.js').Vfs}
|
|
@@ -15710,7 +15776,7 @@ function createNodeVfs() {
|
|
|
15710
15776
|
return PATH.join(...parts);
|
|
15711
15777
|
},
|
|
15712
15778
|
pathRelative(from, to) {
|
|
15713
|
-
return PATH.relative(from, to);
|
|
15779
|
+
return PATH.relative(from, to).replaceAll(PATH.sep, "/");
|
|
15714
15780
|
},
|
|
15715
15781
|
getDirName(path) {
|
|
15716
15782
|
return PATH.dirname(path);
|
|
@@ -15722,8 +15788,8 @@ function createNodeVfs() {
|
|
|
15722
15788
|
}
|
|
15723
15789
|
var init_vfs_node = __esmMin((() => {}));
|
|
15724
15790
|
//#endregion
|
|
15725
|
-
//#region ../../node_modules/.pnpm/publint@0.3.
|
|
15726
|
-
var lintableFileExtensions, invalidJsxExtensions, knownBrowserishConditions, commonInternalPaths, licenseFiles;
|
|
15791
|
+
//#region ../../node_modules/.pnpm/publint@0.3.23/node_modules/publint/src/shared/constants.js
|
|
15792
|
+
var lintableFileExtensions, invalidJsxExtensions, knownBrowserishConditions, commonInternalPaths, commonInternalTestFileRegex, licenseFiles;
|
|
15727
15793
|
var init_constants$1 = __esmMin((() => {
|
|
15728
15794
|
lintableFileExtensions = [
|
|
15729
15795
|
".js",
|
|
@@ -15775,6 +15841,7 @@ var init_constants$1 = __esmMin((() => {
|
|
|
15775
15841
|
"Dockerfile",
|
|
15776
15842
|
"tsconfig.tsbuildinfo"
|
|
15777
15843
|
];
|
|
15844
|
+
commonInternalTestFileRegex = /\.(test|spec)\.[cm]?[jt]sx?$/;
|
|
15778
15845
|
licenseFiles = [
|
|
15779
15846
|
/^copying/i,
|
|
15780
15847
|
/^licence/i,
|
|
@@ -15782,7 +15849,7 @@ var init_constants$1 = __esmMin((() => {
|
|
|
15782
15849
|
];
|
|
15783
15850
|
}));
|
|
15784
15851
|
//#endregion
|
|
15785
|
-
//#region ../../node_modules/.pnpm/publint@0.3.
|
|
15852
|
+
//#region ../../node_modules/.pnpm/publint@0.3.23/node_modules/publint/src/shared/utils.js
|
|
15786
15853
|
/**
|
|
15787
15854
|
* @param {string} code
|
|
15788
15855
|
*/
|
|
@@ -15893,23 +15960,25 @@ async function exportsGlob(globStr, vfs, packedFiles, exportsKey, exports) {
|
|
|
15893
15960
|
const items = await vfs.readDir(dirPath);
|
|
15894
15961
|
for (const item of items) {
|
|
15895
15962
|
const itemPath = vfs.pathJoin(dirPath, item);
|
|
15896
|
-
if (!packedFiles || packedFiles.some((file) => file.startsWith(itemPath)))
|
|
15897
|
-
|
|
15898
|
-
|
|
15899
|
-
|
|
15900
|
-
if (matched
|
|
15901
|
-
|
|
15902
|
-
|
|
15903
|
-
|
|
15904
|
-
|
|
15963
|
+
if (!packedFiles || packedFiles.some((file) => file.startsWith(itemPath))) {
|
|
15964
|
+
if (await vfs.isPathDir(itemPath)) await scanDir(itemPath);
|
|
15965
|
+
else {
|
|
15966
|
+
const matched = slash(itemPath).match(globStrRe);
|
|
15967
|
+
if (matched) {
|
|
15968
|
+
if (matched.length > 2) {
|
|
15969
|
+
let allGlobSame = true;
|
|
15970
|
+
for (let i = 2; i < matched.length; i++) if (matched[i] !== matched[1]) {
|
|
15971
|
+
allGlobSame = false;
|
|
15972
|
+
break;
|
|
15973
|
+
}
|
|
15974
|
+
if (!allGlobSame) continue;
|
|
15905
15975
|
}
|
|
15906
|
-
if (
|
|
15907
|
-
|
|
15908
|
-
|
|
15909
|
-
|
|
15910
|
-
|
|
15976
|
+
if (exportsKey && exports && excludedExportKeys.length) {
|
|
15977
|
+
const replacedExportsKey = exportsKey.replace("*", matched[1]);
|
|
15978
|
+
if (excludedExportKeys.some((re) => re.test(replacedExportsKey))) continue;
|
|
15979
|
+
}
|
|
15980
|
+
filePaths.push(itemPath);
|
|
15911
15981
|
}
|
|
15912
|
-
filePaths.push(itemPath);
|
|
15913
15982
|
}
|
|
15914
15983
|
}
|
|
15915
15984
|
}
|
|
@@ -16196,7 +16265,7 @@ var init_utils$1 = __esmMin((() => {
|
|
|
16196
16265
|
DTS_RE = /\.d\.[mc]?ts$/;
|
|
16197
16266
|
}));
|
|
16198
16267
|
//#endregion
|
|
16199
|
-
//#region ../../node_modules/.pnpm/publint@0.3.
|
|
16268
|
+
//#region ../../node_modules/.pnpm/publint@0.3.23/node_modules/publint/src/shared/core.js
|
|
16200
16269
|
/**
|
|
16201
16270
|
* @typedef Vfs
|
|
16202
16271
|
* @property {(path: string) => Promise<string>} readFile
|
|
@@ -16204,7 +16273,7 @@ var init_utils$1 = __esmMin((() => {
|
|
|
16204
16273
|
* @property {(path: string) => Promise<boolean>} isPathDir
|
|
16205
16274
|
* @property {(path: string) => Promise<boolean>} isPathExist
|
|
16206
16275
|
* @property {(...paths: string[]) => string} pathJoin
|
|
16207
|
-
* @property {(from: string, to: string) => string} pathRelative
|
|
16276
|
+
* @property {(from: string, to: string) => string} pathRelative Returned path uses `/` separators
|
|
16208
16277
|
* @property {(path: string) => string} getDirName
|
|
16209
16278
|
* @property {(path: string) => string} getExtName
|
|
16210
16279
|
*/
|
|
@@ -16236,20 +16305,29 @@ async function core({ pkgDir, vfs, level, strict, _packedFiles }) {
|
|
|
16236
16305
|
const [browser, browserPkgPath] = getPublishedField(rootPkg, "browser");
|
|
16237
16306
|
const [exports, exportsPkgPath] = getPublishedField(rootPkg, "exports");
|
|
16238
16307
|
const [imports, importsPkgPath] = getPublishedField(rootPkg, "imports");
|
|
16308
|
+
/** @type {string[]} */
|
|
16309
|
+
const internalTestFilePaths = [];
|
|
16310
|
+
const crawlNestedPackageJsonPromise = crawlNestedPackageJson(pkgDir);
|
|
16311
|
+
promiseQueue.push(() => crawlNestedPackageJsonPromise);
|
|
16239
16312
|
if (rootPkg.files == null) promiseQueue.push(async () => {
|
|
16313
|
+
/** @type {string[]} */
|
|
16314
|
+
const internalFilePaths = [];
|
|
16240
16315
|
for (const p of commonInternalPaths) {
|
|
16241
16316
|
const internalPath = vfs.pathJoin(pkgDir, p);
|
|
16242
|
-
if (_packedFiles
|
|
16243
|
-
|
|
16244
|
-
messages.push({
|
|
16245
|
-
code: "USE_FILES",
|
|
16246
|
-
args: {},
|
|
16247
|
-
path: ["name"],
|
|
16248
|
-
type: "suggestion"
|
|
16249
|
-
});
|
|
16250
|
-
break;
|
|
16317
|
+
if (_packedFiles) {
|
|
16318
|
+
if (!(p.endsWith("/") ? _packedFiles.some((f) => f.startsWith(internalPath)) : _packedFiles.includes(internalPath))) continue;
|
|
16251
16319
|
}
|
|
16252
|
-
|
|
16320
|
+
if (await vfs.isPathExist(internalPath)) internalFilePaths.push("/" + p);
|
|
16321
|
+
}
|
|
16322
|
+
await crawlNestedPackageJsonPromise;
|
|
16323
|
+
const matchedDirs = internalFilePaths.filter((p) => p.endsWith("/"));
|
|
16324
|
+
internalFilePaths.push(...internalTestFilePaths.filter((p) => !matchedDirs.some((d) => p.startsWith(d))));
|
|
16325
|
+
if (internalFilePaths.length > 0) messages.push({
|
|
16326
|
+
code: "USE_FILES",
|
|
16327
|
+
args: { internalFilePaths },
|
|
16328
|
+
path: ["name"],
|
|
16329
|
+
type: "suggestion"
|
|
16330
|
+
});
|
|
16253
16331
|
});
|
|
16254
16332
|
if (rootPkg.license == null) promiseQueue.push(async () => {
|
|
16255
16333
|
const topFiles = await vfs.readDir(pkgDir);
|
|
@@ -16487,9 +16565,6 @@ async function core({ pkgDir, vfs, level, strict, _packedFiles }) {
|
|
|
16487
16565
|
const [bin, binPkgPath] = getPublishedField(rootPkg, "bin");
|
|
16488
16566
|
if (bin) crawlBin(bin, binPkgPath);
|
|
16489
16567
|
if (imports && ensureTypeOfField(imports, ["object"], importsPkgPath)) crawlExportsOrImports(imports, importsPkgPath, true);
|
|
16490
|
-
promiseQueue.push(async () => {
|
|
16491
|
-
await crawlNestedPackageJson(pkgDir);
|
|
16492
|
-
});
|
|
16493
16568
|
await promiseQueue.wait();
|
|
16494
16569
|
if (strict) {
|
|
16495
16570
|
for (const message of messages) if (message.type === "warning") message.type = "error";
|
|
@@ -16655,18 +16730,20 @@ async function core({ pkgDir, vfs, level, strict, _packedFiles }) {
|
|
|
16655
16730
|
await readFile(vfs.pathJoin(pkgDir, fieldValue[key]), currentPath.concat(key), [".js", "/index.js"]);
|
|
16656
16731
|
});
|
|
16657
16732
|
}
|
|
16658
|
-
if (hasExports)
|
|
16659
|
-
|
|
16660
|
-
|
|
16661
|
-
|
|
16662
|
-
|
|
16663
|
-
|
|
16664
|
-
|
|
16665
|
-
|
|
16666
|
-
|
|
16667
|
-
|
|
16668
|
-
|
|
16669
|
-
|
|
16733
|
+
if (hasExports) {
|
|
16734
|
+
if (typeof fieldValue === "string") messages.push({
|
|
16735
|
+
code: "USE_EXPORTS_BROWSER",
|
|
16736
|
+
args: {},
|
|
16737
|
+
path: currentPath,
|
|
16738
|
+
type: "suggestion"
|
|
16739
|
+
});
|
|
16740
|
+
else messages.push({
|
|
16741
|
+
code: "USE_EXPORTS_OR_IMPORTS_BROWSER",
|
|
16742
|
+
args: {},
|
|
16743
|
+
path: currentPath,
|
|
16744
|
+
type: "suggestion"
|
|
16745
|
+
});
|
|
16746
|
+
}
|
|
16670
16747
|
}
|
|
16671
16748
|
/**
|
|
16672
16749
|
* @param {string} exportsValue
|
|
@@ -16990,6 +17067,7 @@ async function core({ pkgDir, vfs, level, strict, _packedFiles }) {
|
|
|
16990
17067
|
await crawlNestedPackageJson(itemPath);
|
|
16991
17068
|
continue;
|
|
16992
17069
|
}
|
|
17070
|
+
if (rootPkg.files == null && commonInternalTestFileRegex.test(item) && (!_packedFiles || _packedFiles.includes(itemPath))) internalTestFilePaths.push("/" + vfs.pathRelative(pkgDir, itemPath));
|
|
16993
17071
|
if (item !== "package.json" || itemPath === rootPkgPath) continue;
|
|
16994
17072
|
if (_packedFiles && !_packedFiles.includes(itemPath)) continue;
|
|
16995
17073
|
let nestedPkg;
|
|
@@ -17063,7 +17141,7 @@ var init_core = __esmMin((() => {
|
|
|
17063
17141
|
init_utils$1();
|
|
17064
17142
|
}));
|
|
17065
17143
|
//#endregion
|
|
17066
|
-
//#region ../../node_modules/.pnpm/publint@0.3.
|
|
17144
|
+
//#region ../../node_modules/.pnpm/publint@0.3.23/node_modules/publint/src/shared/vfs-tarball.js
|
|
17067
17145
|
/**
|
|
17068
17146
|
* @param {import("../index.d.ts").PackFile[]} files
|
|
17069
17147
|
* @return {import("./core.js").Vfs}
|
|
@@ -17281,7 +17359,7 @@ var init_detect = __esmMin((() => {
|
|
|
17281
17359
|
init_constants();
|
|
17282
17360
|
}));
|
|
17283
17361
|
//#endregion
|
|
17284
|
-
//#region ../../node_modules/.pnpm/publint@0.3.
|
|
17362
|
+
//#region ../../node_modules/.pnpm/publint@0.3.23/node_modules/publint/src/index-node.js
|
|
17285
17363
|
var index_node_exports = /* @__PURE__ */ __exportAll({ publint: () => publint });
|
|
17286
17364
|
/**
|
|
17287
17365
|
* @typedef {T extends string ? T : never} ExtractStringLiteral
|
|
@@ -17299,16 +17377,17 @@ async function publint(options) {
|
|
|
17299
17377
|
let resolvedPkgDir;
|
|
17300
17378
|
/** @type {string[] | undefined} */
|
|
17301
17379
|
let packedFiles;
|
|
17302
|
-
if (typeof pack === "object")
|
|
17303
|
-
if (
|
|
17304
|
-
|
|
17305
|
-
|
|
17306
|
-
|
|
17380
|
+
if (typeof pack === "object") {
|
|
17381
|
+
if ("tarball" in pack) {
|
|
17382
|
+
if (log) console.log("Unpacking tarball...");
|
|
17383
|
+
const result = await unpack(pack.tarball);
|
|
17384
|
+
vfs = createTarballVfs(result.files);
|
|
17385
|
+
resolvedPkgDir = options?.pkgDir ?? result.rootDir;
|
|
17386
|
+
} else {
|
|
17387
|
+
vfs = createTarballVfs(pack.files);
|
|
17388
|
+
resolvedPkgDir = options?.pkgDir ?? process.cwd();
|
|
17389
|
+
}
|
|
17307
17390
|
} else {
|
|
17308
|
-
vfs = createTarballVfs(pack.files);
|
|
17309
|
-
resolvedPkgDir = options?.pkgDir ?? process.cwd();
|
|
17310
|
-
}
|
|
17311
|
-
else {
|
|
17312
17391
|
if (pack !== false) {
|
|
17313
17392
|
const pkgDir = options?.pkgDir ?? process.cwd();
|
|
17314
17393
|
const packageManager = await detectPackageManager(pkgDir, pack);
|
|
@@ -17432,7 +17511,7 @@ var require_picocolors = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
17432
17511
|
module.exports.createColors = createColors;
|
|
17433
17512
|
}));
|
|
17434
17513
|
//#endregion
|
|
17435
|
-
//#region ../../node_modules/.pnpm/publint@0.3.
|
|
17514
|
+
//#region ../../node_modules/.pnpm/publint@0.3.23/node_modules/publint/src/shared/message.js
|
|
17436
17515
|
/** @type {import('../utils.d.ts').formatMessage} */
|
|
17437
17516
|
function formatMessage(m, pkg, opts = {}) {
|
|
17438
17517
|
const h = getHighlighter(opts.color);
|
|
@@ -17509,7 +17588,12 @@ function formatMessage(m, pkg, opts = {}) {
|
|
|
17509
17588
|
}
|
|
17510
17589
|
case "USE_EXPORTS_BROWSER": return `${h.bold("pkg.browser")} with a string value can be refactored to use ${h.bold("pkg.exports")} and the ${h.bold("\"browser\"")} condition to declare browser-specific exports. e.g. ${h.bold("pkg.exports[\".\"].browser")}: "${h.bold(pv(m.path))}". (This may be a breaking change)`;
|
|
17511
17590
|
case "USE_EXPORTS_OR_IMPORTS_BROWSER": return `${h.bold("pkg.browser")} with an object value can be refactored to use ${h.bold("pkg.exports")}/${h.bold("pkg.imports")} and the ${h.bold("\"browser\"")} condition to declare browser-specific exports. (This may be a breaking change)`;
|
|
17512
|
-
case "USE_FILES":
|
|
17591
|
+
case "USE_FILES": {
|
|
17592
|
+
const paths = m.args.internalFilePaths;
|
|
17593
|
+
const shown = paths.slice(0, 5).map((p) => h.bold(p)).join(", ");
|
|
17594
|
+
const rest = paths.length > 5 ? ` and ${paths.length - 5} more` : "";
|
|
17595
|
+
return `The package ${h.bold("publishes internal tests or config files")} (${shown}${rest}). You can use ${h.bold("pkg.files")} to only publish certain files and save user bandwidth.`;
|
|
17596
|
+
}
|
|
17513
17597
|
case "USE_SIDE_EFFECTS": return `The package appears to be consumed by bundlers but does not specify ${h.bold("\"sideEffects\"")}. Consider adding ${h.bold("\"sideEffects\"")}: ${h.bold("false")} so bundlers can optimize tree-shaking if your package has no side effects.`;
|
|
17514
17598
|
case "USE_TYPE": return `The package does not specify the ${h.bold("\"type\"")} field. Node.js may attempt to detect the package type causing a small performance hit. Consider adding ${h.bold("\"type\"")}: "${h.bold("commonjs")}".`;
|
|
17515
17599
|
case "USE_ENGINES_NODE": return `The package does not specify the ${h.bold("\"engines.node\"")} field. Consumers may install it on an unsupported Node.js version. Consider adding the field with your actual minimum supported Node.js version. (This may be a breaking change)`;
|
|
@@ -17596,7 +17680,7 @@ var init_message = __esmMin((() => {
|
|
|
17596
17680
|
EMPTY_MSG = "<empty>";
|
|
17597
17681
|
}));
|
|
17598
17682
|
//#endregion
|
|
17599
|
-
//#region ../../node_modules/.pnpm/publint@0.3.
|
|
17683
|
+
//#region ../../node_modules/.pnpm/publint@0.3.23/node_modules/publint/src/utils.js
|
|
17600
17684
|
var utils_exports = /* @__PURE__ */ __exportAll({
|
|
17601
17685
|
formatMessage: () => formatMessage,
|
|
17602
17686
|
formatMessagePath: () => formatMessagePath,
|