ripencli 1.1.1 → 1.2.1
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/README.md +24 -25
- package/dist/cli.js +20 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,22 +1,20 @@
|
|
|
1
1
|
# ripen
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> Security-first interactive dependency updater for npm, pnpm, yarn, and bun
|
|
4
4
|
|
|
5
5
|
  
|
|
6
6
|
|
|
7
|
-
|
|
8
7
|

|
|
9
8
|
|
|
10
|
-
|
|
11
9
|
## Features
|
|
12
10
|
|
|
11
|
+
- **Security first** — ripen never executes commands. Everything goes to your clipboard; you review and run it yourself
|
|
13
12
|
- **Interactive TUI** — navigate packages with arrow keys, select with space
|
|
14
|
-
- **
|
|
15
|
-
- **Publish age** — shows how long ago the latest version was published (yellow if < 1 day, useful for pnpm's `minimumReleaseAge`)
|
|
13
|
+
- **Publish age** — shows how long ago the latest version was published (yellow if < 1 day, useful for spotting freshly published packages before trusting them)
|
|
16
14
|
- **Version picker** — choose any specific version from the npm registry, not just latest
|
|
17
15
|
- **Changelog viewer** — see GitHub release notes before you update
|
|
18
16
|
- **npm, pnpm, yarn & bun** — auto-detects your package manager
|
|
19
|
-
- **Global packages** — check global installs across all
|
|
17
|
+
- **Global packages** — check global installs across all\* package managers
|
|
20
18
|
- **Show all packages** — `ripen --all` lists every dependency, not just outdated ones (great for checking changelogs or downgrading)
|
|
21
19
|
- **Self-update** — notifies you when a new version of ripen is available
|
|
22
20
|
- **Major bump warnings** — highlights potentially breaking updates
|
|
@@ -56,18 +54,18 @@ ripen --help
|
|
|
56
54
|
|
|
57
55
|
## Controls
|
|
58
56
|
|
|
59
|
-
| Key
|
|
60
|
-
|
|
|
61
|
-
| `↑ ↓`
|
|
62
|
-
| `PgUp PgDn`
|
|
63
|
-
| `Tab`
|
|
64
|
-
| `← →`
|
|
65
|
-
| `space`
|
|
66
|
-
| `v`
|
|
67
|
-
| `c`
|
|
68
|
-
| `enter`
|
|
69
|
-
| `s`
|
|
70
|
-
| `esc`
|
|
57
|
+
| Key | Action |
|
|
58
|
+
| ----------- | ------------------------------ |
|
|
59
|
+
| `↑ ↓` | Navigate packages |
|
|
60
|
+
| `PgUp PgDn` | Scroll a full page |
|
|
61
|
+
| `Tab` | Jump between groups |
|
|
62
|
+
| `← →` | Collapse / expand scope groups |
|
|
63
|
+
| `space` | Toggle select |
|
|
64
|
+
| `v` | Pick specific version |
|
|
65
|
+
| `c` | View changelog / release notes |
|
|
66
|
+
| `enter` | Copy update command & exit |
|
|
67
|
+
| `s` | Open settings |
|
|
68
|
+
| `esc` | Cancel / go back |
|
|
71
69
|
|
|
72
70
|
## How it works
|
|
73
71
|
|
|
@@ -82,13 +80,14 @@ ripen --help
|
|
|
82
80
|
|
|
83
81
|
Press `s` to open the settings screen. Settings are persisted at `~/.config/ripen/config.json`.
|
|
84
82
|
|
|
85
|
-
| Setting
|
|
86
|
-
|
|
|
87
|
-
| Sort by update frequency
|
|
88
|
-
| Separate dev dependencies
|
|
89
|
-
| Enable scope grouping
|
|
90
|
-
| Show grouped scopes on top
|
|
91
|
-
| Grouped scopes
|
|
83
|
+
| Setting | Default | Description |
|
|
84
|
+
| -------------------------- | ------- | ---------------------------------------------------------------------------------------------------- |
|
|
85
|
+
| Sort by update frequency | Off | Packages you update often appear at the top |
|
|
86
|
+
| Separate dev dependencies | On | Show dependencies and devDependencies in separate groups |
|
|
87
|
+
| Enable scope grouping | Off | Group scoped packages under their scope prefix |
|
|
88
|
+
| Show grouped scopes on top | Off | Grouped scopes appear before ungrouped packages |
|
|
89
|
+
| Grouped scopes | — | List of scopes to group (e.g. `@heroui`, `@radix-ui`) |
|
|
90
|
+
| SFW Firewall | Off | Prepend `sfw` before every generated command (requires [sfw](https://github.com/nicolo-ribaudo/sfw)) |
|
|
92
91
|
|
|
93
92
|
When using `ripen -g`, all available package managers (npm, pnpm, yarn) are checked in parallel so you see every global package in one place. Bun is not included in global checking because it doesn't provide a JSON output for its outdated command.
|
|
94
93
|
|
package/dist/cli.js
CHANGED
|
@@ -573,7 +573,7 @@ function parseYarnOutdated(raw, global) {
|
|
|
573
573
|
}
|
|
574
574
|
//#endregion
|
|
575
575
|
//#region src/executor.ts
|
|
576
|
-
function buildUpdateCommands(manager, packages, global = false) {
|
|
576
|
+
function buildUpdateCommands(manager, packages, global = false, sfwFirewall = false) {
|
|
577
577
|
const commands = [];
|
|
578
578
|
const deps = packages.filter((p) => !global && p.type === "dependencies");
|
|
579
579
|
const devDeps = packages.filter((p) => !global && p.type === "devDependencies");
|
|
@@ -583,7 +583,7 @@ function buildUpdateCommands(manager, packages, global = false) {
|
|
|
583
583
|
const version = pkg.targetVersion ?? pkg.latest;
|
|
584
584
|
return `${pkg.name}@${version}`;
|
|
585
585
|
});
|
|
586
|
-
|
|
586
|
+
const cmd = `${mgr} ${(mgr === "yarn" && global ? [
|
|
587
587
|
"global",
|
|
588
588
|
"add",
|
|
589
589
|
...pkgArgs
|
|
@@ -592,6 +592,7 @@ function buildUpdateCommands(manager, packages, global = false) {
|
|
|
592
592
|
...flags,
|
|
593
593
|
...pkgArgs
|
|
594
594
|
]).join(" ")}`;
|
|
595
|
+
return sfwFirewall ? `sfw ${cmd}` : cmd;
|
|
595
596
|
};
|
|
596
597
|
if (deps.length > 0) commands.push(makeCmd(manager, deps, []));
|
|
597
598
|
if (devDeps.length > 0) commands.push(makeCmd(manager, devDeps, [manager === "bun" ? "-d" : "-D"]));
|
|
@@ -616,7 +617,8 @@ const DEFAULT_CONFIG = {
|
|
|
616
617
|
groupScopes: [],
|
|
617
618
|
groupsOnTop: false,
|
|
618
619
|
frequencySort: false,
|
|
619
|
-
separateDevDeps: true
|
|
620
|
+
separateDevDeps: true,
|
|
621
|
+
sfwFirewall: false
|
|
620
622
|
};
|
|
621
623
|
const CONFIG_DIR = join(homedir(), ".config", "ripen");
|
|
622
624
|
const CONFIG_PATH = join(CONFIG_DIR, "config.json");
|
|
@@ -1977,6 +1979,7 @@ function Settings({ config, onConfigChange, onClose }) {
|
|
|
1977
1979
|
{ type: "toggle-separate-dev" },
|
|
1978
1980
|
{ type: "toggle-group" },
|
|
1979
1981
|
{ type: "toggle-groups-top" },
|
|
1982
|
+
{ type: "toggle-sfw" },
|
|
1980
1983
|
{ type: "list-header" },
|
|
1981
1984
|
...scopes.map((_, i) => ({
|
|
1982
1985
|
type: "list-item",
|
|
@@ -2039,6 +2042,10 @@ function Settings({ config, onConfigChange, onClose }) {
|
|
|
2039
2042
|
...config,
|
|
2040
2043
|
groupsOnTop: !config.groupsOnTop
|
|
2041
2044
|
});
|
|
2045
|
+
else if (currentRow?.type === "toggle-sfw") onConfigChange({
|
|
2046
|
+
...config,
|
|
2047
|
+
sfwFirewall: !config.sfwFirewall
|
|
2048
|
+
});
|
|
2042
2049
|
else if (currentRow?.type === "list-header") {
|
|
2043
2050
|
setInputMode(true);
|
|
2044
2051
|
setInputValue("");
|
|
@@ -2100,6 +2107,12 @@ function Settings({ config, onConfigChange, onClose }) {
|
|
|
2100
2107
|
focused: currentRow?.type === "toggle-groups-top",
|
|
2101
2108
|
disabled: !config.groupByScope
|
|
2102
2109
|
}),
|
|
2110
|
+
/* @__PURE__ */ jsx(SettingsToggle, {
|
|
2111
|
+
label: "SFW firewall",
|
|
2112
|
+
description: "Prepend \"sfw\" before every generated install command",
|
|
2113
|
+
checked: config.sfwFirewall,
|
|
2114
|
+
focused: currentRow?.type === "toggle-sfw"
|
|
2115
|
+
}),
|
|
2103
2116
|
/* @__PURE__ */ jsxs(Box, {
|
|
2104
2117
|
flexDirection: "column",
|
|
2105
2118
|
marginBottom: 1,
|
|
@@ -2129,7 +2142,7 @@ function Settings({ config, onConfigChange, onClose }) {
|
|
|
2129
2142
|
})]
|
|
2130
2143
|
}),
|
|
2131
2144
|
scopes.map((scope, i) => {
|
|
2132
|
-
const itemFocused = flatCursor ===
|
|
2145
|
+
const itemFocused = flatCursor === 6 + i;
|
|
2133
2146
|
return /* @__PURE__ */ jsxs(Box, {
|
|
2134
2147
|
marginLeft: 4,
|
|
2135
2148
|
gap: 1,
|
|
@@ -2448,7 +2461,8 @@ function App({ project, global, showAll, version, installManager, onCancelled, o
|
|
|
2448
2461
|
setScreen(selfUpdate.hasUpdate ? "self-update" : "loading");
|
|
2449
2462
|
}, [selfUpdate.checkComplete]);
|
|
2450
2463
|
const handleSelfUpdate = () => {
|
|
2451
|
-
const
|
|
2464
|
+
const raw = selfUpdate.buildUpdateCommand();
|
|
2465
|
+
const cmd = config.sfwFirewall ? `sfw ${raw}` : raw;
|
|
2452
2466
|
copyToClipboard(cmd);
|
|
2453
2467
|
onCopied?.([cmd]);
|
|
2454
2468
|
exit();
|
|
@@ -2480,7 +2494,7 @@ function App({ project, global, showAll, version, installManager, onCancelled, o
|
|
|
2480
2494
|
const handleConfirm = () => {
|
|
2481
2495
|
const selected = packages.filter((p) => p.selected);
|
|
2482
2496
|
if (selected.length === 0) return;
|
|
2483
|
-
const commands = buildUpdateCommands(project.manager, selected, global);
|
|
2497
|
+
const commands = buildUpdateCommands(project.manager, selected, global, config.sfwFirewall);
|
|
2484
2498
|
copyToClipboard(commands.join(" && "));
|
|
2485
2499
|
incrementFrequency(selected.map((p) => p.name));
|
|
2486
2500
|
setFrequency(loadFrequency());
|