diff --git a/code/cypress/generated/addon-docs.spec.ts b/code/cypress/generated/addon-docs.spec.ts
deleted file mode 100644
index 2c53141f7cf0..000000000000
--- a/code/cypress/generated/addon-docs.spec.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-import { skipOn } from '@cypress/skip-test';
-
-describe('addon-docs', () => {
- beforeEach(() => {
- cy.visitStorybook();
- cy.navigateToStory('example-button', 'docs');
- });
-
- skipOn('vue3', () => {
- skipOn('html', () => {
- it('should provide source snippet', () => {
- cy.getDocsElement()
- .find('.docblock-code-toggle')
- .each(($div) => {
- cy.wrap($div)
- .should('contain.text', 'Show code')
- // use force click so cypress does not automatically scroll, making the source block visible on this step
- .click({ force: true });
- });
-
- cy.getDocsElement()
- .find('pre.prismjs')
- .each(($div) => {
- const text = $div.text();
- expect(text).not.match(/^\(args\) => /);
- });
- });
- });
- });
-});
diff --git a/examples/official-storybook/stories/title/AutoTitle.stories.js b/examples/official-storybook/stories/title/AutoTitle.stories.js
index 3a2b02502232..125c1157c1c1 100644
--- a/examples/official-storybook/stories/title/AutoTitle.stories.js
+++ b/examples/official-storybook/stories/title/AutoTitle.stories.js
@@ -10,4 +10,3 @@ export default {
};
export const Basic = () => ;
-
diff --git a/examples/official-storybook/stories/title/CustomTitle.stories.js b/examples/official-storybook/stories/title/CustomTitle.stories.js
index 390b8480ecc9..1ff5710b11d1 100644
--- a/examples/official-storybook/stories/title/CustomTitle.stories.js
+++ b/examples/official-storybook/stories/title/CustomTitle.stories.js
@@ -4,8 +4,8 @@ import { Form } from '@storybook/components';
const { Button } = Form;
export default {
- title: 'CustomTitle',
- component: Button,
+ title: 'CustomTitle',
+ component: Button,
};
export const Basic = () => ;
diff --git a/examples/react-ts/src/title/AutoTitle.stories.js b/examples/react-ts/src/title/AutoTitle.stories.js
index e912d9560606..125c1157c1c1 100644
--- a/examples/react-ts/src/title/AutoTitle.stories.js
+++ b/examples/react-ts/src/title/AutoTitle.stories.js
@@ -9,4 +9,4 @@ export default {
component: Button,
};
-export const Basic = () => ;
\ No newline at end of file
+export const Basic = () => ;
diff --git a/examples/react-ts/src/title/CustomTitle.stories.js b/examples/react-ts/src/title/CustomTitle.stories.js
index 390b8480ecc9..1ff5710b11d1 100644
--- a/examples/react-ts/src/title/CustomTitle.stories.js
+++ b/examples/react-ts/src/title/CustomTitle.stories.js
@@ -4,8 +4,8 @@ import { Form } from '@storybook/components';
const { Button } = Form;
export default {
- title: 'CustomTitle',
- component: Button,
+ title: 'CustomTitle',
+ component: Button,
};
export const Basic = () => ;
diff --git a/lib/builder-webpack5/src/preview/iframe-webpack.config.ts b/lib/builder-webpack5/src/preview/iframe-webpack.config.ts
index 7d2a18a7bf2e..8e507ffbc066 100644
--- a/lib/builder-webpack5/src/preview/iframe-webpack.config.ts
+++ b/lib/builder-webpack5/src/preview/iframe-webpack.config.ts
@@ -6,10 +6,10 @@ import CaseSensitivePathsPlugin from 'case-sensitive-paths-webpack-plugin';
import TerserWebpackPlugin from 'terser-webpack-plugin';
import VirtualModulePlugin from 'webpack-virtual-modules';
import ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin';
+import type { Options, CoreConfig, Webpack5BuilderConfig } from '@storybook/core-common';
import themingPaths from '@storybook/theming/paths';
-import type { Options, CoreConfig } from '@storybook/core-common';
import {
toRequireContextString,
es6Transpiler,
@@ -86,6 +86,13 @@ export default async (options: Options & Record): Promise = {};
if (features?.storyStoreV7) {
const storiesFilename = 'storybook-stories.js';
@@ -274,5 +281,7 @@ export default async (options: Options & Record): Promise { return userTitle || 'FIXME' }
+ const makeTitle = (userTitle?: string) => {
+ return userTitle || 'FIXME';
+ };
const csf = loadCsf(source, { makeTitle });
try {
diff --git a/lib/core-server/src/__snapshots__/cra-ts-essentials_manager-prod-posix b/lib/core-server/src/__snapshots__/cra-ts-essentials_manager-prod-posix
index 4bcbcf07d680..5327d847d2c6 100644
--- a/lib/core-server/src/__snapshots__/cra-ts-essentials_manager-prod-posix
+++ b/lib/core-server/src/__snapshots__/cra-ts-essentials_manager-prod-posix
@@ -1,262 +1,5 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
-exports[`cra-ts-essentials manager dev 1`] = `
-Object {
- "entry": Array [
- "NODE_MODULES/@storybook/addon-ie11/dist/event-source-polyfill.js",
- "ROOT/lib/core-client/dist/esm/globals/polyfills.js",
- "ROOT/lib/core-client/dist/esm/manager/index.js",
- "ROOT/addons/docs/manager.js",
- "ROOT/addons/controls/manager.js",
- "ROOT/addons/actions/manager.js",
- "ROOT/addons/backgrounds/manager.js",
- "ROOT/addons/toolbars/manager.js",
- "ROOT/addons/measure/manager.js",
- "ROOT/addons/outline/manager.js",
- ],
- "keys": Array [
- "name",
- "mode",
- "bail",
- "devtool",
- "entry",
- "output",
- "watchOptions",
- "plugins",
- "module",
- "resolve",
- "resolveLoader",
- "recordsPath",
- "performance",
- "optimization",
- ],
- "module": Object {
- "rules": Array [
- Object {
- "exclude": Array [
- "NODE_MODULES/",
- "/dist/",
- ],
- "include": Array [
- "ROOT",
- ],
- "test": "/\\\\.(mjs|tsx?|jsx?)$/",
- "use": Array [
- Object {
- "loader": "NODE_MODULES/babel-loader/lib/index.js",
- "options": Object {
- "babelrc": false,
- "configFile": false,
- "plugins": Array [
- "NODE_MODULES/@babel/plugin-transform-shorthand-properties/lib/index.js",
- "NODE_MODULES/@babel/plugin-transform-block-scoping/lib/index.js",
- Array [
- "NODE_MODULES/@babel/plugin-proposal-decorators/lib/index.js",
- Object {
- "legacy": true,
- },
- ],
- Array [
- "NODE_MODULES/@babel/plugin-proposal-class-properties/lib/index.js",
- Object {
- "loose": true,
- },
- ],
- Array [
- "NODE_MODULES/@babel/plugin-proposal-private-property-in-object/lib/index.js",
- Object {
- "loose": true,
- },
- ],
- Array [
- "NODE_MODULES/@babel/plugin-proposal-private-methods/lib/index.js",
- Object {
- "loose": true,
- },
- ],
- "NODE_MODULES/@babel/plugin-proposal-export-default-from/lib/index.js",
- "NODE_MODULES/@babel/plugin-syntax-dynamic-import/lib/index.js",
- Array [
- "NODE_MODULES/@babel/plugin-proposal-object-rest-spread/lib/index.js",
- Object {
- "loose": true,
- "useBuiltIns": true,
- },
- ],
- "NODE_MODULES/@babel/plugin-transform-classes/lib/index.js",
- "NODE_MODULES/@babel/plugin-transform-arrow-functions/lib/index.js",
- "NODE_MODULES/@babel/plugin-transform-parameters/lib/index.js",
- "NODE_MODULES/@babel/plugin-transform-destructuring/lib/index.js",
- "NODE_MODULES/@babel/plugin-transform-spread/lib/index.js",
- "NODE_MODULES/@babel/plugin-transform-for-of/lib/index.js",
- "NODE_MODULES/babel-plugin-macros/dist/index.js",
- "NODE_MODULES/@babel/plugin-proposal-optional-chaining/lib/index.js",
- "NODE_MODULES/@babel/plugin-proposal-nullish-coalescing-operator/lib/index.js",
- Array [
- "NODE_MODULES/babel-plugin-polyfill-corejs3/lib/index.js",
- Object {
- "absoluteImports": "NODE_MODULES/core-js/index.js",
- "method": "usage-global",
- "version": "*",
- },
- ],
- "NODE_MODULES/@babel/plugin-transform-template-literals/lib/index.js",
- ],
- "presets": Array [
- Array [
- "NODE_MODULES/@babel/preset-env/lib/index.js",
- Object {
- "loose": true,
- "shippedProposals": true,
- },
- ],
- "NODE_MODULES/@babel/preset-typescript/lib/index.js",
- "NODE_MODULES/@babel/preset-react/lib/index.js",
- ],
- "sourceType": "unambiguous",
- },
- },
- ],
- },
- Object {
- "include": [Function],
- "test": "/\\\\.js$/",
- "use": Array [
- Object {
- "loader": "NODE_MODULES/babel-loader/lib/index.js",
- "options": Object {
- "plugins": Array [
- "NODE_MODULES/@babel/plugin-transform-shorthand-properties/lib/index.js",
- "NODE_MODULES/@babel/plugin-transform-block-scoping/lib/index.js",
- Array [
- "NODE_MODULES/@babel/plugin-proposal-decorators/lib/index.js",
- Object {
- "legacy": true,
- },
- ],
- Array [
- "NODE_MODULES/@babel/plugin-proposal-class-properties/lib/index.js",
- Object {
- "loose": true,
- },
- ],
- Array [
- "NODE_MODULES/@babel/plugin-proposal-private-property-in-object/lib/index.js",
- Object {
- "loose": true,
- },
- ],
- Array [
- "NODE_MODULES/@babel/plugin-proposal-private-methods/lib/index.js",
- Object {
- "loose": true,
- },
- ],
- "NODE_MODULES/@babel/plugin-proposal-export-default-from/lib/index.js",
- "NODE_MODULES/@babel/plugin-syntax-dynamic-import/lib/index.js",
- Array [
- "NODE_MODULES/@babel/plugin-proposal-object-rest-spread/lib/index.js",
- Object {
- "loose": true,
- "useBuiltIns": true,
- },
- ],
- "NODE_MODULES/@babel/plugin-transform-classes/lib/index.js",
- "NODE_MODULES/@babel/plugin-transform-arrow-functions/lib/index.js",
- "NODE_MODULES/@babel/plugin-transform-parameters/lib/index.js",
- "NODE_MODULES/@babel/plugin-transform-destructuring/lib/index.js",
- "NODE_MODULES/@babel/plugin-transform-spread/lib/index.js",
- "NODE_MODULES/@babel/plugin-transform-for-of/lib/index.js",
- "NODE_MODULES/babel-plugin-macros/dist/index.js",
- "NODE_MODULES/@babel/plugin-proposal-optional-chaining/lib/index.js",
- "NODE_MODULES/@babel/plugin-proposal-nullish-coalescing-operator/lib/index.js",
- Array [
- "NODE_MODULES/babel-plugin-polyfill-corejs3/lib/index.js",
- Object {
- "absoluteImports": "NODE_MODULES/core-js/index.js",
- "method": "usage-global",
- "version": "*",
- },
- ],
- ],
- "presets": Array [
- Array [
- "NODE_MODULES/@babel/preset-env/lib/index.js",
- Object {
- "loose": true,
- "modules": false,
- "shippedProposals": true,
- "targets": "defaults",
- },
- ],
- "NODE_MODULES/@babel/preset-react/lib/index.js",
- ],
- "sourceType": "unambiguous",
- },
- },
- ],
- },
- Object {
- "test": "/\\\\.css$/",
- "use": Array [
- "NODE_MODULES/style-loader/dist/cjs.js",
- Object {
- "loader": "NODE_MODULES/css-loader/dist/cjs.js",
- "options": Object {
- "importLoaders": 1,
- },
- },
- ],
- },
- Object {
- "loader": "NODE_MODULES/file-loader/dist/cjs.js",
- "options": Object {
- "name": "static/media/[path][name].[ext]",
- },
- "test": "/\\\\.(svg|ico|jpg|jpeg|png|apng|gif|eot|otf|webp|ttf|woff|woff2|cur|ani|pdf)(\\\\?.*)?$/",
- },
- Object {
- "loader": "NODE_MODULES/url-loader/dist/cjs.js",
- "options": Object {
- "limit": 10000,
- "name": "static/media/[path][name].[ext]",
- },
- "test": "/\\\\.(mp4|webm|wav|mp3|m4a|aac|oga)(\\\\?.*)?$/",
- },
- Object {
- "include": "NODE_MODULES[\\\\\\\\/](@storybook[\\\\\\\\/]node_logger|@testing-library[\\\\\\\\/]dom|@testing-library[\\\\\\\\/]user-event|acorn-jsx|ansi-align|ansi-colors|ansi-escapes|ansi-regex|ansi-styles|better-opn|boxen|camelcase|chalk|color-convert|commander|find-cache-dir|find-up|fs-extra|highlight.js|json5|node-fetch|pkg-dir|prettier|pretty-format|react-dev-utils|resolve-from|semver|slash|strip-ansi|uuid)/",
- "test": "/\\\\.js$/",
- "use": Array [
- Object {
- "loader": "NODE_MODULES/babel-loader/lib/index.js",
- "options": Object {
- "presets": Array [
- Array [
- "@babel/preset-env",
- Object {
- "targets": Object {
- "ie": "11",
- },
- },
- "storybook-addon-ie11",
- ],
- ],
- "sourceType": "unambiguous",
- },
- },
- ],
- },
- ],
- },
- "plugins": Array [
- "VirtualModulesPlugin",
- "HtmlWebpackPlugin",
- "CaseSensitivePathsPlugin",
- "DefinePlugin",
- ],
-}
-`;
-
exports[`cra-ts-essentials manager prod 1`] = `
Object {
"entry": Array [
diff --git a/lib/core-server/src/__snapshots__/cra-ts-essentials_preview-dev-posix b/lib/core-server/src/__snapshots__/cra-ts-essentials_preview-dev-posix
index 45f3199dcaa1..8f55b7b8374d 100644
--- a/lib/core-server/src/__snapshots__/cra-ts-essentials_preview-dev-posix
+++ b/lib/core-server/src/__snapshots__/cra-ts-essentials_preview-dev-posix
@@ -387,6 +387,13 @@ Object {
},
Object {
"loader": "NODE_MODULES/@storybook/mdx1-csf/loader.js",
+ "options": Object {
+ "remarkPlugins": Array [
+ [Function],
+ [Function],
+ ],
+ "skipCsf": false,
+ },
},
],
},
diff --git a/lib/core-server/src/__snapshots__/cra-ts-essentials_preview-prod-posix b/lib/core-server/src/__snapshots__/cra-ts-essentials_preview-prod-posix
index 19d3bb4c27a5..66c1012d3213 100644
--- a/lib/core-server/src/__snapshots__/cra-ts-essentials_preview-prod-posix
+++ b/lib/core-server/src/__snapshots__/cra-ts-essentials_preview-prod-posix
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
-exports[`cra-ts-essentials preview dev 1`] = `
+exports[`cra-ts-essentials preview prod 1`] = `
Object {
"entry": Array [
"ROOT/lib/core-client/dist/esm/globals/polyfills.js",
@@ -361,56 +361,6 @@ Object {
},
Object {
"test": "/(stories|story)\\\\.mdx$/",
- "use": Array [
- Object {
- "loader": "NODE_MODULES/babel-loader/lib/index.js",
- "options": Object {
- "babelrc": false,
- "cacheDirectory": "NODE_MODULES/.cache/storybook/babel",
- "configFile": false,
- "overrides": Array [
- Object {
- "plugins": Array [
- Array [
- "NODE_MODULES/babel-plugin-react-docgen/lib/index.js",
- Object {
- "DOC_GEN_COLLECTION_NAME": "STORYBOOK_REACT_CLASSES",
- },
- ],
- ],
- "test": "/\\\\.(mjs|jsx?)$/",
- },
- ],
- "plugins": Array [
- Array [
- "NODE_MODULES/@babel/plugin-transform-react-jsx/lib/index.js",
- Object {
- "pragma": "React.createElement",
- "pragmaFrag": "React.Fragment",
- },
- ],
- ],
- "presets": Array [
- Array [
- "@babel/preset-env",
- Object {
- "targets": Object {
- "ie": "11",
- },
- },
- "storybook-addon-ie11",
- ],
- ],
- },
- },
- Object {
- "loader": "NODE_MODULES/@storybook/mdx1-csf/loader.js",
- },
- ],
- },
- Object {
- "exclude": "/(stories|story)\\\\.mdx$/",
- "test": "/\\\\.mdx$/",
"use": Array [
Object {
"loader": "NODE_MODULES/babel-loader/lib/index.js",
@@ -460,451 +410,11 @@ Object {
[Function],
[Function],
],
- "skipCsf": true,
- },
- },
- ],
- },
- Object {
- "enforce": "pre",
- "loader": "ROOT/lib/source-loader/dist/cjs/index.js",
- "options": Object {
- "injectStoryParameters": true,
- "inspectLocalDependencies": true,
- },
- "test": "/\\\\.(stories|story)\\\\.[tj]sx?$/",
- },
- ],
- },
- "plugins": Array [
- "FilterWarningsPlugin",
- "VirtualModulesPlugin",
- "HtmlWebpackPlugin",
- "DefinePlugin",
- "CaseSensitivePathsPlugin",
- "ProgressPlugin",
- "InlineChunkHtmlPlugin",
- "InterpolateHtmlPlugin",
- "ModuleNotFoundPlugin",
- "MiniCssExtractPlugin",
- "ManifestPlugin",
- "IgnorePlugin",
- "ForkTsCheckerWebpackPlugin",
- "ESLintWebpackPlugin",
- "IgnorePlugin",
- "DocgenPlugin",
- ],
-}
-`;
-
-exports[`cra-ts-essentials preview prod 1`] = `
-Object {
- "entry": Array [
- "ROOT/lib/core-client/dist/esm/globals/polyfills.js",
- "ROOT/lib/core-client/dist/esm/globals/globals.js",
- "NODE_MODULES/@storybook/addon-ie11/dist/event-source-polyfill.js",
- "ROOT/storybook-init-framework-entry.js",
- "ROOT/app/react/dist/esm/client/docs/config-generated-config-entry.js",
- "ROOT/app/react/dist/esm/client/preview/config-generated-config-entry.js",
- "ROOT/addons/docs/preview.js-generated-config-entry.js",
- "ROOT/addons/actions/preview.js-generated-config-entry.js",
- "ROOT/addons/backgrounds/preview.js-generated-config-entry.js",
- "ROOT/addons/measure/preview.js-generated-config-entry.js",
- "ROOT/addons/outline/preview.js-generated-config-entry.js",
- "ROOT/examples/cra-ts-essentials/.storybook/preview.tsx-generated-config-entry.js",
- "ROOT/generated-stories-entry.js",
- ],
- "keys": Array [
- "name",
- "mode",
- "bail",
- "devtool",
- "entry",
- "output",
- "watchOptions",
- "plugins",
- "module",
- "resolve",
- "resolveLoader",
- "optimization",
- "performance",
- ],
- "module": Object {
- "rules": Array [
- Object {
- "test": "/\\\\.md$/",
- "use": Array [
- Object {
- "loader": "NODE_MODULES/raw-loader/dist/cjs.js",
- },
- ],
- },
- Object {
- "parser": Object {
- "requireEnsure": false,
- },
- },
- Object {
- "oneOf": Array [
- Object {
- "loader": "NODE_MODULES/url-loader/dist/cjs.js",
- "options": Object {
- "limit": 10000,
- "mimetype": "image/avif",
- "name": "static/media/[name].[hash:8].[ext]",
- },
- "test": Array [
- "/\\\\.avif$/",
- ],
- },
- Object {
- "loader": "NODE_MODULES/url-loader/dist/cjs.js",
- "options": Object {
- "limit": 10000,
- "name": "static/media/[name].[hash:8].[ext]",
- },
- "test": Array [
- "/\\\\.bmp$/",
- "/\\\\.gif$/",
- "/\\\\.jpe?g$/",
- "/\\\\.png$/",
- ],
- },
- Object {
- "include": Array [
- "ROOT/src",
- "ROOT/examples/cra-ts-essentials/.storybook",
- ],
- "loader": "NODE_MODULES/babel-loader/lib/index.js",
- "options": Object {
- "babelrc": false,
- "cacheCompression": false,
- "cacheDirectory": true,
- "cacheIdentifier": "production:babel-plugin-named-asset-import@:babel-preset-react-app@10.0.1:react-dev-utils@11.0.4:react-scripts@4.0.3",
- "compact": true,
- "configFile": false,
- "customize": "NODE_MODULES/babel-preset-react-app/webpack-overrides.js",
- "extends": undefined,
- "overrides": Array [
- Object {
- "plugins": Array [
- Array [
- "NODE_MODULES/babel-plugin-react-docgen/lib/index.js",
- Object {
- "DOC_GEN_COLLECTION_NAME": "STORYBOOK_REACT_CLASSES",
- },
- ],
- ],
- "test": "/\\\\.(mjs|jsx?)$/",
- },
- ],
- "plugins": Array [
- Array [
- "NODE_MODULES/babel-plugin-named-asset-import/index.js",
- Object {
- "loaderMap": Object {
- "svg": Object {
- "ReactComponent": "@svgr/webpack?-svgo,+titleProp,+ref![path]",
- },
- },
- },
- ],
- ],
- "presets": Array [
- Array [
- "@babel/preset-env",
- Object {
- "targets": Object {
- "ie": "11",
- },
- },
- "storybook-addon-ie11",
- ],
- Array [
- "NODE_MODULES/babel-preset-react-app/index.js",
- Object {
- "runtime": "automatic",
- },
- ],
- ],
- },
- "test": "/\\\\.(js|mjs|jsx|ts|tsx)$/",
- },
- Object {
- "exclude": "/@babel(?:\\\\/|\\\\\\\\{1,2})runtime/",
- "include": Array [
- "ROOT/examples/cra-ts-essentials/.storybook",
- ],
- "loader": "NODE_MODULES/babel-loader/lib/index.js",
- "options": Object {
- "babelrc": false,
- "cacheCompression": false,
- "cacheDirectory": true,
- "cacheIdentifier": "production:babel-plugin-named-asset-import@:babel-preset-react-app@10.0.1:react-dev-utils@11.0.4:react-scripts@4.0.3",
- "compact": false,
- "configFile": false,
- "inputSourceMap": true,
- "presets": Array [
- Array [
- "NODE_MODULES/babel-preset-react-app/dependencies.js",
- Object {
- "helpers": true,
- },
- ],
- ],
- "sourceMaps": true,
- },
- "test": "/\\\\.(js|mjs)$/",
- },
- Object {
- "exclude": Array [
- "/\\\\.module\\\\.css$/",
- "/@storybook/",
- ],
- "include": undefined,
- "sideEffects": true,
- "test": "/\\\\.css$/",
- "use": Array [
- Object {
- "loader": "NODE_MODULES/mini-css-extract-plugin/dist/loader.js",
- "options": Object {
- "publicPath": "../../",
- },
- },
- Object {
- "loader": "NODE_MODULES/css-loader/dist/cjs.js",
- "options": Object {
- "importLoaders": 1,
- "sourceMap": true,
- },
- },
- Object {
- "loader": "NODE_MODULES/postcss-loader/src/index.js",
- "options": Object {
- "ident": "postcss",
- "plugins": [Function],
- "sourceMap": true,
- },
- },
- ],
- },
- Object {
- "test": "/\\\\.module\\\\.css$/",
- "use": Array [
- Object {
- "loader": "NODE_MODULES/mini-css-extract-plugin/dist/loader.js",
- "options": Object {
- "publicPath": "../../",
- },
- },
- Object {
- "loader": "NODE_MODULES/css-loader/dist/cjs.js",
- "options": Object {
- "importLoaders": 1,
- "modules": Object {
- "getLocalIdent": [Function],
- },
- "sourceMap": true,
- },
- },
- Object {
- "loader": "NODE_MODULES/postcss-loader/src/index.js",
- "options": Object {
- "ident": "postcss",
- "plugins": [Function],
- "sourceMap": true,
- },
- },
- ],
- },
- Object {
- "exclude": "/\\\\.module\\\\.(scss|sass)$/",
- "sideEffects": true,
- "test": "/\\\\.(scss|sass)$/",
- "use": Array [
- Object {
- "loader": "NODE_MODULES/mini-css-extract-plugin/dist/loader.js",
- "options": Object {
- "publicPath": "../../",
- },
- },
- Object {
- "loader": "NODE_MODULES/css-loader/dist/cjs.js",
- "options": Object {
- "importLoaders": 3,
- "sourceMap": true,
- },
- },
- Object {
- "loader": "NODE_MODULES/postcss-loader/src/index.js",
- "options": Object {
- "ident": "postcss",
- "plugins": [Function],
- "sourceMap": true,
- },
- },
- Object {
- "loader": "NODE_MODULES/resolve-url-loader/index.js",
- "options": Object {
- "root": "ROOT/src",
- "sourceMap": true,
- },
- },
- Object {
- "loader": "NODE_MODULES/sass-loader/dist/cjs.js",
- "options": Object {
- "sourceMap": true,
- },
- },
- ],
- },
- Object {
- "test": "/\\\\.module\\\\.(scss|sass)$/",
- "use": Array [
- Object {
- "loader": "NODE_MODULES/mini-css-extract-plugin/dist/loader.js",
- "options": Object {
- "publicPath": "../../",
- },
- },
- Object {
- "loader": "NODE_MODULES/css-loader/dist/cjs.js",
- "options": Object {
- "importLoaders": 3,
- "modules": Object {
- "getLocalIdent": [Function],
- },
- "sourceMap": true,
- },
- },
- Object {
- "loader": "NODE_MODULES/postcss-loader/src/index.js",
- "options": Object {
- "ident": "postcss",
- "plugins": [Function],
- "sourceMap": true,
- },
- },
- Object {
- "loader": "NODE_MODULES/resolve-url-loader/index.js",
- "options": Object {
- "root": "ROOT/src",
- "sourceMap": true,
- },
- },
- Object {
- "loader": "NODE_MODULES/sass-loader/dist/cjs.js",
- "options": Object {
- "sourceMap": true,
- },
- },
- ],
- },
- Object {
- "exclude": Array [
- "/\\\\.(js|mjs|jsx|ts|tsx)$/",
- "/\\\\.html$/",
- "/\\\\.json$/",
- "/\\\\.(ejs|md|mdx)$/",
- ],
- "loader": "NODE_MODULES/file-loader/dist/cjs.js",
- "options": Object {
- "name": "static/media/[name].[hash:8].[ext]",
- },
- },
- ],
- },
- Object {
- "include": "NODE_MODULES[\\\\\\\\/](@storybook[\\\\\\\\/]node_logger|@testing-library[\\\\\\\\/]dom|@testing-library[\\\\\\\\/]user-event|acorn-jsx|ansi-align|ansi-colors|ansi-escapes|ansi-regex|ansi-styles|better-opn|boxen|camelcase|chalk|color-convert|commander|find-cache-dir|find-up|fs-extra|highlight.js|json5|node-fetch|pkg-dir|prettier|pretty-format|react-dev-utils|resolve-from|semver|slash|strip-ansi|uuid)/",
- "test": "/\\\\.js$/",
- "use": Array [
- Object {
- "loader": "NODE_MODULES/babel-loader/lib/index.js",
- "options": Object {
- "presets": Array [
- Array [
- "@babel/preset-env",
- Object {
- "targets": Object {
- "ie": "11",
- },
- },
- "storybook-addon-ie11",
- ],
- ],
- "sourceType": "unambiguous",
+ "skipCsf": false,
},
},
],
},
- Object {
- "include": "NODE_MODULES\\\\/acorn-jsx/",
- "test": "/\\\\.js$/",
- "use": Array [
- Object {
- "loader": "NODE_MODULES/babel-loader/lib/index.js",
- "options": Object {
- "presets": Array [
- Array [
- "NODE_MODULES/@babel/preset-env/lib/index.js",
- Object {
- "modules": "commonjs",
- },
- ],
- ],
- },
- },
- ],
- },
- Object {
- "test": "/(stories|story)\\\\.mdx$/",
- "use": Array [
- Object {
- "loader": "NODE_MODULES/babel-loader/lib/index.js",
- "options": Object {
- "babelrc": false,
- "cacheDirectory": "NODE_MODULES/.cache/storybook/babel",
- "configFile": false,
- "overrides": Array [
- Object {
- "plugins": Array [
- Array [
- "NODE_MODULES/babel-plugin-react-docgen/lib/index.js",
- Object {
- "DOC_GEN_COLLECTION_NAME": "STORYBOOK_REACT_CLASSES",
- },
- ],
- ],
- "test": "/\\\\.(mjs|jsx?)$/",
- },
- ],
- "plugins": Array [
- Array [
- "NODE_MODULES/@babel/plugin-transform-react-jsx/lib/index.js",
- Object {
- "pragma": "React.createElement",
- "pragmaFrag": "React.Fragment",
- },
- ],
- ],
- "presets": Array [
- Array [
- "@babel/preset-env",
- Object {
- "targets": Object {
- "ie": "11",
- },
- },
- "storybook-addon-ie11",
- ],
- ],
- },
- },
- Object {
- "loader": "NODE_MODULES/@storybook/mdx1-csf/loader.js",
- },
- ],
- },
Object {
"exclude": "/(stories|story)\\\\.mdx$/",
"test": "/\\\\.mdx$/",
diff --git a/lib/core-server/src/__snapshots__/html-kitchen-sink_preview-dev-posix b/lib/core-server/src/__snapshots__/html-kitchen-sink_preview-dev-posix
index fef4e5b1e09b..c98798f86d23 100644
--- a/lib/core-server/src/__snapshots__/html-kitchen-sink_preview-dev-posix
+++ b/lib/core-server/src/__snapshots__/html-kitchen-sink_preview-dev-posix
@@ -308,6 +308,13 @@ Object {
},
Object {
"loader": "NODE_MODULES/@storybook/mdx1-csf/loader.js",
+ "options": Object {
+ "remarkPlugins": Array [
+ [Function],
+ [Function],
+ ],
+ "skipCsf": false,
+ },
},
],
},
diff --git a/lib/core-server/src/__snapshots__/html-kitchen-sink_preview-prod-posix b/lib/core-server/src/__snapshots__/html-kitchen-sink_preview-prod-posix
index d1c67aacb001..781b466edb09 100644
--- a/lib/core-server/src/__snapshots__/html-kitchen-sink_preview-prod-posix
+++ b/lib/core-server/src/__snapshots__/html-kitchen-sink_preview-prod-posix
@@ -307,6 +307,13 @@ Object {
},
Object {
"loader": "NODE_MODULES/@storybook/mdx1-csf/loader.js",
+ "options": Object {
+ "remarkPlugins": Array [
+ [Function],
+ [Function],
+ ],
+ "skipCsf": false,
+ },
},
],
},
diff --git a/lib/core-server/src/__snapshots__/vue-3-cli_preview-dev-posix b/lib/core-server/src/__snapshots__/vue-3-cli_preview-dev-posix
index ab76b4d0c1c7..b087bf7584c8 100644
--- a/lib/core-server/src/__snapshots__/vue-3-cli_preview-dev-posix
+++ b/lib/core-server/src/__snapshots__/vue-3-cli_preview-dev-posix
@@ -339,6 +339,13 @@ Object {
},
Object {
"loader": "NODE_MODULES/@storybook/mdx1-csf/loader.js",
+ "options": Object {
+ "remarkPlugins": Array [
+ [Function],
+ [Function],
+ ],
+ "skipCsf": false,
+ },
},
],
},
diff --git a/lib/core-server/src/__snapshots__/vue-3-cli_preview-prod-posix b/lib/core-server/src/__snapshots__/vue-3-cli_preview-prod-posix
index c769b18749c7..28b3c31f2b9f 100644
--- a/lib/core-server/src/__snapshots__/vue-3-cli_preview-prod-posix
+++ b/lib/core-server/src/__snapshots__/vue-3-cli_preview-prod-posix
@@ -338,6 +338,13 @@ Object {
},
Object {
"loader": "NODE_MODULES/@storybook/mdx1-csf/loader.js",
+ "options": Object {
+ "remarkPlugins": Array [
+ [Function],
+ [Function],
+ ],
+ "skipCsf": false,
+ },
},
],
},
diff --git a/lib/core-server/src/__snapshots__/web-components-kitchen-sink_preview-dev-posix b/lib/core-server/src/__snapshots__/web-components-kitchen-sink_preview-dev-posix
index 12efbe2571e2..a3ad95644eba 100644
--- a/lib/core-server/src/__snapshots__/web-components-kitchen-sink_preview-dev-posix
+++ b/lib/core-server/src/__snapshots__/web-components-kitchen-sink_preview-dev-posix
@@ -341,6 +341,13 @@ Object {
},
Object {
"loader": "NODE_MODULES/@storybook/mdx1-csf/loader.js",
+ "options": Object {
+ "remarkPlugins": Array [
+ [Function],
+ [Function],
+ ],
+ "skipCsf": false,
+ },
},
],
},
diff --git a/lib/core-server/src/__snapshots__/web-components-kitchen-sink_preview-prod-posix b/lib/core-server/src/__snapshots__/web-components-kitchen-sink_preview-prod-posix
index 0a9453609940..d80d84edc4f0 100644
--- a/lib/core-server/src/__snapshots__/web-components-kitchen-sink_preview-prod-posix
+++ b/lib/core-server/src/__snapshots__/web-components-kitchen-sink_preview-prod-posix
@@ -340,6 +340,13 @@ Object {
},
Object {
"loader": "NODE_MODULES/@storybook/mdx1-csf/loader.js",
+ "options": Object {
+ "remarkPlugins": Array [
+ [Function],
+ [Function],
+ ],
+ "skipCsf": false,
+ },
},
],
},
diff --git a/lib/core-server/src/utils/StoryIndexGenerator.ts b/lib/core-server/src/utils/StoryIndexGenerator.ts
index 8a0d69cb4997..80323b8cea62 100644
--- a/lib/core-server/src/utils/StoryIndexGenerator.ts
+++ b/lib/core-server/src/utils/StoryIndexGenerator.ts
@@ -88,7 +88,7 @@ export class StoryIndexGenerator {
const importPath = slash(normalizeStoryPath(relativePath));
const makeTitle = (userTitle?: string) => {
return userOrAutoTitleFromSpecifier(importPath, specifier, userTitle);
- }
+ };
const csf = (await readCsfOrMdx(absolutePath, { makeTitle })).parse();
csf.stories.forEach(({ id, name }) => {
fileStories[id] = {
diff --git a/lib/store/src/autoTitle.test.ts b/lib/store/src/autoTitle.test.ts
index 112448ff4059..b7e95b6e7268 100644
--- a/lib/store/src/autoTitle.test.ts
+++ b/lib/store/src/autoTitle.test.ts
@@ -18,18 +18,25 @@ const winOptions = {
};
describe('userOrAutoTitleFromSpecifier', () => {
-
describe('user title', () => {
it('no match', () => {
expect(
- userOrAuto('./ path / to / file.stories.js', normalizeStoriesEntry({ directory: './ other' }, options), 'title')
+ userOrAuto(
+ './ path / to / file.stories.js',
+ normalizeStoriesEntry({ directory: './ other' }, options),
+ 'title'
+ )
).toBeFalsy();
});
describe('no trailing slash', () => {
it('match with no titlePrefix', () => {
expect(
- userOrAuto('./path/to/file.stories.js', normalizeStoriesEntry({ directory: './path' }, options), 'title')
+ userOrAuto(
+ './path/to/file.stories.js',
+ normalizeStoriesEntry({ directory: './path' }, options),
+ 'title'
+ )
).toMatchInlineSnapshot(`title`);
});
@@ -77,7 +84,11 @@ describe('userOrAutoTitleFromSpecifier', () => {
describe('trailing slash', () => {
it('match with no titlePrefix', () => {
expect(
- userOrAuto('./path/to/file.stories.js', normalizeStoriesEntry({ directory: './path/' }, options), 'title')
+ userOrAuto(
+ './path/to/file.stories.js',
+ normalizeStoriesEntry({ directory: './path/' }, options),
+ 'title'
+ )
).toMatchInlineSnapshot(`title`);
});
@@ -126,14 +137,22 @@ describe('userOrAutoTitleFromSpecifier', () => {
describe('auto title', () => {
it('no match', () => {
expect(
- userOrAuto('./ path / to / file.stories.js', normalizeStoriesEntry({ directory: './ other' }, options), undefined)
+ userOrAuto(
+ './ path / to / file.stories.js',
+ normalizeStoriesEntry({ directory: './ other' }, options),
+ undefined
+ )
).toBeFalsy();
});
describe('no trailing slash', () => {
it('match with no titlePrefix', () => {
expect(
- userOrAuto('./path/to/file.stories.js', normalizeStoriesEntry({ directory: './path' }, options), undefined)
+ userOrAuto(
+ './path/to/file.stories.js',
+ normalizeStoriesEntry({ directory: './path' }, options),
+ undefined
+ )
).toMatchInlineSnapshot(`to/file`);
});
@@ -201,7 +220,11 @@ describe('userOrAutoTitleFromSpecifier', () => {
describe('trailing slash', () => {
it('match with no titlePrefix', () => {
expect(
- userOrAuto('./path/to/file.stories.js', normalizeStoriesEntry({ directory: './path/' }, options), undefined)
+ userOrAuto(
+ './path/to/file.stories.js',
+ normalizeStoriesEntry({ directory: './path/' }, options),
+ undefined
+ )
).toMatchInlineSnapshot(`to/file`);
});
diff --git a/lib/telemetry/src/get-monorepo-type.ts b/lib/telemetry/src/get-monorepo-type.ts
index 9f49ce41cdf8..e9c628c521dd 100644
--- a/lib/telemetry/src/get-monorepo-type.ts
+++ b/lib/telemetry/src/get-monorepo-type.ts
@@ -27,7 +27,7 @@ export const getMonorepoType = (): MonorepoType => {
if (monorepoType) {
return monorepoType;
}
-
+
if (!fs.existsSync(path.join(projectRootPath, 'package.json'))) return undefined;
const packageJson = fs.readJsonSync(path.join(projectRootPath, 'package.json')) as PackageJson;
diff --git a/yarn.lock b/yarn.lock
index f9ad2f2b9d49..a62818fb7421 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -16443,9 +16443,9 @@ __metadata:
linkType: hard
"caniuse-lite@npm:^1.0.0, caniuse-lite@npm:^1.0.30000981, caniuse-lite@npm:^1.0.30001032, caniuse-lite@npm:^1.0.30001035, caniuse-lite@npm:^1.0.30001109, caniuse-lite@npm:^1.0.30001125, caniuse-lite@npm:^1.0.30001181, caniuse-lite@npm:^1.0.30001297, caniuse-lite@npm:^1.0.30001312":
- version: 1.0.30001312
- resolution: "caniuse-lite@npm:1.0.30001312"
- checksum: 9969d14a76fde0dcde7a6c486a15340bcc4ccda57a3bca92c8e81c67e816a1629a4a68ddaca0c9918dfc4872bfb5391fcb0659a93ef6d8430c692a322264ec64
+ version: 1.0.30001416
+ resolution: "caniuse-lite@npm:1.0.30001416"
+ checksum: 7f0550fdd57f859b35bd999d0031fa4ed911b884bde0fe26b2305683a81d69c551f83055113d1e7f2d5acf9d6fa6aed79f71bf51067d4da39fc1a2718e231626
languageName: node
linkType: hard