From 1b86ea0edc255df874594c58e9eb01c6261b64e8 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 12 Mar 2026 02:22:08 +0000 Subject: [PATCH 1/2] Initial plan From 6df3790b4a47adfd789ba67912e1dad6fb32dff7 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 12 Mar 2026 02:28:10 +0000 Subject: [PATCH 2/2] feat(heft-storybook-plugin): add disableTelemetry option; always set COREPACK_ENABLE_AUTO_PIN=0 Co-authored-by: dmichon-msft <26827560+dmichon-msft@users.noreply.github.com> --- ...eft-storybook-plugin_2026-03-12-02-22.json | 10 ++++++ .../src/StorybookPlugin.ts | 32 ++++++++++++++++--- .../src/schemas/storybook.schema.json | 5 +++ 3 files changed, 43 insertions(+), 4 deletions(-) create mode 100644 common/changes/@rushstack/heft-storybook-plugin/copilot-update-heft-storybook-plugin_2026-03-12-02-22.json diff --git a/common/changes/@rushstack/heft-storybook-plugin/copilot-update-heft-storybook-plugin_2026-03-12-02-22.json b/common/changes/@rushstack/heft-storybook-plugin/copilot-update-heft-storybook-plugin_2026-03-12-02-22.json new file mode 100644 index 00000000000..c5c5e2f8ba1 --- /dev/null +++ b/common/changes/@rushstack/heft-storybook-plugin/copilot-update-heft-storybook-plugin_2026-03-12-02-22.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@rushstack/heft-storybook-plugin", + "comment": "Add `disableTelemetry` option to set STORYBOOK_DISABLE_TELEMETRY=1 when invoking Storybook; always set COREPACK_ENABLE_AUTO_PIN=0 in the subprocess environment", + "type": "minor" + } + ], + "packageName": "@rushstack/heft-storybook-plugin" +} diff --git a/heft-plugins/heft-storybook-plugin/src/StorybookPlugin.ts b/heft-plugins/heft-storybook-plugin/src/StorybookPlugin.ts index 4b3939ac429..020568192f0 100644 --- a/heft-plugins/heft-storybook-plugin/src/StorybookPlugin.ts +++ b/heft-plugins/heft-storybook-plugin/src/StorybookPlugin.ts @@ -158,6 +158,12 @@ export interface IStorybookPluginOptions { * Specifies whether to capture the webpack stats for the storybook build by adding the `--webpack-stats-json` CLI flag. */ captureWebpackStats?: boolean; + + /** + * If true, sets the `STORYBOOK_DISABLE_TELEMETRY=1` environment variable when invoking the Storybook subprocess, + * which disables Storybook's telemetry data collection. + */ + disableTelemetry?: boolean; } interface IRunStorybookOptions extends IPrepareStorybookOptions { @@ -499,6 +505,15 @@ export default class StorybookPlugin implements IHeftTaskPlugin { return await new Promise((resolve, reject) => { - const storybookEnv: NodeJS.ProcessEnv = { ...process.env }; const forkedProcess: child_process.ChildProcess = child_process.fork(command, args, { execArgv: process.execArgv, cwd, stdio: ['ignore', 'pipe', 'pipe', 'ipc'], - env: storybookEnv, + env, ...SubprocessTerminator.RECOMMENDED_OPTIONS }); @@ -587,6 +603,7 @@ export default class StorybookPlugin implements IHeftTaskPlugin