Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
ecd1f3b
fix: deprecated import of ApplicationConfig from '@angular/platform-b…
EtiennePasteur Nov 21, 2025
ae8201c
CLI: Fix passing flags for bun users during init
valentinpalkovic Nov 25, 2025
4bca101
Build: Resolve TelemetryService unit tests flake
yannbf Nov 25, 2025
a9ee9bc
Merge branch 'next' into valentin/fix-flag-passing-for-bun
yannbf Nov 25, 2025
a413b50
Merge pull request #33171 from storybookjs/yann/resolve-unit-tests-flake
valentinpalkovic Nov 25, 2025
b002df4
Merge branch 'next-release' into next
storybook-bot Nov 25, 2025
13d4773
Merge pull request #33166 from storybookjs/valentin/fix-flag-passing-…
valentinpalkovic Nov 25, 2025
a4690d5
Standardize info color to cyan for improved contrast on all platforms
valentinpalkovic Nov 26, 2025
fee87d4
Implement getPackageCommand method in package manager proxies for imp…
valentinpalkovic Nov 26, 2025
5bfc8a7
Refine recommended install type label for clarity and conciseness
valentinpalkovic Nov 26, 2025
41384c6
Refactor Playwright installation command handling for improved readab…
valentinpalkovic Nov 26, 2025
24f18cc
Simplify telemetry notification message for clarity and conciseness
valentinpalkovic Nov 26, 2025
698777d
Fix getPackageCommand for yarn
valentinpalkovic Nov 26, 2025
94ea6b3
Update upgrade message
yannbf Nov 26, 2025
6f4c32a
Merge pull request #33182 from storybookjs/yann/minor-message-update
yannbf Nov 26, 2025
f547a64
Fix tests
valentinpalkovic Nov 26, 2025
c942f73
Merge pull request #33180 from storybookjs/valentin/cli-improvements
valentinpalkovic Nov 26, 2025
f066655
Build: Fix angular prerelease sandbox generation
valentinpalkovic Nov 26, 2025
fdec800
Update code/lib/cli-storybook/src/sandbox-templates.ts
valentinpalkovic Nov 26, 2025
aa3ef6e
Merge pull request #33183 from storybookjs/valentin/fix-angular-prere…
valentinpalkovic Nov 26, 2025
ef6ccb0
Angular: Don't kill dev command by using observables
valentinpalkovic Nov 26, 2025
2972335
Merge pull request #33185 from storybookjs/valentin/fix-dev-of-storybook
valentinpalkovic Nov 26, 2025
3578ce7
Merge pull request #33125 from EtiennePasteur/fix-angular-deprecated-…
valentinpalkovic Nov 26, 2025
9af8208
Write changelog for 10.1.0-beta.6 [skip ci]
storybook-bot Nov 26, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Implement getPackageCommand method in package manager proxies for imp…
…roved command execution
  • Loading branch information
valentinpalkovic committed Nov 26, 2025
commit fee87d49e6bb8b3168241da667ce12247e366942
6 changes: 3 additions & 3 deletions code/core/src/cli/AddonVitestService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export class AddonVitestService {
: await (async () => {
logger.log(dedent`
Playwright browser binaries are necessary for @storybook/addon-vitest. The download can take some time. If you don't want to wait, you can skip the installation and run the following command manually later:
${CLI_COLORS.cta(`npx ${playwrightCommand.join(' ')}`)}
${CLI_COLORS.cta(this.packageManager.getPackageCommand(playwrightCommand))}
`);
return prompt.confirm({
message: 'Do you want to install Playwright with Chromium now?',
Expand All @@ -143,8 +143,8 @@ export class AddonVitestService {
}),
{
id: 'playwright-installation',
intro: 'Installing Playwright browser binaries (Press "c" to abort)',
error: `An error occurred while installing Playwright browser binaries. Please run the following command later: npx ${playwrightCommand.join(' ')}`,
intro: 'Installing Playwright browser binaries (press "c" to abort)',
error: `An error occurred while installing Playwright browser binaries. Please run the following command later: ${playwrightCommandString}`,
success: 'Playwright browser binaries installed successfully',
abortable: true,
}
Expand Down
4 changes: 4 additions & 0 deletions code/core/src/common/js-package-manager/BUNProxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ export class BUNProxy extends JsPackageManager {
return `bunx ${pkg}${specifier ? `@${specifier}` : ''} ${args.join(' ')}`;
}

getPackageCommand(args: string[]): string {
return `bunx ${args.join(' ')}`;
}

public async getModulePackageJSON(packageName: string): Promise<PackageJson | null> {
const wantedPath = join('node_modules', packageName, 'package.json');
const packageJsonPath = find.up(wantedPath, {
Expand Down
5 changes: 4 additions & 1 deletion code/core/src/common/js-package-manager/JsPackageManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,12 @@ export abstract class JsPackageManager {
this.primaryPackageJson = this.#getPrimaryPackageJson();
}

/** Runs arbitrary package scripts. */
/** Runs arbitrary package scripts (as a string for display). */
abstract getRunCommand(command: string): string;

/** Returns the command to run the binary of a local package */
abstract getPackageCommand(args: string[]): string;

/** Get the package.json file for a given module. */
abstract getModulePackageJSON(packageName: string, cwd?: string): Promise<PackageJson | null>;

Expand Down
4 changes: 4 additions & 0 deletions code/core/src/common/js-package-manager/NPMProxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ export class NPMProxy extends JsPackageManager {
return this.installArgs;
}

public getPackageCommand(args: string[]): string {
return `npx ${args.join(' ')}`;
}

public runPackageCommand(
options: Omit<ExecuteCommandOptions, 'command'> & { args: string[] }
): ExecaChildProcess {
Expand Down
4 changes: 4 additions & 0 deletions code/core/src/common/js-package-manager/PNPMProxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ export class PNPMProxy extends JsPackageManager {
return this.installArgs;
}

getPackageCommand(args: string[]): string {
return `pnpm exec ${args.join(' ')}`;
}

public runPackageCommand({
args,
...options
Expand Down
5 changes: 5 additions & 0 deletions code/core/src/common/js-package-manager/Yarn1Proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ export class Yarn1Proxy extends JsPackageManager {
return `yarn ${command}`;
}

getPackageCommand(args: string[]): string {
const [command, ...rest] = args;
return `yarn exec ${command} -- ${rest.join(' ')}`;
}

public runPackageCommand({
args,
...options
Expand Down
4 changes: 4 additions & 0 deletions code/core/src/common/js-package-manager/Yarn2Proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ export class Yarn2Proxy extends JsPackageManager {
return `yarn ${command}`;
}

getPackageCommand(args: string): string {
return `yarn exec ${args}`;
}

public runPackageCommand({
args,
...options
Expand Down