ts-builds 4.0.0 → 4.0.1

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/dist/cli.js CHANGED
@@ -9,7 +9,7 @@ import { spawn, spawnSync } from "node:child_process";
9
9
  import { createInterface } from "node:readline";
10
10
  import { gzipSync } from "node:zlib";
11
11
 
12
- //#region src/cli/config.ts
12
+ // src/cli/config.ts
13
13
  const targetDir = process.cwd();
14
14
  /**
15
15
  * Returns true when `cwd` resolves outside `baseDir`. Used to reject the
@@ -65,8 +65,7 @@ function loadConfig() {
65
65
  };
66
66
  }
67
67
 
68
- //#endregion
69
- //#region src/cli/lint-report.ts
68
+ // src/cli/lint-report.ts
70
69
  /**
71
70
  * Current sidecar schema version. Bump when the shape changes incompatibly so
72
71
  * `lint:summary` can detect and skip reports it can't read.
@@ -147,8 +146,7 @@ async function writeLintReport(report, dir = targetDir) {
147
146
  }
148
147
  }
149
148
 
150
- //#endregion
151
- //#region src/cli/process.ts
149
+ // src/cli/process.ts
152
150
  function resolveCwd(cwd) {
153
151
  return cwd ? join(targetDir, cwd) : targetDir;
154
152
  }
@@ -193,8 +191,7 @@ function runShellCommand(shellCmd, options = {}) {
193
191
  });
194
192
  }
195
193
 
196
- //#endregion
197
- //#region src/cli/commands/build.ts
194
+ // src/cli/commands/build.ts
198
195
  const TRANSIENT_RM_ERRORS = Set.of("EBUSY", "EPERM", "ENOTEMPTY", "EMFILE");
199
196
  const RETRY_DELAYS_MS = [
200
197
  100,
@@ -537,8 +534,7 @@ async function runDev() {
537
534
  return loadConfig().buildMode === "vite" ? runCommand("vite", []) : runCommand("tsdown", ["--watch"]);
538
535
  }
539
536
 
540
- //#endregion
541
- //#region src/cli/commands/changelog.ts
537
+ // src/cli/commands/changelog.ts
542
538
  const defaultTypeMap = {
543
539
  feat: "Features",
544
540
  fix: "Bug Fixes",
@@ -709,8 +705,7 @@ function runChangelog(args) {
709
705
  return 0;
710
706
  }
711
707
 
712
- //#endregion
713
- //#region src/cli/commands/info.ts
708
+ // src/cli/commands/info.ts
714
709
  const bundledPackages = [
715
710
  "@eslint/js",
716
711
  "@vitest/coverage-v8",
@@ -846,8 +841,7 @@ Example minimal package.json for SPAs/React apps:
846
841
  `);
847
842
  }
848
843
 
849
- //#endregion
850
- //#region src/cli/commands/cleanup.ts
844
+ // src/cli/commands/cleanup.ts
851
845
  async function cleanup() {
852
846
  const packageJsonPath = join(targetDir, "package.json");
853
847
  if (!existsSync(packageJsonPath)) {
@@ -898,8 +892,7 @@ async function cleanup() {
898
892
  console.log("\nRun 'pnpm install' to update your lockfile.");
899
893
  }
900
894
 
901
- //#endregion
902
- //#region src/cli/pnpm11.ts
895
+ // src/cli/pnpm11.ts
903
896
  const HOIST_LINE = /^public-hoist-pattern\[\]=(.+)$/;
904
897
  const RELEASE_AGE_LINE = /(@?[^\s@/]+(?:\/[^\s@]+)?@[^\s]+)\s+was published.*minimumReleaseAge/;
905
898
  /**
@@ -1346,8 +1339,7 @@ function migratePnpm11(dir = targetDir, releaseAgeProbe = defaultReleaseAgeProbe
1346
1339
  };
1347
1340
  }
1348
1341
 
1349
- //#endregion
1350
- //#region src/cli/commands/doctor.ts
1342
+ // src/cli/commands/doctor.ts
1351
1343
  function resolveExportValue(value) {
1352
1344
  if (typeof value === "string") return List([value]);
1353
1345
  if (typeof value === "object" && value !== null) return List(Object.values(value)).flatMap((v) => resolveExportValue(v));
@@ -1569,8 +1561,7 @@ function runDoctor(fix = false) {
1569
1561
  });
1570
1562
  }
1571
1563
 
1572
- //#endregion
1573
- //#region src/cli/commands/init.ts
1564
+ // src/cli/commands/init.ts
1574
1565
  const hoistPatterns = [
1575
1566
  "*eslint*",
1576
1567
  "*prettier*",
@@ -1651,8 +1642,7 @@ For cross-package orchestration in a monorepo, use Turbo, nx, or
1651
1642
  `);
1652
1643
  }
1653
1644
 
1654
- //#endregion
1655
- //#region src/cli/commands/lint-summary.ts
1645
+ // src/cli/commands/lint-summary.ts
1656
1646
  /** node_modules is always skipped: huge, and never a workspace package itself. */
1657
1647
  const ALWAYS_SKIP = Set.of("node_modules");
1658
1648
  /** Skipped ONLY when the dir is not itself a package — a workspace package literally
@@ -1797,8 +1787,7 @@ async function runLintSummary(args) {
1797
1787
  return lintSummaryExitCode(totals);
1798
1788
  }
1799
1789
 
1800
- //#endregion
1801
- //#region src/cli/commands/size.ts
1790
+ // src/cli/commands/size.ts
1802
1791
  function measureEntry(dir, entry, absDir) {
1803
1792
  const fullPath = join(absDir, entry);
1804
1793
  return Do(function* () {
@@ -1911,8 +1900,7 @@ function runSize(args) {
1911
1900
  return totalTooBig || !oversized.isEmpty ? 1 : 0;
1912
1901
  }
1913
1902
 
1914
- //#endregion
1915
- //#region src/cli/runner.ts
1903
+ // src/cli/runner.ts
1916
1904
  /**
1917
1905
  * Type guard for the internal `runFn` step shape. A plain `"runFn" in cmd`
1918
1906
  * check leaves `cmd.runFn` typed `unknown` (CommandDef has no such key), so we
@@ -1985,8 +1973,7 @@ async function runValidate(chainName = "validate") {
1985
1973
  return runChain(chainName, loadConfig());
1986
1974
  }
1987
1975
 
1988
- //#endregion
1989
- //#region src/cli.ts
1976
+ // src/cli.ts
1990
1977
  const command = process.argv[2] || "init";
1991
1978
  const subCommand = process.argv[3];
1992
1979
  switch (command) {
@@ -2085,5 +2072,4 @@ switch (command) {
2085
2072
  }
2086
2073
  }
2087
2074
 
2088
- //#endregion
2089
2075
  export { };
@@ -1,4 +1,2 @@
1
1
  import { UserConfig } from "tsdown";
2
- //#region src/tsdown.config.base.d.ts
3
- export declare const tsdown: UserConfig;
4
- //#endregion
2
+ export declare const tsdown: UserConfig;
@@ -1,6 +1,6 @@
1
1
  import { resolve } from "node:path";
2
2
 
3
- //#region src/tsdown.config.base.ts
3
+ // src/tsdown.config.base.ts
4
4
  const env = process.env.NODE_ENV;
5
5
  const tsdown = {
6
6
  sourcemap: true,
@@ -18,5 +18,4 @@ const tsdown = {
18
18
  })
19
19
  };
20
20
 
21
- //#endregion
22
21
  export { tsdown };
@@ -1,6 +1,4 @@
1
1
  import { UserConfig } from "vite";
2
- //#region src/vite.config.base.d.ts
3
2
  /** Base Vite config for SPAs */
4
3
  export declare const vite: UserConfig;
5
- //#endregion
6
4
  export { vite as default };
@@ -1,6 +1,6 @@
1
1
  import { resolve } from "node:path";
2
2
 
3
- //#region src/vite.config.base.ts
3
+ // src/vite.config.base.ts
4
4
  /** Base Vite config for SPAs */
5
5
  const vite = {
6
6
  build: {
@@ -12,5 +12,4 @@ const vite = {
12
12
  resolve: { alias: { "@": resolve(process.cwd(), "src") } }
13
13
  };
14
14
 
15
- //#endregion
16
15
  export { vite as default, vite };
@@ -1,4 +1,2 @@
1
- //#region src/vitest.config.base.d.ts
2
1
  declare const _default: import("vite").UserConfig;
3
- //#endregion
4
2
  export { _default as default };
@@ -1,6 +1,6 @@
1
1
  import { defineConfig } from "vitest/config";
2
2
 
3
- //#region src/vitest.config.base.ts
3
+ // src/vitest.config.base.ts
4
4
  var vitest_config_base_default = defineConfig({ test: {
5
5
  globals: true,
6
6
  environment: "node",
@@ -22,5 +22,4 @@ var vitest_config_base_default = defineConfig({ test: {
22
22
  }
23
23
  } });
24
24
 
25
- //#endregion
26
25
  export { vitest_config_base_default as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ts-builds",
3
- "version": "4.0.0",
3
+ "version": "4.0.1",
4
4
  "description": "Shared TypeScript configuration files for library templates. Provides standardized ESLint, Prettier, Vitest, TypeScript, and build configs.",
5
5
  "keywords": [
6
6
  "typescript",