@visual-check/cli 0.2.2 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/affected-stories/affected-stories.d.ts +3 -0
- package/dist/affected-stories/affected-stories.d.ts.map +1 -1
- package/dist/affected-stories/affected-stories.js +15 -1
- package/dist/affected-stories/affected-stories.js.map +1 -1
- package/dist/affected-stories/angular-builder.d.ts +33 -0
- package/dist/affected-stories/angular-builder.d.ts.map +1 -0
- package/dist/affected-stories/angular-builder.js +168 -0
- package/dist/affected-stories/angular-builder.js.map +1 -0
- package/dist/affected-stories/storybook-rules.d.ts +10 -2
- package/dist/affected-stories/storybook-rules.d.ts.map +1 -1
- package/dist/affected-stories/storybook-rules.js +18 -2
- package/dist/affected-stories/storybook-rules.js.map +1 -1
- package/dist/capture/end-state.d.ts +5 -2
- package/dist/capture/end-state.d.ts.map +1 -1
- package/dist/capture/end-state.js +21 -3
- package/dist/capture/end-state.js.map +1 -1
- package/dist/commands/plan-snapshots.d.ts +5 -4
- package/dist/commands/plan-snapshots.d.ts.map +1 -1
- package/dist/commands/plan-snapshots.js +11 -6
- package/dist/commands/plan-snapshots.js.map +1 -1
- package/dist/commands/run-cli.d.ts +6 -0
- package/dist/commands/run-cli.d.ts.map +1 -1
- package/dist/commands/run-cli.js +4 -2
- package/dist/commands/run-cli.js.map +1 -1
- package/dist/init/addon-question.d.ts +0 -4
- package/dist/init/addon-question.d.ts.map +1 -1
- package/dist/init/addon-question.js +1 -2
- package/dist/init/addon-question.js.map +1 -1
- package/dist/init/existing-config.d.ts.map +1 -1
- package/dist/init/existing-config.js +7 -6
- package/dist/init/existing-config.js.map +1 -1
- package/dist/init/install.d.ts +5 -3
- package/dist/init/install.d.ts.map +1 -1
- package/dist/init/install.js +8 -6
- package/dist/init/install.js.map +1 -1
- package/dist/init/latest-release.d.ts +21 -0
- package/dist/init/latest-release.d.ts.map +1 -0
- package/dist/init/latest-release.js +71 -0
- package/dist/init/latest-release.js.map +1 -0
- package/dist/init/questions.d.ts +5 -1
- package/dist/init/questions.d.ts.map +1 -1
- package/dist/init/questions.js +2 -2
- package/dist/init/questions.js.map +1 -1
- package/dist/init/run-init.d.ts +5 -0
- package/dist/init/run-init.d.ts.map +1 -1
- package/dist/init/run-init.js +26 -12
- package/dist/init/run-init.js.map +1 -1
- package/dist/init/setup-files.d.ts +14 -4
- package/dist/init/setup-files.d.ts.map +1 -1
- package/dist/init/setup-files.js +19 -7
- package/dist/init/setup-files.js.map +1 -1
- package/dist/init/storybook-start.d.ts +19 -0
- package/dist/init/storybook-start.d.ts.map +1 -1
- package/dist/init/storybook-start.js +9 -2
- package/dist/init/storybook-start.js.map +1 -1
- package/dist/storybook/capture-globals.d.ts +11 -0
- package/dist/storybook/capture-globals.d.ts.map +1 -0
- package/dist/storybook/capture-globals.js +17 -0
- package/dist/storybook/capture-globals.js.map +1 -0
- package/dist/storybook/preview-script.d.ts +3 -0
- package/dist/storybook/preview-script.d.ts.map +1 -1
- package/dist/storybook/preview-script.js +8 -0
- package/dist/storybook/preview-script.js.map +1 -1
- package/dist/storybook/read-stories.d.ts +11 -3
- package/dist/storybook/read-stories.d.ts.map +1 -1
- package/dist/storybook/read-stories.js +46 -15
- package/dist/storybook/read-stories.js.map +1 -1
- package/dist/storybook/test-path.d.ts +10 -3
- package/dist/storybook/test-path.d.ts.map +1 -1
- package/dist/storybook/test-path.js +11 -5
- package/dist/storybook/test-path.js.map +1 -1
- package/package.json +1 -1
|
@@ -92,6 +92,9 @@ interface TraceChangesOptions {
|
|
|
92
92
|
* - Any other file counts for what `affectedStorybooksIn` reads: a changed baseline, a package's config file or
|
|
93
93
|
* an image, a font or a data JSON file the graph doesn't hold, and the graph files with what they reach.
|
|
94
94
|
*
|
|
95
|
+
* For each Angular Storybook it also reads the global styles and scripts of its builder target, from the
|
|
96
|
+
* `angular.json` or `project.json` that defines it, which reach no `preview*` file.
|
|
97
|
+
*
|
|
95
98
|
* The graph isn't asked when no changed file is left once the ignored ones are dropped, when one affects every story,
|
|
96
99
|
* when no file is left to walk, or when every Storybook already has every story affected by its folders alone. When
|
|
97
100
|
* git or the graph can't answer, the reach is `everything` and `fallback` says why. A `--base` that names no commit
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"affected-stories.d.ts","sourceRoot":"","sources":["../../src/affected-stories/affected-stories.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"affected-stories.d.ts","sourceRoot":"","sources":["../../src/affected-stories/affected-stories.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AAKzD,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAE3B,KAAK,WAAW,EAChB,KAAK,sBAAsB,EAI5B,MAAM,sBAAsB,CAAA;AAE7B;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB;;OAEG;IACH,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B;;OAEG;IACH,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB;;;;;OAKG;IACH,KAAK,EAAE,SAAS,GAAG,YAAY,GAAG,WAAW,CAAA;CAC9C;AAED;;;;;GAKG;AACH,MAAM,MAAM,mBAAmB,GAAG,CAChC,SAAS,EAAE,IAAI,CAAC,sBAAsB,EAAE,KAAK,GAAG,WAAW,CAAC,KACzD,OAAO,CAAC,SAAS,MAAM,EAAE,GAAG,SAAS,CAAC,CAAA;AAE3C;;GAEG;AACH,UAAU,mBAAmB;IAC3B;;OAEG;IACH,OAAO,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAA;IAC/C;;OAEG;IACH,GAAG,EAAE,MAAM,CAAA;IACX;;OAEG;IACH,UAAU,EAAE,SAAS,IAAI,CAAC,sBAAsB,EAAE,KAAK,GAAG,WAAW,GAAG,WAAW,CAAC,EAAE,CAAA;IACtF;;;OAGG;IACH,gBAAgB,EAAE,SAAS,MAAM,EAAE,CAAA;IACnC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAA;IAClB;;OAEG;IACH,QAAQ,EAAE;QACR;;WAEG;QACH,SAAS,EAAE,SAAS,MAAM,EAAE,CAAA;QAC5B;;WAEG;QACH,MAAM,EAAE,SAAS,MAAM,EAAE,CAAA;KAC1B,CAAA;IACD;;OAEG;IACH,gBAAgB,EAAE,gBAAgB,CAAA;CACnC;AA8DD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAsB,YAAY,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,aAAa,CAAC,CAoEvF;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,aAAa,EACrB,UAAU,EAAE,SAAS,sBAAsB,EAAE,GAC5C,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAU9B;AAED;;;;;;;;;GASG;AACH,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,aAAa,EACrB,UAAU,EAAE,SAAS,IAAI,CAAC,sBAAsB,EAAE,KAAK,GAAG,WAAW,GAAG,WAAW,CAAC,EAAE,EACtF,mBAAmB,EAAE,mBAAmB,GACvC,OAAO,CAAC,OAAO,EAAE,CAAC,CA+BpB"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { realpath } from 'node:fs/promises';
|
|
2
2
|
import { availableParallelism } from 'node:os';
|
|
3
|
-
import {
|
|
3
|
+
import { readBuilderFiles } from './angular-builder.js';
|
|
4
|
+
import { changedFileRuleOf, rootRelative } from './changed-file-rules.js';
|
|
4
5
|
import { changedFilesOf } from './git-changes.js';
|
|
5
6
|
import { changedPackagesOf, groupChanges } from './group-changes.js';
|
|
6
7
|
import { mapWithLimit } from './limited-map.js';
|
|
@@ -41,6 +42,15 @@ function withRealPaths(storybooks) {
|
|
|
41
42
|
baselines: await realPathOf(storybook.baselines),
|
|
42
43
|
})));
|
|
43
44
|
}
|
|
45
|
+
/**
|
|
46
|
+
* Reads what each Angular Storybook gets from its builder target, by its config folder relative to the root, `.` for
|
|
47
|
+
* the root. Storybooks without one have no entry.
|
|
48
|
+
*/
|
|
49
|
+
async function builderFilesOf(root, storybooks) {
|
|
50
|
+
const configDirs = [...new Set(storybooks.map(({ configDir }) => configDir))];
|
|
51
|
+
const found = await Promise.all(configDirs.map(async (configDir) => [rootRelative(root, configDir) || '.', await readBuilderFiles(root, configDir)]));
|
|
52
|
+
return new Map(found.filter((entry) => entry[1] !== undefined));
|
|
53
|
+
}
|
|
44
54
|
/**
|
|
45
55
|
* Traces the changed files since the base: finds them, groups them by rule, and asks `findReachedFiles` what they
|
|
46
56
|
* reach, then what their changed packages reach. It reads no Storybook's stories, so it can run before any Storybook
|
|
@@ -53,6 +63,9 @@ function withRealPaths(storybooks) {
|
|
|
53
63
|
* - Any other file counts for what `affectedStorybooksIn` reads: a changed baseline, a package's config file or
|
|
54
64
|
* an image, a font or a data JSON file the graph doesn't hold, and the graph files with what they reach.
|
|
55
65
|
*
|
|
66
|
+
* For each Angular Storybook it also reads the global styles and scripts of its builder target, from the
|
|
67
|
+
* `angular.json` or `project.json` that defines it, which reach no `preview*` file.
|
|
68
|
+
*
|
|
56
69
|
* The graph isn't asked when no changed file is left once the ignored ones are dropped, when one affects every story,
|
|
57
70
|
* when no file is left to walk, or when every Storybook already has every story affected by its folders alone. When
|
|
58
71
|
* git or the graph can't answer, the reach is `everything` and `fallback` says why. A `--base` that names no commit
|
|
@@ -96,6 +109,7 @@ export async function traceChanges(options) {
|
|
|
96
109
|
reached: new Set(),
|
|
97
110
|
changedPackages: changedPackagesOf(packageScoped, undefined),
|
|
98
111
|
reachedFromPackages: new Set(),
|
|
112
|
+
builderFiles: await builderFilesOf(root, realStorybooks),
|
|
99
113
|
};
|
|
100
114
|
// Before the graph answers, nothing reaches a stories file, so only the Storybooks' folders count.
|
|
101
115
|
const isWhollyAffectedBeforeGraph = whollyAffectedTestOf(beforeGraph);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"affected-stories.js","sourceRoot":"","sources":["../../src/affected-stories/affected-stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAC3C,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;
|
|
1
|
+
{"version":3,"file":"affected-stories.js","sourceRoot":"","sources":["../../src/affected-stories/affected-stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAC3C,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAC9C,OAAO,EAAqB,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAC1E,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAEzE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACpE,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AACzD,OAAO,EAGL,oBAAoB,EAGpB,uBAAuB,EACvB,gCAAgC,EAChC,oBAAoB,GACrB,MAAM,sBAAsB,CAAA;AAuF7B;;GAEG;AACH,SAAS,kBAAkB,CAAC,UAA6C;IACvE,OAAO,UAAU,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC,CAAA;AAC9C,CAAC;AAED;;GAEG;AACH,SAAS,eAAe,CAAC,UAA6C;IACpE,OAAO,UAAU,CAAC,GAAG,CAAC,G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AAE,SAAS,EAAE,CAAC,CAAC,CACnF,CAAA;IACD,MAAM,4BAA4B,GAAG,gCAAgC,CAAC,KAAK,CAAC,CAAA;IAC5E,MAAM,UAAU,GAAG,uBAAuB,CAAC,KAAK,CAAC,CAAA;IAEjD,OAAO,MAAM,YAAY,CACvB,oBAAoB,EAAE,EACtB,cAAc,EACd,KAAK,EAAE,SAAS,EAAE,EAAE,CAClB,4BAA4B,CAAC,SAAS,CAAC;QACvC,UAAU,CAAC;YACT,GAAG,SAAS;YACZ,sFAAsF;YACtF,eAAe,EAAE,MAAM,mBAAmB,CAAC,EAAE,GAAG,EAAE,SAAS,CAAC,GAAG,EAAE,SAAS,EAAE,SAAS,CAAC,SAAS,EAAE,CAAC,CAAC,KAAK,CACtG,GAAG,EAAE,CAAC,SAAS,CAChB;SACF,CAAC,CACL,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What an Angular Storybook gets from the builder target that runs it, rather than from its config folder.
|
|
3
|
+
*/
|
|
4
|
+
export interface BuilderFiles {
|
|
5
|
+
/**
|
|
6
|
+
* The `angular.json` or `project.json` files that define a Storybook target for the config folder, relative to the
|
|
7
|
+
* root, `/`-separated.
|
|
8
|
+
*/
|
|
9
|
+
workspaceFiles: readonly string[];
|
|
10
|
+
/**
|
|
11
|
+
* The global styles and scripts those targets, and the build targets their `browserTarget` names, list, relative to
|
|
12
|
+
* the root, `/`-separated.
|
|
13
|
+
*/
|
|
14
|
+
entries: readonly string[];
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Gives the global styles and scripts, as absolute paths, of the Angular Storybook targets in a parsed `angular.json`
|
|
18
|
+
* or `project.json` that run the Storybook in `configDir`, plus those of the build targets their `browserTarget` names
|
|
19
|
+
* in the same file. A target runs it when its builder, or Nx executor, starts with `@storybook/angular:` and one of its
|
|
20
|
+
* option sets names `configDir`, `.storybook` when none does. Paths are relative to `workspaceRoot`, as the Angular
|
|
21
|
+
* builder reads them. Gives `undefined` when no target runs the Storybook.
|
|
22
|
+
*/
|
|
23
|
+
export declare function builderEntriesIn(document: unknown, workspaceRoot: string, configDir: string): string[] | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* Reads what an Angular Storybook gets from its builder target: it looks for an `angular.json` and a `project.json`
|
|
26
|
+
* in the config folder and each folder above it up to the root, and reads the Storybook targets in them that run the
|
|
27
|
+
* Storybook in `configDir`, by the rules of `builderEntriesIn`. An `angular.json`'s paths are relative to its folder,
|
|
28
|
+
* and a `project.json`'s to the nearest folder above it that holds `nx.json`, else the root. Both paths are absolute
|
|
29
|
+
* and real. Gives `undefined` when no target runs the Storybook, as for any Storybook that isn't Angular. A file that
|
|
30
|
+
* is missing or isn't JSON counts as none.
|
|
31
|
+
*/
|
|
32
|
+
export declare function readBuilderFiles(root: string, configDir: string): Promise<BuilderFiles | undefined>;
|
|
33
|
+
//# sourceMappingURL=angular-builder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"angular-builder.d.ts","sourceRoot":"","sources":["../../src/affected-stories/angular-builder.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B;;;OAGG;IACH,cAAc,EAAE,SAAS,MAAM,EAAE,CAAA;IACjC;;;OAGG;IACH,OAAO,EAAE,SAAS,MAAM,EAAE,CAAA;CAC3B;AAiFD;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CA+BlH;AAuFD;;;;;;;GAOG;AACH,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC,CAczG"}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import { readFile } from 'node:fs/promises';
|
|
2
|
+
import { dirname, join, resolve } from 'node:path';
|
|
3
|
+
import { rootRelative } from './changed-file-rules.js';
|
|
4
|
+
/**
|
|
5
|
+
* The prefix of the builders, or Nx executors, that run an Angular Storybook.
|
|
6
|
+
*/
|
|
7
|
+
const storybookBuilderPrefix = '@storybook/angular:';
|
|
8
|
+
/**
|
|
9
|
+
* The config folder an Angular Storybook target uses when its options name none.
|
|
10
|
+
*/
|
|
11
|
+
const defaultConfigDir = '.storybook';
|
|
12
|
+
/**
|
|
13
|
+
* Tells whether a value is a plain object.
|
|
14
|
+
*/
|
|
15
|
+
function isRecord(value) {
|
|
16
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Gives a target's option sets: its `options` and each of its `configurations`, which may override them.
|
|
20
|
+
*/
|
|
21
|
+
function optionSetsOf(target) {
|
|
22
|
+
const configurations = isRecord(target.configurations) ? Object.values(target.configurations) : [];
|
|
23
|
+
return [target.options, ...configurations].filter(isRecord);
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Gives the files an option set's `styles` and `scripts` list, as written: a string, or an object's `input`.
|
|
27
|
+
*/
|
|
28
|
+
function globalEntriesOf(options) {
|
|
29
|
+
return [options.styles, options.scripts].flatMap((list) => (Array.isArray(list) ? list : []).flatMap((entry) => {
|
|
30
|
+
const input = isRecord(entry) ? entry.input : entry;
|
|
31
|
+
return typeof input === 'string' ? [input] : [];
|
|
32
|
+
}));
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Gives a workspace file's projects, each with its targets: every project of an `angular.json`, or the one project a
|
|
36
|
+
* `project.json` defines, named by its `name`. Targets sit under `architect` or `targets`.
|
|
37
|
+
*/
|
|
38
|
+
function projectsOf(document) {
|
|
39
|
+
if (!isRecord(document)) {
|
|
40
|
+
return new Map();
|
|
41
|
+
}
|
|
42
|
+
const projects = isRecord(document.projects)
|
|
43
|
+
? Object.entries(document.projects)
|
|
44
|
+
: [[typeof document.name === 'string' ? document.name : '', document]];
|
|
45
|
+
return new Map(projects.flatMap(([name, project]) => {
|
|
46
|
+
const targets = isRecord(project) ? (project.architect ?? project.targets) : undefined;
|
|
47
|
+
return isRecord(targets) ? [[name, targets]] : [];
|
|
48
|
+
}));
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Gives the target a `browserTarget` or `buildTarget` such as `app:build:production` names, when the same workspace
|
|
52
|
+
* file defines it.
|
|
53
|
+
*/
|
|
54
|
+
function namedTarget(projects, reference) {
|
|
55
|
+
if (typeof reference !== 'string') {
|
|
56
|
+
return undefined;
|
|
57
|
+
}
|
|
58
|
+
const [project = '', target = ''] = reference.split(':');
|
|
59
|
+
const named = projects.get(project)?.[target];
|
|
60
|
+
return isRecord(named) ? named : undefined;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Gives the global styles and scripts, as absolute paths, of the Angular Storybook targets in a parsed `angular.json`
|
|
64
|
+
* or `project.json` that run the Storybook in `configDir`, plus those of the build targets their `browserTarget` names
|
|
65
|
+
* in the same file. A target runs it when its builder, or Nx executor, starts with `@storybook/angular:` and one of its
|
|
66
|
+
* option sets names `configDir`, `.storybook` when none does. Paths are relative to `workspaceRoot`, as the Angular
|
|
67
|
+
* builder reads them. Gives `undefined` when no target runs the Storybook.
|
|
68
|
+
*/
|
|
69
|
+
export function builderEntriesIn(document, workspaceRoot, configDir) {
|
|
70
|
+
const projects = projectsOf(document);
|
|
71
|
+
const storybookTargets = [...projects.values()]
|
|
72
|
+
.flatMap((targets) => Object.values(targets))
|
|
73
|
+
.filter(isRecord)
|
|
74
|
+
.filter((target) => {
|
|
75
|
+
const builder = target.builder ?? target.executor;
|
|
76
|
+
return typeof builder === 'string' && builder.startsWith(storybookBuilderPrefix);
|
|
77
|
+
})
|
|
78
|
+
.filter((target) => {
|
|
79
|
+
const configDirs = optionSetsOf(target).map(({ configDir: dir }) => dir);
|
|
80
|
+
const named = configDirs.filter((dir) => typeof dir === 'string');
|
|
81
|
+
return (named.length === 0 ? [defaultConfigDir] : named).some((dir) => resolve(workspaceRoot, dir) === configDir);
|
|
82
|
+
});
|
|
83
|
+
if (storybookTargets.length === 0) {
|
|
84
|
+
return undefined;
|
|
85
|
+
}
|
|
86
|
+
const optionSets = storybookTargets.flatMap((target) => {
|
|
87
|
+
const own = optionSetsOf(target);
|
|
88
|
+
const built = own.flatMap(({ browserTarget, buildTarget }) => [namedTarget(projects, browserTarget), namedTarget(projects, buildTarget)].filter(isRecord).flatMap(optionSetsOf));
|
|
89
|
+
return [...own, ...built];
|
|
90
|
+
});
|
|
91
|
+
return [...new Set(optionSets.flatMap(globalEntriesOf).map((entry) => resolve(workspaceRoot, entry)))];
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Reads and parses a JSON file, or gives `undefined` when it's missing or isn't JSON.
|
|
95
|
+
*/
|
|
96
|
+
async function readJson(path) {
|
|
97
|
+
try {
|
|
98
|
+
return JSON.parse(await readFile(path, 'utf8'));
|
|
99
|
+
}
|
|
100
|
+
catch {
|
|
101
|
+
return undefined;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Gives the folders from `folder` up to `root`, both included. Gives only `root` when `folder` isn't inside it.
|
|
106
|
+
*/
|
|
107
|
+
function foldersUpTo(root, folder) {
|
|
108
|
+
const relativePath = rootRelative(root, folder);
|
|
109
|
+
if (relativePath === '..' || relativePath.startsWith('../') || resolve(root, relativePath) !== folder) {
|
|
110
|
+
return [root];
|
|
111
|
+
}
|
|
112
|
+
const folders = [folder];
|
|
113
|
+
while (folders.at(-1) !== root) {
|
|
114
|
+
folders.push(dirname(folders.at(-1)));
|
|
115
|
+
}
|
|
116
|
+
return folders;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Gives the folder an Nx workspace's paths are relative to: the nearest of `folders` that holds `nx.json`, else the
|
|
120
|
+
* root, the last of them.
|
|
121
|
+
*/
|
|
122
|
+
async function nxWorkspaceRootOf(folders) {
|
|
123
|
+
for (const folder of folders) {
|
|
124
|
+
if ((await readJson(join(folder, 'nx.json'))) !== undefined) {
|
|
125
|
+
return folder;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
return folders.at(-1);
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Reads the `angular.json` and `project.json` in the first of `folders`, and gives those that define a Storybook
|
|
132
|
+
* target for `configDir`. An `angular.json`'s paths are relative to its folder, and a `project.json`'s to the nearest
|
|
133
|
+
* of `folders` that holds `nx.json`, else the last of them.
|
|
134
|
+
*/
|
|
135
|
+
async function workspaceFilesIn(folders, configDir) {
|
|
136
|
+
const folder = folders[0];
|
|
137
|
+
const found = await Promise.all(['angular.json', 'project.json'].map(async (name) => {
|
|
138
|
+
const file = join(folder, name);
|
|
139
|
+
const document = await readJson(file);
|
|
140
|
+
if (document === undefined) {
|
|
141
|
+
return [];
|
|
142
|
+
}
|
|
143
|
+
const workspaceRoot = name === 'angular.json' ? folder : await nxWorkspaceRootOf(folders);
|
|
144
|
+
const entries = builderEntriesIn(document, workspaceRoot, configDir);
|
|
145
|
+
return entries === undefined ? [] : [{ file, entries }];
|
|
146
|
+
}));
|
|
147
|
+
return found.flat();
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Reads what an Angular Storybook gets from its builder target: it looks for an `angular.json` and a `project.json`
|
|
151
|
+
* in the config folder and each folder above it up to the root, and reads the Storybook targets in them that run the
|
|
152
|
+
* Storybook in `configDir`, by the rules of `builderEntriesIn`. An `angular.json`'s paths are relative to its folder,
|
|
153
|
+
* and a `project.json`'s to the nearest folder above it that holds `nx.json`, else the root. Both paths are absolute
|
|
154
|
+
* and real. Gives `undefined` when no target runs the Storybook, as for any Storybook that isn't Angular. A file that
|
|
155
|
+
* is missing or isn't JSON counts as none.
|
|
156
|
+
*/
|
|
157
|
+
export async function readBuilderFiles(root, configDir) {
|
|
158
|
+
const folders = foldersUpTo(root, configDir);
|
|
159
|
+
const found = (await Promise.all(folders.map((_folder, index) => workspaceFilesIn(folders.slice(index), configDir)))).flat();
|
|
160
|
+
if (found.length === 0) {
|
|
161
|
+
return undefined;
|
|
162
|
+
}
|
|
163
|
+
return {
|
|
164
|
+
workspaceFiles: found.map(({ file }) => rootRelative(root, file)),
|
|
165
|
+
entries: [...new Set(found.flatMap(({ entries }) => entries.map((entry) => rootRelative(root, entry))))],
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
//# sourceMappingURL=angular-builder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"angular-builder.js","sourceRoot":"","sources":["../../src/affected-stories/angular-builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAC3C,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAkBtD;;GAEG;AACH,MAAM,sBAAsB,GAAG,qBAAqB,CAAA;AAEpD;;GAEG;AACH,MAAM,gBAAgB,GAAG,YAAY,CAAA;AAErC;;GAEG;AACH,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;AAC7E,CAAC;AAED;;GAEG;AACH,SAAS,YAAY,CAAC,MAA+B;IACnD,MAAM,cAAc,GAAG,QAAQ,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;IAElG,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,GAAG,cAAc,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAA;AAC7D,CAAC;AAED;;GAEG;AACH,SAAS,eAAe,CAAC,OAAgC;IACvD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;QACvB,OAAO,SAAS,CAAA;IAClB,CAAC;IAED,OAAO;QACL,cAAc,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QACjE,OAAO,EAAE,CAAC,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;KACzG,CAAA;AACH,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { BuilderFiles } from './angular-builder.js';
|
|
1
2
|
import { type ChangedBaseline } from './changed-file-rules.js';
|
|
2
3
|
/**
|
|
3
4
|
* A Storybook, as the affected stories rules read it.
|
|
@@ -80,6 +81,11 @@ export interface ChangeReach {
|
|
|
80
81
|
* The changed baselines.
|
|
81
82
|
*/
|
|
82
83
|
changedBaselines: readonly ChangedBaseline[];
|
|
84
|
+
/**
|
|
85
|
+
* What each Angular Storybook gets from its builder target, by its config folder relative to the root,
|
|
86
|
+
* `/`-separated, and `.` for the root. A Storybook whose config folder has no entry has no builder target.
|
|
87
|
+
*/
|
|
88
|
+
builderFiles: ReadonlyMap<string, BuilderFiles>;
|
|
83
89
|
}
|
|
84
90
|
/**
|
|
85
91
|
* Tells whether a change affects a Storybook as a whole, whatever stories it has. `isStoriesFile` tells whether a
|
|
@@ -88,8 +94,8 @@ export interface ChangeReach {
|
|
|
88
94
|
type IsWhollyAffected = (storybook: Pick<AffectedStorybookInput, 'dir' | 'configDir'>, isStoriesFile: (rootRelativePath: string) => boolean) => boolean;
|
|
89
95
|
/**
|
|
90
96
|
* Gives the test of whether the change affects a Storybook as a whole: its folder or config folder is outside the
|
|
91
|
-
* root, a changed or reached `preview*` or `main*` file sits directly in its config folder,
|
|
92
|
-
* changed package. It reads the change's config folders once, whatever the number of Storybooks it tests.
|
|
97
|
+
* root, a changed or reached `preview*` or `main*` file sits directly in its config folder, the change reaches what it
|
|
98
|
+
* gets from its Angular builder target, or its graph reaches a changed package. It reads the change's config folders once, whatever the number of Storybooks it tests.
|
|
93
99
|
*/
|
|
94
100
|
export declare function whollyAffectedTestOf(reach: ChangeReach): IsWhollyAffected;
|
|
95
101
|
/**
|
|
@@ -101,6 +107,8 @@ export declare function whollyAffectedTestOf(reach: ChangeReach): IsWhollyAffect
|
|
|
101
107
|
* since the file system may not tell `Preview.tsx` from `preview.tsx`, and the prefixes also match files such as
|
|
102
108
|
* `previewer.ts` or `maintenance.ts`: selecting too many stories is accepted over missing one. Changed files count
|
|
103
109
|
* for the config files only, since some, such as `preview-head.html` or a deleted `preview.ts`, aren't in the graph;
|
|
110
|
+
* - for an Angular Storybook, the `angular.json` or `project.json` that defines its builder target changed, or a global
|
|
111
|
+
* style or script the target lists in `styles` or `scripts` changed or is reached, as through a CSS `@import`;
|
|
104
112
|
* - its graph reaches a changed package: the root is one, its folder is inside one, or `reachedFromPackages` holds one
|
|
105
113
|
* of its stories files or a `preview*` or `main*` file directly in its config folder.
|
|
106
114
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storybook-rules.d.ts","sourceRoot":"","sources":["../../src/affected-stories/storybook-rules.ts"],"names":[],"mappings":"AACA,OAAO,EAAsB,KAAK,eAAe,EAAgB,MAAM,yBAAyB,CAAA;AAEhG;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,GAAG,EAAE,MAAM,CAAA;IACX;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;IACjB;;;OAGG;IACH,YAAY,EAAE,SAAS,MAAM,EAAE,CAAA;IAC/B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;IACjB;;OAEG;IACH,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAA;CAC5B;AAED;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GACzB;IACE;;OAEG;IACH,GAAG,EAAE,IAAI,CAAA;CACV,GACD;IACE;;OAEG;IACH,GAAG,EAAE,KAAK,CAAA;IACV;;OAEG;IACH,YAAY,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;IACjC;;OAEG;IACH,QAAQ,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;CAC9B,CAAA;AAEL;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,OAAO,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;IAC5B;;;OAGG;IACH,YAAY,EAAE,SAAS,MAAM,EAAE,CAAA;IAC/B;;;OAGG;IACH,eAAe,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;IACpC;;;OAGG;IACH,mBAAmB,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;IACxC;;OAEG;IACH,gBAAgB,EAAE,SAAS,eAAe,EAAE,CAAA;
|
|
1
|
+
{"version":3,"file":"storybook-rules.d.ts","sourceRoot":"","sources":["../../src/affected-stories/storybook-rules.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACxD,OAAO,EAAsB,KAAK,eAAe,EAAgB,MAAM,yBAAyB,CAAA;AAEhG;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,GAAG,EAAE,MAAM,CAAA;IACX;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;IACjB;;;OAGG;IACH,YAAY,EAAE,SAAS,MAAM,EAAE,CAAA;IAC/B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;IACjB;;OAEG;IACH,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAA;CAC5B;AAED;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GACzB;IACE;;OAEG;IACH,GAAG,EAAE,IAAI,CAAA;CACV,GACD;IACE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EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,CAAA;CAC/C;AAgBD;;;GAGG;AACH,wBAAgB,gCAAgC,CAC9C,KAAK,EAAE,WAAW,GACjB,CAAC,SAAS,EAAE,IAAI,CAAC,sBAAsB,EAAE,KAAK,GAAG,WAAW,GAAG,WAAW,CAAC,KAAK,OAAO,CAMzF;AAED;;;;;;;;;GASG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,WAAW,GAAG,CAAC,SAAS,EAAE,sBAAsB,KAAK,OAAO,CAoB1G;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,sBAAsB,EAAE,GAAG,OAAO,EAAE,CAEjH"}
|
|
@@ -36,6 +36,18 @@ function isInPackage(folder, packageFolders) {
|
|
|
36
36
|
function storiesFilesOf(root, storybook) {
|
|
37
37
|
return new Map(storybook.storiesFiles.map((importPath) => [rootRelative(root, resolve(storybook.dir, importPath)), importPath]));
|
|
38
38
|
}
|
|
39
|
+
/**
|
|
40
|
+
* Tells whether a change reaches what a Storybook gets from its builder target: a changed `angular.json` or
|
|
41
|
+
* `project.json` that defines it, or a changed or reached global style or script it lists.
|
|
42
|
+
*/
|
|
43
|
+
function reachesBuilderFiles(configFolder, reach, changedOrReached) {
|
|
44
|
+
const builderFiles = reach.builderFiles.get(configFolder);
|
|
45
|
+
if (builderFiles === undefined) {
|
|
46
|
+
return false;
|
|
47
|
+
}
|
|
48
|
+
return (builderFiles.workspaceFiles.some((file) => reach.changedFiles.includes(file)) ||
|
|
49
|
+
builderFiles.entries.some((file) => changedOrReached.has(file)));
|
|
50
|
+
}
|
|
39
51
|
/**
|
|
40
52
|
* Tells whether a Storybook's graph reaches a changed package: the root is one, its folder is inside one, or
|
|
41
53
|
* `reachedFromPackages` holds one of its stories files, as `isStoriesFile` tells, or, by
|
|
@@ -52,11 +64,12 @@ function reachesChangedPackage(folders, reach, configFoldersReachedFromPackages,
|
|
|
52
64
|
}
|
|
53
65
|
/**
|
|
54
66
|
* Gives the test of whether the change affects a Storybook as a whole: its folder or config folder is outside the
|
|
55
|
-
* root, a changed or reached `preview*` or `main*` file sits directly in its config folder,
|
|
56
|
-
* changed package. It reads the change's config folders once, whatever the number of Storybooks it tests.
|
|
67
|
+
* root, a changed or reached `preview*` or `main*` file sits directly in its config folder, the change reaches what it
|
|
68
|
+
* gets from its Angular builder target, or its graph reaches a changed package. It reads the change's config folders once, whatever the number of Storybooks it tests.
|
|
57
69
|
*/
|
|
58
70
|
export function whollyAffectedTestOf(reach) {
|
|
59
71
|
const configFolders = foldersWithConfigFilesOf(reach.changedFiles, reach.reached);
|
|
72
|
+
const changedOrReached = new Set([...reach.changedFiles, ...reach.reached]);
|
|
60
73
|
const configFoldersReachedFromPackages = foldersWithConfigFilesOf(reach.reachedFromPackages);
|
|
61
74
|
return (storybook, isStoriesFile) => {
|
|
62
75
|
const folders = {
|
|
@@ -66,6 +79,7 @@ export function whollyAffectedTestOf(reach) {
|
|
|
66
79
|
return (isOutsideRoot(folders.folder) ||
|
|
67
80
|
isOutsideRoot(folders.configFolder) ||
|
|
68
81
|
configFolders.has(folders.configFolder) ||
|
|
82
|
+
reachesBuilderFiles(folders.configFolder, reach, changedOrReached) ||
|
|
69
83
|
reachesChangedPackage(folders, reach, configFoldersReachedFromPackages, isStoriesFile));
|
|
70
84
|
};
|
|
71
85
|
}
|
|
@@ -85,6 +99,8 @@ function storyIdsOfBaselines(storybook, changedBaselines) {
|
|
|
85
99
|
* since the file system may not tell `Preview.tsx` from `preview.tsx`, and the prefixes also match files such as
|
|
86
100
|
* `previewer.ts` or `maintenance.ts`: selecting too many stories is accepted over missing one. Changed files count
|
|
87
101
|
* for the config files only, since some, such as `preview-head.html` or a deleted `preview.ts`, aren't in the graph;
|
|
102
|
+
* - for an Angular Storybook, the `angular.json` or `project.json` that defines its builder target changed, or a global
|
|
103
|
+
* style or script the target lists in `styles` or `scripts` changed or is reached, as through a CSS `@import`;
|
|
88
104
|
* - its graph reaches a changed package: the root is one, its folder is inside one, or `reachedFromPackages` holds one
|
|
89
105
|
* of its stories files or a `preview*` or `main*` file directly in its config folder.
|
|
90
106
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storybook-rules.js","sourceRoot":"","sources":["../../src/affected-stories/storybook-rules.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"storybook-rules.js","sourceRoot":"","sources":["../../src/affected-stories/storybook-rules.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAEtD,OAAO,EAAE,kBAAkB,EAAwB,YAAY,EAAE,MAAM,yBAAyB,CAAA;AA8FhG;;;GAGG;AACH,SAAS,aAAa,CAAC,gBAAwB;IAC7C,OAAO,gBAAgB,KAAK,IAAI,IAAI,gBAAgB,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,UAAU,CAAC,gBAAgB,CAAC,CAAA;AACxG,CAAC;AAED;;;GAGG;AACH,SAAS,wBAAwB,CAAC,GAAG,SAA6B;IAChE,MAAM,OAAO,GAAG,IAAI,GAAG,EAAU,CAAA;IAEjC,KAAK,MAAM,KAAK,IAAI,SAAS,EAAE,CAAC;QAC9B,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YACzB,MAAM,IAAI,GAAG,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,CAAA;YAE/C,IAAI,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;gBAC1D,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAA;YAClC,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,OAAO,CAA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,GAAG,SAAS,CAAC,eAAe,CAAA;QAE1C,IAAI,QAAQ,KAAK,SAAS,IAAI,4BAA4B,CAAC,SAAS,CAAC,EAAE,CAAC;YACtE,OAAO,IAAI,CAAA;QACb,CAAC;QAED,MAAM,aAAa,GAAG,CAAC,IAAY,EAAW,EAAE;YAC9C,MAAM,UAAU,GAAG,YAAY,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,CAAC,GAAG,EAAE,IAAI,CAAC,CAAA;YAEhE,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAA;QAC7D,CAAC,CAAA;QAED,OAAO,gBAAgB,CAAC,SAAS,EAAE,aAAa,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,CAAA;IAChF,CAAC,CAAA;AACH,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,oBAAoB,CAAC,KAAkB,EAAE,UAA6C;IACpG,OAAO,UAAU,CAAC,GAAG,CAAC,uBAAuB,CAAC,KAAK,CAAC,CAAC,CAAA;AACvD,CAAC"}
|
|
@@ -26,9 +26,12 @@
|
|
|
26
26
|
* nothing running and nothing pending waits no frame. An animation whose `finish()` throws isn't tried again.
|
|
27
27
|
* 2. Puts every animation still running on its first keyframe, with `pause()` then `currentTime = 0`, as Storybook 11
|
|
28
28
|
* does: infinite ones, finite ones whose `finish()` threw, and finite ones still starting after 20 rounds. One that
|
|
29
|
-
* paused counts as parked even when it can't be seeked to 0.
|
|
29
|
+
* paused counts as parked even when it can't be seeked to 0. Before the seek, it clears a negative delay, which
|
|
30
|
+
* would keep the animation that far into its first iteration at 0: a page keeping several spinners in step sets
|
|
31
|
+
* one from the time each mounts, so it differs on every load.
|
|
30
32
|
* 3. Pins what Chromium might paint stale: every animation step 2 parked, every one Storybook 11 parked, and every
|
|
31
|
-
* finished one whose fill mode still holds its end. It
|
|
33
|
+
* finished one whose fill mode still holds its end. It clears the negative delay of one Storybook 11 parked first,
|
|
34
|
+
* as step 2 does, since Storybook seeks to 0 alone. It writes each into the element's inline style with
|
|
32
35
|
* `commitStyles()`, then cancels it. A pseudo-element can't take an inline style, so its animation stays as it is.
|
|
33
36
|
* 4. Freezes media:
|
|
34
37
|
* - It pauses every video and stops it playing on its own, so one still loading doesn't start later. It seeks one
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"end-state.d.ts","sourceRoot":"","sources":["../../src/capture/end-state.ts"],"names":[],"mappings":"AAsCA
|
|
1
|
+
{"version":3,"file":"end-state.d.ts","sourceRoot":"","sources":["../../src/capture/end-state.ts"],"names":[],"mappings":"AAsCA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8FG;AACH,eAAO,MAAM,gBAAgB,QAipB3B,CAAA;AAEF;;GAEG;AACH,MAAM,MAAM,QAAQ,GAChB;IACE;;OAEG;IACH,OAAO,EAAE,SAAS,CAAA;IAClB;;;;OAIG;IACH,OAAO,EAAE,OAAO,CAAA;CACjB,GACD;IACE;;OAEG;IACH,OAAO,EAAE,WAAW,CAAA;IACpB;;;;OAIG;IACH,IAAI,EAAE,YAAY,GAAG,OAAO,CAAA;CAC7B,GACD;IACE;;OAEG;IACH,OAAO,EAAE,gBAAgB,CAAA;CAC1B,CAAA;AAEL;;GAEG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,QAAQ,CAgBrD"}
|
|
@@ -56,9 +56,12 @@ const cssEscapePattern = String.raw `/\\(?:([0-9a-fA-F]{1,6}) ?|([^]))/g`;
|
|
|
56
56
|
* nothing running and nothing pending waits no frame. An animation whose `finish()` throws isn't tried again.
|
|
57
57
|
* 2. Puts every animation still running on its first keyframe, with `pause()` then `currentTime = 0`, as Storybook 11
|
|
58
58
|
* does: infinite ones, finite ones whose `finish()` threw, and finite ones still starting after 20 rounds. One that
|
|
59
|
-
* paused counts as parked even when it can't be seeked to 0.
|
|
59
|
+
* paused counts as parked even when it can't be seeked to 0. Before the seek, it clears a negative delay, which
|
|
60
|
+
* would keep the animation that far into its first iteration at 0: a page keeping several spinners in step sets
|
|
61
|
+
* one from the time each mounts, so it differs on every load.
|
|
60
62
|
* 3. Pins what Chromium might paint stale: every animation step 2 parked, every one Storybook 11 parked, and every
|
|
61
|
-
* finished one whose fill mode still holds its end. It
|
|
63
|
+
* finished one whose fill mode still holds its end. It clears the negative delay of one Storybook 11 parked first,
|
|
64
|
+
* as step 2 does, since Storybook seeks to 0 alone. It writes each into the element's inline style with
|
|
62
65
|
* `commitStyles()`, then cancels it. A pseudo-element can't take an inline style, so its animation stays as it is.
|
|
63
66
|
* 4. Freezes media:
|
|
64
67
|
* - It pauses every video and stops it playing on its own, so one still loading doesn't start later. It seeks one
|
|
@@ -260,6 +263,16 @@ export const endStateFunction = `(context) => {
|
|
|
260
263
|
|
|
261
264
|
// The steps after settling.
|
|
262
265
|
|
|
266
|
+
// At time 0, an animation with a negative delay is that far into its first iteration, and seeking it to the delay
|
|
267
|
+
// puts it before its start, on no keyframe. Clearing the delay puts time 0 on its first keyframe.
|
|
268
|
+
const clearNegativeDelay = (animation) => {
|
|
269
|
+
try {
|
|
270
|
+
if (animation.effect.getTiming().delay < 0) {
|
|
271
|
+
animation.effect.updateTiming({ delay: 0 })
|
|
272
|
+
}
|
|
273
|
+
} catch {}
|
|
274
|
+
}
|
|
275
|
+
|
|
263
276
|
const park = (animations) => {
|
|
264
277
|
const parked = new Set()
|
|
265
278
|
for (const animation of animations) {
|
|
@@ -272,6 +285,7 @@ export const endStateFunction = `(context) => {
|
|
|
272
285
|
continue
|
|
273
286
|
}
|
|
274
287
|
parked.add(animation)
|
|
288
|
+
clearNegativeDelay(animation)
|
|
275
289
|
try {
|
|
276
290
|
animation.currentTime = 0
|
|
277
291
|
} catch {}
|
|
@@ -283,9 +297,13 @@ export const endStateFunction = `(context) => {
|
|
|
283
297
|
let pinned = 0
|
|
284
298
|
for (const animation of animations) {
|
|
285
299
|
const finishedHoldingEnd = playStateOf(animation) === 'finished' && holdsItsEnd(animation)
|
|
286
|
-
|
|
300
|
+
const storybookParked = !parked.has(animation) && parkedByStorybook(animation)
|
|
301
|
+
if (!parked.has(animation) && !storybookParked && !finishedHoldingEnd) {
|
|
287
302
|
continue
|
|
288
303
|
}
|
|
304
|
+
if (storybookParked) {
|
|
305
|
+
clearNegativeDelay(animation)
|
|
306
|
+
}
|
|
289
307
|
try {
|
|
290
308
|
animation.commitStyles()
|
|
291
309
|
animation.cancel()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"end-state.js","sourceRoot":"","sources":["../../src/capture/end-state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AAEnD;;GAEG;AACH,MAAM,SAAS,GAAG,EAAE,CAAA;AAEpB;;GAEG;AACH,MAAM,YAAY,GAAG,+CAA+C,CAAA;AAEpE;;GAEG;AACH,MAAM,kBAAkB,GAAG,CAAC,kBAAkB,EAAE,qBAAqB,EAAE,SAAS,EAAE,kBAAkB,EAAE,YAAY,CAAC,CAAA;AAEnH;;GAEG;AACH,MAAM,kBAAkB,GAAG,8BAA8B,CAAA;AAEzD;;GAEG;AACH,MAAM,YAAY,GAAG,aAAa,CAAA;AAElC;;GAEG;AACH,MAAM,aAAa,GAAG,MAAM,CAAC,GAAG,CAAA,iCAAiC,CAAA;AAEjE;;GAEG;AACH,MAAM,gBAAgB,GAAG,MAAM,CAAC,GAAG,CAAA,qCAAqC,CAAA;AAExE
|
|
1
|
+
{"version":3,"file":"end-state.js","sourceRoot":"","sources":["../../src/capture/end-state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AACzD,OAAO,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K,CAAC,uEAAuE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;AAClH,CAAC"}
|
|
@@ -2,10 +2,10 @@ import { type BrokenStory } from '../capture/capture-session.js';
|
|
|
2
2
|
import type { OptionsRequest, StorybookOptionsRead } from '../capture/read-options.js';
|
|
3
3
|
import type { Tolerance, Viewport } from '../config/define-config.js';
|
|
4
4
|
import type { ResolvedConfig, ResolvedStorybook } from '../config/resolve-config.js';
|
|
5
|
-
import { type
|
|
5
|
+
import { type StoryOptions } from '../config/story-options.js';
|
|
6
6
|
import { type PageErrorPolicy } from '../page-errors/page-error-policy.js';
|
|
7
7
|
import { type RealRequestPolicy } from '../real-network-requests/real-request-policy.js';
|
|
8
|
-
import { type Story } from '../storybook/read-stories.js';
|
|
8
|
+
import { type Story, type StoryGlobals } from '../storybook/read-stories.js';
|
|
9
9
|
/**
|
|
10
10
|
* A Storybook as planning needs it: its selected stories, and every story its `index.json` lists.
|
|
11
11
|
*/
|
|
@@ -81,9 +81,10 @@ export interface SnapshotToCapture {
|
|
|
81
81
|
*/
|
|
82
82
|
viewport: Required<Viewport>;
|
|
83
83
|
/**
|
|
84
|
-
* The globals the snapshot's story URL sets, in order:
|
|
84
|
+
* The globals the snapshot's story URL sets, in order: the ones every story URL of its Storybook sets, then its
|
|
85
|
+
* mode's, none of the latter for the default capture. A mode's global replaces one of the former with its key.
|
|
85
86
|
*/
|
|
86
|
-
globals:
|
|
87
|
+
globals: StoryGlobals;
|
|
87
88
|
}
|
|
88
89
|
/**
|
|
89
90
|
* The one snapshot of a story, selected or not, whose stories file didn't load: broken, with no mode, since its options
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plan-snapshots.d.ts","sourceRoot":"","sources":["../../src/commands/plan-snapshots.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,WAAW,EAAmB,MAAM,+BAA+B,CAAA;AACjF,OAAO,KAAK,EAAE,cAAc,EAAoB,oBAAoB,EA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