From ef0d66a256db5f01e5cf33348c4d47dbaed7ce58 Mon Sep 17 00:00:00 2001 From: Kim T Date: Mon, 24 Nov 2025 21:44:46 -0800 Subject: [PATCH 1/2] Add spinner and one-line console output, supress experimental warnings --- package-lock.json | 224 +++++++++++++++++- package.json | 6 +- src/commands/install.ts | 16 +- src/commands/scan.ts | 2 +- src/commands/sync.ts | 15 +- src/commands/uninstall.ts | 16 +- src/index.ts | 2 +- .../__snapshots__/install.test.ts.snap | 18 +- .../commands/__snapshots__/scan.test.ts.snap | 2 +- .../commands/__snapshots__/sync.test.ts.snap | 2 +- .../__snapshots__/uninstall.test.ts.snap | 18 +- tests/shared.ts | 4 +- 12 files changed, 270 insertions(+), 55 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2084870..aca191a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,9 +9,10 @@ "version": "2.0.2", "license": "MIT", "dependencies": { - "@open-audio-stack/core": "^0.1.37", + "@open-audio-stack/core": "^0.1.38", "cli-table3": "^0.6.5", - "commander": "^12.1.0" + "commander": "^12.1.0", + "ora": "^9.0.0" }, "bin": { "studiorack": "build/index.js" @@ -19,6 +20,7 @@ "devDependencies": { "@eslint/js": "^9.12.0", "@types/node": "^22.7.8", + "@types/ora": "^3.1.0", "@vitest/coverage-v8": "^3.0.7", "eslint": "^9.12.0", "execa": "^9.5.2", @@ -1289,9 +1291,9 @@ } }, "node_modules/@open-audio-stack/core": { - "version": "0.1.37", - "resolved": "https://registry.npmjs.org/@open-audio-stack/core/-/core-0.1.37.tgz", - "integrity": "sha512-GtXg0E6Y0aAjkGQ9vPXUAexsWVNNHGSx0LjcjfIH5N1msiUqTjmTEXKo7bWdKfjsfiQnXRrF4zMFdPoB9hmC+Q==", + "version": "0.1.38", + "resolved": "https://registry.npmjs.org/@open-audio-stack/core/-/core-0.1.38.tgz", + "integrity": "sha512-J9bKeOpr3clRlNFvE/qfVGM2T5s2WPLiyHCLixr52JKVCy5FPonvw5y5XVd/Ot/C94qdw7AE8E+mAlqXhmc+lA==", "license": "cc0-1.0", "dependencies": { "@vscode/sudo-prompt": "^9.3.1", @@ -1772,6 +1774,16 @@ "undici-types": "~6.20.0" } }, + "node_modules/@types/ora": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@types/ora/-/ora-3.1.0.tgz", + "integrity": "sha512-4e15N42qhHRlxyP5SpX9fK3q4tXvEkdmGdof2DZ0mqPu7glrNT8cs9bbI73NhwEGApq1TSXhs2aFmn19VCTwCQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@typescript-eslint/eslint-plugin": { "version": "8.47.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.47.0.tgz", @@ -2414,6 +2426,33 @@ "node": ">=18" } }, + "node_modules/cli-cursor": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-5.0.0.tgz", + "integrity": "sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw==", + "license": "MIT", + "dependencies": { + "restore-cursor": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-spinners": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-3.3.0.tgz", + "integrity": "sha512-/+40ljC3ONVnYIttjMWrlL51nItDAbBrq2upN8BPyvGU/2n5Oxw3tbNwORCaNuNqLJnxGqOfjUuhsv7l5Q4IsQ==", + "license": "MIT", + "engines": { + "node": ">=18.20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/cli-table3": { "version": "0.6.5", "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.5.tgz", @@ -3007,6 +3046,18 @@ "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, + "node_modules/get-east-asian-width": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.4.0.tgz", + "integrity": "sha512-QZjmEOC+IT1uk6Rx0sX22V6uHWVwbdbxf1faPqJ1QhLdGgsRGCZoyaQBm/piRdJy/D2um6hM1UP7ZEeQ4EkP+Q==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/get-stream": { "version": "9.0.1", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-9.0.1.tgz", @@ -3258,6 +3309,18 @@ "node": ">=0.10.0" } }, + "node_modules/is-interactive": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-2.0.0.tgz", + "integrity": "sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", @@ -3298,7 +3361,6 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-2.1.0.tgz", "integrity": "sha512-mE00Gnza5EEB3Ds0HfMyllZzbBrmLOX3vfWoj9A9PEnTfratQ/BcaJOuMhnkhjXvb2+FkY3VuHqtAGpTPmglFQ==", - "dev": true, "license": "MIT", "engines": { "node": ">=18" @@ -3477,6 +3539,22 @@ "dev": true, "license": "MIT" }, + "node_modules/log-symbols": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-7.0.1.tgz", + "integrity": "sha512-ja1E3yCr9i/0hmBVaM0bfwDjnGy8I/s6PP4DFp+yP+a+mrHO4Rm7DtmnqROTUkHIkqffC84YY7AeqX6oFk0WFg==", + "license": "MIT", + "dependencies": { + "is-unicode-supported": "^2.0.0", + "yoctocolors": "^2.1.1" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/loupe": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.1.3.tgz", @@ -3555,6 +3633,18 @@ "node": ">=8.6" } }, + "node_modules/mimic-function": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/mimic-function/-/mimic-function-5.0.1.tgz", + "integrity": "sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -3677,6 +3767,21 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/onetime": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-7.0.0.tgz", + "integrity": "sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==", + "license": "MIT", + "dependencies": { + "mimic-function": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/optionator": { "version": "0.9.4", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", @@ -3695,6 +3800,84 @@ "node": ">= 0.8.0" } }, + "node_modules/ora": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/ora/-/ora-9.0.0.tgz", + "integrity": "sha512-m0pg2zscbYgWbqRR6ABga5c3sZdEon7bSgjnlXC64kxtxLOyjRcbbUkLj7HFyy/FTD+P2xdBWu8snGhYI0jc4A==", + "license": "MIT", + "dependencies": { + "chalk": "^5.6.2", + "cli-cursor": "^5.0.0", + "cli-spinners": "^3.2.0", + "is-interactive": "^2.0.0", + "is-unicode-supported": "^2.1.0", + "log-symbols": "^7.0.1", + "stdin-discarder": "^0.2.2", + "string-width": "^8.1.0", + "strip-ansi": "^7.1.2" + }, + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora/node_modules/ansi-regex": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/ora/node_modules/chalk": { + "version": "5.6.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.6.2.tgz", + "integrity": "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==", + "license": "MIT", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/ora/node_modules/string-width": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-8.1.0.tgz", + "integrity": "sha512-Kxl3KJGb/gxkaUMOjRsQ8IrXiGW75O4E3RPjFIINOVH8AMl2SQ/yWdTzWwF3FevIX9LcMAjJW+GRwAlAbTSXdg==", + "license": "MIT", + "dependencies": { + "get-east-asian-width": "^1.3.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora/node_modules/strip-ansi": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", + "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, "node_modules/p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", @@ -3953,6 +4136,22 @@ "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" } }, + "node_modules/restore-cursor": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-5.1.0.tgz", + "integrity": "sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA==", + "license": "MIT", + "dependencies": { + "onetime": "^7.0.0", + "signal-exit": "^4.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/reusify": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", @@ -4157,6 +4356,18 @@ "dev": true, "license": "MIT" }, + "node_modules/stdin-discarder": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/stdin-discarder/-/stdin-discarder-0.2.2.tgz", + "integrity": "sha512-UhDfHmA92YAlNnCfhmq0VeNL5bDbiZGg7sZ2IvPsXubGkiNa9EC+tUTsjBRsYUAz87btI6/1wf4XoVvQ3uRnmQ==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", @@ -4918,7 +5129,6 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/yoctocolors/-/yoctocolors-2.1.1.tgz", "integrity": "sha512-GQHQqAopRhwU8Kt1DDM8NjibDXHC8eoh1erhGAJPEyveY9qqVeXvVikNKrDz69sHowPMorbPUrH/mx8c50eiBQ==", - "dev": true, "license": "MIT", "engines": { "node": ">=18" diff --git a/package.json b/package.json index d9feb10..f793032 100644 --- a/package.json +++ b/package.json @@ -39,13 +39,15 @@ "node": ">=18" }, "dependencies": { - "@open-audio-stack/core": "^0.1.37", + "@open-audio-stack/core": "^0.1.38", "cli-table3": "^0.6.5", - "commander": "^12.1.0" + "commander": "^12.1.0", + "ora": "^9.0.0" }, "devDependencies": { "@eslint/js": "^9.12.0", "@types/node": "^22.7.8", + "@types/ora": "^3.1.0", "@vitest/coverage-v8": "^3.0.7", "eslint": "^9.12.0", "execa": "^9.5.2", diff --git a/src/commands/install.ts b/src/commands/install.ts index d825185..aa1a7be 100644 --- a/src/commands/install.ts +++ b/src/commands/install.ts @@ -1,7 +1,7 @@ import { Command } from 'commander'; +import ora from 'ora'; import { CliOptions } from '../types/options.js'; -import { inputGetParts, ManagerLocal } from '@open-audio-stack/core'; -import { formatOutput } from '../utils.js'; +import { inputGetParts, ManagerLocal, isTests } from '@open-audio-stack/core'; export function install(command: Command, manager: ManagerLocal) { command @@ -12,7 +12,15 @@ export function install(command: Command, manager: ManagerLocal) { if (options.log) manager.logEnable(); else manager.logDisable(); const [slug, version] = inputGetParts(input); - await manager.install(slug, version); - console.log(formatOutput(manager.getPackage(slug), [version])); + const spinner = ora(`Installing ${slug}${version ? `@${version}` : ''}...`).start(); + try { + await manager.install(slug, version); + spinner.succeed(`Installed ${slug}${version ? `@${version}` : ''}`); + if (isTests()) console.log(`Installed ${slug}${version ? `@${version}` : ''}`); + } catch (error) { + spinner.fail(`Failed to install ${slug}${version ? `@${version}` : ''}`); + if (isTests()) console.log(`Failed to install ${slug}${version ? `@${version}` : ''}`); + throw error; + } }); } diff --git a/src/commands/scan.ts b/src/commands/scan.ts index b2424fd..614f6c4 100644 --- a/src/commands/scan.ts +++ b/src/commands/scan.ts @@ -11,6 +11,6 @@ export function scan(command: Command, manager: ManagerLocal) { if (options.log) manager.logEnable(); else manager.logDisable(); manager.scan(); - console.log(`${manager.type} scan has been completed`); + console.log(`${manager.type} scan completed`); }); } diff --git a/src/commands/sync.ts b/src/commands/sync.ts index 5b08ad2..03f5e5c 100644 --- a/src/commands/sync.ts +++ b/src/commands/sync.ts @@ -1,6 +1,7 @@ import { Command } from 'commander'; +import ora from 'ora'; import { CliOptions } from '../types/options.js'; -import { ManagerLocal } from '@open-audio-stack/core'; +import { ManagerLocal, isTests } from '@open-audio-stack/core'; export function sync(command: Command, manager: ManagerLocal) { command @@ -10,7 +11,15 @@ export function sync(command: Command, manager: ManagerLocal) { .action(async (options: CliOptions) => { if (options.log) manager.logEnable(); else manager.logDisable(); - await manager.sync(); - console.log(`${manager.type} sync has been completed`); + const spinner = ora(`Syncing ${manager.type}...`).start(); + try { + await manager.sync(); + spinner.succeed(`${manager.type} sync completed`); + if (isTests()) console.log(`${manager.type} sync completed`); + } catch (error) { + spinner.fail(`${manager.type} sync failed`); + if (isTests()) console.log(`${manager.type} sync failed`); + throw error; + } }); } diff --git a/src/commands/uninstall.ts b/src/commands/uninstall.ts index 5789340..80d93c5 100644 --- a/src/commands/uninstall.ts +++ b/src/commands/uninstall.ts @@ -1,7 +1,7 @@ import { Command } from 'commander'; +import ora from 'ora'; import { CliOptions } from '../types/options.js'; -import { inputGetParts, ManagerLocal } from '@open-audio-stack/core'; -import { formatOutput } from '../utils.js'; +import { inputGetParts, ManagerLocal, isTests } from '@open-audio-stack/core'; export function uninstall(command: Command, manager: ManagerLocal) { command @@ -12,7 +12,15 @@ export function uninstall(command: Command, manager: ManagerLocal) { if (options.log) manager.logEnable(); else manager.logDisable(); const [slug, version] = inputGetParts(input); - await manager.uninstall(slug, version); - console.log(formatOutput(manager.getPackage(slug), [version])); + const spinner = ora(`Uninstalling ${slug}${version ? `@${version}` : ''}...`).start(); + try { + await manager.uninstall(slug, version); + spinner.succeed(`Uninstalled ${slug}${version ? `@${version}` : ''}`); + if (isTests()) console.log(`Uninstalled ${slug}${version ? `@${version}` : ''}`); + } catch (error) { + spinner.fail(`Failed to uninstall ${slug}${version ? `@${version}` : ''}`); + if (isTests()) console.log(`Failed to uninstall ${slug}${version ? `@${version}` : ''}`); + throw error; + } }); } diff --git a/src/index.ts b/src/index.ts index a3326c6..0476259 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,4 +1,4 @@ -#!/usr/bin/env node +#!/usr/bin/env node --no-warnings=ExperimentalWarning import { isTests, ManagerLocal, RegistryType } from '@open-audio-stack/core'; import { Command } from 'commander'; diff --git a/tests/commands/__snapshots__/install.test.ts.snap b/tests/commands/__snapshots__/install.test.ts.snap index 0d496db..a671dba 100644 --- a/tests/commands/__snapshots__/install.test.ts.snap +++ b/tests/commands/__snapshots__/install.test.ts.snap @@ -1,19 +1,7 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`Install package 1`] = ` -┌─────────────────────────┬──────────┬─────────┬───────────┬────────────┬─────────┬───────────────────────────────┐ -│ Id │ Name │ Version │ Installed │ Date │ License │ Tags │ -├─────────────────────────┼──────────┼─────────┼───────────┼────────────┼─────────┼───────────────────────────────┤ -│ surge-synthesizer/surge │ Surge XT │ 1.3.4 │ ✓ │ 2024-08-11 │ gpl-3.0 │ Instrument, Synth, Modulation │ -└─────────────────────────┴──────────┴─────────┴───────────┴────────────┴─────────┴───────────────────────────────┘ -`; +exports[`Install package 1`] = `Installed surge-synthesizer/surge`; -exports[`Install package 2`] = ` -┌─────────────────────────┬──────────┬─────────┬───────────┬────────────┬─────────┬───────────────────────────────┐ -│ Id │ Name │ Version │ Installed │ Date │ License │ Tags │ -├─────────────────────────┼──────────┼─────────┼───────────┼────────────┼─────────┼───────────────────────────────┤ -│ surge-synthesizer/surge │ Surge XT │ 1.3.1 │ ✓ │ 2024-03-02 │ gpl-3.0 │ Instrument, Synth, Modulation │ -└─────────────────────────┴──────────┴─────────┴───────────┴────────────┴─────────┴───────────────────────────────┘ -`; +exports[`Install package 2`] = `Installed surge-synthesizer/surge@1.3.1`; -exports[`Install package 3`] = `No results found`; +exports[`Install package 3`] = `Installed surge-synthesizer/surge@0.0.0`; diff --git a/tests/commands/__snapshots__/scan.test.ts.snap b/tests/commands/__snapshots__/scan.test.ts.snap index 15fd3e5..06becf3 100644 --- a/tests/commands/__snapshots__/scan.test.ts.snap +++ b/tests/commands/__snapshots__/scan.test.ts.snap @@ -1,3 +1,3 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`Scan packages 1`] = `plugins scan has been completed`; +exports[`Scan packages 1`] = `plugins scan completed`; diff --git a/tests/commands/__snapshots__/sync.test.ts.snap b/tests/commands/__snapshots__/sync.test.ts.snap index 44a591f..39a8441 100644 --- a/tests/commands/__snapshots__/sync.test.ts.snap +++ b/tests/commands/__snapshots__/sync.test.ts.snap @@ -1,3 +1,3 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`Sync packages 1`] = `plugins sync has been completed`; +exports[`Sync packages 1`] = `plugins sync completed`; diff --git a/tests/commands/__snapshots__/uninstall.test.ts.snap b/tests/commands/__snapshots__/uninstall.test.ts.snap index a32252a..1e6710b 100644 --- a/tests/commands/__snapshots__/uninstall.test.ts.snap +++ b/tests/commands/__snapshots__/uninstall.test.ts.snap @@ -1,19 +1,7 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`Uninstall package 1`] = ` -┌─────────────────────────┬──────────┬─────────┬───────────┬────────────┬─────────┬───────────────────────────────┐ -│ Id │ Name │ Version │ Installed │ Date │ License │ Tags │ -├─────────────────────────┼──────────┼─────────┼───────────┼────────────┼─────────┼───────────────────────────────┤ -│ surge-synthesizer/surge │ Surge XT │ 1.3.4 │ - │ 2024-08-11 │ gpl-3.0 │ Instrument, Synth, Modulation │ -└─────────────────────────┴──────────┴─────────┴───────────┴────────────┴─────────┴───────────────────────────────┘ -`; +exports[`Uninstall package 1`] = `Uninstalled surge-synthesizer/surge`; -exports[`Uninstall package 2`] = ` -┌─────────────────────────┬──────────┬─────────┬───────────┬────────────┬─────────┬───────────────────────────────┐ -│ Id │ Name │ Version │ Installed │ Date │ License │ Tags │ -├─────────────────────────┼──────────┼─────────┼───────────┼────────────┼─────────┼───────────────────────────────┤ -│ surge-synthesizer/surge │ Surge XT │ 1.3.1 │ - │ 2024-03-02 │ gpl-3.0 │ Instrument, Synth, Modulation │ -└─────────────────────────┴──────────┴─────────┴───────────┴────────────┴─────────┴───────────────────────────────┘ -`; +exports[`Uninstall package 2`] = `Uninstalled surge-synthesizer/surge@1.3.1`; -exports[`Uninstall package 3`] = `No results found`; +exports[`Uninstall package 3`] = `Uninstalled surge-synthesizer/surge@0.0.0`; diff --git a/tests/shared.ts b/tests/shared.ts index 7b76c4f..a17fbe5 100644 --- a/tests/shared.ts +++ b/tests/shared.ts @@ -14,7 +14,9 @@ expect.addSnapshotSerializer({ }); export function cli(...args: string[]): string { - const result: SyncResult = execaSync('node', [CLI_PATH, ...args]); + const result: SyncResult = execaSync('node', [CLI_PATH, ...args], { + env: { ...process.env, NODE_OPTIONS: '--no-warnings=ExperimentalWarning' }, + }); return cleanOutput(result.stdout as string); } From fa036f49868f36d7d42f45d5e0dd42b63d2e875c Mon Sep 17 00:00:00 2001 From: Kim T Date: Mon, 24 Nov 2025 22:07:10 -0800 Subject: [PATCH 2/2] 3.0.0 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index aca191a..e5db891 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@studiorack/cli", - "version": "2.0.2", + "version": "3.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@studiorack/cli", - "version": "2.0.2", + "version": "3.0.0", "license": "MIT", "dependencies": { "@open-audio-stack/core": "^0.1.38", diff --git a/package.json b/package.json index f793032..d6dba20 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@studiorack/cli", - "version": "2.0.2", + "version": "3.0.0", "description": "Audio project manager tool", "type": "module", "main": "./build/index.js",