From d6786c5cf9aeeda84ea0f08127ab8007dac9e131 Mon Sep 17 00:00:00 2001 From: Tom Coleman Date: Tue, 12 Sep 2023 11:26:12 +1000 Subject: [PATCH] Drop `.` from `chromatic.config.json` --- node-src/lib/getConfiguration.test.ts | 4 ++-- node-src/lib/getConfiguration.ts | 2 +- node-src/lib/parseArgs.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/node-src/lib/getConfiguration.test.ts b/node-src/lib/getConfiguration.test.ts index c2e997de1..d127a051b 100644 --- a/node-src/lib/getConfiguration.test.ts +++ b/node-src/lib/getConfiguration.test.ts @@ -14,11 +14,11 @@ it('reads configuration successfully', async () => { expect(await getConfiguration()).toEqual({ projectToken: 'json-file-token' }); }); -it('reads from .chromatic.config.json by default', async () => { +it('reads from chromatic.config.json by default', async () => { mockedReadFile.mockResolvedValue({ projectToken: 'json-file-token' }).mockClear(); await getConfiguration(); - expect(mockedReadFile).toHaveBeenCalledWith('.chromatic.config.json'); + expect(mockedReadFile).toHaveBeenCalledWith('chromatic.config.json'); }); it('can read from a different location', async () => { diff --git a/node-src/lib/getConfiguration.ts b/node-src/lib/getConfiguration.ts index c8077dfcf..53bce0d14 100644 --- a/node-src/lib/getConfiguration.ts +++ b/node-src/lib/getConfiguration.ts @@ -37,7 +37,7 @@ const configurationSchema = z export type Configuration = z.infer; export async function getConfiguration(configFile?: string) { - const usedConfigFile = configFile || '.chromatic.config.json'; + const usedConfigFile = configFile || 'chromatic.config.json'; try { const rawJson = await readFile(usedConfigFile); diff --git a/node-src/lib/parseArgs.ts b/node-src/lib/parseArgs.ts index 93a1f1abe..7dc8750af 100644 --- a/node-src/lib/parseArgs.ts +++ b/node-src/lib/parseArgs.ts @@ -23,7 +23,7 @@ export default function parseArgs(argv: string[]) { --auto-accept-changes [branch] If there are any changes to the build, automatically accept them. Only for [branch], if specified. Globs are supported via picomatch. --branch-name Override the branch name. Only meant to be used for unsupported CI integrations and fixing cross-fork PR comparisons. Also accepts : format. --ci Mark this build as a CI build. Alternatively, set the 'CI' environment variable (present in most CI systems). This option implies --no-interactive. - --config-file, -c Path to a configuration file containing the options listed in JSON format. Uses ".chromatic.config.json" by default. + --config-file, -c Path to a configuration file containing the options listed in JSON format. Uses "chromatic.config.json" by default. --exit-once-uploaded [branch] Exit with 0 once the built version has been published to Chromatic. Only for [branch], if specified. Globs are supported via picomatch. --exit-zero-on-changes [branch] If all snapshots render but there are visual changes, exit with code 0 rather than the usual exit code 1. Only for [branch], if specified. Globs are supported via picomatch. --externals Disable TurboSnap when any of these files have changed since the baseline build. Globs are supported via picomatch. This flag can be specified multiple times. Requires --only-changed.