chromaui/chromatic-cli

List story files affected in dry-run mode

Opened this issue ยท 0 comments

Feature request

I would like to be able to see if me tweaking chromatic CLI flags has any effect on the total number of affected stories when using TurboSnap. Right now such information is not printed when using --dry-run. I only see "Retrieving story files affected by recent changes" when using the regular mode.

Proposed solution

I would expect --dry-run to print this information. It's build metadata, so it's available. ๐Ÿ™๐Ÿป

Additional context
Logs when running chromatic (as you can see i tried adding a whole set of flags ๐Ÿ˜…) :

npx chromatic --only-changed --project-token <mytoken> --dry-run --trace-changed "expanded" --no-interactive --storybook-base-dir apps/storybook --untraced "apps/web" --ci

12:39:00.430  Chromatic CLI v11.0.0
              https://www.chromatic.com/docs/cli

12:39:00.436  Authenticating with Chromatic
12:39:00.437      โ†’ Connecting to https://index.chromatic.com
12:39:01.007  Authenticated with Chromatic
                  โ†’ Using project token '********9583'
12:39:01.007  Retrieving git information
12:39:04.655  Found 6 changed files:
                apps/web/testing/mocks/queries/get-employee-session.mock.ts
                e2e/playwright/setup/helpers/createEmployee.ts
                e2e/playwright/setup/helpers/setBenefitGroup.ts
                e2e/playwright/setup/helpers/setDefaultInvestmentInstrument.ts
                e2e/playwright/setup/utils/getKnexConfig.ts
                e2e/playwright/setup/utils/setupCompany.ts
12:39:04.659  Retrieved git information
                  โ†’ Commit 'c9d236c' on branch 'XYZ-900/skip-mocks-chromatic'; found 1 parent build and 6 changed files
12:39:04.660  Collecting Storybook metadata
12:39:04.669  No viewlayer package listed in dependencies. Checking transitive dependencies.
12:39:04.672  Collected Storybook metadata
                  โ†’ Storybook 7.6.7 for React; using the unknown builder (0); supported addons found: Unknown
12:39:04.672  Initializing build
12:39:05.875  Initialized build
                  โ†’ Build 7843 initialized
12:39:05.887  Building your Storybook
12:39:05.887      โ†’ Running command: yarn run build-storybook --output-dir /var/folders/1f/nc2d_t3n2jbdqpjhk3v04wwm0000gq/T/chromatic--27287-RzCMoKQ0FALN --webpack-stats-json /var/folders/1f/nc2d_t3n2jbdqpjhk3v04wwm0000gq/T/chromatic--27287-RzCMoKQ0FALN
12:39:05.888      โ†’ [*                   ]
12:39:15.890      โ†’ [ *                  ]
12:39:25.894      โ†’ [  *                 ]
12:39:35.896      โ†’ [   *                ]
12:39:45.900      โ†’ [    *               ]
12:39:55.903      โ†’ [     *              ]
12:40:05.905      โ†’ [      *             ]
12:40:15.907      โ†’ [       *            ]
12:40:23.277  Storybook built in 1 minute 17 seconds
                  โ†’ View build log at /Users/sebastian.hewelt/Code/cms/build-storybook.log