cmpt-huitu-cli 1.0.8 → 1.0.9

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/CHANGELOG.md CHANGED
@@ -7,6 +7,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
7
7
 
8
8
  ## [1.0.8] - 2026-01-09
9
9
 
10
+ ### Breaking Changes
11
+
12
+ - **cmpt-huitu-utils 升级到 2.0.0**:移除了 parseTime 及所有时间处理功能
13
+ - 删除了 `parseTime.js` 文件及其所有导出函数
14
+ - 移除了 dayjs 依赖
15
+ - 如需时间处理功能,请在项目中直接安装并使用 dayjs
16
+
10
17
  ### Fixed
11
18
 
12
19
  - 修复依赖转换逻辑:正确将 `workspace:*` 协议替换为 npm 版本号
@@ -23,16 +30,24 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
23
30
  ### Changed
24
31
 
25
32
  - 优化成功提示信息:显示配置的依赖版本和后续操作步骤
26
- - 更新模板文件:确保 main.js 正确注册 UI 组件,home.vue 包含组件使用示例
33
+ - 更新模板文件:简化 home.vue,移除 parseTime 示例
27
34
  - 改进文档:更新完整发布和使用指南,添加故障排查章节
35
+ - 更新依赖版本:cmpt-huitu-utils 升级到 ^2.0.0
36
+ - 简化模板依赖:移除 dayjs,减少项目体积
37
+
38
+ ### Removed
39
+
40
+ - 模板中移除 dayjs 依赖(不再需要)
41
+ - 模板中移除 parseTime 使用示例
28
42
 
29
43
  ### Verified
30
44
 
31
45
  - 端到端测试:验证项目创建、依赖安装、开发服务器启动、组件渲染、构建流程
32
- - UI 组件集成:验证 VexTable、HTable 组件和 parseTime 工具函数正常工作
46
+ - UI 组件集成:验证 VexTable、HTable 组件正常工作
33
47
  - 模板完整性:确认所有配置文件和示例代码完整
48
+ - 生产构建:验证 pnpm run build 成功执行
34
49
 
35
- ## [1.0.8] - 2024-XX-XX
50
+ ## [1.0.7] - 2024-XX-XX
36
51
 
37
52
  ### Initial Release
38
53
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cmpt-huitu-cli",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "type": "module",
5
5
  "description": "慧图前端项目工程化 CLI 工具",
6
6
  "main": "index.js",
package/src/versions.js CHANGED
@@ -16,7 +16,7 @@
16
16
  */
17
17
  export const DEPENDENCY_VERSIONS = {
18
18
  'cmpt-huitu-ui': '^1.0.8',
19
- 'cmpt-huitu-utils': '^1.0.8',
19
+ 'cmpt-huitu-utils': '^2.0.0',
20
20
  }
21
21
 
22
22
  /**
@@ -44,10 +44,9 @@ app.config.globalProperties.$utils = HuituUtils
44
44
 
45
45
  - ✅ VexTable component is used with proper props (columns, data)
46
46
  - ✅ HTable component is used with proper props (data, columns)
47
- - ✅ parseTime utility function is imported and used
48
47
  - ✅ Element Plus components (el-tag) are demonstrated
49
48
  - ✅ Component demonstrates reactive data binding
50
- - ✅ Proper lifecycle hooks (onMounted) are used
49
+ - ✅ Clean component structure without external dependencies
51
50
 
52
51
  **Component Usage:**
53
52
 
@@ -56,13 +55,6 @@ app.config.globalProperties.$utils = HuituUtils
56
55
  <HTable :data="data" :columns="hTableColumns" />
57
56
  ```
58
57
 
59
- **Utils Usage:**
60
-
61
- ```javascript
62
- import { parseTime } from 'cmpt-huitu-utils'
63
- currentTime.value = parseTime(new Date(), 'YYYY-MM-DD HH:mm:ss')
64
- ```
65
-
66
58
  **Requirements Met:** 2.3, 3.1, 3.2, 3.3, 3.4
67
59
 
68
60
  ---
@@ -0,0 +1,8 @@
1
+ {
2
+ "hash": "d2f528d9",
3
+ "configHash": "dea91f02",
4
+ "lockfileHash": "e978aae4",
5
+ "browserHash": "7ee8741a",
6
+ "optimized": {},
7
+ "chunks": {}
8
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "module"
3
+ }
@@ -20,7 +20,6 @@
20
20
  "cmpt-huitu-ui": "workspace:*",
21
21
  "cmpt-huitu-utils": "workspace:*",
22
22
  "axios": "^1.11.0",
23
- "dayjs": "^1.11.18",
24
23
  "element-plus": "^2.11.1",
25
24
  "lodash-es": "^4.17.21",
26
25
  "nprogress": "^0.2.0",
@@ -12,7 +12,5 @@ declare module 'vue' {
12
12
  Error: typeof import('./components/error/error.vue')['default']
13
13
  Home: typeof import('./views/home.vue')['default']
14
14
  Login: typeof import('./views/login/index.vue')['default']
15
- RouterLink: typeof import('vue-router')['RouterLink']
16
- RouterView: typeof import('vue-router')['RouterView']
17
15
  }
18
16
  }
@@ -22,18 +22,14 @@
22
22
  </ul>
23
23
 
24
24
  <div class="demo-section">
25
- <h3>Utils 工具演示</h3>
26
- <p>当前时间 (formatted by cmpt-huitu-utils): {{ currentTime }}</p>
25
+ <h3>组件演示</h3>
26
+ <p>VexTable HTable 组件已成功集成</p>
27
27
  </div>
28
28
  </div>
29
29
  </div>
30
30
  </template>
31
31
 
32
32
  <script setup>
33
- import { ref, onMounted } from 'vue'
34
- import { parseTime } from 'cmpt-huitu-utils'
35
-
36
- const currentTime = ref('')
37
33
  const columns = [
38
34
  { type: 'seq', title: '序号', width: 80 },
39
35
  { field: 'name', title: '姓名', width: 120 },
@@ -66,10 +62,6 @@
66
62
  fixed: 'left',
67
63
  },
68
64
  ]
69
-
70
- onMounted(() => {
71
- currentTime.value = parseTime(new Date(), 'YYYY-MM-DD HH:mm:ss')
72
- })
73
65
  </script>
74
66
 
75
67
  <style scoped>
@@ -127,7 +127,7 @@ export default defineConfig(({ mode, command }) => {
127
127
  // 将 CommonJS 模块转换为 ES 模块
128
128
  transformMixedEsModules: true,
129
129
  // 包含的 CommonJS 模块
130
- include: [/xe-utils/, /vxe-table/],
130
+ include: [/xe-utils/, /vxe-table/, /node_modules/],
131
131
  },
132
132
  // 下面要配合 minify: 'terser',才能生效
133
133
  // terserOptions: isProduction
@@ -153,7 +153,7 @@ export default defineConfig(({ mode, command }) => {
153
153
  chunkFileNames: 'assets/js/[name]-[hash].js',
154
154
  assetFileNames: 'assets/[ext]/[name]-[hash].[ext]',
155
155
  manualChunks: {
156
- 'x-vuelib': ['vue', 'vue-router', 'pinia', 'axios', 'dayjs', 'lodash-es'],
156
+ 'x-vuelib': ['vue', 'vue-router', 'pinia', 'axios', 'lodash-es'],
157
157
  'x-eleuilib': ['element-plus'],
158
158
  'x-vxetable': ['vxe-table', 'xe-utils'],
159
159
  },
@@ -175,24 +175,7 @@ export default defineConfig(({ mode, command }) => {
175
175
 
176
176
  // 优化依赖预构建(当你首次启动 vite 时,Vite 在本地加载你的站点之前预构建了项目依赖。)
177
177
  optimizeDeps: {
178
- include: [
179
- 'vue',
180
- 'vue-router',
181
- 'pinia',
182
- 'axios',
183
- 'element-plus',
184
- 'dayjs',
185
- 'dayjs/plugin/duration',
186
- 'dayjs/plugin/relativeTime',
187
- 'dayjs/plugin/isBetween',
188
- 'dayjs/plugin/weekday',
189
- 'dayjs/plugin/weekOfYear',
190
- 'dayjs/plugin/isSameOrBefore',
191
- 'dayjs/plugin/isSameOrAfter',
192
- 'dayjs/locale/zh-cn',
193
- 'vxe-table',
194
- 'xe-utils',
195
- ], // 默认情况下,不在 node_modules 中的,链接的包不会被预构建
178
+ include: ['vue', 'vue-router', 'pinia', 'axios', 'element-plus', 'vxe-table', 'xe-utils'], // 默认情况下,不在 node_modules 中的,链接的包不会被预构建
196
179
  exclude: ['cmpt-huitu-ui', 'cmpt-huitu-utils'], // 在预构建中强制排除的依赖项
197
180
  force: false, // 强制进行依赖预构建
198
181
  esbuildOptions: {
Binary file
Binary file
Binary file