pnpm-catalog-updates 0.5.6 → 0.6.5

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.
Files changed (220) hide show
  1. package/bin/pcu.js +1 -1
  2. package/dist/index.js +9559 -32
  3. package/dist/index.js.map +1 -1
  4. package/package.json +61 -103
  5. package/src/cli/commands/checkCommand.ts +227 -0
  6. package/src/cli/commands/initCommand.ts +394 -0
  7. package/src/cli/commands/securityCommand.ts +569 -0
  8. package/src/cli/commands/updateCommand.ts +245 -0
  9. package/src/cli/formatters/outputFormatter.ts +830 -0
  10. package/src/cli/formatters/progressBar.ts +700 -0
  11. package/src/cli/index.ts +565 -0
  12. package/src/cli/interactive/interactivePrompts.ts +517 -0
  13. package/src/cli/options/globalOptions.ts +380 -0
  14. package/src/cli/options/index.ts +5 -0
  15. package/src/cli/themes/colorTheme.ts +379 -0
  16. package/src/cli/validators/commandValidator.ts +395 -0
  17. package/src/cli/validators/index.ts +5 -0
  18. package/src/index.ts +4 -0
  19. package/LICENSE +0 -21
  20. package/README.ja.md +0 -582
  21. package/README.md +0 -690
  22. package/README.zh-CN.md +0 -630
  23. package/dist/application/services/CatalogUpdateService.d.ts +0 -209
  24. package/dist/application/services/CatalogUpdateService.d.ts.map +0 -1
  25. package/dist/application/services/CatalogUpdateService.js +0 -836
  26. package/dist/application/services/CatalogUpdateService.js.map +0 -1
  27. package/dist/application/services/WorkspaceService.d.ts +0 -139
  28. package/dist/application/services/WorkspaceService.d.ts.map +0 -1
  29. package/dist/application/services/WorkspaceService.js +0 -340
  30. package/dist/application/services/WorkspaceService.js.map +0 -1
  31. package/dist/cli/commands/CheckCommand.d.ts +0 -40
  32. package/dist/cli/commands/CheckCommand.d.ts.map +0 -1
  33. package/dist/cli/commands/CheckCommand.js +0 -177
  34. package/dist/cli/commands/CheckCommand.js.map +0 -1
  35. package/dist/cli/commands/InitCommand.d.ts +0 -53
  36. package/dist/cli/commands/InitCommand.d.ts.map +0 -1
  37. package/dist/cli/commands/InitCommand.js +0 -338
  38. package/dist/cli/commands/InitCommand.js.map +0 -1
  39. package/dist/cli/commands/SecurityCommand.d.ts +0 -113
  40. package/dist/cli/commands/SecurityCommand.d.ts.map +0 -1
  41. package/dist/cli/commands/SecurityCommand.js +0 -410
  42. package/dist/cli/commands/SecurityCommand.js.map +0 -1
  43. package/dist/cli/commands/UpdateCommand.d.ts +0 -44
  44. package/dist/cli/commands/UpdateCommand.d.ts.map +0 -1
  45. package/dist/cli/commands/UpdateCommand.js +0 -189
  46. package/dist/cli/commands/UpdateCommand.js.map +0 -1
  47. package/dist/cli/formatters/OutputFormatter.d.ts +0 -116
  48. package/dist/cli/formatters/OutputFormatter.d.ts.map +0 -1
  49. package/dist/cli/formatters/OutputFormatter.js +0 -664
  50. package/dist/cli/formatters/OutputFormatter.js.map +0 -1
  51. package/dist/cli/formatters/ProgressBar.d.ts +0 -195
  52. package/dist/cli/formatters/ProgressBar.d.ts.map +0 -1
  53. package/dist/cli/formatters/ProgressBar.js +0 -622
  54. package/dist/cli/formatters/ProgressBar.js.map +0 -1
  55. package/dist/cli/index.d.ts +0 -12
  56. package/dist/cli/index.d.ts.map +0 -1
  57. package/dist/cli/index.js +0 -492
  58. package/dist/cli/index.js.map +0 -1
  59. package/dist/cli/interactive/InteractivePrompts.d.ts +0 -85
  60. package/dist/cli/interactive/InteractivePrompts.d.ts.map +0 -1
  61. package/dist/cli/interactive/InteractivePrompts.js +0 -434
  62. package/dist/cli/interactive/InteractivePrompts.js.map +0 -1
  63. package/dist/cli/options/GlobalOptions.d.ts +0 -117
  64. package/dist/cli/options/GlobalOptions.d.ts.map +0 -1
  65. package/dist/cli/options/GlobalOptions.js +0 -278
  66. package/dist/cli/options/GlobalOptions.js.map +0 -1
  67. package/dist/cli/options/index.d.ts +0 -5
  68. package/dist/cli/options/index.d.ts.map +0 -1
  69. package/dist/cli/options/index.js +0 -5
  70. package/dist/cli/options/index.js.map +0 -1
  71. package/dist/cli/themes/ColorTheme.d.ts +0 -211
  72. package/dist/cli/themes/ColorTheme.d.ts.map +0 -1
  73. package/dist/cli/themes/ColorTheme.js +0 -267
  74. package/dist/cli/themes/ColorTheme.js.map +0 -1
  75. package/dist/cli/validators/CommandValidator.d.ts +0 -60
  76. package/dist/cli/validators/CommandValidator.d.ts.map +0 -1
  77. package/dist/cli/validators/CommandValidator.js +0 -319
  78. package/dist/cli/validators/CommandValidator.js.map +0 -1
  79. package/dist/cli/validators/index.d.ts +0 -5
  80. package/dist/cli/validators/index.d.ts.map +0 -1
  81. package/dist/cli/validators/index.js +0 -5
  82. package/dist/cli/validators/index.js.map +0 -1
  83. package/dist/common/config/Config.d.ts +0 -142
  84. package/dist/common/config/Config.d.ts.map +0 -1
  85. package/dist/common/config/Config.js +0 -382
  86. package/dist/common/config/Config.js.map +0 -1
  87. package/dist/common/config/ConfigLoader.d.ts +0 -49
  88. package/dist/common/config/ConfigLoader.d.ts.map +0 -1
  89. package/dist/common/config/ConfigLoader.js +0 -180
  90. package/dist/common/config/ConfigLoader.js.map +0 -1
  91. package/dist/common/config/PackageFilterConfig.d.ts +0 -56
  92. package/dist/common/config/PackageFilterConfig.d.ts.map +0 -1
  93. package/dist/common/config/PackageFilterConfig.js +0 -94
  94. package/dist/common/config/PackageFilterConfig.js.map +0 -1
  95. package/dist/common/config/index.d.ts +0 -8
  96. package/dist/common/config/index.d.ts.map +0 -1
  97. package/dist/common/config/index.js +0 -8
  98. package/dist/common/config/index.js.map +0 -1
  99. package/dist/common/error-handling/ErrorTracker.d.ts +0 -48
  100. package/dist/common/error-handling/ErrorTracker.d.ts.map +0 -1
  101. package/dist/common/error-handling/ErrorTracker.js +0 -93
  102. package/dist/common/error-handling/ErrorTracker.js.map +0 -1
  103. package/dist/common/error-handling/UserFriendlyErrorHandler.d.ts +0 -74
  104. package/dist/common/error-handling/UserFriendlyErrorHandler.d.ts.map +0 -1
  105. package/dist/common/error-handling/UserFriendlyErrorHandler.js +0 -703
  106. package/dist/common/error-handling/UserFriendlyErrorHandler.js.map +0 -1
  107. package/dist/common/error-handling/index.d.ts +0 -11
  108. package/dist/common/error-handling/index.d.ts.map +0 -1
  109. package/dist/common/error-handling/index.js +0 -9
  110. package/dist/common/error-handling/index.js.map +0 -1
  111. package/dist/common/logger/Logger.d.ts +0 -110
  112. package/dist/common/logger/Logger.d.ts.map +0 -1
  113. package/dist/common/logger/Logger.js +0 -289
  114. package/dist/common/logger/Logger.js.map +0 -1
  115. package/dist/common/logger/index.d.ts +0 -6
  116. package/dist/common/logger/index.d.ts.map +0 -1
  117. package/dist/common/logger/index.js +0 -6
  118. package/dist/common/logger/index.js.map +0 -1
  119. package/dist/common/types/cli.d.ts +0 -265
  120. package/dist/common/types/cli.d.ts.map +0 -1
  121. package/dist/common/types/cli.js +0 -5
  122. package/dist/common/types/cli.js.map +0 -1
  123. package/dist/common/types/core.d.ts +0 -270
  124. package/dist/common/types/core.d.ts.map +0 -1
  125. package/dist/common/types/core.js +0 -32
  126. package/dist/common/types/core.js.map +0 -1
  127. package/dist/common/types/index.d.ts +0 -8
  128. package/dist/common/types/index.d.ts.map +0 -1
  129. package/dist/common/types/index.js +0 -8
  130. package/dist/common/types/index.js.map +0 -1
  131. package/dist/common/utils/VersionChecker.d.ts +0 -54
  132. package/dist/common/utils/VersionChecker.d.ts.map +0 -1
  133. package/dist/common/utils/VersionChecker.js +0 -180
  134. package/dist/common/utils/VersionChecker.js.map +0 -1
  135. package/dist/common/utils/async.d.ts +0 -74
  136. package/dist/common/utils/async.d.ts.map +0 -1
  137. package/dist/common/utils/async.js +0 -228
  138. package/dist/common/utils/async.js.map +0 -1
  139. package/dist/common/utils/format.d.ts +0 -32
  140. package/dist/common/utils/format.d.ts.map +0 -1
  141. package/dist/common/utils/format.js +0 -121
  142. package/dist/common/utils/format.js.map +0 -1
  143. package/dist/common/utils/git.d.ts +0 -44
  144. package/dist/common/utils/git.d.ts.map +0 -1
  145. package/dist/common/utils/git.js +0 -147
  146. package/dist/common/utils/git.js.map +0 -1
  147. package/dist/common/utils/index.d.ts +0 -12
  148. package/dist/common/utils/index.d.ts.map +0 -1
  149. package/dist/common/utils/index.js +0 -12
  150. package/dist/common/utils/index.js.map +0 -1
  151. package/dist/common/utils/string.d.ts +0 -56
  152. package/dist/common/utils/string.d.ts.map +0 -1
  153. package/dist/common/utils/string.js +0 -134
  154. package/dist/common/utils/string.js.map +0 -1
  155. package/dist/common/utils/validation.d.ts +0 -88
  156. package/dist/common/utils/validation.d.ts.map +0 -1
  157. package/dist/common/utils/validation.js +0 -308
  158. package/dist/common/utils/validation.js.map +0 -1
  159. package/dist/domain/entities/Catalog.d.ts +0 -117
  160. package/dist/domain/entities/Catalog.d.ts.map +0 -1
  161. package/dist/domain/entities/Catalog.js +0 -240
  162. package/dist/domain/entities/Catalog.js.map +0 -1
  163. package/dist/domain/entities/Package.d.ts +0 -143
  164. package/dist/domain/entities/Package.d.ts.map +0 -1
  165. package/dist/domain/entities/Package.js +0 -272
  166. package/dist/domain/entities/Package.js.map +0 -1
  167. package/dist/domain/entities/Workspace.d.ts +0 -95
  168. package/dist/domain/entities/Workspace.d.ts.map +0 -1
  169. package/dist/domain/entities/Workspace.js +0 -173
  170. package/dist/domain/entities/Workspace.js.map +0 -1
  171. package/dist/domain/repositories/WorkspaceRepository.d.ts +0 -41
  172. package/dist/domain/repositories/WorkspaceRepository.d.ts.map +0 -1
  173. package/dist/domain/repositories/WorkspaceRepository.js +0 -8
  174. package/dist/domain/repositories/WorkspaceRepository.js.map +0 -1
  175. package/dist/domain/value-objects/CatalogCollection.d.ts +0 -106
  176. package/dist/domain/value-objects/CatalogCollection.d.ts.map +0 -1
  177. package/dist/domain/value-objects/CatalogCollection.js +0 -230
  178. package/dist/domain/value-objects/CatalogCollection.js.map +0 -1
  179. package/dist/domain/value-objects/PackageCollection.d.ts +0 -122
  180. package/dist/domain/value-objects/PackageCollection.d.ts.map +0 -1
  181. package/dist/domain/value-objects/PackageCollection.js +0 -263
  182. package/dist/domain/value-objects/PackageCollection.js.map +0 -1
  183. package/dist/domain/value-objects/Version.d.ts +0 -141
  184. package/dist/domain/value-objects/Version.d.ts.map +0 -1
  185. package/dist/domain/value-objects/Version.js +0 -268
  186. package/dist/domain/value-objects/Version.js.map +0 -1
  187. package/dist/domain/value-objects/WorkspaceConfig.d.ts +0 -144
  188. package/dist/domain/value-objects/WorkspaceConfig.d.ts.map +0 -1
  189. package/dist/domain/value-objects/WorkspaceConfig.js +0 -357
  190. package/dist/domain/value-objects/WorkspaceConfig.js.map +0 -1
  191. package/dist/domain/value-objects/WorkspaceId.d.ts +0 -51
  192. package/dist/domain/value-objects/WorkspaceId.d.ts.map +0 -1
  193. package/dist/domain/value-objects/WorkspaceId.js +0 -104
  194. package/dist/domain/value-objects/WorkspaceId.js.map +0 -1
  195. package/dist/domain/value-objects/WorkspacePath.d.ts +0 -75
  196. package/dist/domain/value-objects/WorkspacePath.d.ts.map +0 -1
  197. package/dist/domain/value-objects/WorkspacePath.js +0 -128
  198. package/dist/domain/value-objects/WorkspacePath.js.map +0 -1
  199. package/dist/index.d.ts +0 -25
  200. package/dist/index.d.ts.map +0 -1
  201. package/dist/infrastructure/cache/Cache.d.ts +0 -161
  202. package/dist/infrastructure/cache/Cache.d.ts.map +0 -1
  203. package/dist/infrastructure/cache/Cache.js +0 -398
  204. package/dist/infrastructure/cache/Cache.js.map +0 -1
  205. package/dist/infrastructure/cache/index.d.ts +0 -6
  206. package/dist/infrastructure/cache/index.d.ts.map +0 -1
  207. package/dist/infrastructure/cache/index.js +0 -6
  208. package/dist/infrastructure/cache/index.js.map +0 -1
  209. package/dist/infrastructure/external-services/NpmRegistryService.d.ts +0 -145
  210. package/dist/infrastructure/external-services/NpmRegistryService.d.ts.map +0 -1
  211. package/dist/infrastructure/external-services/NpmRegistryService.js +0 -466
  212. package/dist/infrastructure/external-services/NpmRegistryService.js.map +0 -1
  213. package/dist/infrastructure/file-system/FileSystemService.d.ts +0 -120
  214. package/dist/infrastructure/file-system/FileSystemService.d.ts.map +0 -1
  215. package/dist/infrastructure/file-system/FileSystemService.js +0 -663
  216. package/dist/infrastructure/file-system/FileSystemService.js.map +0 -1
  217. package/dist/infrastructure/repositories/FileWorkspaceRepository.d.ts +0 -57
  218. package/dist/infrastructure/repositories/FileWorkspaceRepository.d.ts.map +0 -1
  219. package/dist/infrastructure/repositories/FileWorkspaceRepository.js +0 -179
  220. package/dist/infrastructure/repositories/FileWorkspaceRepository.js.map +0 -1
package/README.md DELETED
@@ -1,690 +0,0 @@
1
- # pnpm-catalog-updates
2
-
3
- A powerful CLI tool to check and update pnpm workspace catalog dependencies,
4
- inspired by
5
- [npm-check-updates](https://github.com/raineorshine/npm-check-updates).
6
-
7
- **📖 Documentation Languages**: [English](README.md) | [中文](README.zh-CN.md) |
8
- [日本語](README.ja.md)
9
-
10
- [![CI](https://img.shields.io/github/actions/workflow/status/houko/pnpm-catalog-updates/ci.yml?label=CI&logo=github)](https://github.com/houko/pnpm-catalog-updates/actions)
11
- [![npm](https://img.shields.io/npm/v/pnpm-catalog-updates)](https://www.npmjs.com/package/pnpm-catalog-updates)
12
- [![Coverage](https://img.shields.io/coveralls/github/houko/pnpm-catalog-updates/main)](https://coveralls.io/github/houko/pnpm-catalog-updates)
13
-
14
- ## ✨ Features
15
-
16
- - 🏗️ **One-Command Setup**: Initialize complete PNPM workspace with `pcu init`
17
- - 🔍 **Smart Detection**: Automatically discovers pnpm workspaces and catalog
18
- configurations
19
- - 🎯 **Catalog Focused**: Specialized for pnpm catalog dependency management
20
- - 🚀 **Interactive Mode**: Choose which dependencies to update with an intuitive
21
- interface
22
- - 📊 **Impact Analysis**: Understand which packages will be affected by catalog
23
- changes
24
- - 🔒 **Safe Updates**: Dry-run mode and backup options for safe dependency
25
- updates
26
- - ⚡ **High Performance**: Parallel API queries and intelligent caching
27
- - 🛡️ **Security Aware**: Built-in security vulnerability scanning
28
- - 🎨 **Beautiful UI**: Enhanced progress bars with 6 visual styles, color
29
- themes, and interactive prompts
30
- - 🌈 **Progress Bar Styles**: Choose from gradient, fancy, minimal, rainbow,
31
- neon, or blocks styles
32
- - 🎭 **Customizable Themes**: Multiple color themes (default, modern, minimal,
33
- neon)
34
- - 📈 **Real-time Progress**: Live progress tracking with speed indicators and
35
- time estimates
36
- - 🔄 **Smart Version Check**: Automatic update notifications with --version
37
- command
38
- - 🔧 **Configurable**: Flexible configuration options and update strategies
39
-
40
- ## 🚀 Quick Start
41
-
42
- ```bash
43
- # Initialize a new PNPM workspace with PCU configuration
44
- pcu init
45
-
46
- # Or check for updates in existing workspace
47
- pcu -c
48
- ```
49
-
50
- ![Image](https://github.com/user-attachments/assets/f05a970e-c58c-44f1-b3f1-351ae30b4a35)
51
-
52
- ### Installation
53
-
54
- ```bash
55
- # Global installation
56
- npm install -g pnpm-catalog-updates
57
- # or
58
- npm install -g pcu
59
-
60
- # Or use with npx
61
- npx pnpm-catalog-updates
62
- # or
63
- npx pcu
64
-
65
- # Or use the short alias
66
- pcu
67
- ```
68
-
69
- ### Basic Usage
70
-
71
- ```bash
72
- # Initialize PNPM workspace and PCU configuration
73
- pcu init
74
-
75
- # Quick check for updates
76
- pcu -c
77
-
78
- # Quick update (interactive)
79
- pcu -i
80
-
81
- # Quick update (dry run)
82
- pcu -u -d
83
-
84
- # Get workspace info
85
- pcu -s
86
- ```
87
-
88
- ### Common Commands
89
-
90
- | Command | Description | Example |
91
- | -------- | --------------------------------------- | ------------------------- |
92
- | `pcu init` | Initialize workspace and configuration | `pcu init --verbose` |
93
- | `pcu -c` | Check for updates | `pcu -c --catalog node18` |
94
- | `pcu -i` | Update dependencies (interactive) | `pcu -i -b` |
95
- | `pcu -a` | Analyze impact | `pcu -a default react` |
96
- | `pcu -s` | Workspace info | `pcu -s --validate` |
97
- | `pcu -t` | Configure color theme | `pcu -t --set modern` |
98
- | `pcu -h` | Show help | `pcu -h update` |
99
-
100
- ## 📖 Complete Usage Guide
101
-
102
- ### All Commands & Shortcuts
103
-
104
- | Full Command | Shorthand | Description |
105
- | --------------- | --------- | ------------------------------------------------- |
106
- | `pcu init` | `pcu i` | Initialize PNPM workspace and PCU configuration |
107
- | `pcu check` | `pcu -c` | Check for outdated catalog dependencies |
108
- | `pcu update` | `pcu -u` | Update catalog dependencies |
109
- | `pcu analyze` | `pcu -a` | Analyze impact of dependency updates |
110
- | `pcu workspace` | `pcu -s` | Show workspace information and validation |
111
- | `pcu theme` | `pcu -t` | Configure color themes and UI settings |
112
- | `pcu help` | `pcu -h` | Display help information |
113
-
114
- ### Commands
115
-
116
- #### `pcu init` / `pcu i`
117
-
118
- Initialize a complete PNPM workspace environment with PCU configuration.
119
-
120
- ```bash
121
- pcu init [options]
122
- pcu i [options]
123
-
124
- Options:
125
- --force Overwrite existing configuration file
126
- --create-workspace Create PNPM workspace structure if missing (default: true)
127
- --no-create-workspace Skip creating PNPM workspace structure
128
- -w, --workspace <path> Workspace directory (default: current directory)
129
- -v, --verbose Show detailed information
130
- --no-color Disable colored output
131
-
132
- Description:
133
- Creates a complete PNPM workspace environment with:
134
- - Basic .pcurc.json configuration file with sensible defaults
135
- - package.json for workspace root (if missing)
136
- - pnpm-workspace.yaml configuration (if missing)
137
- - packages/ directory structure (if missing)
138
-
139
- The configuration includes package update rules for React, TypeScript,
140
- ESLint, and other common dependencies with appropriate security settings.
141
-
142
- Examples:
143
- pcu init # Initialize complete workspace in current directory
144
- pcu init --workspace ./my-project # Initialize in specific directory
145
- pcu init --force # Overwrite existing configuration
146
- pcu init --no-create-workspace # Only create .pcurc.json configuration
147
-
148
- Files Created:
149
- .pcurc.json PCU configuration with package rules and settings
150
- package.json Workspace root package.json (if missing)
151
- pnpm-workspace.yaml PNPM workspace configuration (if missing)
152
- packages/ Directory for workspace packages (if missing)
153
- ```
154
-
155
- #### `pcu check` / `pcu -c` / `pcu chk`
156
-
157
- Check for outdated dependencies in your pnpm workspace catalogs.
158
-
159
- ```bash
160
- pcu check [options]
161
- pcu -c [options]
162
- pcu chk [options]
163
-
164
- Options:
165
- --catalog <name> Check specific catalog only
166
- -f, --format <type> Output format: table, json, yaml, minimal (default: table)
167
- - table: Rich table format with colors and details
168
- - minimal: Simple npm-check-updates style (package → version)
169
- - json: JSON output for programmatic use
170
- - yaml: YAML output for configuration files
171
- -t, --target <type> Update target: latest, greatest, minor, patch, newest (default: latest)
172
- --prerelease Include prerelease versions
173
- --include <pattern> Include packages matching pattern
174
- --exclude <pattern> Exclude packages matching pattern
175
- -w, --workspace <path> Workspace directory (default: current directory)
176
- -v, --verbose Show detailed information
177
- ```
178
-
179
- #### `pcu update` / `pcu -u`
180
-
181
- Update catalog dependencies to newer versions.
182
-
183
- ```bash
184
- pcu update [options]
185
- pcu -u [options]
186
- pcu u [options]
187
-
188
- Options:
189
- -i, --interactive Interactive mode to choose updates
190
- -d, --dry-run Preview changes without writing files
191
- -t, --target <type> Update target: latest, greatest, minor, patch, newest (default: latest)
192
- --catalog <name> Update specific catalog only
193
- --include <pattern> Include packages matching pattern
194
- --exclude <pattern> Exclude packages matching pattern
195
- --force Force updates even if risky
196
- --prerelease Include prerelease versions
197
- -b, --create-backup Create backup files before updating
198
- -f, --format <type> Output format: table, json, yaml, minimal (default: table)
199
- - table: Rich table format with colors and details
200
- - minimal: Simple npm-check-updates style (package → version)
201
- - json: JSON output for programmatic use
202
- - yaml: YAML output for configuration files
203
- -w, --workspace <path> Workspace directory (default: current directory)
204
- -v, --verbose Show detailed information
205
- ```
206
-
207
- #### `pcu analyze` / `pcu -a`
208
-
209
- Analyze the impact of updating a specific dependency.
210
-
211
- ```bash
212
- pcu analyze <catalog> <package> [version]
213
- pcu -a <catalog> <package> [version]
214
- pcu a <catalog> <package> [version]
215
-
216
- Arguments:
217
- catalog Catalog name (e.g., 'default', 'react17')
218
- package Package name (e.g., 'react', '@types/node')
219
- version New version (optional, defaults to latest)
220
-
221
- Options:
222
- -f, --format <type> Output format: table, json, yaml, minimal (default: table)
223
- -w, --workspace <path> Workspace directory (default: current directory)
224
- -v, --verbose Show detailed information
225
-
226
- Examples:
227
- pcu analyze default react
228
- pcu a default react 18.3.0
229
- pcu -a react17 @types/react
230
- ```
231
-
232
- #### `pcu workspace` / `pcu -s`
233
-
234
- Show workspace information and validation.
235
-
236
- ```bash
237
- pcu workspace [options]
238
- pcu -s [options]
239
- pcu w [options]
240
-
241
- Options:
242
- --validate Validate workspace configuration
243
- -s, --stats Show workspace statistics
244
- -f, --format <type> Output format: table, json, yaml, minimal (default: table)
245
- -w, --workspace <path> Workspace directory (default: current directory)
246
- -v, --verbose Show detailed information
247
-
248
- Examples:
249
- pcu workspace # Show basic workspace info
250
- pcu -s --stats # Show detailed statistics
251
- pcu w --validate # Validate workspace configuration
252
- ```
253
-
254
- #### `pcu help` / `pcu -h`
255
-
256
- Display help information.
257
-
258
- ```bash
259
- pcu help [command]
260
- pcu -h [command]
261
-
262
- Examples:
263
- pcu help # Show general help
264
- pcu help update # Show help for update command
265
- pcu -h check # Show help for check command
266
- ```
267
-
268
- #### `pcu theme` / `pcu -t`
269
-
270
- Configure color themes and UI appearance.
271
-
272
- ```bash
273
- pcu theme [options]
274
- pcu -t [options]
275
-
276
- Options:
277
- -s, --set <theme> Set color theme: default, modern, minimal, neon
278
- -l, --list List all available themes
279
- -i, --interactive Interactive theme configuration wizard
280
-
281
- Examples:
282
- pcu theme # Show current theme info
283
- pcu -t --list # List all available themes
284
- pcu theme --set modern # Set to modern theme
285
- pcu -t --interactive # Launch theme configuration wizard
286
- ```
287
-
288
- **Available Themes:**
289
-
290
- - `default` - Balanced colors for general use
291
- - `modern` - Vibrant colors for development environments
292
- - `minimal` - Clean and simple for production environments
293
- - `neon` - High contrast colors for presentations
294
-
295
- ### Global Options
296
-
297
- These options work with all commands:
298
-
299
- ```bash
300
- -w, --workspace <path> Workspace directory path
301
- -v, --verbose Enable verbose logging
302
- --no-color Disable colored output
303
- -V, --version Output the version number
304
- -h, --help Display help for command
305
- ```
306
-
307
- ### Common Usage Patterns
308
-
309
- ```bash
310
- # Initialize new workspace
311
- pcu init # Create complete workspace structure
312
- pcu init --no-create-workspace # Only create .pcurc.json configuration
313
-
314
- # Quick check for updates
315
- pcu -c
316
-
317
- # Check with simple output (like npm-check-updates)
318
- pcu -c --format minimal
319
-
320
- # Interactive update with backup
321
- pcu -i -b
322
-
323
- # Update only minor and patch versions
324
- pcu -u --target minor
325
-
326
- # Check specific catalog
327
- pcu -c --catalog node18
328
-
329
- # Update excluding certain packages
330
- pcu -u --exclude "eslint*"
331
-
332
- # Dry run with verbose output
333
- pcu -u -d -v
334
-
335
- # Update with simple output format
336
- pcu -u --format minimal
337
-
338
- # Analyze impact before updating
339
- pcu -a default react
340
- pcu -u --catalog default --include react
341
-
342
- # Validate workspace configuration
343
- pcu -s --validate
344
-
345
- # Theme customization
346
- pcu -t --list # List available themes
347
- pcu -t --set modern # Set modern theme
348
- pcu -t --interactive # Interactive theme setup
349
- ```
350
-
351
- ### Configuration
352
-
353
- Create a `.pcurc.json` file (PCU configuration file) in your project root:
354
-
355
- ```json
356
- {
357
- "defaults": {
358
- "target": "latest",
359
- "timeout": 30000,
360
- "parallel": 5
361
- },
362
- "workspace": {
363
- "autoDiscover": true,
364
- "catalogMode": "strict"
365
- },
366
- "update": {
367
- "interactive": true,
368
- "dryRunFirst": true,
369
- "skipPrereleases": false
370
- },
371
- "output": {
372
- "format": "table",
373
- "color": true,
374
- "verbose": false
375
- },
376
- "ui": {
377
- "theme": "default",
378
- "progressBars": true,
379
- "animations": true
380
- }
381
- }
382
- ```
383
-
384
- #### Package Filtering Configuration
385
-
386
- You can also configure package-specific update rules by creating a `.pcurc.json`
387
- (PCU configuration file) with filtering options:
388
-
389
- ```json
390
- {
391
- // Exclude packages you never want to update
392
- "exclude": ["typescript", "@types/node", "react", "react-dom"],
393
-
394
- // Only update specific packages (optional - if not specified, all packages are considered)
395
- "include": ["lodash*", "chalk", "commander"],
396
-
397
- // Package-specific update rules
398
- "packageRules": [
399
- {
400
- "patterns": ["react", "react-dom"],
401
- "target": "minor", // Only minor updates for React
402
- "requireConfirmation": true, // Always ask before updating
403
- "relatedPackages": ["@types/react", "@types/react-dom"] // Related packages automatically follow same strategy
404
- },
405
- {
406
- "patterns": ["vue"],
407
- "target": "minor",
408
- "relatedPackages": ["@vue/compiler-sfc", "@vue/runtime-core"] // Vue ecosystem packages
409
- },
410
- {
411
- "patterns": ["@types/node"],
412
- "target": "minor", // Conservative updates for Node.js type definitions
413
- "requireConfirmation": true
414
- },
415
- {
416
- "patterns": ["@types/*"],
417
- "target": "latest", // Other type definitions can update more freely
418
- "autoUpdate": true
419
- },
420
- {
421
- "patterns": ["eslint*", "prettier"],
422
- "target": "minor", // Minor updates for dev tools
423
- "groupUpdate": true // Update related packages together
424
- }
425
- ],
426
-
427
- // Security configuration
428
- "security": {
429
- "autoFixVulnerabilities": true, // Automatically check and fix security vulnerabilities
430
- "allowMajorForSecurity": true, // Allow major version upgrades for security fixes
431
- "notifyOnSecurityUpdate": true // Show notifications on security updates
432
- },
433
-
434
- // Advanced configuration
435
- "advanced": {
436
- "concurrency": 5, // Number of concurrent network requests (default: 5)
437
- "timeout": 30000, // Network request timeout in ms (default: 30000)
438
- "retries": 3, // Number of retries on failure (default: 3)
439
- "cacheValidityMinutes": 60, // Cache validity period in minutes (default: 60, set to 0 to disable caching)
440
- "checkForUpdates": true // Check for tool updates on startup (default: true)
441
- },
442
-
443
- // Monorepo configuration
444
- "monorepo": {
445
- "syncVersions": ["react", "react-dom"], // Packages that need version sync across multiple catalogs
446
- "catalogPriority": ["default", "latest", "react17"] // Catalog priority order
447
- },
448
-
449
- // Override defaults
450
- "defaults": {
451
- "target": "minor",
452
- "createBackup": true
453
- }
454
- }
455
- ```
456
-
457
- **Related Packages Feature**: `relatedPackages` allows related packages to
458
- automatically follow the same version strategy
459
-
460
- - When you configure `react` with `target: "minor"`, `@types/react` will
461
- automatically apply the same strategy
462
- - Avoid manually duplicating update rules for related packages
463
- - Ensures version consistency across ecosystem packages
464
-
465
- **Configuration priority**: relatedPackages > direct pattern matching > CLI
466
- options > default configuration
467
-
468
- **Priority Examples**:
469
-
470
- ```bash
471
- @types/react → matches react rule's relatedPackages → uses "minor" strategy
472
- @types/node → matches @types/node specific rule → uses "minor" strategy
473
- @types/lodash → matches @types/* general rule → uses "latest" strategy
474
- ```
475
-
476
- **Pattern matching**: Supports glob patterns like `react*`, `@types/*`,
477
- `eslint*`
478
-
479
- ## 📁 Project Structure
480
-
481
- This project follows Domain-Driven Design (DDD) principles:
482
-
483
- ```text
484
- src/
485
- ├── cli/ # CLI interface layer
486
- │ ├── commands/ # Command handlers
487
- │ ├── options/ # Option parsers
488
- │ ├── formatters/ # Output formatters & progress bars
489
- │ ├── interactive/ # Interactive prompts & UI
490
- │ ├── themes/ # Color themes & styling
491
- │ └── validators/ # Input validation
492
- ├── application/ # Application services
493
- │ ├── services/ # Application services
494
- │ ├── handlers/ # Command handlers
495
- │ └── mappers/ # Data mappers
496
- ├── domain/ # Domain model
497
- │ ├── entities/ # Domain entities
498
- │ ├── value-objects/ # Value objects
499
- │ ├── aggregates/ # Aggregate roots
500
- │ ├── services/ # Domain services
501
- │ └── repositories/ # Repository interfaces
502
- ├── infrastructure/ # Infrastructure layer
503
- │ ├── repositories/ # Repository implementations
504
- │ ├── external-services/ # External service clients
505
- │ └── file-system/ # File system operations
506
- ├── adapters/ # Adapter layer
507
- │ ├── registry/ # Package registry adapters
508
- │ └── package-managers/ # Package manager adapters
509
- └── common/ # Common utilities
510
- ├── types/ # Type definitions
511
- ├── utils/ # Utility functions
512
- ├── config/ # Configuration
513
- └── logger/ # Logging
514
- ```
515
-
516
- ## 🧪 Development
517
-
518
- ### Prerequisites
519
-
520
- - Node.js >= 18.0.0
521
- - pnpm >= 8.15.0
522
-
523
- ### Setup
524
-
525
- ```bash
526
- # Clone the repository
527
- git clone https://github.com/houko/pnpm-catalog-updates.git
528
- cd pnpm-catalog-updates
529
-
530
- # Install dependencies
531
- pnpm install
532
-
533
- # Build the project
534
- pnpm build
535
-
536
- # Run tests
537
- pnpm test
538
-
539
- # Run in development mode
540
- pnpm dev --help
541
- ```
542
-
543
- ### Scripts
544
-
545
- ```bash
546
- # Development
547
- pnpm dev # Run in development mode
548
- pnpm build # Build the project
549
- pnpm build:watch # Build in watch mode
550
-
551
- # Testing
552
- pnpm test # Run unit tests
553
- pnpm test:watch # Run tests in watch mode
554
- pnpm test:coverage # Run tests with coverage
555
- pnpm test:e2e # Run E2E tests
556
-
557
- # Code Quality
558
- pnpm lint # Lint code
559
- pnpm lint:fix # Fix linting issues
560
- pnpm format # Format code
561
- pnpm typecheck # Type checking
562
-
563
- # Utilities
564
- pnpm clean # Clean build artifacts
565
- ```
566
-
567
- ### Testing
568
-
569
- The project uses a comprehensive testing strategy:
570
-
571
- - **Unit Tests**: Test individual components in isolation
572
- - **Integration Tests**: Test component interactions
573
- - **E2E Tests**: Test the complete CLI workflow
574
-
575
- ```bash
576
- # Run all tests
577
- pnpm test
578
-
579
- # Run tests with coverage
580
- pnpm test:coverage
581
-
582
- # Run E2E tests
583
- pnpm test:e2e
584
-
585
- # Run tests in watch mode
586
- pnpm test:watch
587
- ```
588
-
589
- ## 📊 Examples
590
-
591
- ### Basic Workspace
592
-
593
- ```yaml
594
- # pnpm-workspace.yaml
595
- packages:
596
- - 'packages/*'
597
-
598
- catalog:
599
- react: ^18.2.0
600
- lodash: ^4.17.21
601
- typescript: ^5.0.0
602
- ```
603
-
604
- ### Multi-Catalog Setup
605
-
606
- ```yaml
607
- # pnpm-workspace.yaml
608
- packages:
609
- - "apps/*"
610
- - "packages/*"
611
-
612
- catalog:
613
- # Default catalog
614
- react: ^18.2.0
615
- typescript: ^5.0.0
616
-
617
- catalogs:
618
- # Legacy versions
619
- react17:
620
- react: ^17.0.2
621
- @types/react: ^17.0.62
622
-
623
- # Latest versions
624
- latest:
625
- react: ^18.2.0
626
- typescript: ^5.2.0
627
- ```
628
-
629
- ### Usage in package.json
630
-
631
- ```json
632
- {
633
- "dependencies": {
634
- "react": "catalog:",
635
- "lodash": "catalog:",
636
- "legacy-lib": "catalog:react17"
637
- }
638
- }
639
- ```
640
-
641
- ## 🤝 Contributing
642
-
643
- We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md)
644
- for details.
645
-
646
- ### Development Workflow
647
-
648
- 1. Fork the repository
649
- 2. Create a feature branch: `git checkout -b feature/amazing-feature`
650
- 3. Make your changes
651
- 4. Add tests for your changes
652
- 5. Ensure all tests pass: `pnpm test`
653
- 6. Lint your code: `pnpm lint:fix`
654
- 7. Commit your changes: `git commit -m 'feat: add amazing feature'`
655
- 8. Push to the branch: `git push origin feature/amazing-feature`
656
- 9. Open a Pull Request
657
-
658
- ### Commit Message Convention
659
-
660
- We use [Conventional Commits](https://conventionalcommits.org/):
661
-
662
- - `feat`: A new feature
663
- - `fix`: A bug fix
664
- - `docs`: Documentation only changes
665
- - `style`: Changes that do not affect the meaning of the code
666
- - `refactor`: A code change that neither fixes a bug nor adds a feature
667
- - `test`: Adding missing tests or correcting existing tests
668
- - `chore`: Changes to the build process or auxiliary tools
669
-
670
- ## 📄 License
671
-
672
- This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
673
- for details.
674
-
675
- ## 🙏 Acknowledgments
676
-
677
- - Inspired by
678
- [npm-check-updates](https://github.com/raineorshine/npm-check-updates)
679
- - Built with love for the pnpm community
680
- - Thanks to all contributors and users
681
-
682
- ## 📞 Support
683
-
684
- - 📖 [Documentation](https://github.com/houko/pnpm-catalog-updates#readme)
685
- - 🐛 [Issue Tracker](https://github.com/houko/pnpm-catalog-updates/issues)
686
- - 💬 [Discussions](https://github.com/houko/pnpm-catalog-updates/discussions)
687
-
688
- ---
689
-
690
- Made with ❤️ for the pnpm community