@nx/storybook 24.0.0-rc.1 → 24.0.1
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/src/migrations/update-23-0-0/migrate-create-nodes-v2-to-create-nodes.js +2 -1
- package/dist/src/migrations/update-24-0-1/adapt-highlight-usage.md +107 -0
- package/dist/src/migrations/update-24-0-1/add-highlight-ids.d.ts +10 -0
- package/dist/src/migrations/update-24-0-1/add-highlight-ids.js +193 -0
- package/dist/src/migrations/update-24-0-1/add-highlight-ids.md +53 -0
- package/dist/src/utils/versions.d.ts +1 -1
- package/dist/src/utils/versions.js +4 -4
- package/migrations.json +414 -0
- package/package.json +7 -7
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.default = migrateCreateNodesV2ToCreateNodes;
|
|
4
4
|
exports.rewriteCreateNodesV2Imports = rewriteCreateNodesV2Imports;
|
|
5
5
|
const devkit_1 = require("@nx/devkit");
|
|
6
|
+
const internal_1 = require("@nx/js/internal");
|
|
6
7
|
const TS_EXTENSIONS = ['.ts', '.tsx', '.cts', '.mts'];
|
|
7
8
|
const DEPRECATED_NAME = 'createNodesV2';
|
|
8
9
|
const CANONICAL_NAME = 'createNodes';
|
|
@@ -41,7 +42,7 @@ async function migrateCreateNodesV2ToCreateNodes(tree) {
|
|
|
41
42
|
* any `type` modifier, and any default import are left untouched.
|
|
42
43
|
*/
|
|
43
44
|
function rewriteCreateNodesV2Imports(source, specifiers) {
|
|
44
|
-
ts ??= (0,
|
|
45
|
+
ts ??= (0, internal_1.ensureTypescript)();
|
|
45
46
|
const sourceFile = ts.createSourceFile('tmp.ts', source, ts.ScriptTarget.Latest,
|
|
46
47
|
/* setParentNodes */ true, ts.ScriptKind.TSX);
|
|
47
48
|
const changes = [];
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# Storybook Highlight Migration Instructions for LLM
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
Storybook 9.1.21 and 10.6.2 changed the Highlight channel API:
|
|
6
|
+
|
|
7
|
+
- A `HIGHLIGHT` payload that uses `selectors` needs a string `id`. Storybook ignores it otherwise.
|
|
8
|
+
- Menu items no longer accept `clickEvent`. They take `clickable: true`, and a click emits `HIGHLIGHT_MENU_CLICK` with `(highlightId, itemId, details)`.
|
|
9
|
+
- `details.element` no longer has `outerHTML` or `attributes`. It keeps `tagName` and `localName`.
|
|
10
|
+
|
|
11
|
+
A deterministic pre-pass added an `id` to object literal payloads emitted through an emitter returned by `useChannel`. `impl.agentContext` in the step's `nx_migrate_prompt` block lists every file that uses `storybook/highlight` or `clickEvent`, including the files the pre-pass changed. When you apply these instructions by hand, the next steps the migration printed list the same files. Change only those files and the files Step 2 leads you to. Do not change Highlight code in `node_modules`, payloads that use `elements`, or Storybook and Nx configuration.
|
|
12
|
+
|
|
13
|
+
## Pre-Migration Checklist
|
|
14
|
+
|
|
15
|
+
Confirm both conditions before changing anything. If either fails, make no changes and stop.
|
|
16
|
+
|
|
17
|
+
1. `impl.agentContext` lists at least one file. If that field is absent, use the next steps the migration printed. If you have neither, search the workspace outside `node_modules` for `storybook/highlight` and `clickEvent`, and treat each matching file as listed.
|
|
18
|
+
2. The workspace is on `storybook` 9.1.21 or later in the 9.x line, or on 10.6.2 or later (`storybook` in `package.json`).
|
|
19
|
+
|
|
20
|
+
## Step 1: Verify the pre-pass
|
|
21
|
+
|
|
22
|
+
Open each file the pre-pass changed, listed in `impl.changes`. If that field is absent, search the workspace outside `node_modules` for `Math.random().toString(36).slice(2)`. The pre-pass gave each payload an id made of the file path and a random suffix, such as `` `apps/app/.storybook/preview.ts-${Math.random().toString(36).slice(2)}` ``. Every emit gets a new id, so each one adds its own highlight, as Storybook did before the upgrade. Do not re-apply these edits. Step 3 is the only reason to change a generated id.
|
|
23
|
+
|
|
24
|
+
## Step 2: Find the Highlight usage
|
|
25
|
+
|
|
26
|
+
In each listed file, find:
|
|
27
|
+
|
|
28
|
+
- Every `HIGHLIGHT` emit, through any emitter: a `useChannel` emitter, `channel.emit`, or a function that wraps an emit. The event is `HIGHLIGHT` from `storybook/highlight`, under any name or through a namespace import, or its string value `storybook/highlight/add`.
|
|
29
|
+
- Menu items in those payloads. Follow each `menu` value through variables, function calls, spreads and imports to the items it builds.
|
|
30
|
+
- Objects typed `HighlightOptions`, and code that uses `ClickEventDetails` or the `details` of a menu click.
|
|
31
|
+
|
|
32
|
+
A file that only uses `clickEvent` may have nothing to do with Highlight. Change its objects only after you follow them to the `menu` of a `HIGHLIGHT` payload.
|
|
33
|
+
|
|
34
|
+
When a listed file re-exports `HIGHLIGHT`, `HighlightOptions` or `ClickEventDetails`, or exports a function that emits `HIGHLIGHT`, search the workspace outside `node_modules` for the files that import it, and treat those files as listed.
|
|
35
|
+
|
|
36
|
+
## Step 3: Replace `clickEvent` in menu items
|
|
37
|
+
|
|
38
|
+
For each menu item that sets `clickEvent`, including through an assignment such as `item.clickEvent = '<event>'` or a spread:
|
|
39
|
+
|
|
40
|
+
1. Replace `clickEvent: '<event>'` with `clickable: true`. Replace a `clickEvent` assignment the same way.
|
|
41
|
+
2. Give the `HIGHLIGHT` payload that carries the menu a fixed, descriptive `id`, replacing a generated one. With a fixed id, a later emit replaces the earlier highlight. If the call emits several times between story renders and each highlight must stay visible, add a unique suffix after a fixed prefix and compare the prefix in the listener.
|
|
42
|
+
3. Search the workspace, outside `node_modules`, for the listener of `<event>`. It can live in a preview file, a story, or a manager or addon file. Move it to `HIGHLIGHT_MENU_CLICK`, imported from `storybook/highlight`. The old listener received `(itemId, details)`. The new one receives `(highlightId, itemId, details)` and must return early when `highlightId` is not the payload's id.
|
|
43
|
+
|
|
44
|
+
**Before:**
|
|
45
|
+
|
|
46
|
+
```ts
|
|
47
|
+
emit(HIGHLIGHT, {
|
|
48
|
+
id: `apps/app/.storybook/preview.ts-${Math.random().toString(36).slice(2)}`,
|
|
49
|
+
selectors: ['h2'],
|
|
50
|
+
menu: [
|
|
51
|
+
[
|
|
52
|
+
{
|
|
53
|
+
id: 'details',
|
|
54
|
+
title: 'Show details',
|
|
55
|
+
clickEvent: 'my-addon/show-details',
|
|
56
|
+
},
|
|
57
|
+
],
|
|
58
|
+
],
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
channel.on('my-addon/show-details', (itemId, details) => {
|
|
62
|
+
showDetails(itemId, details);
|
|
63
|
+
});
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
**After:**
|
|
67
|
+
|
|
68
|
+
```ts
|
|
69
|
+
import { HIGHLIGHT, HIGHLIGHT_MENU_CLICK } from 'storybook/highlight';
|
|
70
|
+
|
|
71
|
+
emit(HIGHLIGHT, {
|
|
72
|
+
id: 'my-addon/headings',
|
|
73
|
+
selectors: ['h2'],
|
|
74
|
+
menu: [[{ id: 'details', title: 'Show details', clickable: true }]],
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
channel.on(HIGHLIGHT_MENU_CLICK, (highlightId, itemId, details) => {
|
|
78
|
+
if (highlightId !== 'my-addon/headings') return;
|
|
79
|
+
showDetails(itemId, details);
|
|
80
|
+
});
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Step 4: Stop reading `outerHTML` and `attributes`
|
|
84
|
+
|
|
85
|
+
For each use of `ClickEventDetails` you found, and for each listener you moved in Step 3, replace reads of `details.element.outerHTML` and `details.element.attributes`. Use `details.element.tagName`, `details.element.localName` or `details.selectors`. If the code needs the element's markup or attributes and nothing else gives them, leave that code unchanged and report it to the user.
|
|
86
|
+
|
|
87
|
+
## Step 5: Fix objects typed `HighlightOptions`
|
|
88
|
+
|
|
89
|
+
`HighlightOptions.id` is now required. Give each object of that type without an `id` a unique string `id`. If one object is emitted several times between story renders and each highlight must stay visible, add a unique id where it is emitted instead, and type the object as `Omit<HighlightOptions, 'id'>`.
|
|
90
|
+
|
|
91
|
+
## Step 6: Give the remaining payloads an id
|
|
92
|
+
|
|
93
|
+
Make sure each `HIGHLIGHT` payload that uses `selectors` has a unique, non-empty string `id`:
|
|
94
|
+
|
|
95
|
+
- Without an `id`, add one made of the file path and a random suffix, like the pre-pass. Where `Math` is a local binding, build the id without it, for example with `globalThis.Math.random()` or a fixed string.
|
|
96
|
+
- When the `id` comes from a variable, an argument, a spread or a computed key, keep it, and add a fallback only where it can be missing or empty.
|
|
97
|
+
- When the payload has a type that doesn't allow `id`, such as a `satisfies` type, a parameter type or a type annotation, add `id` to that type.
|
|
98
|
+
|
|
99
|
+
## Post-Migration Validation
|
|
100
|
+
|
|
101
|
+
1. Run the `typecheck`, `lint` and `test` targets that exist for the projects owning the changed files, for example `npx nx run-many -t typecheck,lint,test -p <projects>`.
|
|
102
|
+
2. Fix failures caused by this migration and re-run until green.
|
|
103
|
+
3. Search the workspace, outside `node_modules`, for `clickEvent` and confirm no Highlight menu item still uses it.
|
|
104
|
+
|
|
105
|
+
## Nx-Specific Notes
|
|
106
|
+
|
|
107
|
+
Highlight code lives in Storybook preview and manager files (`.storybook/preview.*`, `.storybook/manager.*`), in story files, and in addon libraries inside the workspace. Each Storybook project has its own `.storybook` directory.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type Tree } from '@nx/devkit';
|
|
2
|
+
export default function addHighlightIds(tree: Tree): Promise<{
|
|
3
|
+
skipAgentic: boolean;
|
|
4
|
+
nextSteps?: undefined;
|
|
5
|
+
agentContext?: undefined;
|
|
6
|
+
} | {
|
|
7
|
+
skipAgentic?: undefined;
|
|
8
|
+
nextSteps: string[];
|
|
9
|
+
agentContext: string[];
|
|
10
|
+
}>;
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = addHighlightIds;
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const internal_1 = require("@nx/js/internal");
|
|
6
|
+
const HIGHLIGHT_MODULE = 'storybook/highlight';
|
|
7
|
+
const PREVIEW_API_MODULE = 'storybook/preview-api';
|
|
8
|
+
// The value of the `HIGHLIGHT` constant.
|
|
9
|
+
const HIGHLIGHT_EVENT = 'storybook/highlight/add';
|
|
10
|
+
const HIGHLIGHT_DOCS = 'https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#highlight-menu-items-emit-a-fixed-highlight_menu_click-event-with-a-mandatory-id';
|
|
11
|
+
const SOURCE_FILE_PATTERN = /\.[cm]?[jt]sx?$/;
|
|
12
|
+
// Story and docs formats whose scripts can use Highlight but aren't parsed here.
|
|
13
|
+
const UNPARSED_FILE_PATTERN = /\.(mdx|svelte|vue)$/;
|
|
14
|
+
const LEADING_NEWLINE = /[ \t]*(\r?\n[ \t]*)/y;
|
|
15
|
+
let ts;
|
|
16
|
+
async function addHighlightIds(tree) {
|
|
17
|
+
let rewritten = false;
|
|
18
|
+
const pending = [];
|
|
19
|
+
// Stories, decorators, preview files and addons can all use Highlight, so
|
|
20
|
+
// the whole workspace is scanned.
|
|
21
|
+
(0, devkit_1.visitNotIgnoredFiles)(tree, '.', (filePath) => {
|
|
22
|
+
const parsable = SOURCE_FILE_PATTERN.test(filePath);
|
|
23
|
+
if (!parsable && !UNPARSED_FILE_PATTERN.test(filePath)) {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
const content = tree.read(filePath, 'utf-8');
|
|
27
|
+
const usesHighlight = content.includes(HIGHLIGHT_MODULE);
|
|
28
|
+
if (!usesHighlight && !content.includes('clickEvent')) {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
if (parsable && usesHighlight) {
|
|
32
|
+
const migrated = addIds(filePath, content);
|
|
33
|
+
if (migrated !== content) {
|
|
34
|
+
tree.write(filePath, migrated);
|
|
35
|
+
rewritten = true;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
// Files are listed even after ids were added: other Highlight usage in
|
|
39
|
+
// them can take forms that static analysis can't rule out.
|
|
40
|
+
pending.push(usesHighlight
|
|
41
|
+
? `${filePath} uses "${HIGHLIGHT_MODULE}". Make sure each HIGHLIGHT payload with "selectors" has a unique string "id", that menu items use "clickable" instead of "clickEvent", and that code reading click details doesn't use "outerHTML" or "attributes". See ${HIGHLIGHT_DOCS}.`
|
|
42
|
+
: `${filePath} uses "clickEvent". If it defines Highlight menu items, set "clickable: true" on them and move the "clickEvent" listener to HIGHLIGHT_MENU_CLICK. See ${HIGHLIGHT_DOCS}.`);
|
|
43
|
+
});
|
|
44
|
+
if (rewritten) {
|
|
45
|
+
await (0, devkit_1.formatFiles)(tree);
|
|
46
|
+
}
|
|
47
|
+
if (pending.length === 0) {
|
|
48
|
+
return { skipAgentic: true };
|
|
49
|
+
}
|
|
50
|
+
return { nextSteps: pending, agentContext: pending };
|
|
51
|
+
}
|
|
52
|
+
// Adds an id only to an object literal passed straight to an emitter from
|
|
53
|
+
// `useChannel`, which Storybook types as `(eventName: string, ...args: any)`.
|
|
54
|
+
// Any other payload can have a type that rejects the new property.
|
|
55
|
+
function addIds(filePath, content) {
|
|
56
|
+
ts ??= (0, internal_1.ensureTypescript)();
|
|
57
|
+
const sourceFile = ts.createSourceFile(filePath, content, ts.ScriptTarget.Latest,
|
|
58
|
+
/* setParentNodes */ true);
|
|
59
|
+
if (sourceFile.parseDiagnostics?.length) {
|
|
60
|
+
return content;
|
|
61
|
+
}
|
|
62
|
+
const imports = readImports(sourceFile);
|
|
63
|
+
if (imports.useChannel.length === 0) {
|
|
64
|
+
return content;
|
|
65
|
+
}
|
|
66
|
+
const checker = createChecker(sourceFile);
|
|
67
|
+
const isHighlightBinding = createImportBindingCheck(checker, imports.highlight);
|
|
68
|
+
const isUseChannelBinding = createImportBindingCheck(checker, imports.useChannel);
|
|
69
|
+
const isHighlightEvent = (node) => ts.isStringLiteralLike(node)
|
|
70
|
+
? node.text === HIGHLIGHT_EVENT
|
|
71
|
+
: isHighlightBinding(node);
|
|
72
|
+
const isUseChannelEmitter = (callee) => {
|
|
73
|
+
const declaration = checker.getSymbolAtLocation(callee)?.valueDeclaration;
|
|
74
|
+
return (declaration !== undefined &&
|
|
75
|
+
ts.isVariableDeclaration(declaration) &&
|
|
76
|
+
!declaration.type &&
|
|
77
|
+
!ts.getJSDocType(declaration) &&
|
|
78
|
+
declaration.initializer !== undefined &&
|
|
79
|
+
ts.isCallExpression(declaration.initializer) &&
|
|
80
|
+
isUseChannelBinding(declaration.initializer.expression));
|
|
81
|
+
};
|
|
82
|
+
// A fixed id would make a repeated emit replace the earlier highlight.
|
|
83
|
+
const id = `\`${escapeTemplateText(filePath)}-\${Math.random().toString(36).slice(2)}\``;
|
|
84
|
+
const changes = [];
|
|
85
|
+
const visit = (node) => {
|
|
86
|
+
if (ts.isCallExpression(node)) {
|
|
87
|
+
const payload = getAddablePayload(node);
|
|
88
|
+
if (payload &&
|
|
89
|
+
isHighlightEvent(node.arguments[0]) &&
|
|
90
|
+
isUseChannelEmitter(node.expression) &&
|
|
91
|
+
!hasLocalMath(checker, payload)) {
|
|
92
|
+
changes.push(insertIdProperty(payload, id, sourceFile));
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
ts.forEachChild(node, visit);
|
|
96
|
+
};
|
|
97
|
+
visit(sourceFile);
|
|
98
|
+
return (0, devkit_1.applyChangesToString)(content, changes);
|
|
99
|
+
}
|
|
100
|
+
function readImports(sourceFile) {
|
|
101
|
+
const imports = { highlight: [], useChannel: [] };
|
|
102
|
+
for (const statement of sourceFile.statements) {
|
|
103
|
+
if (!ts.isImportDeclaration(statement) ||
|
|
104
|
+
!ts.isStringLiteral(statement.moduleSpecifier)) {
|
|
105
|
+
continue;
|
|
106
|
+
}
|
|
107
|
+
const bindings = statement.importClause?.namedBindings;
|
|
108
|
+
if (!bindings || !ts.isNamedImports(bindings)) {
|
|
109
|
+
continue;
|
|
110
|
+
}
|
|
111
|
+
const moduleName = statement.moduleSpecifier.text;
|
|
112
|
+
for (const element of bindings.elements) {
|
|
113
|
+
const imported = (element.propertyName ?? element.name).text;
|
|
114
|
+
if (moduleName === HIGHLIGHT_MODULE && imported === 'HIGHLIGHT') {
|
|
115
|
+
imports.highlight.push(element.name);
|
|
116
|
+
}
|
|
117
|
+
else if (moduleName === PREVIEW_API_MODULE &&
|
|
118
|
+
imported === 'useChannel') {
|
|
119
|
+
imports.useChannel.push(element.name);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
return imports;
|
|
124
|
+
}
|
|
125
|
+
// Returns the payload when it is an object literal with readable keys that
|
|
126
|
+
// sets neither `id` nor the legacy `elements`, which Storybook gives an id.
|
|
127
|
+
function getAddablePayload(call) {
|
|
128
|
+
const payload = call.arguments[1];
|
|
129
|
+
if (!payload || !ts.isObjectLiteralExpression(payload)) {
|
|
130
|
+
return undefined;
|
|
131
|
+
}
|
|
132
|
+
const addable = payload.properties.every((property) => {
|
|
133
|
+
if (ts.isSpreadAssignment(property)) {
|
|
134
|
+
return false;
|
|
135
|
+
}
|
|
136
|
+
const name = getPropertyName(property.name);
|
|
137
|
+
return name !== undefined && name !== 'id' && name !== 'elements';
|
|
138
|
+
});
|
|
139
|
+
return addable ? payload : undefined;
|
|
140
|
+
}
|
|
141
|
+
function getPropertyName(name) {
|
|
142
|
+
if (!ts.isComputedPropertyName(name)) {
|
|
143
|
+
return name.text;
|
|
144
|
+
}
|
|
145
|
+
return ts.isStringLiteralLike(name.expression)
|
|
146
|
+
? name.expression.text
|
|
147
|
+
: undefined;
|
|
148
|
+
}
|
|
149
|
+
// A local declaration can reuse an imported name, so names are compared by the
|
|
150
|
+
// symbol the checker binds them to.
|
|
151
|
+
function createImportBindingCheck(checker, bindings) {
|
|
152
|
+
const importSymbols = new Set(bindings.map((binding) => checker.getSymbolAtLocation(binding)));
|
|
153
|
+
return (node) => {
|
|
154
|
+
const symbol = checker.getSymbolAtLocation(node);
|
|
155
|
+
return symbol !== undefined && importSymbols.has(symbol);
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
function createChecker(sourceFile) {
|
|
159
|
+
const fileName = sourceFile.fileName;
|
|
160
|
+
return ts
|
|
161
|
+
.createProgram([fileName], { noLib: true, noResolve: true, allowJs: true, types: [] }, {
|
|
162
|
+
getSourceFile: (name) => (name === fileName ? sourceFile : undefined),
|
|
163
|
+
getDefaultLibFileName: () => 'lib.d.ts',
|
|
164
|
+
writeFile: () => { },
|
|
165
|
+
getCurrentDirectory: () => '',
|
|
166
|
+
getCanonicalFileName: (name) => name,
|
|
167
|
+
useCaseSensitiveFileNames: () => true,
|
|
168
|
+
getNewLine: () => '\n',
|
|
169
|
+
fileExists: (name) => name === fileName,
|
|
170
|
+
readFile: () => undefined,
|
|
171
|
+
})
|
|
172
|
+
.getTypeChecker();
|
|
173
|
+
}
|
|
174
|
+
// Without lib files the global `Math` has no symbol, so any match is a local
|
|
175
|
+
// binding. Imports, type-only ones included, are unresolved aliases.
|
|
176
|
+
function hasLocalMath(checker, node) {
|
|
177
|
+
return checker
|
|
178
|
+
.getSymbolsInScope(node, ts.SymbolFlags.Value | ts.SymbolFlags.Alias)
|
|
179
|
+
.some((symbol) => symbol.name === 'Math');
|
|
180
|
+
}
|
|
181
|
+
function insertIdProperty(literal, id, sourceFile) {
|
|
182
|
+
const content = sourceFile.text;
|
|
183
|
+
const index = literal.getStart(sourceFile) + 1;
|
|
184
|
+
LEADING_NEWLINE.lastIndex = index;
|
|
185
|
+
const newline = LEADING_NEWLINE.exec(content)?.[1];
|
|
186
|
+
const text = newline
|
|
187
|
+
? `${newline}id: ${id},`
|
|
188
|
+
: ` id: ${id},${/\s/.test(content[index]) ? '' : ' '}`;
|
|
189
|
+
return { type: devkit_1.ChangeType.Insert, index, text };
|
|
190
|
+
}
|
|
191
|
+
function escapeTemplateText(text) {
|
|
192
|
+
return text.replace(/[`\\]|\$\{/g, (match) => `\\${match}`);
|
|
193
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
#### Add ids to Storybook Highlight payloads
|
|
2
|
+
|
|
3
|
+
Storybook 9.1.21 and 10.6.2 ignore a `HIGHLIGHT` payload that uses `selectors` without a string `id`. Storybook logs a warning in the browser console and draws nothing. Earlier versions drew the highlight and added a new one for every emit.
|
|
4
|
+
|
|
5
|
+
This migration adds an `id` to the payloads it can change without breaking a type check. These are object literals without an `id`, emitted through an emitter returned by `useChannel` from `storybook/preview-api`, as in the Storybook docs. Storybook types that emitter's payload as `any`. The event can be `HIGHLIGHT` imported from `storybook/highlight` under any name, or its string value `storybook/highlight/add`.
|
|
6
|
+
|
|
7
|
+
The id is the file path followed by a random suffix, such as `` `apps/app/.storybook/preview.ts-${Math.random().toString(36).slice(2)}` ``. Every emit gets a new id, so each one adds its own highlight, as in earlier versions. Storybook builds the ids of legacy `elements` payloads the same way. To make a later emit replace the earlier highlight, change the id to a fixed string.
|
|
8
|
+
|
|
9
|
+
The migration then lists every file that uses `storybook/highlight` or `clickEvent`, including the files it changed. In agentic runs, an AI agent finishes the Highlight changes in those files:
|
|
10
|
+
|
|
11
|
+
- It gives an `id` to the other payloads, such as payloads emitted through `addons.getChannel()`, through a typed emitter or from a variable.
|
|
12
|
+
- It replaces `clickEvent` in menu items with `clickable: true`. A click now emits `HIGHLIGHT_MENU_CLICK` with the highlight id, the menu item id and the click details, so the agent moves the `clickEvent` listener to that event.
|
|
13
|
+
- It replaces reads of `outerHTML` and `attributes` on the `element` of the click details, which no longer has them.
|
|
14
|
+
- It adds an `id` to objects typed `HighlightOptions`, which now requires one.
|
|
15
|
+
|
|
16
|
+
#### Sample code changes
|
|
17
|
+
|
|
18
|
+
##### Before
|
|
19
|
+
|
|
20
|
+
```ts title="apps/app/.storybook/preview.ts"
|
|
21
|
+
import { useChannel } from 'storybook/preview-api';
|
|
22
|
+
import { HIGHLIGHT } from 'storybook/highlight';
|
|
23
|
+
|
|
24
|
+
export const decorators = [
|
|
25
|
+
(storyFn) => {
|
|
26
|
+
const emit = useChannel({});
|
|
27
|
+
emit(HIGHLIGHT, { selectors: ['h2'] });
|
|
28
|
+
return storyFn();
|
|
29
|
+
},
|
|
30
|
+
];
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
##### After
|
|
34
|
+
|
|
35
|
+
```ts title="apps/app/.storybook/preview.ts"
|
|
36
|
+
import { useChannel } from 'storybook/preview-api';
|
|
37
|
+
import { HIGHLIGHT } from 'storybook/highlight';
|
|
38
|
+
|
|
39
|
+
export const decorators = [
|
|
40
|
+
(storyFn) => {
|
|
41
|
+
const emit = useChannel({});
|
|
42
|
+
emit(HIGHLIGHT, {
|
|
43
|
+
id: `apps/app/.storybook/preview.ts-${Math.random().toString(36).slice(2)}`,
|
|
44
|
+
selectors: ['h2'],
|
|
45
|
+
});
|
|
46
|
+
return storyFn();
|
|
47
|
+
},
|
|
48
|
+
];
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
#### Reference
|
|
52
|
+
|
|
53
|
+
- [Storybook migration guide for Highlight menu items and ids](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#highlight-menu-items-emit-a-fixed-highlight_menu_click-event-with-a-mandatory-id)
|
|
@@ -4,7 +4,7 @@ export declare const litVersion = "^2.6.1";
|
|
|
4
4
|
export declare const tsNodeVersion = "10.9.1";
|
|
5
5
|
export declare const tsLibVersion = "^2.3.0";
|
|
6
6
|
export declare const minSupportedStorybookVersion = "8.0.0";
|
|
7
|
-
export declare const storybookVersion = "^10.
|
|
7
|
+
export declare const storybookVersion = "^10.6.2";
|
|
8
8
|
export declare const reactVersion = "^18.2.0";
|
|
9
9
|
export declare const viteVersion = "^6.0.0";
|
|
10
10
|
export declare const viteTsconfigPathsVersion = "~4.3.2";
|
|
@@ -13,7 +13,7 @@ exports.tsNodeVersion = '10.9.1';
|
|
|
13
13
|
exports.tsLibVersion = '^2.3.0';
|
|
14
14
|
exports.minSupportedStorybookVersion = '8.0.0';
|
|
15
15
|
// Fresh-install default. Latest supported major.
|
|
16
|
-
exports.storybookVersion = '^10.
|
|
16
|
+
exports.storybookVersion = '^10.6.2';
|
|
17
17
|
exports.reactVersion = '^18.2.0';
|
|
18
18
|
exports.viteVersion = '^6.0.0';
|
|
19
19
|
exports.viteTsconfigPathsVersion = '~4.3.2';
|
|
@@ -24,9 +24,9 @@ const latestVersions = {
|
|
|
24
24
|
testRunnerVersion: exports.testRunnerVersion,
|
|
25
25
|
};
|
|
26
26
|
const versionMap = {
|
|
27
|
-
8: { storybookVersion: '^8.6.
|
|
28
|
-
9: { storybookVersion: '^9.
|
|
29
|
-
10: { storybookVersion: '^10.
|
|
27
|
+
8: { storybookVersion: '^8.6.19', testRunnerVersion: '^0.21.0' },
|
|
28
|
+
9: { storybookVersion: '^9.1.21', testRunnerVersion: '^0.23.0' },
|
|
29
|
+
10: { storybookVersion: '^10.6.2', testRunnerVersion: exports.testRunnerVersion },
|
|
30
30
|
};
|
|
31
31
|
function versions(tree) {
|
|
32
32
|
const installedStorybookMajor = storybookMajorVersion(tree);
|
package/migrations.json
CHANGED
|
@@ -46,6 +46,16 @@
|
|
|
46
46
|
"description": "Sets a `readyWhen` that waits for the Storybook port on `@storybook/angular:start-storybook` targets that get no `readyWhen` from their own configuration or `targetDefaults`, so tasks that depend on them with `waitFor: 'ready'` start once Storybook is listening. Also sets `continuous: true` on those targets when neither they nor `targetDefaults` set `continuous` and they don't set `smokeTest`.",
|
|
47
47
|
"implementation": "./dist/src/migrations/update-24-0-0/add-start-storybook-ready-when",
|
|
48
48
|
"documentation": "./dist/src/migrations/update-24-0-0/add-start-storybook-ready-when.md"
|
|
49
|
+
},
|
|
50
|
+
"update-24-0-1-add-highlight-ids": {
|
|
51
|
+
"version": "24.0.1-beta.0",
|
|
52
|
+
"requires": {
|
|
53
|
+
"storybook": ">=9.1.21 <10.0.0 || >=10.6.2"
|
|
54
|
+
},
|
|
55
|
+
"description": "Adds an `id` to Storybook `HIGHLIGHT` payloads emitted through `useChannel`, which Storybook 9.1.21 and 10.6.2 ignore without one. An AI prompt then finishes the Highlight changes in every file that uses `storybook/highlight` or `clickEvent`, including menu items that must replace `clickEvent` with `clickable` and a `HIGHLIGHT_MENU_CLICK` listener.",
|
|
56
|
+
"implementation": "./dist/src/migrations/update-24-0-1/add-highlight-ids",
|
|
57
|
+
"prompt": "./dist/src/migrations/update-24-0-1/adapt-highlight-usage.md",
|
|
58
|
+
"documentation": "./dist/src/migrations/update-24-0-1/add-highlight-ids.md"
|
|
49
59
|
}
|
|
50
60
|
},
|
|
51
61
|
"packageJsonUpdates": {
|
|
@@ -461,6 +471,410 @@
|
|
|
461
471
|
"alwaysAddToPackageJson": false
|
|
462
472
|
}
|
|
463
473
|
}
|
|
474
|
+
},
|
|
475
|
+
"24.0.1-storybook-8": {
|
|
476
|
+
"version": "24.0.1-beta.0",
|
|
477
|
+
"requires": {
|
|
478
|
+
"storybook": "^8.0.0"
|
|
479
|
+
},
|
|
480
|
+
"packages": {
|
|
481
|
+
"@storybook/angular": {
|
|
482
|
+
"version": "^8.6.19",
|
|
483
|
+
"alwaysAddToPackageJson": false
|
|
484
|
+
},
|
|
485
|
+
"@storybook/react": {
|
|
486
|
+
"version": "^8.6.19",
|
|
487
|
+
"alwaysAddToPackageJson": false
|
|
488
|
+
},
|
|
489
|
+
"storybook": {
|
|
490
|
+
"version": "^8.6.19",
|
|
491
|
+
"alwaysAddToPackageJson": true
|
|
492
|
+
},
|
|
493
|
+
"@storybook/addon-onboarding": {
|
|
494
|
+
"version": "^8.6.19",
|
|
495
|
+
"alwaysAddToPackageJson": false
|
|
496
|
+
},
|
|
497
|
+
"@storybook/addon-themes": {
|
|
498
|
+
"version": "^8.6.19",
|
|
499
|
+
"alwaysAddToPackageJson": false
|
|
500
|
+
},
|
|
501
|
+
"@storybook/builder-webpack5": {
|
|
502
|
+
"version": "^8.6.19",
|
|
503
|
+
"alwaysAddToPackageJson": false
|
|
504
|
+
},
|
|
505
|
+
"@storybook/core-webpack": {
|
|
506
|
+
"version": "^8.6.19",
|
|
507
|
+
"alwaysAddToPackageJson": false
|
|
508
|
+
},
|
|
509
|
+
"@storybook/html": {
|
|
510
|
+
"version": "^8.6.19",
|
|
511
|
+
"alwaysAddToPackageJson": false
|
|
512
|
+
},
|
|
513
|
+
"@storybook/html-vite": {
|
|
514
|
+
"version": "^8.6.19",
|
|
515
|
+
"alwaysAddToPackageJson": false
|
|
516
|
+
},
|
|
517
|
+
"@storybook/nextjs": {
|
|
518
|
+
"version": "^8.6.19",
|
|
519
|
+
"alwaysAddToPackageJson": false
|
|
520
|
+
},
|
|
521
|
+
"@storybook/preact": {
|
|
522
|
+
"version": "^8.6.19",
|
|
523
|
+
"alwaysAddToPackageJson": false
|
|
524
|
+
},
|
|
525
|
+
"@storybook/preact-vite": {
|
|
526
|
+
"version": "^8.6.19",
|
|
527
|
+
"alwaysAddToPackageJson": false
|
|
528
|
+
},
|
|
529
|
+
"@storybook/react-vite": {
|
|
530
|
+
"version": "^8.6.19",
|
|
531
|
+
"alwaysAddToPackageJson": false
|
|
532
|
+
},
|
|
533
|
+
"@storybook/react-webpack5": {
|
|
534
|
+
"version": "^8.6.19",
|
|
535
|
+
"alwaysAddToPackageJson": false
|
|
536
|
+
},
|
|
537
|
+
"@storybook/server": {
|
|
538
|
+
"version": "^8.6.19",
|
|
539
|
+
"alwaysAddToPackageJson": false
|
|
540
|
+
},
|
|
541
|
+
"@storybook/server-webpack5": {
|
|
542
|
+
"version": "^8.6.19",
|
|
543
|
+
"alwaysAddToPackageJson": false
|
|
544
|
+
},
|
|
545
|
+
"@storybook/svelte": {
|
|
546
|
+
"version": "^8.6.19",
|
|
547
|
+
"alwaysAddToPackageJson": false
|
|
548
|
+
},
|
|
549
|
+
"@storybook/svelte-vite": {
|
|
550
|
+
"version": "^8.6.19",
|
|
551
|
+
"alwaysAddToPackageJson": false
|
|
552
|
+
},
|
|
553
|
+
"@storybook/sveltekit": {
|
|
554
|
+
"version": "^8.6.19",
|
|
555
|
+
"alwaysAddToPackageJson": false
|
|
556
|
+
},
|
|
557
|
+
"@storybook/vue3": {
|
|
558
|
+
"version": "^8.6.19",
|
|
559
|
+
"alwaysAddToPackageJson": false
|
|
560
|
+
},
|
|
561
|
+
"@storybook/vue3-vite": {
|
|
562
|
+
"version": "^8.6.19",
|
|
563
|
+
"alwaysAddToPackageJson": false
|
|
564
|
+
},
|
|
565
|
+
"@storybook/web-components": {
|
|
566
|
+
"version": "^8.6.19",
|
|
567
|
+
"alwaysAddToPackageJson": false
|
|
568
|
+
},
|
|
569
|
+
"@storybook/web-components-vite": {
|
|
570
|
+
"version": "^8.6.19",
|
|
571
|
+
"alwaysAddToPackageJson": false
|
|
572
|
+
},
|
|
573
|
+
"@storybook/addon-essentials": {
|
|
574
|
+
"version": "^8.6.19",
|
|
575
|
+
"alwaysAddToPackageJson": false
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
},
|
|
579
|
+
"24.0.1-storybook-9": {
|
|
580
|
+
"version": "24.0.1-beta.0",
|
|
581
|
+
"requires": {
|
|
582
|
+
"storybook": "^9.0.0"
|
|
583
|
+
},
|
|
584
|
+
"packages": {
|
|
585
|
+
"@storybook/angular": {
|
|
586
|
+
"version": "^9.1.21",
|
|
587
|
+
"alwaysAddToPackageJson": false
|
|
588
|
+
},
|
|
589
|
+
"@storybook/react": {
|
|
590
|
+
"version": "^9.1.21",
|
|
591
|
+
"alwaysAddToPackageJson": false
|
|
592
|
+
},
|
|
593
|
+
"storybook": {
|
|
594
|
+
"version": "^9.1.21",
|
|
595
|
+
"alwaysAddToPackageJson": true
|
|
596
|
+
},
|
|
597
|
+
"@storybook/addon-onboarding": {
|
|
598
|
+
"version": "^9.1.21",
|
|
599
|
+
"alwaysAddToPackageJson": false
|
|
600
|
+
},
|
|
601
|
+
"@storybook/addon-themes": {
|
|
602
|
+
"version": "^9.1.21",
|
|
603
|
+
"alwaysAddToPackageJson": false
|
|
604
|
+
},
|
|
605
|
+
"@storybook/builder-webpack5": {
|
|
606
|
+
"version": "^9.1.21",
|
|
607
|
+
"alwaysAddToPackageJson": false
|
|
608
|
+
},
|
|
609
|
+
"@storybook/core-webpack": {
|
|
610
|
+
"version": "^9.1.21",
|
|
611
|
+
"alwaysAddToPackageJson": false
|
|
612
|
+
},
|
|
613
|
+
"@storybook/html": {
|
|
614
|
+
"version": "^9.1.21",
|
|
615
|
+
"alwaysAddToPackageJson": false
|
|
616
|
+
},
|
|
617
|
+
"@storybook/html-vite": {
|
|
618
|
+
"version": "^9.1.21",
|
|
619
|
+
"alwaysAddToPackageJson": false
|
|
620
|
+
},
|
|
621
|
+
"@storybook/nextjs": {
|
|
622
|
+
"version": "^9.1.21",
|
|
623
|
+
"alwaysAddToPackageJson": false
|
|
624
|
+
},
|
|
625
|
+
"@storybook/preact": {
|
|
626
|
+
"version": "^9.1.21",
|
|
627
|
+
"alwaysAddToPackageJson": false
|
|
628
|
+
},
|
|
629
|
+
"@storybook/preact-vite": {
|
|
630
|
+
"version": "^9.1.21",
|
|
631
|
+
"alwaysAddToPackageJson": false
|
|
632
|
+
},
|
|
633
|
+
"@storybook/react-vite": {
|
|
634
|
+
"version": "^9.1.21",
|
|
635
|
+
"alwaysAddToPackageJson": false
|
|
636
|
+
},
|
|
637
|
+
"@storybook/react-webpack5": {
|
|
638
|
+
"version": "^9.1.21",
|
|
639
|
+
"alwaysAddToPackageJson": false
|
|
640
|
+
},
|
|
641
|
+
"@storybook/server": {
|
|
642
|
+
"version": "^9.1.21",
|
|
643
|
+
"alwaysAddToPackageJson": false
|
|
644
|
+
},
|
|
645
|
+
"@storybook/server-webpack5": {
|
|
646
|
+
"version": "^9.1.21",
|
|
647
|
+
"alwaysAddToPackageJson": false
|
|
648
|
+
},
|
|
649
|
+
"@storybook/svelte": {
|
|
650
|
+
"version": "^9.1.21",
|
|
651
|
+
"alwaysAddToPackageJson": false
|
|
652
|
+
},
|
|
653
|
+
"@storybook/svelte-vite": {
|
|
654
|
+
"version": "^9.1.21",
|
|
655
|
+
"alwaysAddToPackageJson": false
|
|
656
|
+
},
|
|
657
|
+
"@storybook/sveltekit": {
|
|
658
|
+
"version": "^9.1.21",
|
|
659
|
+
"alwaysAddToPackageJson": false
|
|
660
|
+
},
|
|
661
|
+
"@storybook/vue3": {
|
|
662
|
+
"version": "^9.1.21",
|
|
663
|
+
"alwaysAddToPackageJson": false
|
|
664
|
+
},
|
|
665
|
+
"@storybook/vue3-vite": {
|
|
666
|
+
"version": "^9.1.21",
|
|
667
|
+
"alwaysAddToPackageJson": false
|
|
668
|
+
},
|
|
669
|
+
"@storybook/web-components": {
|
|
670
|
+
"version": "^9.1.21",
|
|
671
|
+
"alwaysAddToPackageJson": false
|
|
672
|
+
},
|
|
673
|
+
"@storybook/web-components-vite": {
|
|
674
|
+
"version": "^9.1.21",
|
|
675
|
+
"alwaysAddToPackageJson": false
|
|
676
|
+
},
|
|
677
|
+
"@storybook/addon-a11y": {
|
|
678
|
+
"version": "^9.1.21",
|
|
679
|
+
"alwaysAddToPackageJson": false
|
|
680
|
+
},
|
|
681
|
+
"@storybook/addon-vitest": {
|
|
682
|
+
"version": "^9.1.21",
|
|
683
|
+
"alwaysAddToPackageJson": false
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
},
|
|
687
|
+
"24.0.1-storybook-10": {
|
|
688
|
+
"version": "24.0.1-beta.0",
|
|
689
|
+
"requires": {
|
|
690
|
+
"storybook": "^10.0.0"
|
|
691
|
+
},
|
|
692
|
+
"packages": {
|
|
693
|
+
"@storybook/angular": {
|
|
694
|
+
"version": "^10.6.2",
|
|
695
|
+
"alwaysAddToPackageJson": false
|
|
696
|
+
},
|
|
697
|
+
"@storybook/react": {
|
|
698
|
+
"version": "^10.6.2",
|
|
699
|
+
"alwaysAddToPackageJson": false
|
|
700
|
+
},
|
|
701
|
+
"storybook": {
|
|
702
|
+
"version": "^10.6.2",
|
|
703
|
+
"alwaysAddToPackageJson": true
|
|
704
|
+
},
|
|
705
|
+
"@storybook/addon-onboarding": {
|
|
706
|
+
"version": "^10.6.2",
|
|
707
|
+
"alwaysAddToPackageJson": false
|
|
708
|
+
},
|
|
709
|
+
"@storybook/addon-themes": {
|
|
710
|
+
"version": "^10.6.2",
|
|
711
|
+
"alwaysAddToPackageJson": false
|
|
712
|
+
},
|
|
713
|
+
"@storybook/builder-webpack5": {
|
|
714
|
+
"version": "^10.6.2",
|
|
715
|
+
"alwaysAddToPackageJson": false
|
|
716
|
+
},
|
|
717
|
+
"@storybook/core-webpack": {
|
|
718
|
+
"version": "^10.6.2",
|
|
719
|
+
"alwaysAddToPackageJson": false
|
|
720
|
+
},
|
|
721
|
+
"@storybook/html": {
|
|
722
|
+
"version": "^10.6.2",
|
|
723
|
+
"alwaysAddToPackageJson": false
|
|
724
|
+
},
|
|
725
|
+
"@storybook/html-vite": {
|
|
726
|
+
"version": "^10.6.2",
|
|
727
|
+
"alwaysAddToPackageJson": false
|
|
728
|
+
},
|
|
729
|
+
"@storybook/nextjs": {
|
|
730
|
+
"version": "^10.6.2",
|
|
731
|
+
"alwaysAddToPackageJson": false
|
|
732
|
+
},
|
|
733
|
+
"@storybook/preact": {
|
|
734
|
+
"version": "^10.6.2",
|
|
735
|
+
"alwaysAddToPackageJson": false
|
|
736
|
+
},
|
|
737
|
+
"@storybook/preact-vite": {
|
|
738
|
+
"version": "^10.6.2",
|
|
739
|
+
"alwaysAddToPackageJson": false
|
|
740
|
+
},
|
|
741
|
+
"@storybook/react-vite": {
|
|
742
|
+
"version": "^10.6.2",
|
|
743
|
+
"alwaysAddToPackageJson": false
|
|
744
|
+
},
|
|
745
|
+
"@storybook/react-webpack5": {
|
|
746
|
+
"version": "^10.6.2",
|
|
747
|
+
"alwaysAddToPackageJson": false
|
|
748
|
+
},
|
|
749
|
+
"@storybook/server": {
|
|
750
|
+
"version": "^10.6.2",
|
|
751
|
+
"alwaysAddToPackageJson": false
|
|
752
|
+
},
|
|
753
|
+
"@storybook/server-webpack5": {
|
|
754
|
+
"version": "^10.6.2",
|
|
755
|
+
"alwaysAddToPackageJson": false
|
|
756
|
+
},
|
|
757
|
+
"@storybook/svelte": {
|
|
758
|
+
"version": "^10.6.2",
|
|
759
|
+
"alwaysAddToPackageJson": false
|
|
760
|
+
},
|
|
761
|
+
"@storybook/svelte-vite": {
|
|
762
|
+
"version": "^10.6.2",
|
|
763
|
+
"alwaysAddToPackageJson": false
|
|
764
|
+
},
|
|
765
|
+
"@storybook/sveltekit": {
|
|
766
|
+
"version": "^10.6.2",
|
|
767
|
+
"alwaysAddToPackageJson": false
|
|
768
|
+
},
|
|
769
|
+
"@storybook/vue3": {
|
|
770
|
+
"version": "^10.6.2",
|
|
771
|
+
"alwaysAddToPackageJson": false
|
|
772
|
+
},
|
|
773
|
+
"@storybook/vue3-vite": {
|
|
774
|
+
"version": "^10.6.2",
|
|
775
|
+
"alwaysAddToPackageJson": false
|
|
776
|
+
},
|
|
777
|
+
"@storybook/web-components": {
|
|
778
|
+
"version": "^10.6.2",
|
|
779
|
+
"alwaysAddToPackageJson": false
|
|
780
|
+
},
|
|
781
|
+
"@storybook/web-components-vite": {
|
|
782
|
+
"version": "^10.6.2",
|
|
783
|
+
"alwaysAddToPackageJson": false
|
|
784
|
+
},
|
|
785
|
+
"@storybook/addon-a11y": {
|
|
786
|
+
"version": "^10.6.2",
|
|
787
|
+
"alwaysAddToPackageJson": false
|
|
788
|
+
},
|
|
789
|
+
"@storybook/addon-vitest": {
|
|
790
|
+
"version": "^10.6.2",
|
|
791
|
+
"alwaysAddToPackageJson": false
|
|
792
|
+
}
|
|
793
|
+
}
|
|
794
|
+
},
|
|
795
|
+
"24.0.1-storybook-core-8": {
|
|
796
|
+
"version": "24.0.1-beta.0",
|
|
797
|
+
"requires": {
|
|
798
|
+
"@storybook/core": ">=8.0.0 <8.6.19"
|
|
799
|
+
},
|
|
800
|
+
"packages": {
|
|
801
|
+
"@storybook/core": {
|
|
802
|
+
"version": "^8.6.19",
|
|
803
|
+
"alwaysAddToPackageJson": false
|
|
804
|
+
}
|
|
805
|
+
}
|
|
806
|
+
},
|
|
807
|
+
"24.0.1-storybook-core-server-8": {
|
|
808
|
+
"version": "24.0.1-beta.0",
|
|
809
|
+
"requires": {
|
|
810
|
+
"@storybook/core-server": ">=8.0.0 <8.6.19"
|
|
811
|
+
},
|
|
812
|
+
"packages": {
|
|
813
|
+
"@storybook/core-server": {
|
|
814
|
+
"version": "^8.6.19",
|
|
815
|
+
"alwaysAddToPackageJson": false
|
|
816
|
+
}
|
|
817
|
+
}
|
|
818
|
+
},
|
|
819
|
+
"24.0.1-storybook-experimental-addon-test-8": {
|
|
820
|
+
"version": "24.0.1-beta.0",
|
|
821
|
+
"requires": {
|
|
822
|
+
"@storybook/experimental-addon-test": ">=8.0.0 <8.6.19"
|
|
823
|
+
},
|
|
824
|
+
"packages": {
|
|
825
|
+
"@storybook/experimental-addon-test": {
|
|
826
|
+
"version": "^8.6.19",
|
|
827
|
+
"alwaysAddToPackageJson": false
|
|
828
|
+
}
|
|
829
|
+
}
|
|
830
|
+
},
|
|
831
|
+
"24.0.1-storybook-addon-mcp-10": {
|
|
832
|
+
"version": "24.0.1-beta.0",
|
|
833
|
+
"requires": {
|
|
834
|
+
"@storybook/addon-mcp": ">=10.6.0 <10.6.2"
|
|
835
|
+
},
|
|
836
|
+
"packages": {
|
|
837
|
+
"@storybook/addon-mcp": {
|
|
838
|
+
"version": "^10.6.2",
|
|
839
|
+
"alwaysAddToPackageJson": false
|
|
840
|
+
}
|
|
841
|
+
}
|
|
842
|
+
},
|
|
843
|
+
"24.0.1-chromatic-storybook-3": {
|
|
844
|
+
"version": "24.0.1-beta.0",
|
|
845
|
+
"requires": {
|
|
846
|
+
"@chromatic-com/storybook": ">=3.0.0 <3.2.8"
|
|
847
|
+
},
|
|
848
|
+
"packages": {
|
|
849
|
+
"@chromatic-com/storybook": {
|
|
850
|
+
"version": "^3.2.8",
|
|
851
|
+
"alwaysAddToPackageJson": false
|
|
852
|
+
}
|
|
853
|
+
}
|
|
854
|
+
},
|
|
855
|
+
"24.0.1-chromatic-storybook-4": {
|
|
856
|
+
"version": "24.0.1-beta.0",
|
|
857
|
+
"requires": {
|
|
858
|
+
"@chromatic-com/storybook": ">=4.0.0 <4.1.4"
|
|
859
|
+
},
|
|
860
|
+
"packages": {
|
|
861
|
+
"@chromatic-com/storybook": {
|
|
862
|
+
"version": "^4.1.4",
|
|
863
|
+
"alwaysAddToPackageJson": false
|
|
864
|
+
}
|
|
865
|
+
}
|
|
866
|
+
},
|
|
867
|
+
"24.0.1-chromatic-storybook-5": {
|
|
868
|
+
"version": "24.0.1-beta.0",
|
|
869
|
+
"requires": {
|
|
870
|
+
"@chromatic-com/storybook": ">=5.0.0 <5.5.1"
|
|
871
|
+
},
|
|
872
|
+
"packages": {
|
|
873
|
+
"@chromatic-com/storybook": {
|
|
874
|
+
"version": "^5.5.1",
|
|
875
|
+
"alwaysAddToPackageJson": false
|
|
876
|
+
}
|
|
877
|
+
}
|
|
464
878
|
}
|
|
465
879
|
}
|
|
466
880
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/storybook",
|
|
3
|
-
"version": "24.0.
|
|
3
|
+
"version": "24.0.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"files": [
|
|
@@ -97,20 +97,20 @@
|
|
|
97
97
|
}
|
|
98
98
|
},
|
|
99
99
|
"dependencies": {
|
|
100
|
-
"@nx/devkit": "24.0.
|
|
100
|
+
"@nx/devkit": "24.0.1",
|
|
101
101
|
"@phenomnomnominal/tsquery": "~6.2.0",
|
|
102
102
|
"semver": "^7.6.3",
|
|
103
103
|
"tslib": "^2.3.0",
|
|
104
|
-
"@nx/cypress": "24.0.
|
|
105
|
-
"@nx/js": "24.0.
|
|
106
|
-
"@nx/eslint": "24.0.
|
|
104
|
+
"@nx/cypress": "24.0.1",
|
|
105
|
+
"@nx/js": "24.0.1",
|
|
106
|
+
"@nx/eslint": "24.0.1"
|
|
107
107
|
},
|
|
108
108
|
"devDependencies": {
|
|
109
|
-
"nx": "24.0.
|
|
109
|
+
"nx": "24.0.1",
|
|
110
110
|
"storybook": "9.0.6"
|
|
111
111
|
},
|
|
112
112
|
"peerDependencies": {
|
|
113
|
-
"@nx/web": "24.0.
|
|
113
|
+
"@nx/web": "24.0.1",
|
|
114
114
|
"storybook": ">=8.0.0 <11.0.0"
|
|
115
115
|
},
|
|
116
116
|
"peerDependenciesMeta": {
|