ts-builds 2.2.2 → 2.3.0

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
@@ -35,10 +35,10 @@ function loadConfig() {
35
35
  chains
36
36
  };
37
37
  }
38
- function runCommand(command$1, args, options = {}) {
38
+ function runCommand(command, args, options = {}) {
39
39
  const cwd = options.cwd ? join(targetDir, options.cwd) : targetDir;
40
40
  return new Promise((resolve) => {
41
- const child = spawn(command$1, args, {
41
+ const child = spawn(command, args, {
42
42
  cwd,
43
43
  stdio: "inherit",
44
44
  shell: true
@@ -47,7 +47,7 @@ function runCommand(command$1, args, options = {}) {
47
47
  resolve(code ?? 1);
48
48
  });
49
49
  child.on("error", (err) => {
50
- console.error(`Failed to run ${command$1}: ${err.message}`);
50
+ console.error(`Failed to run ${command}: ${err.message}`);
51
51
  resolve(1);
52
52
  });
53
53
  });
@@ -355,8 +355,8 @@ async function runTest(mode = "run") {
355
355
  async function runBuild(watch = false) {
356
356
  if (loadConfig().buildMode === "vite") {
357
357
  if (watch) return runCommand("vite", ["build", "--watch"]);
358
- const cleanCode$1 = await runCommand("rimraf", ["dist"]);
359
- if (cleanCode$1 !== 0) return cleanCode$1;
358
+ const cleanCode = await runCommand("rimraf", ["dist"]);
359
+ if (cleanCode !== 0) return cleanCode;
360
360
  return runCommand("vite", ["build"]);
361
361
  }
362
362
  if (watch) return runCommand("tsdown", ["--watch"]);
@@ -405,8 +405,8 @@ async function runChain(chainName, config, visited = /* @__PURE__ */ new Set())
405
405
  console.log(`\nšŸ“‹ Running chain: ${chainName} [${chain.join(" → ")}]`);
406
406
  for (const step of chain) {
407
407
  if (config.chains[step]) {
408
- const code$1 = await runChain(step, config, visited);
409
- if (code$1 !== 0) return code$1;
408
+ const code = await runChain(step, config, visited);
409
+ if (code !== 0) return code;
410
410
  continue;
411
411
  }
412
412
  const cmdDef = config.commands[step] ?? builtins[step];
@@ -0,0 +1,5 @@
1
+ // Re-export eslint-config-functype recommended config
2
+ // Adds functional programming rules: no-let, immutable-data, prefer-immutable-types
3
+ import functypeConfig from "eslint-config-functype"
4
+
5
+ export default functypeConfig.configs.recommended
@@ -0,0 +1,23 @@
1
+ // Extends eslint-config-functype with eslint-plugin-functype rules
2
+ // Full functype support: FP rules + library-specific patterns
3
+ import functypeConfig from "eslint-config-functype"
4
+ import functypePlugin from "eslint-plugin-functype"
5
+
6
+ export default {
7
+ ...functypeConfig.configs.recommended,
8
+ name: "ts-builds/functype",
9
+ plugins: {
10
+ functype: functypePlugin,
11
+ },
12
+ rules: {
13
+ ...functypeConfig.configs.recommended.rules,
14
+ // Functype library-specific rules
15
+ "functype/prefer-option": "warn",
16
+ "functype/prefer-either": "warn",
17
+ "functype/prefer-fold": "warn",
18
+ "functype/prefer-map": "warn",
19
+ "functype/prefer-flatmap": "warn",
20
+ "functype/no-imperative-loops": "warn",
21
+ "functype/prefer-do-notation": "warn",
22
+ },
23
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ts-builds",
3
- "version": "2.2.2",
3
+ "version": "2.3.0",
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",
@@ -30,6 +30,8 @@
30
30
  "./prettier": "./prettier-config.cjs",
31
31
  "./prettier-ignore": "./.prettierignore",
32
32
  "./eslint": "./eslint.config.base.mjs",
33
+ "./eslint-fp": "./eslint.config.fp.mjs",
34
+ "./eslint-functype": "./eslint.config.functype.mjs",
33
35
  "./vitest": "./dist/vitest.config.base.js",
34
36
  "./tsconfig": "./tsconfig.base.json",
35
37
  "./tsdown": "./dist/tsdown.config.base.js",
@@ -41,6 +43,8 @@
41
43
  "prettier-config.cjs",
42
44
  ".prettierignore",
43
45
  "eslint.config.base.mjs",
46
+ "eslint.config.fp.mjs",
47
+ "eslint.config.functype.mjs",
44
48
  "dist",
45
49
  "tsconfig.base.json",
46
50
  "package-scripts.json",
@@ -52,25 +56,27 @@
52
56
  "@eslint/eslintrc": "^3.3.3",
53
57
  "@eslint/js": "^9.39.2",
54
58
  "@types/node": "~24.10.9",
55
- "@typescript-eslint/eslint-plugin": "^8.53.1",
56
- "@typescript-eslint/parser": "^8.53.1",
57
- "@vitest/coverage-v8": "^4.0.17",
58
- "@vitest/ui": "^4.0.17",
59
+ "@typescript-eslint/eslint-plugin": "^8.54.0",
60
+ "@typescript-eslint/parser": "^8.54.0",
61
+ "@vitest/coverage-v8": "^4.0.18",
62
+ "@vitest/ui": "^4.0.18",
59
63
  "cross-env": "^10.1.0",
60
64
  "eslint": "^9.39.2",
65
+ "eslint-config-functype": "^1.3.0",
61
66
  "eslint-config-prettier": "^10.1.8",
67
+ "eslint-plugin-functype": "^1.4.0",
62
68
  "eslint-plugin-import": "^2.32.0",
63
69
  "eslint-plugin-prettier": "^5.5.5",
64
70
  "eslint-plugin-simple-import-sort": "^12.1.1",
65
- "globals": "^17.0.0",
66
- "prettier": "^3.8.0",
71
+ "globals": "^17.2.0",
72
+ "prettier": "^3.8.1",
67
73
  "rimraf": "^6.1.2",
68
74
  "ts-node": "^10.9.2",
69
75
  "typescript": "^5.9.3",
70
- "vitest": "^4.0.17"
76
+ "vitest": "^4.0.18"
71
77
  },
72
78
  "devDependencies": {
73
- "tsdown": "^0.19.0"
79
+ "tsdown": "^0.20.1"
74
80
  },
75
81
  "peerDependencies": {
76
82
  "tsdown": "^0.x",
@@ -99,5 +105,5 @@
99
105
  "dev": "node dist/cli.js dev",
100
106
  "prepublishOnly": "pnpm validate:bootstrap"
101
107
  },
102
- "packageManager": "pnpm@10.28.1+sha512.7d7dbbca9e99447b7c3bf7a73286afaaf6be99251eb9498baefa7d406892f67b879adb3a1d7e687fc4ccc1a388c7175fbaae567a26ab44d1067b54fcb0d6a316"
108
+ "packageManager": "pnpm@10.28.2+sha512.41872f037ad22f7348e3b1debbaf7e867cfd448f2726d9cf74c08f19507c31d2c8e7a11525b983febc2df640b5438dee6023ebb1f84ed43cc2d654d2bc326264"
103
109
  }