pnpm-catalog-updates 0.5.7 → 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.
- package/bin/pcu.js +1 -1
- package/dist/index.js +9559 -32
- package/dist/index.js.map +1 -1
- package/package.json +61 -103
- package/src/cli/commands/checkCommand.ts +227 -0
- package/src/cli/commands/initCommand.ts +394 -0
- package/src/cli/commands/securityCommand.ts +569 -0
- package/src/cli/commands/updateCommand.ts +245 -0
- package/src/cli/formatters/outputFormatter.ts +830 -0
- package/src/cli/formatters/progressBar.ts +700 -0
- package/src/cli/index.ts +565 -0
- package/src/cli/interactive/interactivePrompts.ts +517 -0
- package/src/cli/options/globalOptions.ts +380 -0
- package/src/cli/options/index.ts +5 -0
- package/src/cli/themes/colorTheme.ts +379 -0
- package/src/cli/validators/commandValidator.ts +395 -0
- package/src/cli/validators/index.ts +5 -0
- package/src/index.ts +4 -0
- package/LICENSE +0 -21
- package/README.ja.md +0 -587
- package/README.md +0 -694
- package/README.zh-CN.md +0 -634
- package/dist/application/services/CatalogUpdateService.d.ts +0 -209
- package/dist/application/services/CatalogUpdateService.d.ts.map +0 -1
- package/dist/application/services/CatalogUpdateService.js +0 -839
- package/dist/application/services/CatalogUpdateService.js.map +0 -1
- package/dist/application/services/WorkspaceService.d.ts +0 -139
- package/dist/application/services/WorkspaceService.d.ts.map +0 -1
- package/dist/application/services/WorkspaceService.js +0 -340
- package/dist/application/services/WorkspaceService.js.map +0 -1
- package/dist/cli/commands/CheckCommand.d.ts +0 -40
- package/dist/cli/commands/CheckCommand.d.ts.map +0 -1
- package/dist/cli/commands/CheckCommand.js +0 -177
- package/dist/cli/commands/CheckCommand.js.map +0 -1
- package/dist/cli/commands/InitCommand.d.ts +0 -53
- package/dist/cli/commands/InitCommand.d.ts.map +0 -1
- package/dist/cli/commands/InitCommand.js +0 -338
- package/dist/cli/commands/InitCommand.js.map +0 -1
- package/dist/cli/commands/SecurityCommand.d.ts +0 -113
- package/dist/cli/commands/SecurityCommand.d.ts.map +0 -1
- package/dist/cli/commands/SecurityCommand.js +0 -410
- package/dist/cli/commands/SecurityCommand.js.map +0 -1
- package/dist/cli/commands/UpdateCommand.d.ts +0 -44
- package/dist/cli/commands/UpdateCommand.d.ts.map +0 -1
- package/dist/cli/commands/UpdateCommand.js +0 -189
- package/dist/cli/commands/UpdateCommand.js.map +0 -1
- package/dist/cli/formatters/OutputFormatter.d.ts +0 -116
- package/dist/cli/formatters/OutputFormatter.d.ts.map +0 -1
- package/dist/cli/formatters/OutputFormatter.js +0 -664
- package/dist/cli/formatters/OutputFormatter.js.map +0 -1
- package/dist/cli/formatters/ProgressBar.d.ts +0 -195
- package/dist/cli/formatters/ProgressBar.d.ts.map +0 -1
- package/dist/cli/formatters/ProgressBar.js +0 -622
- package/dist/cli/formatters/ProgressBar.js.map +0 -1
- package/dist/cli/index.d.ts +0 -12
- package/dist/cli/index.d.ts.map +0 -1
- package/dist/cli/index.js +0 -492
- package/dist/cli/index.js.map +0 -1
- package/dist/cli/interactive/InteractivePrompts.d.ts +0 -85
- package/dist/cli/interactive/InteractivePrompts.d.ts.map +0 -1
- package/dist/cli/interactive/InteractivePrompts.js +0 -434
- package/dist/cli/interactive/InteractivePrompts.js.map +0 -1
- package/dist/cli/options/GlobalOptions.d.ts +0 -117
- package/dist/cli/options/GlobalOptions.d.ts.map +0 -1
- package/dist/cli/options/GlobalOptions.js +0 -278
- package/dist/cli/options/GlobalOptions.js.map +0 -1
- package/dist/cli/options/index.d.ts +0 -5
- package/dist/cli/options/index.d.ts.map +0 -1
- package/dist/cli/options/index.js +0 -5
- package/dist/cli/options/index.js.map +0 -1
- package/dist/cli/themes/ColorTheme.d.ts +0 -211
- package/dist/cli/themes/ColorTheme.d.ts.map +0 -1
- package/dist/cli/themes/ColorTheme.js +0 -267
- package/dist/cli/themes/ColorTheme.js.map +0 -1
- package/dist/cli/validators/CommandValidator.d.ts +0 -60
- package/dist/cli/validators/CommandValidator.d.ts.map +0 -1
- package/dist/cli/validators/CommandValidator.js +0 -319
- package/dist/cli/validators/CommandValidator.js.map +0 -1
- package/dist/cli/validators/index.d.ts +0 -5
- package/dist/cli/validators/index.d.ts.map +0 -1
- package/dist/cli/validators/index.js +0 -5
- package/dist/cli/validators/index.js.map +0 -1
- package/dist/common/config/Config.d.ts +0 -142
- package/dist/common/config/Config.d.ts.map +0 -1
- package/dist/common/config/Config.js +0 -382
- package/dist/common/config/Config.js.map +0 -1
- package/dist/common/config/ConfigLoader.d.ts +0 -49
- package/dist/common/config/ConfigLoader.d.ts.map +0 -1
- package/dist/common/config/ConfigLoader.js +0 -180
- package/dist/common/config/ConfigLoader.js.map +0 -1
- package/dist/common/config/PackageFilterConfig.d.ts +0 -56
- package/dist/common/config/PackageFilterConfig.d.ts.map +0 -1
- package/dist/common/config/PackageFilterConfig.js +0 -94
- package/dist/common/config/PackageFilterConfig.js.map +0 -1
- package/dist/common/config/index.d.ts +0 -8
- package/dist/common/config/index.d.ts.map +0 -1
- package/dist/common/config/index.js +0 -8
- package/dist/common/config/index.js.map +0 -1
- package/dist/common/error-handling/ErrorTracker.d.ts +0 -48
- package/dist/common/error-handling/ErrorTracker.d.ts.map +0 -1
- package/dist/common/error-handling/ErrorTracker.js +0 -93
- package/dist/common/error-handling/ErrorTracker.js.map +0 -1
- package/dist/common/error-handling/UserFriendlyErrorHandler.d.ts +0 -74
- package/dist/common/error-handling/UserFriendlyErrorHandler.d.ts.map +0 -1
- package/dist/common/error-handling/UserFriendlyErrorHandler.js +0 -703
- package/dist/common/error-handling/UserFriendlyErrorHandler.js.map +0 -1
- package/dist/common/error-handling/index.d.ts +0 -11
- package/dist/common/error-handling/index.d.ts.map +0 -1
- package/dist/common/error-handling/index.js +0 -9
- package/dist/common/error-handling/index.js.map +0 -1
- package/dist/common/logger/Logger.d.ts +0 -110
- package/dist/common/logger/Logger.d.ts.map +0 -1
- package/dist/common/logger/Logger.js +0 -289
- package/dist/common/logger/Logger.js.map +0 -1
- package/dist/common/logger/index.d.ts +0 -6
- package/dist/common/logger/index.d.ts.map +0 -1
- package/dist/common/logger/index.js +0 -6
- package/dist/common/logger/index.js.map +0 -1
- package/dist/common/types/cli.d.ts +0 -265
- package/dist/common/types/cli.d.ts.map +0 -1
- package/dist/common/types/cli.js +0 -5
- package/dist/common/types/cli.js.map +0 -1
- package/dist/common/types/core.d.ts +0 -270
- package/dist/common/types/core.d.ts.map +0 -1
- package/dist/common/types/core.js +0 -32
- package/dist/common/types/core.js.map +0 -1
- package/dist/common/types/index.d.ts +0 -8
- package/dist/common/types/index.d.ts.map +0 -1
- package/dist/common/types/index.js +0 -8
- package/dist/common/types/index.js.map +0 -1
- package/dist/common/utils/VersionChecker.d.ts +0 -54
- package/dist/common/utils/VersionChecker.d.ts.map +0 -1
- package/dist/common/utils/VersionChecker.js +0 -180
- package/dist/common/utils/VersionChecker.js.map +0 -1
- package/dist/common/utils/async.d.ts +0 -74
- package/dist/common/utils/async.d.ts.map +0 -1
- package/dist/common/utils/async.js +0 -228
- package/dist/common/utils/async.js.map +0 -1
- package/dist/common/utils/format.d.ts +0 -32
- package/dist/common/utils/format.d.ts.map +0 -1
- package/dist/common/utils/format.js +0 -121
- package/dist/common/utils/format.js.map +0 -1
- package/dist/common/utils/git.d.ts +0 -44
- package/dist/common/utils/git.d.ts.map +0 -1
- package/dist/common/utils/git.js +0 -147
- package/dist/common/utils/git.js.map +0 -1
- package/dist/common/utils/index.d.ts +0 -12
- package/dist/common/utils/index.d.ts.map +0 -1
- package/dist/common/utils/index.js +0 -12
- package/dist/common/utils/index.js.map +0 -1
- package/dist/common/utils/string.d.ts +0 -56
- package/dist/common/utils/string.d.ts.map +0 -1
- package/dist/common/utils/string.js +0 -134
- package/dist/common/utils/string.js.map +0 -1
- package/dist/common/utils/validation.d.ts +0 -88
- package/dist/common/utils/validation.d.ts.map +0 -1
- package/dist/common/utils/validation.js +0 -308
- package/dist/common/utils/validation.js.map +0 -1
- package/dist/domain/entities/Catalog.d.ts +0 -117
- package/dist/domain/entities/Catalog.d.ts.map +0 -1
- package/dist/domain/entities/Catalog.js +0 -240
- package/dist/domain/entities/Catalog.js.map +0 -1
- package/dist/domain/entities/Package.d.ts +0 -143
- package/dist/domain/entities/Package.d.ts.map +0 -1
- package/dist/domain/entities/Package.js +0 -272
- package/dist/domain/entities/Package.js.map +0 -1
- package/dist/domain/entities/Workspace.d.ts +0 -95
- package/dist/domain/entities/Workspace.d.ts.map +0 -1
- package/dist/domain/entities/Workspace.js +0 -173
- package/dist/domain/entities/Workspace.js.map +0 -1
- package/dist/domain/repositories/WorkspaceRepository.d.ts +0 -41
- package/dist/domain/repositories/WorkspaceRepository.d.ts.map +0 -1
- package/dist/domain/repositories/WorkspaceRepository.js +0 -8
- package/dist/domain/repositories/WorkspaceRepository.js.map +0 -1
- package/dist/domain/value-objects/CatalogCollection.d.ts +0 -106
- package/dist/domain/value-objects/CatalogCollection.d.ts.map +0 -1
- package/dist/domain/value-objects/CatalogCollection.js +0 -230
- package/dist/domain/value-objects/CatalogCollection.js.map +0 -1
- package/dist/domain/value-objects/PackageCollection.d.ts +0 -122
- package/dist/domain/value-objects/PackageCollection.d.ts.map +0 -1
- package/dist/domain/value-objects/PackageCollection.js +0 -263
- package/dist/domain/value-objects/PackageCollection.js.map +0 -1
- package/dist/domain/value-objects/Version.d.ts +0 -141
- package/dist/domain/value-objects/Version.d.ts.map +0 -1
- package/dist/domain/value-objects/Version.js +0 -268
- package/dist/domain/value-objects/Version.js.map +0 -1
- package/dist/domain/value-objects/WorkspaceConfig.d.ts +0 -144
- package/dist/domain/value-objects/WorkspaceConfig.d.ts.map +0 -1
- package/dist/domain/value-objects/WorkspaceConfig.js +0 -357
- package/dist/domain/value-objects/WorkspaceConfig.js.map +0 -1
- package/dist/domain/value-objects/WorkspaceId.d.ts +0 -51
- package/dist/domain/value-objects/WorkspaceId.d.ts.map +0 -1
- package/dist/domain/value-objects/WorkspaceId.js +0 -104
- package/dist/domain/value-objects/WorkspaceId.js.map +0 -1
- package/dist/domain/value-objects/WorkspacePath.d.ts +0 -75
- package/dist/domain/value-objects/WorkspacePath.d.ts.map +0 -1
- package/dist/domain/value-objects/WorkspacePath.js +0 -128
- package/dist/domain/value-objects/WorkspacePath.js.map +0 -1
- package/dist/index.d.ts +0 -25
- package/dist/index.d.ts.map +0 -1
- package/dist/infrastructure/cache/Cache.d.ts +0 -161
- package/dist/infrastructure/cache/Cache.d.ts.map +0 -1
- package/dist/infrastructure/cache/Cache.js +0 -398
- package/dist/infrastructure/cache/Cache.js.map +0 -1
- package/dist/infrastructure/cache/index.d.ts +0 -6
- package/dist/infrastructure/cache/index.d.ts.map +0 -1
- package/dist/infrastructure/cache/index.js +0 -6
- package/dist/infrastructure/cache/index.js.map +0 -1
- package/dist/infrastructure/external-services/NpmRegistryService.d.ts +0 -153
- package/dist/infrastructure/external-services/NpmRegistryService.d.ts.map +0 -1
- package/dist/infrastructure/external-services/NpmRegistryService.js +0 -511
- package/dist/infrastructure/external-services/NpmRegistryService.js.map +0 -1
- package/dist/infrastructure/file-system/FileSystemService.d.ts +0 -120
- package/dist/infrastructure/file-system/FileSystemService.d.ts.map +0 -1
- package/dist/infrastructure/file-system/FileSystemService.js +0 -663
- package/dist/infrastructure/file-system/FileSystemService.js.map +0 -1
- package/dist/infrastructure/repositories/FileWorkspaceRepository.d.ts +0 -57
- package/dist/infrastructure/repositories/FileWorkspaceRepository.d.ts.map +0 -1
- package/dist/infrastructure/repositories/FileWorkspaceRepository.js +0 -179
- package/dist/infrastructure/repositories/FileWorkspaceRepository.js.map +0 -1
- package/dist/infrastructure/utils/NpmrcParser.d.ts +0 -40
- package/dist/infrastructure/utils/NpmrcParser.d.ts.map +0 -1
- package/dist/infrastructure/utils/NpmrcParser.js +0 -157
- package/dist/infrastructure/utils/NpmrcParser.js.map +0 -1
package/README.md
DELETED
|
@@ -1,694 +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
|
-
[](https://github.com/houko/pnpm-catalog-updates/actions)
|
|
11
|
-
[](https://www.npmjs.com/package/pnpm-catalog-updates)
|
|
12
|
-
[](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
|
-
- 🔐 **Private Registry Support**: Automatically reads `.npmrc` and `.pnpmrc`
|
|
40
|
-
configurations for scoped registries and authentication
|
|
41
|
-
- 📦 **Multi-Registry**: Supports different registries for different package
|
|
42
|
-
scopes (e.g., GitHub Packages, private npm registries)
|
|
43
|
-
|
|
44
|
-
## 🚀 Quick Start
|
|
45
|
-
|
|
46
|
-
```bash
|
|
47
|
-
# Initialize a new PNPM workspace with PCU configuration
|
|
48
|
-
pcu init
|
|
49
|
-
|
|
50
|
-
# Or check for updates in existing workspace
|
|
51
|
-
pcu -c
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-

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