Skip to content

Commit ff53769

Browse files
release: cli v4.0.0
1 parent 4bf2560 commit ff53769

63 files changed

Lines changed: 5495 additions & 231 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.changeset/v4-breaking-changes.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
'patch-pulse': major
3+
---
4+
5+
## Breaking Changes
6+
7+
### Non-interactive by default
8+
9+
The CLI now exits immediately after the summary. The interactive update prompt no longer appears unless explicitly requested.
10+
11+
- Use `--interactive` (or `-i`) to enter interactive mode
12+
- `--no-interactive` suppresses the prompt explicitly (now the default behavior)
13+
- `"interactive": true` in `patchpulse.config.json` to opt in project-wide
14+
15+
### Flag renames
16+
17+
| Old flag | New flag |
18+
| -------------------- | ---------------------- |
19+
| `--update-prompt` | `--interactive` / `-i` |
20+
| `--no-update-prompt` | `--no-interactive` |
21+
| `--verbose-projects` | `--expand` |
22+
| `--only-outdated` | `--hide-clean` |
23+
24+
`--info` and its `-i` alias have been removed. Use `--help` / `-h` instead. `-i` is now the short form of `--interactive`.
25+
26+
### Config file key rename
27+
28+
`"noUpdatePrompt"` has been renamed to `"interactive"` in `patchpulse.config.json`. The value is also inverted — set `"interactive": true` to opt in to the update prompt.
29+
30+
## New
31+
32+
- `--fail` — exits with code `1` if any outdated packages are found, making it easy to use patch-pulse as a CI gate (pairs well with `--json`)
33+
- `llms.txt` — added LLM-consumable documentation to the CLI package (included in the published files) and a brief overview at the repo root
34+
35+
## Improvements
36+
37+
- Added a blank line between the package manager download output and the start of the report
38+
- `Location:` now shows the full `package.json` path (e.g. `apps/backend/package.json`) for IDE ctrl-click navigation. Single-project runs now also show the project name and location header
39+
- Projects with outdated dependencies now also show a `✓ Up to date: N` count alongside the attention summary
40+
- Interactive prompt menu simplified — removed the `h` (help) and `v` (version) options that interrupted the update flow
41+
42+
## Fixes
43+
44+
- Progress spinners now stop cleanly before dependency results and the final summary print, preventing stray terminal repainting after the CLI has finished
45+
- Pressing `Ctrl+C` in interactive mode now exits with code `130` instead of falling through to a normal success exit
46+
- Unsupported `packageManager` values in config files are now ignored during validation instead of causing failures later in the interactive update flow

.github/workflows/ci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,8 @@ jobs:
4949

5050
- name: Build (VS Code extension)
5151
run: pnpm build:vscode-extension
52+
53+
- name: Build (docs)
54+
run: pnpm build:docs
55+
env:
56+
DOCS_BASE_PATH: /patch-pulse

.github/workflows/deploy-docs.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Deploy Docs
2+
3+
on:
4+
push:
5+
branches: [main]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: github-pages
15+
cancel-in-progress: true
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
21+
steps:
22+
- name: Checkout repository
23+
uses: actions/checkout@v6
24+
25+
- name: Install, build, and upload docs
26+
uses: withastro/action@v6
27+
with:
28+
path: .
29+
node-version: 22
30+
package-manager: pnpm@10.30.3
31+
build-cmd: pnpm build:docs
32+
out-dir: packages/docs/dist
33+
env:
34+
DOCS_BASE_PATH: /patch-pulse
35+
36+
deploy:
37+
needs: build
38+
runs-on: ubuntu-latest
39+
40+
environment:
41+
name: github-pages
42+
url: ${{ steps.deployment.outputs.page_url }}
43+
44+
steps:
45+
- name: Deploy to GitHub Pages
46+
id: deployment
47+
uses: actions/deploy-pages@v5

.vscode/settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
},
4141
"cSpell.words": [
4242
"esbuild",
43+
"llms",
4344
"npmhelp",
4445
"npmlist",
4546
"npmtrack",

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ PatchPulse helps you stay on top of npm dependency updates across your projects.
77
| Tool | Status | Description |
88
| ------------------------------------------------ | ------------------------------- | -------------------------------------------------------- |
99
| [Slack bot](#slack-bot) | Live | Get notified in Slack when your packages release updates |
10-
| [CLI](./packages/cli) | v2.x on npm · v3 in development | Check for outdated dependencies from the terminal |
10+
| [CLI](./packages/cli) | v3.x on npm · v4 in development | Check for outdated dependencies from the terminal |
1111
| [VS Code extension](./packages/vscode-extension) | Early development | In-editor dependency info (not yet released) |
1212

1313
---
@@ -60,6 +60,7 @@ PatchPulse is a `pnpm` monorepo.
6060
### Packages
6161

6262
- `packages/cli` — npm CLI for checking outdated dependencies
63+
- `packages/docs` — Astro/Starlight docs site
6364
- `packages/notifier-bot` — Convex-powered Slack notification backend
6465
- `packages/shared` — shared runtime helpers and types
6566
- `packages/vscode-extension` — VS Code extension for in-editor dependency info
@@ -88,6 +89,7 @@ pnpm install # install all dependencies
8889
pnpm ci:check # lint, format, knip, typecheck, test, build — mirrors CI
8990
9091
pnpm dev:notifier # run Slack bot locally (requires Convex setup)
92+
pnpm dev:docs # run docs locally
9193
pnpm dev:cli # run CLI in dev mode
9294
pnpm pp # dogfood the local CLI from the repo root
9395
pnpm -s pp -- --json # same, but without pnpm's script banner for pipe-safe JSON

knip.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"$schema": "https://unpkg.com/knip@6/schema.json",
3+
"ignoreFiles": ["packages/docs/.astro/**"],
34
"workspaces": {
45
"packages/shared": {
56
"project": ["src/**/*.ts"]

llms.txt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Patch Pulse
2+
3+
Patch Pulse checks for outdated npm dependencies across single projects and monorepos. It hits the npm registry, categorises updates by severity (patch / minor / major), and optionally applies updates in-place.
4+
5+
## Packages in this repo
6+
7+
- `patch-pulse` (`packages/cli`) — the CLI tool, published to npm. This is the main product.
8+
- `@patch-pulse/shared` (`packages/shared`) — shared logic (npm registry fetching, version comparison). Internal.
9+
- `@patch-pulse/notifier-bot` (`packages/notifier-bot`) — Slack bot that notifies workspaces of new releases. Internal.
10+
- `patch-pulse-vscode-extension` (`packages/vscode-extension`) — VS Code extension. In progress.
11+
12+
## Detailed reference
13+
14+
See `packages/cli/llms.txt` for the full CLI flag reference, config schema, output format, and common recipes.

package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,17 @@
2424
"scripts": {
2525
"build:cli": "pnpm --filter patch-pulse build",
2626
"build:vscode-extension": "pnpm --filter patch-pulse-vscode-extension compile",
27+
"build:docs": "pnpm --filter @patch-pulse/docs build",
2728
"build": "pnpm run build:cli && pnpm run build:vscode-extension",
29+
"dev:docs": "pnpm --filter @patch-pulse/docs dev",
2830
"deploy:notifier": "pnpm --filter @patch-pulse/notifier-bot deploy",
2931
"dev:notifier": "pnpm --filter @patch-pulse/notifier-bot dev",
3032
"dev:cli": "pnpm --filter patch-pulse dev",
3133
"pp": "node --import tsx packages/cli/src/index.ts",
3234
"dev:vscode-extension": "pnpm --filter patch-pulse-vscode-extension watch",
33-
"format": "pnpm exec oxfmt --write .",
34-
"format:check": "pnpm exec oxfmt --check .",
35-
"ci:check": "pnpm lint && pnpm format:check && pnpm knip && pnpm typecheck && pnpm test:shared && pnpm test:cli && pnpm test:notifier && pnpm build:cli && pnpm build:vscode-extension",
35+
"format": "pnpm exec oxfmt --write . '!packages/docs/.astro/**'",
36+
"format:check": "pnpm exec oxfmt --check . '!packages/docs/.astro/**'",
37+
"ci:check": "pnpm lint && pnpm format:check && pnpm knip && pnpm typecheck && pnpm test:shared && pnpm test:cli && pnpm test:notifier && pnpm build:cli && pnpm build:vscode-extension && pnpm build:docs",
3638
"knip": "pnpm exec knip",
3739
"lint": "pnpm exec oxlint .",
3840
"lint:fix": "pnpm exec oxlint --fix .",

packages/cli/README.md

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,9 @@ That's it! Patch Pulse scans the current project for `package.json` files and sh
2828

2929
## Configuration
3030

31-
Patch Pulse supports configuration files for persistent settings. Create one of these files in your project root:
31+
Patch Pulse supports configuration files for persistent settings. Prefer `patchpulse.json` in your project root. These filenames are supported:
3232

33+
- `patchpulse.json`
3334
- `patchpulse.config.json`
3435
- `.patchpulserc.json`
3536
- `.patchpulserc`
@@ -41,7 +42,7 @@ Patch Pulse supports configuration files for persistent settings. Create one of
4142
"skip": ["lodash", "@types/*", "test-*"],
4243
"ignorePaths": ["packages/cli/e2e"],
4344
"packageManager": "npm",
44-
"noUpdatePrompt": false
45+
"interactive": true
4546
}
4647
```
4748

@@ -68,29 +69,29 @@ The `packageManager` option allows you to override the package manager detection
6869
- `yarn`
6970
- `bun`
7071

71-
### No Update Prompt
72+
### Interactive Mode
7273

73-
The `noUpdatePrompt` option allows you to skip the update prompt.
74+
The `interactive` option opts in to the interactive update prompt after the summary.
7475

7576
### CLI vs File Configuration
7677

7778
CLI arguments override file configuration:
7879

7980
```bash
80-
# This will override any settings in patchpulse.config.json
81-
npx patch-pulse --skip "react,react-dom" --package-manager pnpm --no-update-prompt
81+
# This will override any settings in patchpulse.json
82+
npx patch-pulse --skip "react,react-dom" --package-manager pnpm --no-interactive
8283
```
8384

84-
For monorepos, use `--verbose-projects` to print full dependency sections for clean workspaces too.
85+
For monorepos, use `--expand` to print full dependency sections for clean workspaces too.
8586

8687
```bash
87-
npx patch-pulse --verbose-projects
88+
npx patch-pulse --expand
8889
```
8990

90-
Use `--only-outdated` to hide clean workspaces entirely.
91+
Use `--hide-clean` to hide clean workspaces entirely.
9192

9293
```bash
93-
npx patch-pulse --only-outdated
94+
npx patch-pulse --hide-clean
9495
```
9596

9697
Focus one project by workspace path or package name:
@@ -105,7 +106,15 @@ Use `--json` for scripts, CI, or editor integrations:
105106
npx patch-pulse --json
106107
```
107108

108-
When dogfooding the local workspace CLI through the root script, use `pnpm -s`
109+
Use `--fail` to exit with code `1` if any outdated packages are found — useful as a CI gate:
110+
111+
```bash
112+
npx patch-pulse --fail
113+
# or combine with --json for machine-readable output + non-zero exit
114+
npx patch-pulse --json --fail
115+
```
116+
117+
When running the local workspace CLI through the root script, use `pnpm -s`
109118
to suppress pnpm's script banner before JSON output:
110119

111120
```bash

packages/cli/e2e/basic/__snapshots__/basic.test.ts.snap

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
22

33
exports[`basic project > prints a full dependency summary 1`] = `
4-
"Dependencies:
4+
"fixture-basic
5+
Location: package.json
6+
────────────────────────────────────────────────────────────
7+
Dependencies:
58
─────────────
69
MINOR chalk 5.0.0 → 5.6.2
710
UP TO DATE lodash 4.17.21

0 commit comments

Comments
 (0)