inup 1.4.7 ā 1.4.8
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/dist/core/upgrader.js
CHANGED
|
@@ -8,6 +8,7 @@ const chalk_1 = __importDefault(require("chalk"));
|
|
|
8
8
|
const nanospinner_1 = require("nanospinner");
|
|
9
9
|
const fs_1 = require("fs");
|
|
10
10
|
const path_1 = require("path");
|
|
11
|
+
const child_process_1 = require("child_process");
|
|
11
12
|
const utils_1 = require("../utils");
|
|
12
13
|
class PackageUpgrader {
|
|
13
14
|
constructor(packageManager) {
|
|
@@ -54,15 +55,14 @@ class PackageUpgrader {
|
|
|
54
55
|
` ${this.packageManager.installCommand}\n`));
|
|
55
56
|
return; // Skip install, let user do it manually
|
|
56
57
|
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
throw error;
|
|
58
|
+
console.log(chalk_1.default.cyan(`\nš¦ Running ${this.packageManager.installCommand}...\n`));
|
|
59
|
+
const [cmd, ...args] = this.packageManager.installCommand.split(' ');
|
|
60
|
+
const result = (0, child_process_1.spawnSync)(cmd, args, {
|
|
61
|
+
cwd: installDir,
|
|
62
|
+
stdio: 'inherit',
|
|
63
|
+
});
|
|
64
|
+
if (result.status !== 0) {
|
|
65
|
+
throw new Error(`${this.packageManager.installCommand} exited with code ${result.status}`);
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
groupChoicesByFileAndType(choices, packageInfos) {
|
package/dist/interactive-ui.js
CHANGED
|
@@ -237,7 +237,7 @@ class InteractiveUI {
|
|
|
237
237
|
case 'resize':
|
|
238
238
|
const heightChanged = stateManager.updateTerminalHeight(action.height);
|
|
239
239
|
if (heightChanged) {
|
|
240
|
-
stateManager.resetForResize();
|
|
240
|
+
stateManager.resetForResize(filteredStates.length);
|
|
241
241
|
}
|
|
242
242
|
else {
|
|
243
243
|
// Even if height didn't change, width might have changed
|
|
@@ -400,7 +400,8 @@ class InteractiveUI {
|
|
|
400
400
|
// This handles cases where process.stdout.rows might not be accurate at startup
|
|
401
401
|
const currentHeight = this.getTerminalHeight();
|
|
402
402
|
if (stateManager.updateTerminalHeight(currentHeight)) {
|
|
403
|
-
stateManager.
|
|
403
|
+
const initialFiltered = stateManager.getFilteredStates(states);
|
|
404
|
+
stateManager.resetForResize(initialFiltered.length);
|
|
404
405
|
}
|
|
405
406
|
// Initial render
|
|
406
407
|
renderInterface();
|
|
@@ -129,9 +129,9 @@ class NavigationManager {
|
|
|
129
129
|
if (targetVisualIndex < this.state.scrollOffset) {
|
|
130
130
|
this.state.scrollOffset = targetVisualIndex;
|
|
131
131
|
}
|
|
132
|
-
// Scrolling down: scroll
|
|
132
|
+
// Scrolling down: adjust scroll to keep item visible
|
|
133
133
|
else if (visualIndex >= this.state.scrollOffset + this.maxVisibleItems) {
|
|
134
|
-
this.state.scrollOffset
|
|
134
|
+
this.state.scrollOffset = visualIndex - this.maxVisibleItems + 1;
|
|
135
135
|
}
|
|
136
136
|
// Ensure scrollOffset doesn't go negative or beyond bounds
|
|
137
137
|
const maxScroll = Math.max(0, totalVisualItems - this.maxVisibleItems);
|
|
@@ -167,8 +167,10 @@ class StateManager {
|
|
|
167
167
|
}
|
|
168
168
|
exitFilterMode(clearQuery = false) {
|
|
169
169
|
this.filterManager.exitFilterMode(clearQuery);
|
|
170
|
-
|
|
171
|
-
|
|
170
|
+
if (clearQuery) {
|
|
171
|
+
this.navigationManager.setCurrentRow(0);
|
|
172
|
+
this.navigationManager.setScrollOffset(0);
|
|
173
|
+
}
|
|
172
174
|
// Use incremental render for search mode toggle (no blink)
|
|
173
175
|
}
|
|
174
176
|
updateFilterQuery(query) {
|
|
@@ -218,8 +220,8 @@ class StateManager {
|
|
|
218
220
|
setInitialRender(isInitial) {
|
|
219
221
|
this.renderState.forceFullRender = isInitial;
|
|
220
222
|
}
|
|
221
|
-
resetForResize() {
|
|
222
|
-
const totalItems = this.renderState.renderableItems.length || this.displayState.maxVisibleItems;
|
|
223
|
+
resetForResize(totalFilteredItems) {
|
|
224
|
+
const totalItems = totalFilteredItems || this.renderState.renderableItems.length || this.displayState.maxVisibleItems;
|
|
223
225
|
this.navigationManager.resetForResize(totalItems);
|
|
224
226
|
this.renderState.forceFullRender = true;
|
|
225
227
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "inup",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.8",
|
|
4
4
|
"description": "Interactive CLI tool for upgrading dependencies with ease. Auto-detects and works with npm, yarn, pnpm, and bun. Inspired by yarn upgrade-interactive. Supports monorepos, workspaces, and batch upgrades.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|