@icebreakers/monorepo-templates 0.1.12 → 0.1.14

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.
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env sh
2
2
  set -e
3
3
 
4
- pnpm exec lint-staged
4
+ pnpm exec nano-staged
package/assets/AGENTS.md CHANGED
@@ -17,7 +17,7 @@ This pnpm + Turbo monorepo keeps template sources under `templates/` (`cli`, `cl
17
17
 
18
18
  Follow the root `.editorconfig`: two-space indentation, LF line endings, UTF-8. Prefer TypeScript (`.ts`/`.tsx`) and Vue SFCs; name files with kebab-case (`user-table.vue`) and exported symbols with PascalCase for components or camelCase for utilities. ESLint (`@icebreakers/eslint-config`) and Stylelint enforce formatting; run `pnpm lint` before committing, and rely on Husky + lint-staged to auto-fix staged files. Any style-related code changes (CSS, SCSS, Less, Vue style blocks, and similar files) must pass Stylelint checks before commit. All changed code must pass ESLint checks before commit.
19
19
 
20
- `lint-staged.config.js` must include Stylelint checks for staged style files so style validation also runs during pre-commit.
20
+ `nano-staged.js` must include Stylelint checks for staged style files so style validation also runs during pre-commit.
21
21
 
22
22
  When a single code file exceeds 300 lines, treat it as a refactor signal and split it into smaller modules.
23
23
 
@@ -3,14 +3,5 @@ import { icebreaker } from '@icebreakers/eslint-config'
3
3
  export default icebreaker(
4
4
  {
5
5
  ignores: ['**/fixtures/**'],
6
- formatters: {
7
- css: true,
8
- graphql: true,
9
- html: true,
10
- markdown: true,
11
- prettierOptions: {
12
- endOfLine: 'lf',
13
- },
14
- },
15
6
  },
16
7
  )
@@ -46,14 +46,13 @@
46
46
  },
47
47
  "devDependencies": {
48
48
  "@changesets/cli": "^2.30.0",
49
- "@commitlint/cli": "^20.4.3",
49
+ "@commitlint/cli": "^20.4.4",
50
50
  "@icebreakers/changelog-github": "^0.2.1",
51
- "@icebreakers/commitlint-config": "^1.2.10",
52
- "@icebreakers/eslint-config": "^1.6.25",
51
+ "@icebreakers/commitlint-config": "^1.2.11",
52
+ "@icebreakers/eslint-config": "^1.6.29",
53
53
  "@icebreakers/monorepo": "workspace:*",
54
- "@icebreakers/stylelint-config": "^2.0.3",
55
- "@types/fs-extra": "^11.0.4",
56
- "@types/node": "^25.3.5",
54
+ "@icebreakers/stylelint-config": "^2.0.4",
55
+ "@types/node": "^25.4.0",
57
56
  "@types/semver": "^7.7.1",
58
57
  "@vitest/coverage-v8": "~4.0.18",
59
58
  "ci-info": "^4.4.0",
@@ -61,20 +60,18 @@
61
60
  "defu": "^6.1.4",
62
61
  "es-toolkit": "^1.45.1",
63
62
  "eslint": "^10.0.3",
64
- "execa": "^9.6.1",
65
- "fs-extra": "^11.3.4",
66
63
  "husky": "^9.1.7",
67
- "lint-staged": "^16.3.2",
64
+ "nano-staged": "^0.9.0",
68
65
  "only-allow": "^1.2.2",
69
66
  "pathe": "^2.0.3",
70
67
  "pkg-types": "^2.3.0",
71
- "rimraf": "^6.1.3",
72
68
  "stylelint": "^17.4.0",
73
- "tsdown": "0.21.1",
69
+ "tailwindcss": "^4.2.1",
70
+ "tsdown": "0.21.2",
74
71
  "tslib": "^2.8.1",
75
72
  "tsup": "^8.5.1",
76
73
  "tsx": "^4.21.0",
77
- "turbo": "^2.8.14",
74
+ "turbo": "^2.8.16",
78
75
  "type-fest": "^5.4.4",
79
76
  "typescript": "^5.9.3",
80
77
  "unbuild": "^3.6.1",
@@ -14,6 +14,10 @@ const CONFIG_FILENAMES = [
14
14
  'vitest.config.cjs',
15
15
  'vitest.config.mjs',
16
16
  ] as const
17
+ const WINDOWS_PATH_SEPARATOR_RE = /\\/g
18
+ const RELATIVE_CURRENT_DIR_RE = /^\.\//
19
+ const GLOB_TOKEN_RE = /[*?[{]/
20
+ const TRAILING_SLASH_RE = /\/+$/
17
21
 
18
22
  function extractBaseDirFromGlob(pattern: string): string | null {
19
23
  if (!pattern) {
@@ -21,14 +25,14 @@ function extractBaseDirFromGlob(pattern: string): string | null {
21
25
  }
22
26
 
23
27
  const normalized = pattern
24
- .replace(/\\/g, '/')
25
- .replace(/^\.\//, '')
26
- const globIndex = normalized.search(/[*?[{]/)
28
+ .replace(WINDOWS_PATH_SEPARATOR_RE, '/')
29
+ .replace(RELATIVE_CURRENT_DIR_RE, '')
30
+ const globIndex = normalized.search(GLOB_TOKEN_RE)
27
31
  const base = globIndex === -1
28
32
  ? normalized
29
33
  : normalized.slice(0, globIndex)
30
34
 
31
- const cleaned = base.replace(/\/+$/, '')
35
+ const cleaned = base.replace(TRAILING_SLASH_RE, '')
32
36
  return cleaned || null
33
37
  }
34
38
 
@@ -47,7 +51,7 @@ function loadProjectRootsFromWorkspace(): string[] {
47
51
  .map(extractBaseDirFromGlob)
48
52
  .filter((entry): entry is string => Boolean(entry))
49
53
 
50
- return roots.length ? Array.from(new Set(roots)) : []
54
+ return roots.length ? [...new Set(roots)] : []
51
55
  }
52
56
  catch (error) {
53
57
  console.warn('[vitest] Failed to parse pnpm-workspace.yaml, no project roots will be used.', error)
package/assets-data.mjs CHANGED
@@ -8,7 +8,7 @@ const coreAssetTargets = [
8
8
  '.npmrc',
9
9
  'commitlint.config.ts',
10
10
  'eslint.config.js',
11
- 'lint-staged.config.js',
11
+ 'nano-staged.js',
12
12
  'stylelint.config.js',
13
13
  'monorepo.config.ts',
14
14
  'package.json',
package/dist/index.d.mts CHANGED
@@ -1,4 +1,3 @@
1
- import { execaCommand } from "execa";
2
1
  import checkbox from "@inquirer/checkbox";
3
2
  import input from "@inquirer/input";
4
3
  import select from "@inquirer/select";
@@ -57,8 +56,14 @@ declare function scaffoldWorkspace(options: ScaffoldWorkspaceOptions): Promise<v
57
56
  //#region src/utils/command.d.ts
58
57
  interface RunCommandOptions {
59
58
  cwd?: string;
59
+ stdio?: 'inherit' | 'pipe';
60
60
  }
61
- declare function runCommand(command: string, args: string[], options?: RunCommandOptions): Promise<void>;
61
+ declare function runCommand(command: string, args: string[], options?: RunCommandOptions): Promise<{
62
+ exitCode: number | null;
63
+ }>;
64
+ declare function execaCommand(command: string, options?: RunCommandOptions): Promise<{
65
+ exitCode: number | null;
66
+ }>;
62
67
  //#endregion
63
68
  //#region src/utils/gitignore.d.ts
64
69
  declare function toPublishGitignorePath(input: string): string;
package/dist/index.mjs CHANGED
@@ -2,7 +2,7 @@ import * as path$1 from "node:path";
2
2
  import path from "node:path";
3
3
  import { fileURLToPath } from "node:url";
4
4
  import fs, { access, open, rm } from "node:fs/promises";
5
- import { execa, execaCommand } from "execa";
5
+ import exec from "nanoexec";
6
6
  import checkbox from "@inquirer/checkbox";
7
7
  import input from "@inquirer/input";
8
8
  import select from "@inquirer/select";
@@ -18,7 +18,7 @@ const coreAssetTargets = [
18
18
  ".npmrc",
19
19
  "commitlint.config.ts",
20
20
  "eslint.config.js",
21
- "lint-staged.config.js",
21
+ "nano-staged.js",
22
22
  "stylelint.config.js",
23
23
  "monorepo.config.ts",
24
24
  "package.json",
@@ -149,7 +149,7 @@ const skipDirs = new Set([
149
149
  const skipFiles = new Set([
150
150
  ".DS_Store",
151
151
  "CHANGELOG.md",
152
- "typed-router.d.ts",
152
+ "route-map.d.ts",
153
153
  "worker-configuration.d.ts"
154
154
  ]);
155
155
  function shouldSkipTemplatePath(rootDir, targetPath) {
@@ -401,10 +401,21 @@ async function scaffoldWorkspace(options) {
401
401
  //#endregion
402
402
  //#region src/utils/command.ts
403
403
  async function runCommand(command, args, options = {}) {
404
- await execa(command, args, {
405
- stdio: "inherit",
406
- ...options
404
+ const result = await exec(command, args, {
405
+ cwd: options.cwd,
406
+ stdio: options.stdio ?? "inherit"
407
407
  });
408
+ if (!result.ok) throw new Error(`Command failed with exit code ${result.code ?? "unknown"}: ${[command, ...args].join(" ")}`);
409
+ return { exitCode: result.code };
410
+ }
411
+ async function execaCommand(command, options = {}) {
412
+ const result = await exec(command, {
413
+ cwd: options.cwd,
414
+ shell: true,
415
+ stdio: options.stdio ?? "pipe"
416
+ });
417
+ if (!result.ok) throw new Error(`Command failed with exit code ${result.code ?? "unknown"}: ${command}`);
418
+ return { exitCode: result.code };
408
419
  }
409
420
  //#endregion
410
421
  //#region src/index.ts
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@icebreakers/monorepo-templates",
3
3
  "type": "module",
4
- "version": "0.1.12",
4
+ "version": "0.1.14",
5
5
  "description": "Template assets for icebreaker monorepo scaffolding",
6
6
  "author": "ice breaker <hi@sonofmagic.top>",
7
7
  "license": "MIT",
@@ -43,7 +43,7 @@
43
43
  "@inquirer/input": "^5.0.8",
44
44
  "@inquirer/select": "^5.1.0",
45
45
  "commander": "^14.0.3",
46
- "execa": "^9.6.1"
46
+ "nanoexec": "^1.1.0"
47
47
  },
48
48
  "publishConfig": {
49
49
  "access": "public"
@@ -22,7 +22,7 @@ dist-ssr
22
22
  *.njsproj
23
23
  *.sln
24
24
  *.sw?
25
- src/types/typed-router.d.ts
25
+ src/route-map.d.ts
26
26
  .wrangler
27
27
  .dev.vars*
28
- worker-configuration.d.ts
28
+ worker-configuration.d.ts
@@ -25,12 +25,12 @@
25
25
  "pinia": "^3.0.4",
26
26
  "tailwind-merge": "^3.5.0",
27
27
  "tailwind-variants": "^3.2.2",
28
- "vue": "^3.5.29",
28
+ "vue": "^3.5.30",
29
29
  "vue-i18n": "^11.3.0",
30
30
  "vue-router": "^5.0.3"
31
31
  },
32
32
  "devDependencies": {
33
- "@cloudflare/vite-plugin": "^1.26.1",
33
+ "@cloudflare/vite-plugin": "^1.27.0",
34
34
  "@hono/node-server": "^1.19.11",
35
35
  "@hono/trpc-server": "^0.4.2",
36
36
  "@tailwindcss/vite": "^4.2.1",
@@ -39,15 +39,14 @@
39
39
  "@vitejs/plugin-vue-jsx": "^5.1.4",
40
40
  "@vue/tsconfig": "^0.9.0",
41
41
  "consola": "^3.4.2",
42
- "hono": "^4.12.5",
42
+ "hono": "^4.12.7",
43
43
  "tailwindcss": "^4.2.1",
44
44
  "typescript": "~5.9.3",
45
- "unplugin-vue-router": "^0.19.2",
46
45
  "vite": "^7.3.1",
47
46
  "vite-plugin-vue-devtools": "^8.0.7",
48
47
  "vite-tsconfig-paths": "^6.1.1",
49
48
  "vue-tsc": "3.2.5",
50
- "wrangler": "^4.71.0",
49
+ "wrangler": "^4.72.0",
51
50
  "zod": "^4.3.6"
52
51
  }
53
52
  }
@@ -1,2 +1 @@
1
1
  /// <reference types="vite/client" />
2
- /// <reference types="unplugin-vue-router/client" />
@@ -4,9 +4,9 @@ import { cloudflare } from '@cloudflare/vite-plugin'
4
4
  import Tailwindcss from '@tailwindcss/vite'
5
5
  import Vue from '@vitejs/plugin-vue'
6
6
  import VueJsx from '@vitejs/plugin-vue-jsx'
7
- import VueRouter from 'unplugin-vue-router/vite'
8
7
  import { defineConfig } from 'vite'
9
8
  import VueDevTools from 'vite-plugin-vue-devtools'
9
+ import VueRouter from 'vue-router/vite'
10
10
 
11
11
  const ensureVitePlugin = <T>(plugin: T) => plugin as unknown as PluginOption
12
12
  // https://vite.dev/config/
@@ -21,7 +21,7 @@ export default defineConfig({
21
21
  ensureVitePlugin(
22
22
  VueRouter(
23
23
  {
24
- dts: path.resolve(import.meta.dirname, 'src/types/typed-router.d.ts'),
24
+ dts: path.resolve(import.meta.dirname, 'src/route-map.d.ts'),
25
25
  },
26
26
  ),
27
27
  ),
@@ -54,8 +54,8 @@
54
54
  "devDependencies": {
55
55
  "@hono/node-server": "^1.19.11",
56
56
  "consola": "^3.4.2",
57
- "hono": "^4.12.5",
58
- "wrangler": "^4.71.0",
57
+ "hono": "^4.12.7",
58
+ "wrangler": "^4.72.0",
59
59
  "zod": "^4.3.6"
60
60
  }
61
61
  }
@@ -23,7 +23,7 @@
23
23
  "typecheck": "tsc -p tsconfig.json"
24
24
  },
25
25
  "dependencies": {
26
- "vue": "^3.5.29"
26
+ "vue": "^3.5.30"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@braintree/sanitize-url": "^7.1.2",
@@ -32,7 +32,7 @@
32
32
  "cytoscape-cose-bilkent": "^4.1.0",
33
33
  "dayjs": "^1.11.19",
34
34
  "debug": "^4.4.3",
35
- "mermaid": "^11.12.3",
35
+ "mermaid": "^11.13.0",
36
36
  "tailwindcss": "^4.2.1",
37
37
  "vitepress": "^1.6.4",
38
38
  "vitepress-plugin-mermaid": "^2.0.17"
@@ -50,7 +50,7 @@
50
50
  "jsdom": "^28.1.0",
51
51
  "vite": "^7.3.1",
52
52
  "vite-plugin-dts": "^4.5.4",
53
- "vue": "^3.5.29",
53
+ "vue": "^3.5.30",
54
54
  "vue-tsc": "^3.2.5"
55
55
  }
56
56
  }