@icebreakers/monorepo-templates 0.1.13 → 0.1.15

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.
@@ -18,7 +18,7 @@ jobs:
18
18
  fail-fast: false
19
19
  matrix:
20
20
  os: [ubuntu-latest, windows-latest, macos-latest]
21
- node-version: [20, 22, 24]
21
+ node-version: [22, 24]
22
22
  runs-on: ${{ matrix.os }}
23
23
  # Remote Caching enabled - configure TURBO_TOKEN and TURBO_TEAM in repository settings
24
24
  env:
@@ -3,7 +3,7 @@
3
3
  "type": "module",
4
4
  "version": "0.0.0",
5
5
  "private": true,
6
- "packageManager": "pnpm@10.31.0",
6
+ "packageManager": "pnpm@10.32.1",
7
7
  "author": "ice breaker <hi@sonofmagic.top>",
8
8
  "repository": {
9
9
  "type": "git",
@@ -46,15 +46,15 @@
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.27",
51
+ "@icebreakers/commitlint-config": "^1.2.11",
52
+ "@icebreakers/eslint-config": "^1.6.29",
53
53
  "@icebreakers/monorepo": "workspace:*",
54
54
  "@icebreakers/stylelint-config": "^2.0.4",
55
- "@types/node": "^25.3.5",
55
+ "@types/node": "^25.5.0",
56
56
  "@types/semver": "^7.7.1",
57
- "@vitest/coverage-v8": "~4.0.18",
57
+ "@vitest/coverage-v8": "~4.1.0",
58
58
  "ci-info": "^4.4.0",
59
59
  "cross-env": "^10.1.0",
60
60
  "defu": "^6.1.4",
@@ -67,15 +67,15 @@
67
67
  "pkg-types": "^2.3.0",
68
68
  "stylelint": "^17.4.0",
69
69
  "tailwindcss": "^4.2.1",
70
- "tsdown": "0.21.1",
70
+ "tsdown": "0.21.2",
71
71
  "tslib": "^2.8.1",
72
72
  "tsup": "^8.5.1",
73
73
  "tsx": "^4.21.0",
74
- "turbo": "^2.8.14",
74
+ "turbo": "^2.8.17",
75
75
  "type-fest": "^5.4.4",
76
76
  "typescript": "^5.9.3",
77
77
  "unbuild": "^3.6.1",
78
- "vitest": "~4.0.18",
78
+ "vitest": "~4.1.0",
79
79
  "yaml": "^2.8.2"
80
80
  },
81
81
  "publishConfig": {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@icebreakers/monorepo-templates",
3
3
  "type": "module",
4
- "version": "0.1.13",
4
+ "version": "0.1.15",
5
5
  "description": "Template assets for icebreaker monorepo scaffolding",
6
6
  "author": "ice breaker <hi@sonofmagic.top>",
7
7
  "license": "MIT",
@@ -22,7 +22,8 @@
22
22
  "exports": {
23
23
  ".": {
24
24
  "types": "./dist/index.d.ts",
25
- "import": "./dist/index.mjs"
25
+ "import": "./dist/index.mjs",
26
+ "default": "./dist/index.mjs"
26
27
  },
27
28
  "./package.json": "./package.json"
28
29
  },
@@ -1,13 +1,9 @@
1
1
  import { defineConfig } from 'tsup'
2
2
 
3
3
  export default defineConfig({
4
- entry: ['src/index.ts', 'src/cli.ts'], // ,],
4
+ entry: ['src/index.ts', 'src/cli.ts'],
5
5
  shims: true,
6
6
  format: ['cjs', 'esm'],
7
7
  clean: true,
8
8
  dts: true,
9
- // https://github.com/egoist/tsup/pull/1056
10
- // https://github.com/egoist/tsup/issues?q=cjsInterop
11
- // cjsInterop: true,
12
- // splitting: true,
13
9
  })
@@ -19,8 +19,8 @@
19
19
  "@tanstack/vue-query": "^5.92.9",
20
20
  "@tanstack/vue-query-devtools": "^6.1.5",
21
21
  "@tanstack/vue-table": "^8.21.3",
22
- "@tanstack/vue-virtual": "^3.13.21",
23
- "@trpc/client": "^11.12.0",
22
+ "@tanstack/vue-virtual": "^3.13.22",
23
+ "@trpc/client": "^11.12.1",
24
24
  "clsx": "^2.1.1",
25
25
  "pinia": "^3.0.4",
26
26
  "tailwind-merge": "^3.5.0",
@@ -30,23 +30,23 @@
30
30
  "vue-router": "^5.0.3"
31
31
  },
32
32
  "devDependencies": {
33
- "@cloudflare/vite-plugin": "^1.26.1",
33
+ "@cloudflare/vite-plugin": "^1.28.0",
34
34
  "@hono/node-server": "^1.19.11",
35
35
  "@hono/trpc-server": "^0.4.2",
36
36
  "@tailwindcss/vite": "^4.2.1",
37
- "@trpc/server": "^11.12.0",
38
- "@vitejs/plugin-vue": "^6.0.4",
39
- "@vitejs/plugin-vue-jsx": "^5.1.4",
37
+ "@trpc/server": "^11.12.1",
38
+ "@vitejs/plugin-vue": "^6.0.5",
39
+ "@vitejs/plugin-vue-jsx": "^5.1.5",
40
40
  "@vue/tsconfig": "^0.9.0",
41
41
  "consola": "^3.4.2",
42
- "hono": "^4.12.5",
42
+ "hono": "^4.12.8",
43
43
  "tailwindcss": "^4.2.1",
44
44
  "typescript": "~5.9.3",
45
- "vite": "^7.3.1",
46
- "vite-plugin-vue-devtools": "^8.0.7",
45
+ "vite": "^8.0.0",
46
+ "vite-plugin-vue-devtools": "^8.1.0",
47
47
  "vite-tsconfig-paths": "^6.1.1",
48
48
  "vue-tsc": "3.2.5",
49
- "wrangler": "^4.71.0",
49
+ "wrangler": "^4.73.0",
50
50
  "zod": "^4.3.6"
51
51
  }
52
52
  }
@@ -1,4 +1,3 @@
1
- import type { PluginOption } from 'vite'
2
1
  import path from 'node:path'
3
2
  import { cloudflare } from '@cloudflare/vite-plugin'
4
3
  import Tailwindcss from '@tailwindcss/vite'
@@ -8,9 +7,11 @@ import { defineConfig } from 'vite'
8
7
  import VueDevTools from 'vite-plugin-vue-devtools'
9
8
  import VueRouter from 'vue-router/vite'
10
9
 
11
- const ensureVitePlugin = <T>(plugin: T) => plugin as unknown as PluginOption
12
10
  // https://vite.dev/config/
13
11
  export default defineConfig({
12
+ build: {
13
+ target: 'baseline-widely-available',
14
+ },
14
15
  resolve: {
15
16
  alias: {
16
17
  '@': path.resolve(import.meta.dirname, 'src'),
@@ -18,40 +19,15 @@ export default defineConfig({
18
19
  },
19
20
  },
20
21
  plugins: [
21
- ensureVitePlugin(
22
- VueRouter(
23
- {
24
- dts: path.resolve(import.meta.dirname, 'src/route-map.d.ts'),
25
- },
26
- ),
22
+ VueRouter(
23
+ {
24
+ dts: path.resolve(import.meta.dirname, 'src/route-map.d.ts'),
25
+ },
27
26
  ),
28
- ensureVitePlugin(Vue()),
29
- ensureVitePlugin(VueJsx()),
30
- ensureVitePlugin(Tailwindcss()),
31
- ensureVitePlugin(cloudflare()),
32
- ensureVitePlugin(VueDevTools()),
27
+ Vue(),
28
+ VueJsx(),
29
+ Tailwindcss(),
30
+ cloudflare(),
31
+ VueDevTools(),
33
32
  ],
34
- build: {
35
- target: 'esnext',
36
- minify: 'esbuild',
37
- chunkSizeWarningLimit: 1000,
38
- rollupOptions: {
39
- output: {
40
- manualChunks: {
41
- 'vue-vendor': ['vue', 'vue-router', 'pinia'],
42
- 'query-vendor': ['@tanstack/vue-query'],
43
- 'trpc-vendor': ['@trpc/client'],
44
- },
45
- },
46
- },
47
- },
48
- server: {
49
- // proxy: {
50
- // '/api': {
51
- // target: `http://localhost:8787`,
52
- // changeOrigin: true,
53
- // // rewrite: path => path.replace(/^/api/, ''),
54
- // },
55
- // },
56
- },
57
33
  })
@@ -25,8 +25,10 @@
25
25
  ],
26
26
  "scripts": {
27
27
  "dev": "wrangler dev",
28
- "node:build:watch": "tsup --watch --sourcemap",
29
- "node:build": "tsup",
28
+ "build": "tsup",
29
+ "build:watch": "tsup --watch --sourcemap",
30
+ "node:build:watch": "pnpm build:watch",
31
+ "node:build": "pnpm build",
30
32
  "node:dev": "tsx watch src/node-entry.ts",
31
33
  "node:start": "node dist/node-entry.js",
32
34
  "test": "vitest run",
@@ -54,8 +56,8 @@
54
56
  "devDependencies": {
55
57
  "@hono/node-server": "^1.19.11",
56
58
  "consola": "^3.4.2",
57
- "hono": "^4.12.5",
58
- "wrangler": "^4.71.0",
59
+ "hono": "^4.12.8",
60
+ "wrangler": "^4.73.0",
59
61
  "zod": "^4.3.6"
60
62
  }
61
63
  }
@@ -1,13 +1,9 @@
1
1
  import { defineConfig } from 'tsup'
2
2
 
3
3
  export default defineConfig({
4
- entry: ['src/node-entry.ts'], // , 'src/cli.ts'],
4
+ entry: ['src/node-entry.ts'],
5
5
  shims: true,
6
6
  format: ['esm'],
7
7
  clean: true,
8
8
  dts: false,
9
- // https://github.com/egoist/tsup/pull/1056
10
- // https://github.com/egoist/tsup/issues?q=cjsInterop
11
- // cjsInterop: true,
12
- // splitting: true,
13
9
  })
@@ -30,7 +30,7 @@
30
30
  "@tailwindcss/vite": "^4.2.1",
31
31
  "cytoscape": "^3.33.1",
32
32
  "cytoscape-cose-bilkent": "^4.1.0",
33
- "dayjs": "^1.11.19",
33
+ "dayjs": "^1.11.20",
34
34
  "debug": "^4.4.3",
35
35
  "mermaid": "^11.13.0",
36
36
  "tailwindcss": "^4.2.1",
@@ -9,8 +9,8 @@
9
9
  - `esbuild` 用的少,直接用不是很方便,但是可以基于它做高度自定义(写插件)
10
10
  - `tsup` 基于 `esbuild` 的傻瓜无脑式的打包器,非常好用
11
11
  - `unbuild` 基于 `rollup` 的傻瓜无脑式的打包器,众多 `vite plugin` 源代码的御用打包器,还有基于 `jiti` 的 `stub` 模式,非常好用
12
- - `vite` 基于 `rollup` 的打包器,假如你需要构建前端组件,这个就是首选,毕竟你也懒得去自己处理各种各样的样式文件吧,比如打包新版本 `vue` 组件,只能使用这个的库模式进行打包。
13
- - `rolldown`/`tsdown` 暂时不太稳定,等出正式版本再观望一段时间
12
+ - `vite` 在 Vite 8 中默认基于 `rolldown` + `oxc`,假如你需要构建前端组件,这个就是首选,毕竟你也懒得去自己处理各种各样的样式文件吧,比如打包新版本 `vue` 组件,只能使用这个的库模式进行打包。
13
+ - `rolldown`/`tsdown` 适合更偏向库构建和工具链场景,但生态兼容面和迁移经验仍然不如 `vite`/`rollup` 成熟,是否采用要看你的实际约束
14
14
 
15
15
  所以本篇文章,主要介绍 `tsup` 和 `unbuild` 这两个通用打包器的使用和配置方式,以及 `vite` 库模式进行打包 `vue` 组件,其他的请自行查看对应的文档。
16
16
 
@@ -44,11 +44,11 @@
44
44
  "types": "./dist/index.d.ts"
45
45
  },
46
46
  "devDependencies": {
47
- "@vitejs/plugin-vue": "^6.0.4",
47
+ "@vitejs/plugin-vue": "^6.0.5",
48
48
  "@vue/test-utils": "^2.4.6",
49
49
  "@vue/tsconfig": "^0.9.0",
50
50
  "jsdom": "^28.1.0",
51
- "vite": "^7.3.1",
51
+ "vite": "^8.0.0",
52
52
  "vite-plugin-dts": "^4.5.4",
53
53
  "vue": "^3.5.30",
54
54
  "vue-tsc": "^3.2.5"
@@ -1,34 +1,29 @@
1
- import type { PluginOption, UserConfig } from 'vite'
2
1
  import Vue from '@vitejs/plugin-vue'
3
2
  import path from 'pathe'
4
3
  import { mergeConfig } from 'vite'
5
4
  import DTS from 'vite-plugin-dts'
6
5
  import { sharedConfig } from './vite.shared.config'
7
6
 
8
- // 某些插件仍引用旧版 Vite 类型,这里统一断言到当前工程使用的 PluginOption,避免类型不兼容。
9
- const ensureVitePlugin = <T>(plugin: T) => plugin as unknown as PluginOption
10
-
11
7
  export default mergeConfig(sharedConfig, {
12
8
  plugins: [
13
- ensureVitePlugin(Vue()),
14
- ensureVitePlugin(
15
- DTS(
16
- {
17
- tsconfigPath: './tsconfig.app.json',
18
- entryRoot: './src',
19
- },
20
- ),
9
+ Vue(),
10
+ DTS(
11
+ {
12
+ tsconfigPath: './tsconfig.app.json',
13
+ entryRoot: './src',
14
+ },
21
15
  ),
22
16
  ],
23
17
  // https://vite.dev/guide/build.html#library-mode
24
18
  build: {
19
+ target: 'baseline-widely-available',
25
20
  lib: {
26
21
  entry: path.resolve(import.meta.dirname, 'src/index'),
27
22
  name: 'icebreaker',
28
23
  // the proper extensions will be added
29
24
  fileName: 'index',
30
25
  },
31
- rollupOptions: {
26
+ rolldownOptions: {
32
27
  // make sure to externalize deps that shouldn't be bundled
33
28
  // into your library
34
29
  external: ['vue'],
@@ -41,4 +36,4 @@ export default mergeConfig(sharedConfig, {
41
36
  },
42
37
  },
43
38
  },
44
- } satisfies UserConfig)
39
+ })
@@ -1,4 +1,3 @@
1
- import type { UserConfig } from 'vite'
2
1
  import Vue from '@vitejs/plugin-vue'
3
2
  import { mergeConfig } from 'vitest/config'
4
3
  import { sharedConfig } from './vite.shared.config'
@@ -10,4 +9,4 @@ export default mergeConfig(sharedConfig, {
10
9
  environment: 'jsdom',
11
10
  },
12
11
  plugins: [Vue()],
13
- } satisfies UserConfig)
12
+ })