Merge branch 'next' into norbert/upgrades-2025-02-11

This commit is contained in:
Norbert de Langen 2025-02-18 10:11:30 +01:00 committed by GitHub
commit 23c548bd32
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
101 changed files with 375 additions and 205 deletions

View File

@ -1,3 +1,10 @@
## 8.6.0-beta.1
- Builder-Vite: Fix defaulting to allowing all hosts - [#30523](https://github.com/storybookjs/storybook/pull/30523), thanks @JReinhold!
- React: Fix incorrect import in preview.ts - [#30542](https://github.com/storybookjs/storybook/pull/30542), thanks @mrginglymus!
- Tags: Add story/meta usage telemetry - [#30555](https://github.com/storybookjs/storybook/pull/30555), thanks @shilman!
- UI: Fix tags sort for browser back-compat - [#30547](https://github.com/storybookjs/storybook/pull/30547), thanks @shilman!
## 8.6.0-beta.0
- Addon A11y: Introduce parameters.a11y.test - [#30516](https://github.com/storybookjs/storybook/pull/30516), thanks @valentinpalkovic!

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-a11y",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "Test component compliance with web accessibility standards",
"keywords": [
"a11y",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-actions",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "Get UI feedback when an action is performed on an interactive element",
"keywords": [
"storybook",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-backgrounds",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "Switch backgrounds to view components in different settings",
"keywords": [
"addon",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-controls",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "Interact with component inputs dynamically in the Storybook UI",
"keywords": [
"addon",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-docs",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "Document component usage and properties in Markdown",
"keywords": [
"addon",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-essentials",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "Curated addons to bring out the best of Storybook",
"keywords": [
"addon",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-mdx-gfm",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "GitHub Flavored Markdown in Storybook",
"keywords": [
"addon",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-highlight",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "Highlight DOM nodes within your stories",
"keywords": [
"storybook-addons",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-interactions",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "Automate, test and debug user interactions",
"keywords": [
"storybook-addons",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-jest",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "React storybook addon that show component jest report",
"keywords": [
"addon",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-links",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "Link stories together to build demos and prototypes with your UI components",
"keywords": [
"storybook-addons",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-measure",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "Inspect layouts by visualizing the box model",
"keywords": [
"storybook-addons",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-onboarding",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "Storybook Addon Onboarding - Introduces a new onboarding experience",
"keywords": [
"storybook-addons",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-outline",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "Outline all elements with CSS to help with layout placement and alignment",
"keywords": [
"storybook-addons",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-storysource",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "View a storys source code to see how it works and paste into your app",
"keywords": [
"addon",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/experimental-addon-test",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "Integrate Vitest with Storybook",
"keywords": [
"storybook-addons",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-themes",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "Switch between multiple themes for you components in Storybook",
"keywords": [
"css",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-toolbars",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "Create your own toolbar items that control story rendering",
"keywords": [
"addon",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-viewport",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "Build responsive components by adjusting Storybooks viewport size and orientation",
"keywords": [
"addon",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/builder-vite",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "A plugin to run and build Storybooks with Vite",
"homepage": "https://github.com/storybookjs/storybook/tree/next/code/builders/builder-vite/#readme",
"bugs": {

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/builder-webpack5",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "Storybook framework-agnostic API",
"keywords": [
"storybook"

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/core",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "Storybook framework-agnostic API",
"keywords": [
"storybook"

View File

@ -1,88 +1,88 @@
// auto generated file, do not edit
export default {
'@storybook/addon-a11y': '8.6.0-beta.0',
'@storybook/addon-actions': '8.6.0-beta.0',
'@storybook/addon-backgrounds': '8.6.0-beta.0',
'@storybook/addon-controls': '8.6.0-beta.0',
'@storybook/addon-docs': '8.6.0-beta.0',
'@storybook/addon-essentials': '8.6.0-beta.0',
'@storybook/addon-mdx-gfm': '8.6.0-beta.0',
'@storybook/addon-highlight': '8.6.0-beta.0',
'@storybook/addon-interactions': '8.6.0-beta.0',
'@storybook/addon-jest': '8.6.0-beta.0',
'@storybook/addon-links': '8.6.0-beta.0',
'@storybook/addon-measure': '8.6.0-beta.0',
'@storybook/addon-onboarding': '8.6.0-beta.0',
'@storybook/addon-outline': '8.6.0-beta.0',
'@storybook/addon-storysource': '8.6.0-beta.0',
'@storybook/experimental-addon-test': '8.6.0-beta.0',
'@storybook/addon-themes': '8.6.0-beta.0',
'@storybook/addon-toolbars': '8.6.0-beta.0',
'@storybook/addon-viewport': '8.6.0-beta.0',
'@storybook/builder-vite': '8.6.0-beta.0',
'@storybook/builder-webpack5': '8.6.0-beta.0',
'@storybook/core': '8.6.0-beta.0',
'@storybook/builder-manager': '8.6.0-beta.0',
'@storybook/channels': '8.6.0-beta.0',
'@storybook/client-logger': '8.6.0-beta.0',
'@storybook/components': '8.6.0-beta.0',
'@storybook/core-common': '8.6.0-beta.0',
'@storybook/core-events': '8.6.0-beta.0',
'@storybook/core-server': '8.6.0-beta.0',
'@storybook/csf-tools': '8.6.0-beta.0',
'@storybook/docs-tools': '8.6.0-beta.0',
'@storybook/manager': '8.6.0-beta.0',
'@storybook/manager-api': '8.6.0-beta.0',
'@storybook/node-logger': '8.6.0-beta.0',
'@storybook/preview': '8.6.0-beta.0',
'@storybook/preview-api': '8.6.0-beta.0',
'@storybook/router': '8.6.0-beta.0',
'@storybook/telemetry': '8.6.0-beta.0',
'@storybook/theming': '8.6.0-beta.0',
'@storybook/types': '8.6.0-beta.0',
'@storybook/angular': '8.6.0-beta.0',
'@storybook/ember': '8.6.0-beta.0',
'@storybook/experimental-nextjs-vite': '8.6.0-beta.0',
'@storybook/html-vite': '8.6.0-beta.0',
'@storybook/html-webpack5': '8.6.0-beta.0',
'@storybook/nextjs': '8.6.0-beta.0',
'@storybook/preact-vite': '8.6.0-beta.0',
'@storybook/preact-webpack5': '8.6.0-beta.0',
'@storybook/react-native-web-vite': '8.6.0-beta.0',
'@storybook/react-vite': '8.6.0-beta.0',
'@storybook/react-webpack5': '8.6.0-beta.0',
'@storybook/server-webpack5': '8.6.0-beta.0',
'@storybook/svelte-vite': '8.6.0-beta.0',
'@storybook/svelte-webpack5': '8.6.0-beta.0',
'@storybook/sveltekit': '8.6.0-beta.0',
'@storybook/vue3-vite': '8.6.0-beta.0',
'@storybook/vue3-webpack5': '8.6.0-beta.0',
'@storybook/web-components-vite': '8.6.0-beta.0',
'@storybook/web-components-webpack5': '8.6.0-beta.0',
'@storybook/blocks': '8.6.0-beta.0',
storybook: '8.6.0-beta.0',
sb: '8.6.0-beta.0',
'@storybook/cli': '8.6.0-beta.0',
'@storybook/codemod': '8.6.0-beta.0',
'@storybook/core-webpack': '8.6.0-beta.0',
'create-storybook': '8.6.0-beta.0',
'@storybook/csf-plugin': '8.6.0-beta.0',
'@storybook/instrumenter': '8.6.0-beta.0',
'@storybook/react-dom-shim': '8.6.0-beta.0',
'@storybook/source-loader': '8.6.0-beta.0',
'@storybook/test': '8.6.0-beta.0',
'@storybook/preset-create-react-app': '8.6.0-beta.0',
'@storybook/preset-html-webpack': '8.6.0-beta.0',
'@storybook/preset-preact-webpack': '8.6.0-beta.0',
'@storybook/preset-react-webpack': '8.6.0-beta.0',
'@storybook/preset-server-webpack': '8.6.0-beta.0',
'@storybook/preset-svelte-webpack': '8.6.0-beta.0',
'@storybook/preset-vue3-webpack': '8.6.0-beta.0',
'@storybook/html': '8.6.0-beta.0',
'@storybook/preact': '8.6.0-beta.0',
'@storybook/react': '8.6.0-beta.0',
'@storybook/server': '8.6.0-beta.0',
'@storybook/svelte': '8.6.0-beta.0',
'@storybook/vue3': '8.6.0-beta.0',
'@storybook/web-components': '8.6.0-beta.0',
'@storybook/addon-a11y': '8.6.0-beta.1',
'@storybook/addon-actions': '8.6.0-beta.1',
'@storybook/addon-backgrounds': '8.6.0-beta.1',
'@storybook/addon-controls': '8.6.0-beta.1',
'@storybook/addon-docs': '8.6.0-beta.1',
'@storybook/addon-essentials': '8.6.0-beta.1',
'@storybook/addon-mdx-gfm': '8.6.0-beta.1',
'@storybook/addon-highlight': '8.6.0-beta.1',
'@storybook/addon-interactions': '8.6.0-beta.1',
'@storybook/addon-jest': '8.6.0-beta.1',
'@storybook/addon-links': '8.6.0-beta.1',
'@storybook/addon-measure': '8.6.0-beta.1',
'@storybook/addon-onboarding': '8.6.0-beta.1',
'@storybook/addon-outline': '8.6.0-beta.1',
'@storybook/addon-storysource': '8.6.0-beta.1',
'@storybook/experimental-addon-test': '8.6.0-beta.1',
'@storybook/addon-themes': '8.6.0-beta.1',
'@storybook/addon-toolbars': '8.6.0-beta.1',
'@storybook/addon-viewport': '8.6.0-beta.1',
'@storybook/builder-vite': '8.6.0-beta.1',
'@storybook/builder-webpack5': '8.6.0-beta.1',
'@storybook/core': '8.6.0-beta.1',
'@storybook/builder-manager': '8.6.0-beta.1',
'@storybook/channels': '8.6.0-beta.1',
'@storybook/client-logger': '8.6.0-beta.1',
'@storybook/components': '8.6.0-beta.1',
'@storybook/core-common': '8.6.0-beta.1',
'@storybook/core-events': '8.6.0-beta.1',
'@storybook/core-server': '8.6.0-beta.1',
'@storybook/csf-tools': '8.6.0-beta.1',
'@storybook/docs-tools': '8.6.0-beta.1',
'@storybook/manager': '8.6.0-beta.1',
'@storybook/manager-api': '8.6.0-beta.1',
'@storybook/node-logger': '8.6.0-beta.1',
'@storybook/preview': '8.6.0-beta.1',
'@storybook/preview-api': '8.6.0-beta.1',
'@storybook/router': '8.6.0-beta.1',
'@storybook/telemetry': '8.6.0-beta.1',
'@storybook/theming': '8.6.0-beta.1',
'@storybook/types': '8.6.0-beta.1',
'@storybook/angular': '8.6.0-beta.1',
'@storybook/ember': '8.6.0-beta.1',
'@storybook/experimental-nextjs-vite': '8.6.0-beta.1',
'@storybook/html-vite': '8.6.0-beta.1',
'@storybook/html-webpack5': '8.6.0-beta.1',
'@storybook/nextjs': '8.6.0-beta.1',
'@storybook/preact-vite': '8.6.0-beta.1',
'@storybook/preact-webpack5': '8.6.0-beta.1',
'@storybook/react-native-web-vite': '8.6.0-beta.1',
'@storybook/react-vite': '8.6.0-beta.1',
'@storybook/react-webpack5': '8.6.0-beta.1',
'@storybook/server-webpack5': '8.6.0-beta.1',
'@storybook/svelte-vite': '8.6.0-beta.1',
'@storybook/svelte-webpack5': '8.6.0-beta.1',
'@storybook/sveltekit': '8.6.0-beta.1',
'@storybook/vue3-vite': '8.6.0-beta.1',
'@storybook/vue3-webpack5': '8.6.0-beta.1',
'@storybook/web-components-vite': '8.6.0-beta.1',
'@storybook/web-components-webpack5': '8.6.0-beta.1',
'@storybook/blocks': '8.6.0-beta.1',
storybook: '8.6.0-beta.1',
sb: '8.6.0-beta.1',
'@storybook/cli': '8.6.0-beta.1',
'@storybook/codemod': '8.6.0-beta.1',
'@storybook/core-webpack': '8.6.0-beta.1',
'create-storybook': '8.6.0-beta.1',
'@storybook/csf-plugin': '8.6.0-beta.1',
'@storybook/instrumenter': '8.6.0-beta.1',
'@storybook/react-dom-shim': '8.6.0-beta.1',
'@storybook/source-loader': '8.6.0-beta.1',
'@storybook/test': '8.6.0-beta.1',
'@storybook/preset-create-react-app': '8.6.0-beta.1',
'@storybook/preset-html-webpack': '8.6.0-beta.1',
'@storybook/preset-preact-webpack': '8.6.0-beta.1',
'@storybook/preset-react-webpack': '8.6.0-beta.1',
'@storybook/preset-server-webpack': '8.6.0-beta.1',
'@storybook/preset-svelte-webpack': '8.6.0-beta.1',
'@storybook/preset-vue3-webpack': '8.6.0-beta.1',
'@storybook/html': '8.6.0-beta.1',
'@storybook/preact': '8.6.0-beta.1',
'@storybook/react': '8.6.0-beta.1',
'@storybook/server': '8.6.0-beta.1',
'@storybook/svelte': '8.6.0-beta.1',
'@storybook/vue3': '8.6.0-beta.1',
'@storybook/web-components': '8.6.0-beta.1',
};

View File

@ -103,6 +103,7 @@ describe('StoryIndexGenerator', () => {
"play": 0,
"render": 0,
"storyFn": 0,
"tags": 1,
}
`);
});
@ -344,6 +345,19 @@ describe('StoryIndexGenerator', () => {
"title": "D",
"type": "story",
},
"example-button--story-one": {
"componentPath": undefined,
"id": "example-button--story-one",
"importPath": "./src/Button.stories.ts",
"name": "Story One",
"tags": [
"dev",
"test",
"foobar",
],
"title": "Example/Button",
"type": "story",
},
"first-nested-deeply-f--story-one": {
"componentPath": undefined,
"id": "first-nested-deeply-f--story-one",
@ -472,6 +486,7 @@ describe('StoryIndexGenerator', () => {
"play": 2,
"render": 1,
"storyFn": 1,
"tags": 5,
}
`);
});
@ -597,6 +612,19 @@ describe('StoryIndexGenerator', () => {
"title": "D",
"type": "story",
},
"example-button--story-one": {
"componentPath": undefined,
"id": "example-button--story-one",
"importPath": "./src/Button.stories.ts",
"name": "Story One",
"tags": [
"dev",
"test",
"foobar",
],
"title": "Example/Button",
"type": "story",
},
"first-nested-deeply-f--story-one": {
"componentPath": undefined,
"id": "first-nested-deeply-f--story-one",
@ -738,6 +766,7 @@ describe('StoryIndexGenerator', () => {
"play": 2,
"render": 1,
"storyFn": 1,
"tags": 5,
}
`);
});
@ -764,6 +793,8 @@ describe('StoryIndexGenerator', () => {
"a--story-one",
"b--docs",
"b--story-one",
"example-button--docs",
"example-button--story-one",
"d--docs",
"d--story-one",
"h--docs",
@ -806,6 +837,8 @@ describe('StoryIndexGenerator', () => {
"a--story-one",
"b--docs",
"b--story-one",
"example-button--docs",
"example-button--story-one",
"d--docs",
"d--story-one",
"h--docs",
@ -1794,6 +1827,7 @@ describe('StoryIndexGenerator', () => {
"second-nested-g--story-one",
"componentreference--docs",
"notitle--docs",
"example-button--story-one",
"h--story-one",
"componentpath-extension--story-one",
"componentpath-noextension--story-one",
@ -1822,7 +1856,7 @@ describe('StoryIndexGenerator', () => {
const generator = new StoryIndexGenerator([specifier], options);
await generator.initialize();
await generator.getIndex();
expect(readCsfMock).toHaveBeenCalledTimes(11);
expect(readCsfMock).toHaveBeenCalledTimes(12);
readCsfMock.mockClear();
await generator.getIndex();
@ -1880,7 +1914,7 @@ describe('StoryIndexGenerator', () => {
const generator = new StoryIndexGenerator([specifier], options);
await generator.initialize();
await generator.getIndex();
expect(readCsfMock).toHaveBeenCalledTimes(11);
expect(readCsfMock).toHaveBeenCalledTimes(12);
generator.invalidate(specifier, './src/B.stories.ts', false);
@ -1965,7 +1999,7 @@ describe('StoryIndexGenerator', () => {
const generator = new StoryIndexGenerator([specifier], options);
await generator.initialize();
await generator.getIndex();
expect(readCsfMock).toHaveBeenCalledTimes(11);
expect(readCsfMock).toHaveBeenCalledTimes(12);
generator.invalidate(specifier, './src/B.stories.ts', true);
@ -2004,7 +2038,7 @@ describe('StoryIndexGenerator', () => {
const generator = new StoryIndexGenerator([specifier], options);
await generator.initialize();
await generator.getIndex();
expect(readCsfMock).toHaveBeenCalledTimes(11);
expect(readCsfMock).toHaveBeenCalledTimes(12);
generator.invalidate(specifier, './src/B.stories.ts', true);

View File

@ -5,6 +5,7 @@ import { dirname, extname, join, normalize, relative, resolve, sep } from 'node:
import { commonGlobOptions, normalizeStoryPath } from '@storybook/core/common';
import { combineTags, storyNameFromExport, toId } from '@storybook/core/csf';
import { isExampleStoryId } from '@storybook/core/telemetry';
import type {
DocsIndexEntry,
DocsOptions,
@ -269,7 +270,10 @@ export class StoryIndexGenerator {
return item;
}
addStats(item.extra.stats, statsSummary);
// don't count example stories towards feature usage stats
if (!isExampleStoryId(item.id)) {
addStats(item.extra.stats, statsSummary);
}
// Drop extra data used for internal bookkeeping
const { extra, ...existing } = item;

View File

@ -0,0 +1,8 @@
const component = {};
export default {
title: 'Example/Button',
component,
tags: ['foobar'],
};
export const StoryOne = {};

View File

@ -255,6 +255,18 @@ describe('useStoriesJson', () => {
"title": "docs2/Yabbadabbadooo",
"type": "docs",
},
"example-button--story-one": {
"id": "example-button--story-one",
"importPath": "./src/Button.stories.ts",
"name": "Story One",
"tags": [
"dev",
"test",
"foobar",
],
"title": "Example/Button",
"type": "story",
},
"first-nested-deeply-f--story-one": {
"id": "first-nested-deeply-f--story-one",
"importPath": "./src/first-nested/deeply/F.stories.js",

View File

@ -92,6 +92,7 @@ describe('CsfFile', () => {
loaders: false
beforeEach: false
globals: false
tags: false
storyFn: false
mount: false
moduleMock: false
@ -106,6 +107,7 @@ describe('CsfFile', () => {
loaders: false
beforeEach: false
globals: false
tags: false
storyFn: false
mount: false
moduleMock: false
@ -137,6 +139,7 @@ describe('CsfFile', () => {
loaders: false
beforeEach: false
globals: false
tags: false
storyFn: true
mount: false
moduleMock: false
@ -169,6 +172,7 @@ describe('CsfFile', () => {
loaders: false
beforeEach: false
globals: false
tags: false
storyFn: true
mount: false
moduleMock: false
@ -199,6 +203,7 @@ describe('CsfFile', () => {
loaders: false
beforeEach: false
globals: false
tags: false
storyFn: true
mount: false
moduleMock: false
@ -227,6 +232,7 @@ describe('CsfFile', () => {
loaders: false
beforeEach: false
globals: false
tags: false
storyFn: true
mount: false
moduleMock: false
@ -256,6 +262,7 @@ describe('CsfFile', () => {
loaders: false
beforeEach: false
globals: false
tags: false
storyFn: true
mount: false
moduleMock: false
@ -268,6 +275,7 @@ describe('CsfFile', () => {
loaders: false
beforeEach: false
globals: false
tags: false
storyFn: true
mount: false
moduleMock: false
@ -297,6 +305,7 @@ describe('CsfFile', () => {
loaders: false
beforeEach: false
globals: false
tags: false
storyFn: true
mount: false
moduleMock: false
@ -309,6 +318,7 @@ describe('CsfFile', () => {
loaders: false
beforeEach: false
globals: false
tags: false
storyFn: true
mount: false
moduleMock: false
@ -338,6 +348,7 @@ describe('CsfFile', () => {
loaders: false
beforeEach: false
globals: false
tags: false
storyFn: false
mount: false
moduleMock: false
@ -350,6 +361,7 @@ describe('CsfFile', () => {
loaders: false
beforeEach: false
globals: false
tags: false
storyFn: false
mount: false
moduleMock: false
@ -380,6 +392,7 @@ describe('CsfFile', () => {
loaders: false
beforeEach: false
globals: false
tags: false
storyFn: true
mount: false
moduleMock: false
@ -392,6 +405,7 @@ describe('CsfFile', () => {
loaders: false
beforeEach: false
globals: false
tags: false
storyFn: true
mount: false
moduleMock: false
@ -426,6 +440,7 @@ describe('CsfFile', () => {
loaders: false
beforeEach: false
globals: false
tags: false
storyFn: false
mount: false
moduleMock: false
@ -441,6 +456,7 @@ describe('CsfFile', () => {
loaders: false
beforeEach: false
globals: false
tags: false
storyFn: false
mount: false
moduleMock: false
@ -475,6 +491,7 @@ describe('CsfFile', () => {
loaders: false
beforeEach: false
globals: false
tags: false
storyFn: false
mount: false
moduleMock: false
@ -490,6 +507,7 @@ describe('CsfFile', () => {
loaders: false
beforeEach: false
globals: false
tags: false
storyFn: false
mount: false
moduleMock: false
@ -521,6 +539,7 @@ describe('CsfFile', () => {
loaders: false
beforeEach: false
globals: false
tags: false
storyFn: true
mount: false
moduleMock: false
@ -533,6 +552,7 @@ describe('CsfFile', () => {
loaders: false
beforeEach: false
globals: false
tags: false
storyFn: true
mount: false
moduleMock: false
@ -564,6 +584,7 @@ describe('CsfFile', () => {
loaders: false
beforeEach: false
globals: false
tags: false
storyFn: true
mount: false
moduleMock: false
@ -576,6 +597,7 @@ describe('CsfFile', () => {
loaders: false
beforeEach: false
globals: false
tags: false
storyFn: true
mount: false
moduleMock: false
@ -605,6 +627,7 @@ describe('CsfFile', () => {
loaders: false
beforeEach: false
globals: false
tags: false
storyFn: true
mount: false
moduleMock: false
@ -617,6 +640,7 @@ describe('CsfFile', () => {
loaders: false
beforeEach: false
globals: false
tags: false
storyFn: true
mount: false
moduleMock: false
@ -650,6 +674,7 @@ describe('CsfFile', () => {
loaders: false
beforeEach: false
globals: false
tags: false
storyFn: true
mount: false
moduleMock: false
@ -682,6 +707,7 @@ describe('CsfFile', () => {
loaders: false
beforeEach: false
globals: false
tags: false
storyFn: true
mount: false
moduleMock: false
@ -715,6 +741,7 @@ describe('CsfFile', () => {
loaders: false
beforeEach: false
globals: false
tags: false
storyFn: true
mount: false
moduleMock: false
@ -753,6 +780,7 @@ describe('CsfFile', () => {
loaders: false
beforeEach: false
globals: false
tags: false
storyFn: true
mount: false
moduleMock: false
@ -786,6 +814,7 @@ describe('CsfFile', () => {
loaders: false
beforeEach: false
globals: false
tags: false
storyFn: true
mount: false
moduleMock: false
@ -801,6 +830,7 @@ describe('CsfFile', () => {
loaders: false
beforeEach: false
globals: false
tags: false
storyFn: true
mount: false
moduleMock: false
@ -829,6 +859,7 @@ describe('CsfFile', () => {
loaders: false
beforeEach: false
globals: false
tags: false
storyFn: false
mount: false
moduleMock: false
@ -841,6 +872,7 @@ describe('CsfFile', () => {
loaders: false
beforeEach: false
globals: false
tags: false
storyFn: false
mount: false
moduleMock: false
@ -874,6 +906,7 @@ describe('CsfFile', () => {
loaders: false
beforeEach: false
globals: false
tags: false
storyFn: true
mount: false
moduleMock: false
@ -889,6 +922,7 @@ describe('CsfFile', () => {
loaders: false
beforeEach: false
globals: false
tags: false
storyFn: true
mount: false
moduleMock: false
@ -923,6 +957,7 @@ describe('CsfFile', () => {
loaders: false
beforeEach: false
globals: false
tags: false
storyFn: true
mount: false
moduleMock: false
@ -1004,6 +1039,7 @@ describe('CsfFile', () => {
loaders: false
beforeEach: false
globals: false
tags: false
storyFn: true
mount: false
moduleMock: false
@ -1016,6 +1052,7 @@ describe('CsfFile', () => {
loaders: false
beforeEach: false
globals: false
tags: false
storyFn: true
mount: false
moduleMock: false
@ -1070,6 +1107,7 @@ describe('CsfFile', () => {
loaders: false
beforeEach: false
globals: false
tags: false
storyFn: true
mount: false
moduleMock: false
@ -1082,6 +1120,7 @@ describe('CsfFile', () => {
loaders: false
beforeEach: false
globals: false
tags: false
storyFn: true
mount: false
moduleMock: false
@ -1160,6 +1199,7 @@ describe('CsfFile', () => {
loaders: false
beforeEach: false
globals: false
tags: false
storyFn: false
mount: false
moduleMock: false
@ -1193,6 +1233,7 @@ describe('CsfFile', () => {
loaders: false
beforeEach: false
globals: false
tags: false
storyFn: false
mount: false
moduleMock: false
@ -1224,6 +1265,7 @@ describe('CsfFile', () => {
loaders: false
beforeEach: false
globals: false
tags: false
storyFn: false
mount: false
moduleMock: false
@ -1257,6 +1299,7 @@ describe('CsfFile', () => {
loaders: false
beforeEach: false
globals: false
tags: false
storyFn: false
mount: false
moduleMock: false
@ -1339,6 +1382,7 @@ describe('CsfFile', () => {
loaders: false
beforeEach: false
globals: false
tags: true
storyFn: true
mount: false
moduleMock: false
@ -1373,6 +1417,7 @@ describe('CsfFile', () => {
loaders: false
beforeEach: false
globals: false
tags: true
storyFn: false
mount: false
moduleMock: false
@ -1409,6 +1454,7 @@ describe('CsfFile', () => {
loaders: false
beforeEach: false
globals: false
tags: true
storyFn: false
mount: false
moduleMock: false
@ -1470,6 +1516,7 @@ describe('CsfFile', () => {
loaders: false
beforeEach: false
globals: false
tags: true
storyFn: true
mount: false
moduleMock: false
@ -1506,6 +1553,7 @@ describe('CsfFile', () => {
loaders: false
beforeEach: false
globals: false
tags: true
storyFn: false
mount: false
moduleMock: false
@ -1538,6 +1586,7 @@ describe('CsfFile', () => {
loaders: false
beforeEach: false
globals: false
tags: false
storyFn: false
mount: true
moduleMock: false
@ -1569,6 +1618,7 @@ describe('CsfFile', () => {
loaders: false
beforeEach: false
globals: false
tags: false
storyFn: false
mount: true
moduleMock: false
@ -1603,6 +1653,7 @@ describe('CsfFile', () => {
loaders: false
beforeEach: false
globals: false
tags: false
storyFn: false
mount: true
moduleMock: false
@ -1637,6 +1688,7 @@ describe('CsfFile', () => {
loaders: true
beforeEach: false
globals: false
tags: true
storyFn: false
mount: false
moduleMock: false
@ -1670,6 +1722,7 @@ describe('CsfFile', () => {
loaders: false
beforeEach: false
globals: false
tags: true
storyFn: true
mount: false
moduleMock: false
@ -1721,6 +1774,7 @@ describe('CsfFile', () => {
loaders: false
beforeEach: false
globals: false
tags: true
storyFn: false
mount: false
moduleMock: false
@ -1742,6 +1796,7 @@ describe('CsfFile', () => {
loaders: false
beforeEach: false
globals: false
tags: true
storyFn: false
mount: false
moduleMock: false
@ -1781,6 +1836,7 @@ describe('CsfFile', () => {
loaders: false
beforeEach: false
globals: false
tags: true
storyFn: false
mount: false
moduleMock: false
@ -1825,6 +1881,7 @@ describe('CsfFile', () => {
loaders: false
beforeEach: false
globals: false
tags: true
storyFn: false
mount: false
moduleMock: false
@ -1884,6 +1941,7 @@ describe('CsfFile', () => {
loaders: false
beforeEach: false
globals: false
tags: false
storyFn: false
mount: false
moduleMock: false
@ -1922,6 +1980,7 @@ describe('CsfFile', () => {
loaders: false
beforeEach: false
globals: false
tags: false
storyFn: false
mount: false
moduleMock: false
@ -1960,6 +2019,7 @@ describe('CsfFile', () => {
loaders: false
beforeEach: false
globals: false
tags: false
storyFn: false
mount: false
moduleMock: false
@ -1998,6 +2058,7 @@ describe('CsfFile', () => {
loaders: false
beforeEach: false
globals: false
tags: false
storyFn: false
mount: false
moduleMock: false
@ -2029,6 +2090,7 @@ describe('CsfFile', () => {
loaders: false
beforeEach: true
globals: false
tags: false
storyFn: false
mount: false
moduleMock: false
@ -2060,6 +2122,7 @@ describe('CsfFile', () => {
loaders: false
beforeEach: false
globals: true
tags: false
storyFn: false
mount: false
moduleMock: false
@ -2090,6 +2153,7 @@ describe('CsfFile', () => {
loaders: false
beforeEach: false
globals: false
tags: false
storyFn: false
mount: false
moduleMock: true
@ -2117,6 +2181,7 @@ describe('CsfFile', () => {
loaders: false
beforeEach: false
globals: false
tags: false
storyFn: false
mount: false
moduleMock: true
@ -2150,6 +2215,7 @@ describe('CsfFile', () => {
loaders: false
beforeEach: false
globals: false
tags: false
storyFn: false
mount: false
moduleMock: false
@ -2162,6 +2228,7 @@ describe('CsfFile', () => {
loaders: false
beforeEach: false
globals: false
tags: false
storyFn: false
mount: false
moduleMock: false
@ -2191,6 +2258,7 @@ describe('CsfFile', () => {
loaders: false
beforeEach: false
globals: false
tags: false
storyFn: false
mount: false
moduleMock: false
@ -2222,6 +2290,7 @@ describe('CsfFile', () => {
loaders: false
beforeEach: false
globals: false
tags: false
storyFn: false
mount: false
moduleMock: false
@ -2234,6 +2303,7 @@ describe('CsfFile', () => {
loaders: false
beforeEach: false
globals: false
tags: false
storyFn: false
mount: false
moduleMock: false
@ -2263,6 +2333,7 @@ describe('CsfFile', () => {
loaders: false
beforeEach: false
globals: false
tags: false
storyFn: false
mount: false
moduleMock: false
@ -2297,6 +2368,7 @@ describe('CsfFile', () => {
loaders: false
beforeEach: false
globals: false
tags: false
storyFn: false
mount: false
moduleMock: false
@ -2331,6 +2403,7 @@ describe('CsfFile', () => {
loaders: false
beforeEach: false
globals: false
tags: false
storyFn: false
mount: false
moduleMock: false

View File

@ -765,7 +765,7 @@ export class CsfFile {
acc[key].tags = [...(acc[key].tags || []), 'play-fn'];
}
const stats = acc[key].__stats;
['play', 'render', 'loaders', 'beforeEach', 'globals'].forEach((annotation) => {
['play', 'render', 'loaders', 'beforeEach', 'globals', 'tags'].forEach((annotation) => {
stats[annotation as keyof IndexInputStats] =
!!storyAnnotations[annotation] || !!self._metaAnnotations[annotation];
});

View File

@ -1 +1 @@
export const version = '8.6.0-beta.0';
export const version = '8.6.0-beta.1';

View File

@ -92,6 +92,7 @@ export interface IndexInputStats {
moduleMock?: boolean;
globals?: boolean;
factory?: boolean;
tags?: boolean;
}
/** The base input for indexing a story or docs entry. */

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/builder-manager",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "Storybook manager builder",
"keywords": [
"storybook"

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/channels",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "",
"keywords": [
"storybook"

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/client-logger",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "",
"keywords": [
"storybook"

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/components",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "Core Storybook Components",
"keywords": [
"storybook"

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/core-common",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "Storybook framework-agnostic API",
"keywords": [
"storybook"

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/core-events",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "Event names used in storybook core",
"keywords": [
"storybook"

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/core-server",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "Storybook framework-agnostic API",
"keywords": [
"storybook"

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/csf-tools",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "Parse and manipulate CSF and Storybook config files",
"keywords": [
"storybook"

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/docs-tools",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "Shared utility functions for frameworks to implement docs",
"keywords": [
"storybook"

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/manager-api",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "Core Storybook Manager API & Context",
"keywords": [
"storybook"

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/manager",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "Core Storybook UI",
"keywords": [
"storybook"

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/node-logger",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "",
"keywords": [
"storybook"

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/preview-api",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "",
"keywords": [
"storybook"

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/preview",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "",
"keywords": [
"storybook"

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/router",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "Core Storybook Router",
"keywords": [
"storybook"

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/telemetry",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "Telemetry logging for crash reports and usage statistics",
"keywords": [
"storybook"

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/theming",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "Core Storybook Components",
"keywords": [
"storybook"

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/types",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "Core Storybook TS Types",
"keywords": [
"storybook"

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/angular",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "Storybook for Angular: Develop Angular components in isolation with hot reloading.",
"keywords": [
"storybook",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/ember",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "Storybook for Ember: Develop Ember Component in isolation with Hot Reloading.",
"homepage": "https://github.com/storybookjs/storybook/tree/next/code/frameworks/ember",
"bugs": {

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/experimental-nextjs-vite",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "Storybook for Next.js and Vite",
"keywords": [
"storybook",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/html-vite",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "Storybook for HTML and Vite: Develop HTML in isolation with Hot Reloading.",
"keywords": [
"storybook"

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/html-webpack5",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "Storybook for HTML: View HTML snippets in isolation with Hot Reloading.",
"keywords": [
"storybook"

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/nextjs",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "Storybook for Next.js",
"keywords": [
"storybook",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/preact-vite",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "Storybook for Preact and Vite: Develop Preact components in isolation with Hot Reloading.",
"keywords": [
"storybook"

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/preact-webpack5",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "Storybook for Preact: Develop Preact Component in isolation.",
"keywords": [
"storybook"

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/react-native-web-vite",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "Develop react-native components an isolated web environment with hot reloading.",
"keywords": [
"storybook"

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/react-vite",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "Storybook for React and Vite: Develop React components in isolation with Hot Reloading.",
"keywords": [
"storybook"

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/react-webpack5",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "Storybook for React: Develop React Component in isolation with Hot Reloading.",
"keywords": [
"storybook"

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/server-webpack5",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "Storybook for Server: View HTML snippets from a server in isolation with Hot Reloading.",
"keywords": [
"storybook"

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/svelte-vite",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "Storybook for Svelte and Vite: Develop Svelte components in isolation with Hot Reloading.",
"keywords": [
"storybook"

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/svelte-webpack5",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "Storybook for Svelte: Develop Svelte Component in isolation with Hot Reloading.",
"keywords": [
"storybook"

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/sveltekit",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "Storybook for SvelteKit",
"keywords": [
"storybook",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/vue3-vite",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "Storybook for Vue3 and Vite: Develop Vue3 components in isolation with Hot Reloading.",
"keywords": [
"storybook"

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/vue3-webpack5",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "Storybook for Vue 3: Develop Vue 3 Components in isolation with Hot Reloading.",
"keywords": [
"storybook"

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/web-components-vite",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "Storybook for web-components and Vite: Develop Web Components in isolation with Hot Reloading.",
"keywords": [
"storybook"

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/web-components-webpack5",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "Storybook for web-components: View web components snippets in isolation with Hot Reloading.",
"keywords": [
"lit",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/blocks",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "Storybook Doc Blocks",
"keywords": [
"storybook"

View File

@ -1,6 +1,6 @@
{
"name": "sb",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "Storybook CLI",
"keywords": [
"storybook"

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/cli",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "Storybook CLI",
"keywords": [
"storybook"

View File

@ -1,6 +1,6 @@
{
"name": "storybook",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "Storybook's CLI - install, dev, build, upgrade, and more",
"keywords": [
"cli",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/codemod",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "A collection of codemod scripts written with JSCodeshift",
"keywords": [
"storybook"

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/core-webpack",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "Storybook framework-agnostic API",
"keywords": [
"storybook"

View File

@ -1,6 +1,6 @@
{
"name": "create-storybook",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "Initialize Storybook into your project",
"homepage": "https://github.com/storybookjs/storybook/tree/next/code/lib/create-storybook",
"bugs": {

View File

@ -25,7 +25,7 @@ const createStorybookProgram = program
// default value is false, but if the user sets STORYBOOK_DISABLE_TELEMETRY, it can be true
process.env.STORYBOOK_DISABLE_TELEMETRY && process.env.STORYBOOK_DISABLE_TELEMETRY !== 'false'
)
.option('--features <...list>', 'What features of storybook are you interested in?')
.option('--features <list...>', 'What features of storybook are you interested in?')
.option('--debug', 'Get more logs in debug mode')
.option('--enable-crash-reports', 'Enable sending crash reports to telemetry data')
.option('-f --force', 'Force add Storybook')

View File

@ -48,10 +48,12 @@ export type Generator<T = void> = (
commandOptions?: CommandOptions
) => Promise<T>;
export type GeneratorFeature = 'docs' | 'test';
export type CommandOptions = {
packageManager: PackageManagerName;
usePnp?: boolean;
features: string[];
features: GeneratorFeature[];
type?: ProjectType;
force?: any;
html?: boolean;

View File

@ -45,7 +45,7 @@ import svelteKitGenerator from './generators/SVELTEKIT';
import vue3Generator from './generators/VUE3';
import webComponentsGenerator from './generators/WEB-COMPONENTS';
import webpackReactGenerator from './generators/WEBPACK_REACT';
import type { CommandOptions, GeneratorOptions } from './generators/types';
import type { CommandOptions, GeneratorFeature, GeneratorOptions } from './generators/types';
import { packageVersions } from './ink/steps/checks/packageVersions';
import { vitestConfigFiles } from './ink/steps/checks/vitestConfigFiles';
import { currentDirectoryIsEmpty, scaffoldNewProject } from './scaffold-new-project';
@ -294,27 +294,49 @@ export async function doInitiate(options: CommandOptions): Promise<
const isInteractive = process.stdout.isTTY && !process.env.CI;
let features = options.features || isInteractive ? ['dev', 'docs', 'test'] : ['dev', 'docs'];
const selectableFeatures: Record<GeneratorFeature, string> = {
docs: 'Documentation',
test: 'Testing',
};
let selectedFeatures = new Set<GeneratorFeature>();
selectedFeatures.toString = () =>
selectedFeatures.size === 0
? 'none'
: Array.from(selectedFeatures)
.map((f) => selectableFeatures[f])
.join(', ');
if (isInteractive && !options.features) {
if (options.features?.length > 0) {
if (options.features.includes('docs')) {
selectedFeatures.add('docs');
}
if (options.features.includes('test')) {
selectedFeatures.add('test');
}
logger.log(`Selected features: ${selectedFeatures}`);
} else if (options.yes || !isInteractive) {
selectedFeatures.add('docs');
if (isInteractive) {
// Don't automatically add test feature in CI
selectedFeatures.add('test');
}
logger.log(`Selected features: ${selectedFeatures}`);
} else {
const out = await prompts({
type: 'multiselect',
name: 'features',
message: `What are you using Storybook for?`,
choices: [
{ title: 'Development', value: 'dev', selected: true, disabled: true },
{ title: 'Documentation', value: 'docs', selected: true },
{ title: 'Testing', value: 'test', selected: true },
],
choices: Object.entries(selectableFeatures).map(([value, title]) => ({
title,
value,
selected: true,
})),
});
features = out.features;
selectedFeatures = new Set(out.features);
}
if (!features.includes('dev')) {
features.push('dev');
}
const telemetryFeatures = [...features];
const telemetryFeatures = ['dev', ...selectedFeatures];
// Check if the current directory is empty.
if (options.force !== true && currentDirectoryIsEmpty(packageManager.type)) {
@ -377,7 +399,7 @@ export async function doInitiate(options: CommandOptions): Promise<
}
}
if (features.includes('test')) {
if (selectedFeatures.has('test')) {
const packageVersionsData = await packageVersions.condition({ packageManager }, {} as any);
if (packageVersionsData.type === 'incompatible') {
const { ignorePackageVersions } = isInteractive
@ -393,14 +415,14 @@ export async function doInitiate(options: CommandOptions): Promise<
])
: { ignorePackageVersions: true };
if (ignorePackageVersions) {
features.splice(features.indexOf('test'), 1);
selectedFeatures.delete('test');
} else {
process.exit(0);
}
}
}
if (features.includes('test')) {
if (selectedFeatures.has('test')) {
const vitestConfigFilesData = await vitestConfigFiles.condition(
{ babel, findUp, fs } as any,
{ directory: process.cwd() } as any
@ -419,7 +441,7 @@ export async function doInitiate(options: CommandOptions): Promise<
])
: { ignoreVitestConfigFiles: true };
if (ignoreVitestConfigFiles) {
features.splice(features.indexOf('test'), 1);
selectedFeatures.delete('test');
} else {
process.exit(0);
}
@ -430,11 +452,14 @@ export async function doInitiate(options: CommandOptions): Promise<
await packageManager.installDependencies();
}
// update the mutated value
options.features = features;
// Update the options object with the selected features before passing it down to the generator
options.features = Array.from(selectedFeatures);
const installResult = await installStorybook(projectType as ProjectType, packageManager, options);
// Sync features back because they may have been mutated by the generator (e.g. in case of undetected project type)
selectedFeatures = new Set(options.features);
if (!options.skipInstall) {
await packageManager.installDependencies();
}
@ -484,7 +509,7 @@ export async function doInitiate(options: CommandOptions): Promise<
? `ng run ${installResult.projectName}:storybook`
: packageManager.getRunStorybookCommand();
if (features.includes('test')) {
if (selectedFeatures.has('test')) {
logger.log(
`> npx storybook@${versions.storybook} add @storybook/experimental-addon-test@${versions['@storybook/experimental-addon-test']}`
);
@ -498,6 +523,8 @@ export async function doInitiate(options: CommandOptions): Promise<
boxen(
dedent`
Storybook was successfully installed in your project! 🎉
Additional features: ${selectedFeatures}
To run Storybook manually, run ${picocolors.yellow(
picocolors.bold(storybookCommand)
)}. CTRL+C to stop.

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/csf-plugin",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "Enrich CSF files via static analysis",
"keywords": [
"storybook"

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/instrumenter",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "",
"keywords": [
"storybook"

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/react-dom-shim",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "",
"keywords": [
"storybook"

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/source-loader",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "Source loader",
"keywords": [
"lib",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/test",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "",
"keywords": [
"storybook"

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/root",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"private": true,
"description": "Storybook root",
"homepage": "https://storybook.js.org/",

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/preset-create-react-app",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "Storybook for Create React App preset",
"keywords": [
"storybook"

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/preset-html-webpack",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "Storybook for HTML: View HTML snippets in isolation with Hot Reloading.",
"keywords": [
"storybook"

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/preset-preact-webpack",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "Storybook for Preact: Develop Preact Component in isolation.",
"keywords": [
"storybook"

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/preset-react-webpack",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "Storybook for React: Develop React Component in isolation with Hot Reloading",
"keywords": [
"storybook"

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/preset-server-webpack",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "Storybook for Server: View HTML snippets from a server in isolation with Hot Reloading.",
"keywords": [
"storybook"

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/preset-svelte-webpack",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "Storybook for Svelte: Develop Svelte Component in isolation with Hot Reloading.",
"keywords": [
"storybook"

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/preset-vue3-webpack",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "Storybook for Vue 3: Develop Vue 3 Components in isolation with Hot Reloading.",
"keywords": [
"storybook"

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/html",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "Storybook HTML renderer",
"keywords": [
"storybook"

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/preact",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "Storybook Preact renderer",
"keywords": [
"storybook"

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/react",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "Storybook React renderer",
"keywords": [
"storybook"

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/server",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "Storybook Server renderer",
"keywords": [
"storybook"

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/svelte",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "Storybook Svelte renderer",
"keywords": [
"storybook"

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/vue3",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "Storybook Vue 3 renderer",
"keywords": [
"storybook"

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/web-components",
"version": "8.6.0-beta.0",
"version": "8.6.0-beta.1",
"description": "Storybook web-components renderer",
"keywords": [
"lit",

View File

@ -42,7 +42,7 @@ Specifically, we track the following information in our telemetry events:
* Testing tools (e.g. [Jest](https://jestjs.io/), [Vitest](https://vitest.dev/), [Playwright](https://playwright.dev/)).
* Package manager information (e.g., `npm`, `yarn`).
* Monorepo information (e.g., [NX](https://nx.dev/), [Turborepo](https://turborepo.org/)).
* In-app events (e.g., [Storybook guided tour](https://github.com/storybookjs/addon-onboarding)).
* In-app events (e.g., [Storybook guided tour](https://github.com/storybookjs/addon-onboarding), [UI test run](https://storybook.js.org/docs/writing-tests/test-addon#storybook-ui)).
Access to the raw data is highly controlled, limited to select members of Storybook's core team who maintain the telemetry. We cannot identify individual users from the dataset: it is anonymized and untraceable back to the user.
@ -75,9 +75,10 @@ Will generate the following output:
"exampleDocsCount": 3,
"onboardingStoryCount": 0,
"onboardingDocsCount": 0,
"version": 4
"version": 5
},
"storyStats": {
"factory": 0,
"play": 0,
"render": 1,
"loaders": 0,
@ -85,7 +86,8 @@ Will generate the following output:
"globals": 0,
"storyFn": 5,
"mount": 0,
"moduleMock": 0
"moduleMock": 0,
"tags": 0
}
},
"metadata": {

Some files were not shown because too many files have changed in this diff Show More