From 7a06c9303b75b2112871c065826fb6f16e46aa78 Mon Sep 17 00:00:00 2001 From: Aleksander Grygier Date: Fri, 17 Nov 2023 14:08:01 +0100 Subject: [PATCH 001/131] feat: Update packages to match Svelte 5 (Beta) --- code/renderers/svelte/package.json | 4 +- code/yarn.lock | 116 ++++++++++++++++++++++++++--- node_modules/.yarn-state.yml | 2 +- 3 files changed, 110 insertions(+), 12 deletions(-) diff --git a/code/renderers/svelte/package.json b/code/renderers/svelte/package.json index a30f5c8963f7..6f8813d092f4 100644 --- a/code/renderers/svelte/package.json +++ b/code/renderers/svelte/package.json @@ -64,8 +64,8 @@ }, "devDependencies": { "expect-type": "^0.15.0", - "svelte": "^4.0.0", - "svelte-check": "3.4.6", + "svelte": "^5.0.0-next.1", + "svelte-check": "^3.6.0", "typescript": "^5.0.4" }, "peerDependencies": { diff --git a/code/yarn.lock b/code/yarn.lock index ba6d74b8127a..5b237890673f 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -7562,8 +7562,8 @@ __metadata: "@storybook/preview-api": "workspace:*" "@storybook/types": "workspace:*" expect-type: "npm:^0.15.0" - svelte: "npm:^4.0.0" - svelte-check: "npm:3.4.6" + svelte: "npm:^5.0.0-next.1" + svelte-check: "npm:^3.6.0" sveltedoc-parser: "npm:^4.2.1" ts-dedent: "npm:^2.0.0" type-fest: "npm:~2.19" @@ -11237,6 +11237,15 @@ __metadata: languageName: node linkType: hard +"axobject-query@npm:^4.0.0": + version: 4.0.0 + resolution: "axobject-query@npm:4.0.0" + dependencies: + dequal: "npm:^2.0.3" + checksum: 4d756b5c2ff099f1c7f99e55a5de9b2066cb2a13a3170185ff34bfec2d7bcab81eb820a4e7340d35c251341b61ebee6e705b7ce64db78224df1df5a4d68448fe + languageName: node + linkType: hard + "b4a@npm:^1.6.4": version: 1.6.4 resolution: "b4a@npm:1.6.4" @@ -15738,6 +15747,13 @@ __metadata: languageName: node linkType: hard +"esm-env@npm:^1.0.0": + version: 1.0.0 + resolution: "esm-env@npm:1.0.0" + checksum: 6ea0001410224ebc18de4a83ce97dbdca6abc83ea4bbe91625aa3aead70793bb98dfa089f38e2cc5c13b7b025668d0649d5e25f2f9e8cca0f4aa3ad3406870d0 + languageName: node + linkType: hard + "espree@npm:9.2.0": version: 9.2.0 resolution: "espree@npm:9.2.0" @@ -15779,6 +15795,16 @@ __metadata: languageName: node linkType: hard +"esrap@npm:^1.1.1": + version: 1.1.1 + resolution: "esrap@npm:1.1.1" + dependencies: + "@jridgewell/sourcemap-codec": "npm:^1.4.15" + "@types/estree": "npm:^1.0.1" + checksum: 2ff0dc7262eadc300a90c94477809f62d4c55784d55498b712407ed1c76d08db2afb6ba63a0d8c051ae235732bda1899acd29112b275df0f5c52a574f39c4a88 + languageName: node + linkType: hard + "esrecurse@npm:^4.3.0": version: 4.3.0 resolution: "esrecurse@npm:4.3.0" @@ -21176,7 +21202,7 @@ __metadata: languageName: node linkType: hard -"magic-string@npm:^0.30.5": +"magic-string@npm:^0.30.4, magic-string@npm:^0.30.5": version: 0.30.5 resolution: "magic-string@npm:0.30.5" dependencies: @@ -28279,9 +28305,9 @@ __metadata: languageName: node linkType: hard -"svelte-check@npm:3.4.6": - version: 3.4.6 - resolution: "svelte-check@npm:3.4.6" +"svelte-check@npm:^3.6.0": + version: 3.6.0 + resolution: "svelte-check@npm:3.6.0" dependencies: "@jridgewell/trace-mapping": "npm:^0.3.17" chokidar: "npm:^3.4.1" @@ -28289,13 +28315,13 @@ __metadata: import-fresh: "npm:^3.2.1" picocolors: "npm:^1.0.0" sade: "npm:^1.7.4" - svelte-preprocess: "npm:^5.0.4" + svelte-preprocess: "npm:^5.1.0" typescript: "npm:^5.0.3" peerDependencies: - svelte: ^3.55.0 || ^4.0.0-next.0 || ^4.0.0 + svelte: ^3.55.0 || ^4.0.0-next.0 || ^4.0.0 || ^5.0.0-next.0 bin: svelte-check: bin/svelte-check - checksum: 7f537831af8f2c47859ca72f4a929d24c58f2946f949f7c9721351be97ff9d0674c57db003e3ad3883fdd85761b7950c5c11513c2a917c91091f155e2d026350 + checksum: 3aca0b80d99f28945d8880cbc784b66c7a34120c58ac2acd8e3c7c4c9c10b9fba64236a263d8ccf901e809d03d931a9310bcaaa4e4059bd6742be904418d28b8 languageName: node linkType: hard @@ -28383,6 +28409,52 @@ __metadata: languageName: node linkType: hard +"svelte-preprocess@npm:^5.1.0": + version: 5.1.0 + resolution: "svelte-preprocess@npm:5.1.0" + dependencies: + "@types/pug": "npm:^2.0.6" + detect-indent: "npm:^6.1.0" + magic-string: "npm:^0.27.0" + sorcery: "npm:^0.11.0" + strip-indent: "npm:^3.0.0" + peerDependencies: + "@babel/core": ^7.10.2 + coffeescript: ^2.5.1 + less: ^3.11.3 || ^4.0.0 + postcss: ^7 || ^8 + postcss-load-config: ^2.1.0 || ^3.0.0 || ^4.0.0 + pug: ^3.0.0 + sass: ^1.26.8 + stylus: ^0.55.0 + sugarss: ^2.0.0 || ^3.0.0 || ^4.0.0 + svelte: ^3.23.0 || ^4.0.0-next.0 || ^4.0.0 || ^5.0.0-next.0 + typescript: ">=3.9.5 || ^4.0.0 || ^5.0.0" + peerDependenciesMeta: + "@babel/core": + optional: true + coffeescript: + optional: true + less: + optional: true + postcss: + optional: true + postcss-load-config: + optional: true + pug: + optional: true + sass: + optional: true + stylus: + optional: true + sugarss: + optional: true + typescript: + optional: true + checksum: fb40153aa282edadad68221fcf82db1b7c67a208941b136c529fd843d1e8b595d79e9d39e5f252672e11a8b62c621ccf2078de4a57e5adbb89e13046998ae597 + languageName: node + linkType: hard + "svelte@npm:^4.0.0": version: 4.2.1 resolution: "svelte@npm:4.2.1" @@ -28404,6 +28476,25 @@ __metadata: languageName: node linkType: hard +"svelte@npm:^5.0.0-next.1": + version: 5.0.0-next.4 + resolution: "svelte@npm:5.0.0-next.4" + dependencies: + "@ampproject/remapping": "npm:^2.2.1" + "@jridgewell/sourcemap-codec": "npm:^1.4.15" + acorn: "npm:^8.10.0" + aria-query: "npm:^5.3.0" + axobject-query: "npm:^4.0.0" + esm-env: "npm:^1.0.0" + esrap: "npm:^1.1.1" + is-reference: "npm:^3.0.1" + locate-character: "npm:^3.0.0" + magic-string: "npm:^0.30.4" + zimmerframe: "npm:^1.1.0" + checksum: 97de5cc54d83a4d909a0dca9173432041797b1c95877a1d906cb0eab6796d8d197c71a6a3c35f5a579b597791ce765f71cfd818254245eac2b782602af4a3969 + languageName: node + linkType: hard + "sveltedoc-parser@npm:^4.2.1": version: 4.3.1 resolution: "sveltedoc-parser@npm:4.3.1" @@ -31479,6 +31570,13 @@ __metadata: languageName: node linkType: hard +"zimmerframe@npm:^1.1.0": + version: 1.1.0 + resolution: "zimmerframe@npm:1.1.0" + checksum: dffe3f555bb000176ed9c7577e0fb0c3eddeceb6df9bb3ff870995bac3a51b40fab5443bd3dc47ce91c1f8ecf07282742efb80771ae6a088edc0340bb217f93d + languageName: node + linkType: hard + "zod@npm:^3.22.2": version: 3.22.4 resolution: "zod@npm:3.22.4" diff --git a/node_modules/.yarn-state.yml b/node_modules/.yarn-state.yml index af981fec0a05..a6b1a224e847 100644 --- a/node_modules/.yarn-state.yml +++ b/node_modules/.yarn-state.yml @@ -7,4 +7,4 @@ __metadata: "@storybook/root@workspace:.": locations: - - "" \ No newline at end of file + - "" From 27c2b3cbf2dadb626b25f85b854d7398f6f2fffb Mon Sep 17 00:00:00 2001 From: Aleksander Grygier Date: Fri, 17 Nov 2023 14:12:01 +0100 Subject: [PATCH 002/131] feat: Update code for Svelte's `render.ts` --- code/renderers/svelte/src/render.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code/renderers/svelte/src/render.ts b/code/renderers/svelte/src/render.ts index cfde36047fa1..93884636c7a2 100644 --- a/code/renderers/svelte/src/render.ts +++ b/code/renderers/svelte/src/render.ts @@ -10,6 +10,7 @@ import { RESET_STORY_ARGS } from '@storybook/core-events'; // eslint-disable-next-line import/no-extraneous-dependencies import PreviewRender from '@storybook/svelte/templates/PreviewRender.svelte'; import { addons } from '@storybook/preview-api'; +import { mount } from 'svelte'; import type { SvelteRenderer } from './types'; @@ -66,7 +67,7 @@ export function renderToCanvas( } if (!existingComponent || remount) { - const createdComponent = new PreviewRender({ + const createdComponent = mount(PreviewRender, { target: canvasElement, props: { storyFn, @@ -75,7 +76,7 @@ export function renderToCanvas( kind, showError, }, - }) as SvelteComponentTyped; + }); componentsByDomElement.set(canvasElement, createdComponent); } else { existingComponent.$set({ From 5ea0ac92ac30718cdbca4dd0da0e86eb26cfeec2 Mon Sep 17 00:00:00 2001 From: Aleksander Grygier Date: Mon, 20 Nov 2023 18:49:43 +0100 Subject: [PATCH 003/131] feat: Use `createRoot` function to render `PreviewRender` --- code/renderers/svelte/src/render.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/renderers/svelte/src/render.ts b/code/renderers/svelte/src/render.ts index 93884636c7a2..cb196d0fcedb 100644 --- a/code/renderers/svelte/src/render.ts +++ b/code/renderers/svelte/src/render.ts @@ -10,7 +10,7 @@ import { RESET_STORY_ARGS } from '@storybook/core-events'; // eslint-disable-next-line import/no-extraneous-dependencies import PreviewRender from '@storybook/svelte/templates/PreviewRender.svelte'; import { addons } from '@storybook/preview-api'; -import { mount } from 'svelte'; +import { createRoot } from 'svelte'; import type { SvelteRenderer } from './types'; @@ -67,7 +67,7 @@ export function renderToCanvas( } if (!existingComponent || remount) { - const createdComponent = mount(PreviewRender, { + const createdComponent = createRoot(PreviewRender, { target: canvasElement, props: { storyFn, From 67c4c633e407146a1122e865a1970b2da7677444 Mon Sep 17 00:00:00 2001 From: Aleksander Grygier Date: Mon, 20 Nov 2023 18:50:27 +0100 Subject: [PATCH 004/131] refactor: Remove legacy `$on` event --- code/renderers/svelte/templates/SlotDecorator.svelte | 7 ------- 1 file changed, 7 deletions(-) diff --git a/code/renderers/svelte/templates/SlotDecorator.svelte b/code/renderers/svelte/templates/SlotDecorator.svelte index 5bd0fdfe3455..a438eaa3603a 100644 --- a/code/renderers/svelte/templates/SlotDecorator.svelte +++ b/code/renderers/svelte/templates/SlotDecorator.svelte @@ -13,13 +13,6 @@ // instance can be undefined if a decorator doesn't have return instance || decoratorInstance; } - - if (on) { - // Attach svelte event listeners. - Object.keys(on).forEach((eventName) => { - onMount(() => getInstance().$on(eventName, on[eventName])); - }); - } {#if decorator} From baf72a6bc538ebdbc6280e7a4e1ab0cb9f8c219b Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Wed, 22 Nov 2023 14:31:36 +0100 Subject: [PATCH 005/131] expand svelte dependency version ranges --- code/frameworks/svelte-vite/package.json | 4 ++-- code/frameworks/svelte-webpack5/package.json | 2 +- code/frameworks/sveltekit/package.json | 2 +- code/presets/svelte-webpack/package.json | 2 +- code/renderers/svelte/package.json | 2 +- code/yarn.lock | 12 ++++++------ 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/code/frameworks/svelte-vite/package.json b/code/frameworks/svelte-vite/package.json index f3e5a150af8f..d276d11b0ae8 100644 --- a/code/frameworks/svelte-vite/package.json +++ b/code/frameworks/svelte-vite/package.json @@ -58,12 +58,12 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "svelte": "^4.0.0", + "svelte": "^5.0.0-next.1", "typescript": "~5.2.2", "vite": "^4.0.0" }, "peerDependencies": { - "svelte": "^3.0.0 || ^4.0.0", + "svelte": "^5.0.0-next.1", "vite": "^3.0.0 || ^4.0.0 || ^5.0.0" }, "engines": { diff --git a/code/frameworks/svelte-webpack5/package.json b/code/frameworks/svelte-webpack5/package.json index abc69e6aeb85..77615995c0e9 100644 --- a/code/frameworks/svelte-webpack5/package.json +++ b/code/frameworks/svelte-webpack5/package.json @@ -59,7 +59,7 @@ }, "peerDependencies": { "@babel/core": "*", - "svelte": "^3.48.0 || ^4.0.0", + "svelte": "^4.0.0 || ^5.0.0-next.1", "svelte-loader": "*" }, "engines": { diff --git a/code/frameworks/sveltekit/package.json b/code/frameworks/sveltekit/package.json index eb9d0a5c035d..7f5e5a579743 100644 --- a/code/frameworks/sveltekit/package.json +++ b/code/frameworks/sveltekit/package.json @@ -60,7 +60,7 @@ "vite": "^4.0.0" }, "peerDependencies": { - "svelte": "^3.0.0 || ^4.0.0", + "svelte": "^4.0.0 || ^5.0.0-next.1", "vite": "^4.0.0" }, "engines": { diff --git a/code/presets/svelte-webpack/package.json b/code/presets/svelte-webpack/package.json index e6052778e332..e4fa3abaf7cc 100644 --- a/code/presets/svelte-webpack/package.json +++ b/code/presets/svelte-webpack/package.json @@ -76,7 +76,7 @@ }, "peerDependencies": { "@babel/core": "*", - "svelte": "^3.1.0 || ^4.0.0", + "svelte": "^4.0.0 || ^5.0.0-next.1", "svelte-loader": "*" }, "engines": { diff --git a/code/renderers/svelte/package.json b/code/renderers/svelte/package.json index e6e492d74d29..042272730777 100644 --- a/code/renderers/svelte/package.json +++ b/code/renderers/svelte/package.json @@ -68,7 +68,7 @@ "typescript": "^5.0.4" }, "peerDependencies": { - "svelte": "^3.1.0 || ^4.0.0" + "svelte": "^4.0.0 || ^5.0.0-next.1" }, "engines": { "node": ">=16.0.0" diff --git a/code/yarn.lock b/code/yarn.lock index a98c62f4b975..531a174f10f6 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -6694,7 +6694,7 @@ __metadata: typescript: "npm:~5.2.2" peerDependencies: "@babel/core": "*" - svelte: ^3.1.0 || ^4.0.0 + svelte: ^4.0.0 || ^5.0.0-next.1 svelte-loader: "*" languageName: unknown linkType: soft @@ -7172,14 +7172,14 @@ __metadata: "@sveltejs/vite-plugin-svelte": "npm:^2.4.2" "@types/node": "npm:^18.0.0" magic-string: "npm:^0.30.0" - svelte: "npm:^4.0.0" + svelte: "npm:^5.0.0-next.1" svelte-preprocess: "npm:^5.0.4" sveltedoc-parser: "npm:^4.2.1" ts-dedent: "npm:^2.2.0" typescript: "npm:~5.2.2" vite: "npm:^4.0.0" peerDependencies: - svelte: ^3.0.0 || ^4.0.0 + svelte: ^5.0.0-next.1 vite: ^3.0.0 || ^4.0.0 || ^5.0.0 languageName: unknown linkType: soft @@ -7197,7 +7197,7 @@ __metadata: typescript: "npm:~5.2.2" peerDependencies: "@babel/core": "*" - svelte: ^3.48.0 || ^4.0.0 + svelte: ^4.0.0 || ^5.0.0-next.1 svelte-loader: "*" languageName: unknown linkType: soft @@ -7220,7 +7220,7 @@ __metadata: type-fest: "npm:~2.19" typescript: "npm:^5.0.4" peerDependencies: - svelte: ^3.1.0 || ^4.0.0 + svelte: ^4.0.0 || ^5.0.0-next.1 languageName: unknown linkType: soft @@ -7235,7 +7235,7 @@ __metadata: typescript: "npm:^4.9.3" vite: "npm:^4.0.0" peerDependencies: - svelte: ^3.0.0 || ^4.0.0 + svelte: ^4.0.0 || ^5.0.0-next.1 vite: ^4.0.0 languageName: unknown linkType: soft From 6561d0c820a5e37d699b4ec20cdd9c0cc4321a6d Mon Sep 17 00:00:00 2001 From: Kyle Meenehan Date: Wed, 29 Nov 2023 10:09:19 +0200 Subject: [PATCH 006/131] make webpackFinal consistent across docs --- docs/snippets/common/main-config-webpack-final.js.mdx | 2 +- docs/snippets/common/main-config-webpack-final.ts.mdx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/snippets/common/main-config-webpack-final.js.mdx b/docs/snippets/common/main-config-webpack-final.js.mdx index 65d346eb38db..4c583dca901f 100644 --- a/docs/snippets/common/main-config-webpack-final.js.mdx +++ b/docs/snippets/common/main-config-webpack-final.js.mdx @@ -5,7 +5,7 @@ export default { // Replace your-framework with the framework you are using (e.g., react-webpack5, vue3-vite) framework: '@storybook/your-framework', stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'], - async webpackFinal(config, { configType }) { + webpackFinal: async (config, { configType }) => { if (configType === 'DEVELOPMENT') { // Modify config for development } diff --git a/docs/snippets/common/main-config-webpack-final.ts.mdx b/docs/snippets/common/main-config-webpack-final.ts.mdx index c3d1e9aa2185..35d69858d07c 100644 --- a/docs/snippets/common/main-config-webpack-final.ts.mdx +++ b/docs/snippets/common/main-config-webpack-final.ts.mdx @@ -7,7 +7,7 @@ import type { StorybookConfig } from '@storybook/your-framework'; const config: StorybookConfig = { framework: '@storybook/your-framework', stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'], - async webpackFinal(config, { configType }) { + webpackFinal: async (config, { configType }) => { if (configType === 'DEVELOPMENT') { // Modify config for development } From 68983e8f4bbc51c63520a453693ca510c277a45c Mon Sep 17 00:00:00 2001 From: Shaun Lloyd Date: Mon, 27 Nov 2023 14:51:46 -0500 Subject: [PATCH 007/131] Create function to execute creation script --- code/lib/cli/src/utils.ts | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/code/lib/cli/src/utils.ts b/code/lib/cli/src/utils.ts index fcd861860992..ce08ce45ac5f 100644 --- a/code/lib/cli/src/utils.ts +++ b/code/lib/cli/src/utils.ts @@ -1,8 +1,10 @@ +import chalk from 'chalk'; import type { WriteStream } from 'fs-extra'; import { move, remove, writeFile, readFile, createWriteStream } from 'fs-extra'; import { join } from 'path'; import tempy from 'tempy'; import { rendererPackages } from '@storybook/core-common'; +import { logger } from '@storybook/node-logger'; import type { JsPackageManager } from './js-package-manager'; export function parseList(str: string): string[] { @@ -130,3 +132,32 @@ export const isCorePackage = (pkg: string) => pkg.startsWith('@storybook/') && !pkg.startsWith('@storybook/preset-') && !PACKAGES_EXCLUDED_FROM_CORE.includes(pkg); + +/** + * + * @param command A shell command string to execute. + * @param options Options to pass to the node `spawn` function. + * @returns A promise that resolves when the command has finished executing. + */ +export const exec = async (command: string, options: Record) => { + const { spawn } = await import('cross-spawn'); + return new Promise((resolve, reject) => { + const child = spawn(command, { + ...options, + shell: true, + stdio: 'pipe', + }); + + child.stderr.pipe(process.stdout); + child.stdout.pipe(process.stdout); + + child.on('exit', (code) => { + if (code === 0) { + resolve(undefined); + } else { + logger.error(chalk.red(`An error occurred while executing: \`${command}\``)); + reject(new Error(`Command failed with exit code: ${code}`)); + } + }); + }); +}; From 07f08a36b2996a99b21e2020d36cabf747c49ac7 Mon Sep 17 00:00:00 2001 From: Shaun Lloyd Date: Mon, 27 Nov 2023 14:52:25 -0500 Subject: [PATCH 008/131] Create flow to scaffold a new project --- code/lib/cli/src/scaffold-new-project.ts | 176 +++++++++++++++++++++++ 1 file changed, 176 insertions(+) create mode 100644 code/lib/cli/src/scaffold-new-project.ts diff --git a/code/lib/cli/src/scaffold-new-project.ts b/code/lib/cli/src/scaffold-new-project.ts new file mode 100644 index 000000000000..a837fa7f87ad --- /dev/null +++ b/code/lib/cli/src/scaffold-new-project.ts @@ -0,0 +1,176 @@ +import boxen from 'boxen'; +import chalk from 'chalk'; +import prompts from 'prompts'; +import dedent from 'ts-dedent'; +import { logger } from '@storybook/node-logger'; + +import type { PackageManagerName } from './js-package-manager'; +import { exec } from './utils'; + +type CoercedPackageManagerName = 'npm' | 'yarn' | 'pnpm'; + +interface SupportedProject { + displayName: { + type: string; + builder?: string; + language: string; + }; + createScript: Record; +} + +/** + * The supported projects. + */ +const SUPPORTED_PROJECTS: Record = { + 'react-vite-ts': { + displayName: { + type: 'React', + builder: 'Vite', + language: 'TS', + }, + createScript: { + npm: 'npm create vite@latest --yes . -- --template react-ts', + yarn: 'yarn create vite@latest --yes . --template react-ts', + pnpm: 'pnpm create vite@latest --yes . --template react-ts && pnpm i --prefer-offline', + }, + }, + 'nextjs-ts': { + displayName: { + type: 'Next.js', + language: 'TS', + }, + createScript: { + npm: 'npm create next-app . -- --typescript --use-npm --eslint --tailwind --app --import-alias="@/*" --src-dir', + yarn: 'yarn create next-app . --typescript --use-yarn --eslint --tailwind --app --import-alias="@/*" --src-dir', + pnpm: 'pnpm create next-app . --typescript --use-pnpm --eslint --tailwind --app --import-alias="@/*" --src-dir && pnpm i --prefer-offline', + }, + }, + 'vue-vite-ts': { + displayName: { + type: 'Vue 3', + builder: 'Vite', + language: 'TS', + }, + createScript: { + npm: 'npm create vite@latest --yes . -- --template vue-ts', + yarn: 'yarn create vite@latest --yes . --template vue-ts', + pnpm: 'pnpm create vite@latest --yes . --template vue-ts && pnpm i --prefer-offline', + }, + }, + 'angular-cli': { + displayName: { + type: 'Angular', + language: 'TS', + }, + createScript: { + npm: 'npx -p @angular/cli@latest ng new angular-latest --directory . --routing=true --minimal=true --style=scss --strict --skip-git --skip-install', + yarn: 'yarn dlx -p @angular/cli ng new angular-latest --directory . --routing=true --minimal=true --style=scss --strict --skip-git --package-manager=yarn --skip-install && touch yarn.lock && yarn set version berry && yarn config set nodeLinker node-modules', + pnpm: 'pnpm --package @angular/cli dlx ng new angular-latest --directory . --routing=true --minimal=true --style=scss --strict --skip-git --package-manager=pnpm --skip-install && pnpm i --prefer-offline', + }, + }, + 'lit-vite-ts': { + displayName: { + type: 'Lit', + builder: 'Vite', + language: 'TS', + }, + createScript: { + npm: 'npm create vite@latest --yes . -- --template lit-ts', + yarn: 'yarn create vite . --yes --template lit-ts && touch yarn.lock && yarn set version berry && yarn config set nodeLinker pnp', + pnpm: 'pnpm create vite@latest . --yes --template lit-ts && cd . && pnpm i --prefer-offline', + }, + }, +}; + +const packageManagerToCoercedName = ( + packageManager: PackageManagerName +): CoercedPackageManagerName => { + switch (packageManager) { + case 'npm': + return 'npm'; + case 'pnpm': + return 'pnpm'; + default: + return 'yarn'; + } +}; + +const buildProjectDisplayNameForPrint = ({ displayName }: SupportedProject) => { + const { type, builder, language } = displayName; + return `${chalk.bold.blue(type)} ${builder ? `+ ${builder} ` : ''}(${language})`; +}; + +/** + * Scaffold a new project. + * + * @param packageManager The package manager to use. + */ +export const scaffoldNewProject = async (packageManager: PackageManagerName) => { + const packageManagerName = packageManagerToCoercedName(packageManager); + + logger.plain( + boxen( + dedent` + Would you like to generate a new project from the following list? + + ${chalk.bold('Note:')} + Storybook supports many more frameworks and bundlers than listed below. If you don't see your + preferred setup, you can still generate a project then rerun this command to add Storybook. + + ${chalk.bold('Press ^C at any time to quit.')} + `, + { + title: chalk.bold('πŸ”Ž Empty directory detected'), + padding: 1, + margin: 1, + borderStyle: 'double', + borderColor: 'yellow', + } + ) + ); + + const { project } = await prompts( + { + type: 'select', + name: 'project', + message: 'Choose a project template', + choices: Object.entries(SUPPORTED_PROJECTS).map(([key, value]) => ({ + title: buildProjectDisplayNameForPrint(value), + value: key, + })), + }, + { onCancel: () => process.exit(0) } + ); + + const projectStrategy = SUPPORTED_PROJECTS[project]; + const projectDisplayName = buildProjectDisplayNameForPrint(projectStrategy); + const createScript = projectStrategy.createScript[packageManagerName]; + + try { + logger.plain(''); + logger.plain( + `Creating a new "${projectDisplayName}" project with ${chalk.bold(packageManagerName)}...` + ); + await exec(createScript, { stdio: 'inherit' }); + } catch (e) { + // TODO: replace with categorized error + throw new Error(`Failed to create a new project with ${chalk.bold(packageManagerName)}`); + } + + logger.plain( + boxen( + dedent` + "${projectDisplayName}" project with ${chalk.bold(packageManagerName)} created successfully! + + Continuing with Storybook installation... + `, + { + title: chalk.bold('βœ… Success!'), + padding: 1, + margin: 1, + borderStyle: 'double', + borderColor: 'green', + } + ) + ); +}; From 8817642ea6be357bf9118b6c4622c85b88665b15 Mon Sep 17 00:00:00 2001 From: Shaun Lloyd Date: Mon, 27 Nov 2023 14:54:37 -0500 Subject: [PATCH 009/131] Plug scaffold flow into storybook init --- code/lib/cli/src/initiate.ts | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/code/lib/cli/src/initiate.ts b/code/lib/cli/src/initiate.ts index 8811b88c5d85..870b646216e1 100644 --- a/code/lib/cli/src/initiate.ts +++ b/code/lib/cli/src/initiate.ts @@ -36,6 +36,7 @@ import { JsPackageManagerFactory, useNpmWarning } from './js-package-manager'; import type { NpmOptions } from './NpmOptions'; import type { CommandOptions, GeneratorOptions } from './generators/types'; import { HandledError } from './HandledError'; +import { scaffoldNewProject } from './scaffold-new-project'; const logger = console; @@ -307,15 +308,10 @@ async function doInitiate( updateCheckInterval: 1000 * 60 * 60, // every hour (we could increase this later on.) }); + // Check if the current directory is empty. if (options.force !== true && isEmptyDir) { - logger.log( - boxen(getEmptyDirMessage(packageManager.type), { - borderStyle: 'round', - padding: 1, - borderColor: '#F1618C', - }) - ); - throw new HandledError('Project was initialized in an empty directory.'); + // Prompt the user to create a new project from our list. + await scaffoldNewProject(packageManager.type); } let projectType: ProjectType; From ee01b4438b2cb98a37f2ebaa320b4d360bdd4b2b Mon Sep 17 00:00:00 2001 From: Shaun Lloyd Date: Tue, 28 Nov 2023 09:11:34 -0500 Subject: [PATCH 010/131] Don't use app router --- code/lib/cli/src/scaffold-new-project.ts | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/code/lib/cli/src/scaffold-new-project.ts b/code/lib/cli/src/scaffold-new-project.ts index a837fa7f87ad..b23470d0691d 100644 --- a/code/lib/cli/src/scaffold-new-project.ts +++ b/code/lib/cli/src/scaffold-new-project.ts @@ -3,6 +3,7 @@ import chalk from 'chalk'; import prompts from 'prompts'; import dedent from 'ts-dedent'; import { logger } from '@storybook/node-logger'; +import { GenerateNewProjectOnInitError } from '@storybook/core-events/server-errors'; import type { PackageManagerName } from './js-package-manager'; import { exec } from './utils'; @@ -40,9 +41,9 @@ const SUPPORTED_PROJECTS: Record = { language: 'TS', }, createScript: { - npm: 'npm create next-app . -- --typescript --use-npm --eslint --tailwind --app --import-alias="@/*" --src-dir', - yarn: 'yarn create next-app . --typescript --use-yarn --eslint --tailwind --app --import-alias="@/*" --src-dir', - pnpm: 'pnpm create next-app . --typescript --use-pnpm --eslint --tailwind --app --import-alias="@/*" --src-dir && pnpm i --prefer-offline', + npm: 'npm create next-app . -- --typescript --use-npm --eslint --tailwind --no-app --import-alias="@/*" --src-dir', + yarn: 'yarn create next-app . --typescript --use-yarn --eslint --tailwind --no-app --import-alias="@/*" --src-dir', + pnpm: 'pnpm create next-app . --typescript --use-pnpm --eslint --tailwind --no-app --import-alias="@/*" --src-dir && pnpm i --prefer-offline', }, }, 'vue-vite-ts': { @@ -153,8 +154,11 @@ export const scaffoldNewProject = async (packageManager: PackageManagerName) => ); await exec(createScript, { stdio: 'inherit' }); } catch (e) { - // TODO: replace with categorized error - throw new Error(`Failed to create a new project with ${chalk.bold(packageManagerName)}`); + throw new GenerateNewProjectOnInitError({ + error: e, + packageManager: packageManagerName, + projectType: projectDisplayName, + }); } logger.plain( From 96b624e21af5b05b376743a0fe5a0f367bd0db22 Mon Sep 17 00:00:00 2001 From: Shaun Lloyd Date: Tue, 28 Nov 2023 09:12:01 -0500 Subject: [PATCH 011/131] Add empty project error --- .../core-events/src/errors/server-errors.ts | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/code/lib/core-events/src/errors/server-errors.ts b/code/lib/core-events/src/errors/server-errors.ts index f4ecab544773..bacdd7d6055e 100644 --- a/code/lib/core-events/src/errors/server-errors.ts +++ b/code/lib/core-events/src/errors/server-errors.ts @@ -410,3 +410,25 @@ export class NoMatchingExportError extends StorybookError { `; } } + +export class GenerateNewProjectOnInitError extends StorybookError { + readonly category = Category.CLI_INIT; + + readonly code = 3; + + constructor( + public data: { error: unknown | Error; packageManager: string; projectType: string } + ) { + super(); + } + + template(): string { + return dedent` + There was an error while using ${this.data.packageManager} to create a new ${ + this.data.projectType + } project. + + ${this.data.error instanceof Error ? this.data.error.message : ''} + `; + } +} From 607c52368bc1fb55d5158959f4b056e68231ca9d Mon Sep 17 00:00:00 2001 From: Shaun Lloyd Date: Tue, 28 Nov 2023 09:41:59 -0500 Subject: [PATCH 012/131] Remove prefers offline --- code/lib/cli/src/scaffold-new-project.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/code/lib/cli/src/scaffold-new-project.ts b/code/lib/cli/src/scaffold-new-project.ts index b23470d0691d..ffea00fbc4cb 100644 --- a/code/lib/cli/src/scaffold-new-project.ts +++ b/code/lib/cli/src/scaffold-new-project.ts @@ -32,7 +32,7 @@ const SUPPORTED_PROJECTS: Record = { createScript: { npm: 'npm create vite@latest --yes . -- --template react-ts', yarn: 'yarn create vite@latest --yes . --template react-ts', - pnpm: 'pnpm create vite@latest --yes . --template react-ts && pnpm i --prefer-offline', + pnpm: 'pnpm create vite@latest --yes . --template react-ts && pnpm i', }, }, 'nextjs-ts': { @@ -43,7 +43,7 @@ const SUPPORTED_PROJECTS: Record = { createScript: { npm: 'npm create next-app . -- --typescript --use-npm --eslint --tailwind --no-app --import-alias="@/*" --src-dir', yarn: 'yarn create next-app . --typescript --use-yarn --eslint --tailwind --no-app --import-alias="@/*" --src-dir', - pnpm: 'pnpm create next-app . --typescript --use-pnpm --eslint --tailwind --no-app --import-alias="@/*" --src-dir && pnpm i --prefer-offline', + pnpm: 'pnpm create next-app . --typescript --use-pnpm --eslint --tailwind --no-app --import-alias="@/*" --src-dir && pnpm i', }, }, 'vue-vite-ts': { @@ -55,7 +55,7 @@ const SUPPORTED_PROJECTS: Record = { createScript: { npm: 'npm create vite@latest --yes . -- --template vue-ts', yarn: 'yarn create vite@latest --yes . --template vue-ts', - pnpm: 'pnpm create vite@latest --yes . --template vue-ts && pnpm i --prefer-offline', + pnpm: 'pnpm create vite@latest --yes . --template vue-ts && pnpm i', }, }, 'angular-cli': { @@ -66,7 +66,7 @@ const SUPPORTED_PROJECTS: Record = { createScript: { npm: 'npx -p @angular/cli@latest ng new angular-latest --directory . --routing=true --minimal=true --style=scss --strict --skip-git --skip-install', yarn: 'yarn dlx -p @angular/cli ng new angular-latest --directory . --routing=true --minimal=true --style=scss --strict --skip-git --package-manager=yarn --skip-install && touch yarn.lock && yarn set version berry && yarn config set nodeLinker node-modules', - pnpm: 'pnpm --package @angular/cli dlx ng new angular-latest --directory . --routing=true --minimal=true --style=scss --strict --skip-git --package-manager=pnpm --skip-install && pnpm i --prefer-offline', + pnpm: 'pnpm --package @angular/cli dlx ng new angular-latest --directory . --routing=true --minimal=true --style=scss --strict --skip-git --package-manager=pnpm --skip-install && pnpm i', }, }, 'lit-vite-ts': { @@ -78,7 +78,7 @@ const SUPPORTED_PROJECTS: Record = { createScript: { npm: 'npm create vite@latest --yes . -- --template lit-ts', yarn: 'yarn create vite . --yes --template lit-ts && touch yarn.lock && yarn set version berry && yarn config set nodeLinker pnp', - pnpm: 'pnpm create vite@latest . --yes --template lit-ts && cd . && pnpm i --prefer-offline', + pnpm: 'pnpm create vite@latest . --yes --template lit-ts && cd . && pnpm i', }, }, }; From 6145b5dc5985adb40a61d97c080a5a279b2c7004 Mon Sep 17 00:00:00 2001 From: Shaun Lloyd Date: Tue, 28 Nov 2023 09:52:37 -0500 Subject: [PATCH 013/131] Use execa --- code/lib/cli/src/scaffold-new-project.ts | 9 ++++++-- code/lib/cli/src/utils.ts | 29 ------------------------ 2 files changed, 7 insertions(+), 31 deletions(-) diff --git a/code/lib/cli/src/scaffold-new-project.ts b/code/lib/cli/src/scaffold-new-project.ts index ffea00fbc4cb..440596af04d7 100644 --- a/code/lib/cli/src/scaffold-new-project.ts +++ b/code/lib/cli/src/scaffold-new-project.ts @@ -2,11 +2,11 @@ import boxen from 'boxen'; import chalk from 'chalk'; import prompts from 'prompts'; import dedent from 'ts-dedent'; +import execa from 'execa'; import { logger } from '@storybook/node-logger'; import { GenerateNewProjectOnInitError } from '@storybook/core-events/server-errors'; import type { PackageManagerName } from './js-package-manager'; -import { exec } from './utils'; type CoercedPackageManagerName = 'npm' | 'yarn' | 'pnpm'; @@ -152,7 +152,12 @@ export const scaffoldNewProject = async (packageManager: PackageManagerName) => logger.plain( `Creating a new "${projectDisplayName}" project with ${chalk.bold(packageManagerName)}...` ); - await exec(createScript, { stdio: 'inherit' }); + await execa.command(createScript, { + stdio: 'pipe', + shell: true, + cwd: process.cwd(), + cleanup: true, + }); } catch (e) { throw new GenerateNewProjectOnInitError({ error: e, diff --git a/code/lib/cli/src/utils.ts b/code/lib/cli/src/utils.ts index ce08ce45ac5f..119baed08542 100644 --- a/code/lib/cli/src/utils.ts +++ b/code/lib/cli/src/utils.ts @@ -132,32 +132,3 @@ export const isCorePackage = (pkg: string) => pkg.startsWith('@storybook/') && !pkg.startsWith('@storybook/preset-') && !PACKAGES_EXCLUDED_FROM_CORE.includes(pkg); - -/** - * - * @param command A shell command string to execute. - * @param options Options to pass to the node `spawn` function. - * @returns A promise that resolves when the command has finished executing. - */ -export const exec = async (command: string, options: Record) => { - const { spawn } = await import('cross-spawn'); - return new Promise((resolve, reject) => { - const child = spawn(command, { - ...options, - shell: true, - stdio: 'pipe', - }); - - child.stderr.pipe(process.stdout); - child.stdout.pipe(process.stdout); - - child.on('exit', (code) => { - if (code === 0) { - resolve(undefined); - } else { - logger.error(chalk.red(`An error occurred while executing: \`${command}\``)); - reject(new Error(`Command failed with exit code: ${code}`)); - } - }); - }); -}; From 1c62a97d58a6052cc3757debeaaa6b74e3f832dd Mon Sep 17 00:00:00 2001 From: Shaun Lloyd Date: Tue, 28 Nov 2023 09:59:20 -0500 Subject: [PATCH 014/131] Remove left right margins from boxen --- code/lib/cli/src/scaffold-new-project.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/code/lib/cli/src/scaffold-new-project.ts b/code/lib/cli/src/scaffold-new-project.ts index 440596af04d7..50f5fa987a96 100644 --- a/code/lib/cli/src/scaffold-new-project.ts +++ b/code/lib/cli/src/scaffold-new-project.ts @@ -123,12 +123,12 @@ export const scaffoldNewProject = async (packageManager: PackageManagerName) => { title: chalk.bold('πŸ”Ž Empty directory detected'), padding: 1, - margin: 1, borderStyle: 'double', borderColor: 'yellow', } ) ); + logger.line(1); const { project } = await prompts( { @@ -148,10 +148,11 @@ export const scaffoldNewProject = async (packageManager: PackageManagerName) => const createScript = projectStrategy.createScript[packageManagerName]; try { - logger.plain(''); + logger.line(1); logger.plain( `Creating a new "${projectDisplayName}" project with ${chalk.bold(packageManagerName)}...` ); + logger.line(1); await execa.command(createScript, { stdio: 'pipe', shell: true, @@ -176,10 +177,10 @@ export const scaffoldNewProject = async (packageManager: PackageManagerName) => { title: chalk.bold('βœ… Success!'), padding: 1, - margin: 1, borderStyle: 'double', borderColor: 'green', } ) ); + logger.line(1); }; From 7114d543fdd5e2e1fa8c2c21664732df87be827e Mon Sep 17 00:00:00 2001 From: Shaun Lloyd Date: Tue, 28 Nov 2023 10:29:05 -0500 Subject: [PATCH 015/131] Update docs to remove empty project callout --- docs/get-started/install.md | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/docs/get-started/install.md b/docs/get-started/install.md index 2d01dfd1a0f2..977a1e122c03 100644 --- a/docs/get-started/install.md +++ b/docs/get-started/install.md @@ -2,7 +2,7 @@ title: 'Install Storybook' --- -Use the Storybook CLI to install it in a single command. Run this inside your _existing project’s_ root directory: +Use the Storybook CLI to install it in a single command. Run this inside your project’s root directory: @@ -16,21 +16,6 @@ Use the Storybook CLI to install it in a single command. Run this inside your _e -
- -storybook init is not made for empty projects - -Storybook needs to be installed into a project that is already set up with a framework. It will not work on an empty project. There are many ways to bootstrap an app in a given framework, including: - -- πŸ“¦ [Create an Angular Workspace](https://angular.io/cli/new) -- πŸ“¦ [Create React App](https://reactjs.org/docs/create-a-new-react-app.html) -- πŸ“¦ [Create a Vue App](https://vuejs.org/guide/quick-start.html) -- πŸ“¦ [Ember CLI](https://guides.emberjs.com/release/getting-started/quick-start/) -- πŸ“¦ [Vite CLI](https://vitejs.dev/guide/#scaffolding-your-first-vite-project) -- Or any other tooling available. - -
- Storybook will look into your project's dependencies during its install process and provide you with the best configuration available. The command above will make the following changes to your local environment: From 43f5be56b6d0d279bc241e1d0599d93571c9198c Mon Sep 17 00:00:00 2001 From: Shaun Lloyd Date: Tue, 28 Nov 2023 10:46:44 -0500 Subject: [PATCH 016/131] Add env var to reselect new project --- code/lib/cli/src/generate.ts | 5 ++++ code/lib/cli/src/scaffold-new-project.ts | 36 +++++++++++++++--------- code/lib/cli/src/utils.ts | 3 +- 3 files changed, 28 insertions(+), 16 deletions(-) diff --git a/code/lib/cli/src/generate.ts b/code/lib/cli/src/generate.ts index bc396ec428b7..54212c8c7371 100644 --- a/code/lib/cli/src/generate.ts +++ b/code/lib/cli/src/generate.ts @@ -55,6 +55,11 @@ command('init') .option('-y --yes', 'Answer yes to all prompts') .option('-b --builder ', 'Builder library') .option('-l --linkable', 'Prepare installation for link (contributor helper)') + .option( + '--scaffold-project ', + 'Scaffold a new project', + process.env.STORYBOOK_SCAFFOLD_PROJECT + ) .action((options: CommandOptions) => { initiate(options, pkg).catch(() => process.exit(1)); }); diff --git a/code/lib/cli/src/scaffold-new-project.ts b/code/lib/cli/src/scaffold-new-project.ts index 50f5fa987a96..4b6d0282126c 100644 --- a/code/lib/cli/src/scaffold-new-project.ts +++ b/code/lib/cli/src/scaffold-new-project.ts @@ -106,7 +106,10 @@ const buildProjectDisplayNameForPrint = ({ displayName }: SupportedProject) => { * * @param packageManager The package manager to use. */ -export const scaffoldNewProject = async (packageManager: PackageManagerName) => { +export const scaffoldNewProject = async ( + packageManager: PackageManagerName, + { scaffoldProject }: { scaffoldProject: string } +) => { const packageManagerName = packageManagerToCoercedName(packageManager); logger.plain( @@ -130,20 +133,25 @@ export const scaffoldNewProject = async (packageManager: PackageManagerName) => ); logger.line(1); - const { project } = await prompts( - { - type: 'select', - name: 'project', - message: 'Choose a project template', - choices: Object.entries(SUPPORTED_PROJECTS).map(([key, value]) => ({ - title: buildProjectDisplayNameForPrint(value), - value: key, - })), - }, - { onCancel: () => process.exit(0) } - ); + let projectStrategy = SUPPORTED_PROJECTS[scaffoldProject]; + + if (!projectStrategy) { + const { project } = await prompts( + { + type: 'select', + name: 'project', + message: 'Choose a project template', + choices: Object.entries(SUPPORTED_PROJECTS).map(([key, value]) => ({ + title: buildProjectDisplayNameForPrint(value), + value: key, + })), + }, + { onCancel: () => process.exit(0) } + ); + + projectStrategy = SUPPORTED_PROJECTS[project]; + } - const projectStrategy = SUPPORTED_PROJECTS[project]; const projectDisplayName = buildProjectDisplayNameForPrint(projectStrategy); const createScript = projectStrategy.createScript[packageManagerName]; diff --git a/code/lib/cli/src/utils.ts b/code/lib/cli/src/utils.ts index 119baed08542..68839b7bfa8d 100644 --- a/code/lib/cli/src/utils.ts +++ b/code/lib/cli/src/utils.ts @@ -1,10 +1,9 @@ -import chalk from 'chalk'; import type { WriteStream } from 'fs-extra'; import { move, remove, writeFile, readFile, createWriteStream } from 'fs-extra'; import { join } from 'path'; import tempy from 'tempy'; import { rendererPackages } from '@storybook/core-common'; -import { logger } from '@storybook/node-logger'; + import type { JsPackageManager } from './js-package-manager'; export function parseList(str: string): string[] { From 33fca510bdb0ecdabfab659bbc3ba0a2dfcbf656 Mon Sep 17 00:00:00 2001 From: Shaun Lloyd Date: Tue, 28 Nov 2023 10:50:20 -0500 Subject: [PATCH 017/131] Add new option to types --- code/lib/cli/src/generators/types.ts | 2 ++ code/lib/cli/src/initiate.ts | 41 +----------------------- code/lib/cli/src/scaffold-new-project.ts | 3 +- 3 files changed, 5 insertions(+), 41 deletions(-) diff --git a/code/lib/cli/src/generators/types.ts b/code/lib/cli/src/generators/types.ts index 2f97a34df126..79a0d7d8ecd9 100644 --- a/code/lib/cli/src/generators/types.ts +++ b/code/lib/cli/src/generators/types.ts @@ -55,4 +55,6 @@ export type CommandOptions = { disableTelemetry?: boolean; enableCrashReports?: boolean; debug?: boolean; + // Automatically pick new project template when creating a new project + scaffoldProject?: string; }; diff --git a/code/lib/cli/src/initiate.ts b/code/lib/cli/src/initiate.ts index 870b646216e1..c135f5820ced 100644 --- a/code/lib/cli/src/initiate.ts +++ b/code/lib/cli/src/initiate.ts @@ -235,45 +235,6 @@ const projectTypeInquirer = async ( process.exit(0); }; -const getEmptyDirMessage = (packageManagerType: PackageManagerName) => { - const generatorCommandsMap = { - vite: { - npm: 'npm create vite@latest', - yarn1: 'yarn create vite', - yarn2: 'yarn create vite', - pnpm: 'pnpm create vite', - }, - angular: { - npm: 'npx -p @angular/cli ng new my-project --package-manager=npm', - yarn1: 'npx -p @angular/cli ng new my-project --package-manager=yarn', - yarn2: 'npx -p @angular/cli ng new my-project --package-manager=yarn', - pnpm: 'npx -p @angular/cli ng new my-project --package-manager=pnpm', - }, - }; - - return dedent` - Storybook cannot be installed into an empty project. We recommend creating a new project with the following: - - πŸ“¦ Vite CLI for React/Vue/Web Components => ${chalk.green( - generatorCommandsMap.vite[packageManagerType] - )} - See ${chalk.yellowBright('https://vitejs.dev/guide/#scaffolding-your-first-vite-project')} - - πŸ“¦ Angular CLI => ${chalk.green(generatorCommandsMap.angular[packageManagerType])} - See ${chalk.yellowBright('https://angular.io/cli/new')} - - πŸ“¦ Any other tooling of your choice - - Once you've created a project, please re-run ${chalk.green( - 'npx storybook@latest init' - )} inside the project root. For more information, see ${chalk.yellowBright( - 'https://storybook.js.org/docs' - )} - - Good luck! πŸš€ - `; -}; - async function doInitiate( options: CommandOptions, pkg: PackageJson @@ -311,7 +272,7 @@ async function doInitiate( // Check if the current directory is empty. if (options.force !== true && isEmptyDir) { // Prompt the user to create a new project from our list. - await scaffoldNewProject(packageManager.type); + await scaffoldNewProject(packageManager.type, options); } let projectType: ProjectType; diff --git a/code/lib/cli/src/scaffold-new-project.ts b/code/lib/cli/src/scaffold-new-project.ts index 4b6d0282126c..a525cb4c3bdf 100644 --- a/code/lib/cli/src/scaffold-new-project.ts +++ b/code/lib/cli/src/scaffold-new-project.ts @@ -7,6 +7,7 @@ import { logger } from '@storybook/node-logger'; import { GenerateNewProjectOnInitError } from '@storybook/core-events/server-errors'; import type { PackageManagerName } from './js-package-manager'; +import type { CommandOptions } from './generators/types'; type CoercedPackageManagerName = 'npm' | 'yarn' | 'pnpm'; @@ -108,7 +109,7 @@ const buildProjectDisplayNameForPrint = ({ displayName }: SupportedProject) => { */ export const scaffoldNewProject = async ( packageManager: PackageManagerName, - { scaffoldProject }: { scaffoldProject: string } + { scaffoldProject }: CommandOptions ) => { const packageManagerName = packageManagerToCoercedName(packageManager); From 8186fa716a621b6e3447733c9f5afd6926003437 Mon Sep 17 00:00:00 2001 From: Shaun Lloyd Date: Tue, 28 Nov 2023 12:59:53 -0500 Subject: [PATCH 018/131] fix linting warning --- code/lib/cli/src/initiate.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/lib/cli/src/initiate.ts b/code/lib/cli/src/initiate.ts index c135f5820ced..f0489b853cbe 100644 --- a/code/lib/cli/src/initiate.ts +++ b/code/lib/cli/src/initiate.ts @@ -31,7 +31,7 @@ import qwikGenerator from './generators/QWIK'; import svelteKitGenerator from './generators/SVELTEKIT'; import solidGenerator from './generators/SOLID'; import serverGenerator from './generators/SERVER'; -import type { JsPackageManager, PackageManagerName } from './js-package-manager'; +import type { JsPackageManager } from './js-package-manager'; import { JsPackageManagerFactory, useNpmWarning } from './js-package-manager'; import type { NpmOptions } from './NpmOptions'; import type { CommandOptions, GeneratorOptions } from './generators/types'; From 156ec8a1dea4f9203c6b48d68f527fa0c8f5b046 Mon Sep 17 00:00:00 2001 From: Shaun Lloyd Date: Tue, 28 Nov 2023 13:18:22 -0500 Subject: [PATCH 019/131] Infer package manager from user agent --- code/lib/cli/src/helpers.test.ts | 35 ++++++++++++++++++++++++++++++++ code/lib/cli/src/helpers.ts | 27 ++++++++++++++++++++++++ code/lib/cli/src/initiate.ts | 7 +++++-- 3 files changed, 67 insertions(+), 2 deletions(-) diff --git a/code/lib/cli/src/helpers.test.ts b/code/lib/cli/src/helpers.test.ts index c15ae604a1a9..d734ea04c4c3 100644 --- a/code/lib/cli/src/helpers.test.ts +++ b/code/lib/cli/src/helpers.test.ts @@ -177,4 +177,39 @@ describe('Helpers', () => { }).toThrowError(`Could not coerce ${invalidSemverString} into a semver.`); }); }); + describe('inferPackageManagerFromUserAgent', () => { + afterEach(() => { + delete process.env.npm_config_user_agent; + }); + + it('should return undefined for invalid user agent', () => { + process.env.npm_config_user_agent = ''; + expect(helpers.inferPackageManagerFromUserAgent()).toBeUndefined(); + }); + + it('should infer pnpm from user agent', () => { + process.env.npm_config_user_agent = 'pnpm/7.4.0'; + expect(helpers.inferPackageManagerFromUserAgent()).toBe('pnpm'); + }); + + it('should infer npm from user agent', () => { + process.env.npm_config_user_agent = 'npm/7.24.0'; + expect(helpers.inferPackageManagerFromUserAgent()).toBe('npm'); + }); + + it('should infer yarn 1 from user agent', () => { + process.env.npm_config_user_agent = 'yarn/1.22.11'; + expect(helpers.inferPackageManagerFromUserAgent()).toBe('yarn1'); + }); + + it('should infer yarn 2 from user agent', () => { + process.env.npm_config_user_agent = 'yarn/2.4.0'; + expect(helpers.inferPackageManagerFromUserAgent()).toBe('yarn2'); + }); + + it('should return undefined for unknown package manager', () => { + process.env.npm_config_user_agent = 'unknown'; + expect(helpers.inferPackageManagerFromUserAgent()).toBeUndefined(); + }); + }); }); diff --git a/code/lib/cli/src/helpers.ts b/code/lib/cli/src/helpers.ts index 605fab2d1849..edf2eb7ea4d0 100644 --- a/code/lib/cli/src/helpers.ts +++ b/code/lib/cli/src/helpers.ts @@ -13,6 +13,7 @@ import type { JsPackageManager, PackageJson, PackageJsonWithDepsAndDevDeps, + PackageManagerName, } from './js-package-manager'; import type { SupportedFrameworks, SupportedRenderers } from './project_types'; import { SupportedLanguage } from './project_types'; @@ -314,3 +315,29 @@ export function coerceSemver(version: string) { invariant(coercedSemver != null, `Could not coerce ${version} into a semver.`); return coercedSemver; } + +/** + * Infer the package manager based on the command the user is running. + * Each package manager sets the `npm_config_user_agent` environment variable with its name and version e.g. "npm/7.24.0" + * Which is really useful when invoking commands via npx/pnpx/yarn create/etc. + */ +export function inferPackageManagerFromUserAgent(): PackageManagerName { + const userAgent = process.env.npm_config_user_agent; + if (!userAgent) return 'npm'; + const packageSpec = userAgent.split(' ')[0]; + const [pkgMgrName, pkgMgrVersion] = packageSpec.split('/'); + + if (pkgMgrName === 'pnpm') { + return 'pnpm'; + } + + if (pkgMgrName === 'npm') { + return 'npm'; + } + + if (pkgMgrName === 'yarn') { + return `yarn${pkgMgrVersion?.startsWith('1.') ? '1' : '2'}`; + } + + return 'npm'; +} diff --git a/code/lib/cli/src/initiate.ts b/code/lib/cli/src/initiate.ts index f0489b853cbe..e8f706affa08 100644 --- a/code/lib/cli/src/initiate.ts +++ b/code/lib/cli/src/initiate.ts @@ -12,7 +12,7 @@ import { readdirSync } from 'fs-extra'; import type { Builder } from './project_types'; import { installableProjectTypes, ProjectType } from './project_types'; import { detect, isStorybookInstantiated, detectLanguage, detectPnp } from './detect'; -import { commandLog, codeLog, paddedLog } from './helpers'; +import { commandLog, codeLog, paddedLog, inferPackageManagerFromUserAgent } from './helpers'; import angularGenerator from './generators/ANGULAR'; import emberGenerator from './generators/EMBER'; import reactGenerator from './generators/REACT'; @@ -258,7 +258,10 @@ async function doInitiate( const isEmptyDir = cwdFolderEntries.length === 0 || cwdFolderEntries.every((entry) => entry.startsWith('.')); - const packageManager = JsPackageManagerFactory.getPackageManager({ force: pkgMgr }); + const packageManager = JsPackageManagerFactory.getPackageManager({ + force: pkgMgr || inferPackageManagerFromUserAgent(), + }); + const welcomeMessage = 'storybook init - the simplest way to add a Storybook to your project.'; logger.log(chalk.inverse(`\n ${welcomeMessage} \n`)); From de3dd2427e4f77c3eef7c7e9ae77f041d9b26bdd Mon Sep 17 00:00:00 2001 From: Shaun Lloyd Date: Wed, 29 Nov 2023 08:29:16 -0500 Subject: [PATCH 020/131] fix merge conflicts --- code/lib/cli/src/helpers.test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/lib/cli/src/helpers.test.ts b/code/lib/cli/src/helpers.test.ts index d734ea04c4c3..ae10b4d115fc 100644 --- a/code/lib/cli/src/helpers.test.ts +++ b/code/lib/cli/src/helpers.test.ts @@ -182,9 +182,9 @@ describe('Helpers', () => { delete process.env.npm_config_user_agent; }); - it('should return undefined for invalid user agent', () => { + it('should return npm for invalid user agent', () => { process.env.npm_config_user_agent = ''; - expect(helpers.inferPackageManagerFromUserAgent()).toBeUndefined(); + expect(helpers.inferPackageManagerFromUserAgent()).toBe('npm'); }); it('should infer pnpm from user agent', () => { @@ -207,9 +207,9 @@ describe('Helpers', () => { expect(helpers.inferPackageManagerFromUserAgent()).toBe('yarn2'); }); - it('should return undefined for unknown package manager', () => { + it('should return npm for unknown package manager', () => { process.env.npm_config_user_agent = 'unknown'; - expect(helpers.inferPackageManagerFromUserAgent()).toBeUndefined(); + expect(helpers.inferPackageManagerFromUserAgent()).toBe('npm'); }); }); }); From e329fb818ddf82c7677d40455bd4ba556e111ac7 Mon Sep 17 00:00:00 2001 From: Shaun Lloyd Date: Wed, 29 Nov 2023 08:35:29 -0500 Subject: [PATCH 021/131] Don't expose testing flag; Only use Env var --- code/lib/cli/src/generate.ts | 5 ----- code/lib/cli/src/initiate.ts | 2 +- code/lib/cli/src/scaffold-new-project.ts | 12 ++++++------ 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/code/lib/cli/src/generate.ts b/code/lib/cli/src/generate.ts index 54212c8c7371..bc396ec428b7 100644 --- a/code/lib/cli/src/generate.ts +++ b/code/lib/cli/src/generate.ts @@ -55,11 +55,6 @@ command('init') .option('-y --yes', 'Answer yes to all prompts') .option('-b --builder ', 'Builder library') .option('-l --linkable', 'Prepare installation for link (contributor helper)') - .option( - '--scaffold-project ', - 'Scaffold a new project', - process.env.STORYBOOK_SCAFFOLD_PROJECT - ) .action((options: CommandOptions) => { initiate(options, pkg).catch(() => process.exit(1)); }); diff --git a/code/lib/cli/src/initiate.ts b/code/lib/cli/src/initiate.ts index e8f706affa08..959938abe947 100644 --- a/code/lib/cli/src/initiate.ts +++ b/code/lib/cli/src/initiate.ts @@ -275,7 +275,7 @@ async function doInitiate( // Check if the current directory is empty. if (options.force !== true && isEmptyDir) { // Prompt the user to create a new project from our list. - await scaffoldNewProject(packageManager.type, options); + await scaffoldNewProject(packageManager.type); } let projectType: ProjectType; diff --git a/code/lib/cli/src/scaffold-new-project.ts b/code/lib/cli/src/scaffold-new-project.ts index a525cb4c3bdf..30865dc16728 100644 --- a/code/lib/cli/src/scaffold-new-project.ts +++ b/code/lib/cli/src/scaffold-new-project.ts @@ -7,7 +7,6 @@ import { logger } from '@storybook/node-logger'; import { GenerateNewProjectOnInitError } from '@storybook/core-events/server-errors'; import type { PackageManagerName } from './js-package-manager'; -import type { CommandOptions } from './generators/types'; type CoercedPackageManagerName = 'npm' | 'yarn' | 'pnpm'; @@ -107,10 +106,7 @@ const buildProjectDisplayNameForPrint = ({ displayName }: SupportedProject) => { * * @param packageManager The package manager to use. */ -export const scaffoldNewProject = async ( - packageManager: PackageManagerName, - { scaffoldProject }: CommandOptions -) => { +export const scaffoldNewProject = async (packageManager: PackageManagerName) => { const packageManagerName = packageManagerToCoercedName(packageManager); logger.plain( @@ -134,7 +130,11 @@ export const scaffoldNewProject = async ( ); logger.line(1); - let projectStrategy = SUPPORTED_PROJECTS[scaffoldProject]; + let projectStrategy; + + if (process.env.STORYBOOK_INIT_EMPTY_TYPE) { + projectStrategy = SUPPORTED_PROJECTS[process.env.STORYBOOK_INIT_EMPTY_TYPE]; + } if (!projectStrategy) { const { project } = await prompts( From 097a9c604e2d2eb9c3d170a798d6297dd96c49cd Mon Sep 17 00:00:00 2001 From: Shaun Lloyd Date: Wed, 29 Nov 2023 09:16:49 -0500 Subject: [PATCH 022/131] Don't install deps on create for pnpm --- code/lib/cli/src/scaffold-new-project.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/code/lib/cli/src/scaffold-new-project.ts b/code/lib/cli/src/scaffold-new-project.ts index 30865dc16728..a78530e91d1e 100644 --- a/code/lib/cli/src/scaffold-new-project.ts +++ b/code/lib/cli/src/scaffold-new-project.ts @@ -32,7 +32,7 @@ const SUPPORTED_PROJECTS: Record = { createScript: { npm: 'npm create vite@latest --yes . -- --template react-ts', yarn: 'yarn create vite@latest --yes . --template react-ts', - pnpm: 'pnpm create vite@latest --yes . --template react-ts && pnpm i', + pnpm: 'pnpm create vite@latest --yes . --template react-ts', }, }, 'nextjs-ts': { @@ -43,7 +43,7 @@ const SUPPORTED_PROJECTS: Record = { createScript: { npm: 'npm create next-app . -- --typescript --use-npm --eslint --tailwind --no-app --import-alias="@/*" --src-dir', yarn: 'yarn create next-app . --typescript --use-yarn --eslint --tailwind --no-app --import-alias="@/*" --src-dir', - pnpm: 'pnpm create next-app . --typescript --use-pnpm --eslint --tailwind --no-app --import-alias="@/*" --src-dir && pnpm i', + pnpm: 'pnpm create next-app . --typescript --use-pnpm --eslint --tailwind --no-app --import-alias="@/*" --src-dir', }, }, 'vue-vite-ts': { @@ -55,7 +55,7 @@ const SUPPORTED_PROJECTS: Record = { createScript: { npm: 'npm create vite@latest --yes . -- --template vue-ts', yarn: 'yarn create vite@latest --yes . --template vue-ts', - pnpm: 'pnpm create vite@latest --yes . --template vue-ts && pnpm i', + pnpm: 'pnpm create vite@latest --yes . --template vue-ts', }, }, 'angular-cli': { @@ -66,7 +66,7 @@ const SUPPORTED_PROJECTS: Record = { createScript: { npm: 'npx -p @angular/cli@latest ng new angular-latest --directory . --routing=true --minimal=true --style=scss --strict --skip-git --skip-install', yarn: 'yarn dlx -p @angular/cli ng new angular-latest --directory . --routing=true --minimal=true --style=scss --strict --skip-git --package-manager=yarn --skip-install && touch yarn.lock && yarn set version berry && yarn config set nodeLinker node-modules', - pnpm: 'pnpm --package @angular/cli dlx ng new angular-latest --directory . --routing=true --minimal=true --style=scss --strict --skip-git --package-manager=pnpm --skip-install && pnpm i', + pnpm: 'pnpm --package @angular/cli dlx ng new angular-latest --directory . --routing=true --minimal=true --style=scss --strict --skip-git --package-manager=pnpm --skip-install', }, }, 'lit-vite-ts': { @@ -78,7 +78,7 @@ const SUPPORTED_PROJECTS: Record = { createScript: { npm: 'npm create vite@latest --yes . -- --template lit-ts', yarn: 'yarn create vite . --yes --template lit-ts && touch yarn.lock && yarn set version berry && yarn config set nodeLinker pnp', - pnpm: 'pnpm create vite@latest . --yes --template lit-ts && cd . && pnpm i', + pnpm: 'pnpm create vite@latest . --yes --template lit-ts', }, }, }; From 85cd3effd78b8944695907c8941fabd45b4b1a45 Mon Sep 17 00:00:00 2001 From: Shaun Lloyd Date: Wed, 29 Nov 2023 10:55:41 -0500 Subject: [PATCH 023/131] Add empty dir sandboxes --- code/lib/cli/src/initiate.ts | 9 +- code/lib/cli/src/sandbox-templates.ts | 126 +++++++++++++++++++++++ code/lib/cli/src/scaffold-new-project.ts | 33 ++++-- 3 files changed, 151 insertions(+), 17 deletions(-) diff --git a/code/lib/cli/src/initiate.ts b/code/lib/cli/src/initiate.ts index 959938abe947..9ae63ccc71b8 100644 --- a/code/lib/cli/src/initiate.ts +++ b/code/lib/cli/src/initiate.ts @@ -8,7 +8,6 @@ import { NxProjectDetectedError } from '@storybook/core-events/server-errors'; import dedent from 'ts-dedent'; import boxen from 'boxen'; -import { readdirSync } from 'fs-extra'; import type { Builder } from './project_types'; import { installableProjectTypes, ProjectType } from './project_types'; import { detect, isStorybookInstantiated, detectLanguage, detectPnp } from './detect'; @@ -36,7 +35,7 @@ import { JsPackageManagerFactory, useNpmWarning } from './js-package-manager'; import type { NpmOptions } from './NpmOptions'; import type { CommandOptions, GeneratorOptions } from './generators/types'; import { HandledError } from './HandledError'; -import { scaffoldNewProject } from './scaffold-new-project'; +import { currentDirectoryIsEmpty, scaffoldNewProject } from './scaffold-new-project'; const logger = console; @@ -254,10 +253,6 @@ async function doInitiate( pkgMgr = 'npm'; } - const cwdFolderEntries = readdirSync(process.cwd()); - const isEmptyDir = - cwdFolderEntries.length === 0 || cwdFolderEntries.every((entry) => entry.startsWith('.')); - const packageManager = JsPackageManagerFactory.getPackageManager({ force: pkgMgr || inferPackageManagerFromUserAgent(), }); @@ -273,7 +268,7 @@ async function doInitiate( }); // Check if the current directory is empty. - if (options.force !== true && isEmptyDir) { + if (options.force !== true && currentDirectoryIsEmpty()) { // Prompt the user to create a new project from our list. await scaffoldNewProject(packageManager.type); } diff --git a/code/lib/cli/src/sandbox-templates.ts b/code/lib/cli/src/sandbox-templates.ts index 86b28646fb10..23bbc565b03d 100644 --- a/code/lib/cli/src/sandbox-templates.ts +++ b/code/lib/cli/src/sandbox-templates.ts @@ -496,6 +496,111 @@ const internalTemplates = { isInternal: true, skipTasks: ['bench'], }, + 'internal/npm/empty/react-vite/default-ts': { + name: 'Empty React + vite (npm)', + script: 'mkdir {{beforeDir}} && cd {{beforeDir}}', + expected: { ...baseTemplates['react-vite/default-ts'].expected }, + isInternal: true, + skipTasks: ['bench'], + }, + 'internal/pnpm/empty/react-vite/default-ts': { + name: 'Empty React + vite (pnpm)', + script: 'mkdir {{beforeDir}} && cd {{beforeDir}}', + expected: { ...baseTemplates['react-vite/default-ts'].expected }, + isInternal: true, + skipTasks: ['bench'], + }, + 'internal/yarn/empty/react-vite/default-ts': { + name: 'Empty React + vite (pnpm)', + script: 'mkdir {{beforeDir}} && cd {{beforeDir}}', + expected: { ...baseTemplates['react-vite/default-ts'].expected }, + isInternal: true, + skipTasks: ['bench'], + }, + 'internal/npm/empty/nextjs/default-ts': { + name: 'Empty Next.js (npm)', + script: 'mkdir {{beforeDir}} && cd {{beforeDir}}', + expected: { ...baseTemplates['nextjs/default-ts'].expected }, + isInternal: true, + skipTasks: ['bench'], + }, + 'internal/pnpm/empty/nextjs/default-ts': { + name: 'Empty Next.js (pnpm)', + script: 'mkdir {{beforeDir}} && cd {{beforeDir}}', + expected: { ...baseTemplates['nextjs/default-ts'].expected }, + isInternal: true, + skipTasks: ['bench'], + }, + 'internal/yarn/empty/nextjs/default-ts': { + name: 'Empty Next.js (pnpm)', + script: 'mkdir {{beforeDir}} && cd {{beforeDir}}', + expected: { ...baseTemplates['nextjs/default-ts'].expected }, + isInternal: true, + skipTasks: ['bench'], + }, + 'internal/npm/empty/vue3-vite/default-ts': { + name: 'Empty Vue 3 + vite (npm)', + script: 'mkdir {{beforeDir}} && cd {{beforeDir}}', + expected: { ...baseTemplates['vue3-vite/default-ts'].expected }, + isInternal: true, + skipTasks: ['bench'], + }, + 'internal/pnpm/empty/vue3-vite/default-ts': { + name: 'Empty Vue 3 + vite (pnpm)', + script: 'mkdir {{beforeDir}} && cd {{beforeDir}}', + expected: { ...baseTemplates['vue3-vite/default-ts'].expected }, + isInternal: true, + skipTasks: ['bench'], + }, + 'internal/yarn/empty/vue3-vite/default-ts': { + name: 'Empty Vue 3 + vite (pnpm)', + script: 'mkdir {{beforeDir}} && cd {{beforeDir}}', + expected: { ...baseTemplates['vue3-vite/default-ts'].expected }, + isInternal: true, + skipTasks: ['bench'], + }, + 'internal/npm/empty/angular-cli/default-ts': { + name: 'Empty Angular (npm)', + script: 'mkdir {{beforeDir}} && cd {{beforeDir}}', + expected: { ...baseTemplates['angular-cli/default-ts'].expected }, + isInternal: true, + skipTasks: ['bench'], + }, + 'internal/pnpm/empty/angular-cli/default-ts': { + name: 'Empty Angular (pnpm)', + script: 'mkdir {{beforeDir}} && cd {{beforeDir}}', + expected: { ...baseTemplates['angular-cli/default-ts'].expected }, + isInternal: true, + skipTasks: ['bench'], + }, + 'internal/yarn/empty/angular-cli/default-ts': { + name: 'Empty Angular (pnpm)', + script: 'mkdir {{beforeDir}} && cd {{beforeDir}}', + expected: { ...baseTemplates['angular-cli/default-ts'].expected }, + isInternal: true, + skipTasks: ['bench'], + }, + 'internal/npm/empty/lit-vite/default-ts': { + name: 'Empty Lit + vite (npm)', + script: 'mkdir {{beforeDir}} && cd {{beforeDir}}', + expected: { ...baseTemplates['lit-vite/default-ts'].expected }, + isInternal: true, + skipTasks: ['bench'], + }, + 'internal/pnpm/empty/lit-vite/default-ts': { + name: 'Empty Lit + vite (pnpm)', + script: 'mkdir {{beforeDir}} && cd {{beforeDir}}', + expected: { ...baseTemplates['lit-vite/default-ts'].expected }, + isInternal: true, + skipTasks: ['bench'], + }, + 'internal/yarn/empty/lit-vite/default-ts': { + name: 'Empty Lit + vite (pnpm)', + script: 'mkdir {{beforeDir}} && cd {{beforeDir}}', + expected: { ...baseTemplates['lit-vite/default-ts'].expected }, + isInternal: true, + skipTasks: ['bench'], + }, // 'internal/pnp': { // ...baseTemplates['cra/default-ts'], // name: 'PNP (cra/default-ts)', @@ -578,6 +683,7 @@ export const normal: TemplateKey[] = [ 'bench/react-vite-default-ts-test-build', 'bench/react-webpack-18-ts-test-build', ]; + export const merged: TemplateKey[] = [ ...normal, 'react-webpack/18-ts', @@ -588,6 +694,25 @@ export const merged: TemplateKey[] = [ 'html-webpack/default', 'html-vite/default-ts', ]; + +const emptyTemplateKeys: TemplateKey[] = [ + // 'internal/npm/empty/react-vite/default-ts', + // 'internal/pnpm/empty/react-vite/default-ts', + 'internal/yarn/empty/react-vite/default-ts', + // 'internal/npm/empty/nextjs/default-ts', + // 'internal/pnpm/empty/nextjs/default-ts', + 'internal/yarn/empty/nextjs/default-ts', + // 'internal/npm/empty/vue3-vite/default-ts', + // 'internal/pnpm/empty/vue3-vite/default-ts', + 'internal/yarn/empty/vue3-vite/default-ts', + // 'internal/npm/empty/angular-cli/default-ts', + // 'internal/pnpm/empty/angular-cli/default-ts', + 'internal/yarn/empty/angular-cli/default-ts', + // 'internal/npm/empty/lit-vite/default-ts', + // 'internal/pnpm/empty/lit-vite/default-ts', + 'internal/yarn/empty/lit-vite/default-ts', +]; + export const daily: TemplateKey[] = [ ...merged, 'angular-cli/prerelease', @@ -606,6 +731,7 @@ export const daily: TemplateKey[] = [ 'preact-webpack5/default-js', 'preact-vite/default-js', 'html-vite/default-js', + ...emptyTemplateKeys, ]; export const templatesByCadence = { normal, merged, daily }; diff --git a/code/lib/cli/src/scaffold-new-project.ts b/code/lib/cli/src/scaffold-new-project.ts index a78530e91d1e..59df8318ce72 100644 --- a/code/lib/cli/src/scaffold-new-project.ts +++ b/code/lib/cli/src/scaffold-new-project.ts @@ -3,6 +3,8 @@ import chalk from 'chalk'; import prompts from 'prompts'; import dedent from 'ts-dedent'; import execa from 'execa'; +import { readdirSync } from 'fs-extra'; + import { logger } from '@storybook/node-logger'; import { GenerateNewProjectOnInitError } from '@storybook/core-events/server-errors'; @@ -30,9 +32,9 @@ const SUPPORTED_PROJECTS: Record = { language: 'TS', }, createScript: { - npm: 'npm create vite@latest --yes . -- --template react-ts', - yarn: 'yarn create vite@latest --yes . --template react-ts', - pnpm: 'pnpm create vite@latest --yes . --template react-ts', + npm: 'npm create vite@latest . -- --template react-ts', + yarn: 'yarn create vite@latest . --template react-ts', + pnpm: 'pnpm create vite@latest . --template react-ts', }, }, 'nextjs-ts': { @@ -53,9 +55,9 @@ const SUPPORTED_PROJECTS: Record = { language: 'TS', }, createScript: { - npm: 'npm create vite@latest --yes . -- --template vue-ts', - yarn: 'yarn create vite@latest --yes . --template vue-ts', - pnpm: 'pnpm create vite@latest --yes . --template vue-ts', + npm: 'npm create vite@latest . -- --template vue-ts', + yarn: 'yarn create vite@latest . --template vue-ts', + pnpm: 'pnpm create vite@latest . --template vue-ts', }, }, 'angular-cli': { @@ -76,9 +78,9 @@ const SUPPORTED_PROJECTS: Record = { language: 'TS', }, createScript: { - npm: 'npm create vite@latest --yes . -- --template lit-ts', - yarn: 'yarn create vite . --yes --template lit-ts && touch yarn.lock && yarn set version berry && yarn config set nodeLinker pnp', - pnpm: 'pnpm create vite@latest . --yes --template lit-ts', + npm: 'npm create vite@latest . -- --template lit-ts', + yarn: 'yarn create vite . --template lit-ts && touch yarn.lock && yarn set version berry && yarn config set nodeLinker pnp', + pnpm: 'pnpm create vite@latest . --template lit-ts', }, }, }; @@ -107,7 +109,7 @@ const buildProjectDisplayNameForPrint = ({ displayName }: SupportedProject) => { * @param packageManager The package manager to use. */ export const scaffoldNewProject = async (packageManager: PackageManagerName) => { - const packageManagerName = packageManagerToCoercedName(packageManager); + const packageManagerName = 'pnpm'; // packageManagerToCoercedName(packageManager); logger.plain( boxen( @@ -193,3 +195,14 @@ export const scaffoldNewProject = async (packageManager: PackageManagerName) => ); logger.line(1); }; + +const IGNORED_FILES = ['.git', '.gitignore', '.DS_Store']; + +export const currentDirectoryIsEmpty = () => { + const cwdFolderEntries = readdirSync(process.cwd()); + + return ( + cwdFolderEntries.length === 0 || + cwdFolderEntries.every((entry) => IGNORED_FILES.includes(entry)) + ); +}; From b2daaec836df4ecc09627b5a3a2da8baf47d8288 Mon Sep 17 00:00:00 2001 From: Shaun Lloyd Date: Wed, 29 Nov 2023 11:15:44 -0500 Subject: [PATCH 024/131] Add optional env vars to templates --- code/lib/cli/src/sandbox-templates.ts | 49 +++++++++++++++++++++++++++ scripts/sandbox/generate.ts | 17 +++++++--- scripts/sandbox/utils/types.ts | 1 + 3 files changed, 62 insertions(+), 5 deletions(-) diff --git a/code/lib/cli/src/sandbox-templates.ts b/code/lib/cli/src/sandbox-templates.ts index 23bbc565b03d..dc45dce86e4e 100644 --- a/code/lib/cli/src/sandbox-templates.ts +++ b/code/lib/cli/src/sandbox-templates.ts @@ -31,6 +31,10 @@ export type Template = { * This is used to generate projects which are pushed to https://github.com/storybookjs/sandboxes */ script: string; + /** + * Environment variables to set when running the script. + */ + env?: Record; /** * Used to assert various things about the generated template. * If the template is generated with a different expected framework, it will fail, detecting a possible regression. @@ -499,6 +503,9 @@ const internalTemplates = { 'internal/npm/empty/react-vite/default-ts': { name: 'Empty React + vite (npm)', script: 'mkdir {{beforeDir}} && cd {{beforeDir}}', + env: { + STORYBOOK_INIT_EMPTY_TYPE: 'react-vite-ts', + }, expected: { ...baseTemplates['react-vite/default-ts'].expected }, isInternal: true, skipTasks: ['bench'], @@ -506,6 +513,9 @@ const internalTemplates = { 'internal/pnpm/empty/react-vite/default-ts': { name: 'Empty React + vite (pnpm)', script: 'mkdir {{beforeDir}} && cd {{beforeDir}}', + env: { + STORYBOOK_INIT_EMPTY_TYPE: 'react-vite-ts', + }, expected: { ...baseTemplates['react-vite/default-ts'].expected }, isInternal: true, skipTasks: ['bench'], @@ -513,6 +523,9 @@ const internalTemplates = { 'internal/yarn/empty/react-vite/default-ts': { name: 'Empty React + vite (pnpm)', script: 'mkdir {{beforeDir}} && cd {{beforeDir}}', + env: { + STORYBOOK_INIT_EMPTY_TYPE: 'react-vite-ts', + }, expected: { ...baseTemplates['react-vite/default-ts'].expected }, isInternal: true, skipTasks: ['bench'], @@ -520,6 +533,9 @@ const internalTemplates = { 'internal/npm/empty/nextjs/default-ts': { name: 'Empty Next.js (npm)', script: 'mkdir {{beforeDir}} && cd {{beforeDir}}', + env: { + STORYBOOK_INIT_EMPTY_TYPE: 'nextjs-ts', + }, expected: { ...baseTemplates['nextjs/default-ts'].expected }, isInternal: true, skipTasks: ['bench'], @@ -527,6 +543,9 @@ const internalTemplates = { 'internal/pnpm/empty/nextjs/default-ts': { name: 'Empty Next.js (pnpm)', script: 'mkdir {{beforeDir}} && cd {{beforeDir}}', + env: { + STORYBOOK_INIT_EMPTY_TYPE: 'nextjs-ts', + }, expected: { ...baseTemplates['nextjs/default-ts'].expected }, isInternal: true, skipTasks: ['bench'], @@ -534,6 +553,9 @@ const internalTemplates = { 'internal/yarn/empty/nextjs/default-ts': { name: 'Empty Next.js (pnpm)', script: 'mkdir {{beforeDir}} && cd {{beforeDir}}', + env: { + STORYBOOK_INIT_EMPTY_TYPE: 'nextjs-ts', + }, expected: { ...baseTemplates['nextjs/default-ts'].expected }, isInternal: true, skipTasks: ['bench'], @@ -541,6 +563,9 @@ const internalTemplates = { 'internal/npm/empty/vue3-vite/default-ts': { name: 'Empty Vue 3 + vite (npm)', script: 'mkdir {{beforeDir}} && cd {{beforeDir}}', + env: { + STORYBOOK_INIT_EMPTY_TYPE: 'vue-vite-ts', + }, expected: { ...baseTemplates['vue3-vite/default-ts'].expected }, isInternal: true, skipTasks: ['bench'], @@ -548,6 +573,9 @@ const internalTemplates = { 'internal/pnpm/empty/vue3-vite/default-ts': { name: 'Empty Vue 3 + vite (pnpm)', script: 'mkdir {{beforeDir}} && cd {{beforeDir}}', + env: { + STORYBOOK_INIT_EMPTY_TYPE: 'vue-vite-ts', + }, expected: { ...baseTemplates['vue3-vite/default-ts'].expected }, isInternal: true, skipTasks: ['bench'], @@ -555,6 +583,9 @@ const internalTemplates = { 'internal/yarn/empty/vue3-vite/default-ts': { name: 'Empty Vue 3 + vite (pnpm)', script: 'mkdir {{beforeDir}} && cd {{beforeDir}}', + env: { + STORYBOOK_INIT_EMPTY_TYPE: 'vue-vite-ts', + }, expected: { ...baseTemplates['vue3-vite/default-ts'].expected }, isInternal: true, skipTasks: ['bench'], @@ -562,6 +593,9 @@ const internalTemplates = { 'internal/npm/empty/angular-cli/default-ts': { name: 'Empty Angular (npm)', script: 'mkdir {{beforeDir}} && cd {{beforeDir}}', + env: { + STORYBOOK_INIT_EMPTY_TYPE: 'angular-cli', + }, expected: { ...baseTemplates['angular-cli/default-ts'].expected }, isInternal: true, skipTasks: ['bench'], @@ -569,6 +603,9 @@ const internalTemplates = { 'internal/pnpm/empty/angular-cli/default-ts': { name: 'Empty Angular (pnpm)', script: 'mkdir {{beforeDir}} && cd {{beforeDir}}', + env: { + STORYBOOK_INIT_EMPTY_TYPE: 'angular-cli', + }, expected: { ...baseTemplates['angular-cli/default-ts'].expected }, isInternal: true, skipTasks: ['bench'], @@ -576,6 +613,9 @@ const internalTemplates = { 'internal/yarn/empty/angular-cli/default-ts': { name: 'Empty Angular (pnpm)', script: 'mkdir {{beforeDir}} && cd {{beforeDir}}', + env: { + STORYBOOK_INIT_EMPTY_TYPE: 'angular-cli', + }, expected: { ...baseTemplates['angular-cli/default-ts'].expected }, isInternal: true, skipTasks: ['bench'], @@ -583,6 +623,9 @@ const internalTemplates = { 'internal/npm/empty/lit-vite/default-ts': { name: 'Empty Lit + vite (npm)', script: 'mkdir {{beforeDir}} && cd {{beforeDir}}', + env: { + STORYBOOK_INIT_EMPTY_TYPE: 'lit-vite-ts', + }, expected: { ...baseTemplates['lit-vite/default-ts'].expected }, isInternal: true, skipTasks: ['bench'], @@ -590,6 +633,9 @@ const internalTemplates = { 'internal/pnpm/empty/lit-vite/default-ts': { name: 'Empty Lit + vite (pnpm)', script: 'mkdir {{beforeDir}} && cd {{beforeDir}}', + env: { + STORYBOOK_INIT_EMPTY_TYPE: 'lit-vite-ts', + }, expected: { ...baseTemplates['lit-vite/default-ts'].expected }, isInternal: true, skipTasks: ['bench'], @@ -597,6 +643,9 @@ const internalTemplates = { 'internal/yarn/empty/lit-vite/default-ts': { name: 'Empty Lit + vite (pnpm)', script: 'mkdir {{beforeDir}} && cd {{beforeDir}}', + env: { + STORYBOOK_INIT_EMPTY_TYPE: 'lit-vite-ts', + }, expected: { ...baseTemplates['lit-vite/default-ts'].expected }, isInternal: true, skipTasks: ['bench'], diff --git a/scripts/sandbox/generate.ts b/scripts/sandbox/generate.ts index e14b8bac5f04..fc5ba32f03c6 100755 --- a/scripts/sandbox/generate.ts +++ b/scripts/sandbox/generate.ts @@ -28,7 +28,12 @@ import { LOCAL_REGISTRY_URL, } from '../utils/constants'; -const sbInit = async (cwd: string, flags?: string[], debug?: boolean) => { +const sbInit = async ( + cwd: string, + envVars: Record = {}, + flags?: string[], + debug?: boolean +) => { const sbCliBinaryPath = join(__dirname, `../../code/lib/cli/bin/index.js`); console.log(`🎁 Installing storybook`); const env = { STORYBOOK_DISABLE_TELEMETRY: 'true' }; @@ -61,11 +66,13 @@ const addStorybook = async ({ localRegistry, flags, debug, + env = {}, }: { baseDir: string; localRegistry: boolean; flags?: string[]; debug?: boolean; + env?: Record; }) => { const beforeDir = join(baseDir, BEFORE_DIR_NAME); const afterDir = join(baseDir, AFTER_DIR_NAME); @@ -84,10 +91,10 @@ const addStorybook = async ({ jackspeak: '2.1.1', }); - await sbInit(tmpDir, flags, debug); + await sbInit(tmpDir, env, flags, debug); }); } else { - await sbInit(tmpDir, flags, debug); + await sbInit(tmpDir, env, flags, debug); } } catch (e) { await remove(tmpDir); @@ -142,7 +149,7 @@ const runGenerators = async ( const limit = pLimit(1); await Promise.all( - generators.map(({ dirName, name, script, expected }) => + generators.map(({ dirName, name, script, expected, env }) => limit(async () => { let flags: string[] = []; if (expected.renderer === '@storybook/html') flags = ['--type html']; @@ -189,7 +196,7 @@ const runGenerators = async ( // Make sure there are no git projects in the folder await remove(join(beforeDir, '.git')); - await addStorybook({ baseDir, localRegistry, flags, debug }); + await addStorybook({ baseDir, localRegistry, flags, debug, env }); await addDocumentation(baseDir, { name, dirName }); diff --git a/scripts/sandbox/utils/types.ts b/scripts/sandbox/utils/types.ts index a9e61af5715d..39d4594aa6e5 100644 --- a/scripts/sandbox/utils/types.ts +++ b/scripts/sandbox/utils/types.ts @@ -6,4 +6,5 @@ export type GeneratorConfig = { renderer: string; builder: string; }; + env?: Record; }; From 0032ff2db3ceb3d80998dcb47e774b02567437d7 Mon Sep 17 00:00:00 2001 From: Shaun Lloyd Date: Wed, 29 Nov 2023 13:57:57 -0500 Subject: [PATCH 025/131] Skip all empty sandboxes --- code/lib/cli/src/sandbox-templates.ts | 40 +++++++++++++-------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/code/lib/cli/src/sandbox-templates.ts b/code/lib/cli/src/sandbox-templates.ts index dc45dce86e4e..c6eb3d068185 100644 --- a/code/lib/cli/src/sandbox-templates.ts +++ b/code/lib/cli/src/sandbox-templates.ts @@ -508,7 +508,7 @@ const internalTemplates = { }, expected: { ...baseTemplates['react-vite/default-ts'].expected }, isInternal: true, - skipTasks: ['bench'], + skipTasks: ['bench', 'e2e-tests-dev', 'chromatic'], }, 'internal/pnpm/empty/react-vite/default-ts': { name: 'Empty React + vite (pnpm)', @@ -518,7 +518,7 @@ const internalTemplates = { }, expected: { ...baseTemplates['react-vite/default-ts'].expected }, isInternal: true, - skipTasks: ['bench'], + skipTasks: ['bench', 'e2e-tests-dev', 'chromatic'], }, 'internal/yarn/empty/react-vite/default-ts': { name: 'Empty React + vite (pnpm)', @@ -528,7 +528,7 @@ const internalTemplates = { }, expected: { ...baseTemplates['react-vite/default-ts'].expected }, isInternal: true, - skipTasks: ['bench'], + skipTasks: ['bench', 'e2e-tests-dev', 'chromatic'], }, 'internal/npm/empty/nextjs/default-ts': { name: 'Empty Next.js (npm)', @@ -538,7 +538,7 @@ const internalTemplates = { }, expected: { ...baseTemplates['nextjs/default-ts'].expected }, isInternal: true, - skipTasks: ['bench'], + skipTasks: ['bench', 'e2e-tests-dev', 'chromatic'], }, 'internal/pnpm/empty/nextjs/default-ts': { name: 'Empty Next.js (pnpm)', @@ -548,7 +548,7 @@ const internalTemplates = { }, expected: { ...baseTemplates['nextjs/default-ts'].expected }, isInternal: true, - skipTasks: ['bench'], + skipTasks: ['bench', 'e2e-tests-dev', 'chromatic'], }, 'internal/yarn/empty/nextjs/default-ts': { name: 'Empty Next.js (pnpm)', @@ -558,7 +558,7 @@ const internalTemplates = { }, expected: { ...baseTemplates['nextjs/default-ts'].expected }, isInternal: true, - skipTasks: ['bench'], + skipTasks: ['bench', 'e2e-tests-dev', 'chromatic'], }, 'internal/npm/empty/vue3-vite/default-ts': { name: 'Empty Vue 3 + vite (npm)', @@ -568,7 +568,7 @@ const internalTemplates = { }, expected: { ...baseTemplates['vue3-vite/default-ts'].expected }, isInternal: true, - skipTasks: ['bench'], + skipTasks: ['bench', 'e2e-tests-dev', 'chromatic'], }, 'internal/pnpm/empty/vue3-vite/default-ts': { name: 'Empty Vue 3 + vite (pnpm)', @@ -578,7 +578,7 @@ const internalTemplates = { }, expected: { ...baseTemplates['vue3-vite/default-ts'].expected }, isInternal: true, - skipTasks: ['bench'], + skipTasks: ['bench', 'e2e-tests-dev', 'chromatic'], }, 'internal/yarn/empty/vue3-vite/default-ts': { name: 'Empty Vue 3 + vite (pnpm)', @@ -588,7 +588,7 @@ const internalTemplates = { }, expected: { ...baseTemplates['vue3-vite/default-ts'].expected }, isInternal: true, - skipTasks: ['bench'], + skipTasks: ['bench', 'e2e-tests-dev', 'chromatic'], }, 'internal/npm/empty/angular-cli/default-ts': { name: 'Empty Angular (npm)', @@ -598,7 +598,7 @@ const internalTemplates = { }, expected: { ...baseTemplates['angular-cli/default-ts'].expected }, isInternal: true, - skipTasks: ['bench'], + skipTasks: ['bench', 'e2e-tests-dev', 'chromatic'], }, 'internal/pnpm/empty/angular-cli/default-ts': { name: 'Empty Angular (pnpm)', @@ -608,7 +608,7 @@ const internalTemplates = { }, expected: { ...baseTemplates['angular-cli/default-ts'].expected }, isInternal: true, - skipTasks: ['bench'], + skipTasks: ['bench', 'e2e-tests-dev', 'chromatic'], }, 'internal/yarn/empty/angular-cli/default-ts': { name: 'Empty Angular (pnpm)', @@ -618,7 +618,7 @@ const internalTemplates = { }, expected: { ...baseTemplates['angular-cli/default-ts'].expected }, isInternal: true, - skipTasks: ['bench'], + skipTasks: ['bench', 'e2e-tests-dev', 'chromatic'], }, 'internal/npm/empty/lit-vite/default-ts': { name: 'Empty Lit + vite (npm)', @@ -628,7 +628,7 @@ const internalTemplates = { }, expected: { ...baseTemplates['lit-vite/default-ts'].expected }, isInternal: true, - skipTasks: ['bench'], + skipTasks: ['bench', 'e2e-tests-dev', 'chromatic'], }, 'internal/pnpm/empty/lit-vite/default-ts': { name: 'Empty Lit + vite (pnpm)', @@ -638,7 +638,7 @@ const internalTemplates = { }, expected: { ...baseTemplates['lit-vite/default-ts'].expected }, isInternal: true, - skipTasks: ['bench'], + skipTasks: ['bench', 'e2e-tests-dev', 'chromatic'], }, 'internal/yarn/empty/lit-vite/default-ts': { name: 'Empty Lit + vite (pnpm)', @@ -648,7 +648,7 @@ const internalTemplates = { }, expected: { ...baseTemplates['lit-vite/default-ts'].expected }, isInternal: true, - skipTasks: ['bench'], + skipTasks: ['bench', 'e2e-tests-dev', 'chromatic'], }, // 'internal/pnp': { // ...baseTemplates['cra/default-ts'], @@ -747,19 +747,19 @@ export const merged: TemplateKey[] = [ const emptyTemplateKeys: TemplateKey[] = [ // 'internal/npm/empty/react-vite/default-ts', // 'internal/pnpm/empty/react-vite/default-ts', - 'internal/yarn/empty/react-vite/default-ts', + // 'internal/yarn/empty/react-vite/default-ts', // 'internal/npm/empty/nextjs/default-ts', // 'internal/pnpm/empty/nextjs/default-ts', - 'internal/yarn/empty/nextjs/default-ts', + // 'internal/yarn/empty/nextjs/default-ts', // 'internal/npm/empty/vue3-vite/default-ts', // 'internal/pnpm/empty/vue3-vite/default-ts', - 'internal/yarn/empty/vue3-vite/default-ts', + // 'internal/yarn/empty/vue3-vite/default-ts', // 'internal/npm/empty/angular-cli/default-ts', // 'internal/pnpm/empty/angular-cli/default-ts', - 'internal/yarn/empty/angular-cli/default-ts', + // 'internal/yarn/empty/angular-cli/default-ts', // 'internal/npm/empty/lit-vite/default-ts', // 'internal/pnpm/empty/lit-vite/default-ts', - 'internal/yarn/empty/lit-vite/default-ts', + // 'internal/yarn/empty/lit-vite/default-ts', ]; export const daily: TemplateKey[] = [ From 07790cbb5160cf2ffe07ec0af2dae08eff4fb5f8 Mon Sep 17 00:00:00 2001 From: Shaun Lloyd Date: Wed, 29 Nov 2023 14:28:27 -0500 Subject: [PATCH 026/131] Start writing CircleCI script to test empty init --- .circleci/config.yml | 36 ++++++++++++++++++++++++ code/lib/cli/src/generate.ts | 6 +++- code/lib/cli/src/scaffold-new-project.ts | 2 +- 3 files changed, 42 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6db12bf41959..fade0321ea29 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -472,6 +472,32 @@ jobs: command: yarn upload-bench $(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench) - report-workflow-on-failure: template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench) + test-empty-init: + parameters: + packageManager: + type: string + template: + type: string + parallelism: + type: integer + parallelism: << parameters.parallelism >> + steps: + - git-shallow-clone/checkout_advanced: + clone_options: '--depth 1 --verbose' + - attach_workspace: + at: . + - run: + name: Move to parent directory + command: cd .. + - run: + name: Create empty project + command: mkdir empty-<< parameters.template >> && cd empty-<< parameters.template >> + - run: + name: Run storybook init + command: yarn storybook init + environment: + STORYBOOK_PACKAGE_MANAGER: << parameters.packageManager >> + STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> workflows: docs: @@ -640,6 +666,16 @@ workflows: parallelism: 31 requires: - build-sandboxes + # TODO: Uncomment when ready to test + # - test-empty-init: + # parallelism: 15 + # requires: + # - build + # matrix: + # parameters: + # packageManager: [yarn2], + # template: ["react-vite-ts", "nextjs-ts", "vue-vite-ts", "angular-cli", "lit-vite-ts"] + # TODO: reenable once we find out the source of flakyness # - test-runner-dev: # parallelism: 4 diff --git a/code/lib/cli/src/generate.ts b/code/lib/cli/src/generate.ts index bc396ec428b7..07620c9ee1e2 100644 --- a/code/lib/cli/src/generate.ts +++ b/code/lib/cli/src/generate.ts @@ -47,7 +47,11 @@ command('init') .description('Initialize Storybook into your project.') .option('-f --force', 'Force add Storybook') .option('-s --skip-install', 'Skip installing deps') - .option('--package-manager ', 'Force package manager for installing deps') + .option( + '--package-manager ', + 'Force package manager for installing deps', + process.env.STORYBOOK_PACKAGE_MANAGER + ) .option('-N --use-npm', 'Use npm to install deps (deprecated)') .option('--use-pnp', 'Enable pnp mode for Yarn 2+') .option('-p --parser ', 'jscodeshift parser') diff --git a/code/lib/cli/src/scaffold-new-project.ts b/code/lib/cli/src/scaffold-new-project.ts index 59df8318ce72..b65301a710d3 100644 --- a/code/lib/cli/src/scaffold-new-project.ts +++ b/code/lib/cli/src/scaffold-new-project.ts @@ -109,7 +109,7 @@ const buildProjectDisplayNameForPrint = ({ displayName }: SupportedProject) => { * @param packageManager The package manager to use. */ export const scaffoldNewProject = async (packageManager: PackageManagerName) => { - const packageManagerName = 'pnpm'; // packageManagerToCoercedName(packageManager); + const packageManagerName = packageManagerToCoercedName(packageManager); logger.plain( boxen( From 3b8cdc4c7ee4752e8819ae9b0c1687c8e95c2315 Mon Sep 17 00:00:00 2001 From: Shaun Lloyd Date: Wed, 29 Nov 2023 14:39:40 -0500 Subject: [PATCH 027/131] Test out empty init circle job --- .circleci/config.yml | 79 +++++++++++++++++++----------------- code/lib/cli/src/generate.ts | 6 +-- 2 files changed, 43 insertions(+), 42 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index fade0321ea29..8a1eef83b2c5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -494,10 +494,15 @@ jobs: command: mkdir empty-<< parameters.template >> && cd empty-<< parameters.template >> - run: name: Run storybook init - command: yarn storybook init + command: node ../storybook/code/lib/cli/bin.js init --packageManager << parameters.packageManager >> environment: - STORYBOOK_PACKAGE_MANAGER: << parameters.packageManager >> + CI: true STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> + - run: + name: Run Smoke test + command: node ../storybook/code/lib/cli/bin.js dev --smoke-test + environment: + CI: true workflows: docs: @@ -636,45 +641,45 @@ workflows: - script-checks: requires: - build - - chromatic-internal-storybooks: - requires: - - build - - create-sandboxes: - parallelism: 36 - requires: - - build + # - chromatic-internal-storybooks: + # requires: + # - build + # - create-sandboxes: + # parallelism: 36 + # requires: + # - build # - smoke-test-sandboxes: # disabled for now # requires: # - create-sandboxes - - build-sandboxes: - parallelism: 36 - requires: - - create-sandboxes - - chromatic-sandboxes: - parallelism: 33 - requires: - - build-sandboxes - - e2e-production: - parallelism: 31 - requires: - - build-sandboxes - - e2e-dev: - parallelism: 2 - requires: - - create-sandboxes - - test-runner-production: - parallelism: 31 - requires: - - build-sandboxes - # TODO: Uncomment when ready to test - # - test-empty-init: - # parallelism: 15 + # - build-sandboxes: + # parallelism: 36 # requires: - # - build - # matrix: - # parameters: - # packageManager: [yarn2], - # template: ["react-vite-ts", "nextjs-ts", "vue-vite-ts", "angular-cli", "lit-vite-ts"] + # - create-sandboxes + # - chromatic-sandboxes: + # parallelism: 33 + # requires: + # - build-sandboxes + # - e2e-production: + # parallelism: 31 + # requires: + # - build-sandboxes + # - e2e-dev: + # parallelism: 2 + # requires: + # - create-sandboxes + # - test-runner-production: + # parallelism: 31 + # requires: + # - build-sandboxes + # TODO: Uncomment when ready to test + - test-empty-init: + parallelism: 5 + requires: + - build + matrix: + parameters: + packageManager: [yarn2], + template: ["react-vite-ts", "nextjs-ts", "vue-vite-ts", "angular-cli", "lit-vite-ts"] # TODO: reenable once we find out the source of flakyness # - test-runner-dev: diff --git a/code/lib/cli/src/generate.ts b/code/lib/cli/src/generate.ts index 07620c9ee1e2..bc396ec428b7 100644 --- a/code/lib/cli/src/generate.ts +++ b/code/lib/cli/src/generate.ts @@ -47,11 +47,7 @@ command('init') .description('Initialize Storybook into your project.') .option('-f --force', 'Force add Storybook') .option('-s --skip-install', 'Skip installing deps') - .option( - '--package-manager ', - 'Force package manager for installing deps', - process.env.STORYBOOK_PACKAGE_MANAGER - ) + .option('--package-manager ', 'Force package manager for installing deps') .option('-N --use-npm', 'Use npm to install deps (deprecated)') .option('--use-pnp', 'Enable pnp mode for Yarn 2+') .option('-p --parser ', 'jscodeshift parser') From 8e20a757f9f20c8fc751a6cf413ea9665c02c9c0 Mon Sep 17 00:00:00 2001 From: Shaun Lloyd Date: Wed, 29 Nov 2023 14:46:05 -0500 Subject: [PATCH 028/131] oops --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8a1eef83b2c5..fc124c51125e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -678,7 +678,7 @@ workflows: - build matrix: parameters: - packageManager: [yarn2], + packageManager: ["yarn2"], template: ["react-vite-ts", "nextjs-ts", "vue-vite-ts", "angular-cli", "lit-vite-ts"] # TODO: reenable once we find out the source of flakyness From f1158399bf7709bcf62e31da4f278da43bd6439d Mon Sep 17 00:00:00 2001 From: Shaun Lloyd Date: Wed, 29 Nov 2023 14:48:18 -0500 Subject: [PATCH 029/131] try again --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index fc124c51125e..ba723314b10f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -678,7 +678,7 @@ workflows: - build matrix: parameters: - packageManager: ["yarn2"], + packageManager: ["yarn2"] template: ["react-vite-ts", "nextjs-ts", "vue-vite-ts", "angular-cli", "lit-vite-ts"] # TODO: reenable once we find out the source of flakyness From 4eb0c2bbc62c4464b0a87998d4c578c4b3c9bdf5 Mon Sep 17 00:00:00 2001 From: Shaun Lloyd Date: Wed, 29 Nov 2023 14:54:47 -0500 Subject: [PATCH 030/131] one more time --- .circleci/config.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index ba723314b10f..50c9d8d86506 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -473,6 +473,9 @@ jobs: - report-workflow-on-failure: template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench) test-empty-init: + executor: + class: medium + name: sb_node_16_browsers parameters: packageManager: type: string @@ -671,6 +674,7 @@ workflows: # parallelism: 31 # requires: # - build-sandboxes + # TODO: Uncomment when ready to test - test-empty-init: parallelism: 5 From acfc94caffc995bb0fff19e12730c211c88d657e Mon Sep 17 00:00:00 2001 From: Shaun Evening Date: Wed, 29 Nov 2023 14:57:26 -0500 Subject: [PATCH 031/131] Updated config.yml --- .circleci/config.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 50c9d8d86506..8ad1c098c1d8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -493,19 +493,19 @@ jobs: name: Move to parent directory command: cd .. - run: - name: Create empty project - command: mkdir empty-<< parameters.template >> && cd empty-<< parameters.template >> + name: Create empty project + command: mkdir empty-<< parameters.template >> && cd empty-<< parameters.template >> - run: - name: Run storybook init - command: node ../storybook/code/lib/cli/bin.js init --packageManager << parameters.packageManager >> - environment: - CI: true - STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> + name: Run storybook init + command: node ../storybook/code/lib/cli/bin.js init --packageManager << parameters.packageManager >> + environment: + CI: true + STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> - run: - name: Run Smoke test - command: node ../storybook/code/lib/cli/bin.js dev --smoke-test - environment: - CI: true + name: Run Smoke test + command: node ../storybook/code/lib/cli/bin.js dev --smoke-test + environment: + CI: true workflows: docs: From 0b011b97dc48e46481af28e183666d3ee457e420 Mon Sep 17 00:00:00 2001 From: Shaun Lloyd Date: Wed, 29 Nov 2023 15:10:12 -0500 Subject: [PATCH 032/131] Actually get to the right file for the cli bin --- .circleci/config.yml | 58 ++++++++++++++++++++++---------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8ad1c098c1d8..0914d6b81d87 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -497,13 +497,13 @@ jobs: command: mkdir empty-<< parameters.template >> && cd empty-<< parameters.template >> - run: name: Run storybook init - command: node ../storybook/code/lib/cli/bin.js init --packageManager << parameters.packageManager >> + command: node ../storybook/code/lib/cli/bin/index.js init --packageManager << parameters.packageManager >> environment: CI: true STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> - run: name: Run Smoke test - command: node ../storybook/code/lib/cli/bin.js dev --smoke-test + command: node ../storybook/code/lib/cli/bin/index.js dev --smoke-test environment: CI: true @@ -644,36 +644,36 @@ workflows: - script-checks: requires: - build - # - chromatic-internal-storybooks: - # requires: - # - build - # - create-sandboxes: - # parallelism: 36 - # requires: - # - build + - chromatic-internal-storybooks: + requires: + - build + - create-sandboxes: + parallelism: 36 + requires: + - build # - smoke-test-sandboxes: # disabled for now # requires: # - create-sandboxes - # - build-sandboxes: - # parallelism: 36 - # requires: - # - create-sandboxes - # - chromatic-sandboxes: - # parallelism: 33 - # requires: - # - build-sandboxes - # - e2e-production: - # parallelism: 31 - # requires: - # - build-sandboxes - # - e2e-dev: - # parallelism: 2 - # requires: - # - create-sandboxes - # - test-runner-production: - # parallelism: 31 - # requires: - # - build-sandboxes + - build-sandboxes: + parallelism: 36 + requires: + - create-sandboxes + - chromatic-sandboxes: + parallelism: 33 + requires: + - build-sandboxes + - e2e-production: + parallelism: 31 + requires: + - build-sandboxes + - e2e-dev: + parallelism: 2 + requires: + - create-sandboxes + - test-runner-production: + parallelism: 31 + requires: + - build-sandboxes # TODO: Uncomment when ready to test - test-empty-init: From 7abeedf44e256dd4d2a7a427157363a875ef9124 Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Wed, 29 Nov 2023 21:16:20 +0100 Subject: [PATCH 033/131] remove event handler, fix types --- code/frameworks/svelte-vite/package.json | 2 +- code/renderers/svelte/src/render.ts | 6 ++++-- .../svelte/templates/PreviewRender.svelte | 12 +---------- .../svelte/templates/SlotDecorator.svelte | 15 +++----------- code/yarn.lock | 20 +++++++++---------- 5 files changed, 19 insertions(+), 36 deletions(-) diff --git a/code/frameworks/svelte-vite/package.json b/code/frameworks/svelte-vite/package.json index b52675b730fe..a51bb88163c7 100644 --- a/code/frameworks/svelte-vite/package.json +++ b/code/frameworks/svelte-vite/package.json @@ -52,7 +52,7 @@ "@storybook/svelte": "workspace:*", "@sveltejs/vite-plugin-svelte": "^2.4.2", "magic-string": "^0.30.0", - "svelte-preprocess": "^5.0.4", + "svelte-preprocess": "^5.1.1", "sveltedoc-parser": "^4.2.1", "ts-dedent": "^2.2.0" }, diff --git a/code/renderers/svelte/src/render.ts b/code/renderers/svelte/src/render.ts index cb196d0fcedb..e81f5164be0a 100644 --- a/code/renderers/svelte/src/render.ts +++ b/code/renderers/svelte/src/render.ts @@ -1,6 +1,5 @@ /* eslint-disable no-param-reassign */ import type { RenderContext, ArgsStoryFn } from '@storybook/types'; -import type { SvelteComponentTyped } from 'svelte'; import { RESET_STORY_ARGS } from '@storybook/core-events'; // ! DO NOT change this PreviewRender import to a relative path, it will break it. // ! A relative import will be compiled at build time, and Svelte will be unable to @@ -14,7 +13,10 @@ import { createRoot } from 'svelte'; import type { SvelteRenderer } from './types'; -const componentsByDomElement = new Map(); +const componentsByDomElement = new Map< + SvelteRenderer['canvasElement'], + ReturnType +>(); function teardown(canvasElement: SvelteRenderer['canvasElement']) { if (!componentsByDomElement.has(canvasElement)) { diff --git a/code/renderers/svelte/templates/PreviewRender.svelte b/code/renderers/svelte/templates/PreviewRender.svelte index 581aa4d78e05..fb08019c682b 100644 --- a/code/renderers/svelte/templates/PreviewRender.svelte +++ b/code/renderers/svelte/templates/PreviewRender.svelte @@ -6,15 +6,12 @@ export let kind; export let storyFn; export let showError; - export let storyContext; let { /** @type {SvelteComponent} */ Component, /** @type {any} */ props = {}, - /** @type {{[string]: () => {}}} Attach svelte event handlers */ - on, } = storyFn(); let firstTime = true; @@ -28,7 +25,6 @@ return { Component, props, - on, } } return storyFn(); @@ -37,12 +33,6 @@ // reactive, re-render on storyFn change $: ({ Component, props = {}, on } = getStoryFnValue(storyFn)); - const eventsFromArgTypes = Object.fromEntries( - Object.entries(storyContext.argTypes) - .filter(([k, v]) => v.action && props[k] != null) - .map(([k, v]) => [v.action, props[k]]) - ); - if (!Component) { showError({ title: `Expecting a Svelte component from the story: "${name}" of "${kind}".`, @@ -55,4 +45,4 @@ } - + diff --git a/code/renderers/svelte/templates/SlotDecorator.svelte b/code/renderers/svelte/templates/SlotDecorator.svelte index a438eaa3603a..1e02890ca3f7 100644 --- a/code/renderers/svelte/templates/SlotDecorator.svelte +++ b/code/renderers/svelte/templates/SlotDecorator.svelte @@ -4,21 +4,12 @@ export let decorator = undefined; export let Component; export let props = {}; - export let on = undefined; - - let instance; - let decoratorInstance; - - function getInstance() { - // instance can be undefined if a decorator doesn't have - return instance || decoratorInstance; - } {#if decorator} - - + + {:else} - + {/if} diff --git a/code/yarn.lock b/code/yarn.lock index c5699bc39d0b..2ad072d71691 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -7216,7 +7216,7 @@ __metadata: "@types/node": "npm:^18.0.0" magic-string: "npm:^0.30.0" svelte: "npm:^5.0.0-next.15" - svelte-preprocess: "npm:^5.0.4" + svelte-preprocess: "npm:^5.1.1" sveltedoc-parser: "npm:^4.2.1" ts-dedent: "npm:^2.2.0" typescript: "npm:^5.3.2" @@ -27582,9 +27582,9 @@ __metadata: languageName: node linkType: hard -"svelte-preprocess@npm:^5.0.4": - version: 5.0.4 - resolution: "svelte-preprocess@npm:5.0.4" +"svelte-preprocess@npm:^5.1.0": + version: 5.1.0 + resolution: "svelte-preprocess@npm:5.1.0" dependencies: "@types/pug": "npm:^2.0.6" detect-indent: "npm:^6.1.0" @@ -27601,7 +27601,7 @@ __metadata: sass: ^1.26.8 stylus: ^0.55.0 sugarss: ^2.0.0 || ^3.0.0 || ^4.0.0 - svelte: ^3.23.0 || ^4.0.0-next.0 || ^4.0.0 + svelte: ^3.23.0 || ^4.0.0-next.0 || ^4.0.0 || ^5.0.0-next.0 typescript: ">=3.9.5 || ^4.0.0 || ^5.0.0" peerDependenciesMeta: "@babel/core": @@ -27624,13 +27624,13 @@ __metadata: optional: true typescript: optional: true - checksum: 1ed64b96a91327a47992df0b82df708b5cda92e1da211edbedaf411e633a0be5a8425d19f996abc8dcef52dadd26b5474924dd9eeb30a7b409bf60c33b689d6c + checksum: fb40153aa282edadad68221fcf82db1b7c67a208941b136c529fd843d1e8b595d79e9d39e5f252672e11a8b62c621ccf2078de4a57e5adbb89e13046998ae597 languageName: node linkType: hard -"svelte-preprocess@npm:^5.1.0": - version: 5.1.0 - resolution: "svelte-preprocess@npm:5.1.0" +"svelte-preprocess@npm:^5.1.1": + version: 5.1.1 + resolution: "svelte-preprocess@npm:5.1.1" dependencies: "@types/pug": "npm:^2.0.6" detect-indent: "npm:^6.1.0" @@ -27670,7 +27670,7 @@ __metadata: optional: true typescript: optional: true - checksum: fb40153aa282edadad68221fcf82db1b7c67a208941b136c529fd843d1e8b595d79e9d39e5f252672e11a8b62c621ccf2078de4a57e5adbb89e13046998ae597 + checksum: 8de6571ddca032dc7a33c37a6cd7caa72eeabf6acbe81924e26f14e9f5de8bbf2806c86d1ac3cb435923c3953d0d9365dfbe2a8c94cd3b383ecfe50957e1b8f9 languageName: node linkType: hard From cd20c52231c7a39948193ea601998ef8687668cd Mon Sep 17 00:00:00 2001 From: Shaun Lloyd Date: Wed, 29 Nov 2023 15:18:20 -0500 Subject: [PATCH 034/131] fix package manager flag --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0914d6b81d87..a069d00bd616 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -497,7 +497,7 @@ jobs: command: mkdir empty-<< parameters.template >> && cd empty-<< parameters.template >> - run: name: Run storybook init - command: node ../storybook/code/lib/cli/bin/index.js init --packageManager << parameters.packageManager >> + command: node ../storybook/code/lib/cli/bin/index.js init --package-manager << parameters.packageManager >> environment: CI: true STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> From 826ab3da9eb3af45ecfee64adaa2352ab3a51a29 Mon Sep 17 00:00:00 2001 From: Shaun Lloyd Date: Wed, 29 Nov 2023 15:42:45 -0500 Subject: [PATCH 035/131] Make sure empty projects are init in the right dir --- .circleci/config.yml | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a069d00bd616..8ab32f9f44a8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -481,31 +481,22 @@ jobs: type: string template: type: string - parallelism: - type: integer - parallelism: << parameters.parallelism >> steps: - git-shallow-clone/checkout_advanced: clone_options: '--depth 1 --verbose' - attach_workspace: at: . - run: - name: Move to parent directory - command: cd .. - - run: - name: Create empty project - command: mkdir empty-<< parameters.template >> && cd empty-<< parameters.template >> - - run: - name: Run storybook init - command: node ../storybook/code/lib/cli/bin/index.js init --package-manager << parameters.packageManager >> + name: Storybook init from empty directory + command: | + cd ../ + mkdir empty-<< parameters.template >> + cd empty-<< parameters.template >> + node ../storybook/code/lib/cli/bin/index.js init --package-manager << parameters.packageManager >> + node ../storybook/code/lib/cli/bin/index.js dev --smoke-test environment: CI: true STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> - - run: - name: Run Smoke test - command: node ../storybook/code/lib/cli/bin/index.js dev --smoke-test - environment: - CI: true workflows: docs: @@ -677,7 +668,6 @@ workflows: # TODO: Uncomment when ready to test - test-empty-init: - parallelism: 5 requires: - build matrix: From b4250b3cabc90c15c5dd971833f8e757ef820c74 Mon Sep 17 00:00:00 2001 From: Shaun Lloyd Date: Wed, 29 Nov 2023 15:50:34 -0500 Subject: [PATCH 036/131] add --yes --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8ab32f9f44a8..143f8a7f60c8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -492,7 +492,7 @@ jobs: cd ../ mkdir empty-<< parameters.template >> cd empty-<< parameters.template >> - node ../storybook/code/lib/cli/bin/index.js init --package-manager << parameters.packageManager >> + node ../storybook/code/lib/cli/bin/index.js init --yes --package-manager << parameters.packageManager >> node ../storybook/code/lib/cli/bin/index.js dev --smoke-test environment: CI: true From 1cfd09ed6f8160627b5cbe310fe28db308b4855b Mon Sep 17 00:00:00 2001 From: Shaun Lloyd Date: Wed, 29 Nov 2023 16:16:36 -0500 Subject: [PATCH 037/131] Try npm instead --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 143f8a7f60c8..b51f17efc9cd 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -672,7 +672,7 @@ workflows: - build matrix: parameters: - packageManager: ["yarn2"] + packageManager: ["npm"] template: ["react-vite-ts", "nextjs-ts", "vue-vite-ts", "angular-cli", "lit-vite-ts"] # TODO: reenable once we find out the source of flakyness From f324a2be546a19c5f97deee563160dfc4fcda733 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20D=C3=A9ramond?= Date: Thu, 30 Nov 2023 08:00:44 +0100 Subject: [PATCH 038/131] Add missing `barHoverColor` in theme common snippet --- docs/snippets/common/your-theme.js.mdx | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/snippets/common/your-theme.js.mdx b/docs/snippets/common/your-theme.js.mdx index 54ce8c5d37fd..1e596e518813 100644 --- a/docs/snippets/common/your-theme.js.mdx +++ b/docs/snippets/common/your-theme.js.mdx @@ -32,6 +32,7 @@ export default create({ // Toolbar default and active colors barTextColor: '#9E9E9E', barSelectedColor: '#585C6D', + barHoverColor: '#585C6D', barBg: '#ffffff', // Form colors From f012da89fd117c07aefa74e25a349f11360e2397 Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Thu, 30 Nov 2023 12:54:58 +0100 Subject: [PATCH 039/131] add back Svelte 4 support --- code/frameworks/svelte-vite/package.json | 2 +- code/renderers/svelte/src/render.ts | 38 +++++++++++++------ .../svelte/templates/PreviewRender.svelte | 12 +++++- .../svelte/templates/SlotDecorator.svelte | 22 +++++++++-- 4 files changed, 58 insertions(+), 16 deletions(-) diff --git a/code/frameworks/svelte-vite/package.json b/code/frameworks/svelte-vite/package.json index a51bb88163c7..947d3e4ccc8d 100644 --- a/code/frameworks/svelte-vite/package.json +++ b/code/frameworks/svelte-vite/package.json @@ -63,7 +63,7 @@ "vite": "^4.0.0" }, "peerDependencies": { - "svelte": "^5.0.0-next.1", + "svelte": "^4.0.0 || ^5.0.0-next.1", "vite": "^3.0.0 || ^4.0.0 || ^5.0.0" }, "engines": { diff --git a/code/renderers/svelte/src/render.ts b/code/renderers/svelte/src/render.ts index e81f5164be0a..b1821b692358 100644 --- a/code/renderers/svelte/src/render.ts +++ b/code/renderers/svelte/src/render.ts @@ -9,13 +9,13 @@ import { RESET_STORY_ARGS } from '@storybook/core-events'; // eslint-disable-next-line import/no-extraneous-dependencies import PreviewRender from '@storybook/svelte/templates/PreviewRender.svelte'; import { addons } from '@storybook/preview-api'; -import { createRoot } from 'svelte'; +import * as svelte from 'svelte'; import type { SvelteRenderer } from './types'; const componentsByDomElement = new Map< SvelteRenderer['canvasElement'], - ReturnType + any // ReturnType depends on the version of Svelte v4 or v5 >(); function teardown(canvasElement: SvelteRenderer['canvasElement']) { @@ -29,6 +29,25 @@ function teardown(canvasElement: SvelteRenderer['canvasElement']) { componentsByDomElement.delete(canvasElement); } +/** + * Mount the PreviewRender component to the provided canvasElement + * Either using the Svelte v4 or v5 API + */ +function createRoot(target: HTMLElement, props: any) { + if ((svelte as any).createRoot) { + // Svelte v5 + return svelte.createRoot(PreviewRender, { + target, + props, + }); + } + // Svelte v4 + return new (PreviewRender as any)({ + target, + props, + }); +} + /** * This is a workaround for the issue that when resetting args, * the story needs to be remounted completely to revert to the component's default props. @@ -69,15 +88,12 @@ export function renderToCanvas( } if (!existingComponent || remount) { - const createdComponent = createRoot(PreviewRender, { - target: canvasElement, - props: { - storyFn, - storyContext, - name, - kind, - showError, - }, + const createdComponent = createRoot(canvasElement, { + storyFn, + storyContext, + name, + kind, + showError, }); componentsByDomElement.set(canvasElement, createdComponent); } else { diff --git a/code/renderers/svelte/templates/PreviewRender.svelte b/code/renderers/svelte/templates/PreviewRender.svelte index fb08019c682b..1683b9360a02 100644 --- a/code/renderers/svelte/templates/PreviewRender.svelte +++ b/code/renderers/svelte/templates/PreviewRender.svelte @@ -6,12 +6,15 @@ export let kind; export let storyFn; export let showError; + export let storyContext; let { /** @type {SvelteComponent} */ Component, /** @type {any} */ props = {}, + /** @type {{[string]: () => {}}} Attach svelte event handlers */ + on, } = storyFn(); let firstTime = true; @@ -25,6 +28,7 @@ return { Component, props, + on, } } return storyFn(); @@ -33,6 +37,12 @@ // reactive, re-render on storyFn change $: ({ Component, props = {}, on } = getStoryFnValue(storyFn)); + const eventsFromArgTypes = Object.fromEntries( + Object.entries(storyContext.argTypes) + .filter(([k, v]) => v.action && props[k] != null) + .map(([k, v]) => [v.action, props[k]]) + ); + if (!Component) { showError({ title: `Expecting a Svelte component from the story: "${name}" of "${kind}".`, @@ -45,4 +55,4 @@ } - + diff --git a/code/renderers/svelte/templates/SlotDecorator.svelte b/code/renderers/svelte/templates/SlotDecorator.svelte index 1e02890ca3f7..9de64db04c3d 100644 --- a/code/renderers/svelte/templates/SlotDecorator.svelte +++ b/code/renderers/svelte/templates/SlotDecorator.svelte @@ -4,12 +4,28 @@ export let decorator = undefined; export let Component; export let props = {}; + export let on = undefined; + + let instance; + let decoratorInstance; + + if (on) { + // Attach Svelte event listeners in Svelte v4 + // In Svelte v5 this is not possible anymore as instances are no longer classes with $on() properties, so it will be a no-op + onMount(() => { + Object.entries(on).forEach(([eventName, eventCallback]) => { + // instance can be undefined if a decorator doesn't have + const inst = instance ?? decoratorInstance; + inst?.$on?.(eventName, eventCallback) + }); + }); + } {#if decorator} - - + + {:else} - + {/if} From af572b8edbd533bc7e0db2ea396233c3b25c989f Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Thu, 30 Nov 2023 13:34:57 +0100 Subject: [PATCH 040/131] add Svelte 5 sandbox --- .circleci/config.yml | 10 +++++----- .github/workflows/generate-sandboxes-next.yml | 3 ++- code/lib/cli/src/sandbox-templates.ts | 12 ++++++++++++ scripts/task.ts | 2 +- scripts/tasks/generate.ts | 5 ++++- 5 files changed, 24 insertions(+), 8 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6db12bf41959..baa44f6816df 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -614,22 +614,22 @@ workflows: requires: - build - create-sandboxes: - parallelism: 36 + parallelism: 37 requires: - build # - smoke-test-sandboxes: # disabled for now # requires: # - create-sandboxes - build-sandboxes: - parallelism: 36 + parallelism: 37 requires: - create-sandboxes - chromatic-sandboxes: - parallelism: 33 + parallelism: 34 requires: - build-sandboxes - e2e-production: - parallelism: 31 + parallelism: 32 requires: - build-sandboxes - e2e-dev: @@ -637,7 +637,7 @@ workflows: requires: - create-sandboxes - test-runner-production: - parallelism: 31 + parallelism: 32 requires: - build-sandboxes # TODO: reenable once we find out the source of flakyness diff --git a/.github/workflows/generate-sandboxes-next.yml b/.github/workflows/generate-sandboxes-next.yml index d9355f593dc8..d5900d8ab2df 100644 --- a/.github/workflows/generate-sandboxes-next.yml +++ b/.github/workflows/generate-sandboxes-next.yml @@ -21,7 +21,8 @@ jobs: steps: - uses: actions/checkout@v3 with: - ref: next + repository: allozaur/storybook + ref: allozaur/#24886 - uses: actions/setup-node@v3 with: node-version-file: '.nvmrc' diff --git a/code/lib/cli/src/sandbox-templates.ts b/code/lib/cli/src/sandbox-templates.ts index 86b28646fb10..8d59384fa5d1 100644 --- a/code/lib/cli/src/sandbox-templates.ts +++ b/code/lib/cli/src/sandbox-templates.ts @@ -355,6 +355,17 @@ const baseTemplates = { }, skipTasks: ['e2e-tests-dev', 'bench'], }, + 'svelte-kit/prerelease-ts': { + name: 'SvelteKit Prerelease (Vite | TypeScript)', + script: + 'yarn create svelte-with-args --name=svelte-kit/prerelease-ts --directory={{beforeDir}} --template=skeleton --types=typescript --no-prettier --no-eslint --no-playwright --no-vitest --svelte5', + expected: { + framework: '@storybook/sveltekit', + renderer: '@storybook/svelte', + builder: '@storybook/builder-vite', + }, + skipTasks: ['e2e-tests-dev', 'bench'], + }, 'lit-vite/default-js': { name: 'Lit Latest (Vite | JavaScript)', script: @@ -598,6 +609,7 @@ export const daily: TemplateKey[] = [ 'vue-cli/default-js', 'lit-vite/default-js', 'svelte-kit/skeleton-js', + 'svelte-kit/prerelease-ts', 'svelte-vite/default-js', 'nextjs/12-js', 'nextjs/default-js', diff --git a/scripts/task.ts b/scripts/task.ts index 20dad32716c3..1247cc89351a 100644 --- a/scripts/task.ts +++ b/scripts/task.ts @@ -496,7 +496,7 @@ async function run() { controller.abort(); }); - return 1; + throw err; } statuses.set(task, task.service ? 'serving' : 'complete'); diff --git a/scripts/tasks/generate.ts b/scripts/tasks/generate.ts index cbce6c66a1c5..954b14436868 100644 --- a/scripts/tasks/generate.ts +++ b/scripts/tasks/generate.ts @@ -1,3 +1,4 @@ +/* eslint-disable import/extensions */ import { pathExists, remove } from 'fs-extra'; import { join } from 'path'; import { REPROS_DIRECTORY } from '../utils/constants'; @@ -27,7 +28,9 @@ export const generate: Task = { } // This uses an async import as it depends on `lib/cli` which requires `code` to be installed. - const { generate: generateRepro } = await import('../sandbox/generate'); + // @ts-expect-error Default import required for dynamic import processed by esbuild + // const { generate: generateRepro } = (await import('../sandbox/generate.ts')).default; + const { generate: generateRepro } = (await import('../sandbox/generate.ts')).default; await generateRepro({ templates: [details.key], From 3fdca57fa5b68a447354549644893cadcd4d20b0 Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Thu, 30 Nov 2023 13:39:11 +0100 Subject: [PATCH 041/131] add temporary push event --- .github/workflows/generate-sandboxes-next.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/generate-sandboxes-next.yml b/.github/workflows/generate-sandboxes-next.yml index d5900d8ab2df..4572b7887cb8 100644 --- a/.github/workflows/generate-sandboxes-next.yml +++ b/.github/workflows/generate-sandboxes-next.yml @@ -4,6 +4,7 @@ on: schedule: - cron: '2 2 */1 * *' workflow_dispatch: + push: # To test fixes on push rather than wait for the scheduling, do the following: # 1. Uncomment the lines below and add your branch. # push: From 4281a88c68231f95cd54c63561f6e4228e4d625b Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Thu, 30 Nov 2023 13:40:22 +0100 Subject: [PATCH 042/131] try pull_request event --- .github/workflows/generate-sandboxes-next.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generate-sandboxes-next.yml b/.github/workflows/generate-sandboxes-next.yml index 4572b7887cb8..d9c12d144ee3 100644 --- a/.github/workflows/generate-sandboxes-next.yml +++ b/.github/workflows/generate-sandboxes-next.yml @@ -4,7 +4,7 @@ on: schedule: - cron: '2 2 */1 * *' workflow_dispatch: - push: + pull_request: # To test fixes on push rather than wait for the scheduling, do the following: # 1. Uncomment the lines below and add your branch. # push: From f33e3c96e7c60b6eacdd10669505ed9886c3387b Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Thu, 30 Nov 2023 13:41:02 +0100 Subject: [PATCH 043/131] remove temp event --- .github/workflows/generate-sandboxes-next.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/generate-sandboxes-next.yml b/.github/workflows/generate-sandboxes-next.yml index d9c12d144ee3..d5900d8ab2df 100644 --- a/.github/workflows/generate-sandboxes-next.yml +++ b/.github/workflows/generate-sandboxes-next.yml @@ -4,7 +4,6 @@ on: schedule: - cron: '2 2 */1 * *' workflow_dispatch: - pull_request: # To test fixes on push rather than wait for the scheduling, do the following: # 1. Uncomment the lines below and add your branch. # push: From ab5ff2c2bd71ee525011376d92e0fba38b0a035f Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Thu, 30 Nov 2023 13:42:30 +0100 Subject: [PATCH 044/131] update yarn.lock --- code/yarn.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/yarn.lock b/code/yarn.lock index 2ad072d71691..146426a80b9d 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -7222,7 +7222,7 @@ __metadata: typescript: "npm:^5.3.2" vite: "npm:^4.0.0" peerDependencies: - svelte: ^5.0.0-next.1 + svelte: ^4.0.0 || ^5.0.0-next.1 vite: ^3.0.0 || ^4.0.0 || ^5.0.0 languageName: unknown linkType: soft From 073d84d06985adf3048978b69ab92087f1a2255e Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Thu, 30 Nov 2023 13:47:05 +0100 Subject: [PATCH 045/131] cleanup --- .github/workflows/generate-sandboxes-next.yml | 1 + code/frameworks/nextjs/src/routing/decorator.tsx | 2 +- code/renderers/svelte/templates/PreviewRender.svelte | 2 +- scripts/tasks/generate.ts | 1 - 4 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/generate-sandboxes-next.yml b/.github/workflows/generate-sandboxes-next.yml index d5900d8ab2df..d9c12d144ee3 100644 --- a/.github/workflows/generate-sandboxes-next.yml +++ b/.github/workflows/generate-sandboxes-next.yml @@ -4,6 +4,7 @@ on: schedule: - cron: '2 2 */1 * *' workflow_dispatch: + pull_request: # To test fixes on push rather than wait for the scheduling, do the following: # 1. Uncomment the lines below and add your branch. # push: diff --git a/code/frameworks/nextjs/src/routing/decorator.tsx b/code/frameworks/nextjs/src/routing/decorator.tsx index 6063604f2c63..28f227bd259c 100644 --- a/code/frameworks/nextjs/src/routing/decorator.tsx +++ b/code/frameworks/nextjs/src/routing/decorator.tsx @@ -2,7 +2,7 @@ import * as React from 'react'; import type { Addon_StoryContext } from '@storybook/types'; import { action } from '@storybook/addon-actions'; // @ts-expect-error Using absolute path import to 1) avoid prebundling and 2) being able to substitute the module for Next.js < 13 - +// eslint-disable-next-line import/no-extraneous-dependencies import { AppRouterProvider } from '@storybook/nextjs/dist/routing/app-router-provider'; import { PageRouterProvider } from './page-router-provider'; import type { RouteParams, NextAppDirectory } from './types'; diff --git a/code/renderers/svelte/templates/PreviewRender.svelte b/code/renderers/svelte/templates/PreviewRender.svelte index 1683b9360a02..581aa4d78e05 100644 --- a/code/renderers/svelte/templates/PreviewRender.svelte +++ b/code/renderers/svelte/templates/PreviewRender.svelte @@ -28,7 +28,7 @@ return { Component, props, - on, + on, } } return storyFn(); diff --git a/scripts/tasks/generate.ts b/scripts/tasks/generate.ts index 954b14436868..f453fc3222e8 100644 --- a/scripts/tasks/generate.ts +++ b/scripts/tasks/generate.ts @@ -29,7 +29,6 @@ export const generate: Task = { // This uses an async import as it depends on `lib/cli` which requires `code` to be installed. // @ts-expect-error Default import required for dynamic import processed by esbuild - // const { generate: generateRepro } = (await import('../sandbox/generate.ts')).default; const { generate: generateRepro } = (await import('../sandbox/generate.ts')).default; await generateRepro({ From 79c17ec011856f034b28b12534fcf8314ed74cd4 Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Thu, 30 Nov 2023 13:48:58 +0100 Subject: [PATCH 046/131] cleanup --- .github/workflows/generate-sandboxes-next.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/generate-sandboxes-next.yml b/.github/workflows/generate-sandboxes-next.yml index d9c12d144ee3..d9355f593dc8 100644 --- a/.github/workflows/generate-sandboxes-next.yml +++ b/.github/workflows/generate-sandboxes-next.yml @@ -4,7 +4,6 @@ on: schedule: - cron: '2 2 */1 * *' workflow_dispatch: - pull_request: # To test fixes on push rather than wait for the scheduling, do the following: # 1. Uncomment the lines below and add your branch. # push: @@ -22,8 +21,7 @@ jobs: steps: - uses: actions/checkout@v3 with: - repository: allozaur/storybook - ref: allozaur/#24886 + ref: next - uses: actions/setup-node@v3 with: node-version-file: '.nvmrc' From 27252cb6562d42059b1d1de2cec03f653cf00c37 Mon Sep 17 00:00:00 2001 From: Shaun Lloyd Date: Thu, 30 Nov 2023 08:19:12 -0500 Subject: [PATCH 047/131] try adding --yes back --- .circleci/config.yml | 2 +- code/lib/cli/src/scaffold-new-project.ts | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b51f17efc9cd..143f8a7f60c8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -672,7 +672,7 @@ workflows: - build matrix: parameters: - packageManager: ["npm"] + packageManager: ["yarn2"] template: ["react-vite-ts", "nextjs-ts", "vue-vite-ts", "angular-cli", "lit-vite-ts"] # TODO: reenable once we find out the source of flakyness diff --git a/code/lib/cli/src/scaffold-new-project.ts b/code/lib/cli/src/scaffold-new-project.ts index b65301a710d3..96795bd5b5f8 100644 --- a/code/lib/cli/src/scaffold-new-project.ts +++ b/code/lib/cli/src/scaffold-new-project.ts @@ -32,9 +32,9 @@ const SUPPORTED_PROJECTS: Record = { language: 'TS', }, createScript: { - npm: 'npm create vite@latest . -- --template react-ts', - yarn: 'yarn create vite@latest . --template react-ts', - pnpm: 'pnpm create vite@latest . --template react-ts', + npm: 'npm create vite@latest --yes . -- --template react-ts', + yarn: 'yarn create vite@latest --yes . --template react-ts', + pnpm: 'pnpm create vite@latest --yes . --template react-ts', }, }, 'nextjs-ts': { @@ -55,9 +55,9 @@ const SUPPORTED_PROJECTS: Record = { language: 'TS', }, createScript: { - npm: 'npm create vite@latest . -- --template vue-ts', - yarn: 'yarn create vite@latest . --template vue-ts', - pnpm: 'pnpm create vite@latest . --template vue-ts', + npm: 'npm create vite@latest --yes . -- --template vue-ts', + yarn: 'yarn create vite@latest --yes . --template vue-ts', + pnpm: 'pnpm create vite@latest --yes . --template vue-ts', }, }, 'angular-cli': { @@ -78,9 +78,9 @@ const SUPPORTED_PROJECTS: Record = { language: 'TS', }, createScript: { - npm: 'npm create vite@latest . -- --template lit-ts', - yarn: 'yarn create vite . --template lit-ts && touch yarn.lock && yarn set version berry && yarn config set nodeLinker pnp', - pnpm: 'pnpm create vite@latest . --template lit-ts', + npm: 'npm create vite@latest --yes . -- --template lit-ts', + yarn: 'yarn create vite@latest --yes . --template lit-ts && touch yarn.lock && yarn set version berry && yarn config set nodeLinker pnp', + pnpm: 'pnpm create vite@latest --yes . --template lit-ts', }, }, }; From d66e4bce3a75afa06ef09d5addc91c4588cd2bc4 Mon Sep 17 00:00:00 2001 From: Shaun Lloyd Date: Thu, 30 Nov 2023 08:43:21 -0500 Subject: [PATCH 048/131] Try echoing out env var --- .circleci/config.yml | 92 ++++++++++++++++++++++++-------------------- 1 file changed, 50 insertions(+), 42 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 143f8a7f60c8..562fdbd7f4aa 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -492,11 +492,13 @@ jobs: cd ../ mkdir empty-<< parameters.template >> cd empty-<< parameters.template >> + echo empty init type: $STORYBOOK_INIT_EMPTY_TYPE node ../storybook/code/lib/cli/bin/index.js init --yes --package-manager << parameters.packageManager >> node ../storybook/code/lib/cli/bin/index.js dev --smoke-test environment: CI: true STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> + - report-workflow-on-failure workflows: docs: @@ -621,50 +623,50 @@ workflows: when: equal: [daily, << pipeline.parameters.workflow >>] jobs: - - pretty-docs + # - pretty-docs - build - - lint: - requires: - - build - - check: - requires: - - build - - unit-tests: - requires: - - build - - script-checks: - requires: - - build - - chromatic-internal-storybooks: - requires: - - build - - create-sandboxes: - parallelism: 36 - requires: - - build + # - lint: + # requires: + # - build + # - check: + # requires: + # - build + # - unit-tests: + # requires: + # - build + # - script-checks: + # requires: + # - build + # - chromatic-internal-storybooks: + # requires: + # - build + # - create-sandboxes: + # parallelism: 36 + # requires: + # - build # - smoke-test-sandboxes: # disabled for now # requires: # - create-sandboxes - - build-sandboxes: - parallelism: 36 - requires: - - create-sandboxes - - chromatic-sandboxes: - parallelism: 33 - requires: - - build-sandboxes - - e2e-production: - parallelism: 31 - requires: - - build-sandboxes - - e2e-dev: - parallelism: 2 - requires: - - create-sandboxes - - test-runner-production: - parallelism: 31 - requires: - - build-sandboxes + # - build-sandboxes: + # parallelism: 36 + # requires: + # - create-sandboxes + # - chromatic-sandboxes: + # parallelism: 33 + # requires: + # - build-sandboxes + # - e2e-production: + # parallelism: 31 + # requires: + # - build-sandboxes + # - e2e-dev: + # parallelism: 2 + # requires: + # - create-sandboxes + # - test-runner-production: + # parallelism: 31 + # requires: + # - build-sandboxes # TODO: Uncomment when ready to test - test-empty-init: @@ -672,8 +674,14 @@ workflows: - build matrix: parameters: - packageManager: ["yarn2"] - template: ["react-vite-ts", "nextjs-ts", "vue-vite-ts", "angular-cli", "lit-vite-ts"] + packageManager: + - "yarn2" + template: + - "react-vite-ts" + # - "nextjs-ts" + # - "vue-vite-ts" + # - "angular-cli" + # - "lit-vite-ts" # TODO: reenable once we find out the source of flakyness # - test-runner-dev: From c81c38e27cdc9683dc9ad0d0543bf38bbe9862bf Mon Sep 17 00:00:00 2001 From: Shaun Lloyd Date: Thu, 30 Nov 2023 09:06:30 -0500 Subject: [PATCH 049/131] Print the WD --- .circleci/config.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 562fdbd7f4aa..3121471aea56 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -493,11 +493,13 @@ jobs: mkdir empty-<< parameters.template >> cd empty-<< parameters.template >> echo empty init type: $STORYBOOK_INIT_EMPTY_TYPE + echo pwd node ../storybook/code/lib/cli/bin/index.js init --yes --package-manager << parameters.packageManager >> node ../storybook/code/lib/cli/bin/index.js dev --smoke-test environment: CI: true STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> + STORYBOOK_DISABLE_TELEMETRY: true - report-workflow-on-failure workflows: From 95c78896f5ae0f32128735ff8ec0b3572d07d418 Mon Sep 17 00:00:00 2001 From: Shaun Lloyd Date: Thu, 30 Nov 2023 09:20:58 -0500 Subject: [PATCH 050/131] Try setting yarn to berry --- .circleci/config.yml | 3 +-- code/lib/cli/src/scaffold-new-project.ts | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3121471aea56..5527b1e9899b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -492,8 +492,7 @@ jobs: cd ../ mkdir empty-<< parameters.template >> cd empty-<< parameters.template >> - echo empty init type: $STORYBOOK_INIT_EMPTY_TYPE - echo pwd + yarn set version berry node ../storybook/code/lib/cli/bin/index.js init --yes --package-manager << parameters.packageManager >> node ../storybook/code/lib/cli/bin/index.js dev --smoke-test environment: diff --git a/code/lib/cli/src/scaffold-new-project.ts b/code/lib/cli/src/scaffold-new-project.ts index 96795bd5b5f8..43e11a679857 100644 --- a/code/lib/cli/src/scaffold-new-project.ts +++ b/code/lib/cli/src/scaffold-new-project.ts @@ -196,7 +196,7 @@ export const scaffoldNewProject = async (packageManager: PackageManagerName) => logger.line(1); }; -const IGNORED_FILES = ['.git', '.gitignore', '.DS_Store']; +const IGNORED_FILES = ['.git', '.gitignore', '.DS_Store', '.yarn', '.yarnrc.yml']; export const currentDirectoryIsEmpty = () => { const cwdFolderEntries = readdirSync(process.cwd()); From 71955953390cb691413c10b34dbca228264441c8 Mon Sep 17 00:00:00 2001 From: Shaun Lloyd Date: Thu, 30 Nov 2023 09:28:41 -0500 Subject: [PATCH 051/131] Test npm instead --- .circleci/config.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5527b1e9899b..22812776c801 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -492,7 +492,6 @@ jobs: cd ../ mkdir empty-<< parameters.template >> cd empty-<< parameters.template >> - yarn set version berry node ../storybook/code/lib/cli/bin/index.js init --yes --package-manager << parameters.packageManager >> node ../storybook/code/lib/cli/bin/index.js dev --smoke-test environment: @@ -676,7 +675,7 @@ workflows: matrix: parameters: packageManager: - - "yarn2" + - "npm" template: - "react-vite-ts" # - "nextjs-ts" From a7ff9e779c31bbc4c7f25f0862ba1b906363a42f Mon Sep 17 00:00:00 2001 From: Shaun Lloyd Date: Thu, 30 Nov 2023 09:39:24 -0500 Subject: [PATCH 052/131] Set in sandbox to true --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 22812776c801..f1490d2920df 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -495,7 +495,7 @@ jobs: node ../storybook/code/lib/cli/bin/index.js init --yes --package-manager << parameters.packageManager >> node ../storybook/code/lib/cli/bin/index.js dev --smoke-test environment: - CI: true + IN_STORYBOOK_SANDBOX: true STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> STORYBOOK_DISABLE_TELEMETRY: true - report-workflow-on-failure From d36324c2bfb73ae91b2c05452fcd0a0f9d6d2822 Mon Sep 17 00:00:00 2001 From: Shaun Lloyd Date: Thu, 30 Nov 2023 09:45:18 -0500 Subject: [PATCH 053/131] run all empty templates --- .circleci/config.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f1490d2920df..5000731b2570 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -678,10 +678,10 @@ workflows: - "npm" template: - "react-vite-ts" - # - "nextjs-ts" - # - "vue-vite-ts" - # - "angular-cli" - # - "lit-vite-ts" + - "nextjs-ts" + - "vue-vite-ts" + - "angular-cli" + - "lit-vite-ts" # TODO: reenable once we find out the source of flakyness # - test-runner-dev: From 8458221cee3da464f74269ad07b0bc7d665c684f Mon Sep 17 00:00:00 2001 From: RoXoM Date: Thu, 30 Nov 2023 23:41:06 +0800 Subject: [PATCH 054/131] refactor: use encodeURIComponent to encode story name --- code/ui/blocks/src/blocks/Subheading.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/ui/blocks/src/blocks/Subheading.tsx b/code/ui/blocks/src/blocks/Subheading.tsx index 02f35bf63fdf..57cf5223be51 100644 --- a/code/ui/blocks/src/blocks/Subheading.tsx +++ b/code/ui/blocks/src/blocks/Subheading.tsx @@ -8,7 +8,7 @@ export const Subheading: FC> = ({ children, disa if (disableAnchor || typeof children !== 'string') { return

{children}

; } - const tagID = children.toLowerCase().replace(/[^a-z0-9]/gi, '-'); + const tagID = globalThis.encodeURIComponent(children.toLowerCase()); return ( {children} From 7aa831ceac7c01c99ab9567df6281a544121fbee Mon Sep 17 00:00:00 2001 From: jonniebigodes Date: Thu, 30 Nov 2023 16:28:16 +0000 Subject: [PATCH 055/131] Docs: Readme move Storyshots to deprecated status --- Issue.md | 67 ------------------------------------------------------- README.md | 18 +++++++-------- 2 files changed, 9 insertions(+), 76 deletions(-) delete mode 100644 Issue.md diff --git a/Issue.md b/Issue.md deleted file mode 100644 index a56a5a902dc1..000000000000 --- a/Issue.md +++ /dev/null @@ -1,67 +0,0 @@ -*What:* -We want to step our TS game in the monorepo and enable strict typescript in all packages! - -*Why:* -Having TS track for you if a variable might be null or not, enables us to code with much more confidence, -and also gives us quick in editor feedback, when you make assumptions that are not actually true! - -*How:* -We would like to change as little as possible of the actual runtime behavior in this migration. -However, we also don't want to simply silence the compiler everywhere with `!`, `as` or `ts-ignore` to get this migration in. -As a rule of thumb, if the logic is easy enough, prefer improving the code (e.g. add a null check) over silencing the compiler. -If the change needed to do the right thing, is too risky, and not in your expertise, it is okay to silence the compiler. -It is not ideal, but we still gain the benefit that new code written will have extra typesafety. - -Feel free to contribute too any of packages in the list below! - -- [ ] @storybook/addon-backgrounds -- [ ] @storybook/addon-docs -- [ ] @storybook/addon-highlight -- [ ] @storybook/addon-interactions -- [ ] @storybook/addon-jest -- [ ] @storybook/addon-mdx-gfm -- [ ] @storybook/addon-measure -- [ ] @storybook/addon-outline -- [ ] @storybook/addon-storyshots -- [ ] @storybook/addon-storyshots-puppeteer -- [ ] @storybook/addon-storysource -- [ ] @storybook/addon-viewport -- [ ] @storybook/addons -- [ ] @storybook/angular -- [ ] @storybook/api -- [ ] @storybook/blocks -- [ ] @storybook/channel-postmessage -- [ ] @storybook/channel-websocket -- [ ] @storybook/channels -- [ ] @storybook/cli -- [ ] @storybook/client-api -- [ ] @storybook/codemod -- [ ] @storybook/components -- [ ] @storybook/core-client -- [ ] @storybook/core-events -- [ ] @storybook/core-server -- [ ] @storybook/csf-tools -- [ ] @storybook/docs-tools -- [ ] @storybook/external-docs -- [ ] @storybook/html-vite -- [ ] @storybook/instrumenter -- [ ] @storybook/manager -- [ ] @storybook/manager-api -- [ ] @storybook/postinstall -- [ ] @storybook/preact-vite -- [ ] @storybook/preset-create-react-app -- [ ] @storybook/preset-vue-webpack -- [ ] @storybook/preset-vue3-webpack -- [ ] @storybook/react-vite -- [ ] @storybook/router -- [ ] @storybook/scripts -- [ ] @storybook/server -- [ ] @storybook/source-loader -- [ ] @storybook/svelte-vite -- [ ] @storybook/sveltekit -- [ ] @storybook/theming -- [ ] @storybook/types -- [ ] @storybook/vue3-vite -- [ ] @storybook/vue3-webpack5 -- [ ] @storybook/web-components -- [ ] @storybook/web-components-vite diff --git a/README.md b/README.md index 820c663970f0..ff92447befac 100644 --- a/README.md +++ b/README.md @@ -91,7 +91,7 @@ Storybook comes with a lot of [addons](https://storybook.js.org/docs/react/confi ### Community -For additional help, share your issue in [the repo's GitHub Discussions](https://github.com/storybookjs/storybook/discussions/new?category=help). +For additional help, join us in the [Storybook Discord](https://discord.gg/storybook). ## Projects @@ -131,7 +131,6 @@ For additional help, share your issue in [the repo's GitHub Discussions](https:/ | [measure](code/addons/measure/) | Visually inspect the layout and box model within the Storybook UI | | [outline](code/addons/outline/) | Visually debug the CSS layout and alignment within the Storybook UI | | [query params](https://github.com/storybookjs/addon-queryparams) | Mock query params | -| [storyshots](code/addons/storyshots-core/) | Snapshot testing for components in Storybook | | [storysource](code/addons/storysource/) | View the code of your stories within the Storybook UI | | [viewport](code/addons/viewport/) | Change display sizes and layouts for responsive components using Storybook | @@ -139,13 +138,14 @@ See [Addon / Framework Support Table](https://storybook.js.org/docs/react/api/fr ### Deprecated Addons -| Addons | | -| ---------------------------------------------------------------------------------- | ---------------------------------------------------------- | -| [contexts](https://storybook.js.org/addons/@storybook/addon-contexts/) | Addon for driving your components under dynamic contexts | -| [info](https://github.com/storybookjs/deprecated-addons/tree/master/addons/info) | Annotate stories with extra component usage information | -| [knobs](https://github.com/storybookjs/addon-knobs) | Interactively edit component prop data in the Storybook UI | -| [notes](https://github.com/storybookjs/deprecated-addons/tree/master/addons/notes) | Annotate Storybook stories with notes | -| [options](https://www.npmjs.com/package/@storybook/addon-options) | Customize the Storybook UI in code | +| Addons | | +| -------------------------------------------------------------------------------------------- | ---------------------------------------------------------- | +| [contexts](https://storybook.js.org/addons/@storybook/addon-contexts/) | Addon for driving your components under dynamic contexts | +| [info](https://github.com/storybookjs/deprecated-addons/tree/master/addons/info) | Annotate stories with extra component usage information | +| [knobs](https://github.com/storybookjs/addon-knobs) | Interactively edit component prop data in the Storybook UI | +| [notes](https://github.com/storybookjs/deprecated-addons/tree/master/addons/notes) | Annotate Storybook stories with notes | +| [options](https://www.npmjs.com/package/@storybook/addon-options) | Customize the Storybook UI in code | +| [storyshots](https://github.com/storybookjs/storybook/tree/main/code/addons/storyshots-core) | Snapshot testing for components in Storybook | To continue improving your experience, we have to eventually deprecate certain addons in favor of new and better tools. From 5175507e621b7754a782a24b4e5aff517fa5e0f6 Mon Sep 17 00:00:00 2001 From: Shaun Lloyd Date: Thu, 30 Nov 2023 11:32:12 -0500 Subject: [PATCH 056/131] Add conditional logic --- .circleci/config.yml | 46 +++++++++++++++++++++++++++++++++++--------- 1 file changed, 37 insertions(+), 9 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5000731b2570..7d5be7d19430 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -486,14 +486,41 @@ jobs: clone_options: '--depth 1 --verbose' - attach_workspace: at: . - - run: - name: Storybook init from empty directory - command: | - cd ../ - mkdir empty-<< parameters.template >> - cd empty-<< parameters.template >> - node ../storybook/code/lib/cli/bin/index.js init --yes --package-manager << parameters.packageManager >> - node ../storybook/code/lib/cli/bin/index.js dev --smoke-test + - when: + equal: ["npm", << parameters.packageManager >>] + steps: + - run: + name: Storybook init from empty directory (NPM) + command: | + cd ../ + mkdir empty-<< parameters.template >> + cd empty-<< parameters.template >> + node ../storybook/code/lib/cli/bin/index.js init --yes --package-manager npm + npm run storybook -- --smoke-test + - when: + equal: ["yarn2", << parameters.packageManager >>] + steps: + - run: + name: Storybook init from empty directory (Yarn 2) + command: | + cd ../ + mkdir empty-<< parameters.template >> + cd empty-<< parameters.template >> + yarn set version berry + node ../storybook/code/lib/cli/bin/index.js init --yes --package-manager yarn2 + yarn storybook --smoke-test + - when: + equal: ["pnpm", << parameters.packageManager >>] + steps: + - run: + name: Storybook init from empty directory (PNPM) + command: | + cd ../ + mkdir empty-<< parameters.template >> + cd empty-<< parameters.template >> + npm i -g pnpm + node ../storybook/code/lib/cli/bin/index.js init --yes --package-manager pnpm + pnpm run storybook --smoke-test environment: IN_STORYBOOK_SANDBOX: true STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> @@ -680,7 +707,8 @@ workflows: - "react-vite-ts" - "nextjs-ts" - "vue-vite-ts" - - "angular-cli" + # --smoke-test is not supported for the angular builder right now + # - "angular-cli" - "lit-vite-ts" # TODO: reenable once we find out the source of flakyness From ef0235fc60e374eaa22a5f4688236a59c1622e5a Mon Sep 17 00:00:00 2001 From: jonniebigodes Date: Thu, 30 Nov 2023 16:34:25 +0000 Subject: [PATCH 057/131] Fixes the community link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ff92447befac..7c174bdcc250 100644 --- a/README.md +++ b/README.md @@ -91,7 +91,7 @@ Storybook comes with a lot of [addons](https://storybook.js.org/docs/react/confi ### Community -For additional help, join us in the [Storybook Discord](https://discord.gg/storybook). +For additional help, share your issue in [the repo's GitHub Discussions](https://github.com/storybookjs/storybook/discussions/new?category=help). ## Projects From 24b947b67d36723c918ad01b2dae705d1aead8e7 Mon Sep 17 00:00:00 2001 From: Shaun Evening Date: Thu, 30 Nov 2023 11:35:22 -0500 Subject: [PATCH 058/131] Updated config.yml --- .circleci/config.yml | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7d5be7d19430..d2489fa724d7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -487,6 +487,7 @@ jobs: - attach_workspace: at: . - when: + condition: equal: ["npm", << parameters.packageManager >>] steps: - run: @@ -497,7 +498,12 @@ jobs: cd empty-<< parameters.template >> node ../storybook/code/lib/cli/bin/index.js init --yes --package-manager npm npm run storybook -- --smoke-test - - when: + environment: + IN_STORYBOOK_SANDBOX: true + STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> + STORYBOOK_DISABLE_TELEMETRY: true + - when: + condition: equal: ["yarn2", << parameters.packageManager >>] steps: - run: @@ -509,7 +515,12 @@ jobs: yarn set version berry node ../storybook/code/lib/cli/bin/index.js init --yes --package-manager yarn2 yarn storybook --smoke-test - - when: + environment: + IN_STORYBOOK_SANDBOX: true + STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> + STORYBOOK_DISABLE_TELEMETRY: true + - when: + condition: equal: ["pnpm", << parameters.packageManager >>] steps: - run: @@ -521,10 +532,10 @@ jobs: npm i -g pnpm node ../storybook/code/lib/cli/bin/index.js init --yes --package-manager pnpm pnpm run storybook --smoke-test - environment: - IN_STORYBOOK_SANDBOX: true - STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> - STORYBOOK_DISABLE_TELEMETRY: true + environment: + IN_STORYBOOK_SANDBOX: true + STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> + STORYBOOK_DISABLE_TELEMETRY: true - report-workflow-on-failure workflows: From 2956a018f706e41f9b7acd91c0c6ae4352a8429e Mon Sep 17 00:00:00 2001 From: Shaun Lloyd Date: Thu, 30 Nov 2023 11:45:25 -0500 Subject: [PATCH 059/131] Add yarn and pnpm --- .circleci/config.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index d2489fa724d7..6150b27d1f80 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -714,6 +714,8 @@ workflows: parameters: packageManager: - "npm" + - "yarn2" + - "pnpm" template: - "react-vite-ts" - "nextjs-ts" From 5cd8fbfc0bd45edc9a8cac36d3443d1d57f30457 Mon Sep 17 00:00:00 2001 From: Shaun Lloyd Date: Thu, 30 Nov 2023 14:16:40 -0500 Subject: [PATCH 060/131] Only run tests for NPM for now --- .circleci/config.yml | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6150b27d1f80..5e155b7db533 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -502,6 +502,22 @@ jobs: IN_STORYBOOK_SANDBOX: true STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> STORYBOOK_DISABLE_TELEMETRY: true + - when: + condition: + equal: ["yarn1", << parameters.packageManager >>] + steps: + - run: + name: Storybook init from empty directory (Yarn 1) + command: | + cd ../ + mkdir empty-<< parameters.template >> + cd empty-<< parameters.template >> + node ../storybook/code/lib/cli/bin/index.js init --yes --package-manager yarn1 + yarn storybook --smoke-test + environment: + IN_STORYBOOK_SANDBOX: true + STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> + STORYBOOK_DISABLE_TELEMETRY: true - when: condition: equal: ["yarn2", << parameters.packageManager >>] @@ -714,8 +730,9 @@ workflows: parameters: packageManager: - "npm" - - "yarn2" - - "pnpm" + # - "yarn1" + # - "yarn2" + # - "pnpm" template: - "react-vite-ts" - "nextjs-ts" From 4114f70f7ebda5310a4bf3e71826f5d20daa9db2 Mon Sep 17 00:00:00 2001 From: Shaun Lloyd Date: Thu, 30 Nov 2023 14:18:06 -0500 Subject: [PATCH 061/131] Re-enable daily flow --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5e155b7db533..d16bff713c96 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -730,6 +730,7 @@ workflows: parameters: packageManager: - "npm" + # TODO: reenable once we find out the source of failure # - "yarn1" # - "yarn2" # - "pnpm" From 96e5271e64a25febf8ffacfab1399f2d10bbd04d Mon Sep 17 00:00:00 2001 From: Shaun Lloyd Date: Thu, 30 Nov 2023 14:18:15 -0500 Subject: [PATCH 062/131] Re-enable daily workflow --- .circleci/config.yml | 86 ++++++++++++++++++++++---------------------- 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d16bff713c96..55e4086dc04f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -677,50 +677,50 @@ workflows: when: equal: [daily, << pipeline.parameters.workflow >>] jobs: - # - pretty-docs + - pretty-docs - build - # - lint: - # requires: - # - build - # - check: - # requires: - # - build - # - unit-tests: - # requires: - # - build - # - script-checks: - # requires: - # - build - # - chromatic-internal-storybooks: - # requires: - # - build - # - create-sandboxes: - # parallelism: 36 - # requires: - # - build - # - smoke-test-sandboxes: # disabled for now - # requires: - # - create-sandboxes - # - build-sandboxes: - # parallelism: 36 - # requires: - # - create-sandboxes - # - chromatic-sandboxes: - # parallelism: 33 - # requires: - # - build-sandboxes - # - e2e-production: - # parallelism: 31 - # requires: - # - build-sandboxes - # - e2e-dev: - # parallelism: 2 - # requires: - # - create-sandboxes - # - test-runner-production: - # parallelism: 31 - # requires: - # - build-sandboxes + - lint: + requires: + - build + - check: + requires: + - build + - unit-tests: + requires: + - build + - script-checks: + requires: + - build + - chromatic-internal-storybooks: + requires: + - build + - create-sandboxes: + parallelism: 36 + requires: + - build + - smoke-test-sandboxes: # disabled for now + requires: + - create-sandboxes + - build-sandboxes: + parallelism: 36 + requires: + - create-sandboxes + - chromatic-sandboxes: + parallelism: 33 + requires: + - build-sandboxes + - e2e-production: + parallelism: 31 + requires: + - build-sandboxes + - e2e-dev: + parallelism: 2 + requires: + - create-sandboxes + - test-runner-production: + parallelism: 31 + requires: + - build-sandboxes # TODO: Uncomment when ready to test - test-empty-init: From 7b9b26980f1d8dc200242bb3725998bbc727d193 Mon Sep 17 00:00:00 2001 From: Shaun Evening Date: Thu, 30 Nov 2023 14:21:20 -0500 Subject: [PATCH 063/131] Updated config.yml --- .circleci/config.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 55e4086dc04f..dc5104a02e23 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -698,9 +698,9 @@ workflows: parallelism: 36 requires: - build - - smoke-test-sandboxes: # disabled for now - requires: - - create-sandboxes + # - smoke-test-sandboxes: # disabled for now + # requires: + # - create-sandboxes - build-sandboxes: parallelism: 36 requires: From 2eb8a9a32d453093f3c7c8a4edb89f082edf427b Mon Sep 17 00:00:00 2001 From: Shaun Lloyd Date: Thu, 30 Nov 2023 16:34:08 -0500 Subject: [PATCH 064/131] ignore package.json in pnpm dlx scenario --- code/lib/cli/src/scaffold-new-project.ts | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/code/lib/cli/src/scaffold-new-project.ts b/code/lib/cli/src/scaffold-new-project.ts index 43e11a679857..fbdc3bc9f2c4 100644 --- a/code/lib/cli/src/scaffold-new-project.ts +++ b/code/lib/cli/src/scaffold-new-project.ts @@ -196,13 +196,22 @@ export const scaffoldNewProject = async (packageManager: PackageManagerName) => logger.line(1); }; -const IGNORED_FILES = ['.git', '.gitignore', '.DS_Store', '.yarn', '.yarnrc.yml']; +const BASE_IGNORED_FILES = ['.git', '.gitignore', '.DS_Store']; -export const currentDirectoryIsEmpty = () => { +const IGNORED_FILES_BY_PACKAGE_MANAGER: Record = { + npm: [...BASE_IGNORED_FILES], + yarn: [...BASE_IGNORED_FILES, 'yarn.lock', '.yarnrc.yml', '.yarn'], + pnpm: [...BASE_IGNORED_FILES, 'pnpm-lock.yaml', '.pnpm', 'package.json'], +}; + +export const currentDirectoryIsEmpty = (packageManager: PackageManagerName) => { + const packageManagerName = packageManagerToCoercedName(packageManager); const cwdFolderEntries = readdirSync(process.cwd()); + const filesToIgnore = IGNORED_FILES_BY_PACKAGE_MANAGER[packageManagerName]; + return ( cwdFolderEntries.length === 0 || - cwdFolderEntries.every((entry) => IGNORED_FILES.includes(entry)) + cwdFolderEntries.every((entry) => filesToIgnore.includes(entry)) ); }; From 0046573f2224ad6a5834895c520fdcbf302011f1 Mon Sep 17 00:00:00 2001 From: Shaun Lloyd Date: Thu, 30 Nov 2023 16:51:04 -0500 Subject: [PATCH 065/131] ignore .cache --- code/lib/cli/src/scaffold-new-project.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/lib/cli/src/scaffold-new-project.ts b/code/lib/cli/src/scaffold-new-project.ts index fbdc3bc9f2c4..e1aec8f0e34f 100644 --- a/code/lib/cli/src/scaffold-new-project.ts +++ b/code/lib/cli/src/scaffold-new-project.ts @@ -196,7 +196,7 @@ export const scaffoldNewProject = async (packageManager: PackageManagerName) => logger.line(1); }; -const BASE_IGNORED_FILES = ['.git', '.gitignore', '.DS_Store']; +const BASE_IGNORED_FILES = ['.git', '.gitignore', '.DS_Store', '.cache']; const IGNORED_FILES_BY_PACKAGE_MANAGER: Record = { npm: [...BASE_IGNORED_FILES], From f9d8358b360ac75635db86b5b0142a6ee1999e40 Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Fri, 1 Dec 2023 12:54:45 +0100 Subject: [PATCH 066/131] upgrade to svelte@5.0.0-next.16 --- code/frameworks/svelte-vite/package.json | 4 +-- code/frameworks/svelte-webpack5/package.json | 2 +- code/frameworks/sveltekit/package.json | 2 +- code/presets/svelte-webpack/package.json | 2 +- code/renderers/svelte/package.json | 2 +- code/yarn.lock | 32 ++++++++++++++++---- 6 files changed, 32 insertions(+), 12 deletions(-) diff --git a/code/frameworks/svelte-vite/package.json b/code/frameworks/svelte-vite/package.json index 947d3e4ccc8d..4cfe87214037 100644 --- a/code/frameworks/svelte-vite/package.json +++ b/code/frameworks/svelte-vite/package.json @@ -58,12 +58,12 @@ }, "devDependencies": { "@types/node": "^18.0.0", - "svelte": "^5.0.0-next.15", + "svelte": "^5.0.0-next.16", "typescript": "^5.3.2", "vite": "^4.0.0" }, "peerDependencies": { - "svelte": "^4.0.0 || ^5.0.0-next.1", + "svelte": "^4.0.0 || ^5.0.0-next.16", "vite": "^3.0.0 || ^4.0.0 || ^5.0.0" }, "engines": { diff --git a/code/frameworks/svelte-webpack5/package.json b/code/frameworks/svelte-webpack5/package.json index f19fac76ba3a..4885a726417b 100644 --- a/code/frameworks/svelte-webpack5/package.json +++ b/code/frameworks/svelte-webpack5/package.json @@ -59,7 +59,7 @@ }, "peerDependencies": { "@babel/core": "*", - "svelte": "^4.0.0 || ^5.0.0-next.1", + "svelte": "^4.0.0 || ^5.0.0-next.16", "svelte-loader": "*" }, "engines": { diff --git a/code/frameworks/sveltekit/package.json b/code/frameworks/sveltekit/package.json index 1b4a37bc8c23..162fb8229411 100644 --- a/code/frameworks/sveltekit/package.json +++ b/code/frameworks/sveltekit/package.json @@ -64,7 +64,7 @@ "vite": "^4.0.0" }, "peerDependencies": { - "svelte": "^4.0.0 || ^5.0.0-next.1", + "svelte": "^4.0.0 || ^5.0.0-next.16", "vite": "^4.0.0" }, "engines": { diff --git a/code/presets/svelte-webpack/package.json b/code/presets/svelte-webpack/package.json index 8a8992d0b528..2792fa28bc32 100644 --- a/code/presets/svelte-webpack/package.json +++ b/code/presets/svelte-webpack/package.json @@ -76,7 +76,7 @@ }, "peerDependencies": { "@babel/core": "*", - "svelte": "^4.0.0 || ^5.0.0-next.1", + "svelte": "^4.0.0 || ^5.0.0-next.16", "svelte-loader": "*" }, "engines": { diff --git a/code/renderers/svelte/package.json b/code/renderers/svelte/package.json index f439e372dba0..ee6c60b1bc70 100644 --- a/code/renderers/svelte/package.json +++ b/code/renderers/svelte/package.json @@ -68,7 +68,7 @@ "typescript": "^5.3.2" }, "peerDependencies": { - "svelte": "^4.0.0 || ^5.0.0-next.1" + "svelte": "^4.0.0 || ^5.0.0-next.16" }, "engines": { "node": ">=16.0.0" diff --git a/code/yarn.lock b/code/yarn.lock index 146426a80b9d..cc46abfa4875 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -6737,7 +6737,7 @@ __metadata: typescript: "npm:^5.3.2" peerDependencies: "@babel/core": "*" - svelte: ^4.0.0 || ^5.0.0-next.1 + svelte: ^4.0.0 || ^5.0.0-next.16 svelte-loader: "*" languageName: unknown linkType: soft @@ -7215,14 +7215,14 @@ __metadata: "@sveltejs/vite-plugin-svelte": "npm:^2.4.2" "@types/node": "npm:^18.0.0" magic-string: "npm:^0.30.0" - svelte: "npm:^5.0.0-next.15" + svelte: "npm:^5.0.0-next.16" svelte-preprocess: "npm:^5.1.1" sveltedoc-parser: "npm:^4.2.1" ts-dedent: "npm:^2.2.0" typescript: "npm:^5.3.2" vite: "npm:^4.0.0" peerDependencies: - svelte: ^4.0.0 || ^5.0.0-next.1 + svelte: ^4.0.0 || ^5.0.0-next.16 vite: ^3.0.0 || ^4.0.0 || ^5.0.0 languageName: unknown linkType: soft @@ -7240,7 +7240,7 @@ __metadata: typescript: "npm:^5.3.2" peerDependencies: "@babel/core": "*" - svelte: ^4.0.0 || ^5.0.0-next.1 + svelte: ^4.0.0 || ^5.0.0-next.16 svelte-loader: "*" languageName: unknown linkType: soft @@ -7263,7 +7263,7 @@ __metadata: type-fest: "npm:~2.19" typescript: "npm:^5.3.2" peerDependencies: - svelte: ^4.0.0 || ^5.0.0-next.1 + svelte: ^4.0.0 || ^5.0.0-next.16 languageName: unknown linkType: soft @@ -7279,7 +7279,7 @@ __metadata: typescript: "npm:^5.3.2" vite: "npm:^4.0.0" peerDependencies: - svelte: ^4.0.0 || ^5.0.0-next.1 + svelte: ^4.0.0 || ^5.0.0-next.16 vite: ^4.0.0 languageName: unknown linkType: soft @@ -27715,6 +27715,26 @@ __metadata: languageName: node linkType: hard +"svelte@npm:^5.0.0-next.16": + version: 5.0.0-next.16 + resolution: "svelte@npm:5.0.0-next.16" + dependencies: + "@ampproject/remapping": "npm:^2.2.1" + "@jridgewell/sourcemap-codec": "npm:^1.4.15" + acorn: "npm:^8.10.0" + acorn-typescript: "npm:^1.4.11" + aria-query: "npm:^5.3.0" + axobject-query: "npm:^4.0.0" + esm-env: "npm:^1.0.0" + esrap: "npm:^1.2.1" + is-reference: "npm:^3.0.1" + locate-character: "npm:^3.0.0" + magic-string: "npm:^0.30.4" + zimmerframe: "npm:^1.1.0" + checksum: 4482d3402415c2233a03c15d3f6d0be28772cb84c386243251c817456478f0a4554ad27add94380c35fe4d2101442e2bbaae4f3130cf75a397f3e93b4e61bc20 + languageName: node + linkType: hard + "sveltedoc-parser@npm:^4.2.1": version: 4.3.1 resolution: "sveltedoc-parser@npm:4.3.1" From db79ce050ce04215d2769b94e82873492ffb09c7 Mon Sep 17 00:00:00 2001 From: Shaun Lloyd Date: Fri, 1 Dec 2023 11:35:37 -0500 Subject: [PATCH 067/131] Try running verdaccio in CI --- .circleci/config.yml | 85 ++++++++++++------------ code/lib/cli/src/dev.ts | 1 + code/lib/cli/src/initiate.ts | 3 +- code/lib/cli/src/scaffold-new-project.ts | 19 +++--- 4 files changed, 57 insertions(+), 51 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index dc5104a02e23..cfad6a0329d4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -493,9 +493,12 @@ jobs: - run: name: Storybook init from empty directory (NPM) command: | - cd ../ + cd code + yarn local-registry --open & + cd ../../ mkdir empty-<< parameters.template >> cd empty-<< parameters.template >> + npm set registry http://localhost:6001 node ../storybook/code/lib/cli/bin/index.js init --yes --package-manager npm npm run storybook -- --smoke-test environment: @@ -677,50 +680,50 @@ workflows: when: equal: [daily, << pipeline.parameters.workflow >>] jobs: - - pretty-docs + # - pretty-docs - build - - lint: - requires: - - build - - check: - requires: - - build - - unit-tests: - requires: - - build - - script-checks: - requires: - - build - - chromatic-internal-storybooks: - requires: - - build - - create-sandboxes: - parallelism: 36 - requires: - - build + # - lint: + # requires: + # - build + # - check: + # requires: + # - build + # - unit-tests: + # requires: + # - build + # - script-checks: + # requires: + # - build + # - chromatic-internal-storybooks: + # requires: + # - build + # - create-sandboxes: + # parallelism: 36 + # requires: + # - build # - smoke-test-sandboxes: # disabled for now # requires: # - create-sandboxes - - build-sandboxes: - parallelism: 36 - requires: - - create-sandboxes - - chromatic-sandboxes: - parallelism: 33 - requires: - - build-sandboxes - - e2e-production: - parallelism: 31 - requires: - - build-sandboxes - - e2e-dev: - parallelism: 2 - requires: - - create-sandboxes - - test-runner-production: - parallelism: 31 - requires: - - build-sandboxes + # - build-sandboxes: + # parallelism: 36 + # requires: + # - create-sandboxes + # - chromatic-sandboxes: + # parallelism: 33 + # requires: + # - build-sandboxes + # - e2e-production: + # parallelism: 31 + # requires: + # - build-sandboxes + # - e2e-dev: + # parallelism: 2 + # requires: + # - create-sandboxes + # - test-runner-production: + # parallelism: 31 + # requires: + # - build-sandboxes # TODO: Uncomment when ready to test - test-empty-init: diff --git a/code/lib/cli/src/dev.ts b/code/lib/cli/src/dev.ts index ee82ae2cb7c4..ef507f9b9e34 100644 --- a/code/lib/cli/src/dev.ts +++ b/code/lib/cli/src/dev.ts @@ -38,6 +38,7 @@ function printError(error: any) { } export const dev = async (cliOptions: CLIOptions) => { + console.log('Hey there from dev!'); process.env.NODE_ENV = process.env.NODE_ENV || 'development'; const readUpResult = readUpSync({ cwd: __dirname }); diff --git a/code/lib/cli/src/initiate.ts b/code/lib/cli/src/initiate.ts index 9ae63ccc71b8..4355759575da 100644 --- a/code/lib/cli/src/initiate.ts +++ b/code/lib/cli/src/initiate.ts @@ -268,7 +268,7 @@ async function doInitiate( }); // Check if the current directory is empty. - if (options.force !== true && currentDirectoryIsEmpty()) { + if (options.force !== true && currentDirectoryIsEmpty(packageManager.type)) { // Prompt the user to create a new project from our list. await scaffoldNewProject(packageManager.type); } @@ -377,6 +377,7 @@ async function doInitiate( } export async function initiate(options: CommandOptions, pkg: PackageJson): Promise { + console.log('Hey there!'); const initiateResult = await withTelemetry( 'init', { diff --git a/code/lib/cli/src/scaffold-new-project.ts b/code/lib/cli/src/scaffold-new-project.ts index e1aec8f0e34f..dad37b3b8b5a 100644 --- a/code/lib/cli/src/scaffold-new-project.ts +++ b/code/lib/cli/src/scaffold-new-project.ts @@ -32,9 +32,9 @@ const SUPPORTED_PROJECTS: Record = { language: 'TS', }, createScript: { - npm: 'npm create vite@latest --yes . -- --template react-ts', - yarn: 'yarn create vite@latest --yes . --template react-ts', - pnpm: 'pnpm create vite@latest --yes . --template react-ts', + npm: 'npm create vite@latest . -- --template react-ts', + yarn: 'yarn create vite@latest . --template react-ts', + pnpm: 'pnpm create vite@latest . --template react-ts', }, }, 'nextjs-ts': { @@ -55,9 +55,9 @@ const SUPPORTED_PROJECTS: Record = { language: 'TS', }, createScript: { - npm: 'npm create vite@latest --yes . -- --template vue-ts', - yarn: 'yarn create vite@latest --yes . --template vue-ts', - pnpm: 'pnpm create vite@latest --yes . --template vue-ts', + npm: 'npm create vite@latest . -- --template vue-ts', + yarn: 'yarn create vite@latest . --template vue-ts', + pnpm: 'pnpm create vite@latest . --template vue-ts', }, }, 'angular-cli': { @@ -78,9 +78,9 @@ const SUPPORTED_PROJECTS: Record = { language: 'TS', }, createScript: { - npm: 'npm create vite@latest --yes . -- --template lit-ts', - yarn: 'yarn create vite@latest --yes . --template lit-ts && touch yarn.lock && yarn set version berry && yarn config set nodeLinker pnp', - pnpm: 'pnpm create vite@latest --yes . --template lit-ts', + npm: 'npm create vite@latest . -- --template lit-ts', + yarn: 'yarn create vite@latest . --template lit-ts && touch yarn.lock && yarn set version berry && yarn config set nodeLinker pnp', + pnpm: 'pnpm create vite@latest . --template lit-ts', }, }, }; @@ -210,6 +210,7 @@ export const currentDirectoryIsEmpty = (packageManager: PackageManagerName) => { const filesToIgnore = IGNORED_FILES_BY_PACKAGE_MANAGER[packageManagerName]; + console.log('PAckage manager used: ', packageManager, packageManagerName); return ( cwdFolderEntries.length === 0 || cwdFolderEntries.every((entry) => filesToIgnore.includes(entry)) From 2d4f4948e7458d16b48d1e456d556bdb8969f684 Mon Sep 17 00:00:00 2001 From: Shaun Lloyd Date: Fri, 1 Dec 2023 11:50:46 -0500 Subject: [PATCH 068/131] Update other package managers to use verdaccio --- .circleci/config.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index cfad6a0329d4..9195aeea1ec0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -512,7 +512,9 @@ jobs: - run: name: Storybook init from empty directory (Yarn 1) command: | - cd ../ + cd code + yarn local-registry --open & + cd ../../ mkdir empty-<< parameters.template >> cd empty-<< parameters.template >> node ../storybook/code/lib/cli/bin/index.js init --yes --package-manager yarn1 @@ -528,10 +530,13 @@ jobs: - run: name: Storybook init from empty directory (Yarn 2) command: | - cd ../ + cd code + yarn local-registry --open & + cd ../../ mkdir empty-<< parameters.template >> cd empty-<< parameters.template >> yarn set version berry + yarn config set registry http://localhost:6001 node ../storybook/code/lib/cli/bin/index.js init --yes --package-manager yarn2 yarn storybook --smoke-test environment: @@ -545,10 +550,13 @@ jobs: - run: name: Storybook init from empty directory (PNPM) command: | - cd ../ + cd code + yarn local-registry --open & + cd ../../ mkdir empty-<< parameters.template >> cd empty-<< parameters.template >> npm i -g pnpm + pnpm config set registry http://localhost:6001 node ../storybook/code/lib/cli/bin/index.js init --yes --package-manager pnpm pnpm run storybook --smoke-test environment: From a6379b09b80eecd9402878f34459131e4945d630 Mon Sep 17 00:00:00 2001 From: Shaun Lloyd Date: Fri, 1 Dec 2023 11:52:42 -0500 Subject: [PATCH 069/131] Try using npx in circleCI --- .circleci/config.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9195aeea1ec0..a7723ed00b27 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -499,7 +499,7 @@ jobs: mkdir empty-<< parameters.template >> cd empty-<< parameters.template >> npm set registry http://localhost:6001 - node ../storybook/code/lib/cli/bin/index.js init --yes --package-manager npm + npx storybook init --yes --package-manager npm npm run storybook -- --smoke-test environment: IN_STORYBOOK_SANDBOX: true @@ -517,7 +517,7 @@ jobs: cd ../../ mkdir empty-<< parameters.template >> cd empty-<< parameters.template >> - node ../storybook/code/lib/cli/bin/index.js init --yes --package-manager yarn1 + npx storybook init --yes --package-manager yarn1 yarn storybook --smoke-test environment: IN_STORYBOOK_SANDBOX: true @@ -537,7 +537,7 @@ jobs: cd empty-<< parameters.template >> yarn set version berry yarn config set registry http://localhost:6001 - node ../storybook/code/lib/cli/bin/index.js init --yes --package-manager yarn2 + yarn dlx storybook init --yes --package-manager yarn2 yarn storybook --smoke-test environment: IN_STORYBOOK_SANDBOX: true @@ -557,7 +557,7 @@ jobs: cd empty-<< parameters.template >> npm i -g pnpm pnpm config set registry http://localhost:6001 - node ../storybook/code/lib/cli/bin/index.js init --yes --package-manager pnpm + pnpm dlx storybook init --yes --package-manager pnpm pnpm run storybook --smoke-test environment: IN_STORYBOOK_SANDBOX: true From ca4cc16fd1f4fef142aec98688fc2deac0e9aa62 Mon Sep 17 00:00:00 2001 From: Michael Shilman Date: Sun, 3 Dec 2023 16:59:36 +0800 Subject: [PATCH 070/131] NextJS: Add RSC support --- code/frameworks/nextjs/src/preview.tsx | 5 +++++ code/frameworks/nextjs/src/rsc/decorator.tsx | 16 +++++++++++++++ .../nextjs/template/stories/RSC.jsx | 3 +++ .../nextjs/template/stories/RSC.stories.jsx | 20 +++++++++++++++++++ 4 files changed, 44 insertions(+) create mode 100644 code/frameworks/nextjs/src/rsc/decorator.tsx create mode 100644 code/frameworks/nextjs/template/stories/RSC.jsx create mode 100644 code/frameworks/nextjs/template/stories/RSC.stories.jsx diff --git a/code/frameworks/nextjs/src/preview.tsx b/code/frameworks/nextjs/src/preview.tsx index 9f30af9d787d..326bee0c0123 100644 --- a/code/frameworks/nextjs/src/preview.tsx +++ b/code/frameworks/nextjs/src/preview.tsx @@ -1,5 +1,6 @@ import type { Addon_DecoratorFunction } from '@storybook/types'; import './config/preview'; +import { ServerComponentDecorator } from './rsc/decorator'; import { ImageDecorator } from './images/decorator'; import { RouterDecorator } from './routing/decorator'; import { StyledJsxDecorator } from './styledJsx/decorator'; @@ -15,6 +16,7 @@ function addNextHeadCount() { addNextHeadCount(); export const decorators: Addon_DecoratorFunction[] = [ + ServerComponentDecorator, StyledJsxDecorator, ImageDecorator, RouterDecorator, @@ -22,6 +24,9 @@ export const decorators: Addon_DecoratorFunction[] = [ ]; export const parameters = { + nextjs: { + rsc: true, + }, docs: { source: { excludeDecorators: true, diff --git a/code/frameworks/nextjs/src/rsc/decorator.tsx b/code/frameworks/nextjs/src/rsc/decorator.tsx new file mode 100644 index 000000000000..ceaf9daca1bf --- /dev/null +++ b/code/frameworks/nextjs/src/rsc/decorator.tsx @@ -0,0 +1,16 @@ +import * as React from 'react'; +import type { StoryContext } from '@storybook/react'; + +export const ServerComponentDecorator = ( + Story: React.FC, + { parameters }: StoryContext +): React.ReactNode => { + console.log('ServerComponentDecorator', { rsc: parameters?.nextjs?.rsc }); + return parameters?.nextjs?.rsc ? ( + + + + ) : ( + + ); +}; diff --git a/code/frameworks/nextjs/template/stories/RSC.jsx b/code/frameworks/nextjs/template/stories/RSC.jsx new file mode 100644 index 000000000000..6399326e9af8 --- /dev/null +++ b/code/frameworks/nextjs/template/stories/RSC.jsx @@ -0,0 +1,3 @@ +import React from 'react'; + +export const RSC = async () => <>RSC; diff --git a/code/frameworks/nextjs/template/stories/RSC.stories.jsx b/code/frameworks/nextjs/template/stories/RSC.stories.jsx new file mode 100644 index 000000000000..46fd35dde1d5 --- /dev/null +++ b/code/frameworks/nextjs/template/stories/RSC.stories.jsx @@ -0,0 +1,20 @@ +import React, { Suspense } from 'react'; +import { RSC } from './RSC'; + +export default { + component: RSC, +}; + +export const Default = {}; + +export const DisableRSC = { + parameters: { + nextjs: { rsc: false }, + }, +}; + +export const Error = { + render: () => { + throw new Error('RSC Error'); + }, +}; From 2960d3d05ebbc4de08c753da666b95302ffaeedd Mon Sep 17 00:00:00 2001 From: Michael Shilman Date: Sun, 3 Dec 2023 17:00:14 +0800 Subject: [PATCH 071/131] React: Add RSC type support --- code/renderers/react/src/types.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/renderers/react/src/types.ts b/code/renderers/react/src/types.ts index 637f1b5a5ebc..dae8d9c20949 100644 --- a/code/renderers/react/src/types.ts +++ b/code/renderers/react/src/types.ts @@ -17,4 +17,4 @@ export interface ShowErrorArgs { description: string; } -export type StoryFnReactReturnType = JSX.Element; +export type StoryFnReactReturnType = JSX.Element | Promise; From 048fa05a3110f3124934d8291c5c71619f4e5ca4 Mon Sep 17 00:00:00 2001 From: Michael Shilman Date: Sun, 3 Dec 2023 21:40:11 +0800 Subject: [PATCH 072/131] Revert "React: Add RSC type support" This reverts commit 2960d3d05ebbc4de08c753da666b95302ffaeedd. --- code/renderers/react/src/types.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/renderers/react/src/types.ts b/code/renderers/react/src/types.ts index dae8d9c20949..637f1b5a5ebc 100644 --- a/code/renderers/react/src/types.ts +++ b/code/renderers/react/src/types.ts @@ -17,4 +17,4 @@ export interface ShowErrorArgs { description: string; } -export type StoryFnReactReturnType = JSX.Element | Promise; +export type StoryFnReactReturnType = JSX.Element; From 0cfe04543bae8dc327bc3d67bbcbe69e4adcd306 Mon Sep 17 00:00:00 2001 From: Michael Shilman Date: Mon, 4 Dec 2023 12:24:48 +0800 Subject: [PATCH 073/131] Skip intentional error stories --- code/frameworks/nextjs/template/stories/RSC.stories.jsx | 7 ++++++- scripts/tasks/test-runner-build.ts | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/code/frameworks/nextjs/template/stories/RSC.stories.jsx b/code/frameworks/nextjs/template/stories/RSC.stories.jsx index 46fd35dde1d5..06d2596478c9 100644 --- a/code/frameworks/nextjs/template/stories/RSC.stories.jsx +++ b/code/frameworks/nextjs/template/stories/RSC.stories.jsx @@ -1,4 +1,3 @@ -import React, { Suspense } from 'react'; import { RSC } from './RSC'; export default { @@ -8,12 +7,18 @@ export default { export const Default = {}; export const DisableRSC = { + tags: ['test-skip'], parameters: { + chromatic: { disable: true }, nextjs: { rsc: false }, }, }; export const Error = { + tags: ['test-skip'], + parameters: { + chromatic: { disable: true }, + }, render: () => { throw new Error('RSC Error'); }, diff --git a/scripts/tasks/test-runner-build.ts b/scripts/tasks/test-runner-build.ts index b57d4c803233..f902777fc63c 100644 --- a/scripts/tasks/test-runner-build.ts +++ b/scripts/tasks/test-runner-build.ts @@ -17,6 +17,7 @@ export const testRunnerBuild: Task & { port: number } = { '--junit', '--maxWorkers=2', '--failOnConsole', + '--skipTags="test-skip"', ]; // index-json mode is only supported in ssv7 From cdb507992d600137678fd16924489246ddfb6b70 Mon Sep 17 00:00:00 2001 From: Valentin Palkovic Date: Mon, 4 Dec 2023 09:04:41 +0100 Subject: [PATCH 074/131] Fix CSF Plugin for Angular --- code/lib/csf-plugin/src/index.ts | 12 +- code/lib/csf-tools/src/enrichCsf.test.ts | 392 +++++++++++++++++------ code/lib/csf-tools/src/enrichCsf.ts | 22 +- 3 files changed, 318 insertions(+), 108 deletions(-) diff --git a/code/lib/csf-plugin/src/index.ts b/code/lib/csf-plugin/src/index.ts index aed7a531ee32..962a192bd746 100644 --- a/code/lib/csf-plugin/src/index.ts +++ b/code/lib/csf-plugin/src/index.ts @@ -12,15 +12,17 @@ const logger = console; export const unplugin = createUnplugin((options) => { return { name: 'unplugin-csf', - enforce: 'pre', - loadInclude(id) { + transformInclude(id) { return STORIES_REGEX.test(id); }, - async load(fname) { - const code = await fs.readFile(fname, 'utf-8'); + async transform(code, id) { + const sourceCode = await fs.readFile(id, 'utf-8'); try { const csf = loadCsf(code, { makeTitle: (userTitle) => userTitle || 'default' }).parse(); - enrichCsf(csf, options); + const csfSource = loadCsf(sourceCode, { + makeTitle: (userTitle) => userTitle || 'default', + }).parse(); + enrichCsf(csf, csfSource, options); return formatCsf(csf, { sourceMaps: true }); } catch (err: any) { // This can be called on legacy storiesOf files, so just ignore diff --git a/code/lib/csf-tools/src/enrichCsf.test.ts b/code/lib/csf-tools/src/enrichCsf.test.ts index a8f5f3aaa09c..d793f730cecc 100644 --- a/code/lib/csf-tools/src/enrichCsf.test.ts +++ b/code/lib/csf-tools/src/enrichCsf.test.ts @@ -11,11 +11,16 @@ expect.addSnapshotSerializer({ test: (val) => true, }); -const enrich = (code: string, options?: EnrichCsfOptions) => { +const enrich = (code: string, originalCode: string, options?: EnrichCsfOptions) => { // we don't actually care about the title - const csf = loadCsf(code, { makeTitle: (userTitle) => userTitle || 'default' }).parse(); - enrichCsf(csf, options); + const csf = loadCsf(code, { + makeTitle: (userTitle) => userTitle || 'default', + }).parse(); + const csfSource = loadCsf(originalCode, { + makeTitle: (userTitle) => userTitle || 'default', + }).parse(); + enrichCsf(csf, csfSource, options); return formatCsf(csf); }; @@ -23,17 +28,28 @@ describe('enrichCsf', () => { describe('source', () => { it('csf1', () => { expect( - enrich(dedent` + enrich( + dedent` + // compiled code export default { title: 'Button', } - export const Basic = () => `, - }) - ) - ).toMatchInlineSnapshot(``); - }); - - it('static class', () => { - expect( - vnodeToString( - getVNode({ - template: ``, - }) - ) - ).toMatchInlineSnapshot(``); - }); - - it('string dynamic class', () => { - expect( - vnodeToString( - getVNode({ - template: ``, - }) - ) - ).toMatchInlineSnapshot(``); - }); - - it('non-string dynamic class', () => { - expect( - vnodeToString( - getVNode({ - template: ``, - }) - ) - ).toMatchInlineSnapshot(``); - }); - - it('array dynamic class', () => { - expect( - vnodeToString( - getVNode({ - template: ``, - }) - ) - ).toMatchInlineSnapshot(``); - }); - - it('object dynamic class', () => { - expect( - vnodeToString( - getVNode({ - template: ``, - }) - ) - ).toMatchInlineSnapshot(``); - }); - - it('merge dynamic and static classes', () => { - expect( - vnodeToString( - getVNode({ - template: ``, - }) - ) - ).toMatchInlineSnapshot(``); - }); - - it('attributes', () => { - const MyComponent: ComponentOptions = { - props: ['propA', 'propB', 'propC', 'propD', 'propE', 'propF', 'propG'], - template: '
', - }; - - expect( - vnodeToString( - getVNode({ - components: { MyComponent }, - data(): { props: Record } { - return { - props: { - propA: 'propA', - propB: 1, - propC: null, - propD: { - foo: 'bar', - }, - propE: true, - propF() { - const foo = 'bar'; - - return foo; - }, - propG: undefined, - }, - }; - }, - template: ``, - }) - ) - ).toMatchInlineSnapshot( - `` - ); - }); - - it('children', () => { - expect( - vnodeToString( - getVNode({ - template: ` -
-
- -
-
`, - }) - ) - ).toMatchInlineSnapshot(`
`); - }); - - it('empty tag', () => { - expect( - vnodeToString( - getVNode({ - template: ` -
-
`, - }) - ) - ).toMatchInlineSnapshot(`
`); - }); - - it('tag in text', () => { - expect( - vnodeToString( - getVNode({ - template: ` -
- <> -
`, - }) - ) - ).toMatchInlineSnapshot(` -
{{\` - <> - \`}}
- `); - }); - - it('component element with children', () => { - const MyComponent: ComponentOptions = { - props: ['propA'], - template: '
', - }; - - expect( - vnodeToString( - getVNode({ - components: { MyComponent }, - data(): { props: Record } { - return { - props: { - propA: 'propA', - }, - }; - }, - template: `
`, - }) - ) - ).toMatchInlineSnapshot(`
`); - }); -}); diff --git a/code/renderers/vue/src/docs/sourceDecorator.ts b/code/renderers/vue/src/docs/sourceDecorator.ts deleted file mode 100644 index becc96802860..000000000000 --- a/code/renderers/vue/src/docs/sourceDecorator.ts +++ /dev/null @@ -1,233 +0,0 @@ -/* eslint-disable no-underscore-dangle */ -/* eslint no-underscore-dangle: ["error", { "allow": ["_vnode"] }] */ - -import { addons } from '@storybook/preview-api'; -import { logger } from '@storybook/client-logger'; -import { SourceType, SNIPPET_RENDERED } from '@storybook/docs-tools'; -import { type ComponentOptions } from 'vue'; -import type Vue from 'vue'; -import type { StoryContext } from '../types'; - -export const skipSourceRender = (context: StoryContext) => { - const sourceParams = context?.parameters.docs?.source; - const isArgsStory = context?.parameters.__isArgsStory; - - // always render if the user forces it - if (sourceParams?.type === SourceType.DYNAMIC) { - return false; - } - - // never render if the user is forcing the block to render code, or - // if the user provides code, or if it's not an args story. - return !isArgsStory || sourceParams?.code || sourceParams?.type === SourceType.CODE; -}; - -export const sourceDecorator = (storyFn: any, context: StoryContext) => { - const story = storyFn(); - const source = ''; - - // See ../react/jsxDecorator.tsx - const skip = skipSourceRender(context); - if (skip) { - return story; - } - - const channel = addons.getChannel(); - - const storyComponent = getStoryComponent(story.options.STORYBOOK_WRAPS); - const generateSource = (vueInstance: any) => { - try { - // console.log('updateSource():', vueInstance.$vnode); - const storyNode = lookupStoryInstance(vueInstance, storyComponent); - if (!storyNode) { - logger.warn(`Failed to find story component in the rendered tree: ${storyComponent}`); - return; - } - // eslint-disable-next-line no-param-reassign - vueInstance.source = vnodeToString(storyNode._vnode); - } catch (e) { - logger.warn(`Failed to generate dynamic story source: ${e}`); - } - }; - - return { - components: { - Story: story, - }, - data() { - return { source }; - }, - updated() { - generateSource(this); - }, - mounted() { - this.$watch('source', (val) => - channel.emit(SNIPPET_RENDERED, context.id, ``, 'vue') - ); - generateSource(this); - }, - template: '', - } as ComponentOptions & ThisType; -}; - -export function vnodeToString(vnode: Vue.VNode): string { - const attrString = [ - ...(vnode.data?.slot ? ([['slot', vnode.data.slot]] as [string, any][]) : []), - ['class', stringifyClassAttribute(vnode)], - ...(vnode.componentOptions?.propsData ? Object.entries(vnode.componentOptions.propsData) : []), - ...(vnode.data?.attrs ? Object.entries(vnode.data.attrs) : []), - ] - .filter(([name], index, list) => list.findIndex((item) => item[0] === name) === index) - .map(([name, value]) => stringifyAttr(name!, value)) - .filter(Boolean) - .join(' '); - - if (!vnode.componentOptions) { - // Non-component elements (div, span, etc...) - if (vnode.tag) { - if (!vnode.children) { - return `<${vnode.tag} ${attrString}/>`; - } - - return `<${vnode.tag} ${attrString}>${vnode.children.map(vnodeToString).join('')}`; - } - - // TextNode - if (vnode.text) { - if (/[<>"&]/.test(vnode.text)) { - return `{{\`${vnode.text.replace(/`/g, '\\`')}\`}}`; - } - - return vnode.text; - } - - // Unknown - return ''; - } - - // Probably users never see the "unknown-component". It seems that vnode.tag - // is always set. - const tag = vnode.componentOptions.tag || vnode.tag || 'unknown-component'; - - if (!vnode.componentOptions.children) { - return `<${tag} ${attrString}/>`; - } - - return `<${tag} ${attrString}>${vnode.componentOptions.children - .map(vnodeToString) - .join('')}`; -} - -function stringifyClassAttribute(vnode: Vue.VNode): string | undefined { - if (!vnode.data || (!vnode.data.staticClass && !vnode.data.class)) { - return undefined; - } - - return ( - [...(vnode.data.staticClass?.split(' ') ?? []), ...normalizeClassBinding(vnode.data.class)] - .filter(Boolean) - .join(' ') || undefined - ); -} - -// https://vuejs.org/v2/guide/class-and-style.html#Binding-HTML-Classes -function normalizeClassBinding(binding: unknown): readonly string[] { - if (!binding) { - return []; - } - - if (typeof binding === 'string') { - return [binding]; - } - - if (binding instanceof Array) { - // To handle an object-in-array binding smartly, we use recursion - return binding.map(normalizeClassBinding).reduce((a, b) => [...a, ...b], []); - } - - if (typeof binding === 'object') { - return Object.entries(binding) - .filter(([, active]) => !!active) - .map(([className]) => className); - } - - // Unknown class binding - return []; -} - -function stringifyAttr(attrName: string, value?: any): string | null { - if (typeof value === 'undefined' || typeof value === 'function') { - return null; - } - - if (value === true) { - return attrName; - } - - if (typeof value === 'string') { - return `${attrName}=${quote(value)}`; - } - - // TODO: Better serialization (unquoted object key, Symbol/Classes, etc...) - // Seems like Prettier don't format JSON-look object (= when keys are quoted) - return `:${attrName}=${quote(JSON.stringify(value))}`; -} - -function quote(value: string) { - return value.includes(`"`) && !value.includes(`'`) - ? `'${value}'` - : `"${value.replace(/"/g, '"')}"`; -} - -/** - * Skip decorators and grab a story component itself. - * https://github.com/pocka/storybook-addon-vue-info/pull/113 - */ -function getStoryComponent(w: any) { - let matched = w; - - while ( - matched && - matched.options && - matched.options.components && - matched.options.components.story && - matched.options.components.story.options && - matched.options.components.story.options.STORYBOOK_WRAPS - ) { - matched = matched.options.components.story.options.STORYBOOK_WRAPS; - } - return matched; -} - -interface VueInternal { - // We need to access this private property, in order to grab the vnode of the - // component instead of the "vnode of the parent of the component". - // Probably it's safe to rely on this because vm.$vnode is a reference for this. - // https://github.com/vuejs/vue/issues/6070#issuecomment-314389883 - _vnode: Vue.VNode; -} - -/** - * Find the story's instance from VNode tree. - */ -function lookupStoryInstance(instance: Vue, storyComponent: any): (Vue & VueInternal) | null { - if ( - instance.$vnode && - instance.$vnode.componentOptions && - instance.$vnode.componentOptions.Ctor === storyComponent - ) { - return instance as Vue & VueInternal; - } - - for (let i = 0, l = instance.$children.length; i < l; i += 1) { - const found = lookupStoryInstance(instance.$children[i], storyComponent); - - if (found) { - return found; - } - } - - return null; -} diff --git a/code/renderers/vue/src/entry-preview-docs.ts b/code/renderers/vue/src/entry-preview-docs.ts deleted file mode 100644 index bd5af4e3f916..000000000000 --- a/code/renderers/vue/src/entry-preview-docs.ts +++ /dev/null @@ -1,17 +0,0 @@ -import type { ArgTypesEnhancer, DecoratorFunction } from '@storybook/types'; -import { extractComponentDescription, enhanceArgTypes } from '@storybook/docs-tools'; -import { extractArgTypes } from './docs/extractArgTypes'; -import { sourceDecorator } from './docs/sourceDecorator'; -import type { VueRenderer } from './types'; - -export const parameters = { - docs: { - story: { inline: true, iframeHeight: '120px' }, - extractArgTypes, - extractComponentDescription, - }, -}; - -export const decorators: DecoratorFunction[] = [sourceDecorator]; - -export const argTypesEnhancers: ArgTypesEnhancer[] = [enhanceArgTypes]; diff --git a/code/renderers/vue/src/entry-preview.ts b/code/renderers/vue/src/entry-preview.ts deleted file mode 100644 index 2110e13bcf0c..000000000000 --- a/code/renderers/vue/src/entry-preview.ts +++ /dev/null @@ -1,3 +0,0 @@ -export const parameters: {} = { renderer: 'vue' }; -export { render, renderToCanvas } from './render'; -export { decorateStory as applyDecorators } from './decorateStory'; diff --git a/code/renderers/vue/src/globals.ts b/code/renderers/vue/src/globals.ts deleted file mode 100644 index f91a342510a2..000000000000 --- a/code/renderers/vue/src/globals.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { global } from '@storybook/global'; - -const { window: globalWindow } = global; - -globalWindow.STORYBOOK_ENV = 'vue'; diff --git a/code/renderers/vue/src/index.ts b/code/renderers/vue/src/index.ts deleted file mode 100644 index 145fbf2612ea..000000000000 --- a/code/renderers/vue/src/index.ts +++ /dev/null @@ -1,8 +0,0 @@ -/// - -import './globals'; - -export * from './public-types'; - -// optimization: stop HMR propagation in webpack -if (typeof module !== 'undefined') module?.hot?.decline(); diff --git a/code/renderers/vue/src/preset.ts b/code/renderers/vue/src/preset.ts deleted file mode 100644 index 03b11e7e6097..000000000000 --- a/code/renderers/vue/src/preset.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { PresetProperty } from '@storybook/types'; -import { join } from 'path'; - -export const previewAnnotations: PresetProperty<'previewAnnotations'> = async ( - input = [], - options -) => { - const docsEnabled = Object.keys(await options.presets.apply('docs', {}, options)).length > 0; - const result: string[] = []; - - return result - .concat(input) - .concat([join(__dirname, 'entry-preview.mjs')]) - .concat(docsEnabled ? [join(__dirname, 'entry-preview-docs.mjs')] : []); -}; diff --git a/code/renderers/vue/src/public-types.test.ts b/code/renderers/vue/src/public-types.test.ts deleted file mode 100644 index 0f3b90fbe04d..000000000000 --- a/code/renderers/vue/src/public-types.test.ts +++ /dev/null @@ -1,175 +0,0 @@ -import { satisfies } from '@storybook/core-common'; -import type { ComponentAnnotations, StoryAnnotations } from '@storybook/types'; -import { expectTypeOf } from 'expect-type'; -import type { SetOptional } from 'type-fest'; -import type { Component } from 'vue'; -import type { ExtendedVue } from 'vue/types/vue'; -import { Vue } from 'vue/types/vue'; -import type { Decorator, Meta, StoryObj } from './public-types'; -import Button from './__tests__/Button.vue'; -import type { VueRenderer } from './types'; - -describe('Meta', () => { - test('Generic parameter of Meta can be a component', () => { - const meta: Meta = { - component: Button, - args: { label: 'good', disabled: false }, - }; - - expectTypeOf(meta).toEqualTypeOf< - ComponentAnnotations< - VueRenderer, - { - disabled: boolean; - label: string; - } - > - >(); - }); - - test('Generic parameter of Meta can be the props of the component', () => { - const meta: Meta<{ disabled: boolean; label: string }> = { - component: Button, - args: { label: 'good', disabled: false }, - }; - - expectTypeOf(meta).toEqualTypeOf< - ComponentAnnotations - >(); - }); -}); - -describe('StoryObj', () => { - type ButtonProps = { - disabled: boolean; - label: string; - }; - - test('βœ… Required args may be provided partial in meta and the story', () => { - const meta = satisfies>()({ - component: Button, - args: { label: 'good' }, - }); - - type Actual = StoryObj; - type Expected = StoryAnnotations>; - expectTypeOf().toEqualTypeOf(); - }); - - test('❌ The combined shape of meta args and story args must match the required args.', () => { - { - const meta = satisfies>()({ component: Button }); - - type Expected = StoryAnnotations; - expectTypeOf>().toEqualTypeOf(); - } - { - const meta = satisfies>()({ - component: Button, - args: { label: 'good' }, - }); - // @ts-expect-error disabled not provided ❌ - const Basic: StoryObj = {}; - - type Expected = StoryAnnotations>; - expectTypeOf(Basic).toEqualTypeOf(); - } - { - const meta = satisfies>()({ component: Button }); - const Basic: StoryObj = { - // @ts-expect-error disabled not provided ❌ - args: { label: 'good' }, - }; - - type Expected = StoryAnnotations; - expectTypeOf(Basic).toEqualTypeOf(); - } - }); - - test('Component can be used as generic parameter for StoryObj', () => { - expectTypeOf>().toEqualTypeOf< - StoryAnnotations - >(); - }); -}); - -type ThemeData = 'light' | 'dark'; - -type ComponentProps = C extends ExtendedVue - ? P - : C extends Component - ? P - : unknown; - -describe('Story args can be inferred', () => { - test('Correct args are inferred when type is widened for render function', () => { - type Props = ComponentProps & { theme: ThemeData }; - - const meta = satisfies>()({ - component: Button, - args: { disabled: false }, - render: (args) => - Vue.extend({ - components: { Button }, - template: `
Using the theme: ${args.theme}
`, - props: Object.keys(args), - }), - }); - - const Basic: StoryObj = { args: { theme: 'light', label: 'good' } }; - - type Expected = StoryAnnotations>; - expectTypeOf(Basic).toEqualTypeOf(); - }); - - const withDecorator: Decorator<{ decoratorArg: string }> = ( - storyFn, - { args: { decoratorArg } } - ) => - Vue.extend({ - components: { Story: storyFn() }, - template: `
Decorator: ${decoratorArg}
`, - }); - - test('Correct args are inferred when type is widened for decorators', () => { - type Props = ComponentProps & { decoratorArg: string }; - - const meta = satisfies>()({ - component: Button, - args: { disabled: false }, - decorators: [withDecorator], - }); - - const Basic: StoryObj = { args: { decoratorArg: 'title', label: 'good' } }; - - type Expected = StoryAnnotations>; - expectTypeOf(Basic).toEqualTypeOf(); - }); - - test('Correct args are inferred when type is widened for multiple decorators', () => { - type Props = ComponentProps & { decoratorArg: string; decoratorArg2: string }; - - const secondDecorator: Decorator<{ decoratorArg2: string }> = ( - storyFn, - { args: { decoratorArg2 } } - ) => { - return Vue.extend({ - components: { Story: storyFn() }, - template: `
Decorator: ${decoratorArg2}
`, - }); - }; - - const meta = satisfies>()({ - component: Button, - args: { disabled: false }, - decorators: [withDecorator, secondDecorator], - }); - - const Basic: StoryObj = { - args: { decoratorArg: '', decoratorArg2: '', label: 'good' }, - }; - - type Expected = StoryAnnotations>; - expectTypeOf(Basic).toEqualTypeOf(); - }); -}); diff --git a/code/renderers/vue/src/public-types.ts b/code/renderers/vue/src/public-types.ts deleted file mode 100644 index eb6c68699a96..000000000000 --- a/code/renderers/vue/src/public-types.ts +++ /dev/null @@ -1,89 +0,0 @@ -import type { - AnnotatedStoryFn, - Args, - ArgsFromMeta, - ArgsStoryFn, - ComponentAnnotations, - DecoratorFunction, - LoaderFunction, - StoryAnnotations, - StoryContext as GenericStoryContext, - StrictArgs, - ProjectAnnotations, -} from '@storybook/types'; -import type { SetOptional, Simplify } from 'type-fest'; -import type { Component } from 'vue'; -import type { ExtendedVue } from 'vue/types/vue'; -import type { VueRenderer } from './types'; - -export type { Args, ArgTypes, Parameters, StrictArgs } from '@storybook/types'; -export type { VueRenderer }; - -/** - * Metadata to configure the stories for a component. - * - * @see [Default export](https://storybook.js.org/docs/formats/component-story-format/#default-export) - */ -export type Meta = ComponentAnnotations< - VueRenderer, - ComponentPropsOrProps ->; - -/** - * Story function that represents a CSFv2 component example. - * - * @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports) - */ -export type StoryFn = AnnotatedStoryFn< - VueRenderer, - ComponentPropsOrProps ->; - -/** - * Story function that represents a CSFv3 component example. - * - * @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports) - */ -export type StoryObj = TMetaOrCmpOrArgs extends { - render?: ArgsStoryFn; - component?: infer C; - args?: infer DefaultArgs; -} - ? TMetaOrCmpOrArgs extends Component // needed because StoryObj falls into this branch, see test - ? StoryAnnotations> - : Simplify & ArgsFromMeta> extends infer TArgs - ? StoryAnnotations< - VueRenderer, - TArgs, - SetOptional> - > - : never - : StoryAnnotations>; - -type ComponentProps = C extends ExtendedVue - ? P - : C extends Component - ? P - : unknown; - -type ComponentPropsOrProps = TCmpOrArgs extends Component - ? unknown extends ComponentProps - ? TCmpOrArgs - : ComponentProps - : TCmpOrArgs; - -/** - * @deprecated Use `StoryFn` instead. - * Use `StoryObj` if you want to migrate to CSF3, which uses objects instead of functions to represent stories. - * You can read more about the CSF3 format here: https://storybook.js.org/blog/component-story-format-3-0/ - * - * Story function that represents a CSFv2 component example. - * - * @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports) - */ -export type Story = StoryFn; - -export type Decorator = DecoratorFunction; -export type Loader = LoaderFunction; -export type StoryContext = GenericStoryContext; -export type Preview = ProjectAnnotations; diff --git a/code/renderers/vue/src/render.ts b/code/renderers/vue/src/render.ts deleted file mode 100644 index f7f75893336e..000000000000 --- a/code/renderers/vue/src/render.ts +++ /dev/null @@ -1,157 +0,0 @@ -/* eslint-disable no-underscore-dangle */ -import { dedent } from 'ts-dedent'; -import Vue from 'vue'; -import type { RenderContext, ArgsStoryFn } from '@storybook/types'; -import type { CombinedVueInstance } from 'vue/types/vue'; -import type { VueRenderer } from './types'; - -export const COMPONENT = 'STORYBOOK_COMPONENT'; -export const VALUES = 'STORYBOOK_VALUES'; - -const map = new Map(); -type Instance = CombinedVueInstance< - Vue, - { - STORYBOOK_COMPONENT: any; - STORYBOOK_VALUES: Record; - }, - object, - object, - Record ->; - -const getRoot = (canvasElement: VueRenderer['canvasElement']): Instance => { - const cachedInstance = map.get(canvasElement); - if (cachedInstance != null) return cachedInstance; - - // Create a dummy "target" underneath #storybook-root - // that Vue2 will replace on first render with #storybook-vue-root - const target = document.createElement('div'); - canvasElement.appendChild(target); - - const instance: Instance = new Vue({ - beforeDestroy() { - map.delete(canvasElement); - }, - data() { - return { - [COMPONENT]: undefined, - [VALUES]: {}, - }; - }, - // @ts-expect-error What's going on here? (TS says that we should not return an array here, but the `h` directly) - render(h) { - map.set(canvasElement, instance); - return this[COMPONENT] ? [h(this[COMPONENT])] : undefined; - }, - }); - - return instance; -}; - -export const render: ArgsStoryFn = (args, context) => { - const { id, component: Component, argTypes } = context; - const component = Component as VueRenderer['component'] & { - __docgenInfo?: { displayName: string }; - props: Record; - }; - - if (!component) { - throw new Error( - `Unable to render story ${id} as the component annotation is missing from the default export` - ); - } - - let componentName = 'component'; - - // if there is a name property, we either use it or preprend with sb- in case it's an invalid name - if (component.name) { - // @ts-expect-error isReservedTag is an internal function from Vue, might be changed in future releases - const isReservedTag = Vue.config.isReservedTag && Vue.config.isReservedTag(component.name); - - componentName = isReservedTag ? `sb-${component.name}` : component.name; - } else if (component.__docgenInfo?.displayName) { - // otherwise, we use the displayName from docgen, if present - componentName = component.__docgenInfo?.displayName; - } - - let eventsBinding = ''; - const eventProps = Object.values(argTypes) - .filter((argType) => argType?.table?.category === 'events') - .map((argType) => argType.name); - - const camelCase = (str: string) => str.replace(/-([a-z])/g, (g) => g[1].toUpperCase()); - - if (eventProps.length) { - eventsBinding = eventProps.map((name) => `@${name}="$props['${camelCase(name)}']"`).join(' '); - } - - return { - props: Object.keys(argTypes), - components: { [componentName]: component }, - template: `<${componentName} ${eventsBinding} v-bind="filterOutEventProps($props)" />`, - methods: { - filterOutEventProps(props: object) { - return Object.fromEntries( - Object.entries(props).filter(([key]) => !eventProps.includes(key)) - ); - }, - }, - }; -}; - -export function renderToCanvas( - { - title, - name, - storyFn, - showMain, - showError, - showException, - forceRemount, - }: RenderContext, - canvasElement: VueRenderer['canvasElement'] -) { - const root = getRoot(canvasElement); - Vue.config.errorHandler = showException; - const element = storyFn(); - - let mountTarget: Element | VueRenderer['canvasElement'] | null; - - // Vue2 mount always replaces the mount target with Vue-generated DOM. - // https://v2.vuejs.org/v2/api/#el:~:text=replaced%20with%20Vue%2Dgenerated%20DOM - // We cannot mount to the canvasElement directly, because it would be replaced. That would - // break the references to the canvasElement like canvasElement used in the play function. - // Instead, we mount to a child element of the canvasElement, creating one if necessary. - if (canvasElement.hasChildNodes()) { - mountTarget = canvasElement.firstElementChild; - } else { - mountTarget = document.createElement('div'); - canvasElement.appendChild(mountTarget); - } - - if (!element) { - showError({ - title: `Expecting a Vue component from the story: "${name}" of "${title}".`, - description: dedent` - Did you forget to return the Vue component from the story? - Use "() => ({ template: '' })" or "() => ({ components: MyComp, template: '' })" when defining the story. - `, - }); - return; - } - - // at component creation || refresh by HMR or switching stories - if (!root[COMPONENT] || forceRemount) { - root[COMPONENT] = element; - } - - // @ts-expect-error https://github.com/storybookjs/storrybook/pull/7578#discussion_r307986139 - root[VALUES] = { ...element.options[VALUES] }; - - if (!map.has(canvasElement)) { - root.$mount(mountTarget ?? undefined); - } - - showMain(); -} diff --git a/code/renderers/vue/src/types.ts b/code/renderers/vue/src/types.ts deleted file mode 100644 index 4ae4c9c4ab3c..000000000000 --- a/code/renderers/vue/src/types.ts +++ /dev/null @@ -1,24 +0,0 @@ -import type { StoryContext as StoryContextBase, WebRenderer } from '@storybook/types'; -import type { Component, AsyncComponent } from 'vue'; - -export type { RenderContext } from '@storybook/types'; - -export interface ShowErrorArgs { - title: string; - description: string; -} - -export type StoryFnVueReturnType = - | Component - | AsyncComponent; - -export type StoryContext = StoryContextBase; - -/** - * @deprecated Use `VueRenderer` instead. - */ -export type VueFramework = VueRenderer; -export interface VueRenderer extends WebRenderer { - component: Component | AsyncComponent; - storyResult: StoryFnVueReturnType; -} diff --git a/code/renderers/vue/src/typings.d.ts b/code/renderers/vue/src/typings.d.ts deleted file mode 100644 index daefb35a5f65..000000000000 --- a/code/renderers/vue/src/typings.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare var STORYBOOK_ENV: 'vue'; -declare var LOGLEVEL: 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'silent' | undefined; diff --git a/code/renderers/vue/src/util.ts b/code/renderers/vue/src/util.ts deleted file mode 100644 index 303c750b28cc..000000000000 --- a/code/renderers/vue/src/util.ts +++ /dev/null @@ -1,24 +0,0 @@ -/* eslint-disable @typescript-eslint/ban-types */ -import type { VueConstructor } from 'vue'; - -function getType(fn: Function) { - const match = fn && fn.toString().match(/^\s*function (\w+)/); - return match ? match[1] : ''; -} - -// https://github.com/vuejs/vue/blob/dev/src/core/util/props.js#L92 -function resolveDefault({ type, default: def }: any) { - if (typeof def === 'function' && getType(type) !== 'Function') { - // known limitation: we don't have the component instance to pass - return def.call(); - } - - return def; -} - -export function extractProps(component: VueConstructor) { - // @ts-expect-error this options business seems not good according to the types - return Object.entries(component.options.props || {}) - .map(([name, prop]) => ({ [name]: resolveDefault(prop) })) - .reduce((wrap, prop) => ({ ...wrap, ...prop }), {}); -} diff --git a/code/renderers/vue/template/cli/Button.stories.js b/code/renderers/vue/template/cli/Button.stories.js deleted file mode 100644 index ac1fe487803b..000000000000 --- a/code/renderers/vue/template/cli/Button.stories.js +++ /dev/null @@ -1,48 +0,0 @@ -import MyButton from './Button.vue'; - -// More on how to set up stories at: https://storybook.js.org/docs/writing-stories -export default { - title: 'Example/Button', - component: MyButton, - tags: ['autodocs'], - render: (args, { argTypes }) => ({ - props: Object.keys(argTypes), - components: { MyButton }, - template: '', - }), - argTypes: { - backgroundColor: { control: 'color' }, - size: { - control: { type: 'select' }, - options: ['small', 'medium', 'large'], - }, - }, -}; - -// More on writing stories with args: https://storybook.js.org/docs/writing-stories/args -export const Primary = { - args: { - primary: true, - label: 'Button', - }, -}; - -export const Secondary = { - args: { - label: 'Button', - }, -}; - -export const Large = { - args: { - size: 'large', - label: 'Button', - }, -}; - -export const Small = { - args: { - size: 'small', - label: 'Button', - }, -}; diff --git a/code/renderers/vue/template/cli/Button.vue b/code/renderers/vue/template/cli/Button.vue deleted file mode 100644 index 864a2638ac5f..000000000000 --- a/code/renderers/vue/template/cli/Button.vue +++ /dev/null @@ -1,54 +0,0 @@ - - - diff --git a/code/renderers/vue/template/cli/Header.stories.js b/code/renderers/vue/template/cli/Header.stories.js deleted file mode 100644 index 553cd469b48b..000000000000 --- a/code/renderers/vue/template/cli/Header.stories.js +++ /dev/null @@ -1,30 +0,0 @@ -import MyHeader from './Header.vue'; - -export default { - title: 'Example/Header', - component: MyHeader, - // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs - tags: ['autodocs'], - render: (args, { argTypes }) => ({ - props: Object.keys(argTypes), - components: { - MyHeader, - }, - template: - '', - }), - parameters: { - // More on how to position stories at: https://storybook.js.org/docs/configure/story-layout - layout: 'fullscreen', - }, -}; - -export const LoggedIn = { - args: { - user: { - name: 'Jane Doe', - }, - }, -}; - -export const LoggedOut = {}; diff --git a/code/renderers/vue/template/cli/Header.vue b/code/renderers/vue/template/cli/Header.vue deleted file mode 100644 index 4164c64bb144..000000000000 --- a/code/renderers/vue/template/cli/Header.vue +++ /dev/null @@ -1,63 +0,0 @@ - - - diff --git a/code/renderers/vue/template/cli/Page.stories.js b/code/renderers/vue/template/cli/Page.stories.js deleted file mode 100644 index e0b3309c2512..000000000000 --- a/code/renderers/vue/template/cli/Page.stories.js +++ /dev/null @@ -1,30 +0,0 @@ -import { within, userEvent, expect } from '@storybook/test'; -import MyPage from './Page.vue'; - -export default { - title: 'Example/Page', - component: MyPage, - render: () => ({ - components: { MyPage }, - template: '', - }), - parameters: { - // More on how to position stories at: https://storybook.js.org/docs/configure/story-layout - layout: 'fullscreen', - }, -}; -export const LoggedOut = {}; - -// More on interaction testing: https://storybook.js.org/docs/writing-tests/interaction-testing -export const LoggedIn = { - play: async ({ canvasElement }) => { - const canvas = within(canvasElement); - const loginButton = canvas.getByRole('button', { name: /Log in/i }); - await expect(loginButton).toBeInTheDocument(); - await userEvent.click(loginButton); - await expect(loginButton).not.toBeInTheDocument(); - - const logoutButton = canvas.getByRole('button', { name: /Log out/i }); - await expect(logoutButton).toBeInTheDocument(); - }, -}; diff --git a/code/renderers/vue/template/cli/Page.vue b/code/renderers/vue/template/cli/Page.vue deleted file mode 100644 index c57bfa7b10d5..000000000000 --- a/code/renderers/vue/template/cli/Page.vue +++ /dev/null @@ -1,88 +0,0 @@ - - - diff --git a/code/renderers/vue/template/components/Button.vue b/code/renderers/vue/template/components/Button.vue deleted file mode 100644 index 864a2638ac5f..000000000000 --- a/code/renderers/vue/template/components/Button.vue +++ /dev/null @@ -1,54 +0,0 @@ - - - diff --git a/code/renderers/vue/template/components/Form.vue b/code/renderers/vue/template/components/Form.vue deleted file mode 100644 index 2375a381eb7a..000000000000 --- a/code/renderers/vue/template/components/Form.vue +++ /dev/null @@ -1,47 +0,0 @@ - - - diff --git a/code/renderers/vue/template/components/Html.vue b/code/renderers/vue/template/components/Html.vue deleted file mode 100644 index 5b14a6b1a9ab..000000000000 --- a/code/renderers/vue/template/components/Html.vue +++ /dev/null @@ -1,16 +0,0 @@ - - - diff --git a/code/renderers/vue/template/components/Pre.vue b/code/renderers/vue/template/components/Pre.vue deleted file mode 100644 index eda0553dce3d..000000000000 --- a/code/renderers/vue/template/components/Pre.vue +++ /dev/null @@ -1,29 +0,0 @@ - - - diff --git a/code/renderers/vue/template/components/button.css b/code/renderers/vue/template/components/button.css deleted file mode 100644 index dc91dc76370b..000000000000 --- a/code/renderers/vue/template/components/button.css +++ /dev/null @@ -1,30 +0,0 @@ -.storybook-button { - font-family: 'Nunito Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; - font-weight: 700; - border: 0; - border-radius: 3em; - cursor: pointer; - display: inline-block; - line-height: 1; -} -.storybook-button--primary { - color: white; - background-color: #1ea7fd; -} -.storybook-button--secondary { - color: #333; - background-color: transparent; - box-shadow: rgba(0, 0, 0, 0.15) 0px 0px 0px 1px inset; -} -.storybook-button--small { - font-size: 12px; - padding: 10px 16px; -} -.storybook-button--medium { - font-size: 14px; - padding: 11px 20px; -} -.storybook-button--large { - font-size: 16px; - padding: 12px 24px; -} diff --git a/code/renderers/vue/template/components/index.js b/code/renderers/vue/template/components/index.js deleted file mode 100644 index 342dc4a7a988..000000000000 --- a/code/renderers/vue/template/components/index.js +++ /dev/null @@ -1,13 +0,0 @@ -import { global as globalThis } from '@storybook/global'; -import Vue from 'vue'; - -import Button from './Button.vue'; -import Pre from './Pre.vue'; -import Form from './Form.vue'; -import Html from './Html.vue'; - -globalThis.Components = { Button, Pre, Form, Html }; -globalThis.storybookRenderer = 'vue'; - -// test globally-registered components -Vue.component('global-button', Button); diff --git a/code/renderers/vue/template/stories/core-template.stories.js b/code/renderers/vue/template/stories/core-template.stories.js deleted file mode 100644 index eedcf0486e6f..000000000000 --- a/code/renderers/vue/template/stories/core-template.stories.js +++ /dev/null @@ -1,6 +0,0 @@ -export default { - // we just need something here to make this valid CSF - component: {}, -}; - -export const StringOnly = () => ''; diff --git a/code/renderers/vue/template/stories/custom-decorators.stories.js b/code/renderers/vue/template/stories/custom-decorators.stories.js deleted file mode 100644 index 1415f6987614..000000000000 --- a/code/renderers/vue/template/stories/custom-decorators.stories.js +++ /dev/null @@ -1,43 +0,0 @@ -import { global as globalThis } from '@storybook/global'; - -const MyButton = globalThis.Components.Button; - -export default { - component: {}, - decorators: [ - (storyFn) => { - // Decorated with story-function - const WrapButton = storyFn({ customContext: 52, parameters: { customParameter: 42 } }); - return { - components: { WrapButton }, - template: '
', - data() { - return { borderStyle: 'medium solid red' }; - }, - }; - }, - () => ({ - // Decorated with `story` component - template: '
', - data() { - return { - borderStyle: 'medium solid blue', - }; - }, - }), - ], -}; - -export const Template = () => ({ - template: '', -}); - -export const WithData = (_args, { parameters: { fileName, ...parameters }, hooks, ...rest }) => ({ - template: `
${JSON.stringify({ ...rest, parameters }, null, 2)}
`, -}); - -export const Render = () => ({ - render(h) { - return h(MyButton, { props: { color: 'pink', label: 'renders component: MyButton' } }); - }, -}); diff --git a/code/renderers/vue/template/stories/custom-rendering.stories.js b/code/renderers/vue/template/stories/custom-rendering.stories.js deleted file mode 100644 index 39032b05f8f7..000000000000 --- a/code/renderers/vue/template/stories/custom-rendering.stories.js +++ /dev/null @@ -1,62 +0,0 @@ -import { global as globalThis } from '@storybook/global'; - -const MyButton = globalThis.Components.Button; - -export default { - component: {}, -}; - -export const Render = () => ({ - render: (h) => h('div', ['renders a div with some text in it..']), -}); - -export const RenderComponent = () => ({ - render(h) { - return h(MyButton, { props: { color: 'pink', label: 'renders component: MyButton' } }); - }, -}); - -export const Template = () => ({ - template: ` -
-

A template

-

rendered in vue in storybook

-
`, -}); - -export const TemplateComponent = () => ({ - components: { MyButton }, - template: '', -}); - -export const TemplateMethods = () => ({ - components: { MyButton }, - template: ` -

- Clicking the button will navigate to another story using the 'addon-links'
- -

`, - methods: { - action: () => {}, - }, -}); - -// FIXME: test JSX? -// export const JSX = () => ({ -// components: { MyButton }, -// render() { -// // eslint-disable-next-line react/react-in-jsx-scope, react/no-children-prop -// return ; -// }, -// }); - -export const PreRegisteredComponent = () => ({ - /* By pre-registering component in preview.js, - * the need to register all components with each story is removed. - * You'll only need the template */ - template: ` -

- This component was pre-registered in .storybook/preview.js
- -

`, -}); diff --git a/code/renderers/vue/template/stories/vue-mdx.stories.mdx b/code/renderers/vue/template/stories/vue-mdx.stories.mdx deleted file mode 100644 index 067d9af4eb6b..000000000000 --- a/code/renderers/vue/template/stories/vue-mdx.stories.mdx +++ /dev/null @@ -1,44 +0,0 @@ -import { global as globalThis } from '@storybook/global'; -import { Meta, Story, Canvas } from '@storybook/addon-docs'; - - - -# Vue-specific MDX Stories - -export const Button = globalThis.Components.Button; - -export const Template = (args, { argTypes }) => ({ - props: Object.keys(argTypes), - components: { MyButton: Button }, - template: '', -}); - -## Primary - - - - {{ - components: { MyButton: Button }, - template: '', - }} - - - -## Secondary - - - - {{ - components: { MyButton: Button }, - template: '', - }} - - - -## From template - - - - {Template.bind({})} - - diff --git a/code/renderers/vue/tsconfig.json b/code/renderers/vue/tsconfig.json deleted file mode 100644 index 4fbfb70f6d7b..000000000000 --- a/code/renderers/vue/tsconfig.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "strict": true, - "skipLibCheck": true, - "resolveJsonModule": true, - "allowJs": true - }, - "vueCompilerOptions": { - "target": 2 - }, - "include": ["src/**/*", "src/**/*.vue", "template/**/*", "template/**/*.vue"] -} From b5ca2b08f857afa5bfa71a1c9eb1b5dd4ebd6f16 Mon Sep 17 00:00:00 2001 From: Kasper Peulen Date: Mon, 4 Dec 2023 17:30:59 +0100 Subject: [PATCH 088/131] Remove deprecated packages from next --- code/addons/essentials/package.json | 1 - code/lib/cli/src/versions.ts | 3 -- code/package.json | 2 - code/yarn.lock | 80 +---------------------------- 4 files changed, 1 insertion(+), 85 deletions(-) diff --git a/code/addons/essentials/package.json b/code/addons/essentials/package.json index d45b5d4961c9..0f563cfe599f 100644 --- a/code/addons/essentials/package.json +++ b/code/addons/essentials/package.json @@ -76,7 +76,6 @@ "ts-dedent": "^2.0.0" }, "devDependencies": { - "@storybook/vue": "workspace:*", "typescript": "^5.3.2" }, "peerDependencies": { diff --git a/code/lib/cli/src/versions.ts b/code/lib/cli/src/versions.ts index b477f0d53255..a0a9cd528d81 100644 --- a/code/lib/cli/src/versions.ts +++ b/code/lib/cli/src/versions.ts @@ -74,9 +74,6 @@ export default { '@storybook/test': '8.0.0-alpha.0', '@storybook/theming': '8.0.0-alpha.0', '@storybook/types': '8.0.0-alpha.0', - '@storybook/vue': '8.0.0-alpha.0', - '@storybook/vue-vite': '8.0.0-alpha.0', - '@storybook/vue-webpack5': '8.0.0-alpha.0', '@storybook/vue3': '8.0.0-alpha.0', '@storybook/vue3-vite': '8.0.0-alpha.0', '@storybook/vue3-webpack5': '8.0.0-alpha.0', diff --git a/code/package.json b/code/package.json index e85ffa0607f6..fa475d05f205 100644 --- a/code/package.json +++ b/code/package.json @@ -177,8 +177,6 @@ "@storybook/testing-library": "next", "@storybook/theming": "workspace:*", "@storybook/types": "workspace:*", - "@storybook/vue": "workspace:*", - "@storybook/vue-webpack5": "workspace:*", "@storybook/vue3": "workspace:*", "@storybook/vue3-vite": "workspace:*", "@storybook/vue3-webpack5": "workspace:*", diff --git a/code/yarn.lock b/code/yarn.lock index e5475b73dcfd..39c54defec52 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -4899,7 +4899,6 @@ __metadata: "@storybook/manager-api": "workspace:*" "@storybook/node-logger": "workspace:*" "@storybook/preview-api": "workspace:*" - "@storybook/vue": "workspace:*" ts-dedent: "npm:^2.0.0" typescript: "npm:^5.3.2" peerDependencies: @@ -6560,8 +6559,6 @@ __metadata: "@storybook/testing-library": "npm:next" "@storybook/theming": "workspace:*" "@storybook/types": "workspace:*" - "@storybook/vue": "workspace:*" - "@storybook/vue-webpack5": "workspace:*" "@storybook/vue3": "workspace:*" "@storybook/vue3-vite": "workspace:*" "@storybook/vue3-webpack5": "workspace:*" @@ -6899,48 +6896,6 @@ __metadata: languageName: unknown linkType: soft -"@storybook/vue-vite@workspace:frameworks/vue-vite": - version: 0.0.0-use.local - resolution: "@storybook/vue-vite@workspace:frameworks/vue-vite" - dependencies: - "@storybook/builder-vite": "workspace:*" - "@storybook/core-common": "workspace:*" - "@storybook/core-server": "workspace:*" - "@storybook/vue": "workspace:*" - magic-string: "npm:^0.30.0" - typescript: "npm:^5.3.2" - vite: "npm:^4.0.0" - vue: "npm:^2.7.10" - vue-docgen-api: "npm:^4.40.0" - peerDependencies: - vite: ^3.0.0 || ^4.0.0 || ^5.0.0 - vue: ^2.7.0 - languageName: unknown - linkType: soft - -"@storybook/vue-webpack5@workspace:*, @storybook/vue-webpack5@workspace:frameworks/vue-webpack5": - version: 0.0.0-use.local - resolution: "@storybook/vue-webpack5@workspace:frameworks/vue-webpack5" - dependencies: - "@storybook/builder-webpack5": "workspace:*" - "@storybook/core-common": "workspace:*" - "@storybook/preset-vue-webpack": "workspace:*" - "@storybook/vue": "workspace:*" - "@types/node": "npm:^18.0.0" - typescript: "npm:^5.3.2" - vue: "npm:^2.6.12" - vue-loader: "npm:^15.7.0" - vue-template-compiler: "npm:^2.6.14" - peerDependencies: - "@babel/core": "*" - babel-loader: ^7.0.0 || ^8.0.0 || ^9.0.0 - css-loader: "*" - vue: ^2.6.8 - vue-loader: ^15.7.0 - vue-template-compiler: ^2.6.8 - languageName: unknown - linkType: soft - "@storybook/vue3-vite@workspace:*, @storybook/vue3-vite@workspace:frameworks/vue3-vite": version: 0.0.0-use.local resolution: "@storybook/vue3-vite@workspace:frameworks/vue3-vite" @@ -7005,32 +6960,6 @@ __metadata: languageName: unknown linkType: soft -"@storybook/vue@workspace:*, @storybook/vue@workspace:renderers/vue": - version: 0.0.0-use.local - resolution: "@storybook/vue@workspace:renderers/vue" - dependencies: - "@storybook/client-logger": "workspace:*" - "@storybook/docs-tools": "workspace:*" - "@storybook/global": "npm:^5.0.0" - "@storybook/preview-api": "workspace:*" - "@storybook/types": "workspace:*" - tiny-invariant: "npm:^1.3.1" - ts-dedent: "npm:^2.0.0" - type-fest: "npm:~2.19" - typescript: "npm:^5.3.2" - vue: "npm:2.6.14" - vue-tsc: "npm:latest" - peerDependencies: - "@babel/core": "*" - babel-loader: ^7.0.0 || ^8.0.0 || ^9.0.0 - css-loader: "*" - vue: ^2.6.8 - peerDependenciesMeta: - babel-loader: - optional: true - languageName: unknown - linkType: soft - "@storybook/web-components-vite@workspace:*, @storybook/web-components-vite@workspace:frameworks/web-components-vite": version: 0.0.0-use.local resolution: "@storybook/web-components-vite@workspace:frameworks/web-components-vite" @@ -29019,13 +28948,6 @@ __metadata: languageName: node linkType: hard -"vue@npm:2.6.14": - version: 2.6.14 - resolution: "vue@npm:2.6.14" - checksum: efbe26ccc7c1bd025b88e464ebc81217b92350a77b98049122a46ac2242e249719f930d3914e2efdeaaa521a51e6e6b1cb9ffbf95b4835ed94dc92efb481040f - languageName: node - linkType: hard - "vue@npm:3.0.0": version: 3.0.0 resolution: "vue@npm:3.0.0" @@ -29037,7 +28959,7 @@ __metadata: languageName: node linkType: hard -"vue@npm:^2.6.12, vue@npm:^2.7.10": +"vue@npm:^2.6.12": version: 2.7.15 resolution: "vue@npm:2.7.15" dependencies: From bef036f2ad35399fa45f424706280d396dfaef70 Mon Sep 17 00:00:00 2001 From: Michael Shilman Date: Tue, 5 Dec 2023 00:48:45 +0800 Subject: [PATCH 089/131] Enable RSC in NextJS sandboxes --- code/lib/cli/src/sandbox-templates.ts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/code/lib/cli/src/sandbox-templates.ts b/code/lib/cli/src/sandbox-templates.ts index 86b28646fb10..263716ca6246 100644 --- a/code/lib/cli/src/sandbox-templates.ts +++ b/code/lib/cli/src/sandbox-templates.ts @@ -116,6 +116,11 @@ const baseTemplates = { renderer: '@storybook/react', builder: '@storybook/builder-webpack5', }, + modifications: { + mainConfig: { + features: { experimentalNextRSC: true }, + }, + }, skipTasks: ['e2e-tests-dev', 'bench'], }, 'nextjs/default-js': { @@ -127,6 +132,11 @@ const baseTemplates = { renderer: '@storybook/react', builder: '@storybook/builder-webpack5', }, + modifications: { + mainConfig: { + features: { experimentalNextRSC: true }, + }, + }, skipTasks: ['e2e-tests-dev', 'bench'], }, 'nextjs/default-ts': { @@ -138,6 +148,11 @@ const baseTemplates = { renderer: '@storybook/react', builder: '@storybook/builder-webpack5', }, + modifications: { + mainConfig: { + features: { experimentalNextRSC: true }, + }, + }, skipTasks: ['e2e-tests-dev', 'bench'], }, 'nextjs/prerelease': { @@ -149,6 +164,11 @@ const baseTemplates = { renderer: '@storybook/react', builder: '@storybook/builder-webpack5', }, + modifications: { + mainConfig: { + features: { experimentalNextRSC: true }, + }, + }, skipTasks: ['e2e-tests-dev', 'bench'], }, 'react-vite/default-js': { From 80b2a9e5486a07c50a9832a95a40943cbd9ebf7b Mon Sep 17 00:00:00 2001 From: Michael Shilman Date: Tue, 5 Dec 2023 01:13:44 +0800 Subject: [PATCH 090/131] Fix review comments --- code/frameworks/nextjs/README.md | 4 +++- code/frameworks/nextjs/src/rsc/decorator.tsx | 6 ++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/code/frameworks/nextjs/README.md b/code/frameworks/nextjs/README.md index b10e9700ba17..87c35de75126 100644 --- a/code/frameworks/nextjs/README.md +++ b/code/frameworks/nextjs/README.md @@ -939,7 +939,9 @@ export default { Note that wrapping your server components in Suspense does not help if your server components access server-side resources like the file system or Node-specific libraries. To deal work around this, you'll need to mock out your data access layer using [Webpack aliases](https://webpack.js.org/configuration/resolve/#resolvealias) or an addon like [storybook-addon-module-mock](https://storybook.js.org/addons/storybook-addon-module-mock). -In the future we will provide better module mocking support in Storybook and support for [Server Actions](https://nextjs.org/docs/app/api-reference/functions/server-actions). +If your server components access data via the network, we recommend using the [MSW Storybook Addon](https://storybook.js.org/addons/msw-storybook-addon) to mock network requests. + +In the future we will provide better mocking support in Storybook and support for [Server Actions](https://nextjs.org/docs/app/api-reference/functions/server-actions). ### Notes for Yarn v2 and v3 users diff --git a/code/frameworks/nextjs/src/rsc/decorator.tsx b/code/frameworks/nextjs/src/rsc/decorator.tsx index ceaf9daca1bf..73b7e7b4d817 100644 --- a/code/frameworks/nextjs/src/rsc/decorator.tsx +++ b/code/frameworks/nextjs/src/rsc/decorator.tsx @@ -4,13 +4,11 @@ import type { StoryContext } from '@storybook/react'; export const ServerComponentDecorator = ( Story: React.FC, { parameters }: StoryContext -): React.ReactNode => { - console.log('ServerComponentDecorator', { rsc: parameters?.nextjs?.rsc }); - return parameters?.nextjs?.rsc ? ( +): React.ReactNode => + parameters?.nextjs?.rsc ? ( ) : ( ); -}; From ed9cb676743e8d4ecc32dd2f03d7778d4d473902 Mon Sep 17 00:00:00 2001 From: Shaun Lloyd Date: Mon, 4 Dec 2023 15:42:23 -0500 Subject: [PATCH 091/131] Add debug env var --- code/lib/cli/src/scaffold-new-project.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/code/lib/cli/src/scaffold-new-project.ts b/code/lib/cli/src/scaffold-new-project.ts index 0e62896e95bc..833a4e74e335 100644 --- a/code/lib/cli/src/scaffold-new-project.ts +++ b/code/lib/cli/src/scaffold-new-project.ts @@ -164,6 +164,7 @@ export const scaffoldNewProject = async (packageManager: PackageManagerName) => `Creating a new "${projectDisplayName}" project with ${chalk.bold(packageManagerName)}...` ); logger.line(1); + await execa.command(createScript, { stdio: 'pipe', shell: true, @@ -200,14 +201,19 @@ const BASE_IGNORED_FILES = ['.git', '.gitignore', '.DS_Store', '.cache']; const IGNORED_FILES_BY_PACKAGE_MANAGER: Record = { npm: [...BASE_IGNORED_FILES], - yarn: [...BASE_IGNORED_FILES, 'yarn.lock', '.yarnrc.yml', '.yarn'], - pnpm: [...BASE_IGNORED_FILES, 'pnpm-lock.yaml', '.pnpm', 'package.json'], + yarn: [...BASE_IGNORED_FILES, '.yarnrc.yml', '.yarn'], + pnpm: [...BASE_IGNORED_FILES], }; export const currentDirectoryIsEmpty = (packageManager: PackageManagerName) => { const packageManagerName = packageManagerToCoercedName(packageManager); const cwdFolderEntries = readdirSync(process.cwd()); + if (process.env.DEBUG) { + console.log('CWD entries:'); + console.log(cwdFolderEntries); + } + const filesToIgnore = IGNORED_FILES_BY_PACKAGE_MANAGER[packageManagerName]; return ( From 39fd813c16f1cb67492e6f29849754566f4f2844 Mon Sep 17 00:00:00 2001 From: jonniebigodes Date: Mon, 4 Dec 2023 21:23:56 +0000 Subject: [PATCH 092/131] Docs: Svelte docs and examples update --- docs/addons/addons-api.md | 3 +- docs/api/csf.md | 28 ++++++- docs/configure/images-and-assets.md | 3 + docs/essentials/controls.md | 7 ++ docs/essentials/toolbars-and-globals.md | 2 + docs/essentials/viewport.md | 1 + docs/sharing/design-integrations.md | 1 + ...-component.with-mock-implementation.ts.mdx | 29 +++++++ docs/snippets/svelte/badge-story.mdx.mdx | 76 ------------------- .../snippets/svelte/button-group-story.js.mdx | 9 --- .../svelte/button-group-story.ts-4-9.mdx | 24 ++++++ .../snippets/svelte/button-group-story.ts.mdx | 24 ++++++ .../svelte/button-story-auto-docs.js.mdx | 8 -- .../svelte/button-story-auto-docs.ts-4-9.mdx | 33 ++++++++ .../svelte/button-story-auto-docs.ts.mdx | 33 ++++++++ ...button-story-click-handler-args.ts-4-9.mdx | 31 ++++++++ .../button-story-click-handler-args.ts.mdx | 31 ++++++++ ...n-story-click-handler-simplificated.js.mdx | 13 ++++ ...ory-click-handler-simplificated.ts-4-9.mdx | 18 +++++ ...n-story-click-handler-simplificated.ts.mdx | 18 +++++ .../svelte/button-story-click-handler.js.mdx | 4 +- .../button-story-click-handler.ts-4-9.mdx | 26 +++++++ .../svelte/button-story-click-handler.ts.mdx | 27 +++++++ ...utton-story-component-args-primary.mdx.mdx | 22 ------ ...on-story-component-args-primary.ts-4-9.mdx | 21 +++++ ...button-story-component-args-primary.ts.mdx | 21 +++++ .../button-story-component-decorator.js.mdx | 18 ----- .../button-story-component-decorator.mdx.mdx | 12 --- ...utton-story-component-decorator.ts-4-9.mdx | 15 ++++ .../button-story-component-decorator.ts.mdx | 15 ++++ .../svelte/button-story-decorator.js.mdx | 8 -- .../svelte/button-story-decorator.mdx.mdx | 25 ------ .../svelte/button-story-decorator.ts-4-9.mdx | 19 +++++ .../svelte/button-story-decorator.ts.mdx | 19 +++++ .../button-story-default-docs-code.mdx.mdx | 45 ----------- ...y-default-export-with-component.ts-4-9.mdx | 13 ++++ ...story-default-export-with-component.ts.mdx | 13 ++++ .../button-story-rename-story.ts-4-9.mdx | 30 ++++++++ .../svelte/button-story-rename-story.ts.mdx | 30 ++++++++ .../svelte/button-story-using-args.js.mdx | 17 ----- .../svelte/button-story-using-args.ts-4-9.mdx | 36 +++++++++ .../svelte/button-story-using-args.ts.mdx | 36 +++++++++ .../button-story-with-addon-example.js.mdx | 13 +--- ...button-story-with-addon-example.ts-4-9.mdx | 27 +++++++ .../button-story-with-addon-example.ts.mdx | 27 +++++++ .../svelte/button-story-with-args.js.mdx | 9 --- .../svelte/button-story-with-args.mdx.mdx | 26 ------- .../svelte/button-story-with-args.ts-4-9.mdx | 9 --- .../svelte/button-story-with-args.ts.mdx | 9 --- .../button-story-with-blue-args.mdx.mdx | 24 ------ .../button-story-with-blue-args.ts-4-9.mdx | 23 ++++++ .../svelte/button-story-with-blue-args.ts.mdx | 23 ++++++ .../svelte/button-story-with-emojis.mdx.mdx | 43 ----------- .../button-story-with-emojis.ts-4-9.mdx | 49 ++++++++++++ .../svelte/button-story-with-emojis.ts.mdx | 49 ++++++++++++ docs/snippets/svelte/button-story.mdx.mdx | 27 ------- docs/snippets/svelte/checkbox-story.mdx.mdx | 55 -------------- ...onent-story-custom-args-complex.ts-4-9.mdx | 46 +++++++++++ ...component-story-custom-args-complex.ts.mdx | 46 +++++++++++ .../component-story-figma-integration.js.mdx | 6 +- .../component-story-figma-integration.mdx.mdx | 33 -------- ...mponent-story-figma-integration.ts-4-9.mdx | 24 ++++++ .../component-story-figma-integration.ts.mdx | 24 ++++++ .../component-story-mdx-story-by-name.mdx.mdx | 23 ------ .../component-story-static-asset-cdn.mdx.mdx | 25 ------ ...omponent-story-static-asset-cdn.ts-4-9.mdx | 24 ++++++ .../component-story-static-asset-cdn.ts.mdx | 24 ++++++ ...ent-story-static-asset-with-import.mdx.mdx | 29 ------- ...-story-static-asset-with-import.ts-4-9.mdx | 28 +++++++ ...nent-story-static-asset-with-import.ts.mdx | 28 +++++++ ...-story-static-asset-without-import.mdx.mdx | 21 ----- ...ory-static-asset-without-import.ts-4-9.mdx | 25 ++++++ ...t-story-static-asset-without-import.ts.mdx | 25 ++++++ ...component-story-with-accessibility.mdx.mdx | 51 ------------- ...ponent-story-with-accessibility.ts-4-9.mdx | 33 ++++++++ .../component-story-with-accessibility.ts.mdx | 33 ++++++++ ...component-test-with-testing-library.js.mdx | 2 +- .../svelte/csf-2-example-starter.js.mdx | 16 ++++ .../svelte/csf-2-example-starter.ts.mdx | 18 +++++ .../svelte/csf-2-example-story.js.mdx | 9 +++ .../svelte/csf-2-example-story.ts.mdx | 9 +++ .../svelte/csf-3-example-render.js.mdx | 11 +++ .../svelte/csf-3-example-render.ts.mdx | 11 +++ .../svelte/csf-3-example-starter.ts.mdx | 14 ++++ .../svelte/document-screen-fetch.js.mdx | 3 +- .../svelte/document-screen-fetch.ts.mdx | 47 ++++++++++++ .../document-screen-with-grapqhl.ts.mdx | 46 +++++++++++ ...umentscreen-story-msw-graphql-query.js.mdx | 2 +- ...tscreen-story-msw-graphql-query.ts-4-9.mdx | 70 +++++++++++++++++ ...umentscreen-story-msw-graphql-query.ts.mdx | 70 +++++++++++++++++ docs/snippets/svelte/histogram-story.mdx.mdx | 30 -------- docs/snippets/svelte/loader-story.mdx.mdx | 34 --------- docs/snippets/svelte/loader-story.ts-4-9.mdx | 36 +++++++++ docs/snippets/svelte/loader-story.ts.mdx | 36 +++++++++ .../login-form-with-play-function.js.mdx | 19 +---- .../login-form-with-play-function.mdx.mdx | 53 ------------- .../login-form-with-play-function.ts-4-9.mdx | 43 +++++++++++ .../login-form-with-play-function.ts.mdx | 43 +++++++++++ ...rgindecorator.with-margin-component.js.mdx | 13 ++++ ...rgindecorator.with-margin-component.ts.mdx | 13 ++++ .../mdx-canvas-multiple-stories.mdx.mdx | 48 ------------ .../my-component-story-basic-and-props.js.mdx | 11 +-- ...component-story-basic-and-props.ts-4-9.mdx | 30 ++++++++ .../my-component-story-basic-and-props.ts.mdx | 30 ++++++++ ...component-story-configure-viewports.js.mdx | 3 - ...omponent-story-configure-viewports.mdx.mdx | 37 --------- ...onent-story-configure-viewports.ts-4-9.mdx | 32 ++++++++ ...component-story-configure-viewports.ts.mdx | 32 ++++++++ ...ory-use-globaltype-backwards-compat.js.mdx | 2 +- ...use-globaltype-backwards-compat.ts-4-9.mdx | 13 ++++ ...ory-use-globaltype-backwards-compat.ts.mdx | 13 ++++ .../my-component-story-use-globaltype.js.mdx | 2 +- .../my-component-story-use-globaltype.mdx.mdx | 38 ---------- ...-component-story-use-globaltype.ts-4-9.mdx | 41 ++++++++++ .../my-component-story-use-globaltype.ts.mdx | 41 ++++++++++ .../my-component-story-with-nonstory.js.mdx | 8 -- ...y-component-story-with-nonstory.ts-4-9.mdx | 33 ++++++++ .../my-component-story-with-nonstory.ts.mdx | 33 ++++++++ .../my-component-with-env-variables.mdx.mdx | 27 ------- docs/snippets/svelte/page-story.js.mdx | 9 --- docs/snippets/svelte/page-story.ts-4-9.mdx | 23 ++++++ docs/snippets/svelte/page-story.ts.mdx | 23 ++++++ .../svelte/simple-page-implementation.ts.mdx | 20 +++++ .../storybook-addon-a11y-disable.js.mdx | 4 - .../storybook-addon-a11y-disable.mdx.mdx | 30 -------- .../storybook-addon-a11y-disable.ts-4-9.mdx | 23 ++++++ .../storybook-addon-a11y-disable.ts.mdx | 23 ++++++ .../storybook-addon-a11y-story-config.js.mdx | 4 - ...rybook-addon-a11y-story-config.ts-4-9.mdx} | 33 ++++---- .../storybook-addon-a11y-story-config.ts.mdx | 38 ++++++++++ .../storybook-preview-global-decorator.ts.mdx | 13 ++++ .../your-component-with-decorator.js.mdx | 17 ----- .../your-component-with-decorator.mdx.mdx | 13 ---- .../your-component-with-decorator.ts-4-9.mdx | 15 ++++ .../your-component-with-decorator.ts.mdx | 15 ++++ docs/snippets/svelte/your-component.mdx.mdx | 20 ----- docs/writing-docs/autodocs.md | 1 + docs/writing-stories/args.md | 9 +++ .../build-pages-with-storybook.md | 5 ++ docs/writing-stories/decorators.md | 12 +++ docs/writing-stories/index.md | 11 +++ docs/writing-stories/loaders.md | 1 + docs/writing-stories/parameters.md | 1 + docs/writing-tests/accessibility-testing.md | 3 + docs/writing-tests/interaction-testing.md | 1 + .../stories-in-end-to-end-tests.md | 2 + 146 files changed, 2251 insertions(+), 1065 deletions(-) create mode 100644 docs/snippets/svelte/apollo-wrapper-component.with-mock-implementation.ts.mdx delete mode 100644 docs/snippets/svelte/badge-story.mdx.mdx create mode 100644 docs/snippets/svelte/button-group-story.ts-4-9.mdx create mode 100644 docs/snippets/svelte/button-group-story.ts.mdx create mode 100644 docs/snippets/svelte/button-story-auto-docs.ts-4-9.mdx create mode 100644 docs/snippets/svelte/button-story-auto-docs.ts.mdx create mode 100644 docs/snippets/svelte/button-story-click-handler-args.ts-4-9.mdx create mode 100644 docs/snippets/svelte/button-story-click-handler-args.ts.mdx create mode 100644 docs/snippets/svelte/button-story-click-handler-simplificated.js.mdx create mode 100644 docs/snippets/svelte/button-story-click-handler-simplificated.ts-4-9.mdx create mode 100644 docs/snippets/svelte/button-story-click-handler-simplificated.ts.mdx create mode 100644 docs/snippets/svelte/button-story-click-handler.ts-4-9.mdx create mode 100644 docs/snippets/svelte/button-story-click-handler.ts.mdx delete mode 100644 docs/snippets/svelte/button-story-component-args-primary.mdx.mdx create mode 100644 docs/snippets/svelte/button-story-component-args-primary.ts-4-9.mdx create mode 100644 docs/snippets/svelte/button-story-component-args-primary.ts.mdx delete mode 100644 docs/snippets/svelte/button-story-component-decorator.mdx.mdx create mode 100644 docs/snippets/svelte/button-story-component-decorator.ts-4-9.mdx create mode 100644 docs/snippets/svelte/button-story-component-decorator.ts.mdx delete mode 100644 docs/snippets/svelte/button-story-decorator.mdx.mdx create mode 100644 docs/snippets/svelte/button-story-decorator.ts-4-9.mdx create mode 100644 docs/snippets/svelte/button-story-decorator.ts.mdx delete mode 100644 docs/snippets/svelte/button-story-default-docs-code.mdx.mdx create mode 100644 docs/snippets/svelte/button-story-default-export-with-component.ts-4-9.mdx create mode 100644 docs/snippets/svelte/button-story-default-export-with-component.ts.mdx create mode 100644 docs/snippets/svelte/button-story-rename-story.ts-4-9.mdx create mode 100644 docs/snippets/svelte/button-story-rename-story.ts.mdx create mode 100644 docs/snippets/svelte/button-story-using-args.ts-4-9.mdx create mode 100644 docs/snippets/svelte/button-story-using-args.ts.mdx create mode 100644 docs/snippets/svelte/button-story-with-addon-example.ts-4-9.mdx create mode 100644 docs/snippets/svelte/button-story-with-addon-example.ts.mdx delete mode 100644 docs/snippets/svelte/button-story-with-args.mdx.mdx delete mode 100644 docs/snippets/svelte/button-story-with-blue-args.mdx.mdx create mode 100644 docs/snippets/svelte/button-story-with-blue-args.ts-4-9.mdx create mode 100644 docs/snippets/svelte/button-story-with-blue-args.ts.mdx delete mode 100644 docs/snippets/svelte/button-story-with-emojis.mdx.mdx create mode 100644 docs/snippets/svelte/button-story-with-emojis.ts-4-9.mdx create mode 100644 docs/snippets/svelte/button-story-with-emojis.ts.mdx delete mode 100644 docs/snippets/svelte/button-story.mdx.mdx delete mode 100644 docs/snippets/svelte/checkbox-story.mdx.mdx create mode 100644 docs/snippets/svelte/component-story-custom-args-complex.ts-4-9.mdx create mode 100644 docs/snippets/svelte/component-story-custom-args-complex.ts.mdx delete mode 100644 docs/snippets/svelte/component-story-figma-integration.mdx.mdx create mode 100644 docs/snippets/svelte/component-story-figma-integration.ts-4-9.mdx create mode 100644 docs/snippets/svelte/component-story-figma-integration.ts.mdx delete mode 100644 docs/snippets/svelte/component-story-mdx-story-by-name.mdx.mdx delete mode 100644 docs/snippets/svelte/component-story-static-asset-cdn.mdx.mdx create mode 100644 docs/snippets/svelte/component-story-static-asset-cdn.ts-4-9.mdx create mode 100644 docs/snippets/svelte/component-story-static-asset-cdn.ts.mdx delete mode 100644 docs/snippets/svelte/component-story-static-asset-with-import.mdx.mdx create mode 100644 docs/snippets/svelte/component-story-static-asset-with-import.ts-4-9.mdx create mode 100644 docs/snippets/svelte/component-story-static-asset-with-import.ts.mdx delete mode 100644 docs/snippets/svelte/component-story-static-asset-without-import.mdx.mdx create mode 100644 docs/snippets/svelte/component-story-static-asset-without-import.ts-4-9.mdx create mode 100644 docs/snippets/svelte/component-story-static-asset-without-import.ts.mdx delete mode 100644 docs/snippets/svelte/component-story-with-accessibility.mdx.mdx create mode 100644 docs/snippets/svelte/component-story-with-accessibility.ts-4-9.mdx create mode 100644 docs/snippets/svelte/component-story-with-accessibility.ts.mdx create mode 100644 docs/snippets/svelte/csf-2-example-starter.js.mdx create mode 100644 docs/snippets/svelte/csf-2-example-starter.ts.mdx create mode 100644 docs/snippets/svelte/csf-2-example-story.js.mdx create mode 100644 docs/snippets/svelte/csf-2-example-story.ts.mdx create mode 100644 docs/snippets/svelte/csf-3-example-render.js.mdx create mode 100644 docs/snippets/svelte/csf-3-example-render.ts.mdx create mode 100644 docs/snippets/svelte/csf-3-example-starter.ts.mdx create mode 100644 docs/snippets/svelte/document-screen-fetch.ts.mdx create mode 100644 docs/snippets/svelte/document-screen-with-grapqhl.ts.mdx create mode 100644 docs/snippets/svelte/documentscreen-story-msw-graphql-query.ts-4-9.mdx create mode 100644 docs/snippets/svelte/documentscreen-story-msw-graphql-query.ts.mdx delete mode 100644 docs/snippets/svelte/histogram-story.mdx.mdx delete mode 100644 docs/snippets/svelte/loader-story.mdx.mdx create mode 100644 docs/snippets/svelte/loader-story.ts-4-9.mdx create mode 100644 docs/snippets/svelte/loader-story.ts.mdx delete mode 100644 docs/snippets/svelte/login-form-with-play-function.mdx.mdx create mode 100644 docs/snippets/svelte/login-form-with-play-function.ts-4-9.mdx create mode 100644 docs/snippets/svelte/login-form-with-play-function.ts.mdx create mode 100644 docs/snippets/svelte/margindecorator.with-margin-component.js.mdx create mode 100644 docs/snippets/svelte/margindecorator.with-margin-component.ts.mdx delete mode 100644 docs/snippets/svelte/mdx-canvas-multiple-stories.mdx.mdx create mode 100644 docs/snippets/svelte/my-component-story-basic-and-props.ts-4-9.mdx create mode 100644 docs/snippets/svelte/my-component-story-basic-and-props.ts.mdx delete mode 100644 docs/snippets/svelte/my-component-story-configure-viewports.mdx.mdx create mode 100644 docs/snippets/svelte/my-component-story-configure-viewports.ts-4-9.mdx create mode 100644 docs/snippets/svelte/my-component-story-configure-viewports.ts.mdx create mode 100644 docs/snippets/svelte/my-component-story-use-globaltype-backwards-compat.ts-4-9.mdx create mode 100644 docs/snippets/svelte/my-component-story-use-globaltype-backwards-compat.ts.mdx delete mode 100644 docs/snippets/svelte/my-component-story-use-globaltype.mdx.mdx create mode 100644 docs/snippets/svelte/my-component-story-use-globaltype.ts-4-9.mdx create mode 100644 docs/snippets/svelte/my-component-story-use-globaltype.ts.mdx create mode 100644 docs/snippets/svelte/my-component-story-with-nonstory.ts-4-9.mdx create mode 100644 docs/snippets/svelte/my-component-story-with-nonstory.ts.mdx delete mode 100644 docs/snippets/svelte/my-component-with-env-variables.mdx.mdx create mode 100644 docs/snippets/svelte/page-story.ts-4-9.mdx create mode 100644 docs/snippets/svelte/page-story.ts.mdx create mode 100644 docs/snippets/svelte/simple-page-implementation.ts.mdx delete mode 100644 docs/snippets/svelte/storybook-addon-a11y-disable.mdx.mdx create mode 100644 docs/snippets/svelte/storybook-addon-a11y-disable.ts-4-9.mdx create mode 100644 docs/snippets/svelte/storybook-addon-a11y-disable.ts.mdx rename docs/snippets/svelte/{storybook-addon-a11y-story-config.mdx.mdx => storybook-addon-a11y-story-config.ts-4-9.mdx} (55%) create mode 100644 docs/snippets/svelte/storybook-addon-a11y-story-config.ts.mdx create mode 100644 docs/snippets/svelte/storybook-preview-global-decorator.ts.mdx delete mode 100644 docs/snippets/svelte/your-component-with-decorator.mdx.mdx create mode 100644 docs/snippets/svelte/your-component-with-decorator.ts-4-9.mdx create mode 100644 docs/snippets/svelte/your-component-with-decorator.ts.mdx delete mode 100644 docs/snippets/svelte/your-component.mdx.mdx diff --git a/docs/addons/addons-api.md b/docs/addons/addons-api.md index e73907d61c87..41daafbe8009 100644 --- a/docs/addons/addons-api.md +++ b/docs/addons/addons-api.md @@ -93,7 +93,7 @@ Use the `makeDecorator` API to create decorators in the style of the official ad - If the story's parameters include `{ exampleParameter: { disable: true } }` (where `exampleParameter` is the `parameterName` of your addon), your decorator will not be called. +If the story's parameters include `{ exampleParameter: { disable: true } }` (where `exampleParameter` is the `parameterName` of your addon), your decorator will not be called. @@ -124,6 +124,7 @@ The `selectStory` API method allows you to select a single story. It accepts the 'vue/button-story-with-addon-example.ts.mdx', 'angular/button-story-with-addon-example.ts.mdx', 'svelte/button-story-with-addon-example.js.mdx', + 'svelte/button-story-with-addon-example.ts.mdx', 'web-components/button-story-with-addon-example.js.mdx', 'web-components/button-story-with-addon-example.ts.mdx', ]} diff --git a/docs/api/csf.md b/docs/api/csf.md index 9e494e151a7a..d5ed3eb7ec40 100644 --- a/docs/api/csf.md +++ b/docs/api/csf.md @@ -51,6 +51,7 @@ With CSF, every named export in the file represents a story object by default. 'vue/my-component-story-basic-and-props.js.mdx', 'vue/my-component-story-basic-and-props.ts.mdx', 'svelte/my-component-story-basic-and-props.js.mdx', + 'svelte/my-component-story-basic-and-props.ts.mdx', 'angular/my-component-story-basic-and-props.ts.mdx', 'web-components/my-component-story-basic-and-props.js.mdx', 'web-components/my-component-story-basic-and-props.ts.mdx', @@ -112,6 +113,7 @@ Consider Storybook’s ["Button" example](../writing-stories/index.md#defining-s 'vue/button-story-click-handler.3.js.mdx', 'vue/button-story-click-handler.3.ts.mdx', 'svelte/button-story-click-handler.js.mdx', + 'svelte/button-story-click-handler.ts.mdx', 'angular/button-story-click-handler.ts.mdx', 'web-components/button-story-click-handler.js.mdx', 'web-components/button-story-click-handler.ts.mdx', @@ -138,6 +140,7 @@ Now consider the same example, re-written with args: 'vue/button-story-click-handler-args.3.ts.mdx', 'angular/button-story-click-handler-args.ts.mdx', 'svelte/button-story-click-handler-args.js.mdx', + 'svelte/button-story-click-handler-args.ts.mdx', 'web-components/button-story-click-handler-args.js.mdx', 'web-components/button-story-click-handler-args.ts.mdx', 'solid/button-story-click-handler-args.js.mdx', @@ -162,6 +165,8 @@ Or even more simply: 'vue/button-story-click-handler-simplificated.ts.mdx', 'web-components/button-story-click-handler-simplificated.js.mdx', 'web-components/button-story-click-handler-simplificated.ts.mdx', + 'svelte/button-story-click-handler-simplificated.js.mdx', + 'svelte/button-story-click-handler-simplificated.ts.mdx', 'solid/button-story-click-handler-simplificated.js.mdx', 'solid/button-story-click-handler-simplificated.ts.mdx', ]} @@ -193,6 +198,7 @@ A good use case for the `play` function is a form component. With previous Story 'web-components/login-form-with-play-function.js.mdx', 'web-components/login-form-with-play-function.ts.mdx', 'svelte/login-form-with-play-function.js.mdx', + 'svelte/login-form-with-play-function.ts.mdx', 'solid/login-form-with-play-function.js.mdx', 'solid/login-form-with-play-function.ts.mdx', ]} @@ -204,6 +210,8 @@ A good use case for the `play` function is a form component. With previous Story When the story renders in the UI, Storybook executes each step defined in the `play` function and runs the assertions without the need for user interaction. + + ## Custom render functions Starting in Storybook 6.4, you can write your stories as JavaScript objects, reducing the boilerplate code you need to generate to test your components, thus improving functionality and usability. `Render` functions are helpful methods to give you additional control over how the story renders. For example, if you were writing a story as an object and you wanted to specify how your component should render, you could write the following: @@ -230,6 +238,8 @@ Starting in Storybook 6.4, you can write your stories as JavaScript objects, red When Storybook loads this story, it will detect the existence of a `render` function and adjust the component rendering accordingly based on what's defined. + + ## Storybook export vs. name handling Storybook handles named exports and the `name` option slightly differently. When should you use one vs. the other? @@ -271,10 +281,11 @@ Consider the following story file: 'react/my-component-story-with-nonstory.ts.mdx', 'vue/my-component-story-with-nonstory.js.mdx', 'vue/my-component-story-with-nonstory.ts.mdx', - 'svelte/my-component-story-with-nonstory.js.mdx', 'angular/my-component-story-with-nonstory.ts.mdx', 'web-components/my-component-story-with-nonstory.js.mdx', 'web-components/my-component-story-with-nonstory.ts.mdx', + 'svelte/my-component-story-with-nonstory.js.mdx', + 'svelte/my-component-story-with-nonstory.ts.mdx', 'solid/my-component-story-with-nonstory.js.mdx', 'solid/my-component-story-with-nonstory.ts.mdx', ]} @@ -316,6 +327,8 @@ In CSF 2, the named exports are always functions that instantiate a component, a 'web-components/csf-2-example-starter.ts.mdx', 'solid/csf-2-example-starter.js.mdx', 'solid/csf-2-example-starter.ts.mdx', + 'svelte/csf-2-example-starter.js.mdx', + 'svelte/csf-2-example-starter.ts.mdx', ]} /> @@ -336,6 +349,7 @@ Here's the CSF 3 equivalent: 'web-components/csf-3-example-starter.js.mdx', 'web-components/csf-3-example-starter.ts.mdx', 'solid/csf-3-example-starter.ts.mdx', + 'svelte/csf-3-example-starter.ts.mdx', ]} /> @@ -399,6 +413,8 @@ Let's start with a simple CSF 2 story function: 'web-components/csf-2-example-story.ts.mdx', 'solid/csf-2-example-story.js.mdx', 'solid/csf-2-example-story.ts.mdx', + 'svelte/csf-2-example-story.js.mdx', + 'svelte/csf-2-example-story.ts.mdx', ]} /> @@ -421,11 +437,17 @@ Now, let's rewrite it as a story object in CSF 3 with an explicit `render` funct 'web-components/csf-3-example-render.ts.mdx', 'solid/csf-3-example-render.js.mdx', 'solid/csf-3-example-render.ts.mdx', + 'svelte/csf-3-example-render.js.mdx', + 'svelte/csf-3-example-render.ts.mdx', ]} /> + + Learn more about [render functions](#custom-render-functions). + + But in CSF 2, a lot of story functions are identical: take the component specified in the default export and spread args into it. What's interesting about these stories is not the function, but the args passed into the function. @@ -442,8 +464,12 @@ CSF 3 provides default render functions for each renderer. If all you're doing i + + For more information, see the section on [custom render functions](#custom-render-functions). + + ### Generate titles automatically Finally, CSF 3 can automatically generate titles. diff --git a/docs/configure/images-and-assets.md b/docs/configure/images-and-assets.md index 8325aed14f6e..7b4a0c071ada 100644 --- a/docs/configure/images-and-assets.md +++ b/docs/configure/images-and-assets.md @@ -22,6 +22,7 @@ Afterward, you can use any asset in your stories: 'vue/component-story-static-asset-with-import.3.ts.mdx', 'angular/component-story-static-asset-with-import.ts.mdx', 'svelte/component-story-static-asset-with-import.js.mdx', + 'svelte/component-story-static-asset-with-import.ts.mdx', 'web-components/component-story-static-asset-with-import.js.mdx', 'web-components/component-story-static-asset-with-import.ts.mdx', 'solid/component-story-static-asset-with-import.js.mdx', @@ -62,6 +63,7 @@ Here `../public` is your static directory. Now use it in a component or story li 'vue/component-story-static-asset-without-import.ts.mdx', 'angular/component-story-static-asset-without-import.ts.mdx', 'svelte/component-story-static-asset-without-import.js.mdx', + 'svelte/component-story-static-asset-without-import.ts.mdx', 'web-components/component-story-static-asset-without-import.js.mdx', 'web-components/component-story-static-asset-without-import.ts.mdx', 'solid/component-story-static-asset-without-import.js.mdx', @@ -117,6 +119,7 @@ Upload your files to an online CDN and reference them. In this example, we’re 'vue/component-story-static-asset-cdn.ts.mdx', 'angular/component-story-static-asset-cdn.ts.mdx', 'svelte/component-story-static-asset-cdn.js.mdx', + 'svelte/component-story-static-asset-cdn.ts.mdx', 'web-components/component-story-static-asset-cdn.js.mdx', 'web-components/component-story-static-asset-cdn.ts.mdx', 'solid/component-story-static-asset-cdn.js.mdx', diff --git a/docs/essentials/controls.md b/docs/essentials/controls.md index 2fb67af32861..efff7222f5bd 100644 --- a/docs/essentials/controls.md +++ b/docs/essentials/controls.md @@ -121,6 +121,10 @@ If you haven't used the CLI to setup the configuration, or if you want to define + + + + ## Fully custom args Until now, we only used auto-generated controls based on the component we're writing stories for. If we are writing [complex stories](../writing-stories/stories-for-multiple-components.md), we may want to add controls for args that aren’t part of the component. For example, here's how you could use a `footer` arg to populate a child component: @@ -155,6 +159,8 @@ By default, Storybook will add controls for all args that: Using `argTypes`, you can change the display and behavior of each control. + + ### Dealing with complex values When dealing with non-primitive values, you'll notice that you'll run into some limitations. The most obvious issue is that not every value can be represented as part of the `args` param in the URL, losing the ability to share and deeplink to such a state. Beyond that, complex values such as JSX cannot be synchronized between the manager (e.g., Controls addon) and the preview (your story). @@ -171,6 +177,7 @@ One way to deal with this is to use primitive values (e.g., strings) as arg valu 'vue/component-story-custom-args-complex.ts.mdx', 'angular/component-story-custom-args-complex.ts.mdx', 'svelte/component-story-custom-args-complex.js.mdx', + 'svelte/component-story-custom-args-complex.ts.mdx', 'web-components/component-story-custom-args-complex.js.mdx', 'web-components/component-story-custom-args-complex.ts.mdx', 'solid/component-story-custom-args-complex.js.mdx', diff --git a/docs/essentials/toolbars-and-globals.md b/docs/essentials/toolbars-and-globals.md index ff169ff91aa8..7acb99956520 100644 --- a/docs/essentials/toolbars-and-globals.md +++ b/docs/essentials/toolbars-and-globals.md @@ -170,6 +170,7 @@ Using the example above, you can modify any story to retrieve the **Locale** `gl 'vue/my-component-story-use-globaltype.ts.mdx', 'angular/my-component-story-use-globaltype.ts.mdx', 'svelte/my-component-story-use-globaltype.js.mdx', + 'svelte/my-component-story-use-globaltype.ts.mdx', 'web-components/my-component-story-use-globaltype.js.mdx', 'web-components/my-component-story-use-globaltype.ts.mdx', 'solid/my-component-story-use-globaltype.js.mdx', @@ -193,6 +194,7 @@ In Storybook 6.0, if you set the global option `passArgsFirst: false` for backwa 'vue/my-component-story-use-globaltype-backwards-compat.js.mdx', 'angular/my-component-story-use-globaltype-backwards-compat.ts.mdx', 'svelte/my-component-story-use-globaltype-backwards-compat.js.mdx', + 'svelte/my-component-story-use-globaltype-backwards-compat.ts.mdx', 'web-components/my-component-story-use-globaltype-backwards-compat.js.mdx', 'web-components/my-component-story-use-globaltype-backwards-compat.ts.mdx', 'solid/my-component-story-use-globaltype-backwards-compat.js.mdx', diff --git a/docs/essentials/viewport.md b/docs/essentials/viewport.md index dd321d9f30ec..90bcae73da0c 100644 --- a/docs/essentials/viewport.md +++ b/docs/essentials/viewport.md @@ -132,6 +132,7 @@ Update your story through [parameters](../writing-stories/parameters.md) to incl 'web-components/my-component-story-configure-viewports.js.mdx', 'web-components/my-component-story-configure-viewports.ts.mdx', 'svelte/my-component-story-configure-viewports.js.mdx', + 'svelte/my-component-story-configure-viewports.ts.mdx', 'solid/my-component-story-configure-viewports.js.mdx', 'solid/my-component-story-configure-viewports.ts.mdx', ]} diff --git a/docs/sharing/design-integrations.md b/docs/sharing/design-integrations.md index d85530557e9c..ddd320a21ec1 100644 --- a/docs/sharing/design-integrations.md +++ b/docs/sharing/design-integrations.md @@ -110,6 +110,7 @@ In Storybook, add a new [parameter](../writing-stories/parameters.md) named `des 'vue/component-story-figma-integration.ts.mdx', 'angular/component-story-figma-integration.ts.mdx', 'svelte/component-story-figma-integration.js.mdx', + 'svelte/component-story-figma-integration.ts.mdx', 'web-components/component-story-figma-integration.js.mdx', 'web-components/component-story-figma-integration.ts.mdx', 'solid/component-story-figma-integration.js.mdx', diff --git a/docs/snippets/svelte/apollo-wrapper-component.with-mock-implementation.ts.mdx b/docs/snippets/svelte/apollo-wrapper-component.with-mock-implementation.ts.mdx new file mode 100644 index 000000000000..b2cda17845c1 --- /dev/null +++ b/docs/snippets/svelte/apollo-wrapper-component.with-mock-implementation.ts.mdx @@ -0,0 +1,29 @@ +```html + + + + +
+ +
+``` diff --git a/docs/snippets/svelte/badge-story.mdx.mdx b/docs/snippets/svelte/badge-story.mdx.mdx deleted file mode 100644 index f30d432b4d38..000000000000 --- a/docs/snippets/svelte/badge-story.mdx.mdx +++ /dev/null @@ -1,76 +0,0 @@ -```md - - -import { Canvas, Meta, Story } from '@storybook/addon-docs'; - -import Badge from './Badge.svelte'; - - - -# Badge - -Let's define a story for our `Badge` component: - - ({ - Component: Badge, - props: args, - })} /> - -We can drop it in a `Canvas` to get a code snippet: - - - ({ - Component: Badge, - props: args, - })} /> - - -We can even preview multiple Stories in a block. This -gets rendered as a group but defines individual stories -with unique URLs, which is great for review and testing. - - - ({ - Component: Badge, - props: args, - })} /> - ({ - Component: Badge, - props: args, - })} /> - ({ - Component: Badge, - props: args, - })} /> - -``` diff --git a/docs/snippets/svelte/button-group-story.js.mdx b/docs/snippets/svelte/button-group-story.js.mdx index b40b40322ee9..9304e1bfda12 100644 --- a/docs/snippets/svelte/button-group-story.js.mdx +++ b/docs/snippets/svelte/button-group-story.js.mdx @@ -10,16 +10,7 @@ export default { component: ButtonGroup, }; -/* - *πŸ‘‡ Render functions are a framework specific feature to allow you control on how the component renders. - * See https://storybook.js.org/docs/api/csf - * to learn how to use render functions. - */ export const Pair = { - render: (args) => ({ - Component: ButtonGroup, - props: args, - }), args: { buttons: [{ ...ButtonStories.Primary.args }, { ...ButtonStories.Secondary.args }], orientation: 'horizontal', diff --git a/docs/snippets/svelte/button-group-story.ts-4-9.mdx b/docs/snippets/svelte/button-group-story.ts-4-9.mdx new file mode 100644 index 000000000000..aab891afac53 --- /dev/null +++ b/docs/snippets/svelte/button-group-story.ts-4-9.mdx @@ -0,0 +1,24 @@ +```ts +// ButtonGroup.stories.ts + +import type { Meta, StoryObj } from '@storybook/svelte'; + +import ButtonGroup from './ButtonGroup.svelte'; + +//πŸ‘‡ Imports the Button stories +import * as ButtonStories from './Button.stories'; + +const meta = { + component: ButtonGroup, +} satisfies Meta; + +export default meta; +type Story = StoryObj; + +export const Pair: Story = { + args: { + buttons: [{ ...ButtonStories.Primary.args }, { ...ButtonStories.Secondary.args }], + orientation: 'horizontal', + }, +}; +``` diff --git a/docs/snippets/svelte/button-group-story.ts.mdx b/docs/snippets/svelte/button-group-story.ts.mdx new file mode 100644 index 000000000000..d0d9a8989620 --- /dev/null +++ b/docs/snippets/svelte/button-group-story.ts.mdx @@ -0,0 +1,24 @@ +```ts +// ButtonGroup.stories.ts + +import type { Meta, StoryObj } from '@storybook/svelte'; + +import ButtonGroup from './ButtonGroup.svelte'; + +//πŸ‘‡ Imports the Button stories +import * as ButtonStories from './Button.stories'; + +const meta: Meta = { + component: ButtonGroup, +}; + +export default meta; +type Story = StoryObj; + +export const Pair: Story = { + args: { + buttons: [{ ...ButtonStories.Primary.args }, { ...ButtonStories.Secondary.args }], + orientation: 'horizontal', + }, +}; +``` diff --git a/docs/snippets/svelte/button-story-auto-docs.js.mdx b/docs/snippets/svelte/button-story-auto-docs.js.mdx index 013999d572dd..b4bed93087ce 100644 --- a/docs/snippets/svelte/button-story-auto-docs.js.mdx +++ b/docs/snippets/svelte/button-story-auto-docs.js.mdx @@ -13,10 +13,6 @@ export default { }; export const Primary = { - render: (args) => ({ - Component: Button, - props: args, - }), args: { primary: true, label: 'Button', @@ -24,10 +20,6 @@ export const Primary = { }; export const Secondary = { - render: (args) => ({ - Component: Button, - props: args, - }), args: { ...Primary.args, primary: false, diff --git a/docs/snippets/svelte/button-story-auto-docs.ts-4-9.mdx b/docs/snippets/svelte/button-story-auto-docs.ts-4-9.mdx new file mode 100644 index 000000000000..a15d00516058 --- /dev/null +++ b/docs/snippets/svelte/button-story-auto-docs.ts-4-9.mdx @@ -0,0 +1,33 @@ +```ts +// Button.stories.ts + +import type { Meta, StoryObj } from '@storybook/svelte'; + +import Button from './Button.svelte'; + +const meta = { + component: Button, + //πŸ‘‡ Enables auto-generated documentation for the component story + tags: ['autodocs'], + argTypes: { + backgroundColor: { control: 'color' }, + }, +} satisfies Meta; + +export default meta; +type Story = StoryObj; + +export const Primary: Story = { + args: { + primary: true, + label: 'Button', + }, +}; + +export const Secondary: Story = { + args: { + ...Primary.args, + primary: false, + }, +}; +``` diff --git a/docs/snippets/svelte/button-story-auto-docs.ts.mdx b/docs/snippets/svelte/button-story-auto-docs.ts.mdx new file mode 100644 index 000000000000..26248d745aff --- /dev/null +++ b/docs/snippets/svelte/button-story-auto-docs.ts.mdx @@ -0,0 +1,33 @@ +```ts +// Button.stories.ts + +import type { Meta, StoryObj } from '@storybook/svelte'; + +import Button from './Button.svelte'; + +const meta: Meta = { + component: Button, + //πŸ‘‡ Enables auto-generated documentation for the component story + tags: ['autodocs'], + argTypes: { + backgroundColor: { control: 'color' }, + }, +}; + +export default meta; +type Story = StoryObj; + +export const Primary: Story = { + args: { + primary: true, + label: 'Button', + }, +}; + +export const Secondary: Story = { + args: { + ...Primary.args, + primary: false, + }, +}; +``` diff --git a/docs/snippets/svelte/button-story-click-handler-args.ts-4-9.mdx b/docs/snippets/svelte/button-story-click-handler-args.ts-4-9.mdx new file mode 100644 index 000000000000..ff23875fed16 --- /dev/null +++ b/docs/snippets/svelte/button-story-click-handler-args.ts-4-9.mdx @@ -0,0 +1,31 @@ +```ts +// Button.stories.ts + +import type { Meta, StoryObj } from '@storybook/svelte'; +import { action } from '@storybook/addon-actions'; + +import Button from './Button.svelte'; + +const meta = { + component: Button, +} satisfies Meta; + +export default meta; +type Story = StoryObj; + +export const Primary: Story = { + render: ({ label, click }) => ({ + Component: Button, + props: { + label, + }, + on: { + click, + }, + }), + args: { + label: 'Hello', + click: action('clicked'), + }, +}; +``` diff --git a/docs/snippets/svelte/button-story-click-handler-args.ts.mdx b/docs/snippets/svelte/button-story-click-handler-args.ts.mdx new file mode 100644 index 000000000000..0601a77f56e7 --- /dev/null +++ b/docs/snippets/svelte/button-story-click-handler-args.ts.mdx @@ -0,0 +1,31 @@ +```ts +// Button.stories.ts + +import type { Meta, StoryObj } from '@storybook/svelte'; +import { action } from '@storybook/addon-actions'; + +import Button from './Button.svelte'; + +const meta: Meta = { + component: Button, +}; + +export default meta; +type Story = StoryObj; + +export const Text: Story = { + render: ({ label, click }) => ({ + Component: Button, + props: { + label, + }, + on: { + click, + }, + }), + args: { + label: 'Hello', + click: action('clicked'), + }, +}; +``` diff --git a/docs/snippets/svelte/button-story-click-handler-simplificated.js.mdx b/docs/snippets/svelte/button-story-click-handler-simplificated.js.mdx new file mode 100644 index 000000000000..8f6a170584d3 --- /dev/null +++ b/docs/snippets/svelte/button-story-click-handler-simplificated.js.mdx @@ -0,0 +1,13 @@ +```js +// Button.stories.js + +import Button from './Button.svelte'; + +export default { + component: Button, +}; + +export const Text = { + args: {...}, +}; +``` diff --git a/docs/snippets/svelte/button-story-click-handler-simplificated.ts-4-9.mdx b/docs/snippets/svelte/button-story-click-handler-simplificated.ts-4-9.mdx new file mode 100644 index 000000000000..13eeb3c3b7c6 --- /dev/null +++ b/docs/snippets/svelte/button-story-click-handler-simplificated.ts-4-9.mdx @@ -0,0 +1,18 @@ +```ts +// Button.stories.ts + +import type { Meta, StoryObj } from '@storybook/svelte'; + +import Button from './Button.svelte'; + +const meta = { + component: Button, +} satisfies Meta; + +export default meta; +type Story = StoryObj; + +export const Text: Story = { + args: {...}, +}; +``` diff --git a/docs/snippets/svelte/button-story-click-handler-simplificated.ts.mdx b/docs/snippets/svelte/button-story-click-handler-simplificated.ts.mdx new file mode 100644 index 000000000000..860f8e586456 --- /dev/null +++ b/docs/snippets/svelte/button-story-click-handler-simplificated.ts.mdx @@ -0,0 +1,18 @@ +```ts +// Button.stories.ts + +import type { Meta, StoryObj } from '@storybook/svelte'; + +import Button from './Button.svelte'; + +const meta: Meta = { + component: Button, +}; + +export default meta; +type Story = StoryObj; + +export const Text: Story = { + args: {...}, +}; +``` diff --git a/docs/snippets/svelte/button-story-click-handler.js.mdx b/docs/snippets/svelte/button-story-click-handler.js.mdx index ff58c6e44a2c..06f272af6ca6 100644 --- a/docs/snippets/svelte/button-story-click-handler.js.mdx +++ b/docs/snippets/svelte/button-story-click-handler.js.mdx @@ -1,10 +1,10 @@ ```js // Button.stories.js -import Button from './Button.svelte'; - import { action } from '@storybook/addon-actions'; +import Button from './Button.svelte'; + export default { component: Button, }; diff --git a/docs/snippets/svelte/button-story-click-handler.ts-4-9.mdx b/docs/snippets/svelte/button-story-click-handler.ts-4-9.mdx new file mode 100644 index 000000000000..16db58d0a779 --- /dev/null +++ b/docs/snippets/svelte/button-story-click-handler.ts-4-9.mdx @@ -0,0 +1,26 @@ +```ts +// Button.stories.ts + +import type { Meta, StoryObj } from '@storybook/svelte'; +import { action } from '@storybook/addon-actions'; + +import Button from './Button.svelte'; + +const meta = { + component: Button, +} satisfies Meta; + +export default meta; +type Story = StoryObj; + +export const Primary: Story = { + render: (args) => ({ + Component: Button, + props: args, + }), + args: { + primary: true, + label: 'Button', + }, +}; +``` diff --git a/docs/snippets/svelte/button-story-click-handler.ts.mdx b/docs/snippets/svelte/button-story-click-handler.ts.mdx new file mode 100644 index 000000000000..f5e8c397eba5 --- /dev/null +++ b/docs/snippets/svelte/button-story-click-handler.ts.mdx @@ -0,0 +1,27 @@ +```ts +// Button.stories.ts + +import type { Meta, StoryObj } from '@storybook/svelte'; +import { action } from '@storybook/addon-actions'; + +import Button from './Button.svelte'; + +const meta: Meta = { + component: Button, +}; + +export default meta; +type Story = StoryObj; + +export const Text: Story = { + render: () => ({ + Component: Button, + props: { + label: 'Hello', + }, + on: { + click: action('clicked'), + }, + }), +}; +``` diff --git a/docs/snippets/svelte/button-story-component-args-primary.mdx.mdx b/docs/snippets/svelte/button-story-component-args-primary.mdx.mdx deleted file mode 100644 index 8dcda41aff7a..000000000000 --- a/docs/snippets/svelte/button-story-component-args-primary.mdx.mdx +++ /dev/null @@ -1,22 +0,0 @@ -```md - - -import { Meta, Story } from '@storybook/addon-docs'; - -import Button from './Button.svelte'; - - - - - - -``` \ No newline at end of file diff --git a/docs/snippets/svelte/button-story-component-args-primary.ts-4-9.mdx b/docs/snippets/svelte/button-story-component-args-primary.ts-4-9.mdx new file mode 100644 index 000000000000..7c83e880ac7f --- /dev/null +++ b/docs/snippets/svelte/button-story-component-args-primary.ts-4-9.mdx @@ -0,0 +1,21 @@ +```ts +// Button.stories.ts + +import type { Meta } from '@storybook/svelte'; + +import Button from './Button.svelte'; + +const meta = { + component: Button, + //πŸ‘‡ Creates specific argTypes + argTypes: { + backgroundColor: { control: 'color' }, + }, + args: { + //πŸ‘‡ Now all Button stories will be primary. + primary: true, + }, +} satisfies Meta; + +export default meta; +``` diff --git a/docs/snippets/svelte/button-story-component-args-primary.ts.mdx b/docs/snippets/svelte/button-story-component-args-primary.ts.mdx new file mode 100644 index 000000000000..2b5e54a6ea2d --- /dev/null +++ b/docs/snippets/svelte/button-story-component-args-primary.ts.mdx @@ -0,0 +1,21 @@ +```ts +// Button.stories.ts + +import type { Meta } from '@storybook/svelte'; + +import Button from './Button.svelte'; + +const meta: Meta = { + component: Button, + //πŸ‘‡ Creates specific argTypes + argTypes: { + backgroundColor: { control: 'color' }, + }, + args: { + //πŸ‘‡ Now all Button stories will be primary. + primary: true, + }, +}; + +export default meta; +``` diff --git a/docs/snippets/svelte/button-story-component-decorator.js.mdx b/docs/snippets/svelte/button-story-component-decorator.js.mdx index 75984c49a1ea..d777e387143f 100644 --- a/docs/snippets/svelte/button-story-component-decorator.js.mdx +++ b/docs/snippets/svelte/button-story-component-decorator.js.mdx @@ -8,22 +8,4 @@ export default { component: Button, decorators: [() => MarginDecorator], }; - -// Your stories here. - -// Don't forget to use the component you're testing and not the MarginDecorator component -``` - -```html - - -
- -
- - ``` diff --git a/docs/snippets/svelte/button-story-component-decorator.mdx.mdx b/docs/snippets/svelte/button-story-component-decorator.mdx.mdx deleted file mode 100644 index 843ae3a43f4c..000000000000 --- a/docs/snippets/svelte/button-story-component-decorator.mdx.mdx +++ /dev/null @@ -1,12 +0,0 @@ -```md - - -import { Story, Meta } from '@storybook/addon-docs'; - -import Button from './Button.svelte'; -import MarginDecorator from './MarginDecorator.svelte'; - - MarginDecorator]}/> - - -``` \ No newline at end of file diff --git a/docs/snippets/svelte/button-story-component-decorator.ts-4-9.mdx b/docs/snippets/svelte/button-story-component-decorator.ts-4-9.mdx new file mode 100644 index 000000000000..badb749d2732 --- /dev/null +++ b/docs/snippets/svelte/button-story-component-decorator.ts-4-9.mdx @@ -0,0 +1,15 @@ +```ts +// Button.stories.ts + +import type { Meta } from '@storybook/svelte'; + +import Button from './Button.svelte'; +import MarginDecorator from './MarginDecorator.svelte'; + +const meta = { + component: Button, + decorators: [() => MarginDecorator], +}; + +export default meta; +``` diff --git a/docs/snippets/svelte/button-story-component-decorator.ts.mdx b/docs/snippets/svelte/button-story-component-decorator.ts.mdx new file mode 100644 index 000000000000..67c72b7cc899 --- /dev/null +++ b/docs/snippets/svelte/button-story-component-decorator.ts.mdx @@ -0,0 +1,15 @@ +```ts +// Button.stories.ts + +import type { Meta } from '@storybook/svelte'; + +import Button from './Button.svelte'; +import MarginDecorator from './MarginDecorator.svelte'; + +const meta: Meta = { + component: Button, + decorators: [() => MarginDecorator], +}; + +export default meta; +``` diff --git a/docs/snippets/svelte/button-story-decorator.js.mdx b/docs/snippets/svelte/button-story-decorator.js.mdx index 30413fa807b4..94378724bb4d 100644 --- a/docs/snippets/svelte/button-story-decorator.js.mdx +++ b/docs/snippets/svelte/button-story-decorator.js.mdx @@ -8,15 +8,7 @@ export default { component: Button, }; -/* - *πŸ‘‡ Render functions are a framework specific feature to allow you control on how the component renders. - * See https://storybook.js.org/docs/api/csf - * to learn how to use render functions. - */ export const Primary = { - render: () => ({ - component: Button, - }), decorators: [() => MarginDecorator], }; ``` diff --git a/docs/snippets/svelte/button-story-decorator.mdx.mdx b/docs/snippets/svelte/button-story-decorator.mdx.mdx deleted file mode 100644 index 5abb2d2bf697..000000000000 --- a/docs/snippets/svelte/button-story-decorator.mdx.mdx +++ /dev/null @@ -1,25 +0,0 @@ -```md - - -import { Meta, Story } from '@storybook/addon-docs'; - -import Button from './Button.svelte'; -import MarginDecorator from './MarginDecorator.svelte'; - - - - - - MarginDecorator]} - render={(args) => ({ - Component: Badge, - props: args, - })} /> -``` \ No newline at end of file diff --git a/docs/snippets/svelte/button-story-decorator.ts-4-9.mdx b/docs/snippets/svelte/button-story-decorator.ts-4-9.mdx new file mode 100644 index 000000000000..94567b8b9ec1 --- /dev/null +++ b/docs/snippets/svelte/button-story-decorator.ts-4-9.mdx @@ -0,0 +1,19 @@ +```ts +// Button.stories.ts + +import { Meta, StoryObj } from '@storybook/svelte'; + +import Button from './Button.svelte'; +import MarginDecorator from './MarginDecorator.svelte'; + +const meta = { + component: Button, +} satisfies Meta; + +export default meta; +type Story = StoryObj; + +export const Primary: Story = { + decorators: [() => MarginDecorator], +}; +``` diff --git a/docs/snippets/svelte/button-story-decorator.ts.mdx b/docs/snippets/svelte/button-story-decorator.ts.mdx new file mode 100644 index 000000000000..22ba3a40c092 --- /dev/null +++ b/docs/snippets/svelte/button-story-decorator.ts.mdx @@ -0,0 +1,19 @@ +```ts +// Button.stories.ts + +import { Meta, StoryObj } from '@storybook/svelte'; + +import Button from './Button.svelte'; +import MarginDecorator from './MarginDecorator.svelte'; + +const meta: Meta = { + component: Button, +}; + +export default meta; +type Story = StoryObj; + +export const Primary: Story = { + decorators: [() => MarginDecorator], +}; +``` diff --git a/docs/snippets/svelte/button-story-default-docs-code.mdx.mdx b/docs/snippets/svelte/button-story-default-docs-code.mdx.mdx deleted file mode 100644 index 410d3fc6b0c1..000000000000 --- a/docs/snippets/svelte/button-story-default-docs-code.mdx.mdx +++ /dev/null @@ -1,45 +0,0 @@ -```md - - -import { Meta, Story } from '@storybook/addon-docs'; - -import Button from './Button.svelte'; - - - - - -export const someFunction = (someValue) => { - return `i am a ${someValue}`; -}; - - - - - {(args) => { - const { label } = args; - const functionResult = someFunction(label); - return { - Component: Button, - props: { - ...args, - label: functionResult, - }, - }; - }} - -``` \ No newline at end of file diff --git a/docs/snippets/svelte/button-story-default-export-with-component.ts-4-9.mdx b/docs/snippets/svelte/button-story-default-export-with-component.ts-4-9.mdx new file mode 100644 index 000000000000..62d8e08df1b7 --- /dev/null +++ b/docs/snippets/svelte/button-story-default-export-with-component.ts-4-9.mdx @@ -0,0 +1,13 @@ +```ts +// Button.stories.ts + +import type { Meta } from '@storybook/svelte'; + +import Button from './Button.svelte'; + +const meta = { + component: Button, +} satisfies Meta; + +export default meta; +``` diff --git a/docs/snippets/svelte/button-story-default-export-with-component.ts.mdx b/docs/snippets/svelte/button-story-default-export-with-component.ts.mdx new file mode 100644 index 000000000000..d0bf35d7af69 --- /dev/null +++ b/docs/snippets/svelte/button-story-default-export-with-component.ts.mdx @@ -0,0 +1,13 @@ +```ts +// Button.stories.ts + +import type { Meta } from '@storybook/svelte'; + +import Button from './Button.svelte'; + +const meta: Meta = { + component: Button, +}; + +export default meta; +``` diff --git a/docs/snippets/svelte/button-story-rename-story.ts-4-9.mdx b/docs/snippets/svelte/button-story-rename-story.ts-4-9.mdx new file mode 100644 index 000000000000..2bb5d69c5565 --- /dev/null +++ b/docs/snippets/svelte/button-story-rename-story.ts-4-9.mdx @@ -0,0 +1,30 @@ +```ts +// Button.stories.ts + +import type { Meta, StoryObj } from '@storybook/svelte'; + +import Button from './Button.svelte'; + +const meta = { + component: Button, +} satisfies Meta; + +export default meta; +type Story = StoryObj; + +/* + *πŸ‘‡ Render functions are a framework specific feature to allow you control on how the component renders. + * See https://storybook.js.org/docs/svelte/api/csf + * to learn how to use render functions. + */ +export const Primary: Story = ({ + name: 'I am the primary', + render: () => ({ + Component: Button, + props: { + primary: true, + label: 'Button', + }, + }), +}; +``` diff --git a/docs/snippets/svelte/button-story-rename-story.ts.mdx b/docs/snippets/svelte/button-story-rename-story.ts.mdx new file mode 100644 index 000000000000..ad254c10b73d --- /dev/null +++ b/docs/snippets/svelte/button-story-rename-story.ts.mdx @@ -0,0 +1,30 @@ +```ts +// Button.stories.ts + +import type { Meta, StoryObj } from '@storybook/svelte'; + +import Button from './Button.svelte'; + +const meta: Meta = { + component: Button, +}; + +export default meta; +type Story = StoryObj; + +/* + *πŸ‘‡ Render functions are a framework specific feature to allow you control on how the component renders. + * See https://storybook.js.org/docs/svelte/api/csf + * to learn how to use render functions. + */ +export const Primary: Story = ({ + name: 'I am the primary', + render: () => ({ + Component: Button, + props: { + primary: true, + label: 'Button', + }, + }), +}; +``` diff --git a/docs/snippets/svelte/button-story-using-args.js.mdx b/docs/snippets/svelte/button-story-using-args.js.mdx index 64dd4cd5f58b..8be69a92c46f 100644 --- a/docs/snippets/svelte/button-story-using-args.js.mdx +++ b/docs/snippets/svelte/button-story-using-args.js.mdx @@ -7,16 +7,7 @@ export default { component: Button, }; -/* - *πŸ‘‡ Render functions are a framework specific feature to allow you control on how the component renders. - * See https://storybook.js.org/docs/api/csf - * to learn how to use render functions. - */ export const Primary = { - render: (args) => ({ - Component: Button, - props: args, - }), args: { backgroundColor: '#ff0', label: 'Button', @@ -24,10 +15,6 @@ export const Primary = { }; export const Secondary = { - render: (args) => ({ - Component: Button, - props: args, - }), args: { ...Primary.args, label: 'πŸ˜„πŸ‘πŸ˜πŸ’―', @@ -35,10 +22,6 @@ export const Secondary = { }; export const Tertiary = { - render: (args) => ({ - Component: Button, - props: args, - }), args: { ...Primary.args, label: 'πŸ“šπŸ“•πŸ“ˆπŸ€“', diff --git a/docs/snippets/svelte/button-story-using-args.ts-4-9.mdx b/docs/snippets/svelte/button-story-using-args.ts-4-9.mdx new file mode 100644 index 000000000000..e5d5dc11f72d --- /dev/null +++ b/docs/snippets/svelte/button-story-using-args.ts-4-9.mdx @@ -0,0 +1,36 @@ +```ts +// Button.stories.ts + +import type { Meta, StoryObj } from '@storybook/svelte'; + +import Button from './Button.svelte'; + +//πŸ‘‡This default export determines where your story goes in the story list +const meta = { + component: Button, +} satisfies Meta; + +export default meta; +type Story = StoryObj; + +export const Primary: Story = { + args: { + backgroundColor: '#ff0', + label: 'Button', + }, +}; + +export const Secondary: Story = { + args: { + ...Primary.args, + label: 'πŸ˜„πŸ‘πŸ˜πŸ’―', + }, +}; + +export const Tertiary: Story = { + args: { + ...Primary.args, + label: 'πŸ“šπŸ“•πŸ“ˆπŸ€“', + }, +}; +``` diff --git a/docs/snippets/svelte/button-story-using-args.ts.mdx b/docs/snippets/svelte/button-story-using-args.ts.mdx new file mode 100644 index 000000000000..edcd9995e364 --- /dev/null +++ b/docs/snippets/svelte/button-story-using-args.ts.mdx @@ -0,0 +1,36 @@ +```ts +// Button.stories.ts + +import type { Meta, StoryObj } from '@storybook/svelte'; + +import Button from './Button.svelte'; + +//πŸ‘‡This default export determines where your story goes in the story list +const meta: Meta = { + component: Button, +}; + +export default meta; +type Story = StoryObj; + +export const Primary: Story = { + args: { + backgroundColor: '#ff0', + label: 'Button', + }, +}; + +export const Secondary: Story = { + args: { + ...Primary.args, + label: 'πŸ˜„πŸ‘πŸ˜πŸ’―', + }, +}; + +export const Tertiary: Story = { + args: { + ...Primary.args, + label: 'πŸ“šπŸ“•πŸ“ˆπŸ€“', + }, +}; +``` diff --git a/docs/snippets/svelte/button-story-with-addon-example.js.mdx b/docs/snippets/svelte/button-story-with-addon-example.js.mdx index d96a3c9c2cba..e1fcca24d96d 100644 --- a/docs/snippets/svelte/button-story-with-addon-example.js.mdx +++ b/docs/snippets/svelte/button-story-with-addon-example.js.mdx @@ -9,6 +9,7 @@ export default { * to learn how to generate automatic titles */ title: 'Button', + component: Button, //πŸ‘‡ Creates specific parameters for the story parameters: { myAddon: { @@ -17,15 +18,5 @@ export default { }, }; -/* - *πŸ‘‡ Render functions are a framework specific feature to allow you control on how the component renders. - * See https://storybook.js.org/docs/api/csf - * to learn how to use render functions. - */ -export const Basic = { - render: (args) => ({ - Component: Button, - props: args, - }), -}; +export const Basic = {}; ``` diff --git a/docs/snippets/svelte/button-story-with-addon-example.ts-4-9.mdx b/docs/snippets/svelte/button-story-with-addon-example.ts-4-9.mdx new file mode 100644 index 000000000000..697c27744174 --- /dev/null +++ b/docs/snippets/svelte/button-story-with-addon-example.ts-4-9.mdx @@ -0,0 +1,27 @@ +```ts +// Button.stories.ts + +import type { Meta, StoryObj } from '@storybook/svelte'; + +import Button from './Button.svelte'; + +const meta = { + /* πŸ‘‡ The title prop is optional. + * See https://storybook.js.org/docs/configure/#configure-story-loading + * to learn how to generate automatic titles + */ + title: 'Button', + component: Button, + //πŸ‘‡ Creates specific parameters for the story + parameters: { + myAddon: { + data: 'this data is passed to the addon', + }, + }, +} satisfies Meta; + +export default meta; +type Story = StoryObj; + +export const Basic: Story = {}; +``` diff --git a/docs/snippets/svelte/button-story-with-addon-example.ts.mdx b/docs/snippets/svelte/button-story-with-addon-example.ts.mdx new file mode 100644 index 000000000000..53aa9fe085fd --- /dev/null +++ b/docs/snippets/svelte/button-story-with-addon-example.ts.mdx @@ -0,0 +1,27 @@ +```ts +// Button.stories.ts + +import type { Meta, StoryObj } from '@storybook/svelte'; + +import Button from './Button.svelte'; + +const meta: Meta = { + /* πŸ‘‡ The title prop is optional. + * See https://storybook.js.org/docs/configure/#configure-story-loading + * to learn how to generate automatic titles + */ + title: 'Button', + component: Button, + //πŸ‘‡ Creates specific parameters for the story + parameters: { + myAddon: { + data: 'this data is passed to the addon', + }, + }, +}; + +export default meta; +type Story = StoryObj; + +export const Basic: Story = {}; +``` diff --git a/docs/snippets/svelte/button-story-with-args.js.mdx b/docs/snippets/svelte/button-story-with-args.js.mdx index 652c4b59d0d0..58cf0732e6be 100644 --- a/docs/snippets/svelte/button-story-with-args.js.mdx +++ b/docs/snippets/svelte/button-story-with-args.js.mdx @@ -7,16 +7,7 @@ export default { component: Button, }; -/* - *πŸ‘‡ Render functions are a framework specific feature to allow you control on how the component renders. - * See https://storybook.js.org/docs/api/csf - * to learn how to use render functions. - */ export const Primary = { - render: (args) => ({ - Component: Button, - props: args, - }), args: { primary: true, label: 'Button', diff --git a/docs/snippets/svelte/button-story-with-args.mdx.mdx b/docs/snippets/svelte/button-story-with-args.mdx.mdx deleted file mode 100644 index 365def163b33..000000000000 --- a/docs/snippets/svelte/button-story-with-args.mdx.mdx +++ /dev/null @@ -1,26 +0,0 @@ -```md - - -import { Meta, Story } from '@storybook/addon-docs'; - -import Button from './Button.svelte'; - - - - - - ({ - Component: Button, - props: args, - })} /> -``` \ No newline at end of file diff --git a/docs/snippets/svelte/button-story-with-args.ts-4-9.mdx b/docs/snippets/svelte/button-story-with-args.ts-4-9.mdx index 045361662c3e..059ecc250092 100644 --- a/docs/snippets/svelte/button-story-with-args.ts-4-9.mdx +++ b/docs/snippets/svelte/button-story-with-args.ts-4-9.mdx @@ -12,16 +12,7 @@ const meta = { export default meta; type Story = StoryObj; -/* - *πŸ‘‡ Render functions are a framework specific feature to allow you control on how the component renders. - * See https://storybook.js.org/docs/api/csf - * to learn how to use render functions. - */ export const Primary: Story = { - render: (args) => ({ - Component: Button, - props: args, - }), args: { primary: true, label: 'Button', diff --git a/docs/snippets/svelte/button-story-with-args.ts.mdx b/docs/snippets/svelte/button-story-with-args.ts.mdx index ee49e33b2069..0c481911787c 100644 --- a/docs/snippets/svelte/button-story-with-args.ts.mdx +++ b/docs/snippets/svelte/button-story-with-args.ts.mdx @@ -12,16 +12,7 @@ const meta: Meta = { export default meta; type Story = StoryObj; -/* - *πŸ‘‡ Render functions are a framework specific feature to allow you control on how the component renders. - * See https://storybook.js.org/docs/api/csf - * to learn how to use render functions. - */ export const Primary: Story = { - render: (args) => ({ - Component: Button, - props: args, - }), args: { primary: true, label: 'Button', diff --git a/docs/snippets/svelte/button-story-with-blue-args.mdx.mdx b/docs/snippets/svelte/button-story-with-blue-args.mdx.mdx deleted file mode 100644 index c6d410ddc632..000000000000 --- a/docs/snippets/svelte/button-story-with-blue-args.mdx.mdx +++ /dev/null @@ -1,24 +0,0 @@ -```md - - -import { Meta } from '@storybook/addon-docs'; - -import Button from './Button.svelte'; - - - - - -``` \ No newline at end of file diff --git a/docs/snippets/svelte/button-story-with-blue-args.ts-4-9.mdx b/docs/snippets/svelte/button-story-with-blue-args.ts-4-9.mdx new file mode 100644 index 000000000000..c45a9dcd99ab --- /dev/null +++ b/docs/snippets/svelte/button-story-with-blue-args.ts-4-9.mdx @@ -0,0 +1,23 @@ +```ts +// Button.stories.ts + +import type { Meta } from '@storybook/svelte'; + +import Button from './Button.svelte'; + +const meta = { + component: Button, + //πŸ‘‡ Creates specific parameters for the story + parameters: { + backgrounds: { + values: [ + { name: 'red', value: '#f00' }, + { name: 'green', value: '#0f0' }, + { name: 'blue', value: '#00f' }, + ], + }, + }, +} satisfies Meta; + +export default meta; +``` diff --git a/docs/snippets/svelte/button-story-with-blue-args.ts.mdx b/docs/snippets/svelte/button-story-with-blue-args.ts.mdx new file mode 100644 index 000000000000..4e2960f81120 --- /dev/null +++ b/docs/snippets/svelte/button-story-with-blue-args.ts.mdx @@ -0,0 +1,23 @@ +```ts +// Button.stories.ts + +import type { Meta } from '@storybook/svelte'; + +import Button from './Button.svelte'; + +const meta: Meta = { + component: Button, + //πŸ‘‡ Creates specific parameters for the story + parameters: { + backgrounds: { + values: [ + { name: 'red', value: '#f00' }, + { name: 'green', value: '#0f0' }, + { name: 'blue', value: '#00f' }, + ], + }, + }, +}; + +export default meta; +``` diff --git a/docs/snippets/svelte/button-story-with-emojis.mdx.mdx b/docs/snippets/svelte/button-story-with-emojis.mdx.mdx deleted file mode 100644 index 00fa74f2c06f..000000000000 --- a/docs/snippets/svelte/button-story-with-emojis.mdx.mdx +++ /dev/null @@ -1,43 +0,0 @@ -```md - - -import { Meta, Story } from '@storybook/addon-docs'; - -import Button from './Button.svelte'; - - - - - - ({ - Component: Button, - props: { - backgroundColor: '#ff0', - label: 'Button', - } - })} /> - ({ - Component: Button, - props: { - background: '#ff0', - label: 'πŸ˜„πŸ‘πŸ˜πŸ’―', - }, - })} /> - ({ - Component: Button, - props: { - background: '#ff0', - label: 'πŸ“šπŸ“•πŸ“ˆπŸ€“', - }, - })} /> -``` \ No newline at end of file diff --git a/docs/snippets/svelte/button-story-with-emojis.ts-4-9.mdx b/docs/snippets/svelte/button-story-with-emojis.ts-4-9.mdx new file mode 100644 index 000000000000..61c72830fa8f --- /dev/null +++ b/docs/snippets/svelte/button-story-with-emojis.ts-4-9.mdx @@ -0,0 +1,49 @@ +```ts +// Button.stories.ts + +import type { Meta, StoryObj } from '@storybook/svelte'; + +import Button from './Button.svelte'; + +const meta = { + component: Button, +} satisfies Meta; + +export default meta; +type Story = StoryObj; + +/* + *πŸ‘‡ Render functions are a framework specific feature to allow you control on how the component renders. + * See https://storybook.js.org/docs/svelte/api/csf + * to learn how to use render functions. + */ +export const Primary: Story = { + render: () => ({ + Component: Button, + props: { + backgroundColor: '#ff0', + label: 'Button', + }, + }), +}; + +export const Secondary: Story = { + render: () => ({ + Component: Button, + props: { + backgroundColor: '#ff0', + label: 'πŸ˜„πŸ‘πŸ˜πŸ’―', + }, + }), +}; + +export const Tertiary: Story = { + render: () => ({ + Component: Button, + props: { + backgroundColor: '#ff0', + label: 'πŸ“šπŸ“•πŸ“ˆπŸ€“', + }, + }), +}; +``` diff --git a/docs/snippets/svelte/button-story-with-emojis.ts.mdx b/docs/snippets/svelte/button-story-with-emojis.ts.mdx new file mode 100644 index 000000000000..8bcc1bd7c66a --- /dev/null +++ b/docs/snippets/svelte/button-story-with-emojis.ts.mdx @@ -0,0 +1,49 @@ +```ts +// Button.stories.ts + +import type { Meta, StoryObj } from '@storybook/svelte'; + +import Button from './Button.svelte'; + +const meta: Meta = { + component: Button, +}; + +export default meta; +type Story = StoryObj; + +/* + *πŸ‘‡ Render functions are a framework specific feature to allow you control on how the component renders. + * See https://storybook.js.org/docs/svelte/api/csf + * to learn how to use render functions. + */ +export const Primary: Story = { + render: () => ({ + Component: Button, + props: { + backgroundColor: '#ff0', + label: 'Button', + }, + }), +}; + +export const Secondary: Story = { + render: () => ({ + Component: Button, + props: { + backgroundColor: '#ff0', + label: 'πŸ˜„πŸ‘πŸ˜πŸ’―', + }, + }), +}; + +export const Tertiary: Story = { + render: () => ({ + Component: Button, + props: { + backgroundColor: '#ff0', + label: 'πŸ“šπŸ“•πŸ“ˆπŸ€“', + }, + }), +}; +``` diff --git a/docs/snippets/svelte/button-story.mdx.mdx b/docs/snippets/svelte/button-story.mdx.mdx deleted file mode 100644 index 863161bf7248..000000000000 --- a/docs/snippets/svelte/button-story.mdx.mdx +++ /dev/null @@ -1,27 +0,0 @@ -```md - - -import { Meta, Story } from '@storybook/addon-docs'; - -import Button from './Button.svelte'; - - - -# Button - - - - ({ - Component:Button, - props: { - primary: true, - label: 'Button', - }, - })} /> -``` \ No newline at end of file diff --git a/docs/snippets/svelte/checkbox-story.mdx.mdx b/docs/snippets/svelte/checkbox-story.mdx.mdx deleted file mode 100644 index 7359621ab606..000000000000 --- a/docs/snippets/svelte/checkbox-story.mdx.mdx +++ /dev/null @@ -1,55 +0,0 @@ -```md - - -import { Canvas, Meta, Story } from '@storybook/addon-docs'; - -import Checkbox from './Checkbox.svelte'; - - - - - -# Checkbox - -With `MDX`, we can define a story for `Checkbox` right in the middle of our -Markdown documentation. - - - ({ - Component: Checkbox, - props: args - })} /> - - ({ - Component: Checkbox, - props: args - })} /> - - ({ - Component: Checkbox, - props: args - })} /> - -``` \ No newline at end of file diff --git a/docs/snippets/svelte/component-story-custom-args-complex.ts-4-9.mdx b/docs/snippets/svelte/component-story-custom-args-complex.ts-4-9.mdx new file mode 100644 index 000000000000..e32f516fb01b --- /dev/null +++ b/docs/snippets/svelte/component-story-custom-args-complex.ts-4-9.mdx @@ -0,0 +1,46 @@ +```ts +// YourComponent.stories.ts + +import type { Meta, StoryObj } from '@storybook/svelte'; + +import YourComponent from './YourComponent.svelte'; + +const meta = { + component: YourComponent, + //πŸ‘‡ Creates specific argTypes + argTypes: { + propertyA: { + options: ['Item One', 'Item Two', 'Item Three'], + control: { type: 'select' }, // Automatically inferred when 'options' is defined + }, + propertyB: { + options: ['Another Item One', 'Another Item Two', 'Another Item Three'], + }, + }, +} satisfies Meta; + +export default meta; +type Story = StoryObj; + +const someFunction = (valuePropertyA, valuePropertyB) => { + // Do some logic here +}; + +export const ExampleStory: Story = { + render: ({ propertyA, propertyB }) => { + //πŸ‘‡ Assigns the function result to a variable + const someFunctionResult = someFunction(propertyA, propertyB); + return { + Component: YourComponent, + props: { + ...args, + someProperty: someFunctionResult, + }, + }; + }, + args: { + propertyA: 'Item One', + propertyB: 'Another Item One', + }, +}; +``` diff --git a/docs/snippets/svelte/component-story-custom-args-complex.ts.mdx b/docs/snippets/svelte/component-story-custom-args-complex.ts.mdx new file mode 100644 index 000000000000..eb0a45d9a1db --- /dev/null +++ b/docs/snippets/svelte/component-story-custom-args-complex.ts.mdx @@ -0,0 +1,46 @@ +```ts +// YourComponent.stories.ts + +import type { Meta, StoryObj } from '@storybook/svelte'; + +import YourComponent from './YourComponent.svelte'; + +const meta: Meta = { + component: YourComponent, + //πŸ‘‡ Creates specific argTypes + argTypes: { + propertyA: { + options: ['Item One', 'Item Two', 'Item Three'], + control: { type: 'select' }, // Automatically inferred when 'options' is defined + }, + propertyB: { + options: ['Another Item One', 'Another Item Two', 'Another Item Three'], + }, + }, +}; + +export default meta; +type Story = StoryObj; + +const someFunction = (valuePropertyA, valuePropertyB) => { + // Do some logic here +}; + +export const ExampleStory: Story = { + render: ({ propertyA, propertyB }) => { + //πŸ‘‡ Assigns the function result to a variable + const someFunctionResult = someFunction(propertyA, propertyB); + return { + Component: YourComponent, + props: { + ...args, + someProperty: someFunctionResult, + }, + }; + }, + args: { + propertyA: 'Item One', + propertyB: 'Another Item One', + }, +}; +``` diff --git a/docs/snippets/svelte/component-story-figma-integration.js.mdx b/docs/snippets/svelte/component-story-figma-integration.js.mdx index f77576417513..f6781fe6fe61 100644 --- a/docs/snippets/svelte/component-story-figma-integration.js.mdx +++ b/docs/snippets/svelte/component-story-figma-integration.js.mdx @@ -5,14 +5,10 @@ import MyComponent from './MyComponent.svelte'; // More on default export: https://storybook.js.org/docs/writing-stories/#default-export export default { - component: { MyComponent }, + component: MyComponent, }; export const Example = { - render: () => ({ - Component: MyComponent, - props: {}, - }), parameters: { design: { type: 'figma', diff --git a/docs/snippets/svelte/component-story-figma-integration.mdx.mdx b/docs/snippets/svelte/component-story-figma-integration.mdx.mdx deleted file mode 100644 index f28ee0608e39..000000000000 --- a/docs/snippets/svelte/component-story-figma-integration.mdx.mdx +++ /dev/null @@ -1,33 +0,0 @@ -```md - - -import { Canvas, Meta, Story } from '@storybook/addon-docs'; - -import MyComponent from './MyComponent.svelte'; - - - - - - - ({ - Component: MyComponent, - props: {} - })} /> - -``` \ No newline at end of file diff --git a/docs/snippets/svelte/component-story-figma-integration.ts-4-9.mdx b/docs/snippets/svelte/component-story-figma-integration.ts-4-9.mdx new file mode 100644 index 000000000000..bf5c42c553f4 --- /dev/null +++ b/docs/snippets/svelte/component-story-figma-integration.ts-4-9.mdx @@ -0,0 +1,24 @@ +```ts +// MyComponent.stories.ts + +import type { Meta, StoryObj } from '@storybook/svelte'; + +import MyComponent from './MyComponent.svelte'; + +// More on default export: https://storybook.js.org/docs/svelte/writing-stories/introduction#default-export +const meta = { + component: MyComponent, +} satisfies Meta; + +export default meta; +type Story = StoryObj; + +export const Example: Story = { + parameters: { + design: { + type: 'figma', + url: 'https://www.figma.com/file/Sample-File', + }, + }, +}; +``` diff --git a/docs/snippets/svelte/component-story-figma-integration.ts.mdx b/docs/snippets/svelte/component-story-figma-integration.ts.mdx new file mode 100644 index 000000000000..799438a116eb --- /dev/null +++ b/docs/snippets/svelte/component-story-figma-integration.ts.mdx @@ -0,0 +1,24 @@ +```ts +// MyComponent.stories.ts + +import type { Meta, StoryObj } from '@storybook/svelte'; + +import MyComponent from './MyComponent.svelte'; + +// More on default export: https://storybook.js.org/docs/svelte/writing-stories/introduction#default-export +const meta: Meta = { + component: MyComponent, +}; + +export default meta; +type Story = StoryObj; + +export const Example: Story = { + parameters: { + design: { + type: 'figma', + url: 'https://www.figma.com/file/Sample-File', + }, + }, +}; +``` diff --git a/docs/snippets/svelte/component-story-mdx-story-by-name.mdx.mdx b/docs/snippets/svelte/component-story-mdx-story-by-name.mdx.mdx deleted file mode 100644 index 449383141f75..000000000000 --- a/docs/snippets/svelte/component-story-mdx-story-by-name.mdx.mdx +++ /dev/null @@ -1,23 +0,0 @@ -```md - - -import { Meta, Story } from '@storybook/addon-docs'; - -import Button from './Button.svelte'; - - - - - - ({ - Component: Button, - props: args, - })} /> -``` \ No newline at end of file diff --git a/docs/snippets/svelte/component-story-static-asset-cdn.mdx.mdx b/docs/snippets/svelte/component-story-static-asset-cdn.mdx.mdx deleted file mode 100644 index c2704b49bbd4..000000000000 --- a/docs/snippets/svelte/component-story-static-asset-cdn.mdx.mdx +++ /dev/null @@ -1,25 +0,0 @@ -```md - - -import { Meta, Story } from '@storybook/addon-docs'; - -import MyComponent from './MyComponent.svelte'; - - - - - - ({ - Component: MyComponent, - props: { - src: 'https://storybook.js.org/images/placeholders/350x150.png', - alt: 'my image', - }, - })} /> -``` \ No newline at end of file diff --git a/docs/snippets/svelte/component-story-static-asset-cdn.ts-4-9.mdx b/docs/snippets/svelte/component-story-static-asset-cdn.ts-4-9.mdx new file mode 100644 index 000000000000..542c6ccefb33 --- /dev/null +++ b/docs/snippets/svelte/component-story-static-asset-cdn.ts-4-9.mdx @@ -0,0 +1,24 @@ +```ts +// MyComponent.stories.ts + +import type { Meta, StoryObj } from '@storybook/svelte'; + +import MyComponent from './MyComponent.svelte'; + +const meta = { + component: MyComponent, +} satisfies Meta; + +export default meta; +type Story = StoryObj; + +export const WithAnImage: Story = { + render: () => ({ + Component: MyComponent, + props: { + src: 'https://storybook.js.org/images/placeholders/350x150.png', + alt: 'My CDN placeholder', + }, + }), +}; +``` diff --git a/docs/snippets/svelte/component-story-static-asset-cdn.ts.mdx b/docs/snippets/svelte/component-story-static-asset-cdn.ts.mdx new file mode 100644 index 000000000000..3b21d2eed894 --- /dev/null +++ b/docs/snippets/svelte/component-story-static-asset-cdn.ts.mdx @@ -0,0 +1,24 @@ +```ts +// MyComponent.stories.ts + +import type { Meta, StoryObj } from '@storybook/svelte'; + +import MyComponent from './MyComponent.svelte'; + +const meta: Meta = { + component: MyComponent, +}; + +export default meta; +type Story = StoryObj; + +export const WithAnImage: Story = { + render: () => ({ + Component: MyComponent, + props: { + src: 'https://storybook.js.org/images/placeholders/350x150.png', + alt: 'My CDN placeholder', + }, + }), +}; +``` diff --git a/docs/snippets/svelte/component-story-static-asset-with-import.mdx.mdx b/docs/snippets/svelte/component-story-static-asset-with-import.mdx.mdx deleted file mode 100644 index 0b688fa554de..000000000000 --- a/docs/snippets/svelte/component-story-static-asset-with-import.mdx.mdx +++ /dev/null @@ -1,29 +0,0 @@ -```md - - -import { Meta, Story } from '@storybook/addon-docs'; - -import MyComponent from './MyComponent.svelte'; - -import imageFile from './static/image.png'; - - - - - -export const image = { - src: imageFile, - alt: 'my image', -}; - - ({ - Component: MyComponent, - props: image - })} /> -``` \ No newline at end of file diff --git a/docs/snippets/svelte/component-story-static-asset-with-import.ts-4-9.mdx b/docs/snippets/svelte/component-story-static-asset-with-import.ts-4-9.mdx new file mode 100644 index 000000000000..bc8eb9d4688c --- /dev/null +++ b/docs/snippets/svelte/component-story-static-asset-with-import.ts-4-9.mdx @@ -0,0 +1,28 @@ +```ts +// MyComponent.stories.ts + +import type { Meta, StoryObj } from '@storybook/svelte'; + +import MyComponent from './MyComponent.svelte'; + +import imageFile from './static/image.png'; + +const meta = { + component: MyComponent, +} satisfies Meta; + +export default meta; +type Story = StoryObj; + +const image = { + src: imageFile, + alt: 'my image', +}; + +export const WithAnImage: Story = { + render: () => ({ + Component: MyComponent, + props: image, + }), +}; +``` diff --git a/docs/snippets/svelte/component-story-static-asset-with-import.ts.mdx b/docs/snippets/svelte/component-story-static-asset-with-import.ts.mdx new file mode 100644 index 000000000000..9014220f808c --- /dev/null +++ b/docs/snippets/svelte/component-story-static-asset-with-import.ts.mdx @@ -0,0 +1,28 @@ +```ts +// MyComponent.stories.ts + +import type { Meta, StoryObj } from '@storybook/svelte'; + +import MyComponent from './MyComponent.svelte'; + +import imageFile from './static/image.png'; + +const meta: Meta = { + component: MyComponent, +}; + +export default meta; +type Story = StoryObj; + +const image = { + src: imageFile, + alt: 'my image', +}; + +export const WithAnImage: Story = { + render: () => ({ + Component: MyComponent, + props: image, + }), +}; +``` diff --git a/docs/snippets/svelte/component-story-static-asset-without-import.mdx.mdx b/docs/snippets/svelte/component-story-static-asset-without-import.mdx.mdx deleted file mode 100644 index 5d7141fd087e..000000000000 --- a/docs/snippets/svelte/component-story-static-asset-without-import.mdx.mdx +++ /dev/null @@ -1,21 +0,0 @@ -```md - - -import { Meta, Story } from '@storybook/addon-docs'; - -import MyComponent from './MyComponent.svelte0; - - - - - - ({ - Component: MyComponent, - props: { - src: '/image.png', - alt: 'my image', - }, - })} /> -``` \ No newline at end of file diff --git a/docs/snippets/svelte/component-story-static-asset-without-import.ts-4-9.mdx b/docs/snippets/svelte/component-story-static-asset-without-import.ts-4-9.mdx new file mode 100644 index 000000000000..894af1a2f567 --- /dev/null +++ b/docs/snippets/svelte/component-story-static-asset-without-import.ts-4-9.mdx @@ -0,0 +1,25 @@ +```ts +// MyComponent.stories.ts + +import type { Meta, StoryObj } from '@storybook/svelte'; + +import MyComponent from './MyComponent.svelte'; + +const meta = { + component: MyComponent, +} satisfies Meta; + +export default meta; +type Story = StoryObj; + +// Assume image.png is located in the "public" directory. +export const WithAnImage: Story = { + render: () => ({ + Component: MyComponent, + props: { + src: '/image.png', + alt: 'my image', + }, + }), +}; +``` diff --git a/docs/snippets/svelte/component-story-static-asset-without-import.ts.mdx b/docs/snippets/svelte/component-story-static-asset-without-import.ts.mdx new file mode 100644 index 000000000000..cfc54fb20623 --- /dev/null +++ b/docs/snippets/svelte/component-story-static-asset-without-import.ts.mdx @@ -0,0 +1,25 @@ +```ts +// MyComponent.stories.ts + +import type { Meta, StoryObj } from '@storybook/svelte'; + +import MyComponent from './MyComponent.svelte'; + +const meta: Meta = { + component: MyComponent, +}; + +export default meta; +type Story = StoryObj; + +// Assume image.png is located in the "public" directory. +export const WithAnImage: Story = { + render: () => ({ + Component: MyComponent, + props: { + src: '/image.png', + alt: 'my image', + }, + }), +}; +``` diff --git a/docs/snippets/svelte/component-story-with-accessibility.mdx.mdx b/docs/snippets/svelte/component-story-with-accessibility.mdx.mdx deleted file mode 100644 index 173dc60e1691..000000000000 --- a/docs/snippets/svelte/component-story-with-accessibility.mdx.mdx +++ /dev/null @@ -1,51 +0,0 @@ -```md - - -import { Meta, Story } from '@storybook/addon-docs'; - -import Button from './Button.svelte'; - - - - - -## This is an accessible story - - ({ - Component: Button, - props: args, - })} /> - -## This is not - - ({ - Component: Button, - props: args, - })} /> -``` \ No newline at end of file diff --git a/docs/snippets/svelte/component-story-with-accessibility.ts-4-9.mdx b/docs/snippets/svelte/component-story-with-accessibility.ts-4-9.mdx new file mode 100644 index 000000000000..fd54dd1393c1 --- /dev/null +++ b/docs/snippets/svelte/component-story-with-accessibility.ts-4-9.mdx @@ -0,0 +1,33 @@ +```ts +// Button.stories.ts + +import type { Meta, StoryObj } from '@storybook/svelte'; + +import Button from './Button.svelte'; + +const meta = { + component: Button, + argTypes: { + backgroundColor: { control: 'color' }, + }, +} satisfies Meta; + +export default meta; +type Story = StoryObj; + +// This is an accessible story +export const Accessible: Story = { + args: { + primary: false, + label: 'Button', + }, +}; + +// This is not +export const Inaccessible: Story = { + args: { + ...Accessible.args, + backgroundColor: 'red', + }, +}; +``` diff --git a/docs/snippets/svelte/component-story-with-accessibility.ts.mdx b/docs/snippets/svelte/component-story-with-accessibility.ts.mdx new file mode 100644 index 000000000000..c66dc1afb6e3 --- /dev/null +++ b/docs/snippets/svelte/component-story-with-accessibility.ts.mdx @@ -0,0 +1,33 @@ +```ts +// Button.stories.ts + +import type { Meta, StoryObj } from '@storybook/svelte'; + +import Button from './Button.svelte'; + +const meta: Meta = { + component: Button, + argTypes: { + backgroundColor: { control: 'color' }, + }, +}; + +export default meta; +type Story = StoryObj; + +// This is an accessible story +export const Accessible: Story = { + args: { + primary: false, + label: 'Button', + }, +}; + +// This is not +export const Inaccessible: Story = { + args: { + ...Accessible.args, + backgroundColor: 'red', + }, +}; +``` diff --git a/docs/snippets/svelte/component-test-with-testing-library.js.mdx b/docs/snippets/svelte/component-test-with-testing-library.js.mdx index f7e1702c3451..cd3da15a6bfc 100644 --- a/docs/snippets/svelte/component-test-with-testing-library.js.mdx +++ b/docs/snippets/svelte/component-test-with-testing-library.js.mdx @@ -1,5 +1,5 @@ ```js -// Form.test.js +// Form.test.js|ts import { render, fireEvent } from '@testing-library/svelte'; diff --git a/docs/snippets/svelte/csf-2-example-starter.js.mdx b/docs/snippets/svelte/csf-2-example-starter.js.mdx new file mode 100644 index 000000000000..025761271718 --- /dev/null +++ b/docs/snippets/svelte/csf-2-example-starter.js.mdx @@ -0,0 +1,16 @@ +```js +// Button.stories.js + +import Button from './Button.svelte'; + +export default { + title: 'Button', + component: Button, +}; + +export const Primary = (args) => ({ + Component: Button, + props: args, +}); +Primary.args = { primary: true }; +``` diff --git a/docs/snippets/svelte/csf-2-example-starter.ts.mdx b/docs/snippets/svelte/csf-2-example-starter.ts.mdx new file mode 100644 index 000000000000..67f72c6419ce --- /dev/null +++ b/docs/snippets/svelte/csf-2-example-starter.ts.mdx @@ -0,0 +1,18 @@ +```ts +// Button.stories.ts + +import type { Meta, StoryFn } from '@storybook/svelte'; + +import Button from './Button.svelte'; + +export default { + title: 'Button', + component: Button, +} as Meta; + +export const Primary: StoryFn = (args) => ({ + Component: Button, + props: args, +}); +Primary.args = { primary: true }; +``` diff --git a/docs/snippets/svelte/csf-2-example-story.js.mdx b/docs/snippets/svelte/csf-2-example-story.js.mdx new file mode 100644 index 000000000000..31654612ae2b --- /dev/null +++ b/docs/snippets/svelte/csf-2-example-story.js.mdx @@ -0,0 +1,9 @@ +```js +// CSF 2 + +// Other imports and story implementation +export const Default = (args) => ({ + Component: Button, + props: args, +}); +``` diff --git a/docs/snippets/svelte/csf-2-example-story.ts.mdx b/docs/snippets/svelte/csf-2-example-story.ts.mdx new file mode 100644 index 000000000000..3d479ca132fc --- /dev/null +++ b/docs/snippets/svelte/csf-2-example-story.ts.mdx @@ -0,0 +1,9 @@ +```ts +// CSF 2 + +// Other imports and story implementation +export const Primary: StoryFn = (args) => ({ + Component: Button, + props: args, +}); +``` diff --git a/docs/snippets/svelte/csf-3-example-render.js.mdx b/docs/snippets/svelte/csf-3-example-render.js.mdx new file mode 100644 index 000000000000..bf3cd564a422 --- /dev/null +++ b/docs/snippets/svelte/csf-3-example-render.js.mdx @@ -0,0 +1,11 @@ +```js +// CSF 3 - explicit render function + +// Other imports and story implementation +export const Default = { + render: (args) => ({ + Component: Button, + props: args, + }); +}; +``` diff --git a/docs/snippets/svelte/csf-3-example-render.ts.mdx b/docs/snippets/svelte/csf-3-example-render.ts.mdx new file mode 100644 index 000000000000..ea8603bdcf9a --- /dev/null +++ b/docs/snippets/svelte/csf-3-example-render.ts.mdx @@ -0,0 +1,11 @@ +```ts +// CSF 3 - explicit render function + +// Other imports and story implementation +export const Default: Story = { + render: (args) => ({ + Component: Button, + props: args, + }), +}; +``` diff --git a/docs/snippets/svelte/csf-3-example-starter.ts.mdx b/docs/snippets/svelte/csf-3-example-starter.ts.mdx new file mode 100644 index 000000000000..70a4585e5192 --- /dev/null +++ b/docs/snippets/svelte/csf-3-example-starter.ts.mdx @@ -0,0 +1,14 @@ +```ts +// Button.stories.ts + +import type { Meta, StoryObj } from '@storybook/svelte'; + +import Button from './Button.svelte'; + +const meta: Meta = { component: Button }; +export default meta; + +type Story = StoryObj; + +export const Primary: Story = { args: { primary: true } }; +``` diff --git a/docs/snippets/svelte/document-screen-fetch.js.mdx b/docs/snippets/svelte/document-screen-fetch.js.mdx index b50d0bc021bd..e36bec8be30b 100644 --- a/docs/snippets/svelte/document-screen-fetch.js.mdx +++ b/docs/snippets/svelte/document-screen-fetch.js.mdx @@ -7,6 +7,7 @@ import PageLayout from './PageLayout.svelte'; import DocumentHeader from './DocumentHeader.svelte'; import DocumentList from './DocumentList.svelte'; + export let user = {}; export let document = {}; export let subdocuments = []; @@ -35,7 +36,7 @@ {#if status === "error"}

There was an error fetching the data!

-{/if} {#if status === "loading"} +{:else if status === "loading"}

Loading...

{:else} diff --git a/docs/snippets/svelte/document-screen-fetch.ts.mdx b/docs/snippets/svelte/document-screen-fetch.ts.mdx new file mode 100644 index 000000000000..a64fa476ccad --- /dev/null +++ b/docs/snippets/svelte/document-screen-fetch.ts.mdx @@ -0,0 +1,47 @@ +```html + + + + +{#if status === "error"} +

There was an error fetching the data!

+{:else if status === "loading"} +

Loading...

+{:else} + + + + +{/if} +``` diff --git a/docs/snippets/svelte/document-screen-with-grapqhl.ts.mdx b/docs/snippets/svelte/document-screen-with-grapqhl.ts.mdx new file mode 100644 index 000000000000..df975e9da4b3 --- /dev/null +++ b/docs/snippets/svelte/document-screen-with-grapqhl.ts.mdx @@ -0,0 +1,46 @@ +```html + + + + +{#if $infoResult.loading} +

Loading...

+{:else if $infoResult.error} +

There was an error fetching the data!

+{:else} + + + + +{/if} +``` diff --git a/docs/snippets/svelte/documentscreen-story-msw-graphql-query.js.mdx b/docs/snippets/svelte/documentscreen-story-msw-graphql-query.js.mdx index 7f44a194d27d..2ef38ef65b84 100644 --- a/docs/snippets/svelte/documentscreen-story-msw-graphql-query.js.mdx +++ b/docs/snippets/svelte/documentscreen-story-msw-graphql-query.js.mdx @@ -8,7 +8,7 @@ import MockApolloWrapperClient from './MockApolloWrapperClient.svelte'; export default { component: DocumentScreen, - decorators: [() => MockGraphqlProvider], + decorators: [() => MockApolloWrapperClient], }; //πŸ‘‡The mocked data that will be used in the story diff --git a/docs/snippets/svelte/documentscreen-story-msw-graphql-query.ts-4-9.mdx b/docs/snippets/svelte/documentscreen-story-msw-graphql-query.ts-4-9.mdx new file mode 100644 index 000000000000..ab72000499cd --- /dev/null +++ b/docs/snippets/svelte/documentscreen-story-msw-graphql-query.ts-4-9.mdx @@ -0,0 +1,70 @@ +```ts +// YourPage.stories.ts + +import type { Meta, StoryObj } from '@storybook/svelte'; + +import { graphql } from 'msw'; + +import DocumentScreen from './YourPage.svelte'; +import MockApolloWrapperClient from './MockApolloWrapperClient.svelte'; + +const meta = { + component: DocumentScreen, + decorators: [() => MockApolloWrapperClient], +} satisfies Meta; + +export default meta; +type Story = StoryObj; + +//πŸ‘‡The mocked data that will be used in the story +const TestData = { + user: { + userID: 1, + name: 'Someone', + }, + document: { + id: 1, + userID: 1, + title: 'Something', + brief: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.', + status: 'approved', + }, + subdocuments: [ + { + id: 1, + userID: 1, + title: 'Something', + content: + 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', + status: 'approved', + }, + ], +}; + +export const MockedSuccess: Story = { + parameters: { + msw: [ + graphql.query('AllInfoQuery', (req, res, ctx) => { + return res(ctx.data(TestData)); + }), + ], + }, +}; + +export const MockedError: Story = { + parameters: { + msw: [ + graphql.query('AllInfoQuery', (req, res, ctx) => { + return res( + ctx.delay(800), + ctx.errors([ + { + message: 'Access denied', + }, + ]) + ); + }), + ], + }, +}; +``` diff --git a/docs/snippets/svelte/documentscreen-story-msw-graphql-query.ts.mdx b/docs/snippets/svelte/documentscreen-story-msw-graphql-query.ts.mdx new file mode 100644 index 000000000000..c61204cfd1ab --- /dev/null +++ b/docs/snippets/svelte/documentscreen-story-msw-graphql-query.ts.mdx @@ -0,0 +1,70 @@ +```ts +// YourPage.stories.ts + +import type { Meta, StoryObj } from '@storybook/svelte'; + +import { graphql } from 'msw'; + +import DocumentScreen from './YourPage.svelte'; +import MockApolloWrapperClient from './MockApolloWrapperClient.svelte'; + +const meta: Meta = { + component: DocumentScreen, + decorators: [() => MockApolloWrapperClient], +}; + +export default meta; +type Story = StoryObj; + +//πŸ‘‡The mocked data that will be used in the story +const TestData = { + user: { + userID: 1, + name: 'Someone', + }, + document: { + id: 1, + userID: 1, + title: 'Something', + brief: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.', + status: 'approved', + }, + subdocuments: [ + { + id: 1, + userID: 1, + title: 'Something', + content: + 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', + status: 'approved', + }, + ], +}; + +export const MockedSuccess: Story = { + parameters: { + msw: [ + graphql.query('AllInfoQuery', (req, res, ctx) => { + return res(ctx.data(TestData)); + }), + ], + }, +}; + +export const MockedError: Story = { + parameters: { + msw: [ + graphql.query('AllInfoQuery', (req, res, ctx) => { + return res( + ctx.delay(800), + ctx.errors([ + { + message: 'Access denied', + }, + ]) + ); + }), + ], + }, +}; +``` diff --git a/docs/snippets/svelte/histogram-story.mdx.mdx b/docs/snippets/svelte/histogram-story.mdx.mdx deleted file mode 100644 index c17806227f8d..000000000000 --- a/docs/snippets/svelte/histogram-story.mdx.mdx +++ /dev/null @@ -1,30 +0,0 @@ -```md - - -import { Canvas, Meta, Story } from '@storybook/addon-docs'; - -import Histogram from './Histogram.svelte'; - - - - - - - ({ - Component: Histogram, - props: args, - })} /> - -``` \ No newline at end of file diff --git a/docs/snippets/svelte/loader-story.mdx.mdx b/docs/snippets/svelte/loader-story.mdx.mdx deleted file mode 100644 index d6cc1e15fb76..000000000000 --- a/docs/snippets/svelte/loader-story.mdx.mdx +++ /dev/null @@ -1,34 +0,0 @@ -```md - - -import { Meta, Story } from '@storybook/addon-docs'; - -import TodoItem from './TodoItem.svelte'; - -import fetch from 'node-fetch'; - - - - - - ({ - todo: await ( - await fetch('https://jsonplaceholder.typicode.com/todos/1') - ).json(), - }), - ]} - render={(args, { loaded: { todo } }) => ({ - Component: TodoItem, - props: { - ...args, - todo, - }, - })} /> -``` \ No newline at end of file diff --git a/docs/snippets/svelte/loader-story.ts-4-9.mdx b/docs/snippets/svelte/loader-story.ts-4-9.mdx new file mode 100644 index 000000000000..3a0c52903ec4 --- /dev/null +++ b/docs/snippets/svelte/loader-story.ts-4-9.mdx @@ -0,0 +1,36 @@ +```ts +// TodoItem.stories.ts + +import type { Meta, StoryObj } from '@storybook/svelte'; + +import fetch from 'node-fetch'; + +import TodoItem from './TodoItem.svelte'; + +/* + *πŸ‘‡ Render functions are a framework specific feature to allow you control on how the component renders. + * See https://storybook.js.org/docs/svelte/api/csf + * to learn how to use render functions. + */ +const meta = { + component: TodoItem, + render: (args, { loaded: { todo } }) => ({ + Component: TodoItem, + props: { + ...args, + ...todo, + }, + }), +} satisfies Meta; + +export default meta; +type Story = StoryObj; + +export const Primary: Story = { + loaders: [ + async () => ({ + todo: await (await fetch('https://jsonplaceholder.typicode.com/todos/1')).json(), + }), + ], +}; +``` diff --git a/docs/snippets/svelte/loader-story.ts.mdx b/docs/snippets/svelte/loader-story.ts.mdx new file mode 100644 index 000000000000..5bea2892ef0c --- /dev/null +++ b/docs/snippets/svelte/loader-story.ts.mdx @@ -0,0 +1,36 @@ +```ts +// TodoItem.stories.ts + +import type { Meta, StoryObj } from '@storybook/svelte'; + +import fetch from 'node-fetch'; + +import TodoItem from './TodoItem.svelte'; + +/* + *πŸ‘‡ Render functions are a framework specific feature to allow you control on how the component renders. + * See https://storybook.js.org/docs/svelte/api/csf + * to learn how to use render functions. + */ +const meta: Meta = { + component: TodoItem, + render: (args, { loaded: { todo } }) => ({ + Component: TodoItem, + props: { + ...args, + ...todo, + }, + }), +}; + +export default meta; +type Story = StoryObj; + +export const Primary: Story = { + loaders: [ + async () => ({ + todo: await (await fetch('https://jsonplaceholder.typicode.com/todos/1')).json(), + }), + ], +}; +``` diff --git a/docs/snippets/svelte/login-form-with-play-function.js.mdx b/docs/snippets/svelte/login-form-with-play-function.js.mdx index c0fbce4a48fc..a73d16222c61 100644 --- a/docs/snippets/svelte/login-form-with-play-function.js.mdx +++ b/docs/snippets/svelte/login-form-with-play-function.js.mdx @@ -1,7 +1,8 @@ ```js // LoginForm.stories.js -import { userEvent, within, expect } from '@storybook/test'; +import { userEvent, within } from '@storybook/testing-library'; +import { expect } from '@storybook/jest'; import LoginForm from './LoginForm.svelte'; @@ -9,27 +10,13 @@ export default { component: LoginForm, }; -/* - *πŸ‘‡ Render functions are a framework specific feature to allow you control on how the component renders. - * See https://storybook.js.org/docs/api/csf - * to learn how to use render functions. - */ -export const EmptyForm = { - render: (args) => ({ - Component: LoginForm, - props: args, - }), -}; +export const EmptyForm = {}; /* * See https://storybook.js.org/docs/writing-stories/play-function#working-with-the-canvas * to learn more about using the canvasElement to query the DOM */ export const FilledForm = { - render: (args) => ({ - Component: LoginForm, - props: args, - }), play: async ({ canvasElement }) => { const canvas = within(canvasElement); diff --git a/docs/snippets/svelte/login-form-with-play-function.mdx.mdx b/docs/snippets/svelte/login-form-with-play-function.mdx.mdx deleted file mode 100644 index bc4fca63ad11..000000000000 --- a/docs/snippets/svelte/login-form-with-play-function.mdx.mdx +++ /dev/null @@ -1,53 +0,0 @@ -```md - - -import { Canvas, Meta, Story } from '@storybook/addon-docs'; - -import { within, userEvent } from '@storybook/testing-library'; - -import { expect } from '@storybook/jest'; - -import LoginForm from './LoginForm.svelte'; - - - - - - - ({ - Component: LoginForm, - props: args, - })} /> - ({ - Component: LoginForm, - props: args, - })} - play={ async ({ canvasElement }) => { - // Starts querying the component from its root element - const canvas = within(canvasElement); - - // πŸ‘‡ Simulate interactions - await userEvent.type(canvas.getByTestId('email'), 'email@provider.com'); - - await userEvent.type(canvas.getByTestId('password'), 'a-random-password'); - - // See https://storybook.js.org/docs/essentials/actions#automatically-matching-args to learn how to setup logging in the Actions panel - await userEvent.click(canvas.getByRole('button')); - - // πŸ‘‡ Assert DOM structure - await expect( - canvas.getByText( - 'Everything is perfect. Your account is ready and we should probably get you started!' - ) - ).toBeInTheDocument(); - }} /> - -``` \ No newline at end of file diff --git a/docs/snippets/svelte/login-form-with-play-function.ts-4-9.mdx b/docs/snippets/svelte/login-form-with-play-function.ts-4-9.mdx new file mode 100644 index 000000000000..6b4da3545731 --- /dev/null +++ b/docs/snippets/svelte/login-form-with-play-function.ts-4-9.mdx @@ -0,0 +1,43 @@ +```ts +// LoginForm.stories.ts + +import type { Meta, StoryObj } from '@storybook/svelte'; +import { userEvent, within } from '@storybook/testing-library'; +import { expect } from '@storybook/jest'; + +import LoginForm from './LoginForm.svelte'; + +const meta = { + component: LoginForm, +} satisfies Meta; + +export default meta; +type Story = StoryObj; + +export const EmptyForm: Story = {}; + +/* + * See https://storybook.js.org/docs/writing-stories/play-function#working-with-the-canvas + * to learn more about using the canvasElement to query the DOM + */ +export const FilledForm: Story = { + play: async ({ canvasElement }) => { + const canvas = within(canvasElement); + + // πŸ‘‡ Simulate interactions with the component + await userEvent.type(canvas.getByTestId('email'), 'email@provider.com'); + + await userEvent.type(canvas.getByTestId('password'), 'a-random-password'); + + // See https://storybook.js.org/docs/essentials/actions#automatically-matching-args to learn how to setup logging in the Actions panel + await userEvent.click(canvas.getByRole('button')); + + // πŸ‘‡ Assert DOM structure + await expect( + canvas.getByText( + 'Everything is perfect. Your account is ready and we should probably get you started!' + ) + ).toBeInTheDocument(); + }, +}; +``` diff --git a/docs/snippets/svelte/login-form-with-play-function.ts.mdx b/docs/snippets/svelte/login-form-with-play-function.ts.mdx new file mode 100644 index 000000000000..c89d3591d6d8 --- /dev/null +++ b/docs/snippets/svelte/login-form-with-play-function.ts.mdx @@ -0,0 +1,43 @@ +```ts +// LoginForm.stories.ts + +import type { Meta, StoryObj } from '@storybook/svelte'; +import { userEvent, within } from '@storybook/testing-library'; +import { expect } from '@storybook/jest'; + +import LoginForm from './LoginForm.svelte'; + +const meta: Meta = { + component: LoginForm, +}; + +export default meta; +type Story = StoryObj; + +export const EmptyForm: Story = {}; + +/* + * See https://storybook.js.org/docs/writing-stories/play-function#working-with-the-canvas + * to learn more about using the canvasElement to query the DOM + */ +export const FilledForm: Story = { + play: async ({ canvasElement }) => { + const canvas = within(canvasElement); + + // πŸ‘‡ Simulate interactions with the component + await userEvent.type(canvas.getByTestId('email'), 'email@provider.com'); + + await userEvent.type(canvas.getByTestId('password'), 'a-random-password'); + + // See https://storybook.js.org/docs/essentials/actions#automatically-matching-args to learn how to setup logging in the Actions panel + await userEvent.click(canvas.getByRole('button')); + + // πŸ‘‡ Assert DOM structure + await expect( + canvas.getByText( + 'Everything is perfect. Your account is ready and we should probably get you started!' + ) + ).toBeInTheDocument(); + }, +}; +``` diff --git a/docs/snippets/svelte/margindecorator.with-margin-component.js.mdx b/docs/snippets/svelte/margindecorator.with-margin-component.js.mdx new file mode 100644 index 000000000000..c7a129062935 --- /dev/null +++ b/docs/snippets/svelte/margindecorator.with-margin-component.js.mdx @@ -0,0 +1,13 @@ +```html + + +
+ +
+ + +``` diff --git a/docs/snippets/svelte/margindecorator.with-margin-component.ts.mdx b/docs/snippets/svelte/margindecorator.with-margin-component.ts.mdx new file mode 100644 index 000000000000..c7a129062935 --- /dev/null +++ b/docs/snippets/svelte/margindecorator.with-margin-component.ts.mdx @@ -0,0 +1,13 @@ +```html + + +
+ +
+ + +``` diff --git a/docs/snippets/svelte/mdx-canvas-multiple-stories.mdx.mdx b/docs/snippets/svelte/mdx-canvas-multiple-stories.mdx.mdx deleted file mode 100644 index 09c2626f435f..000000000000 --- a/docs/snippets/svelte/mdx-canvas-multiple-stories.mdx.mdx +++ /dev/null @@ -1,48 +0,0 @@ -```md - - -import { Canvas, Meta, Story } from '@storybook/addon-docs'; - -import Badge from './Badge.svelte'; - - - - - - - ({ - Component: Badge, - props: args, - })} /> - ({ - Component: Badge, - props: args, - })} /> - ({ - Component: Badge, - props: args, - })} /> - -``` diff --git a/docs/snippets/svelte/my-component-story-basic-and-props.js.mdx b/docs/snippets/svelte/my-component-story-basic-and-props.js.mdx index baaf11c2767c..42e11888b759 100644 --- a/docs/snippets/svelte/my-component-story-basic-and-props.js.mdx +++ b/docs/snippets/svelte/my-component-story-basic-and-props.js.mdx @@ -7,12 +7,13 @@ export default { component: MyComponent, }; -export const Basic = { - render: () => ({ - Component: MyComponent, - }), -}; +export const Basic = {}; +/* + *πŸ‘‡ Render functions are a framework specific feature to allow you control on how the component renders. + * See https://storybook.js.org/docs/api/csf + * to learn how to use render functions. + */ export const WithProp = { render: () => ({ Component: MyComponent, diff --git a/docs/snippets/svelte/my-component-story-basic-and-props.ts-4-9.mdx b/docs/snippets/svelte/my-component-story-basic-and-props.ts-4-9.mdx new file mode 100644 index 000000000000..486fd96d1ceb --- /dev/null +++ b/docs/snippets/svelte/my-component-story-basic-and-props.ts-4-9.mdx @@ -0,0 +1,30 @@ +```ts +// MyComponent.stories.ts + +import type { Meta, StoryObj } from '@storybook/svelte'; + +import MyComponent from './MyComponent.svelte'; + +const meta = { + component: MyComponent, +} satisfies Meta; + +export default meta; +type Story = StoryObj; + +export const Basic: Story = {}; + +/* + *πŸ‘‡ Render functions are a framework specific feature to allow you control on how the component renders. + * See https://storybook.js.org/docs/api/csf + * to learn how to use render functions. + */ +export const WithProp: Story = { + render: () => ({ + Component: MyComponent, + props: { + prop: 'value', + }, + }), +}; +``` diff --git a/docs/snippets/svelte/my-component-story-basic-and-props.ts.mdx b/docs/snippets/svelte/my-component-story-basic-and-props.ts.mdx new file mode 100644 index 000000000000..ad985f99262e --- /dev/null +++ b/docs/snippets/svelte/my-component-story-basic-and-props.ts.mdx @@ -0,0 +1,30 @@ +```ts +// MyComponent.stories.ts + +import type { Meta, StoryObj } from '@storybook/svelte'; + +import MyComponent from './MyComponent.svelte'; + +const meta: Meta = { + component: MyComponent, +}; + +export default meta; +type Story = StoryObj; + +export const Basic: Story = {}; + +/* + *πŸ‘‡ Render functions are a framework specific feature to allow you control on how the component renders. + * See https://storybook.js.org/docs/api/csf + * to learn how to use render functions. + */ +export const WithProp: Story = { + render: () => ({ + Component: MyComponent, + props: { + prop: 'value', + }, + }), +}; +``` diff --git a/docs/snippets/svelte/my-component-story-configure-viewports.js.mdx b/docs/snippets/svelte/my-component-story-configure-viewports.js.mdx index 075779bbb1bb..856aed93e83b 100644 --- a/docs/snippets/svelte/my-component-story-configure-viewports.js.mdx +++ b/docs/snippets/svelte/my-component-story-configure-viewports.js.mdx @@ -19,9 +19,6 @@ export default { }; export const MyStory = { - render: () => ({ - Component: MyComponent, - }), parameters: { viewport: { defaultViewport: 'iphonex', diff --git a/docs/snippets/svelte/my-component-story-configure-viewports.mdx.mdx b/docs/snippets/svelte/my-component-story-configure-viewports.mdx.mdx deleted file mode 100644 index b3b0ee79076e..000000000000 --- a/docs/snippets/svelte/my-component-story-configure-viewports.mdx.mdx +++ /dev/null @@ -1,37 +0,0 @@ -```md - - -import { Meta, Story } from '@storybook/addon-docs'; - -import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport'; - -import MyComponent from './MyComponent.svelte'; - - - - - - ({ - Component: MyComponent, - props: {}, - })} /> -``` \ No newline at end of file diff --git a/docs/snippets/svelte/my-component-story-configure-viewports.ts-4-9.mdx b/docs/snippets/svelte/my-component-story-configure-viewports.ts-4-9.mdx new file mode 100644 index 000000000000..2395d688fb55 --- /dev/null +++ b/docs/snippets/svelte/my-component-story-configure-viewports.ts-4-9.mdx @@ -0,0 +1,32 @@ +```ts +// MyComponent.stories.ts + +import type { Meta, StoryObj } from '@storybook/svelte'; +import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport'; + +import MyComponent from './MyComponent.svelte'; + +const meta = { + component: MyComponent, + parameters: { + //πŸ‘‡ The viewports object from the Essentials addon + viewport: { + //πŸ‘‡ The viewports you want to use + viewports: INITIAL_VIEWPORTS, + //πŸ‘‡ Your own default viewport + defaultViewport: 'iphone6', + }, + }, +} satisfies Meta; + +export default meta; +type Story = StoryObj; + +export const MyStory: Story = { + parameters: { + viewport: { + defaultViewport: 'iphonex', + }, + }, +}; +``` diff --git a/docs/snippets/svelte/my-component-story-configure-viewports.ts.mdx b/docs/snippets/svelte/my-component-story-configure-viewports.ts.mdx new file mode 100644 index 000000000000..93ab5bcf7ae0 --- /dev/null +++ b/docs/snippets/svelte/my-component-story-configure-viewports.ts.mdx @@ -0,0 +1,32 @@ +```ts +// MyComponent.stories.ts + +import type { Meta, StoryObj } from '@storybook/svelte'; +import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport'; + +import MyComponent from './MyComponent.svelte'; + +const meta: Meta = { + component: MyComponent, + parameters: { + //πŸ‘‡ The viewports object from the Essentials addon + viewport: { + //πŸ‘‡ The viewports you want to use + viewports: INITIAL_VIEWPORTS, + //πŸ‘‡ Your own default viewport + defaultViewport: 'iphone6', + }, + }, +}; + +export default meta; +type Story = StoryObj; + +export const MyStory: Story = { + parameters: { + viewport: { + defaultViewport: 'iphonex', + }, + }, +}; +``` diff --git a/docs/snippets/svelte/my-component-story-use-globaltype-backwards-compat.js.mdx b/docs/snippets/svelte/my-component-story-use-globaltype-backwards-compat.js.mdx index 8ee73b34422d..c25aa876eb7d 100644 --- a/docs/snippets/svelte/my-component-story-use-globaltype-backwards-compat.js.mdx +++ b/docs/snippets/svelte/my-component-story-use-globaltype-backwards-compat.js.mdx @@ -4,7 +4,7 @@ export const StoryWithLocale = ({ globals: { locale } }) => { const caption = getCaptionForLocale(locale); return { - component: MyComponent, + Component: MyComponent, props: { locale: caption, }, diff --git a/docs/snippets/svelte/my-component-story-use-globaltype-backwards-compat.ts-4-9.mdx b/docs/snippets/svelte/my-component-story-use-globaltype-backwards-compat.ts-4-9.mdx new file mode 100644 index 000000000000..f48fa95463e0 --- /dev/null +++ b/docs/snippets/svelte/my-component-story-use-globaltype-backwards-compat.ts-4-9.mdx @@ -0,0 +1,13 @@ +```ts +// MyComponent.stories.ts + +export const StoryWithLocale: Story = ({ globals: { locale } }) => { + const caption = getCaptionForLocale(locale); + return { + Component: MyComponent, + props: { + locale: caption, + }, + }; +}; +``` diff --git a/docs/snippets/svelte/my-component-story-use-globaltype-backwards-compat.ts.mdx b/docs/snippets/svelte/my-component-story-use-globaltype-backwards-compat.ts.mdx new file mode 100644 index 000000000000..f48fa95463e0 --- /dev/null +++ b/docs/snippets/svelte/my-component-story-use-globaltype-backwards-compat.ts.mdx @@ -0,0 +1,13 @@ +```ts +// MyComponent.stories.ts + +export const StoryWithLocale: Story = ({ globals: { locale } }) => { + const caption = getCaptionForLocale(locale); + return { + Component: MyComponent, + props: { + locale: caption, + }, + }; +}; +``` diff --git a/docs/snippets/svelte/my-component-story-use-globaltype.js.mdx b/docs/snippets/svelte/my-component-story-use-globaltype.js.mdx index 176e9cae2381..8542b37240a7 100644 --- a/docs/snippets/svelte/my-component-story-use-globaltype.js.mdx +++ b/docs/snippets/svelte/my-component-story-use-globaltype.js.mdx @@ -26,7 +26,7 @@ export const StoryWithLocale = { render: (args, { globals: { locale } }) => { const caption = getCaptionForLocale(locale); return { - component: MyComponent, + Component: MyComponent, props: { locale: caption, }, diff --git a/docs/snippets/svelte/my-component-story-use-globaltype.mdx.mdx b/docs/snippets/svelte/my-component-story-use-globaltype.mdx.mdx deleted file mode 100644 index 56de0d43fdc5..000000000000 --- a/docs/snippets/svelte/my-component-story-use-globaltype.mdx.mdx +++ /dev/null @@ -1,38 +0,0 @@ -```md - - -import { Meta, Story } from '@storybook/addon-docs'; - -import MyComponent from './MyComponent.svelte'; - - - -export const getCaptionForLocale = (locale) => { - switch(locale) { - case 'es': return 'Hola!'; - case 'fr': return 'Bonjour!'; - case 'kr': return 'μ•ˆλ…•ν•˜μ„Έμš”!'; - case 'zh': return 'δ½ ε₯½!'; - default: - return 'Hello!'; - } -}; - - - - { - const caption = getCaptionForLocale(locale); - return { - component: MyComponent, - props: { - locale: caption, - }, - }; - }} /> -``` \ No newline at end of file diff --git a/docs/snippets/svelte/my-component-story-use-globaltype.ts-4-9.mdx b/docs/snippets/svelte/my-component-story-use-globaltype.ts-4-9.mdx new file mode 100644 index 000000000000..59e0feecc847 --- /dev/null +++ b/docs/snippets/svelte/my-component-story-use-globaltype.ts-4-9.mdx @@ -0,0 +1,41 @@ +```ts +// MyComponent.stories.ts + +import type { Meta, StoryObj } from '@storybook/svelte'; + +import MyComponent from './YourComponent.svelte'; + +const meta = { + component: MyComponent, +} satisfies Meta; + +export default meta; +type Story = StoryObj; + +const getCaptionForLocale = (locale) => { + switch (locale) { + case 'es': + return 'Hola!'; + case 'fr': + return 'Bonjour!'; + case 'kr': + return 'μ•ˆλ…•ν•˜μ„Έμš”!'; + case 'zh': + return 'δ½ ε₯½!'; + default: + return 'Hello!'; + } +}; + +export const StoryWithLocale: Story = { + render: (args, { globals: { locale } }) => { + const caption = getCaptionForLocale(locale); + return { + Component: MyComponent, + props: { + locale: caption, + }, + }; + }, +}; +``` diff --git a/docs/snippets/svelte/my-component-story-use-globaltype.ts.mdx b/docs/snippets/svelte/my-component-story-use-globaltype.ts.mdx new file mode 100644 index 000000000000..88847d3d9011 --- /dev/null +++ b/docs/snippets/svelte/my-component-story-use-globaltype.ts.mdx @@ -0,0 +1,41 @@ +```ts +// MyComponent.stories.ts + +import type { Meta, StoryObj } from '@storybook/svelte'; + +import MyComponent from './YourComponent.svelte'; + +const meta: Meta = { + component: MyComponent, +}; + +export default meta; +type Story = StoryObj; + +const getCaptionForLocale = (locale) => { + switch (locale) { + case 'es': + return 'Hola!'; + case 'fr': + return 'Bonjour!'; + case 'kr': + return 'μ•ˆλ…•ν•˜μ„Έμš”!'; + case 'zh': + return 'δ½ ε₯½!'; + default: + return 'Hello!'; + } +}; + +export const StoryWithLocale: Story = { + render: (args, { globals: { locale } }) => { + const caption = getCaptionForLocale(locale); + return { + Component: MyComponent, + props: { + locale: caption, + }, + }; + }, +}; +``` diff --git a/docs/snippets/svelte/my-component-story-with-nonstory.js.mdx b/docs/snippets/svelte/my-component-story-with-nonstory.js.mdx index a1d49428d9fa..0ca9319f8737 100644 --- a/docs/snippets/svelte/my-component-story-with-nonstory.js.mdx +++ b/docs/snippets/svelte/my-component-story-with-nonstory.js.mdx @@ -15,20 +15,12 @@ export const simpleData = { foo: 1, bar: 'baz' }; export const complexData = { foo: 1, foobar: { bar: 'baz', baz: someData } }; export const SimpleStory = { - render: (args) => ({ - Component: MyComponent, - props: args, - }), args: { data: simpleData, }, }; export const ComplexStory = { - render: (args) => ({ - Component: MyComponent, - props: args, - }), args: { data: complexData, }, diff --git a/docs/snippets/svelte/my-component-story-with-nonstory.ts-4-9.mdx b/docs/snippets/svelte/my-component-story-with-nonstory.ts-4-9.mdx new file mode 100644 index 000000000000..9bf8759217e1 --- /dev/null +++ b/docs/snippets/svelte/my-component-story-with-nonstory.ts-4-9.mdx @@ -0,0 +1,33 @@ +```ts +// MyComponent.stories.ts + +import type { Meta, StoryObj } from '@storybook/svelte'; + +import MyComponent from './MyComponent.svelte'; + +import someData from './data.json'; + +const meta = { + component: MyComponent, + includeStories: ['SimpleStory', 'ComplexStory'], // πŸ‘ˆ Storybook loads these stories + excludeStories: /.*Data$/, // πŸ‘ˆ Storybook ignores anything that contains Data +} satisfies Meta; + +export default meta; +type Story = StoryObj; + +export const simpleData = { foo: 1, bar: 'baz' }; +export const complexData = { foo: 1, foobar: { bar: 'baz', baz: someData } }; + +export const SimpleStory: Story = { + args: { + data: simpleData, + }, +}; + +export const ComplexStory: Story = { + args: { + data: complexData, + }, +}; +``` diff --git a/docs/snippets/svelte/my-component-story-with-nonstory.ts.mdx b/docs/snippets/svelte/my-component-story-with-nonstory.ts.mdx new file mode 100644 index 000000000000..97c183896eb9 --- /dev/null +++ b/docs/snippets/svelte/my-component-story-with-nonstory.ts.mdx @@ -0,0 +1,33 @@ +```ts +// MyComponent.stories.ts + +import type { Meta, StoryObj } from '@storybook/svelte'; + +import MyComponent from './MyComponent.svelte'; + +import someData from './data.json'; + +const meta: Meta = { + component: MyComponent, + includeStories: ['SimpleStory', 'ComplexStory'], // πŸ‘ˆ Storybook loads these stories + excludeStories: /.*Data$/, // πŸ‘ˆ Storybook ignores anything that contains Data +}; + +export default meta; +type Story = StoryObj; + +export const simpleData = { foo: 1, bar: 'baz' }; +export const complexData = { foo: 1, foobar: { bar: 'baz', baz: someData } }; + +export const SimpleStory: Story = { + args: { + data: simpleData, + }, +}; + +export const ComplexStory: Story = { + args: { + data: complexData, + }, +}; +``` diff --git a/docs/snippets/svelte/my-component-with-env-variables.mdx.mdx b/docs/snippets/svelte/my-component-with-env-variables.mdx.mdx deleted file mode 100644 index 75d7cbe6b30a..000000000000 --- a/docs/snippets/svelte/my-component-with-env-variables.mdx.mdx +++ /dev/null @@ -1,27 +0,0 @@ -```md - - -import { Canvas, Meta, Story } from '@storybook/addon-docs'; - -import MyComponent from './MyComponent.svelte'; - - - - - - - ({ - Component: MyComponent, - props: args, - })} /> - -``` \ No newline at end of file diff --git a/docs/snippets/svelte/page-story.js.mdx b/docs/snippets/svelte/page-story.js.mdx index 287abf710838..ec72dc32448c 100644 --- a/docs/snippets/svelte/page-story.js.mdx +++ b/docs/snippets/svelte/page-story.js.mdx @@ -10,16 +10,7 @@ export default { component: Page, }; -/* - *πŸ‘‡ Render functions are a framework specific feature to allow you control on how the component renders. - * See https://storybook.js.org/docs/api/csf - * to learn how to use render functions. - */ export const LoggedIn = { - render: (args) => ({ - Component: Page, - props: args, - }), args: { ...HeaderStories.LoggedIn.args, }, diff --git a/docs/snippets/svelte/page-story.ts-4-9.mdx b/docs/snippets/svelte/page-story.ts-4-9.mdx new file mode 100644 index 000000000000..7184cc7ce31f --- /dev/null +++ b/docs/snippets/svelte/page-story.ts-4-9.mdx @@ -0,0 +1,23 @@ +```ts +// Page.stories.ts + +import type { Meta, StoryObj } from '@storybook/svelte'; + +import Page from './Page.svelte'; + +//πŸ‘‡ Imports all Header stories +import * as HeaderStories from './Header.stories'; + +const meta = { + component: Page, +} satisfies Meta; + +export default meta; +type Story = StoryObj; + +export const LoggedIn: Story = { + args: { + ...HeaderStories.LoggedIn.args, + }, +}; +``` diff --git a/docs/snippets/svelte/page-story.ts.mdx b/docs/snippets/svelte/page-story.ts.mdx new file mode 100644 index 000000000000..897a7f6db039 --- /dev/null +++ b/docs/snippets/svelte/page-story.ts.mdx @@ -0,0 +1,23 @@ +```ts +// Page.stories.ts + +import type { Meta, StoryObj } from '@storybook/svelte'; + +import Page from './Page.svelte'; + +//πŸ‘‡ Imports all Header stories +import * as HeaderStories from './Header.stories'; + +const meta: Meta = { + component: Page, +}; + +export default meta; +type Story = StoryObj; + +export const LoggedIn: Story = { + args: { + ...HeaderStories.LoggedIn.args, + }, +}; +``` diff --git a/docs/snippets/svelte/simple-page-implementation.ts.mdx b/docs/snippets/svelte/simple-page-implementation.ts.mdx new file mode 100644 index 000000000000..95fb6c5b988a --- /dev/null +++ b/docs/snippets/svelte/simple-page-implementation.ts.mdx @@ -0,0 +1,20 @@ +```html + + + + +
+ + + + +
+``` diff --git a/docs/snippets/svelte/storybook-addon-a11y-disable.js.mdx b/docs/snippets/svelte/storybook-addon-a11y-disable.js.mdx index 448436303a53..7ddea5b9cef4 100644 --- a/docs/snippets/svelte/storybook-addon-a11y-disable.js.mdx +++ b/docs/snippets/svelte/storybook-addon-a11y-disable.js.mdx @@ -8,10 +8,6 @@ export default { }; export const NonA11yStory = { - render: (args) => ({ - Component: MyComponent, - props: args, - }), parameters: { a11y: { // This option disables all a11y checks on this story diff --git a/docs/snippets/svelte/storybook-addon-a11y-disable.mdx.mdx b/docs/snippets/svelte/storybook-addon-a11y-disable.mdx.mdx deleted file mode 100644 index c2e5d4ff3ee5..000000000000 --- a/docs/snippets/svelte/storybook-addon-a11y-disable.mdx.mdx +++ /dev/null @@ -1,30 +0,0 @@ -```md - - -import { Meta, Story } from '@storybook/addon-docs'; - -import MyComponent from './MyComponent.svelte'; - - - - - - ({ - Component: MyComponent, - props: {}, - })} /> -``` \ No newline at end of file diff --git a/docs/snippets/svelte/storybook-addon-a11y-disable.ts-4-9.mdx b/docs/snippets/svelte/storybook-addon-a11y-disable.ts-4-9.mdx new file mode 100644 index 000000000000..a88af48d41e6 --- /dev/null +++ b/docs/snippets/svelte/storybook-addon-a11y-disable.ts-4-9.mdx @@ -0,0 +1,23 @@ +```ts +// MyComponent.stories.ts + +import type { Meta, StoryObj } from '@storybook/svelte'; + +import MyComponent from './MyComponent.svelte'; + +const meta = { + component: MyComponent, +} satisfies Meta; + +export default meta; +type Story = StoryObj; + +export const NonA11yStory: Story = { + parameters: { + a11y: { + // This option disables all a11y checks on this story + disable: true, + }, + }, +}; +``` diff --git a/docs/snippets/svelte/storybook-addon-a11y-disable.ts.mdx b/docs/snippets/svelte/storybook-addon-a11y-disable.ts.mdx new file mode 100644 index 000000000000..d9b1abb6a04e --- /dev/null +++ b/docs/snippets/svelte/storybook-addon-a11y-disable.ts.mdx @@ -0,0 +1,23 @@ +```ts +// MyComponent.stories.ts + +import type { Meta, StoryObj } from '@storybook/svelte'; + +import MyComponent from './MyComponent.svelte'; + +const meta: Meta = { + component: MyComponent, +}; + +export default meta; +type Story = StoryObj; + +export const NonA11yStory: Story = { + parameters: { + a11y: { + // This option disables all a11y checks on this story + disable: true, + }, + }, +}; +``` diff --git a/docs/snippets/svelte/storybook-addon-a11y-story-config.js.mdx b/docs/snippets/svelte/storybook-addon-a11y-story-config.js.mdx index 65635998e178..d26c9049ae24 100644 --- a/docs/snippets/svelte/storybook-addon-a11y-story-config.js.mdx +++ b/docs/snippets/svelte/storybook-addon-a11y-story-config.js.mdx @@ -8,10 +8,6 @@ export default { }; export const ExampleStory = { - render: (args) => ({ - Component: MyComponent, - props: args, - }), parameters: { a11y: { element: '#storybook-root', diff --git a/docs/snippets/svelte/storybook-addon-a11y-story-config.mdx.mdx b/docs/snippets/svelte/storybook-addon-a11y-story-config.ts-4-9.mdx similarity index 55% rename from docs/snippets/svelte/storybook-addon-a11y-story-config.mdx.mdx rename to docs/snippets/svelte/storybook-addon-a11y-story-config.ts-4-9.mdx index 503c7230d71f..405228dd4df8 100644 --- a/docs/snippets/svelte/storybook-addon-a11y-story-config.mdx.mdx +++ b/docs/snippets/svelte/storybook-addon-a11y-story-config.ts-4-9.mdx @@ -1,23 +1,19 @@ -```md - +```ts +// MyComponent.stories.ts -import { Meta, Story } from '@storybook/addon-docs'; +import type { Meta, StoryObj } from '@storybook/svelte'; import MyComponent from './MyComponent.svelte'; - +const meta = { + component: MyComponent, +} satisfies Meta; - +export default meta; +type Story = StoryObj; - ({ - Component: MyComponent, - props: {}, - })} /> -``` \ No newline at end of file + }, +}; +``` diff --git a/docs/snippets/svelte/storybook-addon-a11y-story-config.ts.mdx b/docs/snippets/svelte/storybook-addon-a11y-story-config.ts.mdx new file mode 100644 index 000000000000..a2516ffa6464 --- /dev/null +++ b/docs/snippets/svelte/storybook-addon-a11y-story-config.ts.mdx @@ -0,0 +1,38 @@ +```ts +// MyComponent.stories.ts + +import type { Meta, StoryObj } from '@storybook/svelte'; + +import MyComponent from './MyComponent.svelte'; + +const meta: Meta = { + component: MyComponent, +}; + +export default meta; +type Story = StoryObj; + +export const ExampleStory: Story = { + parameters: { + a11y: { + element: '#storybook-root', + config: { + rules: [ + { + // The autocomplete rule will not run based on the CSS selector provided + id: 'autocomplete-valid', + selector: '*:not([autocomplete="nope"])', + }, + { + // Setting the enabled option to false will disable checks for this particular rule on all stories. + id: 'image-alt', + enabled: false, + }, + ], + }, + options: {}, + manual: true, + }, + }, +}; +``` diff --git a/docs/snippets/svelte/storybook-preview-global-decorator.ts.mdx b/docs/snippets/svelte/storybook-preview-global-decorator.ts.mdx new file mode 100644 index 000000000000..9e6cf557f9c3 --- /dev/null +++ b/docs/snippets/svelte/storybook-preview-global-decorator.ts.mdx @@ -0,0 +1,13 @@ +```ts +// .storybook/preview.ts + +import type { Preview } from '@storybook/svelte'; + +import MarginDecorator from './MarginDecorator.svelte'; + +const preview: Preview = { + decorators: [() => MarginDecorator], +}; + +export default preview; +``` diff --git a/docs/snippets/svelte/your-component-with-decorator.js.mdx b/docs/snippets/svelte/your-component-with-decorator.js.mdx index a5dfce20e711..c9d943052349 100644 --- a/docs/snippets/svelte/your-component-with-decorator.js.mdx +++ b/docs/snippets/svelte/your-component-with-decorator.js.mdx @@ -9,21 +9,4 @@ export default { component: YourComponent, decorators: [() => MarginDecorator], }; - -// Your templates and stories here. -// Don't forget to use the component you're testing and not the MarginDecorator component -``` - -```html - - -
- -
- - ``` diff --git a/docs/snippets/svelte/your-component-with-decorator.mdx.mdx b/docs/snippets/svelte/your-component-with-decorator.mdx.mdx deleted file mode 100644 index 8cc0313e5d30..000000000000 --- a/docs/snippets/svelte/your-component-with-decorator.mdx.mdx +++ /dev/null @@ -1,13 +0,0 @@ -```md - - -import { Meta } from '@storybook/addon-docs'; - -import YourComponent from './YourComponent.svelte'; -import MarginDecorator from './MarginDecorator.svelte'; - - MarginDecorator]}/> -``` \ No newline at end of file diff --git a/docs/snippets/svelte/your-component-with-decorator.ts-4-9.mdx b/docs/snippets/svelte/your-component-with-decorator.ts-4-9.mdx new file mode 100644 index 000000000000..b840eb852abe --- /dev/null +++ b/docs/snippets/svelte/your-component-with-decorator.ts-4-9.mdx @@ -0,0 +1,15 @@ +```ts +// YourComponent.stories.ts + +import type { Meta } from '@storybook/svelte'; + +import YourComponent from './YourComponent.svelte'; +import MarginDecorator from './MarginDecorator.svelte'; + +const meta = { + component: Button, + decorators: [() => MarginDecorator], +} satisfies Meta; + +export default meta; +``` diff --git a/docs/snippets/svelte/your-component-with-decorator.ts.mdx b/docs/snippets/svelte/your-component-with-decorator.ts.mdx new file mode 100644 index 000000000000..d7698d42c35d --- /dev/null +++ b/docs/snippets/svelte/your-component-with-decorator.ts.mdx @@ -0,0 +1,15 @@ +```ts +// YourComponent.stories.ts + +import type { Meta } from '@storybook/svelte'; + +import YourComponent from './YourComponent.svelte'; +import MarginDecorator from './MarginDecorator.svelte'; + +const meta: Meta = { + component: YourComponent, + decorators: [() => MarginDecorator], +}; + +export default meta; +``` diff --git a/docs/snippets/svelte/your-component.mdx.mdx b/docs/snippets/svelte/your-component.mdx.mdx deleted file mode 100644 index 8f63ceffc626..000000000000 --- a/docs/snippets/svelte/your-component.mdx.mdx +++ /dev/null @@ -1,20 +0,0 @@ -```md - - -import { Meta, Story } from '@storybook/addon-docs'; - -import YourComponent from './YourComponent.svelte'; - - - - - - - ({ - component: YourComponent, - props: args, - })} /> -``` \ No newline at end of file diff --git a/docs/writing-docs/autodocs.md b/docs/writing-docs/autodocs.md index 61026e2d981b..96c42c8ba831 100644 --- a/docs/writing-docs/autodocs.md +++ b/docs/writing-docs/autodocs.md @@ -20,6 +20,7 @@ To enable auto-generated documentation for your stories, you'll need to add the 'vue/button-story-auto-docs.ts.mdx', 'angular/button-story-auto-docs.ts.mdx', 'svelte/button-story-auto-docs.js.mdx', + 'svelte/button-story-auto-docs.ts.mdx', 'web-components/button-story-auto-docs.js.mdx', 'web-components/button-story-auto-docs.ts.mdx', ]} diff --git a/docs/writing-stories/args.md b/docs/writing-stories/args.md index c4595f31c783..5a3d7cbd14a6 100644 --- a/docs/writing-stories/args.md +++ b/docs/writing-stories/args.md @@ -32,6 +32,7 @@ To define the args of a single story, use the `args` CSF story key: 'web-components/button-story-with-args.js.mdx', 'web-components/button-story-with-args.ts.mdx', 'svelte/button-story-with-args.js.mdx', + 'svelte/button-story-with-args.ts.mdx', 'html/button-story-with-args.ts.mdx', 'html/button-story-with-args.js.mdx', 'solid/button-story-with-args.js.mdx', @@ -80,6 +81,7 @@ You can also define args at the component level; they will apply to all the comp 'web-components/button-story-component-args-primary.js.mdx', 'web-components/button-story-component-args-primary.ts.mdx', 'svelte/button-story-component-args-primary.js.mdx', + 'svelte/button-story-component-args-primary.ts.mdx', 'solid/button-story-component-args-primary.js.mdx', 'solid/button-story-component-args-primary.ts.mdx', ]} @@ -152,6 +154,7 @@ Args are useful when writing stories for composite components that are assembled 'web-components/page-story.js.mdx', 'web-components/page-story.ts.mdx', 'svelte/page-story.js.mdx', + 'svelte/page-story.ts.mdx', 'solid/page-story.js.mdx', 'solid/page-story.ts.mdx', ]} @@ -161,6 +164,10 @@ Args are useful when writing stories for composite components that are assembled + + + + ## Args can modify any aspect of your component You can use args in your stories to configure the component's appearance, similar to what you would do in an application. For example, here's how you could use a `footer` arg to populate a child component: @@ -187,6 +194,8 @@ You can use args in your stories to configure the component's appearance, simila + + ## Setting args through the URL You can also override the set of initial args for the active story by adding an `args` query parameter to the URL. Typically you would use the [Controls addon](../essentials/controls.md) to handle this. For example, here's how you could set a `size` and `style` arg in the Storybook's URL: diff --git a/docs/writing-stories/build-pages-with-storybook.md b/docs/writing-stories/build-pages-with-storybook.md index d8c1b8f5b3b7..fecddea8921a 100644 --- a/docs/writing-stories/build-pages-with-storybook.md +++ b/docs/writing-stories/build-pages-with-storybook.md @@ -44,6 +44,7 @@ When you are building screens in this way, it is typical that the inputs of a co 'web-components/simple-page-implementation.js.mdx', 'web-components/simple-page-implementation.ts.mdx', 'svelte/simple-page-implementation.js.mdx', + 'svelte/simple-page-implementation.ts.mdx', 'solid/simple-page-implementation.js.mdx', 'solid/simple-page-implementation.ts.mdx', ]} @@ -146,6 +147,7 @@ If you're working with pure presentational screens, adding stories through [args 'vue/document-screen-fetch.3.ts.mdx', 'angular/document-screen-fetch.ts.mdx', 'svelte/document-screen-fetch.js.mdx', + 'svelte/document-screen-fetch.ts.mdx', 'web-components/document-screen-fetch.js.mdx', 'solid/document-screen-fetch.js.mdx', ]} @@ -193,6 +195,7 @@ In addition to mocking RESTful requests, the other noteworthy feature of the [MS 'vue/document-screen-with-graphql.3.ts.mdx', 'angular/document-screen-with-graphql.ts.mdx', 'svelte/document-screen-with-grapqhl.js.mdx', + 'svelte/document-screen-with-grapqhl.ts.mdx', ]} /> @@ -212,7 +215,9 @@ To test your screen with the GraphQL mocked data, you could write the following 'angular/apollo-module.mock-apollo-module.ts.mdx', 'angular/documentscreen-story-msw-graphql-query.ts.mdx', 'svelte/documentscreen-story-msw-graphql-query.js.mdx', + 'svelte/documentscreen-story-msw-graphql-query.ts.mdx', 'svelte/apollo-wrapper-component.with-mock-implementation.js.mdx', + 'svelte/apollo-wrapper-component.with-mock-implementation.ts.mdx', ]} usesCsf3 csf2Path="writing-stories/build-pages-with-storybook#snippet-documentscreen-story-msw-graphql-query" diff --git a/docs/writing-stories/decorators.md b/docs/writing-stories/decorators.md index f6c5305877cd..3f213ca28058 100644 --- a/docs/writing-stories/decorators.md +++ b/docs/writing-stories/decorators.md @@ -26,6 +26,9 @@ Some components require a β€œharness” to render in a useful way. For instance, 'web-components/your-component-with-decorator.js.mdx', 'web-components/your-component-with-decorator.ts.mdx', 'svelte/your-component-with-decorator.js.mdx', + 'svelte/your-component-with-decorator.ts.mdx', + 'svelte/margindecorator.with-margin-component.js.mdx', + 'svelte/margindecorator.with-margin-component.ts.mdx', 'solid/your-component-with-decorator.js.mdx', 'solid/your-component-with-decorator.ts.mdx' ]} @@ -103,6 +106,9 @@ To define a decorator for a single story, use the `decorators` key on a named ex 'web-components/button-story-decorator.js.mdx', 'web-components/button-story-decorator.ts.mdx', 'svelte/button-story-decorator.js.mdx', + 'svelte/button-story-decorator.ts.mdx', + 'svelte/margindecorator.with-margin-component.js.mdx', + 'svelte/margindecorator.with-margin-component.ts.mdx', 'solid/button-story-decorator.js.mdx', 'solid/button-story-decorator.ts.mdx', ]} @@ -131,6 +137,9 @@ To define a decorator for all stories of a component, use the `decorators` key o 'web-components/button-story-component-decorator.js.mdx', 'web-components/button-story-component-decorator.ts.mdx', 'svelte/button-story-component-decorator.js.mdx', + 'svelte/button-story-component-decorator.ts.mdx', + 'svelte/margindecorator.with-margin-component.js.mdx', + 'svelte/margindecorator.with-margin-component.ts.mdx', 'solid/button-story-component-decorator.js.mdx', 'solid/button-story-component-decorator.ts.mdx', ]} @@ -153,6 +162,9 @@ We can also set a decorator for **all stories** via the `decorators` export of y 'angular/storybook-preview-global-decorator.ts.mdx', 'web-components/storybook-preview-global-decorator.js.mdx', 'svelte/storybook-preview-global-decorator.js.mdx', + 'svelte/storybook-preview-global-decorator.ts.mdx', + 'svelte/margindecorator.with-margin-component.js.mdx', + 'svelte/margindecorator.with-margin-component.ts.mdx', 'solid/storybook-preview-global-decorator.js.mdx', 'solid/storybook-preview-global-decorator.ts.mdx', ]} diff --git a/docs/writing-stories/index.md b/docs/writing-stories/index.md index e7dab69ec876..c938a3f60929 100644 --- a/docs/writing-stories/index.md +++ b/docs/writing-stories/index.md @@ -37,6 +37,7 @@ The _default_ export metadata controls how Storybook lists your stories and prov 'vue/button-story-default-export-with-component.ts.mdx', 'angular/button-story-default-export-with-component.ts.mdx', 'svelte/button-story-default-export-with-component.js.mdx', + 'svelte/button-story-default-export-with-component.ts.mdx', 'web-components/button-story-default-export-with-component.js.mdx', 'html/button-story-default-export.js.mdx', 'html/button-story-default-export.ts.mdx', @@ -69,6 +70,7 @@ Use the _named_ exports of a CSF file to define your component’s stories. We r 'web-components/button-story.js.mdx', 'web-components/button-story.ts.mdx', 'svelte/button-story.js.mdx', + 'svelte/button-story.ts.mdx', 'html/button-story.js.mdx', 'html/button-story.ts.mdx', 'solid/button-story.js.mdx', @@ -150,6 +152,7 @@ You can rename any particular story you need. For instance, to give it a more ac 'web-components/button-story-rename-story.js.mdx', 'web-components/button-story-rename-story.ts.mdx', 'svelte/button-story-rename-story.js.mdx', + 'svelte/button-story-rename-story.ts.mdx', 'html/button-story-rename-story.js.mdx', 'html/button-story-rename-story.ts.mdx', 'solid/button-story-rename-story.js.mdx', @@ -179,6 +182,7 @@ A story is a function that describes how to render a component. You can have mul 'web-components/button-story-with-emojis.js.mdx', 'web-components/button-story-with-emojis.ts.mdx', 'svelte/button-story-with-emojis.js.mdx', + 'svelte/button-story-with-emojis.ts.mdx', 'html/button-story-with-emojis.js.mdx', 'html/button-story-with-emojis.ts.mdx', 'solid/button-story-with-emojis.js.mdx', @@ -210,6 +214,7 @@ Refine this pattern by introducing `args` for your component's stories. It reduc 'web-components/button-story-using-args.js.mdx', 'web-components/button-story-using-args.ts.mdx', 'svelte/button-story-using-args.js.mdx', + 'svelte/button-story-using-args.ts.mdx', 'html/button-story-using-args.js.mdx', 'html/button-story-using-args.ts.mdx', 'solid/button-story-using-args.js.mdx', @@ -239,6 +244,7 @@ What’s more, you can import `args` to reuse when writing stories for other com 'web-components/button-group-story.js.mdx', 'web-components/button-group-story.ts.mdx', 'svelte/button-group-story.js.mdx', + 'svelte/button-group-story.ts.mdx', 'solid/button-group-story.js.mdx', 'solid/button-group-story.ts.mdx', ]} @@ -285,6 +291,7 @@ Storybook's `play` function and the [`@storybook/addon-interactions`](https://st 'web-components/login-form-with-play-function.js.mdx', 'web-components/login-form-with-play-function.ts.mdx', 'svelte/login-form-with-play-function.js.mdx', + 'svelte/login-form-with-play-function.ts.mdx', 'solid/login-form-with-play-function.js.mdx', 'solid/login-form-with-play-function.ts.mdx', ]} @@ -312,6 +319,7 @@ For instance, suppose you wanted to test your Button component against a differe 'web-components/button-story-with-blue-args.js.mdx', 'web-components/button-story-with-blue-args.ts.mdx', 'svelte/button-story-with-blue-args.js.mdx', + 'svelte/button-story-with-blue-args.ts.mdx', 'html/button-story-with-blue-args.js.mdx', 'html/button-story-with-blue-args.ts.mdx', 'solid/button-story-with-blue-args.js.mdx', @@ -343,6 +351,9 @@ A simple example is adding padding to a component’s stories. Accomplish this u 'web-components/button-story-component-decorator.js.mdx', 'web-components/button-story-component-decorator.ts.mdx', 'svelte/button-story-component-decorator.js.mdx', + 'svelte/button-story-component-decorator.ts.mdx', + 'svelte/margindecorator.with-margin-component.js.mdx', + 'svelte/margindecorator.with-margin-component.ts.mdx', 'html/button-story-component-decorator.js.mdx', 'html/button-story-component-decorator.ts.mdx', 'solid/button-story-component-decorator.js.mdx', diff --git a/docs/writing-stories/loaders.md b/docs/writing-stories/loaders.md index b0b5c11fd123..663670d6e1e9 100644 --- a/docs/writing-stories/loaders.md +++ b/docs/writing-stories/loaders.md @@ -26,6 +26,7 @@ Loaders are helpful when you need to load story data externally (e.g., from a re 'web-components/loader-story.js.mdx', 'web-components/loader-story.ts.mdx', 'svelte/loader-story.js.mdx', + 'svelte/loader-story.ts.mdx', 'solid/loader-story.js.mdx', 'solid/loader-story.ts.mdx', ]} diff --git a/docs/writing-stories/parameters.md b/docs/writing-stories/parameters.md index b697330ec848..9ec6b5c73225 100644 --- a/docs/writing-stories/parameters.md +++ b/docs/writing-stories/parameters.md @@ -44,6 +44,7 @@ We can set the parameters for all stories of a component using the `parameters` 'web-components/button-story-with-blue-args.js.mdx', 'web-components/button-story-with-blue-args.ts.mdx', 'svelte/button-story-with-blue-args.js.mdx', + 'svelte/button-story-with-blue-args.ts.mdx', 'solid/button-story-with-blue-args.js.mdx', 'solid/button-story-with-blue-args.ts.mdx', ]} diff --git a/docs/writing-tests/accessibility-testing.md b/docs/writing-tests/accessibility-testing.md index 4285fa95eaa8..14506ae979e2 100644 --- a/docs/writing-tests/accessibility-testing.md +++ b/docs/writing-tests/accessibility-testing.md @@ -70,6 +70,7 @@ Storybook's a11y addon runs [Axe](https://github.com/dequelabs/axe-core) on the 'vue/component-story-with-accessibility.3.js.mdx', 'vue/component-story-with-accessibility.3.ts.mdx', 'svelte/component-story-with-accessibility.js.mdx', + 'svelte/component-story-with-accessibility.ts.mdx', 'web-components/component-story-with-accessibility.js.mdx', 'web-components/component-story-with-accessibility.ts.mdx', ]} @@ -134,6 +135,7 @@ Customize the a11y ruleset at the story level by updating your story to include 'vue/storybook-addon-a11y-story-config.js.mdx', 'vue/storybook-addon-a11y-story-config.ts.mdx', 'svelte/storybook-addon-a11y-story-config.js.mdx', + 'svelte/storybook-addon-a11y-story-config.ts.mdx', 'web-components/storybook-addon-a11y-story-config.js.mdx', 'web-components/storybook-addon-a11y-story-config.ts.mdx', ]} @@ -157,6 +159,7 @@ Disable accessibility testing for stories or components by adding the following 'vue/storybook-addon-a11y-disable.js.mdx', 'vue/storybook-addon-a11y-disable.ts.mdx', 'svelte/storybook-addon-a11y-disable.js.mdx', + 'svelte/storybook-addon-a11y-disable.ts.mdx', 'web-components/storybook-addon-a11y-disable.js.mdx', 'web-components/storybook-addon-a11y-disable.ts.mdx', ]} diff --git a/docs/writing-tests/interaction-testing.md b/docs/writing-tests/interaction-testing.md index 90c7e2fc8a06..4cc94872b15f 100644 --- a/docs/writing-tests/interaction-testing.md +++ b/docs/writing-tests/interaction-testing.md @@ -71,6 +71,7 @@ The test itself is defined inside a `play` function connected to a story. Here's 'web-components/login-form-with-play-function.js.mdx', 'web-components/login-form-with-play-function.ts.mdx', 'svelte/login-form-with-play-function.js.mdx', + 'svelte/login-form-with-play-function.ts.mdx', 'solid/login-form-with-play-function.js.mdx', 'solid/login-form-with-play-function.ts.mdx', ]} diff --git a/docs/writing-tests/stories-in-end-to-end-tests.md b/docs/writing-tests/stories-in-end-to-end-tests.md index 50fa58ae0688..6699ea352cbe 100644 --- a/docs/writing-tests/stories-in-end-to-end-tests.md +++ b/docs/writing-tests/stories-in-end-to-end-tests.md @@ -22,6 +22,7 @@ An example of an end-to-end test with Cypress and Storybook is testing a login c 'web-components/login-form-with-play-function.js.mdx', 'web-components/login-form-with-play-function.ts.mdx', 'svelte/login-form-with-play-function.js.mdx', + 'svelte/login-form-with-play-function.ts.mdx', ]} usesCsf3 csf2Path="writing-tests/importing-stories-in-tests#snippet-login-form-with-play-function" @@ -69,6 +70,7 @@ A real-life scenario of user flow testing with Playwright would be how to test a 'web-components/login-form-with-play-function.js.mdx', 'web-components/login-form-with-play-function.ts.mdx', 'svelte/login-form-with-play-function.js.mdx', + 'svelte/login-form-with-play-function.ts.mdx', ]} usesCsf3 csf2Path="writing-tests/importing-stories-in-tests#snippet-login-form-with-play-function" From db5ec1dcef5618de6ad4bc7a6ce5b4ae5308c6f0 Mon Sep 17 00:00:00 2001 From: Valentin Palkovic Date: Mon, 4 Dec 2023 10:37:19 +0100 Subject: [PATCH 093/131] Next.js: Drop < 13.5.0 support --- MIGRATION.md | 8 ++ code/frameworks/nextjs/package.json | 19 +---- code/frameworks/nextjs/src/config/webpack.ts | 21 +---- code/frameworks/nextjs/src/dependency-map.ts | 42 ---------- .../google/get-font-face-declarations.ts | 26 +++--- .../local/get-font-face-declarations.ts | 9 +- .../webpack/loader/utils/google-font-utils.ts | 82 ------------------- .../webpack/loader/utils/local-font-utils.ts | 76 ----------------- .../nextjs/src/images/next-future-image.tsx | 24 ------ code/frameworks/nextjs/src/images/webpack.ts | 8 -- .../nextjs/src/nextImport/webpack.ts | 40 --------- code/frameworks/nextjs/src/preset.ts | 4 - .../src/routing/app-router-provider-mock.tsx | 6 -- .../nextjs/src/routing/decorator.tsx | 4 +- .../nextjs/src/styledJsx/decorator.tsx | 11 +-- .../nextjs/src/styledJsx/webpack.ts | 15 +--- .../ImageFuture.stories.jsx | 55 ------------- .../stories_nextjs-12-js/Link.stories.jsx | 28 ------- 18 files changed, 32 insertions(+), 446 deletions(-) delete mode 100644 code/frameworks/nextjs/src/dependency-map.ts delete mode 100644 code/frameworks/nextjs/src/font/webpack/loader/utils/google-font-utils.ts delete mode 100644 code/frameworks/nextjs/src/font/webpack/loader/utils/local-font-utils.ts delete mode 100644 code/frameworks/nextjs/src/images/next-future-image.tsx delete mode 100644 code/frameworks/nextjs/src/nextImport/webpack.ts delete mode 100644 code/frameworks/nextjs/src/routing/app-router-provider-mock.tsx delete mode 100644 code/frameworks/nextjs/template/stories_nextjs-12-js/ImageFuture.stories.jsx delete mode 100644 code/frameworks/nextjs/template/stories_nextjs-12-js/Link.stories.jsx diff --git a/MIGRATION.md b/MIGRATION.md index dbb9ed74ce83..90ed8504d39e 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -18,6 +18,8 @@ - [typescript.skipBabel deprecated](#typescriptskipbabel-deprecated) - [Primary doc block accepts of prop](#primary-doc-block-accepts-of-prop) - [Addons no longer need a peer dependency on React](#addons-no-longer-need-a-peer-dependency-on-react) + - [Framework-specific changes](#framework-specific-changes) + - [Next.js: Drop support for Angular \< 13.5](#nextjs-drop-support-for-angular--135) - [From version 7.4.0 to 7.5.0](#from-version-740-to-750) - [`storyStoreV6` and `storiesOf` is deprecated](#storystorev6-and-storiesof-is-deprecated) - [`storyIndexers` is replaced with `experimental_indexers`](#storyindexers-is-replaced-with-experimental_indexers) @@ -556,6 +558,12 @@ const allGlobalPackages = [...globalManagerPackages, ...globalPreviewPackages]; We recommend checking out [the updates we've made to the addon-kit](https://github.com/storybookjs/addon-kit/pull/60/files#diff-8fed899bdbc24789a7bb4973574e624ed6207c6ce572338bc3c3e117672b2a20), that can serve as a base for the changes you can do in your own addon. These changes are not necessary for your addon to keep working, but they will remove the need for your users to unnecessary install `react` and `react-dom` to their projects, and they'll significantly reduce the install size of your addon. These changes should not be breaking for your users, unless you support Storybook pre-v7. +### Framework-specific changes + +#### Next.js: Drop support for Angular \< 13.5 + +Starting in 8.0, we drop support for Next.js < 13.5. + ## From version 7.4.0 to 7.5.0 #### `storyStoreV6` and `storiesOf` is deprecated diff --git a/code/frameworks/nextjs/package.json b/code/frameworks/nextjs/package.json index c0318bdc95d9..c673b0de812e 100644 --- a/code/frameworks/nextjs/package.json +++ b/code/frameworks/nextjs/package.json @@ -32,16 +32,6 @@ "require": "./dist/image-context.js", "import": "./dist/image-context.mjs" }, - "./dist/routing/app-router-provider": { - "types": "./dist/routing/app-router-provider.d.ts", - "require": "./dist/routing/app-router-provider.js", - "import": "./dist/routing/app-router-provider.mjs" - }, - "./dist/routing/app-router-provider-mock": { - "types": "./dist/routing/app-router-provider-mock.d.ts", - "require": "./dist/routing/app-router-provider-mock.js", - "import": "./dist/routing/app-router-provider-mock.mjs" - }, "./preset": { "types": "./dist/preset.d.ts", "require": "./dist/preset.js" @@ -137,16 +127,12 @@ "webpack": "^5.65.0" }, "peerDependencies": { - "@next/font": "^13.0.0|| ^14.0.0", - "next": "^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0 || ^13.0.0 || ^14.0.0", + "next": "^13.5.0 || ^14.0.0", "react": "^16.8.0 || ^17.0.0 || ^18.0.0", "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0", "webpack": "^5.0.0" }, "peerDependenciesMeta": { - "@next/font": { - "optional": true - }, "typescript": { "optional": true }, @@ -168,11 +154,8 @@ "./src/preview.tsx", "./src/next-image-loader-stub.ts", "./src/images/decorator.tsx", - "./src/images/next-future-image.tsx", "./src/images/next-legacy-image.tsx", "./src/images/next-image.tsx", - "./src/routing/app-router-provider.tsx", - "./src/routing/app-router-provider-mock.tsx", "./src/font/webpack/loader/storybook-nextjs-font-loader.ts", "./src/swc/next-swc-loader-patch.ts" ], diff --git a/code/frameworks/nextjs/src/config/webpack.ts b/code/frameworks/nextjs/src/config/webpack.ts index 9d7c85d8c003..be2a983fceec 100644 --- a/code/frameworks/nextjs/src/config/webpack.ts +++ b/code/frameworks/nextjs/src/config/webpack.ts @@ -1,9 +1,8 @@ import type { Configuration as WebpackConfig } from 'webpack'; -import semver from 'semver'; import type { NextConfig } from 'next'; import { DefinePlugin } from 'webpack'; -import { addScopedAlias, getNextjsVersion, resolveNextConfig } from '../utils'; +import { addScopedAlias, resolveNextConfig } from '../utils'; const tryResolve = (path: string) => { try { @@ -36,8 +35,6 @@ export const configureConfig = async ({ return nextConfig; }; -const version = getNextjsVersion(); - const setupRuntimeConfig = (baseConfig: WebpackConfig, nextConfig: NextConfig): void => { const definePluginConfig: Record = { // this mimics what nextjs does client side @@ -50,21 +47,7 @@ const setupRuntimeConfig = (baseConfig: WebpackConfig, nextConfig: NextConfig): const newNextLinkBehavior = (nextConfig.experimental as any)?.newNextLinkBehavior; - /** - * In Next 13.0.0 - 13.0.5, the `newNextLinkBehavior` option now defaults to truthy (still - * `undefined` in the config), and `next/link` was engineered to opt *out* - * of it - * - */ - if ( - semver.gte(version, '13.0.0') && - semver.lt(version, '13.0.6') && - newNextLinkBehavior !== false - ) { - definePluginConfig['process.env.__NEXT_NEW_LINK_BEHAVIOR'] = true; - } else { - definePluginConfig['process.env.__NEXT_NEW_LINK_BEHAVIOR'] = newNextLinkBehavior; - } + definePluginConfig['process.env.__NEXT_NEW_LINK_BEHAVIOR'] = newNextLinkBehavior; baseConfig.plugins?.push(new DefinePlugin(definePluginConfig)); }; diff --git a/code/frameworks/nextjs/src/dependency-map.ts b/code/frameworks/nextjs/src/dependency-map.ts deleted file mode 100644 index 2849f6b02498..000000000000 --- a/code/frameworks/nextjs/src/dependency-map.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { Configuration as WebpackConfig } from 'webpack'; -import semver from 'semver'; -import { getNextjsVersion, addScopedAlias } from './utils'; - -const mapping: Record> = { - '<11.1.0': { - 'next/dist/next-server/lib/router-context': 'next/dist/next-server/lib/router-context', - }, - '>=11.1.0 <13.5.0': { - 'next/dist/shared/lib/router-context': 'next/dist/shared/lib/router-context', - }, - '>=13.0.2 <13.5.0': { - 'next/dist/shared/lib/hooks-client-context.shared-runtime': - 'next/dist/shared/lib/hooks-client-context', - }, - '<13.0.0': { - '@storybook/nextjs/dist/routing/app-router-provider': - '@storybook/nextjs/dist/routing/app-router-provider-mock', - }, - '<13.5.0': { - 'next/dist/shared/lib/router-context.shared-runtime': 'next/dist/shared/lib/router-context', - 'next/dist/shared/lib/head-manager-context.shared-runtime': - 'next/dist/shared/lib/head-manager-context', - 'next/dist/shared/lib/app-router-context.shared-runtime': - 'next/dist/shared/lib/app-router-context', - }, -}; - -export const configureAliasing = (baseConfig: WebpackConfig): void => { - const version = getNextjsVersion(); - const result: Record = {}; - - Object.keys(mapping).forEach((key) => { - if (semver.intersects(version, key)) { - Object.assign(result, mapping[key]); - } - }); - - Object.entries(result).forEach(([name, alias]) => { - addScopedAlias(baseConfig, name, alias); - }); -}; diff --git a/code/frameworks/nextjs/src/font/webpack/loader/google/get-font-face-declarations.ts b/code/frameworks/nextjs/src/font/webpack/loader/google/get-font-face-declarations.ts index 0f8bfb1957f8..3f9db77ebb16 100644 --- a/code/frameworks/nextjs/src/font/webpack/loader/google/get-font-face-declarations.ts +++ b/code/frameworks/nextjs/src/font/webpack/loader/google/get-font-face-declarations.ts @@ -5,34 +5,28 @@ import { GoogleFontsDownloadError, GoogleFontsLoadingError, } from '@storybook/core-events/server-errors'; +import { validateGoogleFontFunctionCall } from 'next/dist/compiled/@next/font/dist/google/validate-google-font-function-call'; +import { getGoogleFontsUrl } from 'next/dist/compiled/@next/font/dist/google/get-google-fonts-url'; +import { getFontAxes } from 'next/dist/compiled/@next/font/dist/google/get-font-axes'; +import { fetchCSSFromGoogleFonts } from 'next/dist/compiled/@next/font/dist/google/fetch-css-from-google-fonts'; import type { LoaderOptions } from '../types'; -const cssCache = new Map>(); +const cssCache = new Map(); export async function getFontFaceDeclarations(options: LoaderOptions) { - const { - fetchCSSFromGoogleFonts, - getFontAxes, - getUrl, - validateData, - } = require('../utils/google-font-utils'); - - const { fontFamily, weights, styles, selectedVariableAxes, display, variable } = validateData( - options.fontFamily, - [options.props], - null - ); + const { fontFamily, weights, styles, selectedVariableAxes, display, variable } = + validateGoogleFontFunctionCall(options.fontFamily, options.props); const fontAxes = getFontAxes(fontFamily, weights, styles, selectedVariableAxes); - const url = getUrl(fontFamily, fontAxes, display); + const url = getGoogleFontsUrl(fontFamily, fontAxes, display); try { const hasCachedCSS = cssCache.has(url); const fontFaceCSS = hasCachedCSS ? cssCache.get(url) - : await fetchCSSFromGoogleFonts(url, fontFamily).catch(() => null); + : await fetchCSSFromGoogleFonts(url, fontFamily, true).catch(() => null); if (!hasCachedCSS) { - cssCache.set(url, fontFaceCSS); + cssCache.set(url, fontFaceCSS as string); } else { cssCache.delete(url); } diff --git a/code/frameworks/nextjs/src/font/webpack/loader/local/get-font-face-declarations.ts b/code/frameworks/nextjs/src/font/webpack/loader/local/get-font-face-declarations.ts index 54ef87d299bf..f3f35c2fc065 100644 --- a/code/frameworks/nextjs/src/font/webpack/loader/local/get-font-face-declarations.ts +++ b/code/frameworks/nextjs/src/font/webpack/loader/local/get-font-face-declarations.ts @@ -2,6 +2,7 @@ // @ts-expect-error import loaderUtils from 'next/dist/compiled/loader-utils3'; import { getProjectRoot } from '@storybook/core-common'; +import { validateLocalFontFunctionCall } from 'next/dist/compiled/@next/font/dist/local/validate-local-font-function-call'; import path from 'path'; import type { LoaderOptions } from '../types'; @@ -20,8 +21,12 @@ export async function getFontFaceDeclarations( ? path.dirname(path.join(getProjectRoot(), options.filename)).replace(rootContext, '') : path.dirname(options.filename).replace(rootContext, ''); - const { validateData } = require('../utils/local-font-utils'); - const { weight, style, variable, declarations = [] } = validateData('', options.props); + const { + weight, + style, + variable, + declarations = [], + } = validateLocalFontFunctionCall('', options.props); const id = `font-${loaderUtils.getHashDigest( Buffer.from(JSON.stringify(localFontSrc)), diff --git a/code/frameworks/nextjs/src/font/webpack/loader/utils/google-font-utils.ts b/code/frameworks/nextjs/src/font/webpack/loader/utils/google-font-utils.ts deleted file mode 100644 index 20fe04209947..000000000000 --- a/code/frameworks/nextjs/src/font/webpack/loader/utils/google-font-utils.ts +++ /dev/null @@ -1,82 +0,0 @@ -/* eslint-disable import/no-mutable-exports */ - -import dedent from 'ts-dedent'; - -type FontOptions = { - fontFamily: string; - weights: string[]; - styles: string[]; - display: string; - preload: boolean; - selectedVariableAxes?: string[]; - fallback?: string[]; - adjustFontFallback: boolean; - variable?: string; - subsets: string[]; -}; - -let validateData: (functionName: string, fontData: any, config: any) => FontOptions; - -let getUrl: ( - fontFamily: string, - axes: { - wght?: string[]; - ital?: string[]; - variableAxes?: [string, string][]; - }, - display: string -) => string; - -let getFontAxes: ( - fontFamily: string, - weights: string[], - styles: string[], - selectedVariableAxes?: string[] -) => { - wght?: string[]; - ital?: string[]; - variableAxes?: [string, string][]; -}; - -let fetchCSSFromGoogleFonts: (url: string, fontFamily: string) => Promise; - -// Support @next/font -try { - const fontUtils = require('@next/font/dist/google/utils'); - validateData = fontUtils.validateData; - getUrl = fontUtils.getUrl; - getFontAxes = fontUtils.getFontAxes; - fetchCSSFromGoogleFonts = fontUtils.fetchCSSFromGoogleFonts; -} catch (_) { - // Support next/font prior to v13.2.4 - try { - const fontUtils = require('next/dist/compiled/@next/font/dist/google/utils'); - validateData = fontUtils.validateData; - getUrl = fontUtils.getUrl; - getFontAxes = fontUtils.getFontAxes; - fetchCSSFromGoogleFonts = fontUtils.fetchCSSFromGoogleFonts; - } catch (__) { - // Support next/font since v13.2.4 - try { - validateData = (functionName, fontData, config) => - require('next/dist/compiled/@next/font/dist/google/validate-google-font-function-call').validateGoogleFontFunctionCall( - functionName, - fontData[0], - config - ); - getUrl = - require('next/dist/compiled/@next/font/dist/google/get-google-fonts-url').getGoogleFontsUrl; - getFontAxes = require('next/dist/compiled/@next/font/dist/google/get-font-axes').getFontAxes; - fetchCSSFromGoogleFonts = - require('next/dist/compiled/@next/font/dist/google/fetch-css-from-google-fonts').fetchCSSFromGoogleFonts; - } catch (e) { - throw new Error(dedent` - We are unable to load the helper functions to use next/font/google. - Please downgrade Next.js to version 13.2.4 to continue to use next/font/google in Storybook. - Feel free to open a Github Issue! - `); - } - } -} - -export { validateData, getUrl, getFontAxes, fetchCSSFromGoogleFonts }; diff --git a/code/frameworks/nextjs/src/font/webpack/loader/utils/local-font-utils.ts b/code/frameworks/nextjs/src/font/webpack/loader/utils/local-font-utils.ts deleted file mode 100644 index d532f8dcc794..000000000000 --- a/code/frameworks/nextjs/src/font/webpack/loader/utils/local-font-utils.ts +++ /dev/null @@ -1,76 +0,0 @@ -import dedent from 'ts-dedent'; - -type FontOptions = { - src: Array<{ - path: string; - weight?: string; - style?: string; - ext: string; - format: string; - }>; - display: string; - weight?: string; - style?: string; - fallback?: string[]; - preload: boolean; - variable?: string; - adjustFontFallback?: string | false; - declarations?: Array<{ - prop: string; - value: string; - }>; -}; - -const trials = [ - { - module: '@next/font/dist/local/utils', - exportName: 'validateData', - description: 'Support @next/font prior to v13.2.5', - }, - { - module: '@next/font/dist/local/validate-local-font-function-call', - exportName: 'validateLocalFontFunctionCall', - description: 'Support @next/font since v13.2.5', - }, - { - module: 'next/dist/compiled/@next/font/dist/local/utils', - exportName: 'validateData', - description: 'Support next/font prior to v13.2.4', - }, - { - module: 'next/dist/compiled/@next/font/dist/local/validate-local-font-function-call', - exportName: 'validateLocalFontFunctionCall', - description: 'Support next/font since v13.2.4', - }, -]; - -const validateData: (functionName: string, fontData: any) => FontOptions = (() => { - // eslint-disable-next-line no-restricted-syntax - for (const { module, exportName } of trials) { - try { - const loadedModule = require(module); - if (exportName in loadedModule) { - return loadedModule[exportName]; - } - } catch { - // Continue to the next trial - } - } - - // Generate the dynamic error message - const errorDetails = trials - .map( - (trial) => - `- ${trial.description}: tries to import '${trial.exportName}' from '${trial.module}'` - ) - .join('\n'); - - throw new Error(dedent` - We were unable to load the helper functions to use next/font/local. The code attempted the following scenarios: - ${errorDetails} - - Please check your Next.js version and the module paths. If you resolve this issue for a version or setup not covered, consider contributing by updating the 'trials' array and making a pull request. - `); -})(); - -export { validateData }; diff --git a/code/frameworks/nextjs/src/images/next-future-image.tsx b/code/frameworks/nextjs/src/images/next-future-image.tsx deleted file mode 100644 index 306518079b38..000000000000 --- a/code/frameworks/nextjs/src/images/next-future-image.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import React from 'react'; -import type * as _NextImage from 'next/image'; -// eslint-disable-next-line @typescript-eslint/ban-ts-comment -// @ts-ignore import is aliased in webpack config -import OriginalNextFutureImage from 'sb-original/next/future/image'; - -// eslint-disable-next-line @typescript-eslint/ban-ts-comment -// @ts-ignore-error (this only errors during compilation for production) -// eslint-disable-next-line import/no-extraneous-dependencies -import { ImageContext as ImageContextValue } from '@storybook/nextjs/dist/image-context'; -import { type ImageContext as ImageContextType } from '../image-context'; -import { defaultLoader } from './next-image-default-loader'; - -const ImageContext = ImageContextValue as typeof ImageContextType; - -function NextFutureImage({ loader, ...props }: _NextImage.ImageProps) { - const imageParameters = React.useContext(ImageContext); - - return ( - - ); -} - -export default NextFutureImage; diff --git a/code/frameworks/nextjs/src/images/webpack.ts b/code/frameworks/nextjs/src/images/webpack.ts index e80e03545beb..31324d099e48 100644 --- a/code/frameworks/nextjs/src/images/webpack.ts +++ b/code/frameworks/nextjs/src/images/webpack.ts @@ -27,14 +27,6 @@ const configureImageDefaults = (baseConfig: WebpackConfig): void => { 'next/legacy/image': path.resolve(__dirname, './images/next-legacy-image'), }; } - - if (semver.satisfies(version, '^12.2.0')) { - resolve.alias = { - ...resolve.alias, - 'sb-original/next/future/image': require.resolve('next/future/image'), - 'next/future/image': path.resolve(__dirname, './images/next-future-image'), - }; - } }; const configureStaticImageImport = (baseConfig: WebpackConfig, nextConfig: NextConfig): void => { diff --git a/code/frameworks/nextjs/src/nextImport/webpack.ts b/code/frameworks/nextjs/src/nextImport/webpack.ts deleted file mode 100644 index 35f39a7069ed..000000000000 --- a/code/frameworks/nextjs/src/nextImport/webpack.ts +++ /dev/null @@ -1,40 +0,0 @@ -import type { Configuration as WebpackConfig } from 'webpack'; -import semver from 'semver'; -import { IgnorePlugin } from 'webpack'; -import { getNextjsVersion } from '../utils'; - -export function configureNextImport(baseConfig: WebpackConfig) { - const nextJSVersion = getNextjsVersion(); - - const isNext12 = semver.satisfies(nextJSVersion, '~12'); - const isNextVersionSmallerThan12dot2 = semver.lt(nextJSVersion, '12.2.0'); - const isNextVersionSmallerThan13 = semver.lt(nextJSVersion, '13.0.0'); - - baseConfig.plugins = baseConfig.plugins ?? []; - - if (!isNext12 || isNextVersionSmallerThan12dot2) { - baseConfig.plugins.push( - new IgnorePlugin({ - resourceRegExp: /next\/future\/image$/, - }) - ); - } - - if (isNextVersionSmallerThan13) { - baseConfig.plugins.push( - new IgnorePlugin({ - // ignore next/dist/shared/lib/hooks-client-context and next/legacy/image imports - resourceRegExp: - /(next\/dist\/shared\/lib\/hooks-client-context|next\/dist\/shared\/lib\/hooks-client-context\.shared-runtime|next\/legacy\/image)$/, - }) - ); - } - - if (isNextVersionSmallerThan12dot2) { - baseConfig.plugins.push( - new IgnorePlugin({ - resourceRegExp: /next\/dist\/shared\/lib\/app-router-context$/, - }) - ); - } -} diff --git a/code/frameworks/nextjs/src/preset.ts b/code/frameworks/nextjs/src/preset.ts index f29290209281..c12ed31877dd 100644 --- a/code/frameworks/nextjs/src/preset.ts +++ b/code/frameworks/nextjs/src/preset.ts @@ -11,12 +11,10 @@ import { configureStyledJsx } from './styledJsx/webpack'; import { configureImages } from './images/webpack'; import { configureRuntimeNextjsVersionResolution } from './utils'; import type { FrameworkOptions, StorybookConfig } from './types'; -import { configureNextImport } from './nextImport/webpack'; import TransformFontImports from './font/babel'; import { configureNextFont } from './font/webpack/configureNextFont'; import nextBabelPreset from './babel/preset'; import { configureNodePolyfills } from './nodePolyfills/webpack'; -import { configureAliasing } from './dependency-map'; import { configureSWCLoader } from './swc/loader'; export const addons: PresetProperty<'addons'> = [ @@ -142,9 +140,7 @@ export const webpackFinal: StorybookConfig['webpackFinal'] = async (baseConfig, configDir: options.configDir, }); - configureAliasing(baseConfig); configureNextFont(baseConfig, builder?.useSWC); - configureNextImport(baseConfig); configureRuntimeNextjsVersionResolution(baseConfig); configureImports({ baseConfig, configDir: options.configDir }); configureCss(baseConfig, nextConfig); diff --git a/code/frameworks/nextjs/src/routing/app-router-provider-mock.tsx b/code/frameworks/nextjs/src/routing/app-router-provider-mock.tsx deleted file mode 100644 index 38682dbcdaa6..000000000000 --- a/code/frameworks/nextjs/src/routing/app-router-provider-mock.tsx +++ /dev/null @@ -1,6 +0,0 @@ -import React from 'react'; - -// The mock is used for Next.js < 13, where the AppRouterProvider doesn't exist -export const AppRouterProvider: React.FC = ({ children }) => { - return <>{children}; -}; diff --git a/code/frameworks/nextjs/src/routing/decorator.tsx b/code/frameworks/nextjs/src/routing/decorator.tsx index 28f227bd259c..939c3ed0114b 100644 --- a/code/frameworks/nextjs/src/routing/decorator.tsx +++ b/code/frameworks/nextjs/src/routing/decorator.tsx @@ -1,9 +1,7 @@ import * as React from 'react'; import type { Addon_StoryContext } from '@storybook/types'; import { action } from '@storybook/addon-actions'; -// @ts-expect-error Using absolute path import to 1) avoid prebundling and 2) being able to substitute the module for Next.js < 13 -// eslint-disable-next-line import/no-extraneous-dependencies -import { AppRouterProvider } from '@storybook/nextjs/dist/routing/app-router-provider'; +import { AppRouterProvider } from './app-router-provider'; import { PageRouterProvider } from './page-router-provider'; import type { RouteParams, NextAppDirectory } from './types'; diff --git a/code/frameworks/nextjs/src/styledJsx/decorator.tsx b/code/frameworks/nextjs/src/styledJsx/decorator.tsx index d358ecf55a15..5e18664c9659 100644 --- a/code/frameworks/nextjs/src/styledJsx/decorator.tsx +++ b/code/frameworks/nextjs/src/styledJsx/decorator.tsx @@ -1,14 +1,5 @@ import * as React from 'react'; - -let StyleRegistry: React.FC; - -try { - // next >= v12 - StyleRegistry = require('styled-jsx').StyleRegistry; -} catch { - // next < v12 - StyleRegistry = React.Fragment; -} +import { StyleRegistry } from 'styled-jsx'; export const StyledJsxDecorator = (Story: React.FC): React.ReactNode => ( diff --git a/code/frameworks/nextjs/src/styledJsx/webpack.ts b/code/frameworks/nextjs/src/styledJsx/webpack.ts index 7594159659a2..891947ba41d7 100644 --- a/code/frameworks/nextjs/src/styledJsx/webpack.ts +++ b/code/frameworks/nextjs/src/styledJsx/webpack.ts @@ -1,17 +1,6 @@ -import semver from 'semver'; import type { Configuration as WebpackConfig } from 'webpack'; -import { addScopedAlias, getNextjsVersion } from '../utils'; +import { addScopedAlias } from '../utils'; export const configureStyledJsx = (baseConfig: WebpackConfig): void => { - const version = getNextjsVersion(); - if (semver.gte(version, '12.0.0')) { - addScopedAlias(baseConfig, 'styled-jsx'); - } else { - addScopedAlias(baseConfig, 'styled-jsx/babel'); - addScopedAlias(baseConfig, 'styled-jsx/css'); - addScopedAlias(baseConfig, 'styled-jsx/macro'); - addScopedAlias(baseConfig, 'styled-jsx/server'); - addScopedAlias(baseConfig, 'styled-jsx/style'); - addScopedAlias(baseConfig, 'styled-jsx/webpack'); - } + addScopedAlias(baseConfig, 'styled-jsx'); }; diff --git a/code/frameworks/nextjs/template/stories_nextjs-12-js/ImageFuture.stories.jsx b/code/frameworks/nextjs/template/stories_nextjs-12-js/ImageFuture.stories.jsx deleted file mode 100644 index aad2e8d56ac9..000000000000 --- a/code/frameworks/nextjs/template/stories_nextjs-12-js/ImageFuture.stories.jsx +++ /dev/null @@ -1,55 +0,0 @@ -import React from 'react'; -import Image from 'next/future/image'; - -import Accessibility from '../../assets/accessibility.svg'; - -export default { - component: Image, - args: { - src: Accessibility, - alt: 'Accessibility', - }, -}; - -export const Default = {}; - -export const BlurredPlaceholder = { - args: { - placeholder: 'blur', - }, -}; - -export const BlurredAbsolutePlaceholder = { - args: { - src: 'https://storybook.js.org/images/placeholders/50x50.png', - width: 50, - height: 50, - blurDataURL: - 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAABP5JREFUWEeNlwtz2zgMhEGKsv/k9XFp82xe11763yOJVGcXC4m2czM3GYa0E2s/LACSTi+vv1czM/7CvPpqxY/ejPeS3khmFiPHOiVLHKaZi4ux4j18GpMlS6cALupEQBCKQM4BdnGzjIcJgs//QBxAPQAem55f3yL4PWJIdyCyhlMfPdYZot0cwj3Ayg/5JwHA13paen7pADphxr/n5VI8JQsHCCGQ3gVGLLsxQ3h/LYSn5383B05rwNOws3Z576LOTOduvwfrOd5FtVat4akx0uPTrw8BNuUz23vLsY7hmg7i4ipqM2saiAdruNuirh4ff0bNdb3Qy3vkvfAQwrkHoDxTTZtDCOKrC1bMEkdnsQh/PLyetOGHkXeRAgQAQ84efQcBdUhvFofoulpdm9WGGTA+AJEe7l+i37a2c371tCFKs5zzJjxQNBMi1im7OCudP2aNghJuzZaGdSMEZjpwf/t0UgNdg9DOyLGLnY0BUHlzwVtNDkgEQhBeKkb1tUDgQrq7frwAiIJi5BKAeIFgHk5mOpPzvgltOfcoK0Rrs7lWHwsgqtXarK3N0u23h5Ne8+3Cqxn5RYSMfHCAMgDAx4CBWlA9RAGw0GA/ol0gvFB4WjAvBAFUa83SzdUdAbYMqp28uHpxCRefxwAYhksAFBlthxCiXig+zT4TYqkC+Hq7OdAfJv8lPpZiZShWBBIuRP+jspDb2lwcDkzz7OLzbO/zvAHAoXTz5eYMQL0t2yHAiCFcfPY1QDwNFylA5bPoFpsV9fsEiMl8dhcc4PP1CYD3drYcBYdIKQrx0cbRxd2JHSDcQ297/vvoZ5smRC+AyV2AQ+nm03evge08Tyy4jGqXzWWEoIvTgXHU38pWiNgH4ixB/ukAcy/xycXfp4kwdAAAt399W+OCgMjxILQacxvRQ3gEwHgKUIr/rz53CuDFNyP/Eob4+/vEWkBq6AAA/HIi62n/Lk67Q7wDYQ0UpQB7hc54T4E6gACLTYxeAwB0YKZL6U4ATEGIBwCs7qPfQJCCHkCnoK50noJKcXcAojsEAJZZKXhgCoziGKxqWV8IMNp4kP2aC+oB0TMFvhGxDQHQfIPhDrilwKOm/YCZASAHfgBABQjr3f7CyAkA0cPB03AQULRhKd4xAIjzHymo2Gp7gN0FAMAVOoA2fPz03a9ssh/RM7Iz8QKIzYF9HyB0XEZ1xJ4DzNoDOAfAslhDDTyjDfv8A2AcBeCiu/jBHQEgxnYW6Kp6BlCVAkQM8VnieF2Xyr0ivXy+XvsCzKOihwNHCCryw8HrQXVB8dgFeRfAVQiXjMbIIgXINQYB2H7Kf5wF/2Ar7h0AgKKGuAP4zOjhzlkLbpcRXKRZhNUjxG6HIQDOjN47gCn4+fWW3xVS9urPESEEwwHMo9IhAGxS2ISiA1iEnQOoA4hXRAwItp7WzL9Ow18ESJaw/ar4NgeOR49cAHCAnaH8swBhv+6CBGjeBSxEOUAI7HyKHkD4O9xKb3/feQouAI4uLBciHRRHmgbfA7h/xFc9AngNBADthvii1sMOiPwDAFeyt6s7FSFS4PmnA1v0vQvqDqQKAAPE/weAUuEgsj8c+H11Twdw/AKANXA82EDr5cJBEEzB3oI4Mb0AdR3nNw8vQnegWuvqAABwJFJEBwDgNdA7IOs3gL0LhuJdwBY8c4BfNnDdVgooHiOqn/b7JoSW/QODjTHXhU7hMQAAAABJRU5ErkJggg==', - placeholder: 'blur', - }, - parameters: { - // ignoring in Chromatic to avoid inconsistent snapshots - // given that the switch from blur to image is quite fast - chromatic: { disableSnapshot: true }, - }, -}; - -export const FilledParent = { - args: { - fill: true, - }, - decorator: [ - (Story) =>
{Story()}
, - ], -}; - -export const Sized = { - args: { - fill: true, - sizes: '(max-width: 600px) 100vw, 600px', - decorator: [ - (Story) =>
{Story()}
, - ], - }, -}; diff --git a/code/frameworks/nextjs/template/stories_nextjs-12-js/Link.stories.jsx b/code/frameworks/nextjs/template/stories_nextjs-12-js/Link.stories.jsx deleted file mode 100644 index 40631d5cf2f7..000000000000 --- a/code/frameworks/nextjs/template/stories_nextjs-12-js/Link.stories.jsx +++ /dev/null @@ -1,28 +0,0 @@ -import React from 'react'; -import Link from 'next/link'; - -const Component = () => ( - -); - -export default { - component: Component, -}; - -export const Default = {}; From 842db03286b28f6a0c7f49850ad7d6d0d4b23096 Mon Sep 17 00:00:00 2001 From: Valentin Palkovic Date: Mon, 4 Dec 2023 10:48:49 +0100 Subject: [PATCH 094/131] Drop Next.js 12 sandbox and introduce Next.js 13 sandbox --- code/lib/cli/src/sandbox-templates.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/lib/cli/src/sandbox-templates.ts b/code/lib/cli/src/sandbox-templates.ts index 86b28646fb10..8caf89fc8f3a 100644 --- a/code/lib/cli/src/sandbox-templates.ts +++ b/code/lib/cli/src/sandbox-templates.ts @@ -107,10 +107,10 @@ const baseTemplates = { builder: '@storybook/builder-webpack5', }, }, - 'nextjs/12-js': { - name: 'Next.js v12 (Webpack | JavaScript)', + 'nextjs/13-ts': { + name: 'Next.js v13.5 (Webpack | TypeScript)', script: - 'yarn create next-app {{beforeDir}} -e https://github.com/vercel/next.js/tree/next-12-3-2/examples/hello-world && cd {{beforeDir}} && npm pkg set "dependencies.next"="^12.2.0" && yarn && git add . && git commit --amend --no-edit && cd ..', + 'yarn create next-app {{beforeDir}} -e https://github.com/vercel/next.js/tree/next-13/examples/hello-world && cd {{beforeDir}} && npm pkg set "dependencies.next"="^12.2.0" && yarn && git add . && git commit --amend --no-edit && cd ..', expected: { framework: '@storybook/nextjs', renderer: '@storybook/react', From 6f805c329d8178a7f7bc2a5a14258a313b7b9158 Mon Sep 17 00:00:00 2001 From: Valentin Palkovic Date: Mon, 4 Dec 2023 11:04:18 +0100 Subject: [PATCH 095/131] Update lock file --- code/yarn.lock | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/code/yarn.lock b/code/yarn.lock index 02c9286dcc9a..551e676483a2 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -6002,14 +6002,11 @@ __metadata: typescript: "npm:^5.3.2" webpack: "npm:^5.65.0" peerDependencies: - "@next/font": ^13.0.0|| ^14.0.0 - next: ^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0 || ^13.0.0 || ^14.0.0 + next: ^13.5.0 || ^14.0.0 react: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 webpack: ^5.0.0 peerDependenciesMeta: - "@next/font": - optional: true typescript: optional: true webpack: From 4bc60185eb6997d7485ade32f6b39aeb06f1b190 Mon Sep 17 00:00:00 2001 From: Valentin Palkovic Date: Mon, 4 Dec 2023 12:38:31 +0100 Subject: [PATCH 096/131] Fix Migration document --- MIGRATION.md | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/MIGRATION.md b/MIGRATION.md index 90ed8504d39e..ae382420f682 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -12,14 +12,13 @@ - [React-docgen component analysis by default](#react-docgen-component-analysis-by-default) - [Framework-specific changes](#framework-specific-changes) - [Angular: Drop support for Angular \< 15](#angular-drop-support-for-angular--15) + - [Next.js: Drop support for version \< 13.5](#nextjs-drop-support-for-version--135) - [From version 7.5.0 to 7.6.0](#from-version-750-to-760) - [CommonJS with Vite is deprecated](#commonjs-with-vite-is-deprecated) - [Using implicit actions during rendering is deprecated](#using-implicit-actions-during-rendering-is-deprecated) - [typescript.skipBabel deprecated](#typescriptskipbabel-deprecated) - [Primary doc block accepts of prop](#primary-doc-block-accepts-of-prop) - [Addons no longer need a peer dependency on React](#addons-no-longer-need-a-peer-dependency-on-react) - - [Framework-specific changes](#framework-specific-changes) - - [Next.js: Drop support for Angular \< 13.5](#nextjs-drop-support-for-angular--135) - [From version 7.4.0 to 7.5.0](#from-version-740-to-750) - [`storyStoreV6` and `storiesOf` is deprecated](#storystorev6-and-storiesof-is-deprecated) - [`storyIndexers` is replaced with `experimental_indexers`](#storyindexers-is-replaced-with-experimental_indexers) @@ -470,6 +469,10 @@ For more information see: https://storybook.js.org/docs/react/api/main-config-ty Starting in 8.0, we drop support for Angular < 15 +#### Next.js: Drop support for version \< 13.5 + +Starting in 8.0, we drop support for Next.js < 13.5. + ## From version 7.5.0 to 7.6.0 #### CommonJS with Vite is deprecated @@ -558,12 +561,6 @@ const allGlobalPackages = [...globalManagerPackages, ...globalPreviewPackages]; We recommend checking out [the updates we've made to the addon-kit](https://github.com/storybookjs/addon-kit/pull/60/files#diff-8fed899bdbc24789a7bb4973574e624ed6207c6ce572338bc3c3e117672b2a20), that can serve as a base for the changes you can do in your own addon. These changes are not necessary for your addon to keep working, but they will remove the need for your users to unnecessary install `react` and `react-dom` to their projects, and they'll significantly reduce the install size of your addon. These changes should not be breaking for your users, unless you support Storybook pre-v7. -### Framework-specific changes - -#### Next.js: Drop support for Angular \< 13.5 - -Starting in 8.0, we drop support for Next.js < 13.5. - ## From version 7.4.0 to 7.5.0 #### `storyStoreV6` and `storiesOf` is deprecated From 597ccec1235c8e4d6004a35e00d3155b3aa8b219 Mon Sep 17 00:00:00 2001 From: Valentin Palkovic Date: Tue, 5 Dec 2023 10:33:24 +0100 Subject: [PATCH 097/131] Fix sandbox usage of Next.js 13 --- code/lib/cli/src/sandbox-templates.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/lib/cli/src/sandbox-templates.ts b/code/lib/cli/src/sandbox-templates.ts index 8caf89fc8f3a..7dd785f3f67a 100644 --- a/code/lib/cli/src/sandbox-templates.ts +++ b/code/lib/cli/src/sandbox-templates.ts @@ -599,7 +599,7 @@ export const daily: TemplateKey[] = [ 'lit-vite/default-js', 'svelte-kit/skeleton-js', 'svelte-vite/default-js', - 'nextjs/12-js', + 'nextjs/13-ts', 'nextjs/default-js', 'nextjs/prerelease', 'qwik-vite/default-ts', From a0baf400f6ce1b7a88187f391a3d8d1f59e0f66a Mon Sep 17 00:00:00 2001 From: Valentin Palkovic Date: Tue, 5 Dec 2023 10:47:05 +0100 Subject: [PATCH 098/131] Next.js: Set Next.js 13 sandbox to inDevelopment=true --- code/lib/cli/src/sandbox-templates.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/code/lib/cli/src/sandbox-templates.ts b/code/lib/cli/src/sandbox-templates.ts index 7dd785f3f67a..24fb3dc9846f 100644 --- a/code/lib/cli/src/sandbox-templates.ts +++ b/code/lib/cli/src/sandbox-templates.ts @@ -117,6 +117,7 @@ const baseTemplates = { builder: '@storybook/builder-webpack5', }, skipTasks: ['e2e-tests-dev', 'bench'], + inDevelopment: true, }, 'nextjs/default-js': { name: 'Next.js Latest (Webpack | JavaScript)', From 33aa426d264d8e2c66ca78e1ed3c2c1e407e5085 Mon Sep 17 00:00:00 2001 From: Valentin Palkovic Date: Tue, 5 Dec 2023 11:13:48 +0100 Subject: [PATCH 099/131] Fix parallelism config for CircleCI --- .circleci/config.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6db12bf41959..dac362b5530b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -614,22 +614,22 @@ workflows: requires: - build - create-sandboxes: - parallelism: 36 + parallelism: 35 requires: - build # - smoke-test-sandboxes: # disabled for now # requires: # - create-sandboxes - build-sandboxes: - parallelism: 36 + parallelism: 35 requires: - create-sandboxes - chromatic-sandboxes: - parallelism: 33 + parallelism: 32 requires: - build-sandboxes - e2e-production: - parallelism: 31 + parallelism: 30 requires: - build-sandboxes - e2e-dev: @@ -637,7 +637,7 @@ workflows: requires: - create-sandboxes - test-runner-production: - parallelism: 31 + parallelism: 30 requires: - build-sandboxes # TODO: reenable once we find out the source of flakyness From a9d54ca4bac76d02ff5a378c9683f7735c7045dd Mon Sep 17 00:00:00 2001 From: Shaun Lloyd Date: Tue, 5 Dec 2023 08:30:30 -0500 Subject: [PATCH 100/131] Create project in temp dir --- code/lib/cli/src/scaffold-new-project.ts | 34 +++++++++++++++++------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/code/lib/cli/src/scaffold-new-project.ts b/code/lib/cli/src/scaffold-new-project.ts index 833a4e74e335..16b84ab5c759 100644 --- a/code/lib/cli/src/scaffold-new-project.ts +++ b/code/lib/cli/src/scaffold-new-project.ts @@ -1,12 +1,13 @@ import boxen from 'boxen'; import chalk from 'chalk'; +import execa from 'execa'; +import { readdirSync, existsSync, move } from 'fs-extra'; import prompts from 'prompts'; +import * as tempy from 'tempy'; import dedent from 'ts-dedent'; -import execa from 'execa'; -import { readdirSync } from 'fs-extra'; -import { logger } from '@storybook/node-logger'; import { GenerateNewProjectOnInitError } from '@storybook/core-events/server-errors'; +import { logger } from '@storybook/node-logger'; import type { PackageManagerName } from './js-package-manager'; @@ -158,19 +159,32 @@ export const scaffoldNewProject = async (packageManager: PackageManagerName) => const projectDisplayName = buildProjectDisplayNameForPrint(projectStrategy); const createScript = projectStrategy.createScript[packageManagerName]; - try { - logger.line(1); - logger.plain( - `Creating a new "${projectDisplayName}" project with ${chalk.bold(packageManagerName)}...` - ); - logger.line(1); + const tempDir = tempy.directory(); + const targetDir = process.cwd(); + + logger.line(1); + logger.plain( + `Creating a new "${projectDisplayName}" project with ${chalk.bold(packageManagerName)}...` + ); + logger.line(1); + try { + // Create new project in temp directory await execa.command(createScript, { stdio: 'pipe', shell: true, - cwd: process.cwd(), + cwd: tempDir, cleanup: true, }); + + // If target directory has a .cache folder, move it to temp directory + // so that it's not overwritten by the move operation below + if (existsSync(`${targetDir}/.cache`)) { + await move(`${targetDir}/.cache`, `${tempDir}/.cache`); + } + + // Move temp directory to target directory + await move(`${tempDir}`, targetDir, { overwrite: true }); } catch (e) { throw new GenerateNewProjectOnInitError({ error: e, From 15fd3f5199d4bd192fa7fc7aa8580bde0a4ab522 Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Tue, 5 Dec 2023 14:44:43 +0100 Subject: [PATCH 101/131] use sandbox key instead of dir --- scripts/tasks/sandbox-parts.ts | 31 +++++++++++++++---------------- scripts/utils/yarn.ts | 7 ++++--- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/scripts/tasks/sandbox-parts.ts b/scripts/tasks/sandbox-parts.ts index 2abc403dffb7..d35edced9abc 100644 --- a/scripts/tasks/sandbox-parts.ts +++ b/scripts/tasks/sandbox-parts.ts @@ -39,6 +39,7 @@ import { JsPackageManagerFactory } from '../../code/lib/cli/src/js-package-manag import { workspacePath } from '../utils/workspace'; import { babelParse } from '../../code/lib/csf-tools/src/babelParse'; import { CODE_DIRECTORY, REPROS_DIRECTORY } from '../utils/constants'; +import type { TemplateKey } from '../../code/lib/cli/src/sandbox-templates'; const logger = console; @@ -75,7 +76,7 @@ export const create: Task['run'] = async ({ key, template, sandboxDir }, { dryRu } }; -export const install: Task['run'] = async ({ sandboxDir }, { link, dryRun, debug }) => { +export const install: Task['run'] = async ({ sandboxDir, key }, { link, dryRun, debug }) => { const cwd = sandboxDir; await installYarn2({ cwd, dryRun, debug }); @@ -93,24 +94,22 @@ export const install: Task['run'] = async ({ sandboxDir }, { link, dryRun, debug // of any storybook packages as verdaccio is not able to both proxy to npm and publish over // the top. In theory this could mask issues where different versions cause problems. await addPackageResolutions({ cwd, dryRun, debug }); - await configureYarn2ForVerdaccio({ cwd, dryRun, debug, sandboxDir }); + await configureYarn2ForVerdaccio({ cwd, dryRun, debug, key }); // Add vite plugin workarounds for frameworks that need it // (to support vite 5 without peer dep errors) - if ( - [ - 'bench-react-vite-default-ts', - 'bench-react-vite-default-ts-nodocs', - 'bench-react-vite-default-ts-test-build', - 'internal-ssv6-vite', - 'react-vite-default-js', - 'react-vite-default-ts', - 'svelte-vite-default-js', - 'svelte-vite-default-ts', - 'vue3-vite-default-js', - 'vue3-vite-default-ts', - ].includes(sandboxDir.split(sep).at(-1)) - ) { + const sandboxesNeedingWorkarounds: TemplateKey[] = [ + 'bench/react-vite-default-ts', + 'bench/react-vite-default-ts-nodocs', + 'bench/react-vite-default-ts-test-build', + 'react-vite/default-js', + 'react-vite/default-ts', + 'svelte-vite/default-js', + 'svelte-vite/default-ts', + 'vue3-vite/default-js', + 'vue3-vite/default-ts', + ]; + if (sandboxesNeedingWorkarounds.includes(key)) { await addWorkaroundResolutions({ cwd, dryRun, debug }); } diff --git a/scripts/utils/yarn.ts b/scripts/utils/yarn.ts index e29985623a6f..2f1fdc8b838e 100644 --- a/scripts/utils/yarn.ts +++ b/scripts/utils/yarn.ts @@ -1,6 +1,7 @@ import { pathExists, readJSON, writeJSON } from 'fs-extra'; import path from 'path'; +import type { TemplateKey } from 'get-template'; import { exec } from './exec'; // TODO -- should we generate this file a second time outside of CLI? import storybookVersions from '../../code/lib/cli/src/versions'; @@ -79,8 +80,8 @@ export const configureYarn2ForVerdaccio = async ({ cwd, dryRun, debug, - sandboxDir, -}: YarnOptions & { sandboxDir: string }) => { + key, +}: YarnOptions & { key: TemplateKey }) => { const command = [ // We don't want to use the cache or we might get older copies of our built packages // (with identical versions), as yarn (correctly I guess) assumes the same version hasn't changed @@ -96,7 +97,7 @@ export const configureYarn2ForVerdaccio = async ({ `yarn config set enableImmutableInstalls false`, ]; - if (sandboxDir.split(path.sep).at(-1) === 'svelte-kit-prerelease-ts') { + if (key === 'svelte-kit/prerelease-ts') { // Don't error with INCOMPATIBLE_PEER_DEPENDENCY for SvelteKit prerelease, it is expected command.push( `yarn config set logFilters --json '[ { "code": "YN0013", "level": "discard" } ]'` From 2a7bd55b1f3d3dc6172a005890fc73327a5590e3 Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Tue, 5 Dec 2023 15:01:47 +0100 Subject: [PATCH 102/131] upgrade svelte typings --- code/renderers/svelte/package.json | 2 +- code/renderers/svelte/src/typings.d.ts | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/code/renderers/svelte/package.json b/code/renderers/svelte/package.json index ee6c60b1bc70..c7b3ad589592 100644 --- a/code/renderers/svelte/package.json +++ b/code/renderers/svelte/package.json @@ -64,7 +64,7 @@ "devDependencies": { "expect-type": "^0.15.0", "svelte": "^5.0.0-next.15", - "svelte-check": "^3.6.0", + "svelte-check": "^3.6.1", "typescript": "^5.3.2" }, "peerDependencies": { diff --git a/code/renderers/svelte/src/typings.d.ts b/code/renderers/svelte/src/typings.d.ts index 109dcd62da0e..2e00d983aa34 100644 --- a/code/renderers/svelte/src/typings.d.ts +++ b/code/renderers/svelte/src/typings.d.ts @@ -1,2 +1,9 @@ declare var STORYBOOK_ENV: 'svelte'; declare var LOGLEVEL: 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'silent' | undefined; + +declare module '*.svelte' { + import type { ComponentType } from 'svelte'; + + const component: ComponentType; + export default component; +} From 9c786f8aa8f4a6888276a48ea906cf5154d3cb2a Mon Sep 17 00:00:00 2001 From: Kasper Peulen Date: Tue, 5 Dec 2023 15:12:41 +0100 Subject: [PATCH 103/131] Fix sandboxes --- .circleci/config.yml | 30 +++++++++++++-------------- code/lib/cli/src/sandbox-templates.ts | 14 ------------- 2 files changed, 15 insertions(+), 29 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6db12bf41959..e3f8ef172a8d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -504,19 +504,19 @@ workflows: requires: - unit-tests - create-sandboxes: - parallelism: 14 + parallelism: 13 requires: - build - build-sandboxes: - parallelism: 14 + parallelism: 13 requires: - create-sandboxes - chromatic-sandboxes: - parallelism: 11 + parallelism: 10 requires: - build-sandboxes - e2e-production: - parallelism: 9 + parallelism: 8 requires: - build-sandboxes - e2e-dev: @@ -524,7 +524,7 @@ workflows: requires: - create-sandboxes - test-runner-production: - parallelism: 9 + parallelism: 8 requires: - build-sandboxes - bench: @@ -560,19 +560,19 @@ workflows: requires: - unit-tests - create-sandboxes: - parallelism: 21 + parallelism: 20 requires: - build - build-sandboxes: - parallelism: 21 + parallelism: 20 requires: - create-sandboxes - chromatic-sandboxes: - parallelism: 18 + parallelism: 17 requires: - build-sandboxes - e2e-production: - parallelism: 16 + parallelism: 15 requires: - build-sandboxes - e2e-dev: @@ -580,7 +580,7 @@ workflows: requires: - create-sandboxes - test-runner-production: - parallelism: 16 + parallelism: 15 requires: - build-sandboxes - bench: @@ -614,22 +614,22 @@ workflows: requires: - build - create-sandboxes: - parallelism: 36 + parallelism: 34 requires: - build # - smoke-test-sandboxes: # disabled for now # requires: # - create-sandboxes - build-sandboxes: - parallelism: 36 + parallelism: 34 requires: - create-sandboxes - chromatic-sandboxes: - parallelism: 33 + parallelism: 31 requires: - build-sandboxes - e2e-production: - parallelism: 31 + parallelism: 29 requires: - build-sandboxes - e2e-dev: @@ -637,7 +637,7 @@ workflows: requires: - create-sandboxes - test-runner-production: - parallelism: 31 + parallelism: 29 requires: - build-sandboxes # TODO: reenable once we find out the source of flakyness diff --git a/code/lib/cli/src/sandbox-templates.ts b/code/lib/cli/src/sandbox-templates.ts index 86b28646fb10..57a1eabf1081 100644 --- a/code/lib/cli/src/sandbox-templates.ts +++ b/code/lib/cli/src/sandbox-templates.ts @@ -391,18 +391,6 @@ const baseTemplates = { // Remove smoke-test from the list once https://github.com/storybookjs/storybook/issues/19351 is fixed. skipTasks: ['smoke-test', 'e2e-tests-dev', 'bench'], }, - 'vue-cli/vue2-default-js': { - name: 'Vue CLI v2 (Webpack | JavaScript)', - script: - 'npx -p @vue/cli vue create {{beforeDir}} --default --packageManager=yarn --force --merge --preset="Default (Vue 2)" && cd {{beforeDir}} && echo "module.exports = {}" > webpack.config.js', - expected: { - framework: '@storybook/vue-webpack5', - renderer: '@storybook/vue', - builder: '@storybook/builder-webpack5', - }, - // Remove smoke-test from the list once https://github.com/storybookjs/storybook/issues/19351 is fixed. - skipTasks: ['smoke-test', 'e2e-tests-dev', 'bench'], - }, 'preact-webpack5/default-js': { name: 'Preact CLI Latest (Webpack | JavaScript)', script: @@ -567,7 +555,6 @@ export const normal: TemplateKey[] = [ 'react-vite/default-ts', 'angular-cli/default-ts', 'vue3-vite/default-ts', - 'vue-cli/vue2-default-js', 'lit-vite/default-ts', 'svelte-vite/default-ts', 'svelte-kit/skeleton-ts', @@ -594,7 +581,6 @@ export const daily: TemplateKey[] = [ 'cra/default-js', 'react-vite/default-js', 'vue3-vite/default-js', - 'vue2-vite/2.7-js', 'vue-cli/default-js', 'lit-vite/default-js', 'svelte-kit/skeleton-js', From f3766dc1c86bcf419a8ff00442dae08a68073884 Mon Sep 17 00:00:00 2001 From: Shaun Lloyd Date: Tue, 5 Dec 2023 09:13:48 -0500 Subject: [PATCH 104/131] Delete cache folder --- code/lib/cli/src/initiate.ts | 1 + code/lib/cli/src/scaffold-new-project.ts | 28 +++++++----------------- 2 files changed, 9 insertions(+), 20 deletions(-) diff --git a/code/lib/cli/src/initiate.ts b/code/lib/cli/src/initiate.ts index e74b208d1da2..ab0673d78357 100644 --- a/code/lib/cli/src/initiate.ts +++ b/code/lib/cli/src/initiate.ts @@ -360,6 +360,7 @@ async function doInitiate( projectType === ProjectType.ANGULAR ? `ng run ${installResult.projectName}:storybook` : packageManager.getRunStorybookCommand(); + logger.log( boxen( dedent` diff --git a/code/lib/cli/src/scaffold-new-project.ts b/code/lib/cli/src/scaffold-new-project.ts index 16b84ab5c759..eabd944373b8 100644 --- a/code/lib/cli/src/scaffold-new-project.ts +++ b/code/lib/cli/src/scaffold-new-project.ts @@ -1,9 +1,8 @@ import boxen from 'boxen'; import chalk from 'chalk'; import execa from 'execa'; -import { readdirSync, existsSync, move } from 'fs-extra'; +import { readdirSync, remove } from 'fs-extra'; import prompts from 'prompts'; -import * as tempy from 'tempy'; import dedent from 'ts-dedent'; import { GenerateNewProjectOnInitError } from '@storybook/core-events/server-errors'; @@ -159,32 +158,26 @@ export const scaffoldNewProject = async (packageManager: PackageManagerName) => const projectDisplayName = buildProjectDisplayNameForPrint(projectStrategy); const createScript = projectStrategy.createScript[packageManagerName]; - const tempDir = tempy.directory(); - const targetDir = process.cwd(); - logger.line(1); logger.plain( `Creating a new "${projectDisplayName}" project with ${chalk.bold(packageManagerName)}...` ); logger.line(1); + const targetDir = process.cwd(); + try { + // If target directory has a .cache folder, remove it + // so that it does not block the creation of the new project + await remove(`${targetDir}/.cache`); + // Create new project in temp directory await execa.command(createScript, { stdio: 'pipe', shell: true, - cwd: tempDir, + cwd: targetDir, cleanup: true, }); - - // If target directory has a .cache folder, move it to temp directory - // so that it's not overwritten by the move operation below - if (existsSync(`${targetDir}/.cache`)) { - await move(`${targetDir}/.cache`, `${tempDir}/.cache`); - } - - // Move temp directory to target directory - await move(`${tempDir}`, targetDir, { overwrite: true }); } catch (e) { throw new GenerateNewProjectOnInitError({ error: e, @@ -223,11 +216,6 @@ export const currentDirectoryIsEmpty = (packageManager: PackageManagerName) => { const packageManagerName = packageManagerToCoercedName(packageManager); const cwdFolderEntries = readdirSync(process.cwd()); - if (process.env.DEBUG) { - console.log('CWD entries:'); - console.log(cwdFolderEntries); - } - const filesToIgnore = IGNORED_FILES_BY_PACKAGE_MANAGER[packageManagerName]; return ( From ab31b0dbb615282d7b1a4803072b92c323341eba Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Tue, 5 Dec 2023 15:50:28 +0100 Subject: [PATCH 105/131] fix broken yarn.lock --- code/yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/yarn.lock b/code/yarn.lock index 19d697ad4eec..91c1d8694d6c 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -5966,12 +5966,12 @@ __metadata: linkType: soft "@storybook/icons@npm:^1.2.1": - version: 1.2.2 - resolution: "@storybook/icons@npm:1.2.2" + version: 1.2.3 + resolution: "@storybook/icons@npm:1.2.3" peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 - checksum: b879b87f6036270fdbafba8c762f051f8d7a12fa7af6482a3426d47c9b2a22c0bcd5d7b3298252933c0dc21e61e4694785efcb88059e7b3ee979fd77f6567451 + checksum: 510878cc80a844eb5b83460be8e71890743fb9fd70afb3cc46658d3324574d6389542a5dd078c5f613741193d0ac1ff7d2d83b33e447ee0fc1c3699d255ba225 languageName: node linkType: hard From ffbff85f9fccc74b14be5496964f83eba42a1f29 Mon Sep 17 00:00:00 2001 From: Shaun Lloyd Date: Tue, 5 Dec 2023 10:11:07 -0500 Subject: [PATCH 106/131] Cleanup --- .circleci/config.yml | 81 +++++++++++++-------------- code/lib/cli/src/dev.ts | 1 - code/lib/cli/src/generators/types.ts | 2 - code/lib/cli/src/sandbox-templates.ts | 31 +++++----- code/lib/cli/src/utils.ts | 1 - 5 files changed, 55 insertions(+), 61 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a7723ed00b27..c279d66e8bdd 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -688,52 +688,51 @@ workflows: when: equal: [daily, << pipeline.parameters.workflow >>] jobs: - # - pretty-docs + - pretty-docs - build - # - lint: - # requires: - # - build - # - check: - # requires: - # - build - # - unit-tests: - # requires: - # - build - # - script-checks: - # requires: - # - build - # - chromatic-internal-storybooks: - # requires: - # - build - # - create-sandboxes: - # parallelism: 36 - # requires: - # - build + - lint: + requires: + - build + - check: + requires: + - build + - unit-tests: + requires: + - build + - script-checks: + requires: + - build + - chromatic-internal-storybooks: + requires: + - build + - create-sandboxes: + parallelism: 36 + requires: + - build # - smoke-test-sandboxes: # disabled for now # requires: # - create-sandboxes - # - build-sandboxes: - # parallelism: 36 - # requires: - # - create-sandboxes - # - chromatic-sandboxes: - # parallelism: 33 - # requires: - # - build-sandboxes - # - e2e-production: - # parallelism: 31 - # requires: - # - build-sandboxes - # - e2e-dev: - # parallelism: 2 - # requires: - # - create-sandboxes - # - test-runner-production: - # parallelism: 31 - # requires: - # - build-sandboxes + - build-sandboxes: + parallelism: 36 + requires: + - create-sandboxes + - chromatic-sandboxes: + parallelism: 33 + requires: + - build-sandboxes + - e2e-production: + parallelism: 31 + requires: + - build-sandboxes + - e2e-dev: + parallelism: 2 + requires: + - create-sandboxes + - test-runner-production: + parallelism: 31 + requires: + - build-sandboxes - # TODO: Uncomment when ready to test - test-empty-init: requires: - build diff --git a/code/lib/cli/src/dev.ts b/code/lib/cli/src/dev.ts index ef507f9b9e34..ee82ae2cb7c4 100644 --- a/code/lib/cli/src/dev.ts +++ b/code/lib/cli/src/dev.ts @@ -38,7 +38,6 @@ function printError(error: any) { } export const dev = async (cliOptions: CLIOptions) => { - console.log('Hey there from dev!'); process.env.NODE_ENV = process.env.NODE_ENV || 'development'; const readUpResult = readUpSync({ cwd: __dirname }); diff --git a/code/lib/cli/src/generators/types.ts b/code/lib/cli/src/generators/types.ts index 79a0d7d8ecd9..2f97a34df126 100644 --- a/code/lib/cli/src/generators/types.ts +++ b/code/lib/cli/src/generators/types.ts @@ -55,6 +55,4 @@ export type CommandOptions = { disableTelemetry?: boolean; enableCrashReports?: boolean; debug?: boolean; - // Automatically pick new project template when creating a new project - scaffoldProject?: string; }; diff --git a/code/lib/cli/src/sandbox-templates.ts b/code/lib/cli/src/sandbox-templates.ts index c6eb3d068185..7137d40bb6f1 100644 --- a/code/lib/cli/src/sandbox-templates.ts +++ b/code/lib/cli/src/sandbox-templates.ts @@ -745,21 +745,21 @@ export const merged: TemplateKey[] = [ ]; const emptyTemplateKeys: TemplateKey[] = [ - // 'internal/npm/empty/react-vite/default-ts', - // 'internal/pnpm/empty/react-vite/default-ts', - // 'internal/yarn/empty/react-vite/default-ts', - // 'internal/npm/empty/nextjs/default-ts', - // 'internal/pnpm/empty/nextjs/default-ts', - // 'internal/yarn/empty/nextjs/default-ts', - // 'internal/npm/empty/vue3-vite/default-ts', - // 'internal/pnpm/empty/vue3-vite/default-ts', - // 'internal/yarn/empty/vue3-vite/default-ts', - // 'internal/npm/empty/angular-cli/default-ts', - // 'internal/pnpm/empty/angular-cli/default-ts', - // 'internal/yarn/empty/angular-cli/default-ts', - // 'internal/npm/empty/lit-vite/default-ts', - // 'internal/pnpm/empty/lit-vite/default-ts', - // 'internal/yarn/empty/lit-vite/default-ts', + 'internal/npm/empty/react-vite/default-ts', + 'internal/pnpm/empty/react-vite/default-ts', + 'internal/yarn/empty/react-vite/default-ts', + 'internal/npm/empty/nextjs/default-ts', + 'internal/pnpm/empty/nextjs/default-ts', + 'internal/yarn/empty/nextjs/default-ts', + 'internal/npm/empty/vue3-vite/default-ts', + 'internal/pnpm/empty/vue3-vite/default-ts', + 'internal/yarn/empty/vue3-vite/default-ts', + 'internal/npm/empty/angular-cli/default-ts', + 'internal/pnpm/empty/angular-cli/default-ts', + 'internal/yarn/empty/angular-cli/default-ts', + 'internal/npm/empty/lit-vite/default-ts', + 'internal/pnpm/empty/lit-vite/default-ts', + 'internal/yarn/empty/lit-vite/default-ts', ]; export const daily: TemplateKey[] = [ @@ -780,7 +780,6 @@ export const daily: TemplateKey[] = [ 'preact-webpack5/default-js', 'preact-vite/default-js', 'html-vite/default-js', - ...emptyTemplateKeys, ]; export const templatesByCadence = { normal, merged, daily }; diff --git a/code/lib/cli/src/utils.ts b/code/lib/cli/src/utils.ts index 68839b7bfa8d..fcd861860992 100644 --- a/code/lib/cli/src/utils.ts +++ b/code/lib/cli/src/utils.ts @@ -3,7 +3,6 @@ import { move, remove, writeFile, readFile, createWriteStream } from 'fs-extra'; import { join } from 'path'; import tempy from 'tempy'; import { rendererPackages } from '@storybook/core-common'; - import type { JsPackageManager } from './js-package-manager'; export function parseList(str: string): string[] { From b9b73babcdab987b13c1961731c922e858c8aced Mon Sep 17 00:00:00 2001 From: Kasper Peulen Date: Tue, 5 Dec 2023 16:35:43 +0100 Subject: [PATCH 107/131] Remove more references --- .circleci/config.yml | 30 +++++++++--------- code/e2e-tests/addon-docs.spec.ts | 3 -- .../src/automigrate/fixes/missing-babelrc.ts | 1 - .../helpers/new-frameworks-utils.ts | 4 --- code/lib/cli/src/detect.test.ts | 23 -------------- code/lib/cli/src/detect.ts | 2 -- code/lib/cli/src/generators/SFC_VUE/index.ts | 11 ------- code/lib/cli/src/generators/VUE/index.ts | 14 --------- code/lib/cli/src/generators/baseGenerator.ts | 1 - code/lib/cli/src/initiate.ts | 12 ------- code/lib/cli/src/project_types.ts | 31 ------------------- code/lib/cli/src/repro-generators/configs.ts | 18 ----------- code/lib/cli/src/sandbox-templates.ts | 11 ------- .../src/utils/get-storybook-info.ts | 3 -- 14 files changed, 15 insertions(+), 149 deletions(-) delete mode 100644 code/lib/cli/src/generators/SFC_VUE/index.ts delete mode 100644 code/lib/cli/src/generators/VUE/index.ts diff --git a/.circleci/config.yml b/.circleci/config.yml index dac362b5530b..3429809658b8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -504,19 +504,19 @@ workflows: requires: - unit-tests - create-sandboxes: - parallelism: 14 + parallelism: 13 requires: - build - build-sandboxes: - parallelism: 14 + parallelism: 13 requires: - create-sandboxes - chromatic-sandboxes: - parallelism: 11 + parallelism: 10 requires: - build-sandboxes - e2e-production: - parallelism: 9 + parallelism: 8 requires: - build-sandboxes - e2e-dev: @@ -524,7 +524,7 @@ workflows: requires: - create-sandboxes - test-runner-production: - parallelism: 9 + parallelism: 8 requires: - build-sandboxes - bench: @@ -560,19 +560,19 @@ workflows: requires: - unit-tests - create-sandboxes: - parallelism: 21 + parallelism: 20 requires: - build - build-sandboxes: - parallelism: 21 + parallelism: 20 requires: - create-sandboxes - chromatic-sandboxes: - parallelism: 18 + parallelism: 17 requires: - build-sandboxes - e2e-production: - parallelism: 16 + parallelism: 15 requires: - build-sandboxes - e2e-dev: @@ -580,7 +580,7 @@ workflows: requires: - create-sandboxes - test-runner-production: - parallelism: 16 + parallelism: 15 requires: - build-sandboxes - bench: @@ -614,22 +614,22 @@ workflows: requires: - build - create-sandboxes: - parallelism: 35 + parallelism: 33 requires: - build # - smoke-test-sandboxes: # disabled for now # requires: # - create-sandboxes - build-sandboxes: - parallelism: 35 + parallelism: 33 requires: - create-sandboxes - chromatic-sandboxes: - parallelism: 32 + parallelism: 30 requires: - build-sandboxes - e2e-production: - parallelism: 30 + parallelism: 28 requires: - build-sandboxes - e2e-dev: @@ -637,7 +637,7 @@ workflows: requires: - create-sandboxes - test-runner-production: - parallelism: 30 + parallelism: 28 requires: - build-sandboxes # TODO: reenable once we find out the source of flakyness diff --git a/code/e2e-tests/addon-docs.spec.ts b/code/e2e-tests/addon-docs.spec.ts index 30babefa2280..7edd143360ab 100644 --- a/code/e2e-tests/addon-docs.spec.ts +++ b/code/e2e-tests/addon-docs.spec.ts @@ -122,9 +122,6 @@ test.describe('addon-docs', () => { // - template: https://638db567ed97c3fb3e21cc22-ulhjwkqzzj.chromatic.com/?path=/docs/addons-docs-docspage-basic--docs // - real: https://638db567ed97c3fb3e21cc22-ulhjwkqzzj.chromatic.com/?path=/docs/example-button--docs 'lit-vite', - // Vue doesn't update when you change args, apparently fixed by this: - // https://github.com/storybookjs/storybook/pull/20995 - 'vue2-vite', ]; test.skip( new RegExp(`^${skipped.join('|')}`, 'i').test(`${templateName}`), diff --git a/code/lib/cli/src/automigrate/fixes/missing-babelrc.ts b/code/lib/cli/src/automigrate/fixes/missing-babelrc.ts index 14332f15b5f5..9d12ec658b1f 100644 --- a/code/lib/cli/src/automigrate/fixes/missing-babelrc.ts +++ b/code/lib/cli/src/automigrate/fixes/missing-babelrc.ts @@ -14,7 +14,6 @@ const logger = console; const frameworksThatNeedBabelConfig = [ '@storybook/react-webpack5', - '@storybook/vue-webpack5', '@storybook/vue3-webpack5', '@storybook/html-webpack5', '@storybook/web-components-webpack5', diff --git a/code/lib/cli/src/automigrate/helpers/new-frameworks-utils.ts b/code/lib/cli/src/automigrate/helpers/new-frameworks-utils.ts index e5fba48f2d71..7f62392c6839 100644 --- a/code/lib/cli/src/automigrate/helpers/new-frameworks-utils.ts +++ b/code/lib/cli/src/automigrate/helpers/new-frameworks-utils.ts @@ -24,10 +24,6 @@ export const packagesMap: Record = '@storybook/angular': { webpack5: '@storybook/angular', }, - '@storybook/vue': { - webpack5: '@storybook/vue-webpack5', - vite: '@storybook/vue-vite', - }, '@storybook/vue3': { webpack5: '@storybook/vue3-webpack5', vite: '@storybook/vue3-vite', diff --git a/code/lib/cli/src/detect.test.ts b/code/lib/cli/src/detect.test.ts index 7a78fa8fa536..1203d444e6d8 100644 --- a/code/lib/cli/src/detect.test.ts +++ b/code/lib/cli/src/detect.test.ts @@ -30,29 +30,6 @@ const MOCK_FRAMEWORK_FILES: { name: string; files: Record<'package.json', PackageJsonWithMaybeDeps> | Record; }[] = [ - { - name: ProjectType.SFC_VUE, - files: { - 'package.json': { - dependencies: { - vuetify: '1.0.0', - }, - devDependencies: { - 'vue-loader': '1.0.0', - }, - }, - }, - }, - { - name: ProjectType.VUE, - files: { - 'package.json': { - dependencies: { - vue: '1.0.0', - }, - }, - }, - }, { name: ProjectType.VUE3, files: { diff --git a/code/lib/cli/src/detect.ts b/code/lib/cli/src/detect.ts index dc02fbe4325b..733ed65e2974 100644 --- a/code/lib/cli/src/detect.ts +++ b/code/lib/cli/src/detect.ts @@ -127,8 +127,6 @@ export async function detectBuilder(packageManager: JsPackageManager, projectTyp // Fallback to Vite or Webpack based on project type switch (projectType) { - case ProjectType.SFC_VUE: - return CoreBuilder.Vite; case ProjectType.REACT_SCRIPTS: case ProjectType.ANGULAR: case ProjectType.REACT_NATIVE: // technically react native doesn't use webpack, we just want to set something diff --git a/code/lib/cli/src/generators/SFC_VUE/index.ts b/code/lib/cli/src/generators/SFC_VUE/index.ts deleted file mode 100644 index a3e2f15ea604..000000000000 --- a/code/lib/cli/src/generators/SFC_VUE/index.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { CoreBuilder } from '../../project_types'; -import { baseGenerator } from '../baseGenerator'; -import type { Generator } from '../types'; - -const generator: Generator = async (packageManager, npmOptions, options) => { - await baseGenerator(packageManager, npmOptions, options, 'vue', { - useSWC: ({ builder }) => builder === CoreBuilder.Webpack5, - }); -}; - -export default generator; diff --git a/code/lib/cli/src/generators/VUE/index.ts b/code/lib/cli/src/generators/VUE/index.ts deleted file mode 100644 index 6b771973a283..000000000000 --- a/code/lib/cli/src/generators/VUE/index.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { CoreBuilder } from '../../project_types'; -import { baseGenerator } from '../baseGenerator'; -import type { Generator } from '../types'; - -const generator: Generator = async (packageManager, npmOptions, options) => { - await baseGenerator(packageManager, npmOptions, options, 'vue', { - extraPackages: async ({ builder }) => { - return builder === CoreBuilder.Webpack5 ? ['vue-loader@^15.7.0'] : []; - }, - useSWC: ({ builder }) => builder === CoreBuilder.Webpack5, - }); -}; - -export default generator; diff --git a/code/lib/cli/src/generators/baseGenerator.ts b/code/lib/cli/src/generators/baseGenerator.ts index 813ba2d1dd59..43fbbe9c3a67 100644 --- a/code/lib/cli/src/generators/baseGenerator.ts +++ b/code/lib/cli/src/generators/baseGenerator.ts @@ -337,7 +337,6 @@ export async function baseGenerator( if (builder !== CoreBuilder.Vite && !skipBabel) { const frameworksThatNeedBabelConfig = [ '@storybook/react-webpack5', - '@storybook/vue-webpack5', '@storybook/vue3-webpack5', '@storybook/html-webpack5', '@storybook/web-components-webpack5', diff --git a/code/lib/cli/src/initiate.ts b/code/lib/cli/src/initiate.ts index 8811b88c5d85..c3f04ea89964 100644 --- a/code/lib/cli/src/initiate.ts +++ b/code/lib/cli/src/initiate.ts @@ -19,8 +19,6 @@ import reactGenerator from './generators/REACT'; import reactNativeGenerator from './generators/REACT_NATIVE'; import reactScriptsGenerator from './generators/REACT_SCRIPTS'; import nextjsGenerator from './generators/NEXTJS'; -import sfcVueGenerator from './generators/SFC_VUE'; -import vueGenerator from './generators/VUE'; import vue3Generator from './generators/VUE3'; import webpackReactGenerator from './generators/WEBPACK_REACT'; import htmlGenerator from './generators/HTML'; @@ -100,16 +98,6 @@ const installStorybook = async ( commandLog('Adding Storybook support to your "Next" app') ); - case ProjectType.SFC_VUE: - return sfcVueGenerator(packageManager, npmOptions, generatorOptions).then( - commandLog('Adding Storybook support to your "Single File Components Vue" app') - ); - - case ProjectType.VUE: - return vueGenerator(packageManager, npmOptions, generatorOptions).then( - commandLog('Adding Storybook support to your "Vue" app') - ); - case ProjectType.VUE3: return vue3Generator(packageManager, npmOptions, generatorOptions).then( commandLog('Adding Storybook support to your "Vue 3" app') diff --git a/code/lib/cli/src/project_types.ts b/code/lib/cli/src/project_types.ts index 8d2809f97379..5933d2ab13d6 100644 --- a/code/lib/cli/src/project_types.ts +++ b/code/lib/cli/src/project_types.ts @@ -1,13 +1,5 @@ import { minVersion, validRange } from 'semver'; -function ltMajor(versionRange: string, major: number) { - // Uses validRange to avoid a throw from minVersion if an invalid range gets passed - if (validRange(versionRange)) { - return (minVersion(versionRange)?.major ?? Infinity) < major; - } - return false; -} - function eqMajor(versionRange: string, major: number) { // Uses validRange to avoid a throw from minVersion if an invalid range gets passed if (validRange(versionRange)) { @@ -70,9 +62,7 @@ export enum ProjectType { REACT_PROJECT = 'REACT_PROJECT', WEBPACK_REACT = 'WEBPACK_REACT', NEXTJS = 'NEXTJS', - VUE = 'VUE', VUE3 = 'VUE3', - SFC_VUE = 'SFC_VUE', ANGULAR = 'ANGULAR', EMBER = 'EMBER', WEB_COMPONENTS = 'WEB_COMPONENTS', @@ -123,27 +113,6 @@ export type TemplateConfiguration = { * therefore WEBPACK_REACT has to come first, as it's more specific. */ export const supportedTemplates: TemplateConfiguration[] = [ - { - preset: ProjectType.SFC_VUE, - dependencies: { - 'vue-loader': (versionRange) => ltMajor(versionRange, 16), - vuetify: (versionRange) => ltMajor(versionRange, 3), - }, - matcherFunction: ({ dependencies }) => { - return dependencies?.some(Boolean) ?? false; - }, - }, - { - preset: ProjectType.VUE, - // This Vue template only works with Vue or Nuxt under v3 - dependencies: { - vue: (versionRange) => ltMajor(versionRange, 3), - nuxt: (versionRange) => ltMajor(versionRange, 3), - }, - matcherFunction: ({ dependencies }) => { - return dependencies?.some(Boolean) ?? false; - }, - }, { preset: ProjectType.VUE3, dependencies: { diff --git a/code/lib/cli/src/repro-generators/configs.ts b/code/lib/cli/src/repro-generators/configs.ts index b3cd46836fbf..b95e65a18a87 100644 --- a/code/lib/cli/src/repro-generators/configs.ts +++ b/code/lib/cli/src/repro-generators/configs.ts @@ -217,16 +217,6 @@ export const web_components_lit2: Parameters = { // #region vue -export const vue: Parameters = { - renderer: 'vue', - name: 'vue', - version: 'latest', - generator: [ - // vue2 with webpack5 - `npx -p @vue/cli vue create {{appName}} --default --packageManager=yarn --force --merge --preset="Default (Vue 2)"`, - ].join(' && '), -}; - export const vue3: Parameters = { renderer: 'vue3', name: 'vue3', @@ -263,14 +253,6 @@ export const preact_vite: Parameters = { generator: 'yarn create vite@{{version}} {{appName}} --template preact', }; -export const sfcVue: Parameters = { - renderer: 'vue', - name: 'sfcVue', - version: 'latest', - // - generator: fromDeps('vue@2.6', 'vue-loader@15.9', 'vue-template-compiler@2.6', 'webpack'), -}; - export const svelte: Parameters = { renderer: 'svelte', name: 'svelte', diff --git a/code/lib/cli/src/sandbox-templates.ts b/code/lib/cli/src/sandbox-templates.ts index 446b557119b7..7cbe63ea95e7 100644 --- a/code/lib/cli/src/sandbox-templates.ts +++ b/code/lib/cli/src/sandbox-templates.ts @@ -237,17 +237,6 @@ const baseTemplates = { }, skipTasks: ['e2e-tests-dev', 'bench'], }, - 'vue2-vite/2.7-js': { - name: 'Vue v2 (Vite | JavaScript)', - script: 'npx create-vue@2 {{beforeDir}} --default', - expected: { - framework: '@storybook/vue-vite', - renderer: '@storybook/vue', - builder: '@storybook/builder-vite', - }, - // Remove smoke-test from the list once https://github.com/storybookjs/storybook/issues/19351 is fixed. - skipTasks: ['smoke-test', 'e2e-tests-dev', 'bench'], - }, 'html-webpack/default': { name: 'HTML Latest (Webpack | JavaScript)', script: 'yarn create webpack5-html {{beforeDir}}', diff --git a/code/lib/core-common/src/utils/get-storybook-info.ts b/code/lib/core-common/src/utils/get-storybook-info.ts index 8d97fed4d3ed..dd462a6b0370 100644 --- a/code/lib/core-common/src/utils/get-storybook-info.ts +++ b/code/lib/core-common/src/utils/get-storybook-info.ts @@ -5,7 +5,6 @@ import { getStorybookConfiguration } from './get-storybook-configuration'; export const rendererPackages: Record = { '@storybook/react': 'react', - '@storybook/vue': 'vue', '@storybook/vue3': 'vue3', '@storybook/angular': 'angular', '@storybook/html': 'html', @@ -36,8 +35,6 @@ export const frameworkPackages: Record = { '@storybook/sveltekit': 'sveltekit', '@storybook/vue3-vite': 'vue3-vite', '@storybook/vue3-webpack5': 'vue3-webpack5', - '@storybook/vue-vite': 'vue-vite', - '@storybook/vue-webpack5': 'vue-webpack5', '@storybook/web-components-vite': 'web-components-vite', '@storybook/web-components-webpack5': 'web-components-webpack5', // community (outside of monorepo) From b4bbcfd5ae876f8d69f42615c0581cd3bf0e7b6e Mon Sep 17 00:00:00 2001 From: jonniebigodes Date: Tue, 5 Dec 2023 15:41:12 +0000 Subject: [PATCH 108/131] Docs: Fix Typo in A11y snippet --- .../common/storybook-addon-a11y-component-config.ts-4-9.mdx | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/snippets/common/storybook-addon-a11y-component-config.ts-4-9.mdx b/docs/snippets/common/storybook-addon-a11y-component-config.ts-4-9.mdx index dfd6f9b27b40..052bff290c02 100644 --- a/docs/snippets/common/storybook-addon-a11y-component-config.ts-4-9.mdx +++ b/docs/snippets/common/storybook-addon-a11y-component-config.ts-4-9.mdx @@ -4,8 +4,6 @@ // Replace your-framework with the name of your framework import type { Meta } from '@storybook/your-framework'; -import { userEvent, within } from '@storybook/test'; - import { MyComponent } from './MyComponent'; const meta = { From 1f91ca240d853a1e52aade05f1268ed19c5d209f Mon Sep 17 00:00:00 2001 From: Kasper Peulen Date: Tue, 5 Dec 2023 17:03:57 +0100 Subject: [PATCH 109/131] Fix unit tests --- .../automigrate/fixes/new-frameworks.test.ts | 22 +++++++++---------- .../helpers/mainConfigFile.test.ts | 4 ++-- code/lib/cli/src/project_types.ts | 2 -- 3 files changed, 13 insertions(+), 15 deletions(-) diff --git a/code/lib/cli/src/automigrate/fixes/new-frameworks.test.ts b/code/lib/cli/src/automigrate/fixes/new-frameworks.test.ts index 5e63d6d22fff..413ffb2f9363 100644 --- a/code/lib/cli/src/automigrate/fixes/new-frameworks.test.ts +++ b/code/lib/cli/src/automigrate/fixes/new-frameworks.test.ts @@ -258,7 +258,7 @@ describe('new-frameworks fix', () => { it('should update correctly when there is no builder', async () => { const packageManager = getPackageManager({ - '@storybook/vue': '7.0.0', + '@storybook/vue3': '7.0.0', '@storybook/builder-webpack5': '7.0.0', }); @@ -266,13 +266,13 @@ describe('new-frameworks fix', () => { checkNewFrameworks({ packageManager, main: { - framework: '@storybook/vue', + framework: '@storybook/vue3', }, }) ).resolves.toEqual( expect.objectContaining({ - frameworkPackage: '@storybook/vue-webpack5', - dependenciesToAdd: ['@storybook/vue-webpack5'], + frameworkPackage: '@storybook/vue3-webpack5', + dependenciesToAdd: ['@storybook/vue3-webpack5'], dependenciesToRemove: ['@storybook/builder-webpack5'], }) ); @@ -280,7 +280,7 @@ describe('new-frameworks fix', () => { it('should update when there is no framework field in main', async () => { const packageManager = getPackageManager({ - '@storybook/vue': '7.0.0', + '@storybook/vue3': '7.0.0', '@storybook/manager-webpack5': '7.0.0', }); @@ -291,8 +291,8 @@ describe('new-frameworks fix', () => { }) ).resolves.toEqual( expect.objectContaining({ - frameworkPackage: '@storybook/vue-webpack5', - dependenciesToAdd: ['@storybook/vue-webpack5'], + frameworkPackage: '@storybook/vue3-webpack5', + dependenciesToAdd: ['@storybook/vue3-webpack5'], dependenciesToRemove: ['@storybook/manager-webpack5'], hasFrameworkInMainConfig: false, }) @@ -301,7 +301,7 @@ describe('new-frameworks fix', () => { it('should update when the framework field has a legacy value', async () => { const packageManager = getPackageManager({ - '@storybook/vue': '7.0.0', + '@storybook/vue3': '7.0.0', '@storybook/manager-webpack5': '7.0.0', }); @@ -309,13 +309,13 @@ describe('new-frameworks fix', () => { checkNewFrameworks({ packageManager, main: { - framework: 'vue', + framework: 'vue3', }, }) ).resolves.toEqual( expect.objectContaining({ - frameworkPackage: '@storybook/vue-webpack5', - dependenciesToAdd: ['@storybook/vue-webpack5'], + frameworkPackage: '@storybook/vue3-webpack5', + dependenciesToAdd: ['@storybook/vue3-webpack5'], dependenciesToRemove: ['@storybook/manager-webpack5'], hasFrameworkInMainConfig: false, }) diff --git a/code/lib/cli/src/automigrate/helpers/mainConfigFile.test.ts b/code/lib/cli/src/automigrate/helpers/mainConfigFile.test.ts index 1d1d4c2095ac..5320d97e5dac 100644 --- a/code/lib/cli/src/automigrate/helpers/mainConfigFile.test.ts +++ b/code/lib/cli/src/automigrate/helpers/mainConfigFile.test.ts @@ -146,8 +146,8 @@ describe('getRendererPackageNameFromFramework', () => { }); it('should return the corresponding key of rendererPackages if the value is the same as the frameworkPackageName', () => { - const frameworkPackageName = 'vue'; - const expectedPackageName = '@storybook/vue'; + const frameworkPackageName = 'vue3'; + const expectedPackageName = '@storybook/vue3'; const packageName = getRendererPackageNameFromFramework(frameworkPackageName); expect(packageName).toBe(expectedPackageName); }); diff --git a/code/lib/cli/src/project_types.ts b/code/lib/cli/src/project_types.ts index 5933d2ab13d6..8f1f07b3ae0f 100644 --- a/code/lib/cli/src/project_types.ts +++ b/code/lib/cli/src/project_types.ts @@ -28,7 +28,6 @@ export type SupportedFrameworks = 'nextjs' | 'angular' | 'sveltekit' | 'qwik' | export type SupportedRenderers = | 'react' | 'react-native' - | 'vue' | 'vue3' | 'angular' | 'ember' @@ -43,7 +42,6 @@ export type SupportedRenderers = export const SUPPORTED_RENDERERS: SupportedRenderers[] = [ 'react', 'react-native', - 'vue', 'vue3', 'angular', 'ember', From 98d1598503a7e8fa2c5d97225c1219c02e162d94 Mon Sep 17 00:00:00 2001 From: Shaun Lloyd Date: Tue, 5 Dec 2023 11:04:44 -0500 Subject: [PATCH 110/131] Comment out empty templates --- code/lib/cli/src/sandbox-templates.ts | 35 ++++++++++++++------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/code/lib/cli/src/sandbox-templates.ts b/code/lib/cli/src/sandbox-templates.ts index 7137d40bb6f1..7f5f68561eb4 100644 --- a/code/lib/cli/src/sandbox-templates.ts +++ b/code/lib/cli/src/sandbox-templates.ts @@ -744,23 +744,24 @@ export const merged: TemplateKey[] = [ 'html-vite/default-ts', ]; -const emptyTemplateKeys: TemplateKey[] = [ - 'internal/npm/empty/react-vite/default-ts', - 'internal/pnpm/empty/react-vite/default-ts', - 'internal/yarn/empty/react-vite/default-ts', - 'internal/npm/empty/nextjs/default-ts', - 'internal/pnpm/empty/nextjs/default-ts', - 'internal/yarn/empty/nextjs/default-ts', - 'internal/npm/empty/vue3-vite/default-ts', - 'internal/pnpm/empty/vue3-vite/default-ts', - 'internal/yarn/empty/vue3-vite/default-ts', - 'internal/npm/empty/angular-cli/default-ts', - 'internal/pnpm/empty/angular-cli/default-ts', - 'internal/yarn/empty/angular-cli/default-ts', - 'internal/npm/empty/lit-vite/default-ts', - 'internal/pnpm/empty/lit-vite/default-ts', - 'internal/yarn/empty/lit-vite/default-ts', -]; +// For if we want to use empty sandboxes to test empty init +// const emptyTemplateKeys: TemplateKey[] = [ +// 'internal/npm/empty/react-vite/default-ts', +// 'internal/pnpm/empty/react-vite/default-ts', +// 'internal/yarn/empty/react-vite/default-ts', +// 'internal/npm/empty/nextjs/default-ts', +// 'internal/pnpm/empty/nextjs/default-ts', +// 'internal/yarn/empty/nextjs/default-ts', +// 'internal/npm/empty/vue3-vite/default-ts', +// 'internal/pnpm/empty/vue3-vite/default-ts', +// 'internal/yarn/empty/vue3-vite/default-ts', +// 'internal/npm/empty/angular-cli/default-ts', +// 'internal/pnpm/empty/angular-cli/default-ts', +// 'internal/yarn/empty/angular-cli/default-ts', +// 'internal/npm/empty/lit-vite/default-ts', +// 'internal/pnpm/empty/lit-vite/default-ts', +// 'internal/yarn/empty/lit-vite/default-ts', +// ]; export const daily: TemplateKey[] = [ ...merged, From 184b5d66f7313422b0baa9bd200594fc98a245eb Mon Sep 17 00:00:00 2001 From: Kasper Peulen Date: Tue, 5 Dec 2023 18:27:05 +0100 Subject: [PATCH 111/131] Fix frameworksToRenderer --- code/lib/cli/src/helpers.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/code/lib/cli/src/helpers.ts b/code/lib/cli/src/helpers.ts index 605fab2d1849..3e9361f061c0 100644 --- a/code/lib/cli/src/helpers.ts +++ b/code/lib/cli/src/helpers.ts @@ -206,8 +206,7 @@ const frameworkToRenderer: Record Date: Wed, 6 Dec 2023 01:52:39 +0800 Subject: [PATCH 112/131] Fix typo --- code/lib/types/src/modules/core-common.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/lib/types/src/modules/core-common.ts b/code/lib/types/src/modules/core-common.ts index d81e605f1edd..4eb9119b74c4 100644 --- a/code/lib/types/src/modules/core-common.ts +++ b/code/lib/types/src/modules/core-common.ts @@ -397,7 +397,7 @@ export interface StorybookConfigRaw { disallowImplicitActionsInRenderV8?: boolean; /** - * Eneable asynchronous component rendering in NextJS framework + * Enable asynchronous component rendering in NextJS framework */ experimentalNextRSC?: boolean; }; From cfade04148b7d0ccc2ea5d75abaf910eb9459604 Mon Sep 17 00:00:00 2001 From: storybook-bot <32066757+storybook-bot@users.noreply.github.com> Date: Tue, 5 Dec 2023 17:55:47 +0000 Subject: [PATCH 113/131] Write changelog for 8.0.0-alpha.1 [skip ci] --- CHANGELOG.prerelease.md | 24 ++++++++++++++++++++++++ code/package.json | 3 ++- docs/versions/next.json | 7 +------ 3 files changed, 27 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.prerelease.md b/CHANGELOG.prerelease.md index 5ef41fa93384..cae24fdc0f31 100644 --- a/CHANGELOG.prerelease.md +++ b/CHANGELOG.prerelease.md @@ -1,3 +1,27 @@ +## 8.0.0-alpha.1 + +- Angular: Drop v14.x support - [#25101](https://github.com/storybookjs/storybook/pull/25101), thanks [@valentinpalkovic](https://github.com/valentinpalkovic)! +- Angular: Fix CSF Plugin - [#25098](https://github.com/storybookjs/storybook/pull/25098), thanks [@valentinpalkovic](https://github.com/valentinpalkovic)! +- Build: Fix Angular sandbox - [#23896](https://github.com/storybookjs/storybook/pull/23896), thanks [@Marklb](https://github.com/Marklb)! +- CLI: Improve dependency metadata detection in storybook doctor - [#25037](https://github.com/storybookjs/storybook/pull/25037), thanks [@yannbf](https://github.com/yannbf)! +- CLI: Point the update-notice to the changelog in the suggested version - [#19911](https://github.com/storybookjs/storybook/pull/19911), thanks [@cprecioso](https://github.com/cprecioso)! +- CLI: Typescript strict mode - [#22254](https://github.com/storybookjs/storybook/pull/22254), thanks [@0916dhkim](https://github.com/0916dhkim)! +- CSF: Autotitle fix multiple dots and handle stories.js - [#21840](https://github.com/storybookjs/storybook/pull/21840), thanks [@agriffis](https://github.com/agriffis)! +- Next.js: Add next/font/local declarations support - [#24983](https://github.com/storybookjs/storybook/pull/24983), thanks [@MauricioRobayo](https://github.com/MauricioRobayo)! +- Next.js: Drop Next.js < v13.5 support - [#25104](https://github.com/storybookjs/storybook/pull/25104), thanks [@valentinpalkovic](https://github.com/valentinpalkovic)! +- Next.js: Fix AppRouterProvider usage - [#25032](https://github.com/storybookjs/storybook/pull/25032), thanks [@valentinpalkovic](https://github.com/valentinpalkovic)! +- Next.js: Fix next/font/local usage in babel mode - [#25045](https://github.com/storybookjs/storybook/pull/25045), thanks [@valentinpalkovic](https://github.com/valentinpalkovic)! +- Next.js: Update validateData function for next/font compatibility - [#25061](https://github.com/storybookjs/storybook/pull/25061), thanks [@kkirby](https://github.com/kkirby)! +- NextJS: Add experimental RSC support - [#25091](https://github.com/storybookjs/storybook/pull/25091), thanks [@shilman](https://github.com/shilman)! +- React-Docgen: Make error-handling more gentle - [#25055](https://github.com/storybookjs/storybook/pull/25055), thanks [@valentinpalkovic](https://github.com/valentinpalkovic)! +- React: Change `StoryFnReactReturnType` to `JSX.Element` - [#23204](https://github.com/storybookjs/storybook/pull/23204), thanks [@chakAs3](https://github.com/chakAs3)! +- React: Set `react-docgen` to default TS docgen - [#24165](https://github.com/storybookjs/storybook/pull/24165), thanks [@shilman](https://github.com/shilman)! +- SvelteKit: Fix HMR not working - [#25031](https://github.com/storybookjs/storybook/pull/25031), thanks [@JReinhold](https://github.com/JReinhold)! +- TypeScript: Migrate `@storybook/docs-tools` to strict TS - [#22567](https://github.com/storybookjs/storybook/pull/22567), thanks [@efrenaragon96](https://github.com/efrenaragon96)! +- UI: Add stricter types to the language property of the SyntaxHighlighter - [#22790](https://github.com/storybookjs/storybook/pull/22790), thanks [@valentinpalkovic](https://github.com/valentinpalkovic)! +- Viewport: Fix viewport dts files - [#25107](https://github.com/storybookjs/storybook/pull/25107), thanks [@kasperpeulen](https://github.com/kasperpeulen)! +- Webpack: Fix exclude regex in react-docgen-loader - [#25030](https://github.com/storybookjs/storybook/pull/25030), thanks [@valentinpalkovic](https://github.com/valentinpalkovic)! + ## 8.0.0-alpha.0 - Addon Viewport: Expose types for user parameter validation - [#24896](https://github.com/storybookjs/storybook/pull/24896), thanks [@piratetaco](https://github.com/piratetaco)! diff --git a/code/package.json b/code/package.json index e85ffa0607f6..2693b812c8b8 100644 --- a/code/package.json +++ b/code/package.json @@ -320,5 +320,6 @@ "Dependency Upgrades" ] ] - } + }, + "deferredNextVersion": "8.0.0-alpha.1" } diff --git a/docs/versions/next.json b/docs/versions/next.json index 04ba002fe458..fae3915b5229 100644 --- a/docs/versions/next.json +++ b/docs/versions/next.json @@ -1,6 +1 @@ -{ - "version": "8.0.0-alpha.0", - "info": { - "plain": "- Addon Viewport: Expose types for user parameter validation - [#24896](https://github.com/storybookjs/storybook/pull/24896), thanks [@piratetaco](https://github.com/piratetaco)!\n- Build: Remove unused/deprecated packages - [#24528](https://github.com/storybookjs/storybook/pull/24528), thanks [@ndelangen](https://github.com/ndelangen)!\n- Builder-Vite: use user's build.target - [#23123](https://github.com/storybookjs/storybook/pull/23123), thanks [@Hoishin](https://github.com/Hoishin)!\n- CLI: Remove `sb extract` command - [#24653](https://github.com/storybookjs/storybook/pull/24653), thanks [@ndelangen](https://github.com/ndelangen)!\n- Core: Improve project root detection logic - [#20791](https://github.com/storybookjs/storybook/pull/20791), thanks [@dobesv](https://github.com/dobesv)!\n- Core: Prebundling globalize the core-event sub paths - [#24976](https://github.com/storybookjs/storybook/pull/24976), thanks [@ndelangen](https://github.com/ndelangen)!\n- Core: Remove `storiesOf`-API - [#24655](https://github.com/storybookjs/storybook/pull/24655), thanks [@ndelangen](https://github.com/ndelangen)!\n- Core: StorybookConfig `stories`-field support type async function - [#21555](https://github.com/storybookjs/storybook/pull/21555), thanks [@imccausl](https://github.com/imccausl)!\n- Dependencies: Update Typescript - [#24970](https://github.com/storybookjs/storybook/pull/24970), thanks [@valentinpalkovic](https://github.com/valentinpalkovic)!\n- Dependencies: Upgrade monorepo to TS5 - [#24440](https://github.com/storybookjs/storybook/pull/24440), thanks [@ndelangen](https://github.com/ndelangen)!\n- Maintenance: Migrate `@storybook/preset-create-react-app` to strict TS - [#22395](https://github.com/storybookjs/storybook/pull/22395), thanks [@kuriacka](https://github.com/kuriacka)!\n- Manager: Enable refs filtered via `experimental_setFilter` - [#24211](https://github.com/storybookjs/storybook/pull/24211), thanks [@ndelangen](https://github.com/ndelangen)!\n- Mdx : Theme `fontCode` not applied consistently when writing MDX - [#23110](https://github.com/storybookjs/storybook/pull/23110), thanks [@gitstart-storybook](https://github.com/gitstart-storybook)!\n- UI: Bring back role main - [#24411](https://github.com/storybookjs/storybook/pull/24411), thanks [@cdedreuille](https://github.com/cdedreuille)!\n- UI: Fix IconButton not being aligned correctly in blocks - [#24529](https://github.com/storybookjs/storybook/pull/24529), thanks [@cdedreuille](https://github.com/cdedreuille)!\n- UI: Fix button size on controls - [#24737](https://github.com/storybookjs/storybook/pull/24737), thanks [@cdedreuille](https://github.com/cdedreuille)!\n- UI: Fix layout height - [#24370](https://github.com/storybookjs/storybook/pull/24370), thanks [@cdedreuille](https://github.com/cdedreuille)!\n- UI: Fix theming not updating - [#24399](https://github.com/storybookjs/storybook/pull/24399), thanks [@cdedreuille](https://github.com/cdedreuille)!\n- UI: Improved Button and IconButton - [#24266](https://github.com/storybookjs/storybook/pull/24266), thanks [@cdedreuille](https://github.com/cdedreuille)!\n- UI: Keep mobile drawer open on component selection - [#24258](https://github.com/storybookjs/storybook/pull/24258), thanks [@cdedreuille](https://github.com/cdedreuille)!\n- UI: Mobile truncate story name - [#24372](https://github.com/storybookjs/storybook/pull/24372), thanks [@cdedreuille](https://github.com/cdedreuille)!\n- UI: New icon library - [#24433](https://github.com/storybookjs/storybook/pull/24433), thanks [@cdedreuille](https://github.com/cdedreuille)!\n- UI: Replace Form.Button with the new Button component - [#24360](https://github.com/storybookjs/storybook/pull/24360), thanks [@cdedreuille](https://github.com/cdedreuille)!\n- UI: Screen reader announcing changes for expand/collapse button - [#24984](https://github.com/storybookjs/storybook/pull/24984), thanks [@wjdtjdgns](https://github.com/wjdtjdgns)!\n- UI: Upgrade manager to react 18 - [#24514](https://github.com/storybookjs/storybook/pull/24514), thanks [@ndelangen](https://github.com/ndelangen)!\n- UI: sidebar UI updates - [#24707](https://github.com/storybookjs/storybook/pull/24707), thanks [@cdedreuille](https://github.com/cdedreuille)!" - } -} +{"version":"8.0.0-alpha.1","info":{"plain":"- Angular: Drop v14.x support - [#25101](https://github.com/storybookjs/storybook/pull/25101), thanks [@valentinpalkovic](https://github.com/valentinpalkovic)!\n- Angular: Fix CSF Plugin - [#25098](https://github.com/storybookjs/storybook/pull/25098), thanks [@valentinpalkovic](https://github.com/valentinpalkovic)!\n- Build: Fix Angular sandbox - [#23896](https://github.com/storybookjs/storybook/pull/23896), thanks [@Marklb](https://github.com/Marklb)!\n- CLI: Improve dependency metadata detection in storybook doctor - [#25037](https://github.com/storybookjs/storybook/pull/25037), thanks [@yannbf](https://github.com/yannbf)!\n- CLI: Point the update-notice to the changelog in the suggested version - [#19911](https://github.com/storybookjs/storybook/pull/19911), thanks [@cprecioso](https://github.com/cprecioso)!\n- CLI: Typescript strict mode - [#22254](https://github.com/storybookjs/storybook/pull/22254), thanks [@0916dhkim](https://github.com/0916dhkim)!\n- CSF: Autotitle fix multiple dots and handle stories.js - [#21840](https://github.com/storybookjs/storybook/pull/21840), thanks [@agriffis](https://github.com/agriffis)!\n- Next.js: Add next/font/local declarations support - [#24983](https://github.com/storybookjs/storybook/pull/24983), thanks [@MauricioRobayo](https://github.com/MauricioRobayo)!\n- Next.js: Drop Next.js < v13.5 support - [#25104](https://github.com/storybookjs/storybook/pull/25104), thanks [@valentinpalkovic](https://github.com/valentinpalkovic)!\n- Next.js: Fix AppRouterProvider usage - [#25032](https://github.com/storybookjs/storybook/pull/25032), thanks [@valentinpalkovic](https://github.com/valentinpalkovic)!\n- Next.js: Fix next/font/local usage in babel mode - [#25045](https://github.com/storybookjs/storybook/pull/25045), thanks [@valentinpalkovic](https://github.com/valentinpalkovic)!\n- Next.js: Update validateData function for next/font compatibility - [#25061](https://github.com/storybookjs/storybook/pull/25061), thanks [@kkirby](https://github.com/kkirby)!\n- NextJS: Add experimental RSC support - [#25091](https://github.com/storybookjs/storybook/pull/25091), thanks [@shilman](https://github.com/shilman)!\n- React-Docgen: Make error-handling more gentle - [#25055](https://github.com/storybookjs/storybook/pull/25055), thanks [@valentinpalkovic](https://github.com/valentinpalkovic)!\n- React: Change `StoryFnReactReturnType` to `JSX.Element` - [#23204](https://github.com/storybookjs/storybook/pull/23204), thanks [@chakAs3](https://github.com/chakAs3)!\n- React: Set `react-docgen` to default TS docgen - [#24165](https://github.com/storybookjs/storybook/pull/24165), thanks [@shilman](https://github.com/shilman)!\n- SvelteKit: Fix HMR not working - [#25031](https://github.com/storybookjs/storybook/pull/25031), thanks [@JReinhold](https://github.com/JReinhold)!\n- TypeScript: Migrate `@storybook/docs-tools` to strict TS - [#22567](https://github.com/storybookjs/storybook/pull/22567), thanks [@efrenaragon96](https://github.com/efrenaragon96)!\n- UI: Add stricter types to the language property of the SyntaxHighlighter - [#22790](https://github.com/storybookjs/storybook/pull/22790), thanks [@valentinpalkovic](https://github.com/valentinpalkovic)!\n- Viewport: Fix viewport dts files - [#25107](https://github.com/storybookjs/storybook/pull/25107), thanks [@kasperpeulen](https://github.com/kasperpeulen)!\n- Webpack: Fix exclude regex in react-docgen-loader - [#25030](https://github.com/storybookjs/storybook/pull/25030), thanks [@valentinpalkovic](https://github.com/valentinpalkovic)!"}} From 32a8d30780bd7f2bca8f0e514ae20a9517a6c85f Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Wed, 6 Dec 2023 09:02:34 +0100 Subject: [PATCH 114/131] rebuild yarn.lock --- code/yarn.lock | 2732 ++++++++++++++++++++---------------------------- 1 file changed, 1141 insertions(+), 1591 deletions(-) diff --git a/code/yarn.lock b/code/yarn.lock index 91c1d8694d6c..264293e08cea 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -24,20 +24,13 @@ __metadata: languageName: node linkType: hard -"@adobe/css-tools@npm:^4.0.1": +"@adobe/css-tools@npm:^4.0.1, @adobe/css-tools@npm:^4.3.1": version: 4.3.2 resolution: "@adobe/css-tools@npm:4.3.2" checksum: 296a03dd29f227c60500d2da8c7f64991fecf1d8b456ce2b4adb8cec7363d9c08b5b03f1463673fc8cbfe54b538745588e7a13c736d2dd14a80c01a20f127f39 languageName: node linkType: hard -"@adobe/css-tools@npm:^4.3.0": - version: 4.3.1 - resolution: "@adobe/css-tools@npm:4.3.1" - checksum: 05672719b544cc0c21ae3ed0eb6349bf458e9d09457578eeeb07cf0f696469ac6417e9c9be1b129e5d6a18098a061c1db55b2275591760ef30a79822436fcbfa - languageName: node - linkType: hard - "@ampproject/remapping@npm:2.2.1, @ampproject/remapping@npm:^2.2.0, @ampproject/remapping@npm:^2.2.1": version: 2.2.1 resolution: "@ampproject/remapping@npm:2.2.1" @@ -373,7 +366,7 @@ __metadata: languageName: node linkType: hard -"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.10.4, @babel/code-frame@npm:^7.12.13, @babel/code-frame@npm:^7.16.0, @babel/code-frame@npm:^7.16.7, @babel/code-frame@npm:^7.22.13": +"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.10.4, @babel/code-frame@npm:^7.12.13, @babel/code-frame@npm:^7.16.0, @babel/code-frame@npm:^7.16.7, @babel/code-frame@npm:^7.22.13, @babel/code-frame@npm:^7.23.5": version: 7.23.5 resolution: "@babel/code-frame@npm:7.23.5" dependencies: @@ -383,44 +376,37 @@ __metadata: languageName: node linkType: hard -"@babel/compat-data@npm:^7.22.6, @babel/compat-data@npm:^7.22.9, @babel/compat-data@npm:^7.23.3, @babel/compat-data@npm:^7.23.5": +"@babel/compat-data@npm:^7.22.6, @babel/compat-data@npm:^7.22.9, @babel/compat-data@npm:^7.23.2, @babel/compat-data@npm:^7.23.3, @babel/compat-data@npm:^7.23.5": version: 7.23.5 resolution: "@babel/compat-data@npm:7.23.5" checksum: 081278ed46131a890ad566a59c61600a5f9557bd8ee5e535890c8548192532ea92590742fd74bd9db83d74c669ef8a04a7e1c85cdea27f960233e3b83c3a957c languageName: node linkType: hard -"@babel/compat-data@npm:^7.23.2": - version: 7.23.2 - resolution: "@babel/compat-data@npm:7.23.2" - checksum: 0397a08c3e491696cc1b12cf0879bf95fc550bfc6ef524d5a9452981aa0e192a958b2246debfb230fa22718fac473cc5a36616f89b1ad6e7e52055732cd374a1 - languageName: node - linkType: hard - "@babel/core@npm:^7.23.2": - version: 7.23.2 - resolution: "@babel/core@npm:7.23.2" + version: 7.23.5 + resolution: "@babel/core@npm:7.23.5" dependencies: "@ampproject/remapping": "npm:^2.2.0" - "@babel/code-frame": "npm:^7.22.13" - "@babel/generator": "npm:^7.23.0" + "@babel/code-frame": "npm:^7.23.5" + "@babel/generator": "npm:^7.23.5" "@babel/helper-compilation-targets": "npm:^7.22.15" - "@babel/helper-module-transforms": "npm:^7.23.0" - "@babel/helpers": "npm:^7.23.2" - "@babel/parser": "npm:^7.23.0" + "@babel/helper-module-transforms": "npm:^7.23.3" + "@babel/helpers": "npm:^7.23.5" + "@babel/parser": "npm:^7.23.5" "@babel/template": "npm:^7.22.15" - "@babel/traverse": "npm:^7.23.2" - "@babel/types": "npm:^7.23.0" + "@babel/traverse": "npm:^7.23.5" + "@babel/types": "npm:^7.23.5" convert-source-map: "npm:^2.0.0" debug: "npm:^4.1.0" gensync: "npm:^1.0.0-beta.2" json5: "npm:^2.2.3" semver: "npm:^6.3.1" - checksum: 14ad6e0a3ac0085dc008e7fb0c8513f0a3e39f2ab883a964a89ef1311338d49cf085c94cb6165c07fdec0fdcc6e865ce4811253c479f9f45ac375226dfe3ad3b + checksum: 311a512a870ee330a3f9a7ea89e5df790b2b5af0b1bd98b10b4edc0de2ac440f0df4d69ea2c0ee38a4b89041b9a495802741d93603be7d4fd834ec8bb6970bd2 languageName: node linkType: hard -"@babel/generator@npm:7.23.0, @babel/generator@npm:^7.12.11, @babel/generator@npm:^7.23.0, @babel/generator@npm:^7.7.2": +"@babel/generator@npm:7.23.0": version: 7.23.0 resolution: "@babel/generator@npm:7.23.0" dependencies: @@ -432,6 +418,18 @@ __metadata: languageName: node linkType: hard +"@babel/generator@npm:^7.12.11, @babel/generator@npm:^7.23.0, @babel/generator@npm:^7.23.5, @babel/generator@npm:^7.7.2": + version: 7.23.5 + resolution: "@babel/generator@npm:7.23.5" + dependencies: + "@babel/types": "npm:^7.23.5" + "@jridgewell/gen-mapping": "npm:^0.3.2" + "@jridgewell/trace-mapping": "npm:^0.3.17" + jsesc: "npm:^2.5.1" + checksum: 14c6e874f796c4368e919bed6003bb0adc3ce837760b08f9e646d20aeb5ae7d309723ce6e4f06bcb4a2b5753145446c8e4425851380f695e40e71e1760f49e7b + languageName: node + linkType: hard + "@babel/helper-annotate-as-pure@npm:7.22.5, @babel/helper-annotate-as-pure@npm:^7.18.6, @babel/helper-annotate-as-pure@npm:^7.22.5": version: 7.22.5 resolution: "@babel/helper-annotate-as-pure@npm:7.22.5" @@ -463,7 +461,7 @@ __metadata: languageName: node linkType: hard -"@babel/helper-create-class-features-plugin@npm:^7.18.6, @babel/helper-create-class-features-plugin@npm:^7.21.0, @babel/helper-create-class-features-plugin@npm:^7.22.15": +"@babel/helper-create-class-features-plugin@npm:^7.18.6, @babel/helper-create-class-features-plugin@npm:^7.21.0, @babel/helper-create-class-features-plugin@npm:^7.22.15, @babel/helper-create-class-features-plugin@npm:^7.23.5": version: 7.23.5 resolution: "@babel/helper-create-class-features-plugin@npm:7.23.5" dependencies: @@ -554,21 +552,6 @@ __metadata: languageName: node linkType: hard -"@babel/helper-module-transforms@npm:^7.23.0": - version: 7.23.0 - resolution: "@babel/helper-module-transforms@npm:7.23.0" - dependencies: - "@babel/helper-environment-visitor": "npm:^7.22.20" - "@babel/helper-module-imports": "npm:^7.22.15" - "@babel/helper-simple-access": "npm:^7.22.5" - "@babel/helper-split-export-declaration": "npm:^7.22.6" - "@babel/helper-validator-identifier": "npm:^7.22.20" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 15a52e401bd17fe44ba9be51cca693a3e182dc93264dc28ede732081c43211741df81ce8eb15e82e81c8ad51beb8893301ecc31d5c77add0f7be78dff6815318 - languageName: node - linkType: hard - "@babel/helper-module-transforms@npm:^7.23.3": version: 7.23.3 resolution: "@babel/helper-module-transforms@npm:7.23.3" @@ -653,13 +636,6 @@ __metadata: languageName: node linkType: hard -"@babel/helper-string-parser@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/helper-string-parser@npm:7.22.5" - checksum: 6b0ff8af724377ec41e5587fffa7605198da74cb8e7d8d48a36826df0c0ba210eb9fedb3d9bef4d541156e0bd11040f021945a6cbb731ccec4aefb4affa17aa4 - languageName: node - linkType: hard - "@babel/helper-string-parser@npm:^7.23.4": version: 7.23.4 resolution: "@babel/helper-string-parser@npm:7.23.4" @@ -692,14 +668,14 @@ __metadata: languageName: node linkType: hard -"@babel/helpers@npm:^7.23.2": - version: 7.23.2 - resolution: "@babel/helpers@npm:7.23.2" +"@babel/helpers@npm:^7.23.5": + version: 7.23.5 + resolution: "@babel/helpers@npm:7.23.5" dependencies: "@babel/template": "npm:^7.22.15" - "@babel/traverse": "npm:^7.23.2" - "@babel/types": "npm:^7.23.0" - checksum: 3a6a939c5277a27486e7c626812f0643b35d1c053ac2eb66911f5ae6c0a4e4bcdd40750eba36b766b0ee8a753484287f50ae56232a5f8f2947116723e44b9e35 + "@babel/traverse": "npm:^7.23.5" + "@babel/types": "npm:^7.23.5" + checksum: a37e2728eb4378a4888e5d614e28de7dd79b55ac8acbecd0e5c761273e2a02a8f33b34b1932d9069db55417ace2937cbf8ec37c42f1030ce6d228857d7ccaa4f languageName: node linkType: hard @@ -714,7 +690,7 @@ __metadata: languageName: node linkType: hard -"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.11.5, @babel/parser@npm:^7.13.16, @babel/parser@npm:^7.14.7, @babel/parser@npm:^7.18.4, @babel/parser@npm:^7.20.7, @babel/parser@npm:^7.21.4, @babel/parser@npm:^7.22.15, @babel/parser@npm:^7.23.0, @babel/parser@npm:^7.4.5, @babel/parser@npm:^7.6.0, @babel/parser@npm:^7.7.0, @babel/parser@npm:^7.9.6": +"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.11.5, @babel/parser@npm:^7.13.16, @babel/parser@npm:^7.14.7, @babel/parser@npm:^7.18.4, @babel/parser@npm:^7.20.7, @babel/parser@npm:^7.21.4, @babel/parser@npm:^7.22.15, @babel/parser@npm:^7.23.0, @babel/parser@npm:^7.23.3, @babel/parser@npm:^7.23.5, @babel/parser@npm:^7.4.5, @babel/parser@npm:^7.6.0, @babel/parser@npm:^7.7.0, @babel/parser@npm:^7.9.6": version: 7.23.5 resolution: "@babel/parser@npm:7.23.5" bin: @@ -723,24 +699,6 @@ __metadata: languageName: node linkType: hard -"@babel/parser@npm:^7.20.15, @babel/parser@npm:^7.21.3": - version: 7.23.0 - resolution: "@babel/parser@npm:7.23.0" - bin: - parser: ./bin/babel-parser.js - checksum: ab4ea9360ed4ba3c728c5a9bf33035103ebde20a7e943c4ae1d42becb02a313d731d12a93c795c5a19777031e4022e64b92a52262eda902522a1a18649826283 - languageName: node - linkType: hard - -"@babel/parser@npm:^7.23.3": - version: 7.23.4 - resolution: "@babel/parser@npm:7.23.4" - bin: - parser: ./bin/babel-parser.js - checksum: 9115cd9c5855a6c7a8dd246938b1316dc1014ad36e01240c1e94ada63218ca39aa63d953d1bff8074a2737933448bc50736eb3da52ffc5c11a256c66d0accc2b - languageName: node - linkType: hard - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:^7.22.15, @babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:^7.23.3": version: 7.23.3 resolution: "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:7.23.3" @@ -790,17 +748,17 @@ __metadata: linkType: hard "@babel/plugin-proposal-decorators@npm:^7.13.5": - version: 7.23.0 - resolution: "@babel/plugin-proposal-decorators@npm:7.23.0" + version: 7.23.5 + resolution: "@babel/plugin-proposal-decorators@npm:7.23.5" dependencies: - "@babel/helper-create-class-features-plugin": "npm:^7.22.15" + "@babel/helper-create-class-features-plugin": "npm:^7.23.5" "@babel/helper-plugin-utils": "npm:^7.22.5" "@babel/helper-replace-supers": "npm:^7.22.20" "@babel/helper-split-export-declaration": "npm:^7.22.6" - "@babel/plugin-syntax-decorators": "npm:^7.22.10" + "@babel/plugin-syntax-decorators": "npm:^7.23.3" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 983e7113f9ca3b2ae632869f71accec48cb652d68840697c3977071d44879657ca6b4427ed02e76e448e385d0feca9bd3d40edfaf1530c6c6c25fe8b97d46689 + checksum: f1fffa9f24668e3a2f78ee4c6ca1b8e65b46f69d8fbe77be46dc286b0ac02336fbc77eeaffadcec1b08019e241547cfbfee9a494aeaf6bb6b4eeac1149be5994 languageName: node linkType: hard @@ -908,14 +866,14 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-syntax-decorators@npm:^7.22.10": - version: 7.22.10 - resolution: "@babel/plugin-syntax-decorators@npm:7.22.10" +"@babel/plugin-syntax-decorators@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-syntax-decorators@npm:7.23.3" dependencies: "@babel/helper-plugin-utils": "npm:^7.22.5" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: cf606ef13ed98b3adf560ede27a873c0ab37e884c762a6f15493c881f5a78b67f24dcdd5c70e8cd8f39dbe4b23475cb98619729812f29feb2dcc241130195e7c + checksum: 86299c050b0a5b6565d6b9e3529f2d6dca4780215ab88050bdd0ae9a576868a17f9cd1e140857089cc5d06bdfeb89f0711285f99481b82316896a552a62e449f languageName: node linkType: hard @@ -941,14 +899,14 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-syntax-flow@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-syntax-flow@npm:7.22.5" +"@babel/plugin-syntax-flow@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-syntax-flow@npm:7.23.3" dependencies: "@babel/helper-plugin-utils": "npm:^7.22.5" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 07afc7df02141597968532bfbfa3f6c0ad21a2bdd885d0e5e035dcf60fdf35f0995631c9750b464e1a6f2feea14160a82787f914e88e8f7115dc99f09853e43e + checksum: 8a5e1e8b6a3728a2c8fe6d70c09a43642e737d9c0485e1b041cd3a6021ef05376ec3c9137be3b118c622ba09b5770d26fdc525473f8d06d4ab9e46de2783dd0a languageName: node linkType: hard @@ -996,17 +954,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-syntax-jsx@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-syntax-jsx@npm:7.22.5" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: b56ceaa9c6adc17fadfb48e1c801d07797195df2a581489e33c8034950e12e7778de6e1e70d6bcf7c5c7ada6222fe6bad5746187ab280df435f5a2799c8dd0d8 - languageName: node - linkType: hard - "@babel/plugin-syntax-jsx@npm:^7.23.3, @babel/plugin-syntax-jsx@npm:^7.7.2": version: 7.23.3 resolution: "@babel/plugin-syntax-jsx@npm:7.23.3" @@ -1106,17 +1053,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-syntax-typescript@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-syntax-typescript@npm:7.22.5" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 523a76627f17e67dc1999f4d7c7a71ed79e9f77f55a61cf05051101967ac23ec378ff0c93787b2cbd5d53720ad799658d796a649fa351682b2bf636f63b665a1 - languageName: node - linkType: hard - "@babel/plugin-syntax-typescript@npm:^7.23.3, @babel/plugin-syntax-typescript@npm:^7.7.2": version: 7.23.3 resolution: "@babel/plugin-syntax-typescript@npm:7.23.3" @@ -1294,19 +1230,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-dotall-regex@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-dotall-regex@npm:7.22.5" - dependencies: - "@babel/helper-create-regexp-features-plugin": "npm:^7.22.5" - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: e0d7b95380483ef563c13f7c0a2122f575c58708cfb56494d6265ebb31753cf46ee0b3f5126fa6bbea5af392b3a2da05bf1e028d0b2b4d1dc279edd67cf3c3d9 - languageName: node - linkType: hard - -"@babel/plugin-transform-dotall-regex@npm:^7.23.3": +"@babel/plugin-transform-dotall-regex@npm:^7.22.5, @babel/plugin-transform-dotall-regex@npm:^7.23.3": version: 7.23.3 resolution: "@babel/plugin-transform-dotall-regex@npm:7.23.3" dependencies: @@ -1365,15 +1289,15 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-flow-strip-types@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-flow-strip-types@npm:7.22.5" +"@babel/plugin-transform-flow-strip-types@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-flow-strip-types@npm:7.23.3" dependencies: "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/plugin-syntax-flow": "npm:^7.22.5" + "@babel/plugin-syntax-flow": "npm:^7.23.3" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 5949a8e5214e3fc65d31dab0551423cea9d9eef35faa5d0004707ba7347baf96166aa400907ce7498f754db4e1e9d039ca434a508546b0dc9fdae9a42e814c1a + checksum: 9ab627f9668fc1f95564b26bffd6706f86205960d9ccc168236752fbef65dbe10aa0ce74faae12f48bb3b72ec7f38ef2a78b4874c222c1e85754e981639f3b33 languageName: node linkType: hard @@ -1447,7 +1371,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-modules-amd@npm:^7.13.0, @babel/plugin-transform-modules-amd@npm:^7.23.3": +"@babel/plugin-transform-modules-amd@npm:^7.13.0, @babel/plugin-transform-modules-amd@npm:^7.23.0, @babel/plugin-transform-modules-amd@npm:^7.23.3": version: 7.23.3 resolution: "@babel/plugin-transform-modules-amd@npm:7.23.3" dependencies: @@ -1459,18 +1383,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-modules-amd@npm:^7.23.0": - version: 7.23.0 - resolution: "@babel/plugin-transform-modules-amd@npm:7.23.0" - dependencies: - "@babel/helper-module-transforms": "npm:^7.23.0" - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: dda02864029ff66955e21d19c3d245aad69792b75e748de1391403bc86c8e9720b4f320b0db8413a29c11ba63b168146cf849180b5677bc6a74bfd085d20376d - languageName: node - linkType: hard - "@babel/plugin-transform-modules-commonjs@npm:^7.13.8, @babel/plugin-transform-modules-commonjs@npm:^7.2.0, @babel/plugin-transform-modules-commonjs@npm:^7.23.0, @babel/plugin-transform-modules-commonjs@npm:^7.23.3": version: 7.23.3 resolution: "@babel/plugin-transform-modules-commonjs@npm:7.23.3" @@ -1558,13 +1470,13 @@ __metadata: linkType: hard "@babel/plugin-transform-object-assign@npm:^7.8.3": - version: 7.22.5 - resolution: "@babel/plugin-transform-object-assign@npm:7.22.5" + version: 7.23.3 + resolution: "@babel/plugin-transform-object-assign@npm:7.23.3" dependencies: "@babel/helper-plugin-utils": "npm:^7.22.5" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: c80ca956ccc45c68a6f35e8aea80e08c0a653e4baf243727d4258f242d312d71be20e3fad35a1f2cd9d58b30dcbb5cdf5f8d6c6614a3f8c6079d90f9b1dadee6 + checksum: 44467e8bd8eaae3fe54834dac9d1647d2b2598529a90722281832f6905d485c05e37b5fbd6fd7660c5d2e32e6f005824cda8a9321ddac2e2d619536fafc9783c languageName: node linkType: hard @@ -1668,18 +1580,18 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-react-display-name@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-react-display-name@npm:7.22.5" +"@babel/plugin-transform-react-display-name@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-react-display-name@npm:7.23.3" dependencies: "@babel/helper-plugin-utils": "npm:^7.22.5" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 41e0167ecd8e5281e427556146b1d3bee8652bcd0664be013f16ffeeb4d61b7ab0b1e59bcc2c923774f0d265f78012628d5277880f758f3675893226f9be012e + checksum: 3aed142af7bd1aed1df2bdad91ed33ba1cdd5c3c67ce6eafba821ff72f129162a197ffb55f1eb1775af276abd5545934489a8257fef6c6665ddf253a4f39a939 languageName: node linkType: hard -"@babel/plugin-transform-react-jsx-development@npm:^7.16.7, @babel/plugin-transform-react-jsx-development@npm:^7.22.5": +"@babel/plugin-transform-react-jsx-development@npm:^7.22.5": version: 7.22.5 resolution: "@babel/plugin-transform-react-jsx-development@npm:7.22.5" dependencies: @@ -1691,39 +1603,24 @@ __metadata: linkType: hard "@babel/plugin-transform-react-jsx-self@npm:^7.18.6": - version: 7.22.5 - resolution: "@babel/plugin-transform-react-jsx-self@npm:7.22.5" + version: 7.23.3 + resolution: "@babel/plugin-transform-react-jsx-self@npm:7.23.3" dependencies: "@babel/helper-plugin-utils": "npm:^7.22.5" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 263091bdede1f448cb2c59b84eb69972c15d3f022c929a75337bd20d8b65551ac38cd26dad1946eaa93289643506b10ddaea3445a28cb8fca5a773a22a0df90b + checksum: 6b586508fc58998483d4ee93a7e784c4f4d2350e2633739cf1990b7ad172e13906f72382fdaf7f07b4e3c7e7555342634d392bdeb1a079bb64762c6368ca9a32 languageName: node linkType: hard "@babel/plugin-transform-react-jsx-source@npm:^7.19.6": - version: 7.22.5 - resolution: "@babel/plugin-transform-react-jsx-source@npm:7.22.5" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: defc9debb76b4295e3617ef7795a0533dbbecef6f51bf5ba4bfc162df892a84fd39e14d5f1b9a5aad7b09b97074fef4c6756f9d2036eef5a9874acabe198f75a - languageName: node - linkType: hard - -"@babel/plugin-transform-react-jsx@npm:^7.14.9": - version: 7.22.15 - resolution: "@babel/plugin-transform-react-jsx@npm:7.22.15" + version: 7.23.3 + resolution: "@babel/plugin-transform-react-jsx-source@npm:7.23.3" dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.22.5" - "@babel/helper-module-imports": "npm:^7.22.15" "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/plugin-syntax-jsx": "npm:^7.22.5" - "@babel/types": "npm:^7.22.15" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: db37491e3eea5530521e177380312f308f01f806866fa0ce08d48fc5a8c9eaf9a954f778fa1ff477248afb72e916eb66ab3d35254bb6a8979f8b8e74a0fd8873 + checksum: a3aad7cf738e9bfaddc26cdbb83bb9684c2e689d26fb0793d772af0c8da0cd25bb02523d192fbc6946c32143e56b472c1d33fa82466b3f2d3346e1ce8fe83cf6 languageName: node linkType: hard @@ -1742,15 +1639,15 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-react-pure-annotations@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-react-pure-annotations@npm:7.22.5" +"@babel/plugin-transform-react-pure-annotations@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-react-pure-annotations@npm:7.23.3" dependencies: "@babel/helper-annotate-as-pure": "npm:^7.22.5" "@babel/helper-plugin-utils": "npm:^7.22.5" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 18db2e2346d79ebe4a3f85f51fa7757a63a09bc6da7f339e6ce9e7534de68b5165fe7d49ac363dee6ba3f81eb904d44bf9c13653331805f9b236a1d9fec7e018 + checksum: 76287adeab656fb7f39243e5ab6a8c60069cf69fffeebd1566457d56cb2f966366a23bd755d3e369f4d0437459e3b76243df370caa7d7d2287a8560b66c53ca2 languageName: node linkType: hard @@ -1777,7 +1674,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-runtime@npm:7.23.2, @babel/plugin-transform-runtime@npm:^7.23.2": +"@babel/plugin-transform-runtime@npm:7.23.2": version: 7.23.2 resolution: "@babel/plugin-transform-runtime@npm:7.23.2" dependencies: @@ -1793,7 +1690,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-runtime@npm:^7.13.9": +"@babel/plugin-transform-runtime@npm:^7.13.9, @babel/plugin-transform-runtime@npm:^7.23.2": version: 7.23.4 resolution: "@babel/plugin-transform-runtime@npm:7.23.4" dependencies: @@ -1866,30 +1763,16 @@ __metadata: linkType: hard "@babel/plugin-transform-typescript@npm:^7.13.0, @babel/plugin-transform-typescript@npm:^7.23.3": - version: 7.23.3 - resolution: "@babel/plugin-transform-typescript@npm:7.23.3" + version: 7.23.5 + resolution: "@babel/plugin-transform-typescript@npm:7.23.5" dependencies: "@babel/helper-annotate-as-pure": "npm:^7.22.5" - "@babel/helper-create-class-features-plugin": "npm:^7.22.15" + "@babel/helper-create-class-features-plugin": "npm:^7.23.5" "@babel/helper-plugin-utils": "npm:^7.22.5" "@babel/plugin-syntax-typescript": "npm:^7.23.3" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: a3c738efcf491ceb1eee646f57c44990ee0c80465527b88fcfa0b7602688c4ff8c165a4c5b62caf05d968b095212018fd30a02879c12d37c657081f57b31fb26 - languageName: node - linkType: hard - -"@babel/plugin-transform-typescript@npm:^7.22.15": - version: 7.22.15 - resolution: "@babel/plugin-transform-typescript@npm:7.22.15" - dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.22.5" - "@babel/helper-create-class-features-plugin": "npm:^7.22.15" - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/plugin-syntax-typescript": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: e6a110f5b70334c6a503c90855dde5660f479e48262c8338261aeb30c70eedcfe885265b788c89f5bef757d99ab6704ee22bb0d23579597bc9415cfa86607458 + checksum: 75d6689bfdf4c9462b5fb21107c295717c9bedffe5eae8b22b0a65c9603660683d55e020df83825de13792358043bd939f48efc2b3a293b5210a608076c94934 languageName: node linkType: hard @@ -1950,7 +1833,7 @@ __metadata: languageName: node linkType: hard -"@babel/preset-env@npm:7.23.2, @babel/preset-env@npm:^7.23.2": +"@babel/preset-env@npm:7.23.2": version: 7.23.2 resolution: "@babel/preset-env@npm:7.23.2" dependencies: @@ -2040,7 +1923,7 @@ __metadata: languageName: node linkType: hard -"@babel/preset-env@npm:^7.16.5": +"@babel/preset-env@npm:^7.16.5, @babel/preset-env@npm:^7.23.2": version: 7.23.5 resolution: "@babel/preset-env@npm:7.23.5" dependencies: @@ -2131,15 +2014,15 @@ __metadata: linkType: hard "@babel/preset-flow@npm:^7.13.13, @babel/preset-flow@npm:^7.22.15": - version: 7.22.15 - resolution: "@babel/preset-flow@npm:7.22.15" + version: 7.23.3 + resolution: "@babel/preset-flow@npm:7.23.3" dependencies: "@babel/helper-plugin-utils": "npm:^7.22.5" "@babel/helper-validator-option": "npm:^7.22.15" - "@babel/plugin-transform-flow-strip-types": "npm:^7.22.5" + "@babel/plugin-transform-flow-strip-types": "npm:^7.23.3" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 7eef0c84ec1889d6c4f7a67d7d1a81703420eed123a8c23f25af148eead77907f0bd701f3e729fdb37d3ddb2a373bf43938b36a9ba17f546111ddb9521466b92 + checksum: 1cf109925791f2af679f03289848d27596b4f27cb0ad4ee74a8dd4c1cbecc119bdef3b45cbbe12489bc9bdf61163f94c1c0bf6013cc58c325f1cc99edc01bda9 languageName: node linkType: hard @@ -2157,22 +2040,22 @@ __metadata: linkType: hard "@babel/preset-react@npm:^7.22.15": - version: 7.22.15 - resolution: "@babel/preset-react@npm:7.22.15" + version: 7.23.3 + resolution: "@babel/preset-react@npm:7.23.3" dependencies: "@babel/helper-plugin-utils": "npm:^7.22.5" "@babel/helper-validator-option": "npm:^7.22.15" - "@babel/plugin-transform-react-display-name": "npm:^7.22.5" + "@babel/plugin-transform-react-display-name": "npm:^7.23.3" "@babel/plugin-transform-react-jsx": "npm:^7.22.15" "@babel/plugin-transform-react-jsx-development": "npm:^7.22.5" - "@babel/plugin-transform-react-pure-annotations": "npm:^7.22.5" + "@babel/plugin-transform-react-pure-annotations": "npm:^7.23.3" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 80940aa494292b7f689d902b76828cb3ab4eaf4e6421107f23388b6ea7316ab25ccd817b766fde5c40787fd92f1cba1f660190bfd71965c902e49b42c9e290c2 + checksum: cecb2493e09fd4ffa5effcef1d06e968386b1bfe077a99834f7e8ef249208274fca62fe5a6b3986ef1c1c3900b2eb409adb528ae1b73dba31397b16f9262e83c languageName: node linkType: hard -"@babel/preset-typescript@npm:^7.13.0, @babel/preset-typescript@npm:^7.23.0": +"@babel/preset-typescript@npm:^7.13.0, @babel/preset-typescript@npm:^7.23.0, @babel/preset-typescript@npm:^7.23.2": version: 7.23.3 resolution: "@babel/preset-typescript@npm:7.23.3" dependencies: @@ -2187,21 +2070,6 @@ __metadata: languageName: node linkType: hard -"@babel/preset-typescript@npm:^7.23.2": - version: 7.23.2 - resolution: "@babel/preset-typescript@npm:7.23.2" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/helper-validator-option": "npm:^7.22.15" - "@babel/plugin-syntax-jsx": "npm:^7.22.5" - "@babel/plugin-transform-modules-commonjs": "npm:^7.23.0" - "@babel/plugin-transform-typescript": "npm:^7.22.15" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 40eb71e9959d97a0c2e89fe5cf4c9db7edea5b103618d4c4b5cc7a41dd8c66ab1b1922c443607427000d7bb63e135e8c5f268f35426b2ba00ce53f75bf3b0f8b - languageName: node - linkType: hard - "@babel/register@npm:^7.13.16, @babel/register@npm:^7.22.15": version: 7.22.15 resolution: "@babel/register@npm:7.22.15" @@ -2225,12 +2093,12 @@ __metadata: linkType: hard "@babel/runtime-corejs3@npm:^7.10.2": - version: 7.23.1 - resolution: "@babel/runtime-corejs3@npm:7.23.1" + version: 7.23.5 + resolution: "@babel/runtime-corejs3@npm:7.23.5" dependencies: core-js-pure: "npm:^3.30.2" regenerator-runtime: "npm:^0.14.0" - checksum: 6e2c2b11779ff56c88b1f3a8742498640f7271ad4fcf9cfd24052bbb236a5e7c4c7c8d81cda751da3b4effa678736303deb78441c5752e63bfb90d6453fd870f + checksum: 9bbad4ae7efea21e2c92ddee70b42ce9773a56e044cfc16267f9610b38ee531c87b465d84d39433fca93f7f567b47d5e40383e3d2cfe85dbeceea7fba8a52cc8 languageName: node linkType: hard @@ -2243,7 +2111,7 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:7.23.2, @babel/runtime@npm:^7.1.2, @babel/runtime@npm:^7.10.2, @babel/runtime@npm:^7.11.2, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.13.10, @babel/runtime@npm:^7.14.8, @babel/runtime@npm:^7.17.8, @babel/runtime@npm:^7.18.3, @babel/runtime@npm:^7.20.13, @babel/runtime@npm:^7.21.0, @babel/runtime@npm:^7.23.2, @babel/runtime@npm:^7.3.1, @babel/runtime@npm:^7.5.5, @babel/runtime@npm:^7.7.6, @babel/runtime@npm:^7.8.4, @babel/runtime@npm:^7.8.7, @babel/runtime@npm:^7.9.2": +"@babel/runtime@npm:7.23.2": version: 7.23.2 resolution: "@babel/runtime@npm:7.23.2" dependencies: @@ -2261,12 +2129,12 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.20.7": - version: 7.23.1 - resolution: "@babel/runtime@npm:7.23.1" +"@babel/runtime@npm:^7.1.2, @babel/runtime@npm:^7.10.2, @babel/runtime@npm:^7.11.2, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.13.10, @babel/runtime@npm:^7.14.8, @babel/runtime@npm:^7.17.8, @babel/runtime@npm:^7.18.3, @babel/runtime@npm:^7.20.13, @babel/runtime@npm:^7.21.0, @babel/runtime@npm:^7.23.2, @babel/runtime@npm:^7.3.1, @babel/runtime@npm:^7.5.5, @babel/runtime@npm:^7.7.6, @babel/runtime@npm:^7.8.4, @babel/runtime@npm:^7.8.7, @babel/runtime@npm:^7.9.2": + version: 7.23.5 + resolution: "@babel/runtime@npm:7.23.5" dependencies: regenerator-runtime: "npm:^0.14.0" - checksum: e57ab1436d4845efe67c3f76d578508bb584173690ecfeac105bc4e09d64b2aa6a53c1e03bca3c97cc238e5390a804e5a4ded211e6350243b735905ca45a4822 + checksum: ca679cc91bb7e424bc2db87bb58cc3b06ade916b9adb21fbbdc43e54cdaacb3eea201ceba2a0464b11d2eb65b9fe6a6ffcf4d7521fa52994f19be96f1af14788 languageName: node linkType: hard @@ -2290,61 +2158,32 @@ __metadata: languageName: node linkType: hard -"@babel/traverse@npm:^7.1.6, @babel/traverse@npm:^7.23.2": - version: 7.23.2 - resolution: "@babel/traverse@npm:7.23.2" - dependencies: - "@babel/code-frame": "npm:^7.22.13" - "@babel/generator": "npm:^7.23.0" - "@babel/helper-environment-visitor": "npm:^7.22.20" - "@babel/helper-function-name": "npm:^7.23.0" - "@babel/helper-hoist-variables": "npm:^7.22.5" - "@babel/helper-split-export-declaration": "npm:^7.22.6" - "@babel/parser": "npm:^7.23.0" - "@babel/types": "npm:^7.23.0" - debug: "npm:^4.1.0" - globals: "npm:^11.1.0" - checksum: d096c7c4bab9262a2f658298a3c630ae4a15a10755bb257ae91d5ab3e3b2877438934859c8d34018b7727379fe6b26c4fa2efc81cf4c462a7fe00caf79fa02ff - languageName: node - linkType: hard - -"@babel/traverse@npm:^7.18.9, @babel/traverse@npm:^7.4.5, @babel/traverse@npm:^7.7.0": - version: 7.23.0 - resolution: "@babel/traverse@npm:7.23.0" +"@babel/traverse@npm:^7.1.6, @babel/traverse@npm:^7.18.9, @babel/traverse@npm:^7.23.2, @babel/traverse@npm:^7.23.5, @babel/traverse@npm:^7.4.5, @babel/traverse@npm:^7.7.0": + version: 7.23.5 + resolution: "@babel/traverse@npm:7.23.5" dependencies: - "@babel/code-frame": "npm:^7.22.13" - "@babel/generator": "npm:^7.23.0" + "@babel/code-frame": "npm:^7.23.5" + "@babel/generator": "npm:^7.23.5" "@babel/helper-environment-visitor": "npm:^7.22.20" "@babel/helper-function-name": "npm:^7.23.0" "@babel/helper-hoist-variables": "npm:^7.22.5" "@babel/helper-split-export-declaration": "npm:^7.22.6" - "@babel/parser": "npm:^7.23.0" - "@babel/types": "npm:^7.23.0" + "@babel/parser": "npm:^7.23.5" + "@babel/types": "npm:^7.23.5" debug: "npm:^4.1.0" globals: "npm:^11.1.0" - checksum: 84f93e64179965a0de6109a8b1ce92d66eb52a76e8ba325d27bdec6952cedd8fc98eabf09fe443ef667a051300dc7ed8924e7bf61a87ad456501d1da46657509 - languageName: node - linkType: hard - -"@babel/types@npm:^7.0.0, @babel/types@npm:^7.11.5, @babel/types@npm:^7.18.9, @babel/types@npm:^7.2.0, @babel/types@npm:^7.20.7, @babel/types@npm:^7.21.4, @babel/types@npm:^7.22.15, @babel/types@npm:^7.22.19, @babel/types@npm:^7.22.5, @babel/types@npm:^7.23.0, @babel/types@npm:^7.3.3, @babel/types@npm:^7.4.4, @babel/types@npm:^7.6.1, @babel/types@npm:^7.7.0, @babel/types@npm:^7.7.2, @babel/types@npm:^7.8.3, @babel/types@npm:^7.9.6": - version: 7.23.0 - resolution: "@babel/types@npm:7.23.0" - dependencies: - "@babel/helper-string-parser": "npm:^7.22.5" - "@babel/helper-validator-identifier": "npm:^7.22.20" - to-fast-properties: "npm:^2.0.0" - checksum: 70e4db41acb6793d0eb8d81a2fa88f19ee661219b84bd5f703dbdb54eb3a4d3c0dfc55e69034c945b479df9f43fd4b1376480aaccfc19797ce5af1c5d2576b36 + checksum: c5ea793080ca6719b0a1612198fd25e361cee1f3c14142d7a518d2a1eeb5c1d21f7eec1b26c20ea6e1ddd8ed12ab50b960ff95ffd25be353b6b46e1b54d6f825 languageName: node linkType: hard -"@babel/types@npm:^7.23.4": - version: 7.23.4 - resolution: "@babel/types@npm:7.23.4" +"@babel/types@npm:^7.0.0, @babel/types@npm:^7.11.5, @babel/types@npm:^7.18.9, @babel/types@npm:^7.2.0, @babel/types@npm:^7.20.7, @babel/types@npm:^7.21.4, @babel/types@npm:^7.22.15, @babel/types@npm:^7.22.19, @babel/types@npm:^7.22.5, @babel/types@npm:^7.23.0, @babel/types@npm:^7.23.4, @babel/types@npm:^7.23.5, @babel/types@npm:^7.3.3, @babel/types@npm:^7.4.4, @babel/types@npm:^7.6.1, @babel/types@npm:^7.7.0, @babel/types@npm:^7.7.2, @babel/types@npm:^7.8.3, @babel/types@npm:^7.9.6": + version: 7.23.5 + resolution: "@babel/types@npm:7.23.5" dependencies: "@babel/helper-string-parser": "npm:^7.23.4" "@babel/helper-validator-identifier": "npm:^7.22.20" to-fast-properties: "npm:^2.0.0" - checksum: 231954418e0d052a8e69c9d84dde31baffd91d38d99624d18f160e14aa32b094b9e3e91c9c065ea88ea80c6e1589b17bb8b843b950c20c112f32c17482f7cf1f + checksum: 7dd5e2f59828ed046ad0b06b039df2524a8b728d204affb4fc08da2502b9dd3140b1356b5166515d229dc811539a8b70dcd4bc507e06d62a89f4091a38d0b0fb languageName: node linkType: hard @@ -2863,15 +2702,15 @@ __metadata: linkType: hard "@eslint-community/regexpp@npm:^4.4.0, @eslint-community/regexpp@npm:^4.6.1": - version: 4.9.1 - resolution: "@eslint-community/regexpp@npm:4.9.1" - checksum: d0e1bd1a37cb2cb6bbac88dfe97b62b412d4b6ea3a4bb1c4e1e503be03125063db5d80999cef9728f57b19b49979aa902ac68182bcf5f80dfce6fa9a9d34eee1 + version: 4.10.0 + resolution: "@eslint-community/regexpp@npm:4.10.0" + checksum: c5f60ef1f1ea7649fa7af0e80a5a79f64b55a8a8fa5086de4727eb4c86c652aedee407a9c143b8995d2c0b2d75c1222bec9ba5d73dbfc1f314550554f0979ef4 languageName: node linkType: hard -"@eslint/eslintrc@npm:^2.1.2": - version: 2.1.2 - resolution: "@eslint/eslintrc@npm:2.1.2" +"@eslint/eslintrc@npm:^2.1.3": + version: 2.1.3 + resolution: "@eslint/eslintrc@npm:2.1.3" dependencies: ajv: "npm:^6.12.4" debug: "npm:^4.3.2" @@ -2882,14 +2721,14 @@ __metadata: js-yaml: "npm:^4.1.0" minimatch: "npm:^3.1.2" strip-json-comments: "npm:^3.1.1" - checksum: 00efdc3797e6f05518060522b7788e5f5aff02f13facbd0c83b176c3dee86554023283a5f68542df379c5137685d2d29745c87f62bf2406a1d38d95471f44ce6 + checksum: f4103f4346126292eb15581c5a1d12bef03410fd3719dedbdb92e1f7031d46a5a2d60de8566790445d5d4b70b75ba050876799a11f5fff8265a91ee3fa77dab0 languageName: node linkType: hard -"@eslint/js@npm:8.50.0": - version: 8.50.0 - resolution: "@eslint/js@npm:8.50.0" - checksum: 92cb0a823869e85f287bd172f14a6a20d7d65c3f4db886a0356a9efebfe8fe519e9ead84a5687bd18f45eca417bdcce96e3b83fe3feae8baf0f8f44d14073bae +"@eslint/js@npm:8.54.0": + version: 8.54.0 + resolution: "@eslint/js@npm:8.54.0" + checksum: d61fb4a0be6af2d8cb290121c329697664a75d6255a29926d5454fb02aeb02b87112f67fdf218d10abac42f90c570ac366126751baefc5405d0e017ed0c946c5 languageName: node linkType: hard @@ -3365,14 +3204,14 @@ __metadata: languageName: node linkType: hard -"@humanwhocodes/config-array@npm:^0.11.11": - version: 0.11.11 - resolution: "@humanwhocodes/config-array@npm:0.11.11" +"@humanwhocodes/config-array@npm:^0.11.13": + version: 0.11.13 + resolution: "@humanwhocodes/config-array@npm:0.11.13" dependencies: - "@humanwhocodes/object-schema": "npm:^1.2.1" + "@humanwhocodes/object-schema": "npm:^2.0.1" debug: "npm:^4.1.1" minimatch: "npm:^3.0.5" - checksum: 4195f68e485f7d1a7c95cf0f126cc41f7223eeda2f1b46b893123c99b35bb76145c37d25e2ba452d54815ed69bb656c0ce9e343ffa984470c08afa6e82a4713f + checksum: d76ca802d853366094d0e98ff0d0994117fc8eff96649cd357b15e469e428228f597cd2e929d54ab089051684949955f16ee905bb19f7b2f0446fb377157be7a languageName: node linkType: hard @@ -3390,10 +3229,10 @@ __metadata: languageName: node linkType: hard -"@humanwhocodes/object-schema@npm:^1.2.1": - version: 1.2.1 - resolution: "@humanwhocodes/object-schema@npm:1.2.1" - checksum: c3c35fdb70c04a569278351c75553e293ae339684ed75895edc79facc7276e351115786946658d78133130c0cca80e57e2203bc07f8fa7fe7980300e8deef7db +"@humanwhocodes/object-schema@npm:^2.0.1": + version: 2.0.1 + resolution: "@humanwhocodes/object-schema@npm:2.0.1" + checksum: 9dba24e59fdb4041829d92b693aacb778add3b6f612aaa9c0774f3b650c11a378cc64f042a59da85c11dae33df456580a3c36837b953541aed6ff94294f97fac languageName: node linkType: hard @@ -3789,12 +3628,12 @@ __metadata: linkType: hard "@jridgewell/trace-mapping@npm:^0.3.12, @jridgewell/trace-mapping@npm:^0.3.17, @jridgewell/trace-mapping@npm:^0.3.18, @jridgewell/trace-mapping@npm:^0.3.9": - version: 0.3.19 - resolution: "@jridgewell/trace-mapping@npm:0.3.19" + version: 0.3.20 + resolution: "@jridgewell/trace-mapping@npm:0.3.20" dependencies: "@jridgewell/resolve-uri": "npm:^3.1.0" "@jridgewell/sourcemap-codec": "npm:^1.4.14" - checksum: 845e6c6efca621b2b85e4d13fd25c319b6e4ab1ea78d4385ff6c0f78322ea0fcdfec8ac763aa4b56e8378c96d7bef101a2638c7a1a076f7d62f6376230c940a7 + checksum: 0ea0b2675cf513ec44dc25605616a3c9b808b9832e74b5b63c44260d66b58558bba65764f81928fc1033ead911f8718dca1134049c3e7a93937faf436671df31 languageName: node linkType: hard @@ -3820,9 +3659,9 @@ __metadata: linkType: hard "@lit-labs/ssr-dom-shim@npm:^1.0.0, @lit-labs/ssr-dom-shim@npm:^1.1.0": - version: 1.1.1 - resolution: "@lit-labs/ssr-dom-shim@npm:1.1.1" - checksum: bc530a6d390a71e44a74f0d79ab78df0c3cf814f5a69e64c60271d626f4b871d0269c82f2b1bcaf9ef1a84f361f50a1fc70c790873cded769e8f0e4f1fa01ff8 + version: 1.1.2 + resolution: "@lit-labs/ssr-dom-shim@npm:1.1.2" + checksum: e51c7c156317ac95cac8d534d8608ac2a9dda7441f14f73e9e66a995d277851a90315324fe74690d1169a66dce645ed9674a8f5a9a467d183156de1c87549b23 languageName: node linkType: hard @@ -3867,72 +3706,72 @@ __metadata: languageName: node linkType: hard -"@next/env@npm:14.0.2": - version: 14.0.2 - resolution: "@next/env@npm:14.0.2" - checksum: 9fad703ce13b7b7fecf898d3c239f8976f2ec7f3c7c461c06da70898a0221775c48e1a2e2c76740216c4093c2db9bd7adaacd196586cd4283e09eb89de4c1db6 +"@next/env@npm:14.0.3": + version: 14.0.3 + resolution: "@next/env@npm:14.0.3" + checksum: 8688367c22461a075b5406463d16c284cf58e6861418e974fbd5901721da73402988340f8dd72d8e2e41e32ae0b7f24f91bd49029ee6e63424361587165febc5 languageName: node linkType: hard -"@next/swc-darwin-arm64@npm:14.0.2": - version: 14.0.2 - resolution: "@next/swc-darwin-arm64@npm:14.0.2" +"@next/swc-darwin-arm64@npm:14.0.3": + version: 14.0.3 + resolution: "@next/swc-darwin-arm64@npm:14.0.3" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"@next/swc-darwin-x64@npm:14.0.2": - version: 14.0.2 - resolution: "@next/swc-darwin-x64@npm:14.0.2" +"@next/swc-darwin-x64@npm:14.0.3": + version: 14.0.3 + resolution: "@next/swc-darwin-x64@npm:14.0.3" conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"@next/swc-linux-arm64-gnu@npm:14.0.2": - version: 14.0.2 - resolution: "@next/swc-linux-arm64-gnu@npm:14.0.2" +"@next/swc-linux-arm64-gnu@npm:14.0.3": + version: 14.0.3 + resolution: "@next/swc-linux-arm64-gnu@npm:14.0.3" conditions: os=linux & cpu=arm64 & libc=glibc languageName: node linkType: hard -"@next/swc-linux-arm64-musl@npm:14.0.2": - version: 14.0.2 - resolution: "@next/swc-linux-arm64-musl@npm:14.0.2" +"@next/swc-linux-arm64-musl@npm:14.0.3": + version: 14.0.3 + resolution: "@next/swc-linux-arm64-musl@npm:14.0.3" conditions: os=linux & cpu=arm64 & libc=musl languageName: node linkType: hard -"@next/swc-linux-x64-gnu@npm:14.0.2": - version: 14.0.2 - resolution: "@next/swc-linux-x64-gnu@npm:14.0.2" +"@next/swc-linux-x64-gnu@npm:14.0.3": + version: 14.0.3 + resolution: "@next/swc-linux-x64-gnu@npm:14.0.3" conditions: os=linux & cpu=x64 & libc=glibc languageName: node linkType: hard -"@next/swc-linux-x64-musl@npm:14.0.2": - version: 14.0.2 - resolution: "@next/swc-linux-x64-musl@npm:14.0.2" +"@next/swc-linux-x64-musl@npm:14.0.3": + version: 14.0.3 + resolution: "@next/swc-linux-x64-musl@npm:14.0.3" conditions: os=linux & cpu=x64 & libc=musl languageName: node linkType: hard -"@next/swc-win32-arm64-msvc@npm:14.0.2": - version: 14.0.2 - resolution: "@next/swc-win32-arm64-msvc@npm:14.0.2" +"@next/swc-win32-arm64-msvc@npm:14.0.3": + version: 14.0.3 + resolution: "@next/swc-win32-arm64-msvc@npm:14.0.3" conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"@next/swc-win32-ia32-msvc@npm:14.0.2": - version: 14.0.2 - resolution: "@next/swc-win32-ia32-msvc@npm:14.0.2" +"@next/swc-win32-ia32-msvc@npm:14.0.3": + version: 14.0.3 + resolution: "@next/swc-win32-ia32-msvc@npm:14.0.3" conditions: os=win32 & cpu=ia32 languageName: node linkType: hard -"@next/swc-win32-x64-msvc@npm:14.0.2": - version: 14.0.2 - resolution: "@next/swc-win32-x64-msvc@npm:14.0.2" +"@next/swc-win32-x64-msvc@npm:14.0.3": + version: 14.0.3 + resolution: "@next/swc-win32-x64-msvc@npm:14.0.3" conditions: os=win32 & cpu=x64 languageName: node linkType: hard @@ -4461,28 +4300,28 @@ __metadata: linkType: hard "@preact/preset-vite@npm:^2.0.0": - version: 2.5.0 - resolution: "@preact/preset-vite@npm:2.5.0" + version: 2.7.0 + resolution: "@preact/preset-vite@npm:2.7.0" dependencies: - "@babel/plugin-transform-react-jsx": "npm:^7.14.9" - "@babel/plugin-transform-react-jsx-development": "npm:^7.16.7" - "@prefresh/vite": "npm:^2.2.8" + "@babel/plugin-transform-react-jsx": "npm:^7.22.15" + "@babel/plugin-transform-react-jsx-development": "npm:^7.22.5" + "@prefresh/vite": "npm:^2.4.1" "@rollup/pluginutils": "npm:^4.1.1" babel-plugin-transform-hook-names: "npm:^1.0.2" - debug: "npm:^4.3.1" - kolorist: "npm:^1.2.10" - resolve: "npm:^1.20.0" + debug: "npm:^4.3.4" + kolorist: "npm:^1.8.0" + resolve: "npm:^1.22.8" peerDependencies: "@babel/core": 7.x - vite: 2.x || 3.x || 4.x - checksum: 109f2a64717357f76685cd45ec1f709c2ba83e88a8dc485b39dec8cb1178eda765fe929b47d83690cbee1fa6181209f79ba4f7cbec15bcaa1cbb45730af8946a + vite: 2.x || 3.x || 4.x || 5.x + checksum: 95a5a87d804d9f33d98f7c8db93fe27de0d626b2794e745734bcad7a7d89db5a3ad37712feb188f1857d834658de33167f524b3040e8cea48ef422da6a1e74db languageName: node linkType: hard -"@prefresh/babel-plugin@npm:0.5.0": - version: 0.5.0 - resolution: "@prefresh/babel-plugin@npm:0.5.0" - checksum: 71cbfb52f3f4e29c2cc6a3b7adee87ac7d9c074edfe2f87b3f90ab006123572fab6dd679aa125b8a94e4669578f172ef0b1732d0d6c2b2fc158d0c765a87b70f +"@prefresh/babel-plugin@npm:0.5.1": + version: 0.5.1 + resolution: "@prefresh/babel-plugin@npm:0.5.1" + checksum: f9153c210427adbddb4403502f8fa845f6207516de2d162f5d550683a87173dc3eaabc6be2bb4f1206b882cdd23339f2092567be8d09794a3d06a5626942b1e4 languageName: node linkType: hard @@ -4502,19 +4341,19 @@ __metadata: languageName: node linkType: hard -"@prefresh/vite@npm:^2.2.8": - version: 2.4.1 - resolution: "@prefresh/vite@npm:2.4.1" +"@prefresh/vite@npm:^2.4.1": + version: 2.4.4 + resolution: "@prefresh/vite@npm:2.4.4" dependencies: "@babel/core": "npm:^7.22.1" - "@prefresh/babel-plugin": "npm:0.5.0" + "@prefresh/babel-plugin": "npm:0.5.1" "@prefresh/core": "npm:^1.5.1" "@prefresh/utils": "npm:^1.2.0" "@rollup/pluginutils": "npm:^4.2.1" peerDependencies: preact: ^10.4.0 vite: ">=2.0.0" - checksum: 939b4667ed83acfff6a879c8bff78d028b85c74f9e1cde656cf344768b888f6ba6b9927ee5e5efeecfc877fc6e6088c4c252e3f476604aecedaaf83cdfef7c45 + checksum: 31c3fcdcfbfd31921d41f01ca027515d4411f4169c2d3810578bf87b61609d155a1a410c977f098839982adb8da2d88674382cc4a5e55b6fe249a59be60a2483 languageName: node linkType: hard @@ -4707,18 +4546,18 @@ __metadata: linkType: hard "@rollup/pluginutils@npm:^5.0.2": - version: 5.0.4 - resolution: "@rollup/pluginutils@npm:5.0.4" + version: 5.1.0 + resolution: "@rollup/pluginutils@npm:5.1.0" dependencies: "@types/estree": "npm:^1.0.0" estree-walker: "npm:^2.0.2" picomatch: "npm:^2.3.1" peerDependencies: - rollup: ^1.20.0||^2.0.0||^3.0.0 + rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 peerDependenciesMeta: rollup: optional: true - checksum: 4114d0dbc22623d33ee38885e90afada4d96fae92e9645693fe438f6313832377ffb6b2809d90e96cc269339a54e2c0c46a739f621d9041050b0b751020f726b + checksum: c7bed15711f942d6fdd3470fef4105b73991f99a478605e13d41888963330a6f9e32be37e6ddb13f012bc7673ff5e54f06f59fd47109436c1c513986a8a7612d languageName: node linkType: hard @@ -4945,8 +4784,8 @@ __metadata: linkType: soft "@storybook/addon-designs@npm:^7.0.4": - version: 7.0.5 - resolution: "@storybook/addon-designs@npm:7.0.5" + version: 7.0.7 + resolution: "@storybook/addon-designs@npm:7.0.7" dependencies: "@figspec/react": "npm:^1.0.0" peerDependencies: @@ -4963,7 +4802,7 @@ __metadata: optional: true react-dom: optional: true - checksum: 01bb51d51c141f644bf1b9a163130acc55f800f0baa2cdbe8bbff6a4e0d323f8c1f5a32448a4aac2b2e05b68cb3ab0eb37c78accc26d37c0876195e0f1217c78 + checksum: 650cb4254a2e12b5c80cc999fb9048efc6ce9bf0d9a29b78a5b5e4fc1e9a67d0b1e5f58ee3fa14780efcb3c896967017d56b11dde989ea1931db409e3ca534f1 languageName: node linkType: hard @@ -5566,12 +5405,12 @@ __metadata: languageName: unknown linkType: soft -"@storybook/client-logger@npm:7.5.0": - version: 7.5.0 - resolution: "@storybook/client-logger@npm:7.5.0" +"@storybook/client-logger@npm:7.6.3": + version: 7.6.3 + resolution: "@storybook/client-logger@npm:7.6.3" dependencies: "@storybook/global": "npm:^5.0.0" - checksum: 90326c49a224bf21680c04ffee94725bf75658086093ccb839a8aae39476929c4719eafb18e498a148cf0dd956d4e9a5d3b2a34d09ca4fd25e2af553458558ac + checksum: e32a9932aa7ddc05a17540c2bea7faf613cfc927ef855db2e15dad1fbfb35173c3669f1aeab2a589f16f9dda6a761ee055b98b40700b522a984ec81675817cd1 languageName: node linkType: hard @@ -6961,17 +6800,17 @@ __metadata: linkType: hard "@storybook/theming@npm:^7.0.2": - version: 7.5.0 - resolution: "@storybook/theming@npm:7.5.0" + version: 7.6.3 + resolution: "@storybook/theming@npm:7.6.3" dependencies: "@emotion/use-insertion-effect-with-fallbacks": "npm:^1.0.0" - "@storybook/client-logger": "npm:7.5.0" + "@storybook/client-logger": "npm:7.6.3" "@storybook/global": "npm:^5.0.0" memoizerific: "npm:^1.11.3" peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 - checksum: 57da8e27c748cbec4dc1661cdd2d449949d97476d8e97933696b31d07c7361cbbcca8d7225cc00ca078daa160023b8965ddec7c23519ce0a4ef2658246b062e7 + checksum: 465b060d5aef79dddc69c71bd66d2c5bbe04d4204ca2d3e5a6eb21f79ad64e1bd54ed214e7a092800580d9261361227094d8c9b9fd5a3ee5051ddf3096ee01eb languageName: node linkType: hard @@ -7222,8 +7061,8 @@ __metadata: linkType: hard "@sveltejs/vite-plugin-svelte@npm:^2.4.2": - version: 2.4.6 - resolution: "@sveltejs/vite-plugin-svelte@npm:2.4.6" + version: 2.5.3 + resolution: "@sveltejs/vite-plugin-svelte@npm:2.5.3" dependencies: "@sveltejs/vite-plugin-svelte-inspector": "npm:^1.0.4" debug: "npm:^4.3.4" @@ -7233,9 +7072,16 @@ __metadata: svelte-hmr: "npm:^0.15.3" vitefu: "npm:^0.2.4" peerDependencies: - svelte: ^3.54.0 || ^4.0.0 + svelte: ^3.54.0 || ^4.0.0 || ^5.0.0-next.0 vite: ^4.0.0 - checksum: de7d844bf5fc12aa4caf352f5825d58f6747eef68301a492128ea6756c3c193f1d1e1f75975abd4fdfb50f5a4ff45016a94f40c29e1b0121095c63f6bc10e219 + checksum: 613a4ad18a946ddee7b82cae0d892040a9459a5ac5137cbaa91a4b7b67d504409b5dbc02d268136a740b09e42531b7516f80a0f687ca4fe2b0d99e6e483c5d06 + languageName: node + linkType: hard + +"@swc/core-darwin-arm64@npm:1.3.100": + version: 1.3.100 + resolution: "@swc/core-darwin-arm64@npm:1.3.100" + conditions: os=darwin & cpu=arm64 languageName: node linkType: hard @@ -7246,10 +7092,10 @@ __metadata: languageName: node linkType: hard -"@swc/core-darwin-arm64@npm:1.3.91": - version: 1.3.91 - resolution: "@swc/core-darwin-arm64@npm:1.3.91" - conditions: os=darwin & cpu=arm64 +"@swc/core-darwin-x64@npm:1.3.100": + version: 1.3.100 + resolution: "@swc/core-darwin-x64@npm:1.3.100" + conditions: os=darwin & cpu=x64 languageName: node linkType: hard @@ -7260,13 +7106,6 @@ __metadata: languageName: node linkType: hard -"@swc/core-darwin-x64@npm:1.3.91": - version: 1.3.91 - resolution: "@swc/core-darwin-x64@npm:1.3.91" - conditions: os=darwin & cpu=x64 - languageName: node - linkType: hard - "@swc/core-linux-arm-gnueabihf@npm:1.3.82": version: 1.3.82 resolution: "@swc/core-linux-arm-gnueabihf@npm:1.3.82" @@ -7274,10 +7113,10 @@ __metadata: languageName: node linkType: hard -"@swc/core-linux-arm-gnueabihf@npm:1.3.91": - version: 1.3.91 - resolution: "@swc/core-linux-arm-gnueabihf@npm:1.3.91" - conditions: os=linux & cpu=arm +"@swc/core-linux-arm64-gnu@npm:1.3.100": + version: 1.3.100 + resolution: "@swc/core-linux-arm64-gnu@npm:1.3.100" + conditions: os=linux & cpu=arm64 & libc=glibc languageName: node linkType: hard @@ -7288,10 +7127,10 @@ __metadata: languageName: node linkType: hard -"@swc/core-linux-arm64-gnu@npm:1.3.91": - version: 1.3.91 - resolution: "@swc/core-linux-arm64-gnu@npm:1.3.91" - conditions: os=linux & cpu=arm64 & libc=glibc +"@swc/core-linux-arm64-musl@npm:1.3.100": + version: 1.3.100 + resolution: "@swc/core-linux-arm64-musl@npm:1.3.100" + conditions: os=linux & cpu=arm64 & libc=musl languageName: node linkType: hard @@ -7302,10 +7141,10 @@ __metadata: languageName: node linkType: hard -"@swc/core-linux-arm64-musl@npm:1.3.91": - version: 1.3.91 - resolution: "@swc/core-linux-arm64-musl@npm:1.3.91" - conditions: os=linux & cpu=arm64 & libc=musl +"@swc/core-linux-x64-gnu@npm:1.3.100": + version: 1.3.100 + resolution: "@swc/core-linux-x64-gnu@npm:1.3.100" + conditions: os=linux & cpu=x64 & libc=glibc languageName: node linkType: hard @@ -7316,10 +7155,10 @@ __metadata: languageName: node linkType: hard -"@swc/core-linux-x64-gnu@npm:1.3.91": - version: 1.3.91 - resolution: "@swc/core-linux-x64-gnu@npm:1.3.91" - conditions: os=linux & cpu=x64 & libc=glibc +"@swc/core-linux-x64-musl@npm:1.3.100": + version: 1.3.100 + resolution: "@swc/core-linux-x64-musl@npm:1.3.100" + conditions: os=linux & cpu=x64 & libc=musl languageName: node linkType: hard @@ -7330,10 +7169,10 @@ __metadata: languageName: node linkType: hard -"@swc/core-linux-x64-musl@npm:1.3.91": - version: 1.3.91 - resolution: "@swc/core-linux-x64-musl@npm:1.3.91" - conditions: os=linux & cpu=x64 & libc=musl +"@swc/core-win32-arm64-msvc@npm:1.3.100": + version: 1.3.100 + resolution: "@swc/core-win32-arm64-msvc@npm:1.3.100" + conditions: os=win32 & cpu=arm64 languageName: node linkType: hard @@ -7344,10 +7183,10 @@ __metadata: languageName: node linkType: hard -"@swc/core-win32-arm64-msvc@npm:1.3.91": - version: 1.3.91 - resolution: "@swc/core-win32-arm64-msvc@npm:1.3.91" - conditions: os=win32 & cpu=arm64 +"@swc/core-win32-ia32-msvc@npm:1.3.100": + version: 1.3.100 + resolution: "@swc/core-win32-ia32-msvc@npm:1.3.100" + conditions: os=win32 & cpu=ia32 languageName: node linkType: hard @@ -7358,10 +7197,10 @@ __metadata: languageName: node linkType: hard -"@swc/core-win32-ia32-msvc@npm:1.3.91": - version: 1.3.91 - resolution: "@swc/core-win32-ia32-msvc@npm:1.3.91" - conditions: os=win32 & cpu=ia32 +"@swc/core-win32-x64-msvc@npm:1.3.100": + version: 1.3.100 + resolution: "@swc/core-win32-x64-msvc@npm:1.3.100" + conditions: os=win32 & cpu=x64 languageName: node linkType: hard @@ -7372,13 +7211,6 @@ __metadata: languageName: node linkType: hard -"@swc/core-win32-x64-msvc@npm:1.3.91": - version: 1.3.91 - resolution: "@swc/core-win32-x64-msvc@npm:1.3.91" - conditions: os=win32 & cpu=x64 - languageName: node - linkType: hard - "@swc/core@npm:1.3.82": version: 1.3.82 resolution: "@swc/core@npm:1.3.82" @@ -7425,19 +7257,18 @@ __metadata: linkType: hard "@swc/core@npm:^1.3.82": - version: 1.3.91 - resolution: "@swc/core@npm:1.3.91" - dependencies: - "@swc/core-darwin-arm64": "npm:1.3.91" - "@swc/core-darwin-x64": "npm:1.3.91" - "@swc/core-linux-arm-gnueabihf": "npm:1.3.91" - "@swc/core-linux-arm64-gnu": "npm:1.3.91" - "@swc/core-linux-arm64-musl": "npm:1.3.91" - "@swc/core-linux-x64-gnu": "npm:1.3.91" - "@swc/core-linux-x64-musl": "npm:1.3.91" - "@swc/core-win32-arm64-msvc": "npm:1.3.91" - "@swc/core-win32-ia32-msvc": "npm:1.3.91" - "@swc/core-win32-x64-msvc": "npm:1.3.91" + version: 1.3.100 + resolution: "@swc/core@npm:1.3.100" + dependencies: + "@swc/core-darwin-arm64": "npm:1.3.100" + "@swc/core-darwin-x64": "npm:1.3.100" + "@swc/core-linux-arm64-gnu": "npm:1.3.100" + "@swc/core-linux-arm64-musl": "npm:1.3.100" + "@swc/core-linux-x64-gnu": "npm:1.3.100" + "@swc/core-linux-x64-musl": "npm:1.3.100" + "@swc/core-win32-arm64-msvc": "npm:1.3.100" + "@swc/core-win32-ia32-msvc": "npm:1.3.100" + "@swc/core-win32-x64-msvc": "npm:1.3.100" "@swc/counter": "npm:^0.1.1" "@swc/types": "npm:^0.1.5" peerDependencies: @@ -7447,8 +7278,6 @@ __metadata: optional: true "@swc/core-darwin-x64": optional: true - "@swc/core-linux-arm-gnueabihf": - optional: true "@swc/core-linux-arm64-gnu": optional: true "@swc/core-linux-arm64-musl": @@ -7466,7 +7295,7 @@ __metadata: peerDependenciesMeta: "@swc/helpers": optional: true - checksum: 1b2b2fd400d476a073d69aa4a7eba754f9388c2d72e123a5fb942291c65e5c6a186302c6daafdb68121be999c604de8f01b8ff58126614e0a4e7ca5af6c9cfc7 + checksum: d6e873a7c627765991b18bd8d1b0ce1f1d9cf08c451fe78dbbf28dda14d4301cec2689f6bd85e604847d4a20226fd79c272796fef4f28feaca81a20c0f62e8e9 languageName: node linkType: hard @@ -7564,10 +7393,10 @@ __metadata: linkType: hard "@testing-library/jest-dom@npm:^6.1.2, @testing-library/jest-dom@npm:^6.1.3": - version: 6.1.3 - resolution: "@testing-library/jest-dom@npm:6.1.3" + version: 6.1.5 + resolution: "@testing-library/jest-dom@npm:6.1.5" dependencies: - "@adobe/css-tools": "npm:^4.3.0" + "@adobe/css-tools": "npm:^4.3.1" "@babel/runtime": "npm:^7.9.2" aria-query: "npm:^5.0.0" chalk: "npm:^3.0.0" @@ -7589,7 +7418,7 @@ __metadata: optional: true vitest: optional: true - checksum: 544e01939d3c14a3d44ae2e2bb9fe2a0cb5a9e4992ca2728f41188fb9fb2d56e25f1a2e1c12000be2a94d8da36cb220b24020e1b5c5c4c4bede9058a0d80583d + checksum: f3643a56fcd970b5c7e8fd10faf3c4817d8ab0e74fb1198d726643bdc5ac675ceaac3b0068c5b4fbad254470e8f98ed50028741de875a29ceaa2f854570979c9 languageName: node linkType: hard @@ -7607,8 +7436,8 @@ __metadata: linkType: hard "@testing-library/react@npm:^14.0.0": - version: 14.1.1 - resolution: "@testing-library/react@npm:14.1.1" + version: 14.1.2 + resolution: "@testing-library/react@npm:14.1.2" dependencies: "@babel/runtime": "npm:^7.12.5" "@testing-library/dom": "npm:^9.0.0" @@ -7616,7 +7445,7 @@ __metadata: peerDependencies: react: ^18.0.0 react-dom: ^18.0.0 - checksum: a0966b894455629e2d13fcf24864e8c948a740d84983dd98b40deed2f532ff576793a2924601b0f37aeea8b8f68a7e3d75dd5e1ec90814d752a4611fd71ed63a + checksum: b5b0990d3aa0ea8b37c55804e0d5d584fc638a5c7d4df90da9a0fdb00bc981b27b6991468b2dc719982a5d0b0107a41596063ce51ad519eeab47b22bc04d6779 languageName: node linkType: hard @@ -7707,83 +7536,83 @@ __metadata: linkType: hard "@types/aria-query@npm:^5.0.1": - version: 5.0.2 - resolution: "@types/aria-query@npm:5.0.2" - checksum: 74579b9e3f7f5042e8a05ab103dd652e724a556a5700fab778c76c53729635b73da5d242143df1fb9447e607f904cbd81871dd2b876f0974831a794165287b20 + version: 5.0.4 + resolution: "@types/aria-query@npm:5.0.4" + checksum: dc667bc6a3acc7bba2bccf8c23d56cb1f2f4defaa704cfef595437107efaa972d3b3db9ec1d66bc2711bfc35086821edd32c302bffab36f2e79b97f312069f08 languageName: node linkType: hard "@types/babel__core@npm:^7, @types/babel__core@npm:^7.0.0, @types/babel__core@npm:^7.1.14, @types/babel__core@npm:^7.1.7, @types/babel__core@npm:^7.18.0": - version: 7.20.3 - resolution: "@types/babel__core@npm:7.20.3" + version: 7.20.5 + resolution: "@types/babel__core@npm:7.20.5" dependencies: "@babel/parser": "npm:^7.20.7" "@babel/types": "npm:^7.20.7" "@types/babel__generator": "npm:*" "@types/babel__template": "npm:*" "@types/babel__traverse": "npm:*" - checksum: 5b5f9de4df7f995c2f06f3fdad39b58bc30121d1f2daceb97dd423c9b5dcbd5c464959338824e0dbee0c758bf55c4e9fe46fafd13bd29c1834afad04f291c588 + checksum: bdee3bb69951e833a4b811b8ee9356b69a61ed5b7a23e1a081ec9249769117fa83aaaf023bb06562a038eb5845155ff663e2d5c75dd95c1d5ccc91db012868ff languageName: node linkType: hard "@types/babel__generator@npm:*": - version: 7.6.6 - resolution: "@types/babel__generator@npm:7.6.6" + version: 7.6.7 + resolution: "@types/babel__generator@npm:7.6.7" dependencies: "@babel/types": "npm:^7.0.0" - checksum: 214d8b170e0eb04282d0e9dfda2c27116f64751729479786c2bf1b7ec22a5e9e5bbeb70585f047b0fd580d7d8948dc2108223c5a16e998d9674de0582d4e23d7 + checksum: 2427203864ef231857e102eeb32b731a419164863983119cdd4dac9f1503c2831eb4262d05ade95d4574aa410b94c16e54e36a616758452f685a34881f4596d9 languageName: node linkType: hard "@types/babel__plugin-transform-runtime@npm:^7": - version: 7.9.4 - resolution: "@types/babel__plugin-transform-runtime@npm:7.9.4" - checksum: efbcbae29f5401733ef1ac70dd5c7c3347cf4ce8d6b886ff57cfef331d29754b5436654ab7a360b1576d9672614b624f4b4081c92222559f6d3b461d3efd7f7c + version: 7.9.5 + resolution: "@types/babel__plugin-transform-runtime@npm:7.9.5" + checksum: 119d8f88188c63eb21bf150d294991d3470e6aa90dc8ec9f634197760af8acc981564e29af9087bfa8ad713b5b5419cae03047cd225fccb9977bb97adf25a871 languageName: node linkType: hard "@types/babel__preset-env@npm:^7": - version: 7.9.4 - resolution: "@types/babel__preset-env@npm:7.9.4" - checksum: 13a0a6800c24070009728aedef26dfa084029f1ea83ec894e127a5def38cce70f2c56515af6fee5e42034362ba2732d264c3804db35f9c90e7f2f89b3bf66a1d + version: 7.9.6 + resolution: "@types/babel__preset-env@npm:7.9.6" + checksum: 639bcf58094530eb8509b302de9c42fc1a9e44e236bcbfd218e987aba7a2c15052c3a1cac7ca7f260255e74beb3b489ff877b9870f8587394457cd3aa9f64934 languageName: node linkType: hard "@types/babel__template@npm:*": - version: 7.4.3 - resolution: "@types/babel__template@npm:7.4.3" + version: 7.4.4 + resolution: "@types/babel__template@npm:7.4.4" dependencies: "@babel/parser": "npm:^7.1.0" "@babel/types": "npm:^7.0.0" - checksum: f989bd918e1ebfcc6e68c72a3818b7518049673c4e7ba31b11c10d5d3064261c534f3d2f3097f82f80d5fc58f56f3633c21ddf0332552a926a488c105d042c45 + checksum: cc84f6c6ab1eab1427e90dd2b76ccee65ce940b778a9a67be2c8c39e1994e6f5bbc8efa309f6cea8dc6754994524cd4d2896558df76d92e7a1f46ecffee7112b languageName: node linkType: hard "@types/babel__traverse@npm:*, @types/babel__traverse@npm:^7.0.6, @types/babel__traverse@npm:^7.18.0": - version: 7.20.3 - resolution: "@types/babel__traverse@npm:7.20.3" + version: 7.20.4 + resolution: "@types/babel__traverse@npm:7.20.4" dependencies: "@babel/types": "npm:^7.20.7" - checksum: 295ed9b837e62e17ee43be0df45d90fff5208986bd43af593c9020d152d3b2c55328e038c2f8585926b63cc22f887f28bf3f4c805aa881e2dd0bdd5ead92ece0 + checksum: e76cb4974c7740fd61311152dc497e7b05c1c46ba554aab875544ab0a7457f343cafcad34ba8fb2ff543ab0e012ef2d3fa0c13f1a4e9a4cd9c4c703c7a2a8d62 languageName: node linkType: hard "@types/body-parser@npm:*": - version: 1.19.3 - resolution: "@types/body-parser@npm:1.19.3" + version: 1.19.5 + resolution: "@types/body-parser@npm:1.19.5" dependencies: "@types/connect": "npm:*" "@types/node": "npm:*" - checksum: d35f76406232ee68b02b4b37b4b63cce26329f4302f55c19d5f4fd346f5b7df0994af486331849c4992567d83ded10f5beb3e200280c2142f53e0424f1565082 + checksum: aebeb200f25e8818d8cf39cd0209026750d77c9b85381cdd8deeb50913e4d18a1ebe4b74ca9b0b4d21952511eeaba5e9fbbf739b52731a2061e206ec60d568df languageName: node linkType: hard "@types/bonjour@npm:^3.5.9": - version: 3.5.11 - resolution: "@types/bonjour@npm:3.5.11" + version: 3.5.13 + resolution: "@types/bonjour@npm:3.5.13" dependencies: "@types/node": "npm:*" - checksum: 963b8260708186981b6fc75fcdbf1ab95bd83ec0472c1b9649c635bdf260d2af94c2930c1a08f97c9d6e370a14737a697e05e10796f29c2a8d81f7f0a80a8ed0 + checksum: eebedbca185ac3c39dd5992ef18d9e2a9f99e7f3c2f52f5561f90e9ed482c5d224c7962db95362712f580ed5713264e777a98d8f0bd8747f4eadf62937baed16 languageName: node linkType: hard @@ -7800,53 +7629,53 @@ __metadata: linkType: hard "@types/chai@npm:^4": - version: 4.3.6 - resolution: "@types/chai@npm:4.3.6" - checksum: 388af382b11453a69808800479dcaff0323a0d1e15df1619175ebd55b294d716d560058f560ed55434e8846af46f017d7d78544822571f6322d3fac6d5f8a29d + version: 4.3.11 + resolution: "@types/chai@npm:4.3.11" + checksum: 0c216ac4a19bfbf8318bb104d32e50704ee2ffc4b538b976c4326e6638fee121462402caa570662227a2a218810388aadb14bdbd3d3d474ec300b00695db448a languageName: node linkType: hard "@types/color-convert@npm:^2.0.0": - version: 2.0.1 - resolution: "@types/color-convert@npm:2.0.1" + version: 2.0.3 + resolution: "@types/color-convert@npm:2.0.3" dependencies: "@types/color-name": "npm:*" - checksum: 53eed9d08ee8211e881cf30e5950f32202825f4233bf0411bdeacc2908f7b64b79b5c1dd4ed9748c9deeb4334dccd37d415758736863900cd1e63dac18c62b7e + checksum: a5870547660f426cddd76b54e942703e29c3b43fc26b1ba567e10b9707d144b7d8863e0af7affd9c3391815c06582571f43835c71ede270a6c58949155d18b77 languageName: node linkType: hard "@types/color-name@npm:*": - version: 1.1.1 - resolution: "@types/color-name@npm:1.1.1" - checksum: 2abeac8d8d833e0622c66f21487cc8b522792abb2eff2e40df0e3e53261728cb65bab590edf24953eb8d8653ec88044dc801d9a4e58c489a0f10c025de522868 + version: 1.1.3 + resolution: "@types/color-name@npm:1.1.3" + checksum: caea7b6446623acdbf38138a8d4416b0363314784d82b13f3e3fa29f2070bc5630f674f2c953edac5f1c9710f3302328abf912b32de5b6e799d3bdb149269fbc languageName: node linkType: hard "@types/compression@npm:^1.7.0": - version: 1.7.3 - resolution: "@types/compression@npm:1.7.3" + version: 1.7.5 + resolution: "@types/compression@npm:1.7.5" dependencies: "@types/express": "npm:*" - checksum: c6f7353ddb97193692bf31aad15fb27fd730081643f347d897b0451cd54ab2d2fce1973f1eed40548be1dde79d61f12966d35129e9cfd6392f4f78e8b09d0153 + checksum: 3818f3d10cede38a835b40b80c341eae162aef1691f2e8f81178a77dbc109f04234cf760b6066eaa06ecbb1da143433c00db2fd9999198b76cd5a193e1d09675 languageName: node linkType: hard "@types/connect-history-api-fallback@npm:^1.3.5": - version: 1.5.1 - resolution: "@types/connect-history-api-fallback@npm:1.5.1" + version: 1.5.4 + resolution: "@types/connect-history-api-fallback@npm:1.5.4" dependencies: "@types/express-serve-static-core": "npm:*" "@types/node": "npm:*" - checksum: 306e19429a404625ea8bee2043e67b1222ccf46cf25846d580074519bfead6839f38fe8c710e45ea66e3e39b4ed0ebe8d0e506098d31ce078711bc94fae990f2 + checksum: 1b4035b627dcd714b05a22557f942e24a57ca48e7377dde0d2f86313fe685bc0a6566512a73257a55b5665b96c3041fb29228ac93331d8133011716215de8244 languageName: node linkType: hard "@types/connect@npm:*": - version: 3.4.36 - resolution: "@types/connect@npm:3.4.36" + version: 3.4.38 + resolution: "@types/connect@npm:3.4.38" dependencies: "@types/node": "npm:*" - checksum: 0dd8fcf576e178e69cbc00d47be69d3198dca4d86734a00fc55de0df147982e0a5f34592117571c5979e92ce8f3e0596e31aa454496db8a43ab90c5ab1068f40 + checksum: 2e1cdba2c410f25649e77856505cd60223250fa12dff7a503e492208dbfdd25f62859918f28aba95315251fd1f5e1ffbfca1e25e73037189ab85dd3f8d0a148c languageName: node linkType: hard @@ -7867,27 +7696,27 @@ __metadata: linkType: hard "@types/cross-spawn@npm:^6.0.2": - version: 6.0.3 - resolution: "@types/cross-spawn@npm:6.0.3" + version: 6.0.6 + resolution: "@types/cross-spawn@npm:6.0.6" dependencies: "@types/node": "npm:*" - checksum: a8de3fed3e9cacf8ee50e49139ef40b3fd03ee3c135140bdfc1536c00c38bd26c435be885c5facc97404be2e17b7c088fa588b43d6e974bab20cdb0e53ec6c9c + checksum: e3d476bb6b3a54a8934a97fe6ee4bd13e2e5eb29073929a4be76a52466602ffaea420b20774ffe8503f9fa24f3ae34817e95e7f625689fb0d1c10404f5b2889c languageName: node linkType: hard "@types/debug@npm:^4.0.0": - version: 4.1.9 - resolution: "@types/debug@npm:4.1.9" + version: 4.1.12 + resolution: "@types/debug@npm:4.1.12" dependencies: "@types/ms": "npm:*" - checksum: 8b550c47c70cc1af9a58e5c572f2418f30bface5bf5d5afa0d938923978f40be4c55646f1ab260f6f1492ca6ab065d447de23cb3b30d7b38597c2cbf89f4cb21 + checksum: 5dcd465edbb5a7f226e9a5efd1f399c6172407ef5840686b73e3608ce135eeca54ae8037dcd9f16bdb2768ac74925b820a8b9ecc588a58ca09eca6acabe33e2f languageName: node linkType: hard "@types/detect-port@npm:^1.3.0": - version: 1.3.3 - resolution: "@types/detect-port@npm:1.3.3" - checksum: 27c8000e3d41fd1158e2213b31c90b63852299ed66e4604b028a7146519530ab129b8ff867db02b06a32f61e7764f8d5aff0c44c5f543ce2b4b035e5968b62e1 + version: 1.3.5 + resolution: "@types/detect-port@npm:1.3.5" + checksum: d8dd9d0e643106a2263f530b24ffdc3409d9391c50fc5e404018ba3633947aa3777db7fb094aeb0f49a13cc998aae8889747ad9edaa02b13a2de2385f37106ef languageName: node linkType: hard @@ -7898,24 +7727,24 @@ __metadata: languageName: node linkType: hard -"@types/doctrine@npm:^0.0.8": - version: 0.0.8 - resolution: "@types/doctrine@npm:0.0.8" - checksum: ca4cab4a94526ec3579c3f10a027298028d34b4c092e4b6791afb37a5f6899208ee1e91bc9542541f31d6d3ba3d1a70408deaa1f105c22c86d23e3a87c59a43c +"@types/doctrine@npm:^0.0.9": + version: 0.0.9 + resolution: "@types/doctrine@npm:0.0.9" + checksum: cdaca493f13c321cf0cacd1973efc0ae74569633145d9e6fc1128f32217a6968c33bea1f858275239fe90c98f3be57ec8f452b416a9ff48b8e8c1098b20fa51c languageName: node linkType: hard "@types/ejs@npm:^3.1.1": - version: 3.1.3 - resolution: "@types/ejs@npm:3.1.3" - checksum: 8366861c80749a0231f58a258f1fc9ab43992e6b74d157d1fd199f273f2f7d9f016f64d61a6d899a77d86d49c2a4a569215deda899dcf2dbfef85e12d26b9715 + version: 3.1.5 + resolution: "@types/ejs@npm:3.1.5" + checksum: 13d994cf0323d7e0ad33b9384914ccd3b4cd8bf282eced3649b1621b66ee7c784ac2d120a9d7b1f43d6f873518248fb8c3221b06a649b847860b9c2389a0b0ed languageName: node linkType: hard "@types/emscripten@npm:^1.39.6": - version: 1.39.8 - resolution: "@types/emscripten@npm:1.39.8" - checksum: a2cc8ddb734b0cbead13c9d4b7733da07655529bdfbcd8a858067bd6b97f2b622935526a6d6ee5c9c5495d50854d608e34ad9a4e09700858d7b9418799e33197 + version: 1.39.10 + resolution: "@types/emscripten@npm:1.39.10" + checksum: c9adde9307d54efb5152931bfe99966fbe12fbd4d07663fb5cdc4cc1bd3a1f030882d50d4a27875b7b2d9713d160609e67b72e92177a021c9f4699ee5ac41035 languageName: node linkType: hard @@ -7927,38 +7756,38 @@ __metadata: linkType: hard "@types/eslint-scope@npm:^3.7.3": - version: 3.7.5 - resolution: "@types/eslint-scope@npm:3.7.5" + version: 3.7.7 + resolution: "@types/eslint-scope@npm:3.7.7" dependencies: "@types/eslint": "npm:*" "@types/estree": "npm:*" - checksum: 9ade676030067a14d34acb4a48362bcf16632e867d059e734cf082e0523362415ed698e3776f8fad7e346019078d63a5264992b33054182607ce20ad9eaeec80 + checksum: a0ecbdf2f03912679440550817ff77ef39a30fa8bfdacaf6372b88b1f931828aec392f52283240f0d648cf3055c5ddc564544a626bcf245f3d09fcb099ebe3cc languageName: node linkType: hard "@types/eslint@npm:*": - version: 8.44.3 - resolution: "@types/eslint@npm:8.44.3" + version: 8.44.8 + resolution: "@types/eslint@npm:8.44.8" dependencies: "@types/estree": "npm:*" "@types/json-schema": "npm:*" - checksum: d9d681efe461ec8934800a89773be251a200c9d4528ca2330bb99f4ca3bd6b2d053034d2b5fe645a1567331af2c89e364aed4be8c839f10a1028a3cbe2856b01 + checksum: 610966753add984f6ac9f00eeb766691e141e66a7e20b724a45ad077f60e8cd8fd7874b7e655e93537e54873cc5711cd6f57728474e08b478407cd942f098263 languageName: node linkType: hard "@types/estree-jsx@npm:^1.0.0": - version: 1.0.1 - resolution: "@types/estree-jsx@npm:1.0.1" + version: 1.0.3 + resolution: "@types/estree-jsx@npm:1.0.3" dependencies: "@types/estree": "npm:*" - checksum: 3aa4d648ba3ddffa73eff63904a4ef7f78fc78c2fc22ad0ef80908e7e5839e4622dc8d8dc46708b07a6e732e72692cf234db63650c3ca608cc5b41c3e81f37a2 + checksum: 41742a7b0874f63e61396d87a46d3ca531850a0e2cd7cec304339b8df439b6371d5e8758f34de9b5d9e940486ea21305b2f74cb420754838ecdfdaba918afc66 languageName: node linkType: hard "@types/estree@npm:*, @types/estree@npm:^1.0.0, @types/estree@npm:^1.0.1": - version: 1.0.2 - resolution: "@types/estree@npm:1.0.2" - checksum: 4b5c601d435ea8e2205458de15fd1556b5ae6c9a8323bad8a940ea502d6c824664faca94234c0bf76bf9c87cbf6ac41abee550c9e20433256549d589c9b543bd + version: 1.0.5 + resolution: "@types/estree@npm:1.0.5" + checksum: b3b0e334288ddb407c7b3357ca67dbee75ee22db242ca7c56fe27db4e1a31989cb8af48a84dd401deb787fe10cc6b2ab1ee82dc4783be87ededbe3d53c79c70d languageName: node linkType: hard @@ -7970,26 +7799,26 @@ __metadata: linkType: hard "@types/express-serve-static-core@npm:*, @types/express-serve-static-core@npm:^4.17.33": - version: 4.17.37 - resolution: "@types/express-serve-static-core@npm:4.17.37" + version: 4.17.41 + resolution: "@types/express-serve-static-core@npm:4.17.41" dependencies: "@types/node": "npm:*" "@types/qs": "npm:*" "@types/range-parser": "npm:*" "@types/send": "npm:*" - checksum: 45487318802d9c44aac4323b9f5b33c24bb37c0258a5984c8ffe2b57f1bfc5b8ebbdc47149d6ce1b9e47e39b6cc4d1ef4468903a339990bfb8eac7995392f19f + checksum: dc166cbf4475c00a81fbcab120bf7477c527184be11ae149df7f26d9c1082114c68f8d387a2926fe80291b06477c8bbd9231ff4f5775de328e887695aefce269 languageName: node linkType: hard "@types/express@npm:*, @types/express@npm:^4.17.11, @types/express@npm:^4.17.13, @types/express@npm:^4.7.0": - version: 4.17.18 - resolution: "@types/express@npm:4.17.18" + version: 4.17.21 + resolution: "@types/express@npm:4.17.21" dependencies: "@types/body-parser": "npm:*" "@types/express-serve-static-core": "npm:^4.17.33" "@types/qs": "npm:*" "@types/serve-static": "npm:*" - checksum: 6babf7bce6abdd45138f7eac058c8705dbd3a2857208c8c78d863fcd8b3b212c6569fba1f748137e5743287f82dfecf9bc4d78d31d290afff2d37700a0cdb6fe + checksum: 12e562c4571da50c7d239e117e688dc434db1bac8be55613294762f84fd77fbd0658ccd553c7d3ab02408f385bc93980992369dd30e2ecd2c68c358e6af8fabf languageName: node linkType: hard @@ -8001,12 +7830,12 @@ __metadata: linkType: hard "@types/fs-extra@npm:^11.0.1": - version: 11.0.2 - resolution: "@types/fs-extra@npm:11.0.2" + version: 11.0.4 + resolution: "@types/fs-extra@npm:11.0.4" dependencies: "@types/jsonfile": "npm:*" "@types/node": "npm:*" - checksum: 8ab94988a3376169e3daf0a546b5312039c19a7f1fb9c5a171f7602c9398155a90c0cef81ab95273e4c8c5962ab4ec280f0a1ba8e874bab2f26ca94b282c14a3 + checksum: 9e34f9b24ea464f3c0b18c3f8a82aefc36dc524cc720fc2b886e5465abc66486ff4e439ea3fb2c0acebf91f6d3f74e514f9983b1f02d4243706bdbb7511796ad languageName: node linkType: hard @@ -8028,7 +7857,17 @@ __metadata: languageName: node linkType: hard -"@types/glob@npm:*, @types/glob@npm:^7.1.1, @types/glob@npm:^7.1.3": +"@types/glob@npm:*": + version: 8.1.0 + resolution: "@types/glob@npm:8.1.0" + dependencies: + "@types/minimatch": "npm:^5.1.2" + "@types/node": "npm:*" + checksum: ded07aa0d7a1caf3c47b85e262be82989ccd7933b4a14712b79c82fd45a239249811d9fc3a135b3e9457afa163e74a297033d7245b0dc63cd3d032f3906b053f + languageName: node + linkType: hard + +"@types/glob@npm:^7.1.1, @types/glob@npm:^7.1.3": version: 7.2.0 resolution: "@types/glob@npm:7.2.0" dependencies: @@ -8039,30 +7878,30 @@ __metadata: linkType: hard "@types/graceful-fs@npm:^4.1.3": - version: 4.1.7 - resolution: "@types/graceful-fs@npm:4.1.7" + version: 4.1.9 + resolution: "@types/graceful-fs@npm:4.1.9" dependencies: "@types/node": "npm:*" - checksum: a8c04a250cb40207b15097b33c053f5ecf4352f5107c0a2635f674dae8c9a90b28dc9bd6e28307d5aab0b5d3853e713de42110a149a6e303626915047134e87d + checksum: 235d2fc69741448e853333b7c3d1180a966dd2b8972c8cbcd6b2a0c6cd7f8d582ab2b8e58219dbc62cce8f1b40aa317ff78ea2201cdd8249da5025adebed6f0b languageName: node linkType: hard "@types/hast@npm:^2.0.0": - version: 2.3.6 - resolution: "@types/hast@npm:2.3.6" + version: 2.3.8 + resolution: "@types/hast@npm:2.3.8" dependencies: "@types/unist": "npm:^2" - checksum: e44fa492f9ae8a0e499a738b598fc50c6cfa8131f2758ed98f292fbe67e37f4e85edb1aa53b27450bdafcf4e52c1a9660df0478914199c058193d9cffdc7d93c + checksum: 0b358a65135922df8465f5daabed08602afc9098cf9065439f2fa46a5757d1630c88c4ad208b9ff0114bed95d468a75eeed49a099615096a9ad3bb1a85d8a3a1 languageName: node linkType: hard "@types/hoist-non-react-statics@npm:^3.3.1": - version: 3.3.2 - resolution: "@types/hoist-non-react-statics@npm:3.3.2" + version: 3.3.5 + resolution: "@types/hoist-non-react-statics@npm:3.3.5" dependencies: "@types/react": "npm:*" hoist-non-react-statics: "npm:^3.3.0" - checksum: 2aaff564e7674b0b7389592f30e4681919a0a71986bc5d8c5ef67d9b5b3b46913920f5002a96fd37d8904fe5c0cc1e4cc5c92884c847b2f4a74cb30d841494d4 + checksum: 2a3b64bf3d9817d7830afa60ee314493c475fb09570a64e7737084cd482d2177ebdddf888ce837350bac51741278b077683facc9541f052d4bbe8487b4e3e618 languageName: node linkType: hard @@ -8074,72 +7913,82 @@ __metadata: linkType: hard "@types/http-cache-semantics@npm:*": - version: 4.0.2 - resolution: "@types/http-cache-semantics@npm:4.0.2" - checksum: 975258beba5a6ce446b67f9bf905385d8d44cecad54d839208e86018b0fe4a517c62ec7a169ec64ed454363628def75446fa09d99755f3797f213b596477fe97 + version: 4.0.4 + resolution: "@types/http-cache-semantics@npm:4.0.4" + checksum: 51b72568b4b2863e0fe8d6ce8aad72a784b7510d72dc866215642da51d84945a9459fa89f49ec48f1e9a1752e6a78e85a4cda0ded06b1c73e727610c925f9ce6 languageName: node linkType: hard "@types/http-errors@npm:*": - version: 2.0.2 - resolution: "@types/http-errors@npm:2.0.2" - checksum: ecedc65091baf7c83e0e61e7d1992112e0fa09461d69004747f55c80b801b796bdb60161e54efdac8a720b5f78a54720b0cabde3ae7094103a552d5c189222ce + version: 2.0.4 + resolution: "@types/http-errors@npm:2.0.4" + checksum: 494670a57ad4062fee6c575047ad5782506dd35a6b9ed3894cea65830a94367bd84ba302eb3dde331871f6d70ca287bfedb1b2cf658e6132cd2cbd427ab56836 languageName: node linkType: hard "@types/http-proxy@npm:^1.17.8": - version: 1.17.12 - resolution: "@types/http-proxy@npm:1.17.12" + version: 1.17.14 + resolution: "@types/http-proxy@npm:1.17.14" dependencies: "@types/node": "npm:*" - checksum: 06719371ece6bdf9fd28b90b03bd56e48ffca675dfaadca81ae12ca18db6e77e70a509537ebfa3b2c37810d77dc52e5a3190c09bc490668dde7e384c7b579090 + checksum: c4bffd87be9aff7e879c05bd2c28716220e0eb39788e3f8d314eee665324ad8f5f0919041cbd710254d553cd9cea023f8b776d4b1ec31d2188eac60af18c3022 languageName: node linkType: hard "@types/ip@npm:^1.1.0": - version: 1.1.1 - resolution: "@types/ip@npm:1.1.1" + version: 1.1.3 + resolution: "@types/ip@npm:1.1.3" dependencies: "@types/node": "npm:*" - checksum: cabb35bfb4255805e282f8b4b26c0cdca04a0d05016fe5c0a676aabadd1065c461bff5fdf4fca01041c7589cca10202865b1e6b02e505e569928b139353d7dfc + checksum: af576e33830196be01b71c48ad5f83380a1c51d62f394a5601e8c2a5b8b31cf6dc8fe71ac39c38d806bcf1d6f1c5c8205c129eca6b6d168c0df7ab3722df23b9 languageName: node linkType: hard "@types/istanbul-lib-coverage@npm:*, @types/istanbul-lib-coverage@npm:^2.0.0, @types/istanbul-lib-coverage@npm:^2.0.1": - version: 2.0.4 - resolution: "@types/istanbul-lib-coverage@npm:2.0.4" - checksum: af5f6b64e788331ed3f7b2e2613cb6ca659c58b8500be94bbda8c995ad3da9216c006f1cfe6f66b321c39392b1bda18b16e63cef090a77d24a00b4bd5ba3b018 + version: 2.0.6 + resolution: "@types/istanbul-lib-coverage@npm:2.0.6" + checksum: 3948088654f3eeb45363f1db158354fb013b362dba2a5c2c18c559484d5eb9f6fd85b23d66c0a7c2fcfab7308d0a585b14dadaca6cc8bf89ebfdc7f8f5102fb7 languageName: node linkType: hard "@types/istanbul-lib-report@npm:*": - version: 3.0.1 - resolution: "@types/istanbul-lib-report@npm:3.0.1" + version: 3.0.3 + resolution: "@types/istanbul-lib-report@npm:3.0.3" dependencies: "@types/istanbul-lib-coverage": "npm:*" - checksum: a2a002ee7ecd9079a2c06235d28d1bc77089c3d834eec7e6dac38986203634936f2a017812624acfbedabec4bddd933942f14ac93eba2dc57f581ad4f35bbf1d + checksum: 247e477bbc1a77248f3c6de5dadaae85ff86ac2d76c5fc6ab1776f54512a745ff2a5f791d22b942e3990ddbd40f3ef5289317c4fca5741bedfaa4f01df89051c languageName: node linkType: hard "@types/istanbul-reports@npm:^3.0.0": - version: 3.0.2 - resolution: "@types/istanbul-reports@npm:3.0.2" + version: 3.0.4 + resolution: "@types/istanbul-reports@npm:3.0.4" dependencies: "@types/istanbul-lib-report": "npm:*" - checksum: df6c9e6865006be06bae29f63d5240b96bc7041b18a8c6d66be5b5d92ef5c95675c7a605a603029065f4f8aece7dba7360349e9d0543f512417e64a707a3c4fa + checksum: 1647fd402aced5b6edac87274af14ebd6b3a85447ef9ad11853a70fd92a98d35f81a5d3ea9fcb5dbb5834e800c6e35b64475e33fcae6bfa9acc70d61497c54ee languageName: node linkType: hard "@types/jest-specific-snapshot@npm:^0.5.6": - version: 0.5.7 - resolution: "@types/jest-specific-snapshot@npm:0.5.7" + version: 0.5.9 + resolution: "@types/jest-specific-snapshot@npm:0.5.9" dependencies: "@types/jest": "npm:*" - checksum: ad18f3c6e55a533f9d9b04ae99dfdae6e6d0b5c936f348b5280325ced1c35ccf94ce629a71c3116785bb041d0192c22630d38ed30f13849fe9310935e6224fb8 + checksum: b987c7951532aa6399ef043468c2c4fae6345c1434261f03b2c501c91581f997569aafed56c67c6cc77ac7d907db003d05ae4314e6b43f6d137ea539d83484d5 + languageName: node + linkType: hard + +"@types/jest@npm:*": + version: 29.5.10 + resolution: "@types/jest@npm:29.5.10" + dependencies: + expect: "npm:^29.0.0" + pretty-format: "npm:^29.0.0" + checksum: b46171d59d12a5f69bbe710f65eaf59a8073337c6b4a67dff8158575caec53f1c61f8a7d645b34d6ac3c4ea398acd30f0c5d1c4a131c0c918798019264a3397d languageName: node linkType: hard -"@types/jest@npm:*, @types/jest@npm:28.1.3": +"@types/jest@npm:28.1.3": version: 28.1.3 resolution: "@types/jest@npm:28.1.3" dependencies: @@ -8150,19 +7999,19 @@ __metadata: linkType: hard "@types/js-yaml@npm:^4.0.5": - version: 4.0.6 - resolution: "@types/js-yaml@npm:4.0.6" - checksum: e2e3ccdde9979973ea0afc357e753ddcd1a586cfccfeafcf5c17ab1ea3314c73faf7555d0af4da237c0c32c29cd4bc0f6a659a5e5085fe3f1fdc94d20fb19683 + version: 4.0.9 + resolution: "@types/js-yaml@npm:4.0.9" + checksum: 24de857aa8d61526bbfbbaa383aa538283ad17363fcd5bb5148e2c7f604547db36646440e739d78241ed008702a8920665d1add5618687b6743858fae00da211 languageName: node linkType: hard "@types/jscodeshift@npm:^0.11.10": - version: 0.11.10 - resolution: "@types/jscodeshift@npm:0.11.10" + version: 0.11.11 + resolution: "@types/jscodeshift@npm:0.11.11" dependencies: ast-types: "npm:^0.14.1" recast: "npm:^0.20.3" - checksum: 1d477ea1addd62a5949f028ef16bac3226341d65052e4f51d61e51789c6c7aa17e953dac34eb6d1e5a2b761fc4c7920df875e20e85cdf4122fc08836e7da547a + checksum: b3d2be46d523ae679a2c986d7f98232aabaa761c960423105286bfd682fb57f9366f6afed1e1d6b35e4923b7e038c0aa539032d7e7fd430754683078032cd578 languageName: node linkType: hard @@ -8178,9 +8027,9 @@ __metadata: linkType: hard "@types/json-schema@npm:*, @types/json-schema@npm:^7.0.8, @types/json-schema@npm:^7.0.9": - version: 7.0.13 - resolution: "@types/json-schema@npm:7.0.13" - checksum: 446fe6722899333ff647b5853fdcc9f039156d56abe517166154d3578d641841cc869f61e8b7822c24a1daeb7dfbd4fdcea84bf07c0858e2f9cca415e2ca8dd4 + version: 7.0.15 + resolution: "@types/json-schema@npm:7.0.15" + checksum: a996a745e6c5d60292f36731dd41341339d4eeed8180bb09226e5c8d23759067692b1d88e5d91d72ee83dfc00d3aca8e7bd43ea120516c17922cbcb7c3e252db languageName: node linkType: hard @@ -8192,11 +8041,11 @@ __metadata: linkType: hard "@types/jsonfile@npm:*": - version: 6.1.2 - resolution: "@types/jsonfile@npm:6.1.2" + version: 6.1.4 + resolution: "@types/jsonfile@npm:6.1.4" dependencies: "@types/node": "npm:*" - checksum: c2943f9bfa7867b33fb362b88a932efdc00e9e5f2762b6ef912617cb0a3e3221a98920f8976a4cf817aa576e03d28a25391236e9644e2ebe648081b08df62ef5 + checksum: b12d068b021e4078f6ac4441353965769be87acf15326173e2aea9f3bf8ead41bd0ad29421df5bbeb0123ec3fc02eb0a734481d52903704a1454a1845896b9eb languageName: node linkType: hard @@ -8210,53 +8059,53 @@ __metadata: linkType: hard "@types/loader-utils@npm:^2.0.5": - version: 2.0.5 - resolution: "@types/loader-utils@npm:2.0.5" + version: 2.0.6 + resolution: "@types/loader-utils@npm:2.0.6" dependencies: "@types/node": "npm:*" "@types/webpack": "npm:^4" - checksum: cea54ca7c1b220ddaf281dd5420bea52ceef3150e6fe0708c4a5793a1ac61c478355178c23479eb84c1d2667235156dc2b13dbc377646ed08055f3d552354e4f + checksum: df178981861ef09f0618eae4aa865b81ed3f2c4ab1359711fe6077236f57dee31fb94f1de9bd156d0a3d252eb95da01c424f9fa822aeaf7e3057bc082bb4bda7 languageName: node linkType: hard "@types/lodash@npm:^4.14.167": - version: 4.14.199 - resolution: "@types/lodash@npm:4.14.199" - checksum: a7168a0a2a7c9e8801aa95f92b02f9d664ee938a5186d73f77a3a8447f475bbadedc1f7f746ffd2530ae34069d232bf25f4f4414077f0d81c71489e34e59173e + version: 4.14.202 + resolution: "@types/lodash@npm:4.14.202" + checksum: 6064d43c8f454170841bd67c8266cc9069d9e570a72ca63f06bceb484cb4a3ee60c9c1f305c1b9e3a87826049fd41124b8ef265c4dd08b00f6766609c7fe9973 languageName: node linkType: hard "@types/mdast@npm:^3.0.0": - version: 3.0.13 - resolution: "@types/mdast@npm:3.0.13" + version: 3.0.15 + resolution: "@types/mdast@npm:3.0.15" dependencies: "@types/unist": "npm:^2" - checksum: b328d1622075a67db1d8eac78dcbd55aefb4adaf63206b58abfce902c0ce5232a2674bd0bf961696c9a3765d5fcf145378ce03075bd1690a25adc617650f1228 + checksum: fcbf716c03d1ed5465deca60862e9691414f9c43597c288c7d2aefbe274552e1bbd7aeee91b88a02597e88a28c139c57863d0126fcf8416a95fdc681d054ee3d languageName: node linkType: hard "@types/mdx@npm:^2.0.0": - version: 2.0.8 - resolution: "@types/mdx@npm:2.0.8" - checksum: 6ee0e54d886afcbc2547f1db73ac9de60603ce26592e21f5fff2ba2791f6c58d3eb7b849add8f6b8b9c10f7c8ff3855d29fe7122f532f2f64fce95fe5b8e23ef + version: 2.0.10 + resolution: "@types/mdx@npm:2.0.10" + checksum: a2a5d71967c44c650e883eaaeb61db9c0758b9c1d675e04b7a3cfeeaee6efd5044dc9c78d780aa3fe408a2f85680bf3b723c92a1772bb6c2da35ef346d766de2 languageName: node linkType: hard "@types/mime@npm:*": - version: 3.0.2 - resolution: "@types/mime@npm:3.0.2" - checksum: 7eef33033d9990881626611ef87d0dbb06ebff96a7ee09303874389eb482acd0fbf20fe2dc96edb861095e42e6c18d5df8476840131f9c06c57be6f1c1dc77fe + version: 3.0.4 + resolution: "@types/mime@npm:3.0.4" + checksum: db478bc0f99e40f7b3e01d356a9bdf7817060808a294978111340317bcd80ca35382855578c5b60fbc84ae449674bd9bb38427b18417e1f8f19e4f72f8b242cd languageName: node linkType: hard "@types/mime@npm:^1": - version: 1.3.3 - resolution: "@types/mime@npm:1.3.3" - checksum: 56c9981b637154721753d38888c2cba85f8891a16e0f1cb1286dcbd741b220ff56d99aa2be03bf7fe88b188a27e32bf1d92976dafd6574b8f345bbf0853d462c + version: 1.3.5 + resolution: "@types/mime@npm:1.3.5" + checksum: c2ee31cd9b993804df33a694d5aa3fa536511a49f2e06eeab0b484fef59b4483777dbb9e42a4198a0809ffbf698081fdbca1e5c2218b82b91603dfab10a10fbc languageName: node linkType: hard -"@types/minimatch@npm:*": +"@types/minimatch@npm:*, @types/minimatch@npm:^5.1.2": version: 5.1.2 resolution: "@types/minimatch@npm:5.1.2" checksum: 83cf1c11748891b714e129de0585af4c55dd4c2cafb1f1d5233d79246e5e1e19d1b5ad9e8db449667b3ffa2b6c80125c429dbee1054e9efb45758dbc4e118562 @@ -8271,37 +8120,46 @@ __metadata: linkType: hard "@types/mock-fs@npm:^4.13.1": - version: 4.13.2 - resolution: "@types/mock-fs@npm:4.13.2" + version: 4.13.4 + resolution: "@types/mock-fs@npm:4.13.4" dependencies: "@types/node": "npm:*" - checksum: c589d8ba674e9d2279c6321841ee5b4e9ba3138a8790cbe2a61ea1da1e9d254188ef9f1a2f66539b225aaebcd56f746551f4723de24afc0c430d9e7c68344a7b + checksum: 687c8e36d91031529924fd89011b7a87167ea33a1b92a9d845f0feb1a5157f168412c62ee308e57b9a71fd938197b4c71ca1784eb44e8a7cbdd816011ffd7f65 languageName: node linkType: hard "@types/ms@npm:*": - version: 0.7.32 - resolution: "@types/ms@npm:0.7.32" - checksum: 16f60d0a2485edfa459e9570aec9135d9ef08dd855630754063f3baf1d1df7a5edd0f249ff9b460a33842181250f51b27b35078b83cf6ec1dccabb4485de19d6 + version: 0.7.34 + resolution: "@types/ms@npm:0.7.34" + checksum: ac80bd90012116ceb2d188fde62d96830ca847823e8ca71255616bc73991aa7d9f057b8bfab79e8ee44ffefb031ddd1bcce63ea82f9e66f7c31ec02d2d823ccc languageName: node linkType: hard "@types/node-fetch@npm:^2.5.7, @types/node-fetch@npm:^2.6.4": - version: 2.6.6 - resolution: "@types/node-fetch@npm:2.6.6" + version: 2.6.9 + resolution: "@types/node-fetch@npm:2.6.9" dependencies: "@types/node": "npm:*" form-data: "npm:^4.0.0" - checksum: fce52a0b65f4cb9e5059c9b3250682c8f0f0c2ce1d1a18b5bbc61b5fbf5f320b76d42b4dfa5c0567fe0704bdf0c0397527008efcb0749859aaaff8c51b6ed6c1 + checksum: b15b6d518ea4dd4a21cf328e9df0a88b2e5b76f3455ddfeb9063a3b97087c50b15ab195a869dadbbeb09d08dcc915557fb6a4f72b4fe79ee42e215fce3d9b0db + languageName: node + linkType: hard + +"@types/node-forge@npm:^1.3.0": + version: 1.3.10 + resolution: "@types/node-forge@npm:1.3.10" + dependencies: + "@types/node": "npm:*" + checksum: b190e93e36e3bf5881e099df930645bbeb963c1cabb110948f90e11f5f59a2514d5632e6bd1101dfb839725eab25a8e2eba4a2b1b7551f12bc43302863e050ae languageName: node linkType: hard "@types/node@npm:*, @types/node@npm:>= 8": - version: 18.18.13 - resolution: "@types/node@npm:18.18.13" + version: 20.10.1 + resolution: "@types/node@npm:20.10.1" dependencies: undici-types: "npm:~5.26.4" - checksum: 5f1840f26b4c00e6b4945be678644a46e6689ef10d9d7795d587b76059045b99a14ca6075264296e6e91d73e098fe83df9580881278d9a6ce394b368d9c76700 + checksum: c1b4b5a33f57bd39a8a0d074f27e3e370fccc6cda6a1c46caa48cc4c1687677cfdbffd9dc93fc803c6d355696dd9c73cd6f6507c749f61f83beb7326aec077d2 languageName: node linkType: hard @@ -8315,37 +8173,41 @@ __metadata: linkType: hard "@types/node@npm:^18.0.0": - version: 18.18.4 - resolution: "@types/node@npm:18.18.4" - checksum: 17891f8b8fd107813eaea0dce58d2008173f3c90df4f5998da3d01d6b225e9908922156ac83240b0230d3813f1a29b5f7e065a2aa993285af062e3a3779f88dd + version: 18.19.0 + resolution: "@types/node@npm:18.19.0" + dependencies: + undici-types: "npm:~5.26.4" + checksum: 3205c61d4152487cd8961ef73cfe57a2c90217439ae985cdf587117cf20694c7974d549a840478a8683ead4db6e6e95bdd194b59b8acff717fdac5cb3f198924 languageName: node linkType: hard "@types/normalize-package-data@npm:^2.4.0": - version: 2.4.2 - resolution: "@types/normalize-package-data@npm:2.4.2" - checksum: e38713ca1befc341701c078d592d1fddc1d13eec73b4d81fbab14638221733029f03cdf410b4486b23d48fd8d3809fa36611de98220e76f71517d42b582b3509 + version: 2.4.4 + resolution: "@types/normalize-package-data@npm:2.4.4" + checksum: aef7bb9b015883d6f4119c423dd28c4bdc17b0e8a0ccf112c78b4fe0e91fbc4af7c6204b04bba0e199a57d2f3fbbd5b4a14bf8739bf9d2a39b2a0aad545e0f86 languageName: node linkType: hard "@types/npmlog@npm:^4.1.2": - version: 4.1.4 - resolution: "@types/npmlog@npm:4.1.4" - checksum: 5670c38db51f2c4a5da05657920d7597bf9da00615920b42a001fde9011f05ab1e8ec8cbc671abb47915028e3e0ace5c3d981c23684c202a00bf518f16ece01d + version: 4.1.6 + resolution: "@types/npmlog@npm:4.1.6" + dependencies: + "@types/node": "npm:*" + checksum: 432bfb14b29a383e095e099b2ddff4266051b43bc6c7ea242d10194acde2f1181a1e967bbb543f07979dd77743ead1954abac1128ec78cc2b86a5f7ea841ddcb languageName: node linkType: hard "@types/parse-json@npm:^4.0.0": - version: 4.0.0 - resolution: "@types/parse-json@npm:4.0.0" - checksum: 1d3012ab2fcdad1ba313e1d065b737578f6506c8958e2a7a5bdbdef517c7e930796cb1599ee067d5dee942fb3a764df64b5eef7e9ae98548d776e86dcffba985 + version: 4.0.2 + resolution: "@types/parse-json@npm:4.0.2" + checksum: b1b863ac34a2c2172fbe0807a1ec4d5cb684e48d422d15ec95980b81475fac4fdb3768a8b13eef39130203a7c04340fc167bae057c7ebcafd7dec9fe6c36aeb1 languageName: node linkType: hard "@types/picomatch@npm:^2.3.0": - version: 2.3.1 - resolution: "@types/picomatch@npm:2.3.1" - checksum: 6ab42daf80d315495586bc7f276698395c47e28479cbc79c88ff14c81fd1fb38a76dee9c609dfe591036986b923198f1dab438865ce3583f1d380cac09870b3f + version: 2.3.3 + resolution: "@types/picomatch@npm:2.3.3" + checksum: 5ad7f891eb3e16e8eb1f51615f0b755bc44ac5dff5a1e2513229f307f72e226c917c6b9a829a97134cedbec727036f885890a55b1975b6e3f381b6545b962c4d languageName: node linkType: hard @@ -8364,72 +8226,72 @@ __metadata: linkType: hard "@types/pretty-hrtime@npm:^1.0.0": - version: 1.0.1 - resolution: "@types/pretty-hrtime@npm:1.0.1" - checksum: e990110a3626e987319092c5149d5ea244785b83fbbd8e62605714ec1fa4317a3524ae0b6381cdc2ca92619d9a451b3fe9ff4085c42826f5398e3380d3031bff + version: 1.0.3 + resolution: "@types/pretty-hrtime@npm:1.0.3" + checksum: e4c22475c588be982b398dee9ac0b05b21078bc26581819290a4901c5b269bcaa04cae0e61e012d412e811b0897c9dab316db064208914df2f0ed0960fc5306b languageName: node linkType: hard "@types/prismjs@npm:^1.16.6": - version: 1.26.1 - resolution: "@types/prismjs@npm:1.26.1" - checksum: 74b624bd0def16ba2fe4492ac74422ed9eaf5588814c14d8825c85dd4ef05b900a3685c5ec00bb13991e9f0cc4bbda196b9de3ba75cf7c00bc8ffd960c125124 + version: 1.26.3 + resolution: "@types/prismjs@npm:1.26.3" + checksum: 3e8a64bcf0ab5f9a47ec2590938c5a8a20ac849b4949a95ed96e73e64cb890fc56e9c9b724286914717458267b28405f965709e1b9f80db5d68817a7ce5a18a9 languageName: node linkType: hard "@types/prompts@npm:^2.0.9": - version: 2.4.5 - resolution: "@types/prompts@npm:2.4.5" + version: 2.4.9 + resolution: "@types/prompts@npm:2.4.9" dependencies: "@types/node": "npm:*" kleur: "npm:^3.0.3" - checksum: a2a3e802508db79e4c6bfcab09ddb37e93279152fd127a7f4a8c1e683ee6f5429ce86f70c58eb94b76b19d98e4b6ca53bbb0b375d47b0b8c4ad4ecf178227258 + checksum: 22fe0da6807681c85e88ba283184f4be4c8a95c744ea12a638865c98c4e0c22e7f733542f6b0f1fbca02245cdc3fe84feacf9c9adf4ddd8bc98a337fd679d8d2 languageName: node linkType: hard "@types/prop-types@npm:*": - version: 15.7.8 - resolution: "@types/prop-types@npm:15.7.8" - checksum: 706b3de6faa5c1a4763fc90069f25ddc54108e8b43e9724e22f510b103c418571bf14b34b241fcacd6875650959c8374af7f4633f80ec6e33e7525cb42ef6a30 + version: 15.7.11 + resolution: "@types/prop-types@npm:15.7.11" + checksum: e53423cf9d510515ef8b47ff42f4f1b65a7b7b37c8704e2dbfcb9a60defe0c0e1f3cb1acfdeb466bad44ca938d7c79bffdd51b48ffb659df2432169d0b27a132 languageName: node linkType: hard "@types/pug@npm:^2.0.6": - version: 2.0.7 - resolution: "@types/pug@npm:2.0.7" - checksum: 3d0cf7945f56a2763d0917d63f1ebe9c86eed9bc0b64781d0d5ec842bcdf1779e1065e132300942a1c34fefa87212d877d7fad24a576c4ce52db8fb17c4dcd0e + version: 2.0.10 + resolution: "@types/pug@npm:2.0.10" + checksum: 6fac37fd84ad4bcf755061caad274db70591699739070bc30c5c1b5f0aecf98646dc29ec8da11cfca82a2b7cc57d949a3ae50aba2f88bf098751ebdd25d9aaea languageName: node linkType: hard "@types/qs@npm:*, @types/qs@npm:^6, @types/qs@npm:^6.9.5": - version: 6.9.8 - resolution: "@types/qs@npm:6.9.8" - checksum: 336358c279818ecedc0b4f9b29fd5052ff6e05dba3f10bad4534a4624819408d0b4710a4cdf8b58dff948dbdb1ca95a00e237189505ef1abfce0e6341eb18022 + version: 6.9.10 + resolution: "@types/qs@npm:6.9.10" + checksum: 6be12e5f062d1b41eb037d59bf9cb65bc9410cedd5e6da832dfd7c8e2b3f4c91e81c9b90b51811140770e5052c6c4e8361181bd9437ddcd4515dc128b7c00353 languageName: node linkType: hard "@types/range-parser@npm:*": - version: 1.2.5 - resolution: "@types/range-parser@npm:1.2.5" - checksum: fe4bbbbfb19f0765ea15e66e2c58e29e04f4e52055c0d348b08dbfb161c2d2a363cc21b8a6071936a0cab3f02d0f5f362a3f752b37b05ff868000dcfe9120581 + version: 1.2.7 + resolution: "@types/range-parser@npm:1.2.7" + checksum: 361bb3e964ec5133fa40644a0b942279ed5df1949f21321d77de79f48b728d39253e5ce0408c9c17e4e0fd95ca7899da36841686393b9f7a1e209916e9381a3c languageName: node linkType: hard "@types/react-dom@npm:^18.0.0, @types/react-dom@npm:^18.0.11": - version: 18.2.15 - resolution: "@types/react-dom@npm:18.2.15" + version: 18.2.17 + resolution: "@types/react-dom@npm:18.2.17" dependencies: "@types/react": "npm:*" - checksum: 70e86f15f69f89b8f179139ab2e8a8aa9765e742789f5dd5a46fec40d4300ada8fe3349cceda42b9964a018982d7ccb7d791b47f781966c992bfd37da909fbd3 + checksum: 33b53078ed7e9e0cfc4dc691e938f7db1cc06353bc345947b41b581c3efe2b980c9e4eb6460dbf5ddc521dd91959194c970221a2bd4bfad9d23ebce338e12938 languageName: node linkType: hard "@types/react-modal@npm:^3.12.1": - version: 3.16.1 - resolution: "@types/react-modal@npm:3.16.1" + version: 3.16.3 + resolution: "@types/react-modal@npm:3.16.3" dependencies: "@types/react": "npm:*" - checksum: 4f586bd00e4b15633ec6607cb3266183b81419a2c0931d40e6127427e944a986d3d9a9c8a23c86cb586b15e541a1c6682f6ab0d2561a3b81fcf857772727ff44 + checksum: dfcf52fa4b5d5c203aa47ffaafade369836cb9f891e9b60e7056bf5fdfc508ebec7971bb3d4c4018f422953c1c79948755ef19da3e816c28d7c5fdacf9466af8 languageName: node linkType: hard @@ -8452,29 +8314,29 @@ __metadata: linkType: hard "@types/react@npm:*, @types/react@npm:>=16, @types/react@npm:^18.0.37": - version: 18.2.37 - resolution: "@types/react@npm:18.2.37" + version: 18.2.39 + resolution: "@types/react@npm:18.2.39" dependencies: "@types/prop-types": "npm:*" "@types/scheduler": "npm:*" csstype: "npm:^3.0.2" - checksum: 79dd5d23da05bec54e7423ca17096e345eb8fd80a3bf8dd916bb5cdd60677d27c298523aa5b245d090fcc4ec100cfd58c1af4631fbac709d0a9d8be75f9d78a9 + checksum: e91a5419d7615ab4fcaa7cb3ad2bd372093676e86c082748ab36ac394d3ed560070482d092a5488f74d6b1d913369e4dabf6eb287debed4d70cd3eb7dc135542 languageName: node linkType: hard "@types/resolve@npm:^1.20.2": - version: 1.20.3 - resolution: "@types/resolve@npm:1.20.3" - checksum: 0f499b6509186bd32faaf4ed640c166be0a6d487567cea1da9cdf3dc85e6b546451479ac80bd912daf4d8546c547d9feaf9e9867b438f7650cdd5a75169c5763 + version: 1.20.6 + resolution: "@types/resolve@npm:1.20.6" + checksum: a9b0549d816ff2c353077365d865a33655a141d066d0f5a3ba6fd4b28bc2f4188a510079f7c1f715b3e7af505a27374adce2a5140a3ece2a059aab3d6e1a4244 languageName: node linkType: hard "@types/responselike@npm:^1.0.0": - version: 1.0.1 - resolution: "@types/responselike@npm:1.0.1" + version: 1.0.3 + resolution: "@types/responselike@npm:1.0.3" dependencies: "@types/node": "npm:*" - checksum: f49d4765498d64e81fdff91267575caef0b364538994512605323b4ef74297f6ac5c61658713e1e1cc6d3951f6a5bcd436fcdec79c5f9d5e72c6b3f700b6f997 + checksum: a58ba341cb9e7d74f71810a88862da7b2a6fa42e2a1fc0ce40498f6ea1d44382f0640117057da779f74c47039f7166bf48fad02dc876f94e005c7afa50f5e129 languageName: node linkType: hard @@ -8496,69 +8358,69 @@ __metadata: linkType: hard "@types/scheduler@npm:*": - version: 0.16.4 - resolution: "@types/scheduler@npm:0.16.4" - checksum: 2355e63251c6c6467806c9e7085f5fad350a1e87f811cf416f1e48a888b7da4ecc4bae2b67b7b10d8f5e518305ef2b5d4a8451227158552942794b87be43c5dd + version: 0.16.8 + resolution: "@types/scheduler@npm:0.16.8" + checksum: f86de504945b8fc41b1f391f847444d542e2e4067cf7e5d9bfeb5d2d2393d3203b1161bc0ef3b1e104d828dabfb60baf06e8d2c27e27ff7e8258e6e618d8c4ec languageName: node linkType: hard "@types/semver@npm:^7.3.12, @types/semver@npm:^7.3.4": - version: 7.5.3 - resolution: "@types/semver@npm:7.5.3" - checksum: 1dedcf5f50a5a345e817fdf1273a14d0c57de80eb1d47bf3f17563062be53a2c99b78755a8c88c794a03757f9cd05da61b2849bf109e1b71e30fca895529c2b0 + version: 7.5.6 + resolution: "@types/semver@npm:7.5.6" + checksum: 196dc32db5f68cbcde2e6a42bb4aa5cbb100fa2b7bd9c8c82faaaf3e03fbe063e205dbb4f03c7cdf53da2edb70a0d34c9f2e601b54281b377eb8dc1743226acd languageName: node linkType: hard "@types/send@npm:*": - version: 0.17.2 - resolution: "@types/send@npm:0.17.2" + version: 0.17.4 + resolution: "@types/send@npm:0.17.4" dependencies: "@types/mime": "npm:^1" "@types/node": "npm:*" - checksum: 3fdd87a1b82fae523b2609f2acef25705b40899fed3c5f4dd40bf0dc91ad6a2c0a2b6c1494d1584525fe6e88bea271fcdb9775b3996ddc7f16d52261eea73432 + checksum: 7f17fa696cb83be0a104b04b424fdedc7eaba1c9a34b06027239aba513b398a0e2b7279778af521f516a397ced417c96960e5f50fcfce40c4bc4509fb1a5883c languageName: node linkType: hard "@types/serve-index@npm:^1.9.1": - version: 1.9.2 - resolution: "@types/serve-index@npm:1.9.2" + version: 1.9.4 + resolution: "@types/serve-index@npm:1.9.4" dependencies: "@types/express": "npm:*" - checksum: 9b82300c6930f8a768e742f89414ef84cd7bd8bc242f13a070fd754144890ba281e7ae99d018e40a256963c12be600f4bb5cfd6e3ad72c686bc9482260c168eb + checksum: 94c1b9e8f1ea36a229e098e1643d5665d9371f8c2658521718e259130a237c447059b903bac0dcc96ee2c15fd63f49aa647099b7d0d437a67a6946527a837438 languageName: node linkType: hard "@types/serve-static@npm:*, @types/serve-static@npm:^1.13.10, @types/serve-static@npm:^1.13.8": - version: 1.15.3 - resolution: "@types/serve-static@npm:1.15.3" + version: 1.15.5 + resolution: "@types/serve-static@npm:1.15.5" dependencies: "@types/http-errors": "npm:*" "@types/mime": "npm:*" "@types/node": "npm:*" - checksum: 0aaaf8fc1c0c8f96a4786928d5d79b0fff2f31e8c3b571c84cd2711129456045a9c02fa76054fb6c76f5770e2f6dbbc3b4be008e9af68bd6ce8739cb6d66c89b + checksum: 811d1a2f7e74a872195e7a013bcd87a2fb1edf07eaedcb9dcfd20c1eb4bc56ad4ea0d52141c13192c91ccda7c8aeb8a530d8a7e60b9c27f5990d7e62e0fecb03 languageName: node linkType: hard "@types/sockjs@npm:^0.3.33": - version: 0.3.34 - resolution: "@types/sockjs@npm:0.3.34" + version: 0.3.36 + resolution: "@types/sockjs@npm:0.3.36" dependencies: "@types/node": "npm:*" - checksum: e546c306dc7630e88a7be14faa26c6c6115847f4d334dcf7957166616c1f6d35549c93cb0985f0e0bdcc4c362fb66841b2c418c03c8df24b39be385c5496df11 + checksum: b20b7820ee813f22de4f2ce98bdd12c68c930e016a8912b1ed967595ac0d8a4cbbff44f4d486dd97f77f5927e7b5725bdac7472c9ec5b27f53a5a13179f0612f languageName: node linkType: hard "@types/source-list-map@npm:*": - version: 0.1.3 - resolution: "@types/source-list-map@npm:0.1.3" - checksum: b0734c05ebfca29c28c1418237a13561bd16e5a848c48f0b6295bd2405aa070a317e869d9e8ba6907132928d5ea5cd339076e5e205c75137de7d6aedde11e365 + version: 0.1.6 + resolution: "@types/source-list-map@npm:0.1.6" + checksum: 1e6d8d4a48535c51368c65bb2c44a1c9fd9afe2eeefefa32cbf06f9c191f7b20f638b3aa755100de0a750b0ba6a76140e912f1bee75705bc2b9a58b5a5185539 languageName: node linkType: hard "@types/stack-utils@npm:^2.0.0": - version: 2.0.1 - resolution: "@types/stack-utils@npm:2.0.1" - checksum: 3327ee919a840ffe907bbd5c1d07dfd79137dd9732d2d466cf717ceec5bb21f66296173c53bb56cff95fae4185b9cd6770df3e9745fe4ba528bbc4975f54d13f + version: 2.0.3 + resolution: "@types/stack-utils@npm:2.0.3" + checksum: 1f4658385ae936330581bcb8aa3a066df03867d90281cdf89cc356d404bd6579be0f11902304e1f775d92df22c6dd761d4451c804b0a4fba973e06211e9bd77c languageName: node linkType: hard @@ -8577,16 +8439,16 @@ __metadata: linkType: hard "@types/symlink-or-copy@npm:^1.2.0": - version: 1.2.0 - resolution: "@types/symlink-or-copy@npm:1.2.0" - checksum: cbc621ee4eb1c8b67beecba205ff47383584f6f69e5dbfd13ddb9fce3e64355bd01ba456dc9a5719e527da87c0f710f352931bfdf97efa0e23fff65d87e9315a + version: 1.2.2 + resolution: "@types/symlink-or-copy@npm:1.2.2" + checksum: 09ee39bd319f39c775c4e2049fc4018212b9b6043736bd2046537acbb59c98af7aa725c539f32672cd2ca27144073fa1f1101b4c0ed7db3fbddb305b638895b2 languageName: node linkType: hard "@types/tapable@npm:^1": - version: 1.0.9 - resolution: "@types/tapable@npm:1.0.9" - checksum: 51e7a55432c3abf71ae5e13907eb01a576efdf66ddfcd4f2a765436e684e182df527885980d4f710250cd61304a61f7fe9d447b33fef8db1fa434a395c85933d + version: 1.0.12 + resolution: "@types/tapable@npm:1.0.12" + checksum: d6a080f5839b323eb96dd5b65a6c3161c1297d8c2433eb52437912d1c3df54e38fce12ce7a57650f6453d96942298bd0935436e2501d09e407b7f41634483131 languageName: node linkType: hard @@ -8609,46 +8471,46 @@ __metadata: linkType: hard "@types/tmp@npm:^0.2.3": - version: 0.2.4 - resolution: "@types/tmp@npm:0.2.4" - checksum: 26e19913170193420eddbe5bf83e873ef82a1af002d0871659e0bcd2af41fcc29818bba2571784a452c73094e50a7db1f1a89a6399c103bb037a095cfe67e63d + version: 0.2.6 + resolution: "@types/tmp@npm:0.2.6" + checksum: a11bfa2cd8eaa6c5d62f62a3569192d7a2c28efdc5c17af0b0551db85816b2afc8156f3ca15ac76f0b142ae1403f04f44279871424233a1f3390b2e5fc828cd0 languageName: node linkType: hard "@types/tough-cookie@npm:*": - version: 4.0.3 - resolution: "@types/tough-cookie@npm:4.0.3" - checksum: 148ca3f9874b39279e85d742676cc132b74d121f7ed7d28ec28f6bc9ff9e1a41cfc2025195f33470ab55e58d316aa32aca8ab31380767f5178f13d0a046d2ebf + version: 4.0.5 + resolution: "@types/tough-cookie@npm:4.0.5" + checksum: 68c6921721a3dcb40451543db2174a145ef915bc8bcbe7ad4e59194a0238e776e782b896c7a59f4b93ac6acefca9161fccb31d1ce3b3445cb6faa467297fb473 languageName: node linkType: hard "@types/trusted-types@npm:^2.0.2": - version: 2.0.4 - resolution: "@types/trusted-types@npm:2.0.4" - checksum: ad7ca5059168880d8fa04ebf9d5f57d402bef4d7bb8a50df5103db8bf3821a334aaa2dab9937cf5d440beb707bed35b700fa387fcbce0611821d4cea7fa94dc1 + version: 2.0.7 + resolution: "@types/trusted-types@npm:2.0.7" + checksum: 4c4855f10de7c6c135e0d32ce462419d8abbbc33713b31d294596c0cc34ae1fa6112a2f9da729c8f7a20707782b0d69da3b1f8df6645b0366d08825ca1522e0c languageName: node linkType: hard "@types/uglify-js@npm:*": - version: 3.17.2 - resolution: "@types/uglify-js@npm:3.17.2" + version: 3.17.4 + resolution: "@types/uglify-js@npm:3.17.4" dependencies: source-map: "npm:^0.6.1" - checksum: 22ead0f6c4c5f184f5db06aa68c357ace72536ee8ccbd7abe655df2cc375ab92e1bec6c425d9be85fa309190427971c89989c0b58977e9c9167b7c26fb07b898 + checksum: e1625b203872aeb73d58df2dbe6baec8bcb7de651e44b6616e2b3b5bb2634ee535c9c8260c4e3258055adcec5fe057d8b655d6cc564916b7e4fc4ffe8bce520a languageName: node linkType: hard "@types/unist@npm:^2, @types/unist@npm:^2.0.0, @types/unist@npm:^2.0.2": - version: 2.0.8 - resolution: "@types/unist@npm:2.0.8" - checksum: 2c4685d5258b4f543677d20dce0d72b8235e70b6c859af24fcf445f92dac98ec8a1faa0cfb43307466561fcd9dbd2534a4860000944401ac3314a685b5efe3d7 + version: 2.0.10 + resolution: "@types/unist@npm:2.0.10" + checksum: 5f247dc2229944355209ad5c8e83cfe29419fa7f0a6d557421b1985a1500444719cc9efcc42c652b55aab63c931813c88033e0202c1ac684bcd4829d66e44731 languageName: node linkType: hard "@types/util-deprecate@npm:^1.0.0": - version: 1.0.0 - resolution: "@types/util-deprecate@npm:1.0.0" - checksum: 3f5e23aad8c9427db0ca2ef0c5b05377c11f62ad5710d2b0daf75b55339d7b646007090d5d21f007bdcb32cc62f52d918f977129639686e1856248217bb73663 + version: 1.0.3 + resolution: "@types/util-deprecate@npm:1.0.3" + checksum: 901ae94b51c1a5a7e3c88afddf9396ba25c0d0f699ca89ea0e48f121d5880c3996e037f0c83465e8a75263a27bf29347e1a584d51152c637194614a2c15f7742 languageName: node linkType: hard @@ -8660,53 +8522,53 @@ __metadata: linkType: hard "@types/uuid@npm:^9.0.1": - version: 9.0.4 - resolution: "@types/uuid@npm:9.0.4" - checksum: 3f713a67a56af20ecdfcbc31f29f7182a8aea51f1120d75daa76bb346973e014ae875c27cdd455bd0812a498330abad4ecbc1b65e1b4c507bb897fcda130f079 + version: 9.0.7 + resolution: "@types/uuid@npm:9.0.7" + checksum: b329ebd4f9d1d8e08d4f2cc211be4922d70d1149f73d5772630e4a3acfb5170c6d37b3d7a39a0412f1a56e86e8a844c7f297c798b082f90380608bf766688787 languageName: node linkType: hard "@types/webpack-env@npm:^1.16.0, @types/webpack-env@npm:^1.18.0": - version: 1.18.2 - resolution: "@types/webpack-env@npm:1.18.2" - checksum: 62a7d7e98fa462cde425c1bf9e70a84f61c522f0171a8eee493d3c26df8b0e7deff233e430c0be6bc654dded0c33f657f47d000f7e797522182817c8565d5a80 + version: 1.18.4 + resolution: "@types/webpack-env@npm:1.18.4" + checksum: 3fa77dbff0ed71685404576b0a1cf74587567fe2ee1cfd11d56d6eefcab7a61e4c9ead0eced264e289d2cf0fc74296dbd55ed6c95774fe0fd6264d156c5a59f0 languageName: node linkType: hard "@types/webpack-hot-middleware@npm:^2.25.6": - version: 2.25.7 - resolution: "@types/webpack-hot-middleware@npm:2.25.7" + version: 2.25.9 + resolution: "@types/webpack-hot-middleware@npm:2.25.9" dependencies: "@types/connect": "npm:*" tapable: "npm:^2.2.0" webpack: "npm:^5" - checksum: 5f33f415fe1eb5334aea422b42a85ae45cc1d6fc69078a7b1c58879a0bf757172c232c9c8253d90c554f1378492cbf7f4fa40b390b50892cc13b6f77e733b869 + checksum: 612d234149a2a04422650ba7ab886a699d052b18103d78384a2dc589f93b7fa6fda6046a516eede4d1c7aaeb04402cc6fd4ced17295fb6edb496d958e64c4dfd languageName: node linkType: hard "@types/webpack-sources@npm:*": - version: 3.2.1 - resolution: "@types/webpack-sources@npm:3.2.1" + version: 3.2.3 + resolution: "@types/webpack-sources@npm:3.2.3" dependencies: "@types/node": "npm:*" "@types/source-list-map": "npm:*" source-map: "npm:^0.7.3" - checksum: 651fcf880b2ed4f309fce9f47b85b7d1771a63436880792688b8c5e6e4177272dbe80c88cc4d877bc8370446499ab9b6a9ac6348b1fd2b29e56f7657f4562dd7 + checksum: 74e9dfdd38bc345ce99442f3be5b5ad1efc7af5890304175c141717a7c0b38c152e6f7fe1d2875fc19aaa68964019ff4661678eba7fdeee8c3ad42dc6dbf6b62 languageName: node linkType: hard "@types/webpack-virtual-modules@npm:^0.1.1": - version: 0.1.2 - resolution: "@types/webpack-virtual-modules@npm:0.1.2" + version: 0.1.3 + resolution: "@types/webpack-virtual-modules@npm:0.1.3" dependencies: "@types/webpack": "npm:^4" - checksum: ad3a17f798aa2bb449140f13e251952f5fe5bf8313ced93d3eae7fb82184d82985eb18a27bfae2bd2385051d8affc675d117079f8402d9645bc4376d2a73d991 + checksum: 3ead19e20df409433de7f5244d3c581ba050c691fe0aee0014fac4d9307366791e07c1db5c8beee0bd5010d4e06fd9b600dc9efc27e0aaf7d8daa9ec0714abf6 languageName: node linkType: hard "@types/webpack@npm:^4": - version: 4.41.34 - resolution: "@types/webpack@npm:4.41.34" + version: 4.41.38 + resolution: "@types/webpack@npm:4.41.38" dependencies: "@types/node": "npm:*" "@types/tapable": "npm:^1" @@ -8714,50 +8576,50 @@ __metadata: "@types/webpack-sources": "npm:*" anymatch: "npm:^3.0.0" source-map: "npm:^0.6.0" - checksum: 630ebd822e7ee85b7118d1c095370709ce493831365f7fd750bea88ac4726ef52df33cc25261922526e45b354c9fdb3edfabc7738d5b9ec18416fd502cda3838 + checksum: 5a0a7465d45a0e7701a8c863e88c6cba7660b37e4aeab851c71baf505dbab2e178be1cac82488c2e7d0ea11fb703ceddb53476daec3ec9a004e2fc1554233483 languageName: node linkType: hard "@types/ws@npm:^8, @types/ws@npm:^8.5.5": - version: 8.5.6 - resolution: "@types/ws@npm:8.5.6" + version: 8.5.10 + resolution: "@types/ws@npm:8.5.10" dependencies: "@types/node": "npm:*" - checksum: 9050eb44c23caba404f106c9ab5210aae0c5cc85b5a7ed0116d0ee1c5b4e499325cffe406b6bc71ee2d4f456e9498037d95a984a06a841a64ef58a6dd79731f4 + checksum: e9af279b984c4a04ab53295a40aa95c3e9685f04888df5c6920860d1dd073fcc57c7bd33578a04b285b2c655a0b52258d34bee0a20569dca8defb8393e1e5d29 languageName: node linkType: hard "@types/yargs-parser@npm:*": - version: 21.0.1 - resolution: "@types/yargs-parser@npm:21.0.1" - checksum: f1d723a4c4383a9c53b975820b7490186ca127237ca58eb2ee8f5eacdcdb195a81aeabd1d75560abdf22fc29f70e8bb103d7ab34c5ec49bc19196195a7bf3189 + version: 21.0.3 + resolution: "@types/yargs-parser@npm:21.0.3" + checksum: e71c3bd9d0b73ca82e10bee2064c384ab70f61034bbfb78e74f5206283fc16a6d85267b606b5c22cb2a3338373586786fed595b2009825d6a9115afba36560a0 languageName: node linkType: hard "@types/yargs@npm:^15.0.0": - version: 15.0.16 - resolution: "@types/yargs@npm:15.0.16" + version: 15.0.19 + resolution: "@types/yargs@npm:15.0.19" dependencies: "@types/yargs-parser": "npm:*" - checksum: 07f0960062e66226ae602fccd62e351143291d778e1f4dd645c51111e62fbedafe2a976c223dcfa7ae052e989407b62e97a7472fc1d73536110cd05502c204a5 + checksum: 9fe9b8645304a628006cbba2d1990fb015e2727274d0e3853f321a379a1242d1da2c15d2f56cff0d4313ae94f0383ccf834c3bded9fb3589608aefb3432fcf00 languageName: node linkType: hard "@types/yargs@npm:^16.0.0": - version: 16.0.6 - resolution: "@types/yargs@npm:16.0.6" + version: 16.0.9 + resolution: "@types/yargs@npm:16.0.9" dependencies: "@types/yargs-parser": "npm:*" - checksum: a2cc5796cea1aac492c856ff35e829a6a230e6d72540a9446273ab16392f6ef04b8fef05ddcff71c8106c047820b5534b22e031245ee55995b1ba0c8caa382b2 + checksum: be24bd9a56c97ddb2964c1c18f5b9fe8271a50e100dc6945989901aae58f7ce6fb8f3a591c749a518401b6301358dbd1997e83c36138a297094feae7f9ac8211 languageName: node linkType: hard "@types/yargs@npm:^17.0.8": - version: 17.0.26 - resolution: "@types/yargs@npm:17.0.26" + version: 17.0.32 + resolution: "@types/yargs@npm:17.0.32" dependencies: "@types/yargs-parser": "npm:*" - checksum: 34ab6eff6dff086b1044c65d53131e1d14e87c0c6dc44cb6851d74d8a4d1ac4503f7d12d1e1ecff25f8aea62ff7a9d6b04b05870a0324d15bbb226ddfc1d6065 + checksum: 2095e8aad8a4e66b86147415364266b8d607a3b95b4239623423efd7e29df93ba81bb862784a6e08664f645cc1981b25fd598f532019174cd3e5e1e689e1cccf languageName: node linkType: hard @@ -8893,23 +8755,20 @@ __metadata: languageName: node linkType: hard -"@urql/core@npm:>=4.1.0": - version: 4.2.0 - resolution: "@urql/core@npm:4.2.0" - dependencies: - "@0no-co/graphql.web": "npm:^1.0.1" - wonka: "npm:^6.3.2" - checksum: dbbd500705c2bbf842674016aa69865a90c3d40c1e16034faf6423c9211c37540e975abbf448eae072b7dd38920ed517e8b34ba351f881da1764c22177ca12ed +"@ungap/structured-clone@npm:^1.2.0": + version: 1.2.0 + resolution: "@ungap/structured-clone@npm:1.2.0" + checksum: 8209c937cb39119f44eb63cf90c0b73e7c754209a6411c707be08e50e29ee81356dca1a848a405c8bdeebfe2f5e4f831ad310ae1689eeef65e7445c090c6657d languageName: node linkType: hard -"@urql/core@npm:^4.1.0": - version: 4.1.3 - resolution: "@urql/core@npm:4.1.3" +"@urql/core@npm:>=4.1.0, @urql/core@npm:^4.2.0": + version: 4.2.0 + resolution: "@urql/core@npm:4.2.0" dependencies: "@0no-co/graphql.web": "npm:^1.0.1" wonka: "npm:^6.3.2" - checksum: 9aa5c8b9df04c79e71f4be6ce0d97cc2301d1ab7aea3ffafa9f53d89564f063dc77a011239c2a51581b50bbedc1e9dab0a3551acc7ee5dda9dd1bece2d5a1644 + checksum: dbbd500705c2bbf842674016aa69865a90c3d40c1e16034faf6423c9211c37540e975abbf448eae072b7dd38920ed517e8b34ba351f881da1764c22177ca12ed languageName: node linkType: hard @@ -8948,12 +8807,12 @@ __metadata: linkType: hard "@vitejs/plugin-vue@npm:^4.0.0": - version: 4.4.0 - resolution: "@vitejs/plugin-vue@npm:4.4.0" + version: 4.5.1 + resolution: "@vitejs/plugin-vue@npm:4.5.1" peerDependencies: - vite: ^4.0.0 + vite: ^4.0.0 || ^5.0.0 vue: ^3.2.25 - checksum: a430fbc504e2d14848b94866d52c8d5044ec216b1bf9304f53e3d3f3045da634db9c986e8ed2b0605fcc94e19fe67dc9c7e10971bd5aab444ca4167a71cd197d + checksum: e14bcae83faa6f0a6b55a39635841aeb4f45b753404914bf6f5744c24b407d8b60cf2c5adfa47bc6d6c8b92566e203793bc106214fdd2af26a661d7c80a3c428 languageName: node linkType: hard @@ -9019,30 +8878,31 @@ __metadata: languageName: node linkType: hard -"@volar/language-core@npm:1.10.1, @volar/language-core@npm:~1.10.0": - version: 1.10.1 - resolution: "@volar/language-core@npm:1.10.1" +"@volar/language-core@npm:1.11.1, @volar/language-core@npm:~1.11.1": + version: 1.11.1 + resolution: "@volar/language-core@npm:1.11.1" dependencies: - "@volar/source-map": "npm:1.10.1" - checksum: cc4e6b07801cc48b68d9bfb4899703afc0b1d0d0a765d952df98ae63d3109555dd2d882aab8970d599521300d50aa109c82f869a590ddd8f94106b3daf0503f8 + "@volar/source-map": "npm:1.11.1" + checksum: 92c4439e3a9ccc534c970031388c318740f6fa032283d03e136c6c8c0228f549c68a7c363af1a28252617a0dca6069e14028329ac906d5acf1912931d0cdcb69 languageName: node linkType: hard -"@volar/source-map@npm:1.10.1, @volar/source-map@npm:~1.10.0": - version: 1.10.1 - resolution: "@volar/source-map@npm:1.10.1" +"@volar/source-map@npm:1.11.1, @volar/source-map@npm:~1.11.1": + version: 1.11.1 + resolution: "@volar/source-map@npm:1.11.1" dependencies: muggle-string: "npm:^0.3.1" - checksum: 9bfc96528d802959d19d07148238cf1b7f7ba7bf05a8cf78339dd1edfb0e755d88005057673c7a807aea74b234a63067fa433a81841b9b9bc1d6e741674f6e40 + checksum: 0bfc639889802705f8036ea8b2052a95a4d691a68bc2b6744ba8b9d312d887393dd3278101180a5ee5304972899d493972a483afafd41e097968746c77d724cb languageName: node linkType: hard -"@volar/typescript@npm:~1.10.0": - version: 1.10.1 - resolution: "@volar/typescript@npm:1.10.1" +"@volar/typescript@npm:~1.11.1": + version: 1.11.1 + resolution: "@volar/typescript@npm:1.11.1" dependencies: - "@volar/language-core": "npm:1.10.1" - checksum: daad1018ac7f9d5b45416ca8f1cabec1448c020669bcc3ad9873c277ed467b1e8a2c5849f272888cfaca5e93683f1fd67cc5532fcd1e7a5f0c3a74ad2d595ffe + "@volar/language-core": "npm:1.11.1" + path-browserify: "npm:^1.0.1" + checksum: 86fe153db3a14d8eb3632784a1d7fcbfbfb51fa5517c3878bfdd49ee8d15a83b1a09f9c589454b7396454c104d3a8e2db3a987dc99b37c33816772fc3e292bf2 languageName: node linkType: hard @@ -9059,31 +8919,7 @@ __metadata: languageName: node linkType: hard -"@vue/compiler-core@npm:3.3.4": - version: 3.3.4 - resolution: "@vue/compiler-core@npm:3.3.4" - dependencies: - "@babel/parser": "npm:^7.21.3" - "@vue/shared": "npm:3.3.4" - estree-walker: "npm:^2.0.2" - source-map-js: "npm:^1.0.2" - checksum: 941dded05d656c26f6d142fda6a8b2557b2b9918e4755f88a660fee941ae04b800c69900cfe12c2c2ee045c7d9248b0fdc36398ca938395a2107b366f7f062e0 - languageName: node - linkType: hard - -"@vue/compiler-core@npm:3.3.7": - version: 3.3.7 - resolution: "@vue/compiler-core@npm:3.3.7" - dependencies: - "@babel/parser": "npm:^7.23.0" - "@vue/shared": "npm:3.3.7" - estree-walker: "npm:^2.0.2" - source-map-js: "npm:^1.0.2" - checksum: 1450cf0ab26068b9d1f6eb2bca3a17a46d48de8c07a6bb53377b7d04c3032d199a239ec835a82d287623b56270c84bd7ca05370eb0dc3ee87c73a6f2d886e23a - languageName: node - linkType: hard - -"@vue/compiler-core@npm:3.3.9": +"@vue/compiler-core@npm:3.3.9, @vue/compiler-core@npm:^3.3.4": version: 3.3.9 resolution: "@vue/compiler-core@npm:3.3.9" dependencies: @@ -9095,18 +8931,6 @@ __metadata: languageName: node linkType: hard -"@vue/compiler-core@npm:^3.3.4": - version: 3.3.8 - resolution: "@vue/compiler-core@npm:3.3.8" - dependencies: - "@babel/parser": "npm:^7.23.0" - "@vue/shared": "npm:3.3.8" - estree-walker: "npm:^2.0.2" - source-map-js: "npm:^1.0.2" - checksum: de7dcdaae73f2f3680efdb1bda7a48a98f9ccbb907e4c78562252a5a084fd1d78aaa2477e59605c665439614f16fed7524addf04b00007a5bcb66fa4bfc3f4c4 - languageName: node - linkType: hard - "@vue/compiler-dom@npm:3.0.0": version: 3.0.0 resolution: "@vue/compiler-dom@npm:3.0.0" @@ -9117,27 +8941,7 @@ __metadata: languageName: node linkType: hard -"@vue/compiler-dom@npm:3.3.4": - version: 3.3.4 - resolution: "@vue/compiler-dom@npm:3.3.4" - dependencies: - "@vue/compiler-core": "npm:3.3.4" - "@vue/shared": "npm:3.3.4" - checksum: 4f9f0fca076dbc799e4d3d6cca5e1fdba8da9b09b496c754c3d096d5e7ee7003f99f22e51fe541ade14bc2cf1ff821f6e76d9fc15ac5bb3e0d333810acd6976e - languageName: node - linkType: hard - -"@vue/compiler-dom@npm:3.3.7": - version: 3.3.7 - resolution: "@vue/compiler-dom@npm:3.3.7" - dependencies: - "@vue/compiler-core": "npm:3.3.7" - "@vue/shared": "npm:3.3.7" - checksum: 34c030df5fd0d403686c8b17369cf8b19119717d0c19c1d37e380b85023d3d9e69a97215633e983e1ffb89158ce57af53e107103afa344db9b51222c04b3672a - languageName: node - linkType: hard - -"@vue/compiler-dom@npm:^3.2.0, @vue/compiler-dom@npm:^3.3.0": +"@vue/compiler-dom@npm:3.3.9, @vue/compiler-dom@npm:^3.2.0, @vue/compiler-dom@npm:^3.3.0": version: 3.3.9 resolution: "@vue/compiler-dom@npm:3.3.9" dependencies: @@ -9147,14 +8951,14 @@ __metadata: languageName: node linkType: hard -"@vue/compiler-sfc@npm:2.7.14": - version: 2.7.14 - resolution: "@vue/compiler-sfc@npm:2.7.14" +"@vue/compiler-sfc@npm:2.7.15": + version: 2.7.15 + resolution: "@vue/compiler-sfc@npm:2.7.15" dependencies: "@babel/parser": "npm:^7.18.4" postcss: "npm:^8.4.14" source-map: "npm:^0.6.1" - checksum: 29fe06d8da1f8721488468653be671aaa48d63fcd03c47261164cb770b4ecbde1e1455e6affbc9ef062f2729da6988000ba470fc43a2f8a454a61d51af68725d + checksum: d5dc7667bea091702657cd9263371d407d708ab0a571da01ebff5870b7800ac709678285c7dc86ae23a0757ff8a5de13dceffc063687be6a7700f58519bd5f57 languageName: node linkType: hard @@ -9184,39 +8988,21 @@ __metadata: languageName: node linkType: hard -"@vue/compiler-sfc@npm:3.3.4": - version: 3.3.4 - resolution: "@vue/compiler-sfc@npm:3.3.4" - dependencies: - "@babel/parser": "npm:^7.20.15" - "@vue/compiler-core": "npm:3.3.4" - "@vue/compiler-dom": "npm:3.3.4" - "@vue/compiler-ssr": "npm:3.3.4" - "@vue/reactivity-transform": "npm:3.3.4" - "@vue/shared": "npm:3.3.4" - estree-walker: "npm:^2.0.2" - magic-string: "npm:^0.30.0" - postcss: "npm:^8.1.10" - source-map-js: "npm:^1.0.2" - checksum: 21e76ff9f12156d91f97b34001708ccfe1017b44f7217b6b25f0acd5762a5bc013782f69f7b7a50eb0c15b8bc395ddf76f23ca51ff20ceac273fcd600576f697 - languageName: node - linkType: hard - -"@vue/compiler-sfc@npm:^3.2.0, @vue/compiler-sfc@npm:^3.2.33": - version: 3.3.7 - resolution: "@vue/compiler-sfc@npm:3.3.7" +"@vue/compiler-sfc@npm:3.3.9, @vue/compiler-sfc@npm:^3.2.0, @vue/compiler-sfc@npm:^3.2.33": + version: 3.3.9 + resolution: "@vue/compiler-sfc@npm:3.3.9" dependencies: - "@babel/parser": "npm:^7.23.0" - "@vue/compiler-core": "npm:3.3.7" - "@vue/compiler-dom": "npm:3.3.7" - "@vue/compiler-ssr": "npm:3.3.7" - "@vue/reactivity-transform": "npm:3.3.7" - "@vue/shared": "npm:3.3.7" + "@babel/parser": "npm:^7.23.3" + "@vue/compiler-core": "npm:3.3.9" + "@vue/compiler-dom": "npm:3.3.9" + "@vue/compiler-ssr": "npm:3.3.9" + "@vue/reactivity-transform": "npm:3.3.9" + "@vue/shared": "npm:3.3.9" estree-walker: "npm:^2.0.2" magic-string: "npm:^0.30.5" postcss: "npm:^8.4.31" source-map-js: "npm:^1.0.2" - checksum: 986a2db10223e7c37f7b32a074866c8083f16ac7fe821c6d0f58c24d9f5f919b39c6aa4e99c58991addcfa383f1b39e7fd0ddaaeab1c7e9e26516b903c52ccb4 + checksum: a4f346c285268c1b30e5f837f78d0fef995e9bf553c2806d5be62aa66cc12ec6d44db5066433f14c9183f22f0310eeb9f5e872e865eb84638accd0ff7e3c8c76 languageName: node linkType: hard @@ -9230,23 +9016,13 @@ __metadata: languageName: node linkType: hard -"@vue/compiler-ssr@npm:3.3.4": - version: 3.3.4 - resolution: "@vue/compiler-ssr@npm:3.3.4" - dependencies: - "@vue/compiler-dom": "npm:3.3.4" - "@vue/shared": "npm:3.3.4" - checksum: b4c103b21618cefca6ff7a870f6a52576a021fc9a34ce2f826492e5a3a729b74e28d6cfe87b6db72d5f741d2b7e2dce7772d264115d9a3e5222954ccc24a8492 - languageName: node - linkType: hard - -"@vue/compiler-ssr@npm:3.3.7": - version: 3.3.7 - resolution: "@vue/compiler-ssr@npm:3.3.7" +"@vue/compiler-ssr@npm:3.3.9": + version: 3.3.9 + resolution: "@vue/compiler-ssr@npm:3.3.9" dependencies: - "@vue/compiler-dom": "npm:3.3.7" - "@vue/shared": "npm:3.3.7" - checksum: f40f8337f4e7c826fcd7e1fd7eac39949d63385552b0426ebd84dfe60d4608d4b57fa506b6ddea6c1208ac3a5091f273bff9006fbfeae3ef9104c4a492a531b1 + "@vue/compiler-dom": "npm:3.3.9" + "@vue/shared": "npm:3.3.9" + checksum: 119b67a3c2a739842f9a4b4b0385986549262586ce4d9eb8bb5d308ace80f7f3a854ef302982bfd3951dc359779b25758a6e53ddaf9e2b1c95b50cd3a7e9ae58 languageName: node linkType: hard @@ -9270,50 +9046,38 @@ __metadata: languageName: node linkType: hard -"@vue/language-core@npm:1.8.15": - version: 1.8.15 - resolution: "@vue/language-core@npm:1.8.15" +"@vue/language-core@npm:1.8.24": + version: 1.8.24 + resolution: "@vue/language-core@npm:1.8.24" dependencies: - "@volar/language-core": "npm:~1.10.0" - "@volar/source-map": "npm:~1.10.0" + "@volar/language-core": "npm:~1.11.1" + "@volar/source-map": "npm:~1.11.1" "@vue/compiler-dom": "npm:^3.3.0" - "@vue/reactivity": "npm:^3.3.0" "@vue/shared": "npm:^3.3.0" - minimatch: "npm:^9.0.0" + computeds: "npm:^0.0.1" + minimatch: "npm:^9.0.3" muggle-string: "npm:^0.3.1" + path-browserify: "npm:^1.0.1" vue-template-compiler: "npm:^2.7.14" peerDependencies: typescript: "*" peerDependenciesMeta: typescript: optional: true - checksum: 05ec3d660bd26cf05d17e722d1117324e1309360f0be4998c82ccac22689e31a332660086ece6b3f4f43660dfb94d1905eea0aa329b88b2f5afea944b01153e0 - languageName: node - linkType: hard - -"@vue/reactivity-transform@npm:3.3.4": - version: 3.3.4 - resolution: "@vue/reactivity-transform@npm:3.3.4" - dependencies: - "@babel/parser": "npm:^7.20.15" - "@vue/compiler-core": "npm:3.3.4" - "@vue/shared": "npm:3.3.4" - estree-walker: "npm:^2.0.2" - magic-string: "npm:^0.30.0" - checksum: a8e25f66e272b21b38523c361171bd5fa4f0d4787c5be09b47cc7ef3911c511544cea58dd3cebea83783700431bc870e239cc66dff8bb379f52b3709a3afb046 + checksum: 4bc0c5a1e3d818df1d70c5957deab6c4a9dd85ccd7716596db435d6b42e58e1bca849369c6ab52ebcaf50fe2af1ca750f69f4242e25cc9a60001d035c9701b95 languageName: node linkType: hard -"@vue/reactivity-transform@npm:3.3.7": - version: 3.3.7 - resolution: "@vue/reactivity-transform@npm:3.3.7" +"@vue/reactivity-transform@npm:3.3.9": + version: 3.3.9 + resolution: "@vue/reactivity-transform@npm:3.3.9" dependencies: - "@babel/parser": "npm:^7.23.0" - "@vue/compiler-core": "npm:3.3.7" - "@vue/shared": "npm:3.3.7" + "@babel/parser": "npm:^7.23.3" + "@vue/compiler-core": "npm:3.3.9" + "@vue/shared": "npm:3.3.9" estree-walker: "npm:^2.0.2" magic-string: "npm:^0.30.5" - checksum: 180ed59b421c25b30aa376a222ae5da315facf1a501681aa846984b935d4dc46bb7d3f8f380a939124dc357267e704346b3280e207e198765202175c68052143 + checksum: 43053f09229f1994179491a15bdd13515601074e640781e5419007ee32c68060f0fb13e7c60ee533af91dd7da0b38442bf736fa74bf5597b1181174c11c2642d languageName: node linkType: hard @@ -9326,12 +9090,12 @@ __metadata: languageName: node linkType: hard -"@vue/reactivity@npm:3.3.4, @vue/reactivity@npm:^3.3.0": - version: 3.3.4 - resolution: "@vue/reactivity@npm:3.3.4" +"@vue/reactivity@npm:3.3.9": + version: 3.3.9 + resolution: "@vue/reactivity@npm:3.3.9" dependencies: - "@vue/shared": "npm:3.3.4" - checksum: d6d0f7ab03f2d1bf688fe5ba96bbf9b3473151b30f293c22a77589f5ce6f438cb32cd8c89ab9c36fb0f8c83fd312a9df5c69cb1fb6dbba9bfead11aad1d99529 + "@vue/shared": "npm:3.3.9" + checksum: acd95e033f872260e8a8a8561eb44a91ce11c66582b3b31af0d5746372d906c3546173632c6029b53375f196f756eeb9d050f1cc0d77497210d9805df52f4c0d languageName: node linkType: hard @@ -9345,13 +9109,13 @@ __metadata: languageName: node linkType: hard -"@vue/runtime-core@npm:3.3.4": - version: 3.3.4 - resolution: "@vue/runtime-core@npm:3.3.4" +"@vue/runtime-core@npm:3.3.9": + version: 3.3.9 + resolution: "@vue/runtime-core@npm:3.3.9" dependencies: - "@vue/reactivity": "npm:3.3.4" - "@vue/shared": "npm:3.3.4" - checksum: 1ef9d5adc7e1bdf08809bc64d6215b8bbb10ddcefa726203ff235046e991d2df5d731f843717f2195a86db8a665f7d3686b3d76c3bb63500beb38de20397ca41 + "@vue/reactivity": "npm:3.3.9" + "@vue/shared": "npm:3.3.9" + checksum: a2fdcaa7ee4c1a1ee18ac75b23596f3b3941b6682949e1164b074a54a9b9722e50fff29de2b771f659b52410e2394b922b940a1b75123ea79fd5e0d967d88a1b languageName: node linkType: hard @@ -9366,26 +9130,26 @@ __metadata: languageName: node linkType: hard -"@vue/runtime-dom@npm:3.3.4": - version: 3.3.4 - resolution: "@vue/runtime-dom@npm:3.3.4" +"@vue/runtime-dom@npm:3.3.9": + version: 3.3.9 + resolution: "@vue/runtime-dom@npm:3.3.9" dependencies: - "@vue/runtime-core": "npm:3.3.4" - "@vue/shared": "npm:3.3.4" - csstype: "npm:^3.1.1" - checksum: 02bbaa587cec0c0b0158c08914043373d7dfc153f0eccd977ecbe924858d625adb0aabb2dce34646ebe810a5417309d926f266631a61d66ba5c7687de21ec02a + "@vue/runtime-core": "npm:3.3.9" + "@vue/shared": "npm:3.3.9" + csstype: "npm:^3.1.2" + checksum: 708b0dad90335d42cd5f89a072f2b13934e33bce00d82f642935c0081e8905f6d9ee3eec7a65077070a5336a050bfce46aa8eaf1803a3527d1cebb71add548d4 languageName: node linkType: hard -"@vue/server-renderer@npm:3.3.4": - version: 3.3.4 - resolution: "@vue/server-renderer@npm:3.3.4" +"@vue/server-renderer@npm:3.3.9": + version: 3.3.9 + resolution: "@vue/server-renderer@npm:3.3.9" dependencies: - "@vue/compiler-ssr": "npm:3.3.4" - "@vue/shared": "npm:3.3.4" + "@vue/compiler-ssr": "npm:3.3.9" + "@vue/shared": "npm:3.3.9" peerDependencies: - vue: 3.3.4 - checksum: 0c6b6689efa113908390644df2766492d64a71d63884d8dcf49d9b1cec2d9a33348ea2d4398892619d0ddad3419d2c8f1d61f9bdd7dde3776cc803a4c9438b59 + vue: 3.3.9 + checksum: 867faafbabe66bea09ba2be95aa8e67b19fe41fd03a05074f8f67f6ed3c6908a7a3eee0137bfcf1e829d640a4ec67c33b85361b9c0930748c01f9fa4e8f25e34 languageName: node linkType: hard @@ -9396,27 +9160,6 @@ __metadata: languageName: node linkType: hard -"@vue/shared@npm:3.3.4": - version: 3.3.4 - resolution: "@vue/shared@npm:3.3.4" - checksum: 01a337004476988a576e1681eed219031db6d8671b60cbf46f75ea55e9fa1e01f5cdf550f380fe4045e037c0ac837faed6961420cd03f6f69036518fff110bb9 - languageName: node - linkType: hard - -"@vue/shared@npm:3.3.7": - version: 3.3.7 - resolution: "@vue/shared@npm:3.3.7" - checksum: 7199c5a26d528fd6f04ce9aa97eb7cd5cb98d4b9e9bc77661837960a01f36cd4c0f88725b9b7739fb6e4c864ab9849b96db662da51b1c56f0b70a6905c5db755 - languageName: node - linkType: hard - -"@vue/shared@npm:3.3.8": - version: 3.3.8 - resolution: "@vue/shared@npm:3.3.8" - checksum: 4e35a331309f883616cd21087d180ea10c95ed742cf67c33bedf9b0f060b791976071b076b31e075eb34571861cbe5d191fb8e265ee85573d2908d00f022171e - languageName: node - linkType: hard - "@vue/shared@npm:3.3.9, @vue/shared@npm:^3.3.0": version: 3.3.9 resolution: "@vue/shared@npm:3.3.9" @@ -9424,16 +9167,6 @@ __metadata: languageName: node linkType: hard -"@vue/typescript@npm:1.8.15": - version: 1.8.15 - resolution: "@vue/typescript@npm:1.8.15" - dependencies: - "@volar/typescript": "npm:~1.10.0" - "@vue/language-core": "npm:1.8.15" - checksum: c68808d29da93e616cd30bd4dc84aad0bb3d245d45537adc74244cc0fe93cb797e4bbdbdf2a4841b6bce088e6ef1bc70fa279fd2e1aabb794c42d908d8e46087 - languageName: node - linkType: hard - "@vue/vue3-jest@npm:29": version: 29.2.6 resolution: "@vue/vue3-jest@npm:29.2.6" @@ -9750,11 +9483,11 @@ __metadata: linkType: hard "acorn-typescript@npm:^1.4.11": - version: 1.4.11 - resolution: "acorn-typescript@npm:1.4.11" + version: 1.4.12 + resolution: "acorn-typescript@npm:1.4.12" peerDependencies: acorn: ">=8.9.0" - checksum: 233663421f1d885e6797c0c9ef7bcbb330851053622b59726ca3a1c61f00d7c506676a181662130a8729e0bca7bbf8ad438c1d63e1cf798ec42794c6de212795 + checksum: a3b33ed0dc321e3364da507a3decec96423736384068c88fea5ea57aeae864ea115a6c4a20b3ace71b75f4901b0657bec82d83aab30a8ad0dfc4bfc0d8337546 languageName: node linkType: hard @@ -9766,9 +9499,9 @@ __metadata: linkType: hard "acorn-walk@npm:^8.0.2, acorn-walk@npm:^8.1.1": - version: 8.2.0 - resolution: "acorn-walk@npm:8.2.0" - checksum: dbe92f5b2452c93e960c5594e666dd1fae141b965ff2cb4a1e1d0381e3e4db4274c5ce4ffa3d681a86ca2a8d4e29d5efc0670a08e23fd2800051ea387df56ca2 + version: 8.3.0 + resolution: "acorn-walk@npm:8.3.0" + checksum: 24346e595f507b6e704a60d35f3c5e1aa9891d4fb6a3fc3d856503ab718cc26cabb5e3e1ff0ff8da6ec03d60a8226ebdb602805a94f970e7f797ea3b8b09437f languageName: node linkType: hard @@ -9781,12 +9514,12 @@ __metadata: languageName: node linkType: hard -"acorn@npm:^8.0.0, acorn@npm:^8.1.0, acorn@npm:^8.10.0, acorn@npm:^8.4.1, acorn@npm:^8.6.0, acorn@npm:^8.7.1, acorn@npm:^8.8.1, acorn@npm:^8.8.2, acorn@npm:^8.9.0": - version: 8.10.0 - resolution: "acorn@npm:8.10.0" +"acorn@npm:^8.0.0, acorn@npm:^8.1.0, acorn@npm:^8.10.0, acorn@npm:^8.11.2, acorn@npm:^8.4.1, acorn@npm:^8.6.0, acorn@npm:^8.7.1, acorn@npm:^8.8.1, acorn@npm:^8.8.2, acorn@npm:^8.9.0": + version: 8.11.2 + resolution: "acorn@npm:8.11.2" bin: acorn: bin/acorn - checksum: deaeebfbea6e40f6c0e1070e9b0e16e76ba484de54cbd735914d1d41d19169a450de8630b7a3a0c4e271a3b0c0b075a3427ad1a40d8a69f8747c0e8cb02ee3e2 + checksum: a3ed76c761b75ec54b1ec3068fb7f113a182e95aea7f322f65098c2958d232e3d211cb6dac35ff9c647024b63714bc528a26d54a925d1fef2c25585b4c8e4017 languageName: node linkType: hard @@ -10121,7 +9854,7 @@ __metadata: languageName: node linkType: hard -"aria-query@npm:^5.1.3, aria-query@npm:^5.3.0": +"aria-query@npm:^5.3.0": version: 5.3.0 resolution: "aria-query@npm:5.3.0" dependencies: @@ -10162,9 +9895,9 @@ __metadata: linkType: hard "array-equal@npm:^1.0.0": - version: 1.0.0 - resolution: "array-equal@npm:1.0.0" - checksum: 5841f0b823e6806d147d40e262a0f66cb7d3272b9f9ffa8dedb868fc7799cb410ae262a32f6f358baa6c3ee7d6271eeab86b516cdfd8f9a8fa12b4f15a18e119 + version: 1.0.2 + resolution: "array-equal@npm:1.0.2" + checksum: c308184b1df488bed0eba1a8835d77789349d3859a334cb60f77df15dc4ab232c185c78b643ae68651eef1b7148942223d72fa1aba218d24ec6cf9637fb49d8e languageName: node linkType: hard @@ -10182,7 +9915,7 @@ __metadata: languageName: node linkType: hard -"array-includes@npm:^3.1.6": +"array-includes@npm:^3.1.6, array-includes@npm:^3.1.7": version: 3.1.7 resolution: "array-includes@npm:3.1.7" dependencies: @@ -10225,7 +9958,7 @@ __metadata: languageName: node linkType: hard -"array.prototype.findlastindex@npm:^1.2.2": +"array.prototype.findlastindex@npm:^1.2.3": version: 1.2.3 resolution: "array.prototype.findlastindex@npm:1.2.3" dependencies: @@ -10238,7 +9971,7 @@ __metadata: languageName: node linkType: hard -"array.prototype.flat@npm:^1.3.1": +"array.prototype.flat@npm:^1.3.1, array.prototype.flat@npm:^1.3.2": version: 1.3.2 resolution: "array.prototype.flat@npm:1.3.2" dependencies: @@ -10250,7 +9983,7 @@ __metadata: languageName: node linkType: hard -"array.prototype.flatmap@npm:^1.3.1": +"array.prototype.flatmap@npm:^1.3.1, array.prototype.flatmap@npm:^1.3.2": version: 1.3.2 resolution: "array.prototype.flatmap@npm:1.3.2" dependencies: @@ -10350,10 +10083,10 @@ __metadata: languageName: node linkType: hard -"ast-types-flow@npm:^0.0.7": - version: 0.0.7 - resolution: "ast-types-flow@npm:0.0.7" - checksum: f381529f2da535949ba6cceddbdfaa33b4d5105842e147ec63582f560ea9ecc1a08f66457664f3109841d3053641fa8b9fa94ba607f1ea9f6c804fe5dee44a1d +"ast-types-flow@npm:^0.0.8": + version: 0.0.8 + resolution: "ast-types-flow@npm:0.0.8" + checksum: f2a0ba8055353b743c41431974521e5e852a9824870cd6fce2db0e538ac7bf4da406bbd018d109af29ff3f8f0993f6a730c9eddbd0abd031fbcb29ca75c1014e languageName: node linkType: hard @@ -10433,9 +10166,9 @@ __metadata: linkType: hard "async@npm:^3.2.3": - version: 3.2.4 - resolution: "async@npm:3.2.4" - checksum: b5d02fed64717edf49e35b2b156debd9cf524934ea670108fa5528e7615ed66a5e0bf6c65f832c9483b63aa7f0bffe3e588ebe8d58a539b833798d324516e1c9 + version: 3.2.5 + resolution: "async@npm:3.2.5" + checksum: 1408287b26c6db67d45cb346e34892cee555b8b59e6c68e6f8c3e495cad5ca13b4f218180e871f3c2ca30df4ab52693b66f2f6ff43644760cab0b2198bda79c1 languageName: node linkType: hard @@ -10489,7 +10222,14 @@ __metadata: languageName: node linkType: hard -"axe-core@npm:^4.2.0, axe-core@npm:^4.6.2": +"axe-core@npm:=4.7.0": + version: 4.7.0 + resolution: "axe-core@npm:4.7.0" + checksum: 89ac5712b5932ac7d23398b4cb5ba081c394a086e343acc68ba49c83472706e18e0799804e8388c779dcdacc465377deb29f2714241d3fbb389cf3a6b275c9ba + languageName: node + linkType: hard + +"axe-core@npm:^4.2.0": version: 4.8.2 resolution: "axe-core@npm:4.8.2" checksum: ad9e1125ba226bbc73d442996d8b9b35fed9af8bcfa995831e29c3d6b8ddb0d16bc7d18c66c5a685211296ee99fe966ae4d59051ca6fbef2a7ee7408322b9dbe @@ -10505,17 +10245,7 @@ __metadata: languageName: node linkType: hard -"axios@npm:^0.27.2": - version: 0.27.2 - resolution: "axios@npm:0.27.2" - dependencies: - follow-redirects: "npm:^1.14.9" - form-data: "npm:^4.0.0" - checksum: 76d673d2a90629944b44d6f345f01e58e9174690f635115d5ffd4aca495d99bcd8f95c590d5ccb473513f5ebc1d1a6e8934580d0c57cdd0498c3a101313ef771 - languageName: node - linkType: hard - -"axios@npm:^1.5.1": +"axios@npm:^1.5.1, axios@npm:^1.6.1": version: 1.6.2 resolution: "axios@npm:1.6.2" dependencies: @@ -10526,7 +10256,7 @@ __metadata: languageName: node linkType: hard -"axobject-query@npm:^3.1.1, axobject-query@npm:^3.2.1": +"axobject-query@npm:^3.2.1": version: 3.2.1 resolution: "axobject-query@npm:3.2.1" dependencies: @@ -10910,9 +10640,9 @@ __metadata: linkType: hard "big-integer@npm:^1.6.44": - version: 1.6.51 - resolution: "big-integer@npm:1.6.51" - checksum: c8139662d57f8833a44802f4b65be911679c569535ea73c5cfd3c1c8994eaead1b84b6f63e1db63833e4d4cacb6b6a9e5522178113dfdc8e4c81ed8436f1e8cc + version: 1.6.52 + resolution: "big-integer@npm:1.6.52" + checksum: 9604224b4c2ab3c43c075d92da15863077a9f59e5d4205f4e7e76acd0cd47e8d469ec5e5dba8d9b32aa233951893b29329ca56ac80c20ce094b4a647a66abae0 languageName: node linkType: hard @@ -11659,22 +11389,22 @@ __metadata: linkType: hard "cacache@npm:^18.0.0": - version: 18.0.0 - resolution: "cacache@npm:18.0.0" + version: 18.0.1 + resolution: "cacache@npm:18.0.1" dependencies: "@npmcli/fs": "npm:^3.1.0" fs-minipass: "npm:^3.0.0" glob: "npm:^10.2.2" lru-cache: "npm:^10.0.1" minipass: "npm:^7.0.3" - minipass-collect: "npm:^1.0.2" + minipass-collect: "npm:^2.0.1" minipass-flush: "npm:^1.0.5" minipass-pipeline: "npm:^1.2.4" p-map: "npm:^4.0.0" ssri: "npm:^10.0.0" tar: "npm:^6.1.11" unique-filename: "npm:^3.0.0" - checksum: e359823778d712ad365740cef3f488d4f74c62cc79be5935896d9597a7d81033e50c54c15898fa9cc018620879307ab30d1dddc476ae705bfd5b29c145ae6938 + checksum: a31666805a80a8b16ad3f85faf66750275a9175a3480896f4f6d31b5d53ef190484fabd71bdb6d2ea5603c717fbef09f4af03d6a65b525c8ef0afaa44c361866 languageName: node linkType: hard @@ -11726,7 +11456,7 @@ __metadata: languageName: node linkType: hard -"call-bind@npm:^1.0.0, call-bind@npm:^1.0.2": +"call-bind@npm:^1.0.0, call-bind@npm:^1.0.2, call-bind@npm:^1.0.4, call-bind@npm:^1.0.5": version: 1.0.5 resolution: "call-bind@npm:1.0.5" dependencies: @@ -12061,11 +11791,11 @@ __metadata: linkType: hard "clean-css@npm:^5.2.2": - version: 5.3.2 - resolution: "clean-css@npm:5.3.2" + version: 5.3.3 + resolution: "clean-css@npm:5.3.3" dependencies: source-map: "npm:~0.6.0" - checksum: 315e0e81306524bd2c1905fa6823bf7658be40799b78f446e5e6922808718d2b80266fb3e96842a06176fa683bc2c1a0d2827b08d154e2f9cf136d7bda909d33 + checksum: 381de7523e23f3762eb180e327dcc0cedafaf8cb1cd8c26b7cc1fc56e0829a92e734729c4f955394d65ed72fb62f82d8baf78af34b33b8a7d41ebad2accdd6fb languageName: node linkType: hard @@ -12116,9 +11846,9 @@ __metadata: linkType: hard "cli-spinners@npm:^2.5.0": - version: 2.9.1 - resolution: "cli-spinners@npm:2.9.1" - checksum: c9b1152bd387e5b76823bdee6f19079c4017994d352627216e5d3dab9220a8402514519ad96a0a12120b80752fead98d1e7a7a5f56ce32125f92778ef47bdd8c + version: 2.9.2 + resolution: "cli-spinners@npm:2.9.2" + checksum: 907a1c227ddf0d7a101e7ab8b300affc742ead4b4ebe920a5bf1bc6d45dce2958fcd195eb28fa25275062fe6fa9b109b93b63bc8033396ed3bcb50297008b3a3 languageName: node linkType: hard @@ -12363,7 +12093,7 @@ __metadata: languageName: node linkType: hard -"colorette@npm:^2.0.10, colorette@npm:^2.0.19, colorette@npm:^2.0.20": +"colorette@npm:^2.0.10, colorette@npm:^2.0.20": version: 2.0.20 resolution: "colorette@npm:2.0.20" checksum: e94116ff33b0ff56f3b83b9ace895e5bf87c2a7a47b3401b8c3f3226e050d5ef76cf4072fb3325f9dc24d1698f9b730baf4e05eeaf861d74a1883073f4c98a40 @@ -12450,9 +12180,9 @@ __metadata: linkType: hard "component-emitter@npm:^1.2.1": - version: 1.3.0 - resolution: "component-emitter@npm:1.3.0" - checksum: 68774a0a3754fb6c0ba53c2e88886dfbd0c773931066abb1d7fd1b0c893b2a838d8f088ab4dca1f18cc1a4fc2e6932019eba3ded2d931b5ba2241ce40e93a24f + version: 1.3.1 + resolution: "component-emitter@npm:1.3.1" + checksum: e4900b1b790b5e76b8d71b328da41482118c0f3523a516a41be598dc2785a07fd721098d9bf6e22d89b19f4fa4e1025160dc00317ea111633a3e4f75c2b86032 languageName: node linkType: hard @@ -12487,6 +12217,13 @@ __metadata: languageName: node linkType: hard +"computeds@npm:^0.0.1": + version: 0.0.1 + resolution: "computeds@npm:0.0.1" + checksum: 8a8736f1f43e4a99286519785d71a10ece8f444a2fa1fc2fe1f03dedf63f3477b45094002c85a2826f7631759c9f5a00b4ace47456997f253073fc525e8983de + languageName: node + linkType: hard + "concat-map@npm:0.0.1": version: 0.0.1 resolution: "concat-map@npm:0.0.1" @@ -12699,7 +12436,7 @@ __metadata: languageName: node linkType: hard -"core-js-compat@npm:^3.31.0": +"core-js-compat@npm:^3.31.0, core-js-compat@npm:^3.33.1": version: 3.33.3 resolution: "core-js-compat@npm:3.33.3" dependencies: @@ -12708,19 +12445,10 @@ __metadata: languageName: node linkType: hard -"core-js-compat@npm:^3.33.1": - version: 3.33.1 - resolution: "core-js-compat@npm:3.33.1" - dependencies: - browserslist: "npm:^4.22.1" - checksum: 9c7361b370eac30756e6ec52469988d62c6110759efa1c85edd15e6b30f05ace8319a9cc0671bf596a98e7e81c67ad693ceaab2691b85cb62c636da1afe8feb9 - languageName: node - linkType: hard - "core-js-pure@npm:^3.23.3, core-js-pure@npm:^3.30.2": - version: 3.33.0 - resolution: "core-js-pure@npm:3.33.0" - checksum: dbb683bf6c5d3671129e5029e0f8047a388818bb9720352c839f46ac5627b5fed763135b9a1df89452f2afee78e49639def6063e82fc6995c4e98c31f2892db5 + version: 3.33.3 + resolution: "core-js-pure@npm:3.33.3" + checksum: 97cf39cc013f6a4f77700762de36b495228b3c087fc04b61e86bfbfb475595529966cabbcf37e738e3a468c486e815c85118d120cc6fc4960da08a14caf69826 languageName: node linkType: hard @@ -12732,9 +12460,9 @@ __metadata: linkType: hard "core-js@npm:^3.8.2": - version: 3.33.0 - resolution: "core-js@npm:3.33.0" - checksum: f51192f311c2d75b94ebe4eb7210f91df2cb6de101b96da1a65f43cf52b9c5cfe1ce5ebebb86281e452d2ee949730afb72fb7ac826c655c9de3a92f793cf3b80 + version: 3.33.3 + resolution: "core-js@npm:3.33.3" + checksum: 08abdc9470c8228b9d09f61e62ab312738681202c4c34e9638889125b304b235f34c4fe22e9d41c20906ac0fcc807dca57c5ff7d6b90021bf64e8fe23461d9ab languageName: node linkType: hard @@ -13055,7 +12783,7 @@ __metadata: languageName: node linkType: hard -"csstype@npm:^3.0.2, csstype@npm:^3.1.0, csstype@npm:^3.1.1": +"csstype@npm:^3.0.2, csstype@npm:^3.1.0, csstype@npm:^3.1.2": version: 3.1.2 resolution: "csstype@npm:3.1.2" checksum: 32c038af259897c807ac738d9eab16b3d86747c72b09d5c740978e06f067f9b7b1737e1b75e407c7ab1fe1543dc95f20e202b4786aeb1b8d3bdf5d5ce655e6c6 @@ -13168,7 +12896,7 @@ __metadata: languageName: node linkType: hard -"debug@npm:4, debug@npm:4.3.4, debug@npm:^4.0.0, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.3, debug@npm:^4.3.4, debug@npm:~4.3.1, debug@npm:~4.3.2": +"debug@npm:4, debug@npm:4.3.4, debug@npm:^4.0.0, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.2, debug@npm:^4.3.3, debug@npm:^4.3.4, debug@npm:~4.3.1, debug@npm:~4.3.2": version: 4.3.4 resolution: "debug@npm:4.3.4" dependencies: @@ -13269,27 +12997,27 @@ __metadata: linkType: hard "deep-equal@npm:^1.1.1": - version: 1.1.1 - resolution: "deep-equal@npm:1.1.1" + version: 1.1.2 + resolution: "deep-equal@npm:1.1.2" dependencies: - is-arguments: "npm:^1.0.4" - is-date-object: "npm:^1.0.1" - is-regex: "npm:^1.0.4" - object-is: "npm:^1.0.1" + is-arguments: "npm:^1.1.1" + is-date-object: "npm:^1.0.5" + is-regex: "npm:^1.1.4" + object-is: "npm:^1.1.5" object-keys: "npm:^1.1.1" - regexp.prototype.flags: "npm:^1.2.0" - checksum: 473d5dd1d707afd5ad3068864765590591b049d0e0d9a01931599dbbd820e35f09d0a42faa6e4644deb7cf6b7dc90f7bfdf5559f42279d67f714209b62036212 + regexp.prototype.flags: "npm:^1.5.1" + checksum: cd85d822d18e9b3e1532d0f6ba412d229aa9d22881d70da161674428ae96e47925191296f7cda29306bac252889007da40ed8449363bd1c96c708acb82068a00 languageName: node linkType: hard "deep-equal@npm:^2.0.5": - version: 2.2.2 - resolution: "deep-equal@npm:2.2.2" + version: 2.2.3 + resolution: "deep-equal@npm:2.2.3" dependencies: array-buffer-byte-length: "npm:^1.0.0" - call-bind: "npm:^1.0.2" + call-bind: "npm:^1.0.5" es-get-iterator: "npm:^1.1.3" - get-intrinsic: "npm:^1.2.1" + get-intrinsic: "npm:^1.2.2" is-arguments: "npm:^1.1.1" is-array-buffer: "npm:^3.0.2" is-date-object: "npm:^1.0.5" @@ -13299,12 +13027,12 @@ __metadata: object-is: "npm:^1.1.5" object-keys: "npm:^1.1.1" object.assign: "npm:^4.1.4" - regexp.prototype.flags: "npm:^1.5.0" + regexp.prototype.flags: "npm:^1.5.1" side-channel: "npm:^1.0.4" which-boxed-primitive: "npm:^1.0.2" which-collection: "npm:^1.0.1" - which-typed-array: "npm:^1.1.9" - checksum: 07b46a9a848efdab223abc7e3ba612ef9168d88970c3400df185d5840a30ca384749c996ae5d7af844d6b27c42587fb73a4445c63e38aac77c2d0ed9a63faa87 + which-typed-array: "npm:^1.1.13" + checksum: a48244f90fa989f63ff5ef0cc6de1e4916b48ea0220a9c89a378561960814794a5800c600254482a2c8fd2e49d6c2e196131dc983976adb024c94a42dfe4949f languageName: node linkType: hard @@ -13396,7 +13124,7 @@ __metadata: languageName: node linkType: hard -"define-properties@npm:^1.1.3, define-properties@npm:^1.1.4, define-properties@npm:^1.2.0, define-properties@npm:^1.2.1": +"define-properties@npm:^1.1.3, define-properties@npm:^1.2.0, define-properties@npm:^1.2.1": version: 1.2.1 resolution: "define-properties@npm:1.2.1" dependencies: @@ -13436,9 +13164,9 @@ __metadata: linkType: hard "defu@npm:^6.1.2": - version: 6.1.2 - resolution: "defu@npm:6.1.2" - checksum: ceb467f8f30d4000ae5300105904736113826a3d4124640b70e145b243d6c78c868de03634038d870e0855ff4cdfd17324a8caf7386229501a5bb776adb682f4 + version: 6.1.3 + resolution: "defu@npm:6.1.3" + checksum: 60d0d9a6e328148d5313fe0239ba3777701291f35570b52562454653d953fec5281b084514540f8d3b60d61bad9e39b52e95b3c0451631ded220ad8fdc893455 languageName: node linkType: hard @@ -13756,9 +13484,9 @@ __metadata: linkType: hard "domain-browser@npm:^4.22.0": - version: 4.22.0 - resolution: "domain-browser@npm:4.22.0" - checksum: 2ef7eda6d2161038fda0c9aa4c9e18cc7a0baa89ea6be975d449527c2eefd4b608425db88508e2859acc472f46f402079274b24bd75e3fb506f28c5dba203129 + version: 4.23.0 + resolution: "domain-browser@npm:4.23.0" + checksum: dfcc6ba070a2c968a4d922e7d99ef440d1076812af0d983404aadf64729f746bb4a0ad2c5e73ccd5d9cf41bc79037f2a1e4a915bdf33d07e0d77f487b635b5b2 languageName: node linkType: hard @@ -13994,9 +13722,9 @@ __metadata: linkType: hard "electron-to-chromium@npm:^1.4.535": - version: 1.4.540 - resolution: "electron-to-chromium@npm:1.4.540" - checksum: 8bacd2a06a6a78875b4f4035c97fb8155447f93d854292005f9958a5d1366597fabecc1561c642eae55815583fa3436b164c8bf8f7ca3cfe15741466b3c5e0cf + version: 1.4.600 + resolution: "electron-to-chromium@npm:1.4.600" + checksum: 7f4a52ed08317ccf1ecb3eb78d29dd6cf13c54b3613bd511638d2469a05cff995f332688fb26b4c63b61fd2b1e6e12765fec46cb10fd4d969d27b6f739a2d1d0 languageName: node linkType: hard @@ -14356,11 +14084,11 @@ __metadata: linkType: hard "envinfo@npm:^7.7.3": - version: 7.10.0 - resolution: "envinfo@npm:7.10.0" + version: 7.11.0 + resolution: "envinfo@npm:7.11.0" bin: envinfo: dist/cli.js - checksum: ebc7792fbedca72bc829913abe0c2a3384b883903012f97b56085afd4e83d26f7dd0652403fedd99cd3e1c93d4fb0706f5d2c3dc06ac6a1eda348280a06a9dcf + checksum: 4415b9c1ca32cdf92ce126136b9965eeac2efd6ab7e5278c06e8f86d048edad87ef4084710313a6d938ef9bc084ab17e1caee16339d731d230f3e2650f3aaf4d languageName: node linkType: hard @@ -14401,24 +14129,24 @@ __metadata: linkType: hard "es-abstract@npm:^1.22.1": - version: 1.22.2 - resolution: "es-abstract@npm:1.22.2" + version: 1.22.3 + resolution: "es-abstract@npm:1.22.3" dependencies: array-buffer-byte-length: "npm:^1.0.0" arraybuffer.prototype.slice: "npm:^1.0.2" available-typed-arrays: "npm:^1.0.5" - call-bind: "npm:^1.0.2" + call-bind: "npm:^1.0.5" es-set-tostringtag: "npm:^2.0.1" es-to-primitive: "npm:^1.2.1" function.prototype.name: "npm:^1.1.6" - get-intrinsic: "npm:^1.2.1" + get-intrinsic: "npm:^1.2.2" get-symbol-description: "npm:^1.0.0" globalthis: "npm:^1.0.3" gopd: "npm:^1.0.1" - has: "npm:^1.0.3" has-property-descriptors: "npm:^1.0.0" has-proto: "npm:^1.0.1" has-symbols: "npm:^1.0.3" + hasown: "npm:^2.0.0" internal-slot: "npm:^1.0.5" is-array-buffer: "npm:^3.0.2" is-callable: "npm:^1.2.7" @@ -14428,7 +14156,7 @@ __metadata: is-string: "npm:^1.0.7" is-typed-array: "npm:^1.1.12" is-weakref: "npm:^1.0.2" - object-inspect: "npm:^1.12.3" + object-inspect: "npm:^1.13.1" object-keys: "npm:^1.1.1" object.assign: "npm:^4.1.4" regexp.prototype.flags: "npm:^1.5.1" @@ -14442,8 +14170,8 @@ __metadata: typed-array-byte-offset: "npm:^1.0.0" typed-array-length: "npm:^1.0.4" unbox-primitive: "npm:^1.0.2" - which-typed-array: "npm:^1.1.11" - checksum: a491c640a01b7c18f3cc626a3d08b5c67f8d3dac70ff8b4268cda6fa0ebed80bb028ff3ee731137512e054d39e98d02575144da904fe28045019fc59e503f1f8 + which-typed-array: "npm:^1.1.13" + checksum: da31ec43b1c8eb47ba8a17693cac143682a1078b6c3cd883ce0e2062f135f532e93d873694ef439670e1f6ca03195118f43567ba6f33fb0d6c7daae750090236 languageName: node linkType: hard @@ -14464,7 +14192,7 @@ __metadata: languageName: node linkType: hard -"es-iterator-helpers@npm:^1.0.12": +"es-iterator-helpers@npm:^1.0.12, es-iterator-helpers@npm:^1.0.15": version: 1.0.15 resolution: "es-iterator-helpers@npm:1.0.15" dependencies: @@ -14501,22 +14229,22 @@ __metadata: linkType: hard "es-set-tostringtag@npm:^2.0.1": - version: 2.0.1 - resolution: "es-set-tostringtag@npm:2.0.1" + version: 2.0.2 + resolution: "es-set-tostringtag@npm:2.0.2" dependencies: - get-intrinsic: "npm:^1.1.3" - has: "npm:^1.0.3" + get-intrinsic: "npm:^1.2.2" has-tostringtag: "npm:^1.0.0" - checksum: 9af096365e3861bb29755cc5f76f15f66a7eab0e83befca396129090c1d9737e54090278b8e5357e97b5f0a5b0459fca07c40c6740884c2659cbf90ef8e508cc + hasown: "npm:^2.0.0" + checksum: 176d6bd1be31dd0145dcceee62bb78d4a5db7f81db437615a18308a6f62bcffe45c15081278413455e8cf0aad4ea99079de66f8de389605942dfdacbad74c2d5 languageName: node linkType: hard "es-shim-unscopables@npm:^1.0.0": - version: 1.0.0 - resolution: "es-shim-unscopables@npm:1.0.0" + version: 1.0.2 + resolution: "es-shim-unscopables@npm:1.0.2" dependencies: - has: "npm:^1.0.3" - checksum: d54a66239fbd19535b3e50333913260394f14d2d7adb136a95396a13ca584bab400cf9cb2ffd9232f3fe2f0362540bd3a708240c493e46e13fe0b90cfcfedc3d + hasown: "npm:^2.0.0" + checksum: f495af7b4b7601a4c0cfb893581c352636e5c08654d129590386a33a0432cf13a7bdc7b6493801cadd990d838e2839b9013d1de3b880440cb537825e834fe783 languageName: node linkType: hard @@ -14580,11 +14308,11 @@ __metadata: linkType: hard "esbuild-wasm@npm:>=0.13.8": - version: 0.19.4 - resolution: "esbuild-wasm@npm:0.19.4" + version: 0.19.8 + resolution: "esbuild-wasm@npm:0.19.8" bin: esbuild: bin/esbuild - checksum: c2d995a280dbff4d50193dd666d3603afc33f2123c3ce8fc89dbe5915dcf0252e5f4a75429e8e5e5ba8a6df2ff397f08ba314c59868511785164f2380a3ecd18 + checksum: 453831a62c64f090f444cfb205952592478974dad7f7596084c7c13d41993500c84002c9bdd42db4b460430f762186ff00f5ca2d39d48cf81391258c438cc585 languageName: node linkType: hard @@ -14778,7 +14506,7 @@ __metadata: languageName: node linkType: hard -"eslint-import-resolver-node@npm:^0.3.7": +"eslint-import-resolver-node@npm:^0.3.9": version: 0.3.9 resolution: "eslint-import-resolver-node@npm:0.3.9" dependencies: @@ -14841,29 +14569,29 @@ __metadata: linkType: hard "eslint-plugin-import@npm:^2.23.4, eslint-plugin-import@npm:^2.26.0": - version: 2.28.1 - resolution: "eslint-plugin-import@npm:2.28.1" + version: 2.29.0 + resolution: "eslint-plugin-import@npm:2.29.0" dependencies: - array-includes: "npm:^3.1.6" - array.prototype.findlastindex: "npm:^1.2.2" - array.prototype.flat: "npm:^1.3.1" - array.prototype.flatmap: "npm:^1.3.1" + array-includes: "npm:^3.1.7" + array.prototype.findlastindex: "npm:^1.2.3" + array.prototype.flat: "npm:^1.3.2" + array.prototype.flatmap: "npm:^1.3.2" debug: "npm:^3.2.7" doctrine: "npm:^2.1.0" - eslint-import-resolver-node: "npm:^0.3.7" + eslint-import-resolver-node: "npm:^0.3.9" eslint-module-utils: "npm:^2.8.0" - has: "npm:^1.0.3" - is-core-module: "npm:^2.13.0" + hasown: "npm:^2.0.0" + is-core-module: "npm:^2.13.1" is-glob: "npm:^4.0.3" minimatch: "npm:^3.1.2" - object.fromentries: "npm:^2.0.6" - object.groupby: "npm:^1.0.0" - object.values: "npm:^1.1.6" + object.fromentries: "npm:^2.0.7" + object.groupby: "npm:^1.0.1" + object.values: "npm:^1.1.7" semver: "npm:^6.3.1" tsconfig-paths: "npm:^3.14.2" peerDependencies: eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 - checksum: 5a29554d56f26d2bfb4d4f20b99aad6664c64812ef9655d5b3f089bbf70f340a34dabbe0b8ffa38bd9f1eabf828200acc5a56634842ddb83dd1e4ba01ad6d38d + checksum: 761a4e1fbc2cd318e62350bed4c448f8b11ed83091d6bb7776f096556363a09debd9922b39fd2714c895edc9aaea82e08e684eb632283f880c58a91e4bae6733 languageName: node linkType: hard @@ -14908,28 +14636,28 @@ __metadata: linkType: hard "eslint-plugin-jsx-a11y@npm:^6.4.1": - version: 6.7.1 - resolution: "eslint-plugin-jsx-a11y@npm:6.7.1" + version: 6.8.0 + resolution: "eslint-plugin-jsx-a11y@npm:6.8.0" dependencies: - "@babel/runtime": "npm:^7.20.7" - aria-query: "npm:^5.1.3" - array-includes: "npm:^3.1.6" - array.prototype.flatmap: "npm:^1.3.1" - ast-types-flow: "npm:^0.0.7" - axe-core: "npm:^4.6.2" - axobject-query: "npm:^3.1.1" + "@babel/runtime": "npm:^7.23.2" + aria-query: "npm:^5.3.0" + array-includes: "npm:^3.1.7" + array.prototype.flatmap: "npm:^1.3.2" + ast-types-flow: "npm:^0.0.8" + axe-core: "npm:=4.7.0" + axobject-query: "npm:^3.2.1" damerau-levenshtein: "npm:^1.0.8" emoji-regex: "npm:^9.2.2" - has: "npm:^1.0.3" - jsx-ast-utils: "npm:^3.3.3" - language-tags: "npm:=1.0.5" + es-iterator-helpers: "npm:^1.0.15" + hasown: "npm:^2.0.0" + jsx-ast-utils: "npm:^3.3.5" + language-tags: "npm:^1.0.9" minimatch: "npm:^3.1.2" - object.entries: "npm:^1.1.6" - object.fromentries: "npm:^2.0.6" - semver: "npm:^6.3.0" + object.entries: "npm:^1.1.7" + object.fromentries: "npm:^2.0.7" peerDependencies: eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 - checksum: 41ad3d0c8036b36cd475685c1ad639157f403b16e8ac23c07f1dbe0226ccf8458f2805cbd5cc8e56856a5d8a356f3276e3139274d819476ccad80c41b9245502 + checksum: 199b883e526e6f9d7c54cb3f094abc54f11a1ec816db5fb6cae3b938eb0e503acc10ccba91ca7451633a9d0b9abc0ea03601844a8aba5fe88c5e8897c9ac8f49 languageName: node linkType: hard @@ -15045,16 +14773,17 @@ __metadata: linkType: hard "eslint@npm:^8.28.0": - version: 8.50.0 - resolution: "eslint@npm:8.50.0" + version: 8.54.0 + resolution: "eslint@npm:8.54.0" dependencies: "@eslint-community/eslint-utils": "npm:^4.2.0" "@eslint-community/regexpp": "npm:^4.6.1" - "@eslint/eslintrc": "npm:^2.1.2" - "@eslint/js": "npm:8.50.0" - "@humanwhocodes/config-array": "npm:^0.11.11" + "@eslint/eslintrc": "npm:^2.1.3" + "@eslint/js": "npm:8.54.0" + "@humanwhocodes/config-array": "npm:^0.11.13" "@humanwhocodes/module-importer": "npm:^1.0.1" "@nodelib/fs.walk": "npm:^1.2.8" + "@ungap/structured-clone": "npm:^1.2.0" ajv: "npm:^6.12.4" chalk: "npm:^4.0.0" cross-spawn: "npm:^7.0.2" @@ -15087,7 +14816,7 @@ __metadata: text-table: "npm:^0.2.0" bin: eslint: bin/eslint.js - checksum: 91629528cb240bc61b25480574d35cd54ed444cb61a70fa76f7d5ab26af2b637b94bf8fba94403c9052c1baa944a169b6ab9cc8070496e925f7eeef730ff9038 + checksum: 4f205f832bdbd0218cde374b067791f4f76d7abe8de86b2dc849c273899051126d912ebf71531ee49b8eeaa22cad77febdc8f2876698dc2a76e84a8cb976af22 languageName: node linkType: hard @@ -15404,7 +15133,7 @@ __metadata: languageName: node linkType: hard -"expect@npm:^29.7.0": +"expect@npm:^29.0.0, expect@npm:^29.7.0": version: 29.7.0 resolution: "expect@npm:29.7.0" dependencies: @@ -15938,13 +15667,13 @@ __metadata: linkType: hard "flat-cache@npm:^3.0.4": - version: 3.1.0 - resolution: "flat-cache@npm:3.1.0" + version: 3.2.0 + resolution: "flat-cache@npm:3.2.0" dependencies: - flatted: "npm:^3.2.7" + flatted: "npm:^3.2.9" keyv: "npm:^4.5.3" rimraf: "npm:^3.0.2" - checksum: fcbf70a2a7d8664ef8f94e25d8b4a05d0594aee8ba0b53b5b7f6287877e8e5080ae893fc4a71fb3d803c7659aeaf801d49f12183b954e21ecd98a1d74012167e + checksum: b76f611bd5f5d68f7ae632e3ae503e678d205cf97a17c6ab5b12f6ca61188b5f1f7464503efae6dc18683ed8f0b41460beb48ac4b9ac63fe6201296a91ba2f75 languageName: node linkType: hard @@ -15957,7 +15686,7 @@ __metadata: languageName: node linkType: hard -"flatted@npm:^3.2.7": +"flatted@npm:^3.2.9": version: 3.2.9 resolution: "flatted@npm:3.2.9" checksum: 5c91c5a0a21bbc0b07b272231e5b4efe6b822bcb4ad317caf6bb06984be4042a9e9045026307da0fdb4583f1f545e317a67ef1231a59e71f7fced3cc429cfc53 @@ -15965,9 +15694,9 @@ __metadata: linkType: hard "flow-parser@npm:0.*": - version: 0.217.2 - resolution: "flow-parser@npm:0.217.2" - checksum: d61127283db052fddf8275b070eea76dda5d2926aea3d8659250e168d69478f4ebdbc2bede83aa05c29f464c420ce1d701691278d3041af0492bfc16193277b5 + version: 0.223.0 + resolution: "flow-parser@npm:0.223.0" + checksum: eaf6794e2343230e841752e461c58194aa7aafddce52cc7980627fd138ba7fdb3628c83fe22905c5796101fde4833d13426e128ba93d1222420d613f8f7b2c45 languageName: node linkType: hard @@ -15987,7 +15716,7 @@ __metadata: languageName: node linkType: hard -"follow-redirects@npm:^1.0.0, follow-redirects@npm:^1.14.0, follow-redirects@npm:^1.14.9, follow-redirects@npm:^1.15.0": +"follow-redirects@npm:^1.0.0, follow-redirects@npm:^1.14.0, follow-redirects@npm:^1.15.0": version: 1.15.3 resolution: "follow-redirects@npm:1.15.3" peerDependenciesMeta: @@ -16455,14 +16184,14 @@ __metadata: languageName: node linkType: hard -"get-func-name@npm:^2.0.0, get-func-name@npm:^2.0.2": +"get-func-name@npm:^2.0.1, get-func-name@npm:^2.0.2": version: 2.0.2 resolution: "get-func-name@npm:2.0.2" checksum: 89830fd07623fa73429a711b9daecdb304386d237c71268007f788f113505ef1d4cc2d0b9680e072c5082490aec9df5d7758bf5ac6f1c37062855e8e3dc0b9df languageName: node linkType: hard -"get-intrinsic@npm:^1.0.2, get-intrinsic@npm:^1.1.1, get-intrinsic@npm:^1.1.3, get-intrinsic@npm:^1.2.0, get-intrinsic@npm:^1.2.1": +"get-intrinsic@npm:^1.0.2, get-intrinsic@npm:^1.1.1, get-intrinsic@npm:^1.1.3, get-intrinsic@npm:^1.2.0, get-intrinsic@npm:^1.2.1, get-intrinsic@npm:^1.2.2": version: 1.2.2 resolution: "get-intrinsic@npm:1.2.2" dependencies: @@ -16475,9 +16204,9 @@ __metadata: linkType: hard "get-npm-tarball-url@npm:^2.0.3": - version: 2.0.3 - resolution: "get-npm-tarball-url@npm:2.0.3" - checksum: fdf7a830d2602dd3d86285f412c9b2984ffe6ce854e1854e9548ea2b2f09f663b83791a31703552f8c72266d67c72e94c70f8d50a886fe5179d2f07a383660d8 + version: 2.1.0 + resolution: "get-npm-tarball-url@npm:2.1.0" + checksum: af779fa5b9c89a3deaf9640630a23368f5ba6a028a1179872aaf581a59485fb2c2c6bd9b94670de228cfc5f23600c89a01e594879085f7fb4dddf820a63105b8 languageName: node linkType: hard @@ -16554,19 +16283,19 @@ __metadata: linkType: hard "giget@npm:^1.0.0": - version: 1.1.2 - resolution: "giget@npm:1.1.2" + version: 1.1.3 + resolution: "giget@npm:1.1.3" dependencies: - colorette: "npm:^2.0.19" + colorette: "npm:^2.0.20" defu: "npm:^6.1.2" - https-proxy-agent: "npm:^5.0.1" + https-proxy-agent: "npm:^7.0.2" mri: "npm:^1.2.0" - node-fetch-native: "npm:^1.0.2" - pathe: "npm:^1.1.0" - tar: "npm:^6.1.13" + node-fetch-native: "npm:^1.4.0" + pathe: "npm:^1.1.1" + tar: "npm:^6.2.0" bin: giget: dist/cli.mjs - checksum: fc76d1042df3027c468f74320f7333ce3f99a84b7cd701683cffc386a35c53699a5c32b816b635f3cdf12956c3e85df4592ffbb31f01b8da6a8d943521c9e2e4 + checksum: 7f3d3628f4c488ab543e2edcd93b6899b2486a0afc2caab748ad65714d631f5cdfc9cf00404ed21b390c070cf5214037dffb593cd667c54b97adc6a1c657cdf9 languageName: node linkType: hard @@ -16727,11 +16456,11 @@ __metadata: linkType: hard "globals@npm:^13.19.0": - version: 13.22.0 - resolution: "globals@npm:13.22.0" + version: 13.23.0 + resolution: "globals@npm:13.23.0" dependencies: type-fest: "npm:^0.20.2" - checksum: e7fda8fe048a3b4fdfb95602b7dcd87d719f4b3797a6ba7f43e50fe148cfe20edfd3abeb16cc301caf679ca0f3e059b561e2d5060f2133f20f52c85bb16ac394 + checksum: fc05e184b3be59bffa2580f28551a12a758c3a18df4be91444202982c76f13f52821ad54ffaf7d3f2a4d2498fdf54aeaca8d4540fd9e860a9edb09d34ef4c507 languageName: node linkType: hard @@ -16975,11 +16704,11 @@ __metadata: linkType: hard "has-property-descriptors@npm:^1.0.0": - version: 1.0.0 - resolution: "has-property-descriptors@npm:1.0.0" + version: 1.0.1 + resolution: "has-property-descriptors@npm:1.0.1" dependencies: - get-intrinsic: "npm:^1.1.1" - checksum: d4ca882b6960d6257bd28baa3ddfa21f068d260411004a093b30ca357c740e11e985771c85216a6d1eef4161e862657f48c4758ec8ab515223b3895200ad164b + get-intrinsic: "npm:^1.2.2" + checksum: d62ba94b40150b00d621bc64a6aedb5bf0ee495308b4b7ed6bac856043db3cdfb1db553ae81cec91c9d2bd82057ff0e94145e7fa25d5aa5985ed32e0921927f6 languageName: node linkType: hard @@ -17046,16 +16775,9 @@ __metadata: version: 1.0.0 resolution: "has-values@npm:1.0.0" dependencies: - is-number: "npm:^3.0.0" - kind-of: "npm:^4.0.0" - checksum: a6f2a1cc6b2e43eacc68e62e71ad6890def7f4b13d2ef06b4ad3ee156c23e470e6df144b9b467701908e17633411f1075fdff0cab45fb66c5e0584d89b25f35e - languageName: node - linkType: hard - -"has@npm:^1.0.3": - version: 1.0.4 - resolution: "has@npm:1.0.4" - checksum: 82c1220573dc1f0a014a5d6189ae52a1f820f99dfdc00323c3a725b5002dcb7f04e44f460fea7af068474b2dd7c88cbe1846925c84017be9e31e1708936d305b + is-number: "npm:^3.0.0" + kind-of: "npm:^4.0.0" + checksum: a6f2a1cc6b2e43eacc68e62e71ad6890def7f4b13d2ef06b4ad3ee156c23e470e6df144b9b467701908e17633411f1075fdff0cab45fb66c5e0584d89b25f35e languageName: node linkType: hard @@ -17528,7 +17250,7 @@ __metadata: languageName: node linkType: hard -"https-proxy-agent@npm:7.0.2, https-proxy-agent@npm:^7.0.1": +"https-proxy-agent@npm:7.0.2, https-proxy-agent@npm:^7.0.1, https-proxy-agent@npm:^7.0.2": version: 7.0.2 resolution: "https-proxy-agent@npm:7.0.2" dependencies: @@ -17657,11 +17379,11 @@ __metadata: linkType: hard "ignore-walk@npm:^6.0.0": - version: 6.0.3 - resolution: "ignore-walk@npm:6.0.3" + version: 6.0.4 + resolution: "ignore-walk@npm:6.0.4" dependencies: minimatch: "npm:^9.0.0" - checksum: 327759df98c7b4d4039e4c4913507ca372b2a38bb44a1c2bd7ff2ffc7eee7a379025301e478d7640672f0007807c5ec5cc2e41c5226b9058aa58f00b600d3731 + checksum: 6dd2ea369f3d32d90cb26ca6647bc6e112ed483433270ed89b8055dd708d00777c2cbc85b93b43f53e2100851277fd1539796a758ae4c64b84445d4f1da5fd8f languageName: node linkType: hard @@ -17673,9 +17395,9 @@ __metadata: linkType: hard "ignore@npm:^5.0.0, ignore@npm:^5.0.4, ignore@npm:^5.0.5, ignore@npm:^5.1.1, ignore@npm:^5.2.0, ignore@npm:^5.2.4": - version: 5.2.4 - resolution: "ignore@npm:5.2.4" - checksum: 7c7cd90edd9fea6e037f9b9da4b01bf0a86b198ce78345f9bbd983929d68ff14830be31111edc5d70c264921f4962404d75b7262b4d9cc3bc12381eccbd03096 + version: 5.3.0 + resolution: "ignore@npm:5.3.0" + checksum: dc06bea5c23aae65d0725a957a0638b57e235ae4568dda51ca142053ed2c352de7e3bc93a69b2b32ac31966a1952e9a93c5ef2e2ab7c6b06aef9808f6b55b571 languageName: node linkType: hard @@ -17825,13 +17547,13 @@ __metadata: linkType: hard "internal-slot@npm:^1.0.4, internal-slot@npm:^1.0.5": - version: 1.0.5 - resolution: "internal-slot@npm:1.0.5" + version: 1.0.6 + resolution: "internal-slot@npm:1.0.6" dependencies: - get-intrinsic: "npm:^1.2.0" - has: "npm:^1.0.3" + get-intrinsic: "npm:^1.2.2" + hasown: "npm:^2.0.0" side-channel: "npm:^1.0.4" - checksum: 66d8a66b4b5310c042e8ad00ce895dc55cb25165a3a7da0d7862ca18d69d3b1ba86511b4bf3baf4273d744d3f6e9154574af45189ef11135a444945309e39e4a + checksum: aa37cafc8ffbf513a340de58f40d5017b4949d99722d7e4f0e24b182455bdd258000d4bb1d7b4adcf9f8979b97049b99fe9defa9db8e18a78071d2637ac143fb languageName: node linkType: hard @@ -17872,21 +17594,12 @@ __metadata: languageName: node linkType: hard -"is-accessor-descriptor@npm:^0.1.6": - version: 0.1.6 - resolution: "is-accessor-descriptor@npm:0.1.6" - dependencies: - kind-of: "npm:^3.0.2" - checksum: f2c314b314ec6e8a6e559351bff3c7ee9aed7a5e9c6f61dd8cb9e1382c8bfe33dca3f0e0af13daf9ded9e6e66390ff23b4acfb615d7a249009a51506a7b0f151 - languageName: node - linkType: hard - -"is-accessor-descriptor@npm:^1.0.0": - version: 1.0.0 - resolution: "is-accessor-descriptor@npm:1.0.0" +"is-accessor-descriptor@npm:^1.0.1": + version: 1.0.1 + resolution: "is-accessor-descriptor@npm:1.0.1" dependencies: - kind-of: "npm:^6.0.0" - checksum: d68edafd8ef133e9003837f3c80f4e5b82b12ab5456c772d1796857671ae83e3a426ed225a28a7e35bceabbce68c1f1ffdabf47e6d53f5a4d6c4558776ad3c20 + hasown: "npm:^2.0.0" + checksum: d034034074c5ffeb6c868e091083182279db1a956f49f8d1494cecaa0f8b99d706556ded2a9b20d9aa290549106eef8204d67d8572902e06dcb1add6db6b524d languageName: node linkType: hard @@ -18017,30 +17730,21 @@ __metadata: languageName: node linkType: hard -"is-core-module@npm:^2.11.0, is-core-module@npm:^2.13.0, is-core-module@npm:^2.8.1, is-core-module@npm:^2.9.0": - version: 2.13.0 - resolution: "is-core-module@npm:2.13.0" - dependencies: - has: "npm:^1.0.3" - checksum: a8e7f46f8cefd7c9f6f5d54f3dbf1c40bf79467b6612d6023421ec6ea7e8e4c22593b3963ff7a3f770db07bc19fccbe7987a550a8bc1a4d6ec4115db5e4c5dca - languageName: node - linkType: hard - -"is-data-descriptor@npm:^0.1.4": - version: 0.1.4 - resolution: "is-data-descriptor@npm:0.1.4" +"is-core-module@npm:^2.11.0, is-core-module@npm:^2.13.0, is-core-module@npm:^2.13.1, is-core-module@npm:^2.8.1": + version: 2.13.1 + resolution: "is-core-module@npm:2.13.1" dependencies: - kind-of: "npm:^3.0.2" - checksum: 32fda7e966b2c1f093230d5ef2aad1bb86e43e7280da50961e38ec31dbd8a50570a2911fd45277d321074a0762adc98e8462bb62820462594128857225e90d21 + hasown: "npm:^2.0.0" + checksum: 2cba9903aaa52718f11c4896dabc189bab980870aae86a62dc0d5cedb546896770ee946fb14c84b7adf0735f5eaea4277243f1b95f5cefa90054f92fbcac2518 languageName: node linkType: hard -"is-data-descriptor@npm:^1.0.0": - version: 1.0.0 - resolution: "is-data-descriptor@npm:1.0.0" +"is-data-descriptor@npm:^1.0.1": + version: 1.0.1 + resolution: "is-data-descriptor@npm:1.0.1" dependencies: - kind-of: "npm:^6.0.0" - checksum: bed31385d7d1a0dbb2ab3077faf2188acf42609192dca4e320ed7b3dc14a9d70c00658956cdaa2c0402be136c6b56e183973ad81b730fd90ab427fb6fd3608be + hasown: "npm:^2.0.0" + checksum: ad3acc372e3227f87eb8cdba112c343ca2a67f1885aecf64f02f901cb0858a1fc9488ad42135ab102e9d9e71a62b3594740790bb103a9ba5da830a131a89e3e8 languageName: node linkType: hard @@ -18075,24 +17779,22 @@ __metadata: linkType: hard "is-descriptor@npm:^0.1.0": - version: 0.1.6 - resolution: "is-descriptor@npm:0.1.6" + version: 0.1.7 + resolution: "is-descriptor@npm:0.1.7" dependencies: - is-accessor-descriptor: "npm:^0.1.6" - is-data-descriptor: "npm:^0.1.4" - kind-of: "npm:^5.0.0" - checksum: 6b8f5617b764ef8c6be3d54830184357e6cdedd8e0eddf1b97d0658616ac170bfdbc7c1ad00e0aa9f5b767acdb9d6c63d4df936501784b34936bd0f9acf3b665 + is-accessor-descriptor: "npm:^1.0.1" + is-data-descriptor: "npm:^1.0.1" + checksum: f5960b9783f508aec570465288cb673d4b3cc4aae4e6de970c3afd9a8fc1351edcb85d78b2cce2ec5251893a423f73263cab3bb94cf365a8d71b5d510a116392 languageName: node linkType: hard "is-descriptor@npm:^1.0.0, is-descriptor@npm:^1.0.2": - version: 1.0.2 - resolution: "is-descriptor@npm:1.0.2" + version: 1.0.3 + resolution: "is-descriptor@npm:1.0.3" dependencies: - is-accessor-descriptor: "npm:^1.0.0" - is-data-descriptor: "npm:^1.0.0" - kind-of: "npm:^6.0.2" - checksum: a05169c7a87feb88fc155e3ada469090cfabb5a548a3f794358b511cc47a0871b8b95e7345be4925a22ef3df585c3923b31943b3ad6255ce563a9d97f2e221e0 + is-accessor-descriptor: "npm:^1.0.1" + is-data-descriptor: "npm:^1.0.1" + checksum: b4ee667ea787d3a0be4e58536087fd0587de2b0b6672fbfe288f5b8d831ac4b79fd987f31d6c2d4e5543a42c97a87428bc5215ce292a1a47070147793878226f languageName: node linkType: hard @@ -18367,7 +18069,7 @@ __metadata: languageName: node linkType: hard -"is-regex@npm:^1.0.3, is-regex@npm:^1.0.4, is-regex@npm:^1.1.4": +"is-regex@npm:^1.0.3, is-regex@npm:^1.1.4": version: 1.1.4 resolution: "is-regex@npm:1.1.4" dependencies: @@ -18570,9 +18272,9 @@ __metadata: linkType: hard "istanbul-lib-coverage@npm:^3.0.0, istanbul-lib-coverage@npm:^3.2.0": - version: 3.2.0 - resolution: "istanbul-lib-coverage@npm:3.2.0" - checksum: 10ecb00a50cac2f506af8231ce523ffa1ac1310db0435c8ffaabb50c1d72539906583aa13c84f8835dc103998b9989edc3c1de989d2e2a96a91a9ba44e5db6b9 + version: 3.2.2 + resolution: "istanbul-lib-coverage@npm:3.2.2" + checksum: 6c7ff2106769e5f592ded1fb418f9f73b4411fd5a084387a5410538332b6567cd1763ff6b6cadca9b9eb2c443cce2f7ea7d7f1b8d315f9ce58539793b1e0922b languageName: node linkType: hard @@ -19017,8 +18719,8 @@ __metadata: linkType: hard "jest-preset-angular@npm:^13.0.1": - version: 13.1.2 - resolution: "jest-preset-angular@npm:13.1.2" + version: 13.1.4 + resolution: "jest-preset-angular@npm:13.1.4" dependencies: bs-logger: "npm:^0.2.6" esbuild: "npm:>=0.13.8" @@ -19028,16 +18730,16 @@ __metadata: pretty-format: "npm:^29.0.0" ts-jest: "npm:^29.0.0" peerDependencies: - "@angular-devkit/build-angular": ">=13.0.0 <17.0.0" - "@angular/compiler-cli": ">=13.0.0 <17.0.0" - "@angular/core": ">=13.0.0 <17.0.0" - "@angular/platform-browser-dynamic": ">=13.0.0 <17.0.0" + "@angular-devkit/build-angular": ">=13.0.0 <18.0.0" + "@angular/compiler-cli": ">=13.0.0 <18.0.0" + "@angular/core": ">=13.0.0 <18.0.0" + "@angular/platform-browser-dynamic": ">=13.0.0 <18.0.0" jest: ^29.0.0 typescript: ">=4.4" dependenciesMeta: esbuild: optional: true - checksum: be7efa5cca7c63d8c6df3d835eef4eff730e6f2f783cb1517e9c0060a9fc9d3d57aa2892d0704dab7226ecc80956717c98af8e6d0b8a2415dee07e88c72e34bf + checksum: a609deb98237505dfd9d81b8c41c385acd7a13af76609bb417144c4258cb2be2da7e87a46d74bfea36086fdfaa9a6b21a661452bbd9fb0a5552f514710e350fb languageName: node linkType: hard @@ -19286,11 +18988,11 @@ __metadata: linkType: hard "jiti@npm:^1.18.2": - version: 1.20.0 - resolution: "jiti@npm:1.20.0" + version: 1.21.0 + resolution: "jiti@npm:1.21.0" bin: jiti: bin/jiti.js - checksum: e71999db5e436d38c32ca713c3688b5da2a686f264584d927dcca80a4eaece83af7dd32c047524e74084bb11bdfa148f5f91b7e9a0044b4803feffe3c2c30dbc + checksum: 7f361219fe6c7a5e440d5f1dba4ab763a5538d2df8708cdc22561cf25ea3e44b837687931fca7cdd8cdd9f567300e90be989dd1321650045012d8f9ed6aab07f languageName: node linkType: hard @@ -19301,16 +19003,16 @@ __metadata: languageName: node linkType: hard -"joi@npm:^17.7.0": - version: 17.10.2 - resolution: "joi@npm:17.10.2" +"joi@npm:^17.11.0": + version: 17.11.0 + resolution: "joi@npm:17.11.0" dependencies: "@hapi/hoek": "npm:^9.0.0" "@hapi/topo": "npm:^5.0.0" "@sideway/address": "npm:^4.1.3" "@sideway/formula": "npm:^3.0.1" "@sideway/pinpoint": "npm:^2.0.0" - checksum: 5999a68f38a24de0b98850e137bbf4134e6dd8de29faa5893d7836f3e3aeb76ed5b2dd4daf836b87d2681aa9dfb6a5531c586d4d361dca9721d9ad0567be6b48 + checksum: c41c86fe772828b88fbdbcaef2e41235ccbb107c22523a377f9a2fd39829f203213f37a352589f49d9a9b38bf1c645846defede8b81d8c1f3123117c1a600010 languageName: node linkType: hard @@ -19512,9 +19214,9 @@ __metadata: linkType: hard "json-parse-even-better-errors@npm:^3.0.0": - version: 3.0.0 - resolution: "json-parse-even-better-errors@npm:3.0.0" - checksum: 128de17135e7af655ed83fc26dab0fe54faf43b3517fa73dcd997cce6e05a445932664f085ec6dbc219aeb0c592e53ef10d2d6dee4a8e9211ea901b8e6dd0b52 + version: 3.0.1 + resolution: "json-parse-even-better-errors@npm:3.0.1" + checksum: bc40600b14231dff1ff911d269c7ed89fbf3dbedf25cad3f47c10ff9cbb998ce03921372a17f27f3c7cfed76e679bc6c02a7b4cb2604b0ba68cd51ed16899492 languageName: node linkType: hard @@ -19540,11 +19242,14 @@ __metadata: linkType: hard "json-stable-stringify@npm:^1.0.1": - version: 1.0.2 - resolution: "json-stable-stringify@npm:1.0.2" + version: 1.1.0 + resolution: "json-stable-stringify@npm:1.1.0" dependencies: + call-bind: "npm:^1.0.5" + isarray: "npm:^2.0.5" jsonify: "npm:^0.0.1" - checksum: 502d021c3c59c09587faa40d7693d77c00460fd6c68bae95d6e35804909ec8c4aec71b136d3a09df61a7ebf803eb6e820f23ede76b77e74b8b02c76afb2ada8c + object-keys: "npm:^1.1.1" + checksum: 8888ac86dbf55c1d494bdf40705171c30884686911c37383d3aab777754bf5c1d60dc7a4dfd67f32ba37b184da5c99948a382f1c2912895a35453002e253314b languageName: node linkType: hard @@ -19679,7 +19384,7 @@ __metadata: languageName: node linkType: hard -"jsx-ast-utils@npm:^2.4.1 || ^3.0.0, jsx-ast-utils@npm:^3.3.3": +"jsx-ast-utils@npm:^2.4.1 || ^3.0.0, jsx-ast-utils@npm:^3.3.5": version: 3.3.5 resolution: "jsx-ast-utils@npm:3.3.5" dependencies: @@ -19743,11 +19448,11 @@ __metadata: linkType: hard "keyv@npm:^4.0.0, keyv@npm:^4.5.3": - version: 4.5.3 - resolution: "keyv@npm:4.5.3" + version: 4.5.4 + resolution: "keyv@npm:4.5.4" dependencies: json-buffer: "npm:3.0.1" - checksum: 7d3fc0469962bdff75ce92402b216a23d146e0caad011424947b32b95ffc4b91df12b1206026e6e945e7f80b3729a3109c0c3984f23038d738d355491179dd79 + checksum: aa52f3c5e18e16bb6324876bb8b59dd02acf782a4b789c7b2ae21107fab95fab3890ed448d4f8dba80ce05391eeac4bfabb4f02a20221342982f806fa2cf271e languageName: node linkType: hard @@ -19769,14 +19474,7 @@ __metadata: languageName: node linkType: hard -"kind-of@npm:^5.0.0": - version: 5.1.0 - resolution: "kind-of@npm:5.1.0" - checksum: fe85b7a2ed4b4d5a12e16e01d00d5c336e1760842fe0da38283605b9880c984288935e87b13138909e4d23d2d197a1d492f7393c6638d2c0fab8a900c4fb0392 - languageName: node - linkType: hard - -"kind-of@npm:^6.0.0, kind-of@npm:^6.0.2": +"kind-of@npm:^6.0.2": version: 6.0.3 resolution: "kind-of@npm:6.0.3" checksum: 61cdff9623dabf3568b6445e93e31376bee1cdb93f8ba7033d86022c2a9b1791a1d9510e026e6465ebd701a6dd2f7b0808483ad8838341ac52f003f512e0b4c4 @@ -19804,36 +19502,36 @@ __metadata: languageName: node linkType: hard -"kolorist@npm:^1.2.10": +"kolorist@npm:^1.8.0": version: 1.8.0 resolution: "kolorist@npm:1.8.0" checksum: 73075db44a692bf6c34a649f3b4b3aea4993b84f6b754cbf7a8577e7c7db44c0bad87752bd23b0ce533f49de2244ce2ce03b7b1b667a85ae170a94782cc50f9b languageName: node linkType: hard -"language-subtag-registry@npm:~0.3.2": +"language-subtag-registry@npm:^0.3.20": version: 0.3.22 resolution: "language-subtag-registry@npm:0.3.22" checksum: d1e09971260a7cd3b9fdeb190d33af0b6e99c8697013537d9aaa15f7856d9d83aee128ba8078e219df0a7cf4b8dd18d1a0c188f6543b500d92a2689d2d114b70 languageName: node linkType: hard -"language-tags@npm:=1.0.5": - version: 1.0.5 - resolution: "language-tags@npm:1.0.5" +"language-tags@npm:^1.0.9": + version: 1.0.9 + resolution: "language-tags@npm:1.0.9" dependencies: - language-subtag-registry: "npm:~0.3.2" - checksum: 04215e821af9a8f1bc6c99ab5aa0a316c3fe1912ca3337eb28596316064bddd8edd22f2883d866069ebdf01b2002e504a760a336b2c728b6d30514e86744f76c + language-subtag-registry: "npm:^0.3.20" + checksum: 9ab911213c4bd8bd583c850201c17794e52cb0660d1ab6e32558aadc8324abebf6844e46f92b80a5d600d0fbba7eface2c207bfaf270a1c7fd539e4c3a880bff languageName: node linkType: hard "launch-editor@npm:^2.6.0": - version: 2.6.0 - resolution: "launch-editor@npm:2.6.0" + version: 2.6.1 + resolution: "launch-editor@npm:2.6.1" dependencies: picocolors: "npm:^1.0.0" - shell-quote: "npm:^1.7.3" - checksum: 4802b9569d8a1d477f8279a994094b415d89eb39dadbc568193bc366d64ac13827c8860539ee336fa6135a06596a9b8c8265cebac35c3fa36a2214d0eea38890 + shell-quote: "npm:^1.8.1" + checksum: 82d0bd9a44e7a972157719e63dac1b8196db6ec7066c1ec57a495f6c3d6e734f3c4da89549e7b33eb3b0356668ad02a9e7782b6733f5ebd7a61b7c5f635a3ee9 languageName: node linkType: hard @@ -19966,9 +19664,9 @@ __metadata: linkType: hard "lines-and-columns@npm:~2.0.3": - version: 2.0.3 - resolution: "lines-and-columns@npm:2.0.3" - checksum: 09525c10010a925b7efe858f1dd3184eeac34f0a9bc34993075ec490efad71e948147746b18e9540279cc87cd44085b038f986903db3de65ffe96d38a7b91c4c + version: 2.0.4 + resolution: "lines-and-columns@npm:2.0.4" + checksum: 4db28bf065cd7ad897c0700f22d3d0d7c5ed6777e138861c601c496d545340df3fc19e18bd04ff8d95a246a245eb55685b82ca2f8c2ca53a008e9c5316250379 languageName: node linkType: hard @@ -20356,11 +20054,11 @@ __metadata: linkType: hard "loupe@npm:^2.3.6": - version: 2.3.6 - resolution: "loupe@npm:2.3.6" + version: 2.3.7 + resolution: "loupe@npm:2.3.7" dependencies: - get-func-name: "npm:^2.0.0" - checksum: a974841ce94ef2a35aac7144e7f9e789e3887f82286cd9ffe7ff00f2ac9d117481989948657465e2b0b102f23136d89ae0a18fd4a32d9015012cd64464453289 + get-func-name: "npm:^2.0.1" + checksum: 71a781c8fc21527b99ed1062043f1f2bb30bdaf54fa4cf92463427e1718bc6567af2988300bc243c1f276e4f0876f29e3cbf7b58106fdc186915687456ce5bf4 languageName: node linkType: hard @@ -20390,7 +20088,7 @@ __metadata: languageName: node linkType: hard -"lru-cache@npm:^10.0.1": +"lru-cache@npm:^10.0.1, lru-cache@npm:^9.1.1 || ^10.0.0": version: 10.1.0 resolution: "lru-cache@npm:10.1.0" checksum: 778bc8b2626daccd75f24c4b4d10632496e21ba064b126f526c626fbdbc5b28c472013fccd45d7646b9e1ef052444824854aed617b59cd570d01a8b7d651fc1e @@ -20439,13 +20137,6 @@ __metadata: languageName: node linkType: hard -"lru-cache@npm:^9.1.1 || ^10.0.0": - version: 10.0.1 - resolution: "lru-cache@npm:10.0.1" - checksum: 982dabfb227b9a2daf56d712ae0e72e01115a28c0a2068cd71277bca04568f3417bbf741c6c7941abc5c620fd8059e34f15607f90ebccbfa0a17533322d27a8e - languageName: node - linkType: hard - "lz-string@npm:^1.4.4, lz-string@npm:^1.5.0": version: 1.5.0 resolution: "lz-string@npm:1.5.0" @@ -21645,7 +21336,7 @@ __metadata: languageName: node linkType: hard -"minimist@npm:^1.2.0, minimist@npm:^1.2.3, minimist@npm:^1.2.5, minimist@npm:^1.2.6, minimist@npm:^1.2.7": +"minimist@npm:^1.2.0, minimist@npm:^1.2.3, minimist@npm:^1.2.5, minimist@npm:^1.2.6, minimist@npm:^1.2.8": version: 1.2.8 resolution: "minimist@npm:1.2.8" checksum: 19d3fcdca050087b84c2029841a093691a91259a47def2f18222f41e7645a0b7c44ef4b40e88a1e58a40c84d2ef0ee6047c55594d298146d0eb3f6b737c20ce6 @@ -21661,6 +21352,15 @@ __metadata: languageName: node linkType: hard +"minipass-collect@npm:^2.0.1": + version: 2.0.1 + resolution: "minipass-collect@npm:2.0.1" + dependencies: + minipass: "npm:^7.0.3" + checksum: 5167e73f62bb74cc5019594709c77e6a742051a647fe9499abf03c71dca75515b7959d67a764bdc4f8b361cf897fbf25e2d9869ee039203ed45240f48b9aa06e + languageName: node + linkType: hard + "minipass-fetch@npm:^2.0.3": version: 2.1.2 resolution: "minipass-fetch@npm:2.1.2" @@ -21901,11 +21601,11 @@ __metadata: linkType: hard "nanoid@npm:^3.3.6": - version: 3.3.6 - resolution: "nanoid@npm:3.3.6" + version: 3.3.7 + resolution: "nanoid@npm:3.3.7" bin: nanoid: bin/nanoid.cjs - checksum: 606b355960d0fcbe3d27924c4c52ef7d47d3b57208808ece73279420d91469b01ec1dce10fae512b6d4a8c5a5432b352b228336a8b2202a6ea68e67fa348e2ee + checksum: e3fb661aa083454f40500473bb69eedb85dc160e763150b9a2c567c7e9ff560ce028a9f833123b618a6ea742e311138b591910e795614a629029e86e180660f3 languageName: node linkType: hard @@ -21986,19 +21686,19 @@ __metadata: linkType: hard "next@npm:^14.0.2": - version: 14.0.2 - resolution: "next@npm:14.0.2" - dependencies: - "@next/env": "npm:14.0.2" - "@next/swc-darwin-arm64": "npm:14.0.2" - "@next/swc-darwin-x64": "npm:14.0.2" - "@next/swc-linux-arm64-gnu": "npm:14.0.2" - "@next/swc-linux-arm64-musl": "npm:14.0.2" - "@next/swc-linux-x64-gnu": "npm:14.0.2" - "@next/swc-linux-x64-musl": "npm:14.0.2" - "@next/swc-win32-arm64-msvc": "npm:14.0.2" - "@next/swc-win32-ia32-msvc": "npm:14.0.2" - "@next/swc-win32-x64-msvc": "npm:14.0.2" + version: 14.0.3 + resolution: "next@npm:14.0.3" + dependencies: + "@next/env": "npm:14.0.3" + "@next/swc-darwin-arm64": "npm:14.0.3" + "@next/swc-darwin-x64": "npm:14.0.3" + "@next/swc-linux-arm64-gnu": "npm:14.0.3" + "@next/swc-linux-arm64-musl": "npm:14.0.3" + "@next/swc-linux-x64-gnu": "npm:14.0.3" + "@next/swc-linux-x64-musl": "npm:14.0.3" + "@next/swc-win32-arm64-msvc": "npm:14.0.3" + "@next/swc-win32-ia32-msvc": "npm:14.0.3" + "@next/swc-win32-x64-msvc": "npm:14.0.3" "@swc/helpers": "npm:0.5.2" busboy: "npm:1.6.0" caniuse-lite: "npm:^1.0.30001406" @@ -22036,7 +21736,7 @@ __metadata: optional: true bin: next: dist/bin/next - checksum: 65ae7a09f1643bc3deafdbdae9ce0c02326346c4a60a7c739f8f6b154b2226b8fcc5efb984cdcb4ef100116910d4c1013089135800d30c7a50cf98c9d22e5a26 + checksum: 73aa3d5dd7b65b53ef68fa7723a7a98536482a69ae2d56e7b335194168f00b2851397bbdfe490b53dba2c70dfb8ad0150035fab4c762d6bc331e884487c4ff07 languageName: node linkType: hard @@ -22125,10 +21825,10 @@ __metadata: languageName: node linkType: hard -"node-fetch-native@npm:^1.0.2": - version: 1.4.0 - resolution: "node-fetch-native@npm:1.4.0" - checksum: 2ced63b4b4cef8d05e004c5489614811ae836ae17a07e548af7a29fb22c5ea2512ea24423720f1ac9b47787d701044321d4921e3da4fe8dbcc882a8f67a1d218 +"node-fetch-native@npm:^1.4.0": + version: 1.4.1 + resolution: "node-fetch-native@npm:1.4.1" + checksum: ab298a42ebf3b1b6c6a8cbc53d8ba703895f55171ed743b0828c2a87d461642d8053143864915a69d41cc01013db86406da105fff6c0a05a00d8caf5c279549c languageName: node linkType: hard @@ -22165,13 +21865,13 @@ __metadata: linkType: hard "node-gyp-build@npm:^4.2.2": - version: 4.6.1 - resolution: "node-gyp-build@npm:4.6.1" + version: 4.7.1 + resolution: "node-gyp-build@npm:4.7.1" bin: node-gyp-build: bin.js node-gyp-build-optional: optional.js node-gyp-build-test: build-test.js - checksum: bd7738c96608c1fa056344623b93d4bbdc63fec05862061e5489284639e3a53daa407b9158c45bfc2e33d0b419851ed5c1f03f4c9ba34726361e2a7b765c0ddc + checksum: b8e4a3f889237cd08edde3775e2b4e1e39a0571580584e33e29979f0c532a254ce3c5ec9435bd526254ad0b3f0b4a7e7fe14e53bd400f6ea9445f3bfd88a6b1e languageName: node linkType: hard @@ -22349,11 +22049,11 @@ __metadata: linkType: hard "npm-install-checks@npm:^6.0.0": - version: 6.2.0 - resolution: "npm-install-checks@npm:6.2.0" + version: 6.3.0 + resolution: "npm-install-checks@npm:6.3.0" dependencies: semver: "npm:^7.1.1" - checksum: d7814be08413879bb8b3c39ff15786f5865ed3359a56265a686dd7244f3b3ac37669bf740847f9f9063f1d90f2f770d84a815175030fde5f502eab1d9637433b + checksum: b046ef1de9b40f5d3a9831ce198e1770140a1c3f253dae22eb7b06045191ef79f18f1dcc15a945c919b3c161426861a28050abd321bf439190185794783b6452 languageName: node linkType: hard @@ -22598,21 +22298,14 @@ __metadata: languageName: node linkType: hard -"object-inspect@npm:^1.12.3": - version: 1.12.3 - resolution: "object-inspect@npm:1.12.3" - checksum: 752bb5f4dc595e214157ea8f442adb77bdb850ace762b078d151d8b6486331ab12364997a89ee6509be1023b15adf2b3774437a7105f8a5043dfda11ed622411 - languageName: node - linkType: hard - -"object-inspect@npm:^1.9.0": +"object-inspect@npm:^1.13.1, object-inspect@npm:^1.9.0": version: 1.13.1 resolution: "object-inspect@npm:1.13.1" checksum: fad603f408e345c82e946abdf4bfd774260a5ed3e5997a0b057c44153ac32c7271ff19e3a5ae39c858da683ba045ccac2f65245c12763ce4e8594f818f4a648d languageName: node linkType: hard -"object-is@npm:^1.0.1, object-is@npm:^1.1.5": +"object-is@npm:^1.1.5": version: 1.1.5 resolution: "object-is@npm:1.1.5" dependencies: @@ -22639,18 +22332,18 @@ __metadata: linkType: hard "object.assign@npm:^4.1.2, object.assign@npm:^4.1.4": - version: 4.1.4 - resolution: "object.assign@npm:4.1.4" + version: 4.1.5 + resolution: "object.assign@npm:4.1.5" dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.1.4" + call-bind: "npm:^1.0.5" + define-properties: "npm:^1.2.1" has-symbols: "npm:^1.0.3" object-keys: "npm:^1.1.1" - checksum: 2f286118c023e557757620e647b02e7c88d3d417e0c568fca0820de8ec9cca68928304854d5b03e99763eddad6e78a6716e2930f7e6372e4b9b843f3fd3056f3 + checksum: 60108e1fa2706f22554a4648299b0955236c62b3685c52abf4988d14fffb0e7731e00aa8c6448397e3eb63d087dcc124a9f21e1980f36d0b2667f3c18bacd469 languageName: node linkType: hard -"object.entries@npm:^1.1.2, object.entries@npm:^1.1.6": +"object.entries@npm:^1.1.2, object.entries@npm:^1.1.6, object.entries@npm:^1.1.7": version: 1.1.7 resolution: "object.entries@npm:1.1.7" dependencies: @@ -22661,7 +22354,7 @@ __metadata: languageName: node linkType: hard -"object.fromentries@npm:^2.0.6": +"object.fromentries@npm:^2.0.6, object.fromentries@npm:^2.0.7": version: 2.0.7 resolution: "object.fromentries@npm:2.0.7" dependencies: @@ -22672,7 +22365,7 @@ __metadata: languageName: node linkType: hard -"object.groupby@npm:^1.0.0": +"object.groupby@npm:^1.0.1": version: 1.0.1 resolution: "object.groupby@npm:1.0.1" dependencies: @@ -22703,7 +22396,7 @@ __metadata: languageName: node linkType: hard -"object.values@npm:^1.1.6": +"object.values@npm:^1.1.6, object.values@npm:^1.1.7": version: 1.1.7 resolution: "object.values@npm:1.1.7" dependencies: @@ -23402,7 +23095,7 @@ __metadata: languageName: node linkType: hard -"pathe@npm:^1.1.0": +"pathe@npm:^1.1.1": version: 1.1.1 resolution: "pathe@npm:1.1.1" checksum: 3ae5a0529c3415d91c3ac9133f52cffea54a0dd46892fe059f4b80faf36fd207957d4594bdc87043b65d0761b1e5728f81f46bafff3b5302da4e2e48889b8c0e @@ -23837,7 +23530,7 @@ __metadata: languageName: node linkType: hard -"postcss@npm:8.4.31, postcss@npm:^8.1.10, postcss@npm:^8.2.14, postcss@npm:^8.4.14, postcss@npm:^8.4.21, postcss@npm:^8.4.23, postcss@npm:^8.4.27, postcss@npm:^8.4.31": +"postcss@npm:8.4.31, postcss@npm:^8.2.14, postcss@npm:^8.4.14, postcss@npm:^8.4.21, postcss@npm:^8.4.23, postcss@npm:^8.4.27, postcss@npm:^8.4.31": version: 8.4.31 resolution: "postcss@npm:8.4.31" dependencies: @@ -23859,9 +23552,9 @@ __metadata: linkType: hard "preact@npm:^10.5.13": - version: 10.18.1 - resolution: "preact@npm:10.18.1" - checksum: b157c46d5dbece48cf0f31b0e24d27c989ea019e77730427b4c7549953da7de015b34f13f93d0034966f033738ec582829da918c28d084bbb31d59f320f56aa0 + version: 10.19.2 + resolution: "preact@npm:10.19.2" + checksum: 1a37e967d8947d1c82ad86cd90968536612c1463effdc5b0230a4517dc928cae8c9052513f0d5ac7bb09480b9431d129197d6c9b6924d32e32245e5ecd27cc8a languageName: node linkType: hard @@ -24342,9 +24035,9 @@ __metadata: linkType: hard "punycode@npm:^2.1.0, punycode@npm:^2.1.1": - version: 2.3.0 - resolution: "punycode@npm:2.3.0" - checksum: 8e6f7abdd3a6635820049e3731c623bbef3fedbf63bbc696b0d7237fdba4cefa069bc1fa62f2938b0fbae057550df7b5318f4a6bcece27f1907fc75c54160bee + version: 2.3.1 + resolution: "punycode@npm:2.3.1" + checksum: 14f76a8206bc3464f794fb2e3d3cc665ae416c01893ad7a02b23766eb07159144ee612ad67af5e84fa4479ccfe67678c4feb126b0485651b302babf66f04f9e9 languageName: node linkType: hard @@ -24567,20 +24260,20 @@ __metadata: linkType: hard "react-docgen@npm:^7.0.0": - version: 7.0.0 - resolution: "react-docgen@npm:7.0.0" + version: 7.0.1 + resolution: "react-docgen@npm:7.0.1" dependencies: "@babel/core": "npm:^7.18.9" "@babel/traverse": "npm:^7.18.9" "@babel/types": "npm:^7.18.9" "@types/babel__core": "npm:^7.18.0" "@types/babel__traverse": "npm:^7.18.0" - "@types/doctrine": "npm:^0.0.8" + "@types/doctrine": "npm:^0.0.9" "@types/resolve": "npm:^1.20.2" doctrine: "npm:^3.0.0" resolve: "npm:^1.22.1" strip-indent: "npm:^4.0.0" - checksum: 79678d01644e6519450f847c77fa554a7a80ae3a5ff81b1482d1458caa064cf3be88597051375ba7a90921980feb8586378e1560146d64c41d0e569465315575 + checksum: 870c1193211f14497bf7a96137f96840dc058842ca75ff7251d91e88c3c71d7a41d5f1a124cc1b53bfbf1f2b6b58bfccc4dd6e22592814a5155d3894953274be languageName: node linkType: hard @@ -25149,7 +24842,7 @@ __metadata: languageName: node linkType: hard -"regexp.prototype.flags@npm:^1.2.0, regexp.prototype.flags@npm:^1.5.0, regexp.prototype.flags@npm:^1.5.1": +"regexp.prototype.flags@npm:^1.5.0, regexp.prototype.flags@npm:^1.5.1": version: 1.5.1 resolution: "regexp.prototype.flags@npm:1.5.1" dependencies: @@ -25710,7 +25403,7 @@ __metadata: languageName: node linkType: hard -"resolve@npm:1.22.8": +"resolve@npm:1.22.8, resolve@npm:^1.10.0, resolve@npm:^1.12.0, resolve@npm:^1.13.1, resolve@npm:^1.14.2, resolve@npm:^1.15.1, resolve@npm:^1.17.0, resolve@npm:^1.19.0, resolve@npm:^1.20.0, resolve@npm:^1.22.1, resolve@npm:^1.22.4, resolve@npm:^1.22.8, resolve@npm:^1.4.0": version: 1.22.8 resolution: "resolve@npm:1.22.8" dependencies: @@ -25723,33 +25416,20 @@ __metadata: languageName: node linkType: hard -"resolve@npm:^1.10.0, resolve@npm:^1.12.0, resolve@npm:^1.13.1, resolve@npm:^1.14.2, resolve@npm:^1.15.1, resolve@npm:^1.17.0, resolve@npm:^1.19.0, resolve@npm:^1.20.0, resolve@npm:^1.22.1, resolve@npm:^1.22.4, resolve@npm:^1.4.0": - version: 1.22.6 - resolution: "resolve@npm:1.22.6" - dependencies: - is-core-module: "npm:^2.13.0" - path-parse: "npm:^1.0.7" - supports-preserve-symlinks-flag: "npm:^1.0.0" - bin: - resolve: bin/resolve - checksum: 967f2eb67c77d1be7ff15676a7dbac9334090cfbf8b967305da5f4bd22fc7d12e7045223dc820bcc783031815b60b7f42f2a495165c320ffb4c7bb92eb2eb2d7 - languageName: node - linkType: hard - "resolve@npm:^2.0.0-next.4": - version: 2.0.0-next.4 - resolution: "resolve@npm:2.0.0-next.4" + version: 2.0.0-next.5 + resolution: "resolve@npm:2.0.0-next.5" dependencies: - is-core-module: "npm:^2.9.0" + is-core-module: "npm:^2.13.0" path-parse: "npm:^1.0.7" supports-preserve-symlinks-flag: "npm:^1.0.0" bin: resolve: bin/resolve - checksum: 1de92669e7c46cfe125294c66d5405e13288bb87b97e9bdab71693ceebbcc0255c789bde30e2834265257d330d8ff57414d7d88e3097d8f69951f3ce978bf045 + checksum: a6c33555e3482ea2ec4c6e3d3bf0d78128abf69dca99ae468e64f1e30acaa318fd267fb66c8836b04d558d3e2d6ed875fe388067e7d8e0de647d3c21af21c43a languageName: node linkType: hard -"resolve@patch:resolve@npm%3A1.22.8#optional!builtin": +"resolve@patch:resolve@npm%3A1.22.8#optional!builtin, resolve@patch:resolve@npm%3A^1.10.0#optional!builtin, resolve@patch:resolve@npm%3A^1.12.0#optional!builtin, resolve@patch:resolve@npm%3A^1.13.1#optional!builtin, resolve@patch:resolve@npm%3A^1.14.2#optional!builtin, resolve@patch:resolve@npm%3A^1.15.1#optional!builtin, resolve@patch:resolve@npm%3A^1.17.0#optional!builtin, resolve@patch:resolve@npm%3A^1.19.0#optional!builtin, resolve@patch:resolve@npm%3A^1.20.0#optional!builtin, resolve@patch:resolve@npm%3A^1.22.1#optional!builtin, resolve@patch:resolve@npm%3A^1.22.4#optional!builtin, resolve@patch:resolve@npm%3A^1.22.8#optional!builtin, resolve@patch:resolve@npm%3A^1.4.0#optional!builtin": version: 1.22.8 resolution: "resolve@patch:resolve@npm%3A1.22.8#optional!builtin::version=1.22.8&hash=c3c19d" dependencies: @@ -25762,29 +25442,16 @@ __metadata: languageName: node linkType: hard -"resolve@patch:resolve@npm%3A^1.10.0#optional!builtin, resolve@patch:resolve@npm%3A^1.12.0#optional!builtin, resolve@patch:resolve@npm%3A^1.13.1#optional!builtin, resolve@patch:resolve@npm%3A^1.14.2#optional!builtin, resolve@patch:resolve@npm%3A^1.15.1#optional!builtin, resolve@patch:resolve@npm%3A^1.17.0#optional!builtin, resolve@patch:resolve@npm%3A^1.19.0#optional!builtin, resolve@patch:resolve@npm%3A^1.20.0#optional!builtin, resolve@patch:resolve@npm%3A^1.22.1#optional!builtin, resolve@patch:resolve@npm%3A^1.22.4#optional!builtin, resolve@patch:resolve@npm%3A^1.4.0#optional!builtin": - version: 1.22.6 - resolution: "resolve@patch:resolve@npm%3A1.22.6#optional!builtin::version=1.22.6&hash=c3c19d" - dependencies: - is-core-module: "npm:^2.13.0" - path-parse: "npm:^1.0.7" - supports-preserve-symlinks-flag: "npm:^1.0.0" - bin: - resolve: bin/resolve - checksum: acedc45a638b3635730669bb65e87bb61f5bf9b4e81982aba9ece0049ff792472a6fbb0c22cc59073cdbf17a0926c1d3d77ba86c88c60e15cc46f929278210cb - languageName: node - linkType: hard - "resolve@patch:resolve@npm%3A^2.0.0-next.4#optional!builtin": - version: 2.0.0-next.4 - resolution: "resolve@patch:resolve@npm%3A2.0.0-next.4#optional!builtin::version=2.0.0-next.4&hash=c3c19d" + version: 2.0.0-next.5 + resolution: "resolve@patch:resolve@npm%3A2.0.0-next.5#optional!builtin::version=2.0.0-next.5&hash=c3c19d" dependencies: - is-core-module: "npm:^2.9.0" + is-core-module: "npm:^2.13.0" path-parse: "npm:^1.0.7" supports-preserve-symlinks-flag: "npm:^1.0.0" bin: resolve: bin/resolve - checksum: ed2bb51d616b9cd30fe85cf49f7a2240094d9fa01a221d361918462be81f683d1855b7f192391d2ab5325245b42464ca59690db5bd5dad0a326fc0de5974dd10 + checksum: 78ad6edb8309a2bfb720c2c1898f7907a37f858866ce11a5974643af1203a6a6e05b2fa9c53d8064a673a447b83d42569260c306d43628bff5bb101969708355 languageName: node linkType: hard @@ -25973,7 +25640,7 @@ __metadata: languageName: node linkType: hard -"rxjs@npm:7.8.1, rxjs@npm:^7.8.0, rxjs@npm:^7.8.1": +"rxjs@npm:7.8.1, rxjs@npm:^7.8.1": version: 7.8.1 resolution: "rxjs@npm:7.8.1" dependencies: @@ -26207,11 +25874,12 @@ __metadata: linkType: hard "selfsigned@npm:^2.1.1": - version: 2.1.1 - resolution: "selfsigned@npm:2.1.1" + version: 2.4.1 + resolution: "selfsigned@npm:2.4.1" dependencies: + "@types/node-forge": "npm:^1.3.0" node-forge: "npm:^1" - checksum: 4a2509c8a5bd49c3630a799de66b317352b52746bec981133d4f8098365da35d2344f0fbedf14aacf2cd1e88682048e2df11ad9dc59331d3b1c0a5ec3e6e16ad + checksum: 521829ec36ea042f7e9963bf1da2ed040a815cf774422544b112ec53b7edc0bc50a0f8cc2ae7aa6cc19afa967c641fd96a15de0fc650c68651e41277d2e1df09 languageName: node linkType: hard @@ -26506,7 +26174,7 @@ __metadata: languageName: node linkType: hard -"shell-quote@npm:^1.7.3": +"shell-quote@npm:^1.8.1": version: 1.8.1 resolution: "shell-quote@npm:1.8.1" checksum: 8cec6fd827bad74d0a49347057d40dfea1e01f12a6123bf82c4649f3ef152fc2bc6d6176e6376bffcd205d9d0ccb4f1f9acae889384d20baff92186f01ea455a @@ -26914,7 +26582,7 @@ __metadata: languageName: node linkType: hard -"source-map@npm:0.7.4, source-map@npm:^0.7.3": +"source-map@npm:0.7.4, source-map@npm:^0.7.3, source-map@npm:^0.7.4": version: 0.7.4 resolution: "source-map@npm:0.7.4" checksum: dc0cf3768fe23c345ea8760487f8c97ef6fca8a73c83cd7c9bf2fde8bc2c34adb9c0824d6feb14bc4f9e37fb522e18af621543f1289038a66ac7586da29aa7dc @@ -26986,9 +26654,9 @@ __metadata: linkType: hard "spdx-license-ids@npm:^3.0.0": - version: 3.0.15 - resolution: "spdx-license-ids@npm:3.0.15" - checksum: 1d44fa43d2024d4533816ceffac983149f9c76214698033496e13f6224d7fe6e61649a2bb9eb6c88b5f7f71bc19cc5f0aed3dba75b430e27c06e0f71cc251959 + version: 3.0.16 + resolution: "spdx-license-ids@npm:3.0.16" + checksum: 7d88b8f01308948bb3ea69c066448f2776cf3d35a410d19afb836743086ced1566f6824ee8e6d67f8f25aa81fa86d8076a666c60ac4528caecd55e93edb5114e languageName: node linkType: hard @@ -27215,12 +26883,12 @@ __metadata: linkType: hard "streamx@npm:^2.15.0": - version: 2.15.1 - resolution: "streamx@npm:2.15.1" + version: 2.15.5 + resolution: "streamx@npm:2.15.5" dependencies: fast-fifo: "npm:^1.1.0" queue-tick: "npm:^1.0.1" - checksum: e3b0e997726a2a499e1069efea7d720e54fc262011dfcb32e6704f90b5a31bb55b8f48964649d787be03d8718dcf9aa413d24ce48823d92fcbad06a3c337ec61 + checksum: 7998d1fa3324131ed94efc4a4e8b22e0f60267b21d8f8fac8c605eaa1a6d6358adbc38c35b407be0eb8cc09a223c641962afb0db29ecbe92118242118946d93c languageName: node linkType: hard @@ -27640,53 +27308,7 @@ __metadata: languageName: node linkType: hard -"svelte-preprocess@npm:^5.1.0": - version: 5.1.0 - resolution: "svelte-preprocess@npm:5.1.0" - dependencies: - "@types/pug": "npm:^2.0.6" - detect-indent: "npm:^6.1.0" - magic-string: "npm:^0.27.0" - sorcery: "npm:^0.11.0" - strip-indent: "npm:^3.0.0" - peerDependencies: - "@babel/core": ^7.10.2 - coffeescript: ^2.5.1 - less: ^3.11.3 || ^4.0.0 - postcss: ^7 || ^8 - postcss-load-config: ^2.1.0 || ^3.0.0 || ^4.0.0 - pug: ^3.0.0 - sass: ^1.26.8 - stylus: ^0.55.0 - sugarss: ^2.0.0 || ^3.0.0 || ^4.0.0 - svelte: ^3.23.0 || ^4.0.0-next.0 || ^4.0.0 || ^5.0.0-next.0 - typescript: ">=3.9.5 || ^4.0.0 || ^5.0.0" - peerDependenciesMeta: - "@babel/core": - optional: true - coffeescript: - optional: true - less: - optional: true - postcss: - optional: true - postcss-load-config: - optional: true - pug: - optional: true - sass: - optional: true - stylus: - optional: true - sugarss: - optional: true - typescript: - optional: true - checksum: fb40153aa282edadad68221fcf82db1b7c67a208941b136c529fd843d1e8b595d79e9d39e5f252672e11a8b62c621ccf2078de4a57e5adbb89e13046998ae597 - languageName: node - linkType: hard - -"svelte-preprocess@npm:^5.1.1": +"svelte-preprocess@npm:^5.1.0, svelte-preprocess@npm:^5.1.1": version: 5.1.1 resolution: "svelte-preprocess@npm:5.1.1" dependencies: @@ -27733,8 +27355,8 @@ __metadata: linkType: hard "svelte@npm:^4.0.0": - version: 4.2.1 - resolution: "svelte@npm:4.2.1" + version: 4.2.8 + resolution: "svelte@npm:4.2.8" dependencies: "@ampproject/remapping": "npm:^2.2.1" "@jridgewell/sourcemap-codec": "npm:^1.4.15" @@ -27747,35 +27369,15 @@ __metadata: estree-walker: "npm:^3.0.3" is-reference: "npm:^3.0.1" locate-character: "npm:^3.0.0" - magic-string: "npm:^0.30.0" - periscopic: "npm:^3.1.0" - checksum: 5262dfceb99809a7ed01addc684351ac297dc2967b49dc99563af646c113c33a1535fe6ea5b9af4c6986880b6803ac0ca4fecb15a65bb18b641929c400d5dead - languageName: node - linkType: hard - -"svelte@npm:^5.0.0-next.15": - version: 5.0.0-next.15 - resolution: "svelte@npm:5.0.0-next.15" - dependencies: - "@ampproject/remapping": "npm:^2.2.1" - "@jridgewell/sourcemap-codec": "npm:^1.4.15" - acorn: "npm:^8.10.0" - acorn-typescript: "npm:^1.4.11" - aria-query: "npm:^5.3.0" - axobject-query: "npm:^4.0.0" - esm-env: "npm:^1.0.0" - esrap: "npm:^1.2.1" - is-reference: "npm:^3.0.1" - locate-character: "npm:^3.0.0" magic-string: "npm:^0.30.4" - zimmerframe: "npm:^1.1.0" - checksum: f1f29a9412a8d4b3605a29faad939c76f2a8da7b6d91d839b327387ac35c99a4d1382d8fce47ede061ea84d96971f6099c88f6c52c6f0d0bc01235cd0ea434bb + periscopic: "npm:^3.1.0" + checksum: 13673a6211cc38224398f4bda8e0ba93edfb1338aa4f28f614a31ac31b152479038761cfc57f1668554f5ab70effcd8023dcf549d75e7b2a7ae703d213b7e9da languageName: node linkType: hard -"svelte@npm:^5.0.0-next.16": - version: 5.0.0-next.16 - resolution: "svelte@npm:5.0.0-next.16" +"svelte@npm:^5.0.0-next.15, svelte@npm:^5.0.0-next.16": + version: 5.0.0-next.19 + resolution: "svelte@npm:5.0.0-next.19" dependencies: "@ampproject/remapping": "npm:^2.2.1" "@jridgewell/sourcemap-codec": "npm:^1.4.15" @@ -27789,7 +27391,7 @@ __metadata: locate-character: "npm:^3.0.0" magic-string: "npm:^0.30.4" zimmerframe: "npm:^1.1.0" - checksum: 4482d3402415c2233a03c15d3f6d0be28772cb84c386243251c817456478f0a4554ad27add94380c35fe4d2101442e2bbaae4f3130cf75a397f3e93b4e61bc20 + checksum: 2efc415d3a51cd9094349aa0295e728ea74e10bad17dedd167b1fae64de8ee5d46cbd27b5cfb152e4af641e1326e233dfeb918d8fa0541f65cf149b85d00419a languageName: node linkType: hard @@ -27909,7 +27511,7 @@ __metadata: languageName: node linkType: hard -"tar@npm:^6.1.11, tar@npm:^6.1.13, tar@npm:^6.1.2": +"tar@npm:^6.1.11, tar@npm:^6.1.2, tar@npm:^6.2.0": version: 6.2.0 resolution: "tar@npm:6.2.0" dependencies: @@ -27996,7 +27598,7 @@ __metadata: languageName: node linkType: hard -"terser@npm:5.24.0": +"terser@npm:5.24.0, terser@npm:^5.10.0, terser@npm:^5.16.8": version: 5.24.0 resolution: "terser@npm:5.24.0" dependencies: @@ -28010,20 +27612,6 @@ __metadata: languageName: node linkType: hard -"terser@npm:^5.10.0, terser@npm:^5.16.8": - version: 5.21.0 - resolution: "terser@npm:5.21.0" - dependencies: - "@jridgewell/source-map": "npm:^0.3.3" - acorn: "npm:^8.8.2" - commander: "npm:^2.20.0" - source-map-support: "npm:~0.5.20" - bin: - terser: bin/terser - checksum: f14ee816b668e014a2a37f4d00c2d9038374be56f0a141d4eb386b316c5645f49bb038a6b78f75353e9745d622dc66a1d6368aea5b08d46489b57dbf195f761c - languageName: node - linkType: hard - "test-exclude@npm:^6.0.0": version: 6.0.0 resolution: "test-exclude@npm:6.0.0" @@ -28195,9 +27783,9 @@ __metadata: linkType: hard "tocbot@npm:^4.20.1": - version: 4.21.1 - resolution: "tocbot@npm:4.21.1" - checksum: 9a3efd1e7555281872102d54bc8c683b030d341bb2d94b5e6b0fd9dea7545648ae20d5fc887c3943e073471276ad330e720b08a622cf0bf758ee668bc860f5b5 + version: 4.23.0 + resolution: "tocbot@npm:4.23.0" + checksum: e112c569913600b98a451fc114ba293c7365e529b6b22c34a4ba244a22a359d79aaafb0c752022b1c9a6e2d04692e436700c0b95d534da9ee31c0f310e96761b languageName: node linkType: hard @@ -28350,17 +27938,18 @@ __metadata: linkType: hard "ts-loader@npm:^9.2.8": - version: 9.4.4 - resolution: "ts-loader@npm:9.4.4" + version: 9.5.1 + resolution: "ts-loader@npm:9.5.1" dependencies: chalk: "npm:^4.1.0" enhanced-resolve: "npm:^5.0.0" micromatch: "npm:^4.0.0" semver: "npm:^7.3.4" + source-map: "npm:^0.7.4" peerDependencies: typescript: "*" webpack: ^5.0.0 - checksum: 11dba0651d7177eba9af38c43c79a28898ffcdfe7e73079fe48716dd93ca6634d3140dbbbc3ac34907be564be2429f0299ebdc7b58ce09482fad54333ccf611c + checksum: 7dc1e3e5d3d032b6ef27836032f02c57077dfbcdf5817cbbc16b7b8609e7ed1d0ec157a03eaac07960161d8ad4a9e030c4d6722fe33540cf6ee75156c7f9c33d languageName: node linkType: hard @@ -29045,9 +28634,9 @@ __metadata: linkType: hard "universal-user-agent@npm:^6.0.0": - version: 6.0.0 - resolution: "universal-user-agent@npm:6.0.0" - checksum: ebeb0206963666c13bcf9ebc86d0577c7daed5870c05cd34d4972ee7a43b9ef20679baf2a8c83bf1b71d899bae67243ac4982d84ddaf9ba0355ff76595819961 + version: 6.0.1 + resolution: "universal-user-agent@npm:6.0.1" + checksum: 5c9c46ffe19a975e11e6443640ed4c9e0ce48fcc7203325757a8414ac49940ebb0f4667f2b1fa561489d1eb22cb2d05a0f7c82ec20c5cba42e58e188fb19b187 languageName: node linkType: hard @@ -29066,9 +28655,9 @@ __metadata: linkType: hard "universalify@npm:^2.0.0": - version: 2.0.0 - resolution: "universalify@npm:2.0.0" - checksum: 07092b9f46df61b823d8ab5e57f0ee5120c178b39609a95e4a15a98c42f6b0b8e834e66fbb47ff92831786193be42f1fd36347169b88ce8639d0f9670af24a71 + version: 2.0.1 + resolution: "universalify@npm:2.0.1" + checksum: 73e8ee3809041ca8b818efb141801a1004e3fc0002727f1531f4de613ea281b494a40909596dae4a042a4fb6cd385af5d4db2e137b1362e0e91384b828effd3a languageName: node linkType: hard @@ -29080,14 +28669,14 @@ __metadata: linkType: hard "unplugin@npm:^1.3.1": - version: 1.5.0 - resolution: "unplugin@npm:1.5.0" + version: 1.5.1 + resolution: "unplugin@npm:1.5.1" dependencies: - acorn: "npm:^8.10.0" + acorn: "npm:^8.11.2" chokidar: "npm:^3.5.3" webpack-sources: "npm:^3.2.3" - webpack-virtual-modules: "npm:^0.5.0" - checksum: 2f79a7bf6b428a6aac80bf21852ed83cafead0ae3ed8866db1dca1cd4489f3b50c95874275e9a9b0f10c2e3c4892bfe0431c70d13635775c4c620a6a3f9eae37 + webpack-virtual-modules: "npm:^0.6.0" + checksum: 08cee7d100de3b8697d33eaa32405d821d0f51600640ce79e26f4258ddedcd9ac4c022f0453d6d978e9f75fd939ba9553440827987b2b03078f7087f4bef7c96 languageName: node linkType: hard @@ -29173,14 +28762,14 @@ __metadata: linkType: hard "urql@npm:^4.0.3": - version: 4.0.5 - resolution: "urql@npm:4.0.5" + version: 4.0.6 + resolution: "urql@npm:4.0.6" dependencies: - "@urql/core": "npm:^4.1.0" + "@urql/core": "npm:^4.2.0" wonka: "npm:^6.3.2" peerDependencies: react: ">= 16.8.0" - checksum: 9560d04b3c2fe72c921bdb21e969039b776e07999704d23bce35f815eb537c9357b6c7322a1b8cd43957550798c30cd15f5130ddd054dfd8a890d17d2be85282 + checksum: d3d952c5a1f288e6c9c24a0ffb694893133d3c8b0d1237109ce96b460697a6f4536a494b5ec70e690660cacbd9c149461d1811d33482f4ca2126ea96560c4332 languageName: node linkType: hard @@ -29343,7 +28932,7 @@ __metadata: languageName: node linkType: hard -"v8-to-istanbul@npm:^9.0.0": +"v8-to-istanbul@npm:^9.0.0, v8-to-istanbul@npm:^9.0.1": version: 9.2.0 resolution: "v8-to-istanbul@npm:9.2.0" dependencies: @@ -29354,17 +28943,6 @@ __metadata: languageName: node linkType: hard -"v8-to-istanbul@npm:^9.0.1": - version: 9.1.2 - resolution: "v8-to-istanbul@npm:9.1.2" - dependencies: - "@jridgewell/trace-mapping": "npm:^0.3.12" - "@types/istanbul-lib-coverage": "npm:^2.0.1" - convert-source-map: "npm:^2.0.0" - checksum: ceed817914e1ddbe88cbeaae37aff82effbbf67846810f24c551315dade629e65f65d8cd853ce0982eb30c8865eeeed2e0d3935e3b227cbcefb2c1607de04e82 - languageName: node - linkType: hard - "validate-npm-package-license@npm:^3.0.1, validate-npm-package-license@npm:^3.0.4": version: 3.0.4 resolution: "validate-npm-package-license@npm:3.0.4" @@ -29477,7 +29055,7 @@ __metadata: languageName: node linkType: hard -"vite@npm:4.5.0": +"vite@npm:4.5.0, vite@npm:^4.0.0, vite@npm:^4.0.4": version: 4.5.0 resolution: "vite@npm:4.5.0" dependencies: @@ -29517,55 +29095,15 @@ __metadata: languageName: node linkType: hard -"vite@npm:^4.0.0, vite@npm:^4.0.4": - version: 4.4.10 - resolution: "vite@npm:4.4.10" - dependencies: - esbuild: "npm:^0.18.10" - fsevents: "npm:~2.3.2" - postcss: "npm:^8.4.27" - rollup: "npm:^3.27.1" - peerDependencies: - "@types/node": ">= 14" - less: "*" - lightningcss: ^1.21.0 - sass: "*" - stylus: "*" - sugarss: "*" - terser: ^5.4.0 - dependenciesMeta: - fsevents: - optional: true - peerDependenciesMeta: - "@types/node": - optional: true - less: - optional: true - lightningcss: - optional: true - sass: - optional: true - stylus: - optional: true - sugarss: - optional: true - terser: - optional: true - bin: - vite: bin/vite.js - checksum: d1359f147eb84aad9922460848184f14295e76f335ab03f90a585886ff070e1a7c74996022b3bb07da0a3130c9829565b5556e6eb1d0db12a8aad26f3694d445 - languageName: node - linkType: hard - "vitefu@npm:^0.2.4": - version: 0.2.4 - resolution: "vitefu@npm:0.2.4" + version: 0.2.5 + resolution: "vitefu@npm:0.2.5" peerDependencies: - vite: ^3.0.0 || ^4.0.0 + vite: ^3.0.0 || ^4.0.0 || ^5.0.0 peerDependenciesMeta: vite: optional: true - checksum: 78d5e7071c0c4fdfc010f15a3e5bac2d31090ddd48789446fce5b7d0f01496fc6a041b65d3add904365bb0ac6576bb93635f700971c16ffd27cd7c0bee9eb1ae + checksum: 5781ece3025b6be0eb87ee7d97760a7721b1c6c5ad60ede5f37c86393ece3c8fce4245472f62368eb192448034086e25bdcadf098eefc271277176ab9a430204 languageName: node linkType: hard @@ -29618,22 +29156,22 @@ __metadata: linkType: hard "vscode-uri@npm:^3.0.3": - version: 3.0.7 - resolution: "vscode-uri@npm:3.0.7" - checksum: 67bc15bc9c9bd2d70dae8b27f2a3164281c6ee8f6484e6c5945a44d89871da93d52f2ba339ebc12ab0c10991d4576171b5d85e49a542454329c16faf977e4c59 + version: 3.0.8 + resolution: "vscode-uri@npm:3.0.8" + checksum: f7f217f526bf109589969fe6e66b71e70b937de1385a1d7bb577ca3ee7c5e820d3856a86e9ff2fa9b7a0bc56a3dd8c3a9a557d3fedd7df414bc618d5e6b567f9 languageName: node linkType: hard "vue-component-type-helpers@npm:latest": - version: 1.8.15 - resolution: "vue-component-type-helpers@npm:1.8.15" - checksum: 3397faf50844e31d92a29a44616088408cf6eb8b6c88b7deb8841c4bc78e8e258fafbb7052b100e52ebea5d1c4e826b7247b2c48f6f3c330addd53132db141f9 + version: 1.8.24 + resolution: "vue-component-type-helpers@npm:1.8.24" + checksum: 6ab61470ec36254b49d611108fb6e1ea217a1981e241d74f8a7c5724bb2b03c39e38995aaae498478e83626cfc15377cc030da183412e5a3bbf35d164762bf2b languageName: node linkType: hard "vue-docgen-api@npm:^4.40.0, vue-docgen-api@npm:^4.44.23, vue-docgen-api@npm:^4.46.0": - version: 4.74.2 - resolution: "vue-docgen-api@npm:4.74.2" + version: 4.75.1 + resolution: "vue-docgen-api@npm:4.75.1" dependencies: "@babel/parser": "npm:^7.21.4" "@babel/types": "npm:^7.21.4" @@ -29648,7 +29186,7 @@ __metadata: vue-inbrowser-compiler-independent-utils: "npm:^4.69.0" peerDependencies: vue: ">=2" - checksum: 9985c3910a40090796cd7f9ca9642134a2001e2afe5dcd6527c559f4e4e912abd45f3559d16801224ba5758551c64b7da61a8300b3a54618f1b8f7da319539cd + checksum: 5351000af100c08989bfe8daf6b396ec57247e9f5eb22e06c81cfc6ac694b2a2159c9abaa15409818a0a3e85887b4a3a64f9bca091b8f94e26bfe15a6849146a languageName: node linkType: hard @@ -29684,8 +29222,8 @@ __metadata: linkType: hard "vue-loader@npm:^15.7.0": - version: 15.10.2 - resolution: "vue-loader@npm:15.10.2" + version: 15.11.1 + resolution: "vue-loader@npm:15.11.1" dependencies: "@vue/component-compiler-utils": "npm:^3.1.0" hash-sum: "npm:^1.0.2" @@ -29702,7 +29240,7 @@ __metadata: optional: true vue-template-compiler: optional: true - checksum: 1c147ccfd08e047c6a71032c5a11eed6d7e24c7e6ddf5061aa8d234f9cde454b7ba45fd1251c5fd99d1a3f7fb7584f8e605ae4c95ec1c6a6307598c044b05e48 + checksum: 22491414f3743d485cf8d966837314706abf35d330bf055e356d55f16df8d4ab21fb712c7168509f7492d62cdf799aedf8d31df36d89bd5a4479b9f90fa094c1 languageName: node linkType: hard @@ -29730,12 +29268,12 @@ __metadata: linkType: hard "vue-template-compiler@npm:^2.6.14, vue-template-compiler@npm:^2.7.14": - version: 2.7.14 - resolution: "vue-template-compiler@npm:2.7.14" + version: 2.7.15 + resolution: "vue-template-compiler@npm:2.7.15" dependencies: de-indent: "npm:^1.0.2" he: "npm:^1.2.0" - checksum: 7f261b40d088c76ce9c66dde29220d0e5df43f974895a0aee97347ac48ed0958c21272dcdf8b163dcc2b9688eca528c1d72d12b3b8b1dcae1dde6a306d7cbb20 + checksum: a826e8a733281d8d9a4b05b0fe039d56ebf9f94ea5bd2ae39641fd98fa313cf4be1415b3cfa4339ffde1f6b158283d05770eae86840c105e8a5887764759b9f2 languageName: node linkType: hard @@ -29747,17 +29285,17 @@ __metadata: linkType: hard "vue-tsc@npm:latest": - version: 1.8.15 - resolution: "vue-tsc@npm:1.8.15" + version: 1.8.24 + resolution: "vue-tsc@npm:1.8.24" dependencies: - "@vue/language-core": "npm:1.8.15" - "@vue/typescript": "npm:1.8.15" - semver: "npm:^7.3.8" + "@volar/typescript": "npm:~1.11.1" + "@vue/language-core": "npm:1.8.24" + semver: "npm:^7.5.4" peerDependencies: typescript: "*" bin: vue-tsc: bin/vue-tsc.js - checksum: 18092627141afcef9515701ea85beae564bc31258358d3b0eb7a3ae5167559ac56d8e218a0490661bae91a4f496d1351f9431074820473206dda9d0c50998216 + checksum: 09707b06ae05a3d15127b33b04d0ea4adb7d0b64e1f344d2ae413c010adf2be2efae3411bfc64e9f18924461fe6dd79d7ffe3cf97c5f8a24e5fe290bd7531102 languageName: node linkType: hard @@ -29780,25 +29318,30 @@ __metadata: linkType: hard "vue@npm:^2.6.12, vue@npm:^2.7.10": - version: 2.7.14 - resolution: "vue@npm:2.7.14" + version: 2.7.15 + resolution: "vue@npm:2.7.15" dependencies: - "@vue/compiler-sfc": "npm:2.7.14" + "@vue/compiler-sfc": "npm:2.7.15" csstype: "npm:^3.1.0" - checksum: 8eb326718c445eb5900d08e2f5a2d86b493d475d3a79f49695066092afa3176d2aad4db98682b3c5432f6fffb92719a124b7e137264e71d5b9be14d5193222c6 + checksum: 92bc7bcef1a54fe6b98409a7094f7c8b1f4b8fcf52469380f130d0d671d581130b1ef8715f0e95020fc5dbffff7f519a0621206484b3fdee5e6319a76073fb0c languageName: node linkType: hard "vue@npm:^3.2.33, vue@npm:^3.2.47": - version: 3.3.4 - resolution: "vue@npm:3.3.4" + version: 3.3.9 + resolution: "vue@npm:3.3.9" dependencies: - "@vue/compiler-dom": "npm:3.3.4" - "@vue/compiler-sfc": "npm:3.3.4" - "@vue/runtime-dom": "npm:3.3.4" - "@vue/server-renderer": "npm:3.3.4" - "@vue/shared": "npm:3.3.4" - checksum: cc1a3ae13bd66a84ed6c45af33f8045ec551ac44bdd44ad5b25b08ef34d1737c3d43584d84ac19108f58602b5ba8f2483eee65d51760715589ff118b0c14d6df + "@vue/compiler-dom": "npm:3.3.9" + "@vue/compiler-sfc": "npm:3.3.9" + "@vue/runtime-dom": "npm:3.3.9" + "@vue/server-renderer": "npm:3.3.9" + "@vue/shared": "npm:3.3.9" + peerDependencies: + typescript: "*" + peerDependenciesMeta: + typescript: + optional: true + checksum: 46a9b363e208e0103162117bf8cd4820bfd844066502adc9106f075c4f67b15599ccabc9cd15971e43514eb446662cebb80cdcaf5f46f3b06b197e3aad410105 languageName: node linkType: hard @@ -29812,17 +29355,17 @@ __metadata: linkType: hard "wait-on@npm:^7.0.1": - version: 7.0.1 - resolution: "wait-on@npm:7.0.1" + version: 7.2.0 + resolution: "wait-on@npm:7.2.0" dependencies: - axios: "npm:^0.27.2" - joi: "npm:^17.7.0" + axios: "npm:^1.6.1" + joi: "npm:^17.11.0" lodash: "npm:^4.17.21" - minimist: "npm:^1.2.7" - rxjs: "npm:^7.8.0" + minimist: "npm:^1.2.8" + rxjs: "npm:^7.8.1" bin: wait-on: bin/wait-on - checksum: 2a9c56d26dac573e6bfd36e85d99f072021c23dc2c0faab900a411460b58e16982b96b018d9168c366040f56196314fa46f3d79ef19e3dc38f55824d5035f2ec + checksum: 1eff2189b3e4b0975889f3e480c75ca2a0d4275072779a6329e7cae8b729620594aa044509ddd89967de6ab2162169501b67b8d9562c16cac517837ffce17337 languageName: node linkType: hard @@ -30082,6 +29625,13 @@ __metadata: languageName: node linkType: hard +"webpack-virtual-modules@npm:^0.6.0": + version: 0.6.1 + resolution: "webpack-virtual-modules@npm:0.6.1" + checksum: 696bdc1acf3806374bdeb4b9b9856b79ee70b31e92f325dfab9b8c8c7e14bb6ddffa9f895a214770c4fb8fea45a21f34ca64310f74e877292a90f4a9966c9c2f + languageName: node + linkType: hard + "webpack@npm:5, webpack@npm:5.89.0, webpack@npm:^5, webpack@npm:^5.65.0": version: 5.89.0 resolution: "webpack@npm:5.89.0" @@ -30232,16 +29782,16 @@ __metadata: languageName: node linkType: hard -"which-typed-array@npm:^1.1.11, which-typed-array@npm:^1.1.2, which-typed-array@npm:^1.1.9": - version: 1.1.11 - resolution: "which-typed-array@npm:1.1.11" +"which-typed-array@npm:^1.1.11, which-typed-array@npm:^1.1.13, which-typed-array@npm:^1.1.2, which-typed-array@npm:^1.1.9": + version: 1.1.13 + resolution: "which-typed-array@npm:1.1.13" dependencies: available-typed-arrays: "npm:^1.0.5" - call-bind: "npm:^1.0.2" + call-bind: "npm:^1.0.4" for-each: "npm:^0.3.3" gopd: "npm:^1.0.1" has-tostringtag: "npm:^1.0.0" - checksum: 2cf4ce417beb50ae0ec3b1b479ea6d72d3e71986462ebd77344ca6398f77c7c59804eebe88f4126ce79f85edbcaa6c7783f54b0a5bf34f785eab7cbb35c30499 + checksum: 9f5f1c42918df3d5b91c4315ed0051d5d874370998bf095c9ae0df374f0881f85094e3c384b8fb08ab7b4d4f54ba81c0aff75da6226e7c0589b83dfbec1cd4c9 languageName: node linkType: hard @@ -30583,9 +30133,9 @@ __metadata: linkType: hard "yaml@npm:^2.0.0, yaml@npm:^2.3.1": - version: 2.3.2 - resolution: "yaml@npm:2.3.2" - checksum: c2aac464015f037911c5b819475e81e52119e5495e3d43fe7cb82b5a84d59d66a86049dc85d8e90658636c1c04dde177ae196818deaf76c1bda4d34209d5c087 + version: 2.3.4 + resolution: "yaml@npm:2.3.4" + checksum: cf03b68f8fef5e8516b0f0b54edaf2459f1648317fc6210391cf606d247e678b449382f4bd01f77392538429e306c7cba8ff46ff6b37cac4de9a76aff33bd9e1 languageName: node linkType: hard From 7192c903f7d5e662c30601a2c2a30f6673169d27 Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Wed, 6 Dec 2023 09:35:15 +0100 Subject: [PATCH 115/131] add template stories for sveltekit prerelease --- .../ButtonTypeScript.svelte | 38 ++++++ .../Forms.svelte | 7 ++ .../Hrefs.svelte | 8 ++ .../Navigation.svelte | 25 ++++ .../Stores.svelte | 17 +++ .../forms.stories.js | 26 ++++ .../hrefs.stories.js | 53 ++++++++ .../navigation.stories.js | 84 +++++++++++++ .../stores.stories.js | 116 ++++++++++++++++++ .../ts-docs.stories.js | 12 ++ 10 files changed, 386 insertions(+) create mode 100644 code/frameworks/sveltekit/template/stories_svelte-kit-prerelease-ts/ButtonTypeScript.svelte create mode 100644 code/frameworks/sveltekit/template/stories_svelte-kit-prerelease-ts/Forms.svelte create mode 100644 code/frameworks/sveltekit/template/stories_svelte-kit-prerelease-ts/Hrefs.svelte create mode 100644 code/frameworks/sveltekit/template/stories_svelte-kit-prerelease-ts/Navigation.svelte create mode 100644 code/frameworks/sveltekit/template/stories_svelte-kit-prerelease-ts/Stores.svelte create mode 100644 code/frameworks/sveltekit/template/stories_svelte-kit-prerelease-ts/forms.stories.js create mode 100644 code/frameworks/sveltekit/template/stories_svelte-kit-prerelease-ts/hrefs.stories.js create mode 100644 code/frameworks/sveltekit/template/stories_svelte-kit-prerelease-ts/navigation.stories.js create mode 100644 code/frameworks/sveltekit/template/stories_svelte-kit-prerelease-ts/stores.stories.js create mode 100644 code/frameworks/sveltekit/template/stories_svelte-kit-prerelease-ts/ts-docs.stories.js diff --git a/code/frameworks/sveltekit/template/stories_svelte-kit-prerelease-ts/ButtonTypeScript.svelte b/code/frameworks/sveltekit/template/stories_svelte-kit-prerelease-ts/ButtonTypeScript.svelte new file mode 100644 index 000000000000..cd00f38a3d57 --- /dev/null +++ b/code/frameworks/sveltekit/template/stories_svelte-kit-prerelease-ts/ButtonTypeScript.svelte @@ -0,0 +1,38 @@ + + +

Button TypeScript

+ + + \ No newline at end of file diff --git a/code/frameworks/sveltekit/template/stories_svelte-kit-prerelease-ts/Hrefs.svelte b/code/frameworks/sveltekit/template/stories_svelte-kit-prerelease-ts/Hrefs.svelte new file mode 100644 index 000000000000..4e7d69e0e051 --- /dev/null +++ b/code/frameworks/sveltekit/template/stories_svelte-kit-prerelease-ts/Hrefs.svelte @@ -0,0 +1,8 @@ + diff --git a/code/frameworks/sveltekit/template/stories_svelte-kit-prerelease-ts/Navigation.svelte b/code/frameworks/sveltekit/template/stories_svelte-kit-prerelease-ts/Navigation.svelte new file mode 100644 index 000000000000..4bcb7d0e6fc9 --- /dev/null +++ b/code/frameworks/sveltekit/template/stories_svelte-kit-prerelease-ts/Navigation.svelte @@ -0,0 +1,25 @@ + + + + + + + diff --git a/code/frameworks/sveltekit/template/stories_svelte-kit-prerelease-ts/Stores.svelte b/code/frameworks/sveltekit/template/stories_svelte-kit-prerelease-ts/Stores.svelte new file mode 100644 index 000000000000..164b00f7fa8b --- /dev/null +++ b/code/frameworks/sveltekit/template/stories_svelte-kit-prerelease-ts/Stores.svelte @@ -0,0 +1,17 @@ + + +

Directly importing

+
{JSON.stringify($page, null, 2)}
+
{JSON.stringify($navigating, null, 2)}
+
{JSON.stringify($updated, null, 2)}
+ +

With getStores

+
{JSON.stringify($pageStore, null, 2)}
+
{JSON.stringify($navigatingStore, null, 2)}
+
{JSON.stringify($updatedStore, null, 2)}
diff --git a/code/frameworks/sveltekit/template/stories_svelte-kit-prerelease-ts/forms.stories.js b/code/frameworks/sveltekit/template/stories_svelte-kit-prerelease-ts/forms.stories.js new file mode 100644 index 000000000000..72b584baef76 --- /dev/null +++ b/code/frameworks/sveltekit/template/stories_svelte-kit-prerelease-ts/forms.stories.js @@ -0,0 +1,26 @@ +import { expect, fn, within } from '@storybook/test'; +import Forms from './Forms.svelte'; + +export default { + title: 'stories/sveltekit/modules/forms', + component: Forms, + tags: ['autodocs'], +}; + +const enhance = fn(); + +export const Enhance = { + async play({ canvasElement }) { + const canvas = within(canvasElement); + const button = canvas.getByText('enhance'); + button.click(); + expect(enhance).toHaveBeenCalled(); + }, + parameters: { + sveltekit_experimental: { + forms: { + enhance, + }, + }, + }, +}; diff --git a/code/frameworks/sveltekit/template/stories_svelte-kit-prerelease-ts/hrefs.stories.js b/code/frameworks/sveltekit/template/stories_svelte-kit-prerelease-ts/hrefs.stories.js new file mode 100644 index 000000000000..f1cbf4973534 --- /dev/null +++ b/code/frameworks/sveltekit/template/stories_svelte-kit-prerelease-ts/hrefs.stories.js @@ -0,0 +1,53 @@ +import { expect, fn, within } from '@storybook/test'; +import Hrefs from './Hrefs.svelte'; + +export default { + title: 'stories/sveltekit/modules/hrefs', + component: Hrefs, + tags: ['autodocs'], +}; + +export const DefaultActions = { + async play({ canvasElement }) { + const canvas = within(canvasElement); + // eslint-disable-next-line no-undef + const initialUrl = window.location.toString(); + + const basicHref = canvas.getByText('/basic-href'); + basicHref.click(); + + const complexHref = canvas.getByText( + '/deep/nested/link?with=true&multiple-params=200#and-an-id' + ); + complexHref.click(); + + // eslint-disable-next-line no-undef + const finalUrl = window.location.toString(); + expect(finalUrl).toBe(initialUrl); + }, +}; + +const basicStringMatch = fn(); +const noMatch = fn(); +const exactStringMatch = fn(); +const regexMatch = fn(); + +export const Callbacks = { + parameters: { + sveltekit_experimental: { + hrefs: { + '/basic-href': basicStringMatch, + '/basic': noMatch, + '/deep/nested/link?with=true&multiple-params=200#and-an-id': exactStringMatch, + 'nested/link\\?with': { callback: regexMatch, asRegex: true }, + }, + }, + }, + play: async (ctx) => { + await DefaultActions.play(ctx); + expect(basicStringMatch).toHaveBeenCalledTimes(1); + expect(noMatch).not.toHaveBeenCalled(); + expect(exactStringMatch).toHaveBeenCalledTimes(1); + expect(regexMatch).toHaveBeenCalledTimes(1); + }, +}; diff --git a/code/frameworks/sveltekit/template/stories_svelte-kit-prerelease-ts/navigation.stories.js b/code/frameworks/sveltekit/template/stories_svelte-kit-prerelease-ts/navigation.stories.js new file mode 100644 index 000000000000..ded12268e03c --- /dev/null +++ b/code/frameworks/sveltekit/template/stories_svelte-kit-prerelease-ts/navigation.stories.js @@ -0,0 +1,84 @@ +import { expect, fn, within } from '@storybook/test'; +import Navigation from './Navigation.svelte'; + +export default { + title: 'stories/sveltekit/modules/navigation', + component: Navigation, + tags: ['autodocs'], +}; + +const goto = fn(); + +export const Goto = { + async play({ canvasElement }) { + const canvas = within(canvasElement); + const button = canvas.getByText('goto'); + button.click(); + expect(goto).toHaveBeenCalledWith('/storybook-goto'); + }, + parameters: { + sveltekit_experimental: { + navigation: { + goto, + }, + }, + }, +}; + +export const DefaultActions = {}; + +const invalidate = fn(); + +export const Invalidate = { + async play({ canvasElement }) { + const canvas = within(canvasElement); + const button = canvas.getByText('invalidate', { exact: true }); + button.click(); + expect(invalidate).toHaveBeenCalledWith('/storybook-invalidate'); + }, + parameters: { + sveltekit_experimental: { + navigation: { + invalidate, + }, + }, + }, +}; + +const invalidateAll = fn(); + +export const InvalidateAll = { + async play({ canvasElement }) { + const canvas = within(canvasElement); + const button = canvas.getByText('invalidateAll'); + button.click(); + expect(invalidateAll).toHaveBeenCalledWith(); + }, + parameters: { + sveltekit_experimental: { + navigation: { + invalidateAll, + }, + }, + }, +}; + +const afterNavigateFn = fn(); + +export const AfterNavigate = { + async play() { + expect(afterNavigateFn).toHaveBeenCalledWith({ test: 'passed' }); + }, + args: { + afterNavigateFn, + }, + parameters: { + sveltekit_experimental: { + navigation: { + afterNavigate: { + test: 'passed', + }, + }, + }, + }, +}; diff --git a/code/frameworks/sveltekit/template/stories_svelte-kit-prerelease-ts/stores.stories.js b/code/frameworks/sveltekit/template/stories_svelte-kit-prerelease-ts/stores.stories.js new file mode 100644 index 000000000000..7f7401cf8bee --- /dev/null +++ b/code/frameworks/sveltekit/template/stories_svelte-kit-prerelease-ts/stores.stories.js @@ -0,0 +1,116 @@ +import Stores from './Stores.svelte'; + +export default { + title: 'stories/sveltekit/modules/stores', + component: Stores, + tags: ['autodocs'], +}; + +export const AllUndefined = {}; + +export const PageStore = { + parameters: { + sveltekit_experimental: { + stores: { + page: { + data: { + test: 'passed', + }, + }, + }, + }, + }, +}; + +export const NavigatingStore = { + parameters: { + sveltekit_experimental: { + stores: { + navigating: { + route: { + id: '/storybook', + }, + }, + }, + }, + }, +}; + +export const UpdatedStore = { + parameters: { + sveltekit_experimental: { + stores: { + updated: true, + }, + }, + }, +}; + +export const PageAndNavigatingStore = { + parameters: { + sveltekit_experimental: { + stores: { + page: { + data: { + test: 'passed', + }, + }, + navigating: { + route: { + id: '/storybook', + }, + }, + }, + }, + }, +}; + +export const PageAndUpdatedStore = { + parameters: { + sveltekit_experimental: { + stores: { + page: { + data: { + test: 'passed', + }, + }, + updated: true, + }, + }, + }, +}; + +export const NavigatingAndUpdatedStore = { + parameters: { + sveltekit_experimental: { + stores: { + navigating: { + route: { + id: '/storybook', + }, + }, + updated: true, + }, + }, + }, +}; + +export const AllThreeStores = { + parameters: { + sveltekit_experimental: { + stores: { + page: { + data: { + test: 'passed', + }, + }, + navigating: { + route: { + id: '/storybook', + }, + }, + updated: true, + }, + }, + }, +}; diff --git a/code/frameworks/sveltekit/template/stories_svelte-kit-prerelease-ts/ts-docs.stories.js b/code/frameworks/sveltekit/template/stories_svelte-kit-prerelease-ts/ts-docs.stories.js new file mode 100644 index 000000000000..f33428810ee9 --- /dev/null +++ b/code/frameworks/sveltekit/template/stories_svelte-kit-prerelease-ts/ts-docs.stories.js @@ -0,0 +1,12 @@ +import ButtonTypescript from './ButtonTypeScript.svelte'; + +export default { + title: 'stories/renderers/svelte/ts-docs', + component: ButtonTypescript, + args: { + primary: true, + }, + tags: ['autodocs'], +}; + +export const Primary = {}; From 71a457525a8270b65d38bbc80849cf7dbb3a6904 Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Wed, 6 Dec 2023 09:35:34 +0100 Subject: [PATCH 116/131] disable actions e2e test for svelte prerelease --- code/e2e-tests/addon-actions.spec.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/code/e2e-tests/addon-actions.spec.ts b/code/e2e-tests/addon-actions.spec.ts index 520c2b5dc41f..a9f32e61c022 100644 --- a/code/e2e-tests/addon-actions.spec.ts +++ b/code/e2e-tests/addon-actions.spec.ts @@ -3,9 +3,16 @@ import process from 'process'; import { SbPage } from './util'; const storybookUrl = process.env.STORYBOOK_URL || 'http://localhost:8001'; +const templateName = process.env.STORYBOOK_TEMPLATE_NAME || ''; test.describe('addon-actions', () => { test('should trigger an action', async ({ page }) => { + // eslint-disable-next-line jest/no-disabled-tests + test.skip( + // eslint-disable-next-line jest/valid-title + templateName.includes('svelte') && templateName.includes('prerelease'), + 'Svelte 5 prerelase does not support automatic actions with our current example components yet' + ); await page.goto(storybookUrl); const sbPage = new SbPage(page); sbPage.waitUntilLoaded(); From 41d08038a41164cce63c1b50220954ea119da240 Mon Sep 17 00:00:00 2001 From: Shaun Lloyd Date: Wed, 6 Dec 2023 08:29:12 -0500 Subject: [PATCH 117/131] Use env vars in script --- scripts/sandbox/generate.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/sandbox/generate.ts b/scripts/sandbox/generate.ts index fc5ba32f03c6..0ad2860b536f 100755 --- a/scripts/sandbox/generate.ts +++ b/scripts/sandbox/generate.ts @@ -36,7 +36,7 @@ const sbInit = async ( ) => { const sbCliBinaryPath = join(__dirname, `../../code/lib/cli/bin/index.js`); console.log(`🎁 Installing storybook`); - const env = { STORYBOOK_DISABLE_TELEMETRY: 'true' }; + const env = { STORYBOOK_DISABLE_TELEMETRY: 'true', ...envVars }; const fullFlags = ['--yes', ...(flags || [])]; await runCommand(`${sbCliBinaryPath} init ${fullFlags.join(' ')}`, { cwd, env }, debug); }; From 10cfd348d7ebd4f46171b32a99548c37ff98f75e Mon Sep 17 00:00:00 2001 From: Kasper Peulen Date: Wed, 6 Dec 2023 15:16:06 +0100 Subject: [PATCH 118/131] Fix mapping --- code/lib/cli/src/helpers.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/code/lib/cli/src/helpers.ts b/code/lib/cli/src/helpers.ts index 3e9361f061c0..33c7b6c6ccd9 100644 --- a/code/lib/cli/src/helpers.ts +++ b/code/lib/cli/src/helpers.ts @@ -193,7 +193,10 @@ type CopyTemplateFilesOptions = { destination?: string; }; -const frameworkToRenderer: Record = { +const frameworkToRenderer: Record< + SupportedFrameworks | SupportedRenderers, + SupportedRenderers | 'vue' +> = { angular: 'angular', ember: 'ember', html: 'html', @@ -206,7 +209,7 @@ const frameworkToRenderer: Record Date: Wed, 6 Dec 2023 14:28:38 +0000 Subject: [PATCH 119/131] Fix wrapper snippets --- .../apollo-wrapper-component.with-mock-implementation.js.mdx | 4 +--- .../apollo-wrapper-component.with-mock-implementation.ts.mdx | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/docs/snippets/svelte/apollo-wrapper-component.with-mock-implementation.js.mdx b/docs/snippets/svelte/apollo-wrapper-component.with-mock-implementation.js.mdx index 2793daec07b6..d43181fd25da 100644 --- a/docs/snippets/svelte/apollo-wrapper-component.with-mock-implementation.js.mdx +++ b/docs/snippets/svelte/apollo-wrapper-component.with-mock-implementation.js.mdx @@ -23,7 +23,5 @@ setClient(mockedClient); -
- -
+ ``` diff --git a/docs/snippets/svelte/apollo-wrapper-component.with-mock-implementation.ts.mdx b/docs/snippets/svelte/apollo-wrapper-component.with-mock-implementation.ts.mdx index b2cda17845c1..3e2c29cb660b 100644 --- a/docs/snippets/svelte/apollo-wrapper-component.with-mock-implementation.ts.mdx +++ b/docs/snippets/svelte/apollo-wrapper-component.with-mock-implementation.ts.mdx @@ -23,7 +23,5 @@ setClient(mockedClient); -
- -
+ ``` From 6b29931e92744b37dd0b04756404180c93e2da96 Mon Sep 17 00:00:00 2001 From: Kasper Peulen Date: Wed, 6 Dec 2023 16:36:26 +0100 Subject: [PATCH 120/131] Fix merge conflicts --- .circleci/config.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3429809658b8..e3f8ef172a8d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -614,22 +614,22 @@ workflows: requires: - build - create-sandboxes: - parallelism: 33 + parallelism: 34 requires: - build # - smoke-test-sandboxes: # disabled for now # requires: # - create-sandboxes - build-sandboxes: - parallelism: 33 + parallelism: 34 requires: - create-sandboxes - chromatic-sandboxes: - parallelism: 30 + parallelism: 31 requires: - build-sandboxes - e2e-production: - parallelism: 28 + parallelism: 29 requires: - build-sandboxes - e2e-dev: @@ -637,7 +637,7 @@ workflows: requires: - create-sandboxes - test-runner-production: - parallelism: 28 + parallelism: 29 requires: - build-sandboxes # TODO: reenable once we find out the source of flakyness From 9e1492b20005c802b53c8565c2e6f8a0fccd3146 Mon Sep 17 00:00:00 2001 From: jonniebigodes Date: Wed, 6 Dec 2023 19:05:58 +0000 Subject: [PATCH 121/131] Docs: SWC compiler cross link to API docs --- docs/configure/compilers.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/configure/compilers.md b/docs/configure/compilers.md index fc18eac310aa..96d9cb75f64a 100644 --- a/docs/configure/compilers.md +++ b/docs/configure/compilers.md @@ -21,7 +21,7 @@ SWC is a fast, highly extensible tool for compiling and bundling modern JavaScri -Support for the SWC builder is currently experimental for Next.js projects, and it's not enabled by default. It requires you to opt in to use it. +Support for the SWC builder is currently experimental for Next.js projects, and it's not enabled by default. It requires you to opt in to use it. For more information on configuring SWC with the supported frameworks, see the [SWC API](../api/main-config-swc.md) documentation. From 8ef5716572e430219610a5b8b7f9b2f66efbebfa Mon Sep 17 00:00:00 2001 From: Martin Machycek Date: Thu, 7 Dec 2023 11:20:32 +1100 Subject: [PATCH 122/131] Update README.md $app/forms and $app/navigation mocking is now supported in sveltekit integration --- code/frameworks/sveltekit/README.md | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/code/frameworks/sveltekit/README.md b/code/frameworks/sveltekit/README.md index 02f43b117710..2f2755dc91a2 100644 --- a/code/frameworks/sveltekit/README.md +++ b/code/frameworks/sveltekit/README.md @@ -185,16 +185,6 @@ export const MyStory = { You'll get this error when manually upgrading from 6.5 to 7.0. You need to remove the `svelteOptions` property in `.storybook/main.js`, as that is not supported by Storybook 7.0 + SvelteKit. The property is also not necessary anymore because the Vite and Svelte configurations are loaded automatically in Storybook 7.0. -### Error: `Cannot read properties of undefined (reading 'disable_scroll_handling')` in preview - -> Some stories don't load, instead they show the following error in the preview: -> -> ``` -> Cannot read properties of undefined (reading 'disable_scroll_handling') -> ``` - -You'll experience this if anything in your story is importing from `$app/forms` or `$app/navigation`, which is currently not supported. To get around this, separate your component into a shallow parent component that imports what's needed and passes it to a child component via props. This way you can write stories for your child component and mock any of the necessary modules by passing props in. - ## Acknowledgements Integrating with SvelteKit would not have been possible if it weren't for the fantastic efforts by the Svelte core team - especially [Ben McCann](https://twitter.com/benjaminmccann) - to make integrations with the wider ecosystem possible. From 386d8ef5a8378bb4fa82036d60e92b4a3386c652 Mon Sep 17 00:00:00 2001 From: storybook-bot <32066757+storybook-bot@users.noreply.github.com> Date: Thu, 7 Dec 2023 01:21:33 +0000 Subject: [PATCH 123/131] Bump version from "8.0.0-alpha.0" to "8.0.0-alpha.1" [skip ci] --- code/addons/a11y/package.json | 2 +- code/addons/actions/package.json | 2 +- code/addons/backgrounds/package.json | 2 +- code/addons/controls/package.json | 2 +- code/addons/docs/package.json | 2 +- code/addons/essentials/package.json | 2 +- code/addons/gfm/package.json | 2 +- code/addons/highlight/package.json | 2 +- code/addons/interactions/package.json | 2 +- code/addons/jest/package.json | 2 +- code/addons/links/package.json | 2 +- code/addons/measure/package.json | 2 +- code/addons/outline/package.json | 2 +- code/addons/storysource/package.json | 2 +- code/addons/themes/package.json | 2 +- code/addons/toolbars/package.json | 2 +- code/addons/viewport/package.json | 2 +- code/builders/builder-manager/package.json | 2 +- code/builders/builder-vite/package.json | 2 +- code/builders/builder-webpack5/package.json | 2 +- code/frameworks/angular/package.json | 2 +- code/frameworks/ember/package.json | 2 +- code/frameworks/html-vite/package.json | 2 +- code/frameworks/html-webpack5/package.json | 2 +- code/frameworks/nextjs/package.json | 2 +- code/frameworks/preact-vite/package.json | 2 +- code/frameworks/preact-webpack5/package.json | 2 +- code/frameworks/react-vite/package.json | 2 +- code/frameworks/react-webpack5/package.json | 2 +- code/frameworks/server-webpack5/package.json | 2 +- code/frameworks/svelte-vite/package.json | 2 +- code/frameworks/svelte-webpack5/package.json | 2 +- code/frameworks/sveltekit/package.json | 2 +- code/frameworks/vue-vite/package.json | 2 +- code/frameworks/vue-webpack5/package.json | 2 +- code/frameworks/vue3-vite/package.json | 2 +- code/frameworks/vue3-webpack5/package.json | 2 +- .../web-components-vite/package.json | 2 +- .../web-components-webpack5/package.json | 2 +- code/lib/channels/package.json | 2 +- code/lib/cli-sb/package.json | 2 +- code/lib/cli-storybook/package.json | 2 +- code/lib/cli/package.json | 2 +- code/lib/cli/src/versions.ts | 170 +++++++++--------- code/lib/client-logger/package.json | 2 +- code/lib/codemod/package.json | 2 +- code/lib/core-common/package.json | 2 +- code/lib/core-events/package.json | 2 +- code/lib/core-server/package.json | 2 +- code/lib/core-webpack/package.json | 2 +- code/lib/csf-plugin/package.json | 2 +- code/lib/csf-tools/package.json | 2 +- code/lib/docs-tools/package.json | 2 +- code/lib/instrumenter/package.json | 2 +- code/lib/manager-api/package.json | 2 +- code/lib/manager-api/src/version.ts | 2 +- code/lib/node-logger/package.json | 2 +- code/lib/postinstall/package.json | 2 +- code/lib/preview-api/package.json | 2 +- code/lib/preview/package.json | 2 +- code/lib/react-dom-shim/package.json | 2 +- code/lib/router/package.json | 2 +- code/lib/source-loader/package.json | 2 +- code/lib/telemetry/package.json | 2 +- code/lib/test/package.json | 2 +- code/lib/theming/package.json | 2 +- code/lib/types/package.json | 2 +- code/package.json | 5 +- code/presets/create-react-app/package.json | 2 +- code/presets/html-webpack/package.json | 2 +- code/presets/preact-webpack/package.json | 2 +- code/presets/react-webpack/package.json | 2 +- code/presets/server-webpack/package.json | 2 +- code/presets/svelte-webpack/package.json | 2 +- code/presets/vue-webpack/package.json | 2 +- code/presets/vue3-webpack/package.json | 2 +- .../web-components-webpack/package.json | 2 +- code/renderers/html/package.json | 2 +- code/renderers/preact/package.json | 2 +- code/renderers/react/package.json | 2 +- code/renderers/server/package.json | 2 +- code/renderers/svelte/package.json | 2 +- code/renderers/vue/package.json | 2 +- code/renderers/vue3/package.json | 2 +- code/renderers/web-components/package.json | 2 +- code/ui/blocks/package.json | 2 +- code/ui/components/package.json | 2 +- code/ui/manager/package.json | 2 +- 88 files changed, 173 insertions(+), 174 deletions(-) diff --git a/code/addons/a11y/package.json b/code/addons/a11y/package.json index 8c3d602ae05d..ea0479e59e09 100644 --- a/code/addons/a11y/package.json +++ b/code/addons/a11y/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-a11y", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "Test component compliance with web accessibility standards", "keywords": [ "a11y", diff --git a/code/addons/actions/package.json b/code/addons/actions/package.json index 8485ef374cd2..85f33c51f2cb 100644 --- a/code/addons/actions/package.json +++ b/code/addons/actions/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-actions", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "Get UI feedback when an action is performed on an interactive element", "keywords": [ "storybook", diff --git a/code/addons/backgrounds/package.json b/code/addons/backgrounds/package.json index de569b1b5284..621a3c4e0355 100644 --- a/code/addons/backgrounds/package.json +++ b/code/addons/backgrounds/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-backgrounds", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "Switch backgrounds to view components in different settings", "keywords": [ "addon", diff --git a/code/addons/controls/package.json b/code/addons/controls/package.json index 8d0a57d586f2..ac51ac8deb95 100644 --- a/code/addons/controls/package.json +++ b/code/addons/controls/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-controls", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "Interact with component inputs dynamically in the Storybook UI", "keywords": [ "addon", diff --git a/code/addons/docs/package.json b/code/addons/docs/package.json index 514cbe8f7c90..10744e7a6964 100644 --- a/code/addons/docs/package.json +++ b/code/addons/docs/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-docs", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "Document component usage and properties in Markdown", "keywords": [ "addon", diff --git a/code/addons/essentials/package.json b/code/addons/essentials/package.json index d45b5d4961c9..8f50f570f7dd 100644 --- a/code/addons/essentials/package.json +++ b/code/addons/essentials/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-essentials", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "Curated addons to bring out the best of Storybook", "keywords": [ "addon", diff --git a/code/addons/gfm/package.json b/code/addons/gfm/package.json index 0fa499b4aa73..79ce70675b82 100644 --- a/code/addons/gfm/package.json +++ b/code/addons/gfm/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-mdx-gfm", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "GitHub Flavored Markdown in Storybook", "keywords": [ "addon", diff --git a/code/addons/highlight/package.json b/code/addons/highlight/package.json index a7a9bf35411a..fa2ac7cb55b6 100644 --- a/code/addons/highlight/package.json +++ b/code/addons/highlight/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-highlight", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "Highlight DOM nodes within your stories", "keywords": [ "storybook-addons", diff --git a/code/addons/interactions/package.json b/code/addons/interactions/package.json index bc5cf130bb32..b7288176a707 100644 --- a/code/addons/interactions/package.json +++ b/code/addons/interactions/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-interactions", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "Automate, test and debug user interactions", "keywords": [ "storybook-addons", diff --git a/code/addons/jest/package.json b/code/addons/jest/package.json index b76131fe4618..ee13f3f6c4c0 100644 --- a/code/addons/jest/package.json +++ b/code/addons/jest/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-jest", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "React storybook addon that show component jest report", "keywords": [ "addon", diff --git a/code/addons/links/package.json b/code/addons/links/package.json index 7ba44c50ac77..356f1cae75ef 100644 --- a/code/addons/links/package.json +++ b/code/addons/links/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-links", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "Link stories together to build demos and prototypes with your UI components", "keywords": [ "addon", diff --git a/code/addons/measure/package.json b/code/addons/measure/package.json index b0dbca6a0553..19aef9b12f95 100644 --- a/code/addons/measure/package.json +++ b/code/addons/measure/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-measure", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "Inspect layouts by visualizing the box model", "keywords": [ "storybook-addons", diff --git a/code/addons/outline/package.json b/code/addons/outline/package.json index 3b3ba8ec915a..96c131446fb0 100644 --- a/code/addons/outline/package.json +++ b/code/addons/outline/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-outline", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "Outline all elements with CSS to help with layout placement and alignment", "keywords": [ "storybook-addons", diff --git a/code/addons/storysource/package.json b/code/addons/storysource/package.json index bc3b9988dfff..20fab0eee1c3 100644 --- a/code/addons/storysource/package.json +++ b/code/addons/storysource/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-storysource", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "View a story’s source code to see how it works and paste into your app", "keywords": [ "addon", diff --git a/code/addons/themes/package.json b/code/addons/themes/package.json index a094429d12b4..17cd134aba7c 100644 --- a/code/addons/themes/package.json +++ b/code/addons/themes/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-themes", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "Switch between multiple themes for you components in Storybook", "keywords": [ "css", diff --git a/code/addons/toolbars/package.json b/code/addons/toolbars/package.json index 515a241ed04d..2cb9839c562c 100644 --- a/code/addons/toolbars/package.json +++ b/code/addons/toolbars/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-toolbars", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "Create your own toolbar items that control story rendering", "keywords": [ "addon", diff --git a/code/addons/viewport/package.json b/code/addons/viewport/package.json index 6457e61189e0..75a60cadd159 100644 --- a/code/addons/viewport/package.json +++ b/code/addons/viewport/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-viewport", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "Build responsive components by adjusting Storybook’s viewport size and orientation", "keywords": [ "addon", diff --git a/code/builders/builder-manager/package.json b/code/builders/builder-manager/package.json index 894660ab1f76..a0f53c6775ba 100644 --- a/code/builders/builder-manager/package.json +++ b/code/builders/builder-manager/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/builder-manager", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "Storybook manager builder", "keywords": [ "storybook" diff --git a/code/builders/builder-vite/package.json b/code/builders/builder-vite/package.json index 4866c584d6f4..d686bf6a99da 100644 --- a/code/builders/builder-vite/package.json +++ b/code/builders/builder-vite/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/builder-vite", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.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": { diff --git a/code/builders/builder-webpack5/package.json b/code/builders/builder-webpack5/package.json index fe8dbfb60959..ba3896799e0a 100644 --- a/code/builders/builder-webpack5/package.json +++ b/code/builders/builder-webpack5/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/builder-webpack5", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "Storybook framework-agnostic API", "keywords": [ "storybook" diff --git a/code/frameworks/angular/package.json b/code/frameworks/angular/package.json index a170d98da10c..6441f8bf5149 100644 --- a/code/frameworks/angular/package.json +++ b/code/frameworks/angular/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/angular", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "Storybook for Angular: Develop Angular components in isolation with hot reloading.", "keywords": [ "storybook", diff --git a/code/frameworks/ember/package.json b/code/frameworks/ember/package.json index 099dd2b7dbaf..43954dc5e6d5 100644 --- a/code/frameworks/ember/package.json +++ b/code/frameworks/ember/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/ember", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.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": { diff --git a/code/frameworks/html-vite/package.json b/code/frameworks/html-vite/package.json index e5e0da90dfd1..7810b637bb34 100644 --- a/code/frameworks/html-vite/package.json +++ b/code/frameworks/html-vite/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/html-vite", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "Storybook for HTML and Vite: Develop HTML in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/frameworks/html-webpack5/package.json b/code/frameworks/html-webpack5/package.json index e43fe3543937..e7e22878e8ab 100644 --- a/code/frameworks/html-webpack5/package.json +++ b/code/frameworks/html-webpack5/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/html-webpack5", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "Storybook for HTML: View HTML snippets in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/frameworks/nextjs/package.json b/code/frameworks/nextjs/package.json index 46fd2faac332..b543e112dc7a 100644 --- a/code/frameworks/nextjs/package.json +++ b/code/frameworks/nextjs/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/nextjs", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "Storybook for Next.js", "keywords": [ "storybook", diff --git a/code/frameworks/preact-vite/package.json b/code/frameworks/preact-vite/package.json index 257bcc92c69c..c59e676db2d8 100644 --- a/code/frameworks/preact-vite/package.json +++ b/code/frameworks/preact-vite/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preact-vite", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "Storybook for Preact and Vite: Develop Preact components in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/frameworks/preact-webpack5/package.json b/code/frameworks/preact-webpack5/package.json index 0a8f66f523ad..679b0796dad2 100644 --- a/code/frameworks/preact-webpack5/package.json +++ b/code/frameworks/preact-webpack5/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preact-webpack5", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "Storybook for Preact: Develop Preact Component in isolation.", "keywords": [ "storybook" diff --git a/code/frameworks/react-vite/package.json b/code/frameworks/react-vite/package.json index 70a625d6e785..699401586182 100644 --- a/code/frameworks/react-vite/package.json +++ b/code/frameworks/react-vite/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/react-vite", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "Storybook for React and Vite: Develop React components in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/frameworks/react-webpack5/package.json b/code/frameworks/react-webpack5/package.json index 09ea179cfae7..6e9e0546451f 100644 --- a/code/frameworks/react-webpack5/package.json +++ b/code/frameworks/react-webpack5/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/react-webpack5", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "Storybook for React: Develop React Component in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/frameworks/server-webpack5/package.json b/code/frameworks/server-webpack5/package.json index cf3ceea8ae18..f6be997ebf81 100644 --- a/code/frameworks/server-webpack5/package.json +++ b/code/frameworks/server-webpack5/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/server-webpack5", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "Storybook for Server: View HTML snippets from a server in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/frameworks/svelte-vite/package.json b/code/frameworks/svelte-vite/package.json index 585a77752bed..cb07dfdff473 100644 --- a/code/frameworks/svelte-vite/package.json +++ b/code/frameworks/svelte-vite/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/svelte-vite", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "Storybook for Svelte and Vite: Develop Svelte components in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/frameworks/svelte-webpack5/package.json b/code/frameworks/svelte-webpack5/package.json index 9e47d3bb34ee..2316a7377795 100644 --- a/code/frameworks/svelte-webpack5/package.json +++ b/code/frameworks/svelte-webpack5/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/svelte-webpack5", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "Storybook for Svelte: Develop Svelte Component in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/frameworks/sveltekit/package.json b/code/frameworks/sveltekit/package.json index f952e2515b07..5fc71b2414fc 100644 --- a/code/frameworks/sveltekit/package.json +++ b/code/frameworks/sveltekit/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/sveltekit", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "Storybook for SvelteKit", "keywords": [ "storybook", diff --git a/code/frameworks/vue-vite/package.json b/code/frameworks/vue-vite/package.json index 6dbba9abdb01..4c9f154e4fb9 100644 --- a/code/frameworks/vue-vite/package.json +++ b/code/frameworks/vue-vite/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/vue-vite", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "Storybook for Vue2 and Vite: Develop Vue2 Components in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/frameworks/vue-webpack5/package.json b/code/frameworks/vue-webpack5/package.json index adef5761e2e4..6de5d46b642a 100644 --- a/code/frameworks/vue-webpack5/package.json +++ b/code/frameworks/vue-webpack5/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/vue-webpack5", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "Storybook for Vue: Develop Vue Component in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/frameworks/vue3-vite/package.json b/code/frameworks/vue3-vite/package.json index bb7a383e0a9c..e5baf641886b 100644 --- a/code/frameworks/vue3-vite/package.json +++ b/code/frameworks/vue3-vite/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/vue3-vite", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "Storybook for Vue3 and Vite: Develop Vue3 components in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/frameworks/vue3-webpack5/package.json b/code/frameworks/vue3-webpack5/package.json index b3aa121ac813..9146f9ec227c 100644 --- a/code/frameworks/vue3-webpack5/package.json +++ b/code/frameworks/vue3-webpack5/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/vue3-webpack5", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "Storybook for Vue 3: Develop Vue 3 Components in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/frameworks/web-components-vite/package.json b/code/frameworks/web-components-vite/package.json index f6072d06db56..45e6567e2f77 100644 --- a/code/frameworks/web-components-vite/package.json +++ b/code/frameworks/web-components-vite/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/web-components-vite", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "Storybook for web-components and Vite: Develop Web Components in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/frameworks/web-components-webpack5/package.json b/code/frameworks/web-components-webpack5/package.json index 9a1e83921048..e995f98fc972 100644 --- a/code/frameworks/web-components-webpack5/package.json +++ b/code/frameworks/web-components-webpack5/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/web-components-webpack5", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "Storybook for web-components: View web components snippets in isolation with Hot Reloading.", "keywords": [ "lit", diff --git a/code/lib/channels/package.json b/code/lib/channels/package.json index 5bcf6681dea5..4af366ad448d 100644 --- a/code/lib/channels/package.json +++ b/code/lib/channels/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/channels", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "", "keywords": [ "storybook" diff --git a/code/lib/cli-sb/package.json b/code/lib/cli-sb/package.json index f1e6e525bd83..4a7e39ced803 100644 --- a/code/lib/cli-sb/package.json +++ b/code/lib/cli-sb/package.json @@ -1,6 +1,6 @@ { "name": "sb", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "Storybook CLI", "keywords": [ "storybook" diff --git a/code/lib/cli-storybook/package.json b/code/lib/cli-storybook/package.json index edc80bd66397..71e5ec5c23ed 100644 --- a/code/lib/cli-storybook/package.json +++ b/code/lib/cli-storybook/package.json @@ -1,6 +1,6 @@ { "name": "storybook", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "Storybook CLI", "keywords": [ "storybook" diff --git a/code/lib/cli/package.json b/code/lib/cli/package.json index 5fe6d5d5f40e..b7201c92e647 100644 --- a/code/lib/cli/package.json +++ b/code/lib/cli/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/cli", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "Storybook's CLI - easiest method of adding storybook to your projects", "keywords": [ "cli", diff --git a/code/lib/cli/src/versions.ts b/code/lib/cli/src/versions.ts index b477f0d53255..9b02a51bce66 100644 --- a/code/lib/cli/src/versions.ts +++ b/code/lib/cli/src/versions.ts @@ -1,88 +1,88 @@ // auto generated file, do not edit export default { - '@storybook/addon-a11y': '8.0.0-alpha.0', - '@storybook/addon-actions': '8.0.0-alpha.0', - '@storybook/addon-backgrounds': '8.0.0-alpha.0', - '@storybook/addon-controls': '8.0.0-alpha.0', - '@storybook/addon-docs': '8.0.0-alpha.0', - '@storybook/addon-essentials': '8.0.0-alpha.0', - '@storybook/addon-highlight': '8.0.0-alpha.0', - '@storybook/addon-interactions': '8.0.0-alpha.0', - '@storybook/addon-jest': '8.0.0-alpha.0', - '@storybook/addon-links': '8.0.0-alpha.0', - '@storybook/addon-mdx-gfm': '8.0.0-alpha.0', - '@storybook/addon-measure': '8.0.0-alpha.0', - '@storybook/addon-outline': '8.0.0-alpha.0', - '@storybook/addon-storysource': '8.0.0-alpha.0', - '@storybook/addon-themes': '8.0.0-alpha.0', - '@storybook/addon-toolbars': '8.0.0-alpha.0', - '@storybook/addon-viewport': '8.0.0-alpha.0', - '@storybook/angular': '8.0.0-alpha.0', - '@storybook/blocks': '8.0.0-alpha.0', - '@storybook/builder-manager': '8.0.0-alpha.0', - '@storybook/builder-vite': '8.0.0-alpha.0', - '@storybook/builder-webpack5': '8.0.0-alpha.0', - '@storybook/channels': '8.0.0-alpha.0', - '@storybook/cli': '8.0.0-alpha.0', - '@storybook/client-logger': '8.0.0-alpha.0', - '@storybook/codemod': '8.0.0-alpha.0', - '@storybook/components': '8.0.0-alpha.0', - '@storybook/core-common': '8.0.0-alpha.0', - '@storybook/core-events': '8.0.0-alpha.0', - '@storybook/core-server': '8.0.0-alpha.0', - '@storybook/core-webpack': '8.0.0-alpha.0', - '@storybook/csf-plugin': '8.0.0-alpha.0', - '@storybook/csf-tools': '8.0.0-alpha.0', - '@storybook/docs-tools': '8.0.0-alpha.0', - '@storybook/ember': '8.0.0-alpha.0', - '@storybook/html': '8.0.0-alpha.0', - '@storybook/html-vite': '8.0.0-alpha.0', - '@storybook/html-webpack5': '8.0.0-alpha.0', - '@storybook/instrumenter': '8.0.0-alpha.0', - '@storybook/manager': '8.0.0-alpha.0', - '@storybook/manager-api': '8.0.0-alpha.0', - '@storybook/nextjs': '8.0.0-alpha.0', - '@storybook/node-logger': '8.0.0-alpha.0', - '@storybook/postinstall': '8.0.0-alpha.0', - '@storybook/preact': '8.0.0-alpha.0', - '@storybook/preact-vite': '8.0.0-alpha.0', - '@storybook/preact-webpack5': '8.0.0-alpha.0', - '@storybook/preset-create-react-app': '8.0.0-alpha.0', - '@storybook/preset-html-webpack': '8.0.0-alpha.0', - '@storybook/preset-preact-webpack': '8.0.0-alpha.0', - '@storybook/preset-react-webpack': '8.0.0-alpha.0', - '@storybook/preset-server-webpack': '8.0.0-alpha.0', - '@storybook/preset-svelte-webpack': '8.0.0-alpha.0', - '@storybook/preset-vue-webpack': '8.0.0-alpha.0', - '@storybook/preset-vue3-webpack': '8.0.0-alpha.0', - '@storybook/preset-web-components-webpack': '8.0.0-alpha.0', - '@storybook/preview': '8.0.0-alpha.0', - '@storybook/preview-api': '8.0.0-alpha.0', - '@storybook/react': '8.0.0-alpha.0', - '@storybook/react-dom-shim': '8.0.0-alpha.0', - '@storybook/react-vite': '8.0.0-alpha.0', - '@storybook/react-webpack5': '8.0.0-alpha.0', - '@storybook/router': '8.0.0-alpha.0', - '@storybook/server': '8.0.0-alpha.0', - '@storybook/server-webpack5': '8.0.0-alpha.0', - '@storybook/source-loader': '8.0.0-alpha.0', - '@storybook/svelte': '8.0.0-alpha.0', - '@storybook/svelte-vite': '8.0.0-alpha.0', - '@storybook/svelte-webpack5': '8.0.0-alpha.0', - '@storybook/sveltekit': '8.0.0-alpha.0', - '@storybook/telemetry': '8.0.0-alpha.0', - '@storybook/test': '8.0.0-alpha.0', - '@storybook/theming': '8.0.0-alpha.0', - '@storybook/types': '8.0.0-alpha.0', - '@storybook/vue': '8.0.0-alpha.0', - '@storybook/vue-vite': '8.0.0-alpha.0', - '@storybook/vue-webpack5': '8.0.0-alpha.0', - '@storybook/vue3': '8.0.0-alpha.0', - '@storybook/vue3-vite': '8.0.0-alpha.0', - '@storybook/vue3-webpack5': '8.0.0-alpha.0', - '@storybook/web-components': '8.0.0-alpha.0', - '@storybook/web-components-vite': '8.0.0-alpha.0', - '@storybook/web-components-webpack5': '8.0.0-alpha.0', - sb: '8.0.0-alpha.0', - storybook: '8.0.0-alpha.0', + '@storybook/addon-a11y': '8.0.0-alpha.1', + '@storybook/addon-actions': '8.0.0-alpha.1', + '@storybook/addon-backgrounds': '8.0.0-alpha.1', + '@storybook/addon-controls': '8.0.0-alpha.1', + '@storybook/addon-docs': '8.0.0-alpha.1', + '@storybook/addon-essentials': '8.0.0-alpha.1', + '@storybook/addon-highlight': '8.0.0-alpha.1', + '@storybook/addon-interactions': '8.0.0-alpha.1', + '@storybook/addon-jest': '8.0.0-alpha.1', + '@storybook/addon-links': '8.0.0-alpha.1', + '@storybook/addon-mdx-gfm': '8.0.0-alpha.1', + '@storybook/addon-measure': '8.0.0-alpha.1', + '@storybook/addon-outline': '8.0.0-alpha.1', + '@storybook/addon-storysource': '8.0.0-alpha.1', + '@storybook/addon-themes': '8.0.0-alpha.1', + '@storybook/addon-toolbars': '8.0.0-alpha.1', + '@storybook/addon-viewport': '8.0.0-alpha.1', + '@storybook/angular': '8.0.0-alpha.1', + '@storybook/blocks': '8.0.0-alpha.1', + '@storybook/builder-manager': '8.0.0-alpha.1', + '@storybook/builder-vite': '8.0.0-alpha.1', + '@storybook/builder-webpack5': '8.0.0-alpha.1', + '@storybook/channels': '8.0.0-alpha.1', + '@storybook/cli': '8.0.0-alpha.1', + '@storybook/client-logger': '8.0.0-alpha.1', + '@storybook/codemod': '8.0.0-alpha.1', + '@storybook/components': '8.0.0-alpha.1', + '@storybook/core-common': '8.0.0-alpha.1', + '@storybook/core-events': '8.0.0-alpha.1', + '@storybook/core-server': '8.0.0-alpha.1', + '@storybook/core-webpack': '8.0.0-alpha.1', + '@storybook/csf-plugin': '8.0.0-alpha.1', + '@storybook/csf-tools': '8.0.0-alpha.1', + '@storybook/docs-tools': '8.0.0-alpha.1', + '@storybook/ember': '8.0.0-alpha.1', + '@storybook/html': '8.0.0-alpha.1', + '@storybook/html-vite': '8.0.0-alpha.1', + '@storybook/html-webpack5': '8.0.0-alpha.1', + '@storybook/instrumenter': '8.0.0-alpha.1', + '@storybook/manager': '8.0.0-alpha.1', + '@storybook/manager-api': '8.0.0-alpha.1', + '@storybook/nextjs': '8.0.0-alpha.1', + '@storybook/node-logger': '8.0.0-alpha.1', + '@storybook/postinstall': '8.0.0-alpha.1', + '@storybook/preact': '8.0.0-alpha.1', + '@storybook/preact-vite': '8.0.0-alpha.1', + '@storybook/preact-webpack5': '8.0.0-alpha.1', + '@storybook/preset-create-react-app': '8.0.0-alpha.1', + '@storybook/preset-html-webpack': '8.0.0-alpha.1', + '@storybook/preset-preact-webpack': '8.0.0-alpha.1', + '@storybook/preset-react-webpack': '8.0.0-alpha.1', + '@storybook/preset-server-webpack': '8.0.0-alpha.1', + '@storybook/preset-svelte-webpack': '8.0.0-alpha.1', + '@storybook/preset-vue-webpack': '8.0.0-alpha.1', + '@storybook/preset-vue3-webpack': '8.0.0-alpha.1', + '@storybook/preset-web-components-webpack': '8.0.0-alpha.1', + '@storybook/preview': '8.0.0-alpha.1', + '@storybook/preview-api': '8.0.0-alpha.1', + '@storybook/react': '8.0.0-alpha.1', + '@storybook/react-dom-shim': '8.0.0-alpha.1', + '@storybook/react-vite': '8.0.0-alpha.1', + '@storybook/react-webpack5': '8.0.0-alpha.1', + '@storybook/router': '8.0.0-alpha.1', + '@storybook/server': '8.0.0-alpha.1', + '@storybook/server-webpack5': '8.0.0-alpha.1', + '@storybook/source-loader': '8.0.0-alpha.1', + '@storybook/svelte': '8.0.0-alpha.1', + '@storybook/svelte-vite': '8.0.0-alpha.1', + '@storybook/svelte-webpack5': '8.0.0-alpha.1', + '@storybook/sveltekit': '8.0.0-alpha.1', + '@storybook/telemetry': '8.0.0-alpha.1', + '@storybook/test': '8.0.0-alpha.1', + '@storybook/theming': '8.0.0-alpha.1', + '@storybook/types': '8.0.0-alpha.1', + '@storybook/vue': '8.0.0-alpha.1', + '@storybook/vue-vite': '8.0.0-alpha.1', + '@storybook/vue-webpack5': '8.0.0-alpha.1', + '@storybook/vue3': '8.0.0-alpha.1', + '@storybook/vue3-vite': '8.0.0-alpha.1', + '@storybook/vue3-webpack5': '8.0.0-alpha.1', + '@storybook/web-components': '8.0.0-alpha.1', + '@storybook/web-components-vite': '8.0.0-alpha.1', + '@storybook/web-components-webpack5': '8.0.0-alpha.1', + sb: '8.0.0-alpha.1', + storybook: '8.0.0-alpha.1', }; diff --git a/code/lib/client-logger/package.json b/code/lib/client-logger/package.json index 0149f8c50d2e..9fde561e0ab9 100644 --- a/code/lib/client-logger/package.json +++ b/code/lib/client-logger/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/client-logger", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "", "keywords": [ "storybook" diff --git a/code/lib/codemod/package.json b/code/lib/codemod/package.json index 1e7650b6b268..4677a34e1ef5 100644 --- a/code/lib/codemod/package.json +++ b/code/lib/codemod/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/codemod", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "A collection of codemod scripts written with JSCodeshift", "keywords": [ "storybook" diff --git a/code/lib/core-common/package.json b/code/lib/core-common/package.json index a8c60c23d112..35ddc9d2458c 100644 --- a/code/lib/core-common/package.json +++ b/code/lib/core-common/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/core-common", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "Storybook framework-agnostic API", "keywords": [ "storybook" diff --git a/code/lib/core-events/package.json b/code/lib/core-events/package.json index 19ce0a143cee..c1bff012e52e 100644 --- a/code/lib/core-events/package.json +++ b/code/lib/core-events/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/core-events", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "Event names used in storybook core", "keywords": [ "storybook" diff --git a/code/lib/core-server/package.json b/code/lib/core-server/package.json index e84934e895a2..d161a26958b2 100644 --- a/code/lib/core-server/package.json +++ b/code/lib/core-server/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/core-server", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "Storybook framework-agnostic API", "keywords": [ "storybook" diff --git a/code/lib/core-webpack/package.json b/code/lib/core-webpack/package.json index 404d775b3fed..b58811a51ecd 100644 --- a/code/lib/core-webpack/package.json +++ b/code/lib/core-webpack/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/core-webpack", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "Storybook framework-agnostic API", "keywords": [ "storybook" diff --git a/code/lib/csf-plugin/package.json b/code/lib/csf-plugin/package.json index 8bde5a75683c..ee176a9a442a 100644 --- a/code/lib/csf-plugin/package.json +++ b/code/lib/csf-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/csf-plugin", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "Enrich CSF files via static analysis", "keywords": [ "storybook" diff --git a/code/lib/csf-tools/package.json b/code/lib/csf-tools/package.json index b3050fa296a1..d52f7270ed9a 100644 --- a/code/lib/csf-tools/package.json +++ b/code/lib/csf-tools/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/csf-tools", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "Parse and manipulate CSF and Storybook config files", "keywords": [ "storybook" diff --git a/code/lib/docs-tools/package.json b/code/lib/docs-tools/package.json index 085eb467a5c4..439bbb120b73 100644 --- a/code/lib/docs-tools/package.json +++ b/code/lib/docs-tools/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/docs-tools", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "Shared utility functions for frameworks to implement docs", "keywords": [ "storybook" diff --git a/code/lib/instrumenter/package.json b/code/lib/instrumenter/package.json index cc7aee543767..e0beb72fb48e 100644 --- a/code/lib/instrumenter/package.json +++ b/code/lib/instrumenter/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/instrumenter", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "", "keywords": [ "storybook" diff --git a/code/lib/manager-api/package.json b/code/lib/manager-api/package.json index 046f87af3a66..1461e57eed65 100644 --- a/code/lib/manager-api/package.json +++ b/code/lib/manager-api/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/manager-api", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "Core Storybook Manager API & Context", "keywords": [ "storybook" diff --git a/code/lib/manager-api/src/version.ts b/code/lib/manager-api/src/version.ts index f2c13fcb9e17..bac8f4e08f70 100644 --- a/code/lib/manager-api/src/version.ts +++ b/code/lib/manager-api/src/version.ts @@ -1 +1 @@ -export const version = '8.0.0-alpha.0'; +export const version = '8.0.0-alpha.1'; diff --git a/code/lib/node-logger/package.json b/code/lib/node-logger/package.json index f71c910fdff5..16a62e69b776 100644 --- a/code/lib/node-logger/package.json +++ b/code/lib/node-logger/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/node-logger", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "", "keywords": [ "storybook" diff --git a/code/lib/postinstall/package.json b/code/lib/postinstall/package.json index 3a514edb6576..e0627640d2ce 100644 --- a/code/lib/postinstall/package.json +++ b/code/lib/postinstall/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/postinstall", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "Storybook addons postinstall utilities", "keywords": [ "api", diff --git a/code/lib/preview-api/package.json b/code/lib/preview-api/package.json index a99336db8f21..7f576ead8303 100644 --- a/code/lib/preview-api/package.json +++ b/code/lib/preview-api/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preview-api", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "", "keywords": [ "storybook" diff --git a/code/lib/preview/package.json b/code/lib/preview/package.json index b290a2ec2519..924329dd6b27 100644 --- a/code/lib/preview/package.json +++ b/code/lib/preview/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preview", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "", "keywords": [ "storybook" diff --git a/code/lib/react-dom-shim/package.json b/code/lib/react-dom-shim/package.json index d2d4ff246397..70bc04c785f1 100644 --- a/code/lib/react-dom-shim/package.json +++ b/code/lib/react-dom-shim/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/react-dom-shim", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "", "keywords": [ "storybook" diff --git a/code/lib/router/package.json b/code/lib/router/package.json index e72cb0b96af5..776667214af1 100644 --- a/code/lib/router/package.json +++ b/code/lib/router/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/router", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "Core Storybook Router", "keywords": [ "storybook" diff --git a/code/lib/source-loader/package.json b/code/lib/source-loader/package.json index 52ea202ab3ad..ab4281ee9348 100644 --- a/code/lib/source-loader/package.json +++ b/code/lib/source-loader/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/source-loader", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "Source loader", "keywords": [ "lib", diff --git a/code/lib/telemetry/package.json b/code/lib/telemetry/package.json index f281657b67d4..80756d0e06fc 100644 --- a/code/lib/telemetry/package.json +++ b/code/lib/telemetry/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/telemetry", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "Telemetry logging for crash reports and usage statistics", "keywords": [ "storybook" diff --git a/code/lib/test/package.json b/code/lib/test/package.json index 3145c6e6779f..074bfa1ccf2f 100644 --- a/code/lib/test/package.json +++ b/code/lib/test/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/test", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "", "keywords": [ "storybook" diff --git a/code/lib/theming/package.json b/code/lib/theming/package.json index d2b2554e3376..5a9abb1539b9 100644 --- a/code/lib/theming/package.json +++ b/code/lib/theming/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/theming", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "Core Storybook Components", "keywords": [ "storybook" diff --git a/code/lib/types/package.json b/code/lib/types/package.json index 62874f82ea35..6b30591a5b26 100644 --- a/code/lib/types/package.json +++ b/code/lib/types/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/types", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "Core Storybook TS Types", "keywords": [ "storybook" diff --git a/code/package.json b/code/package.json index 2693b812c8b8..94d67d12bc6e 100644 --- a/code/package.json +++ b/code/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/root", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "private": true, "description": "Storybook root", "homepage": "https://storybook.js.org/", @@ -320,6 +320,5 @@ "Dependency Upgrades" ] ] - }, - "deferredNextVersion": "8.0.0-alpha.1" + } } diff --git a/code/presets/create-react-app/package.json b/code/presets/create-react-app/package.json index 901bb13ffece..eb1e3f63ed72 100644 --- a/code/presets/create-react-app/package.json +++ b/code/presets/create-react-app/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preset-create-react-app", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "Storybook for Create React App preset", "keywords": [ "storybook" diff --git a/code/presets/html-webpack/package.json b/code/presets/html-webpack/package.json index d132da4e924b..9d9ab11a7b43 100644 --- a/code/presets/html-webpack/package.json +++ b/code/presets/html-webpack/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preset-html-webpack", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "Storybook for HTML: View HTML snippets in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/presets/preact-webpack/package.json b/code/presets/preact-webpack/package.json index 26d4e1bb4f63..fd0a4d968e01 100644 --- a/code/presets/preact-webpack/package.json +++ b/code/presets/preact-webpack/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preset-preact-webpack", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "Storybook for Preact: Develop Preact Component in isolation.", "keywords": [ "storybook" diff --git a/code/presets/react-webpack/package.json b/code/presets/react-webpack/package.json index cca761efa383..033c4891373d 100644 --- a/code/presets/react-webpack/package.json +++ b/code/presets/react-webpack/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preset-react-webpack", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "Storybook for React: Develop React Component in isolation with Hot Reloading", "keywords": [ "storybook" diff --git a/code/presets/server-webpack/package.json b/code/presets/server-webpack/package.json index 414e03b6f963..0bb8c894456e 100644 --- a/code/presets/server-webpack/package.json +++ b/code/presets/server-webpack/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preset-server-webpack", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "Storybook for Server: View HTML snippets from a server in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/presets/svelte-webpack/package.json b/code/presets/svelte-webpack/package.json index fca64af0725c..9ce7c683098d 100644 --- a/code/presets/svelte-webpack/package.json +++ b/code/presets/svelte-webpack/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preset-svelte-webpack", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "Storybook for Svelte: Develop Svelte Component in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/presets/vue-webpack/package.json b/code/presets/vue-webpack/package.json index 722871e98312..62a5847895fa 100644 --- a/code/presets/vue-webpack/package.json +++ b/code/presets/vue-webpack/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preset-vue-webpack", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "Storybook for Vue: Develop Vue Component in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/presets/vue3-webpack/package.json b/code/presets/vue3-webpack/package.json index 6e33886c3a39..58b91e31f61b 100644 --- a/code/presets/vue3-webpack/package.json +++ b/code/presets/vue3-webpack/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preset-vue3-webpack", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "Storybook for Vue 3: Develop Vue 3 Components in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/presets/web-components-webpack/package.json b/code/presets/web-components-webpack/package.json index b374ce7a1c34..c4ca8e65d35c 100644 --- a/code/presets/web-components-webpack/package.json +++ b/code/presets/web-components-webpack/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preset-web-components-webpack", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "Storybook for web-components: View web components snippets in isolation with Hot Reloading.", "keywords": [ "lit", diff --git a/code/renderers/html/package.json b/code/renderers/html/package.json index 577b70f978b9..154025fb48a4 100644 --- a/code/renderers/html/package.json +++ b/code/renderers/html/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/html", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "Storybook HTML renderer", "keywords": [ "storybook" diff --git a/code/renderers/preact/package.json b/code/renderers/preact/package.json index 5cb860200744..2c3f4128cddf 100644 --- a/code/renderers/preact/package.json +++ b/code/renderers/preact/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preact", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "Storybook Preact renderer", "keywords": [ "storybook" diff --git a/code/renderers/react/package.json b/code/renderers/react/package.json index df84d0b10f48..eabfdbc9281b 100644 --- a/code/renderers/react/package.json +++ b/code/renderers/react/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/react", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "Storybook React renderer", "keywords": [ "storybook" diff --git a/code/renderers/server/package.json b/code/renderers/server/package.json index 641bc4e351d1..458bdba62038 100644 --- a/code/renderers/server/package.json +++ b/code/renderers/server/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/server", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "Storybook Server renderer", "keywords": [ "storybook" diff --git a/code/renderers/svelte/package.json b/code/renderers/svelte/package.json index 74eae303430f..2ddd62ac3ba3 100644 --- a/code/renderers/svelte/package.json +++ b/code/renderers/svelte/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/svelte", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "Storybook Svelte renderer", "keywords": [ "storybook" diff --git a/code/renderers/vue/package.json b/code/renderers/vue/package.json index 62a62528e323..d2fef77f0b41 100644 --- a/code/renderers/vue/package.json +++ b/code/renderers/vue/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/vue", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "Storybook Vue renderer", "keywords": [ "storybook" diff --git a/code/renderers/vue3/package.json b/code/renderers/vue3/package.json index a7c03354755f..c134c4a08413 100644 --- a/code/renderers/vue3/package.json +++ b/code/renderers/vue3/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/vue3", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "Storybook Vue 3 renderer", "keywords": [ "storybook" diff --git a/code/renderers/web-components/package.json b/code/renderers/web-components/package.json index aa621a57895c..6d6586bd17ad 100644 --- a/code/renderers/web-components/package.json +++ b/code/renderers/web-components/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/web-components", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "Storybook web-components renderer", "keywords": [ "lit", diff --git a/code/ui/blocks/package.json b/code/ui/blocks/package.json index 2427d87818ea..8b9bc3a4e6d3 100644 --- a/code/ui/blocks/package.json +++ b/code/ui/blocks/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/blocks", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "Storybook Doc Blocks", "keywords": [ "storybook" diff --git a/code/ui/components/package.json b/code/ui/components/package.json index 2225dc54b572..1b3c547c0a26 100644 --- a/code/ui/components/package.json +++ b/code/ui/components/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/components", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "Core Storybook Components", "keywords": [ "storybook" diff --git a/code/ui/manager/package.json b/code/ui/manager/package.json index dcb68a68dcc2..dc9c1635afb1 100644 --- a/code/ui/manager/package.json +++ b/code/ui/manager/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/manager", - "version": "8.0.0-alpha.0", + "version": "8.0.0-alpha.1", "description": "Core Storybook UI", "keywords": [ "storybook" From 1e933494b7e7167590dd928bfb293403a6e16fcc Mon Sep 17 00:00:00 2001 From: storybook-bot <32066757+storybook-bot@users.noreply.github.com> Date: Thu, 7 Dec 2023 13:48:04 +0000 Subject: [PATCH 124/131] Update CHANGELOG.md for v7.6.4 [skip ci] --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ca7fcf921544..5ba60ca1636f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## 7.6.4 + +- Angular: Fix CSF Plugin - [#25098](https://github.com/storybookjs/storybook/pull/25098), thanks [@valentinpalkovic](https://github.com/valentinpalkovic)! +- Viewport: Fix viewport dts files - [#25107](https://github.com/storybookjs/storybook/pull/25107), thanks [@kasperpeulen](https://github.com/kasperpeulen)! + ## 7.6.3 - Next.js: Fix next/font/local usage in babel mode - [#25045](https://github.com/storybookjs/storybook/pull/25045), thanks [@valentinpalkovic](https://github.com/valentinpalkovic)! From b70226b6244d29e9fcf340710882052c9f4992b1 Mon Sep 17 00:00:00 2001 From: Shaun Lloyd Date: Thu, 7 Dec 2023 11:53:11 -0500 Subject: [PATCH 125/131] Remove unused templates --- code/lib/cli/src/sandbox-templates.ts | 169 -------------------------- 1 file changed, 169 deletions(-) diff --git a/code/lib/cli/src/sandbox-templates.ts b/code/lib/cli/src/sandbox-templates.ts index ddbe71fb5515..8b4d18f2b06c 100644 --- a/code/lib/cli/src/sandbox-templates.ts +++ b/code/lib/cli/src/sandbox-templates.ts @@ -532,156 +532,6 @@ const internalTemplates = { isInternal: true, skipTasks: ['bench'], }, - 'internal/npm/empty/react-vite/default-ts': { - name: 'Empty React + vite (npm)', - script: 'mkdir {{beforeDir}} && cd {{beforeDir}}', - env: { - STORYBOOK_INIT_EMPTY_TYPE: 'react-vite-ts', - }, - expected: { ...baseTemplates['react-vite/default-ts'].expected }, - isInternal: true, - skipTasks: ['bench', 'e2e-tests-dev', 'chromatic'], - }, - 'internal/pnpm/empty/react-vite/default-ts': { - name: 'Empty React + vite (pnpm)', - script: 'mkdir {{beforeDir}} && cd {{beforeDir}}', - env: { - STORYBOOK_INIT_EMPTY_TYPE: 'react-vite-ts', - }, - expected: { ...baseTemplates['react-vite/default-ts'].expected }, - isInternal: true, - skipTasks: ['bench', 'e2e-tests-dev', 'chromatic'], - }, - 'internal/yarn/empty/react-vite/default-ts': { - name: 'Empty React + vite (pnpm)', - script: 'mkdir {{beforeDir}} && cd {{beforeDir}}', - env: { - STORYBOOK_INIT_EMPTY_TYPE: 'react-vite-ts', - }, - expected: { ...baseTemplates['react-vite/default-ts'].expected }, - isInternal: true, - skipTasks: ['bench', 'e2e-tests-dev', 'chromatic'], - }, - 'internal/npm/empty/nextjs/default-ts': { - name: 'Empty Next.js (npm)', - script: 'mkdir {{beforeDir}} && cd {{beforeDir}}', - env: { - STORYBOOK_INIT_EMPTY_TYPE: 'nextjs-ts', - }, - expected: { ...baseTemplates['nextjs/default-ts'].expected }, - isInternal: true, - skipTasks: ['bench', 'e2e-tests-dev', 'chromatic'], - }, - 'internal/pnpm/empty/nextjs/default-ts': { - name: 'Empty Next.js (pnpm)', - script: 'mkdir {{beforeDir}} && cd {{beforeDir}}', - env: { - STORYBOOK_INIT_EMPTY_TYPE: 'nextjs-ts', - }, - expected: { ...baseTemplates['nextjs/default-ts'].expected }, - isInternal: true, - skipTasks: ['bench', 'e2e-tests-dev', 'chromatic'], - }, - 'internal/yarn/empty/nextjs/default-ts': { - name: 'Empty Next.js (pnpm)', - script: 'mkdir {{beforeDir}} && cd {{beforeDir}}', - env: { - STORYBOOK_INIT_EMPTY_TYPE: 'nextjs-ts', - }, - expected: { ...baseTemplates['nextjs/default-ts'].expected }, - isInternal: true, - skipTasks: ['bench', 'e2e-tests-dev', 'chromatic'], - }, - 'internal/npm/empty/vue3-vite/default-ts': { - name: 'Empty Vue 3 + vite (npm)', - script: 'mkdir {{beforeDir}} && cd {{beforeDir}}', - env: { - STORYBOOK_INIT_EMPTY_TYPE: 'vue-vite-ts', - }, - expected: { ...baseTemplates['vue3-vite/default-ts'].expected }, - isInternal: true, - skipTasks: ['bench', 'e2e-tests-dev', 'chromatic'], - }, - 'internal/pnpm/empty/vue3-vite/default-ts': { - name: 'Empty Vue 3 + vite (pnpm)', - script: 'mkdir {{beforeDir}} && cd {{beforeDir}}', - env: { - STORYBOOK_INIT_EMPTY_TYPE: 'vue-vite-ts', - }, - expected: { ...baseTemplates['vue3-vite/default-ts'].expected }, - isInternal: true, - skipTasks: ['bench', 'e2e-tests-dev', 'chromatic'], - }, - 'internal/yarn/empty/vue3-vite/default-ts': { - name: 'Empty Vue 3 + vite (pnpm)', - script: 'mkdir {{beforeDir}} && cd {{beforeDir}}', - env: { - STORYBOOK_INIT_EMPTY_TYPE: 'vue-vite-ts', - }, - expected: { ...baseTemplates['vue3-vite/default-ts'].expected }, - isInternal: true, - skipTasks: ['bench', 'e2e-tests-dev', 'chromatic'], - }, - 'internal/npm/empty/angular-cli/default-ts': { - name: 'Empty Angular (npm)', - script: 'mkdir {{beforeDir}} && cd {{beforeDir}}', - env: { - STORYBOOK_INIT_EMPTY_TYPE: 'angular-cli', - }, - expected: { ...baseTemplates['angular-cli/default-ts'].expected }, - isInternal: true, - skipTasks: ['bench', 'e2e-tests-dev', 'chromatic'], - }, - 'internal/pnpm/empty/angular-cli/default-ts': { - name: 'Empty Angular (pnpm)', - script: 'mkdir {{beforeDir}} && cd {{beforeDir}}', - env: { - STORYBOOK_INIT_EMPTY_TYPE: 'angular-cli', - }, - expected: { ...baseTemplates['angular-cli/default-ts'].expected }, - isInternal: true, - skipTasks: ['bench', 'e2e-tests-dev', 'chromatic'], - }, - 'internal/yarn/empty/angular-cli/default-ts': { - name: 'Empty Angular (pnpm)', - script: 'mkdir {{beforeDir}} && cd {{beforeDir}}', - env: { - STORYBOOK_INIT_EMPTY_TYPE: 'angular-cli', - }, - expected: { ...baseTemplates['angular-cli/default-ts'].expected }, - isInternal: true, - skipTasks: ['bench', 'e2e-tests-dev', 'chromatic'], - }, - 'internal/npm/empty/lit-vite/default-ts': { - name: 'Empty Lit + vite (npm)', - script: 'mkdir {{beforeDir}} && cd {{beforeDir}}', - env: { - STORYBOOK_INIT_EMPTY_TYPE: 'lit-vite-ts', - }, - expected: { ...baseTemplates['lit-vite/default-ts'].expected }, - isInternal: true, - skipTasks: ['bench', 'e2e-tests-dev', 'chromatic'], - }, - 'internal/pnpm/empty/lit-vite/default-ts': { - name: 'Empty Lit + vite (pnpm)', - script: 'mkdir {{beforeDir}} && cd {{beforeDir}}', - env: { - STORYBOOK_INIT_EMPTY_TYPE: 'lit-vite-ts', - }, - expected: { ...baseTemplates['lit-vite/default-ts'].expected }, - isInternal: true, - skipTasks: ['bench', 'e2e-tests-dev', 'chromatic'], - }, - 'internal/yarn/empty/lit-vite/default-ts': { - name: 'Empty Lit + vite (pnpm)', - script: 'mkdir {{beforeDir}} && cd {{beforeDir}}', - env: { - STORYBOOK_INIT_EMPTY_TYPE: 'lit-vite-ts', - }, - expected: { ...baseTemplates['lit-vite/default-ts'].expected }, - isInternal: true, - skipTasks: ['bench', 'e2e-tests-dev', 'chromatic'], - }, // 'internal/pnp': { // ...baseTemplates['cra/default-ts'], // name: 'PNP (cra/default-ts)', @@ -776,25 +626,6 @@ export const merged: TemplateKey[] = [ 'html-vite/default-ts', ]; -// For if we want to use empty sandboxes to test empty init -// const emptyTemplateKeys: TemplateKey[] = [ -// 'internal/npm/empty/react-vite/default-ts', -// 'internal/pnpm/empty/react-vite/default-ts', -// 'internal/yarn/empty/react-vite/default-ts', -// 'internal/npm/empty/nextjs/default-ts', -// 'internal/pnpm/empty/nextjs/default-ts', -// 'internal/yarn/empty/nextjs/default-ts', -// 'internal/npm/empty/vue3-vite/default-ts', -// 'internal/pnpm/empty/vue3-vite/default-ts', -// 'internal/yarn/empty/vue3-vite/default-ts', -// 'internal/npm/empty/angular-cli/default-ts', -// 'internal/pnpm/empty/angular-cli/default-ts', -// 'internal/yarn/empty/angular-cli/default-ts', -// 'internal/npm/empty/lit-vite/default-ts', -// 'internal/pnpm/empty/lit-vite/default-ts', -// 'internal/yarn/empty/lit-vite/default-ts', -// ]; - export const daily: TemplateKey[] = [ ...merged, 'angular-cli/prerelease', From 0a46302360a349be8a1da3aafe7ef91162dcddbb Mon Sep 17 00:00:00 2001 From: Shaun Lloyd Date: Thu, 7 Dec 2023 14:00:23 -0500 Subject: [PATCH 126/131] Move inferPackageManager into JsPackageManager --- code/lib/cli/src/helpers.test.ts | 35 ----------- code/lib/cli/src/helpers.ts | 26 -------- code/lib/cli/src/initiate.ts | 4 +- .../JsPackageManagerFactory.test.ts | 49 ++++++++++----- .../JsPackageManagerFactory.ts | 61 ++++++++++++++++--- 5 files changed, 88 insertions(+), 87 deletions(-) diff --git a/code/lib/cli/src/helpers.test.ts b/code/lib/cli/src/helpers.test.ts index ae10b4d115fc..c15ae604a1a9 100644 --- a/code/lib/cli/src/helpers.test.ts +++ b/code/lib/cli/src/helpers.test.ts @@ -177,39 +177,4 @@ describe('Helpers', () => { }).toThrowError(`Could not coerce ${invalidSemverString} into a semver.`); }); }); - describe('inferPackageManagerFromUserAgent', () => { - afterEach(() => { - delete process.env.npm_config_user_agent; - }); - - it('should return npm for invalid user agent', () => { - process.env.npm_config_user_agent = ''; - expect(helpers.inferPackageManagerFromUserAgent()).toBe('npm'); - }); - - it('should infer pnpm from user agent', () => { - process.env.npm_config_user_agent = 'pnpm/7.4.0'; - expect(helpers.inferPackageManagerFromUserAgent()).toBe('pnpm'); - }); - - it('should infer npm from user agent', () => { - process.env.npm_config_user_agent = 'npm/7.24.0'; - expect(helpers.inferPackageManagerFromUserAgent()).toBe('npm'); - }); - - it('should infer yarn 1 from user agent', () => { - process.env.npm_config_user_agent = 'yarn/1.22.11'; - expect(helpers.inferPackageManagerFromUserAgent()).toBe('yarn1'); - }); - - it('should infer yarn 2 from user agent', () => { - process.env.npm_config_user_agent = 'yarn/2.4.0'; - expect(helpers.inferPackageManagerFromUserAgent()).toBe('yarn2'); - }); - - it('should return npm for unknown package manager', () => { - process.env.npm_config_user_agent = 'unknown'; - expect(helpers.inferPackageManagerFromUserAgent()).toBe('npm'); - }); - }); }); diff --git a/code/lib/cli/src/helpers.ts b/code/lib/cli/src/helpers.ts index edf2eb7ea4d0..d322732aea9a 100644 --- a/code/lib/cli/src/helpers.ts +++ b/code/lib/cli/src/helpers.ts @@ -315,29 +315,3 @@ export function coerceSemver(version: string) { invariant(coercedSemver != null, `Could not coerce ${version} into a semver.`); return coercedSemver; } - -/** - * Infer the package manager based on the command the user is running. - * Each package manager sets the `npm_config_user_agent` environment variable with its name and version e.g. "npm/7.24.0" - * Which is really useful when invoking commands via npx/pnpx/yarn create/etc. - */ -export function inferPackageManagerFromUserAgent(): PackageManagerName { - const userAgent = process.env.npm_config_user_agent; - if (!userAgent) return 'npm'; - const packageSpec = userAgent.split(' ')[0]; - const [pkgMgrName, pkgMgrVersion] = packageSpec.split('/'); - - if (pkgMgrName === 'pnpm') { - return 'pnpm'; - } - - if (pkgMgrName === 'npm') { - return 'npm'; - } - - if (pkgMgrName === 'yarn') { - return `yarn${pkgMgrVersion?.startsWith('1.') ? '1' : '2'}`; - } - - return 'npm'; -} diff --git a/code/lib/cli/src/initiate.ts b/code/lib/cli/src/initiate.ts index ab0673d78357..b566b33dc595 100644 --- a/code/lib/cli/src/initiate.ts +++ b/code/lib/cli/src/initiate.ts @@ -11,7 +11,7 @@ import boxen from 'boxen'; import type { Builder } from './project_types'; import { installableProjectTypes, ProjectType } from './project_types'; import { detect, isStorybookInstantiated, detectLanguage, detectPnp } from './detect'; -import { commandLog, codeLog, paddedLog, inferPackageManagerFromUserAgent } from './helpers'; +import { commandLog, codeLog, paddedLog } from './helpers'; import angularGenerator from './generators/ANGULAR'; import emberGenerator from './generators/EMBER'; import reactGenerator from './generators/REACT'; @@ -255,7 +255,7 @@ async function doInitiate( } const packageManager = JsPackageManagerFactory.getPackageManager({ - force: pkgMgr || inferPackageManagerFromUserAgent(), + force: pkgMgr, }); const welcomeMessage = 'storybook init - the simplest way to add a Storybook to your project.'; diff --git a/code/lib/cli/src/js-package-manager/JsPackageManagerFactory.test.ts b/code/lib/cli/src/js-package-manager/JsPackageManagerFactory.test.ts index 4567987488ef..7e12ac20de6b 100644 --- a/code/lib/cli/src/js-package-manager/JsPackageManagerFactory.test.ts +++ b/code/lib/cli/src/js-package-manager/JsPackageManagerFactory.test.ts @@ -13,20 +13,26 @@ const spawnSyncMock = spawnSync as jest.Mock; jest.mock('find-up'); const findUpSyncMock = findUpSync as unknown as jest.Mock; -describe('JsPackageManagerFactory', () => { +describe('CLASS: JsPackageManagerFactory', () => { beforeEach(() => { findUpSyncMock.mockReturnValue(undefined); + delete process.env.npm_config_user_agent; }); - describe('getPackageManager', () => { - describe('return an NPM proxy', () => { - it('when `force` option is `npm`', () => { + describe('METHOD: getPackageManager', () => { + describe('NPM proxy', () => { + it('FORCE: it should return a NPM proxy when `force` option is `npm`', () => { expect(JsPackageManagerFactory.getPackageManager({ force: 'npm' })).toBeInstanceOf( NPMProxy ); }); - it('when all package managers are ok, but only a `package-lock.json` file', () => { + it('USER AGENT: it should infer npm from the user agent', () => { + process.env.npm_config_user_agent = 'npm/7.24.0'; + expect(JsPackageManagerFactory.getPackageManager()).toBeInstanceOf(NPMProxy); + }); + + it('ALL EXIST: when all package managers are ok, but only a `package-lock.json` file is found', () => { spawnSyncMock.mockImplementation((command) => { // Yarn is ok if (command === 'yarn') { @@ -62,14 +68,19 @@ describe('JsPackageManagerFactory', () => { }); }); - describe('return a PNPM proxy', () => { - it('when `force` option is `pnpm`', () => { + describe('PNPM proxy', () => { + it('FORCE: it should return a PNPM proxy when `force` option is `pnpm`', () => { expect(JsPackageManagerFactory.getPackageManager({ force: 'pnpm' })).toBeInstanceOf( PNPMProxy ); }); - it('when all package managers are ok, but only a `pnpm-lock.yaml` file', () => { + it('USER AGENT: it should infer pnpm from the user agent', () => { + process.env.npm_config_user_agent = 'pnpm/7.4.0'; + expect(JsPackageManagerFactory.getPackageManager()).toBeInstanceOf(PNPMProxy); + }); + + it('ALL EXIST: when all package managers are ok, but only a `pnpm-lock.yaml` file is found', () => { spawnSyncMock.mockImplementation((command) => { // Yarn is ok if (command === 'yarn') { @@ -104,7 +115,7 @@ describe('JsPackageManagerFactory', () => { expect(JsPackageManagerFactory.getPackageManager()).toBeInstanceOf(PNPMProxy); }); - it('when a pnpm-lock.yaml file is closer than a yarn.lock', () => { + it('PNPM LOCK IF CLOSER: when a pnpm-lock.yaml file is closer than a yarn.lock', () => { // Allow find-up to work as normal, we'll set the cwd to our fixture package findUpSyncMock.mockImplementation(jest.requireActual('find-up').sync); @@ -140,13 +151,18 @@ describe('JsPackageManagerFactory', () => { }); }); - describe('return a Yarn 1 proxy', () => { - it('when `force` option is `yarn1`', () => { + describe('Yarn 1 proxy', () => { + it('FORCE: it should return a Yarn1 proxy when `force` option is `yarn1`', () => { expect(JsPackageManagerFactory.getPackageManager({ force: 'yarn1' })).toBeInstanceOf( Yarn1Proxy ); }); + it('USER AGENT: it should infer yarn1 from the user agent', () => { + process.env.npm_config_user_agent = 'yarn/1.22.11'; + expect(JsPackageManagerFactory.getPackageManager()).toBeInstanceOf(Yarn1Proxy); + }); + it('when Yarn command is ok, Yarn version is <2, NPM is ko, PNPM is ko', () => { spawnSyncMock.mockImplementation((command) => { // Yarn is ok @@ -251,14 +267,19 @@ describe('JsPackageManagerFactory', () => { }); }); - describe('return a Yarn 2 proxy', () => { - it('when `force` option is `yarn2`', () => { + describe('Yarn 2 proxy', () => { + it('FORCE: it should return a Yarn2 proxy when `force` option is `yarn2`', () => { expect(JsPackageManagerFactory.getPackageManager({ force: 'yarn2' })).toBeInstanceOf( Yarn2Proxy ); }); - it('when Yarn command is ok, Yarn version is >=2, NPM is ko, PNPM is ko', () => { + it('USER AGENT: it should infer yarn2 from the user agent', () => { + process.env.npm_config_user_agent = 'yarn/2.2.10'; + expect(JsPackageManagerFactory.getPackageManager()).toBeInstanceOf(Yarn2Proxy); + }); + + it('ONLY YARN 2: when Yarn command is ok, Yarn version is >=2, NPM is ko, PNPM is ko', () => { spawnSyncMock.mockImplementation((command) => { // Yarn is ok if (command === 'yarn') { diff --git a/code/lib/cli/src/js-package-manager/JsPackageManagerFactory.ts b/code/lib/cli/src/js-package-manager/JsPackageManagerFactory.ts index 77986fd0c038..f725932fed69 100644 --- a/code/lib/cli/src/js-package-manager/JsPackageManagerFactory.ts +++ b/code/lib/cli/src/js-package-manager/JsPackageManagerFactory.ts @@ -14,24 +14,29 @@ const NPM_LOCKFILE = 'package-lock.json'; const PNPM_LOCKFILE = 'pnpm-lock.yaml'; const YARN_LOCKFILE = 'yarn.lock'; +type PackageManagerProxy = + | typeof NPMProxy + | typeof PNPMProxy + | typeof Yarn1Proxy + | typeof Yarn2Proxy; + export class JsPackageManagerFactory { public static getPackageManager( { force }: { force?: PackageManagerName } = {}, cwd?: string ): JsPackageManager { - if (force === 'npm') { - return new NPMProxy({ cwd }); - } - if (force === 'pnpm') { - return new PNPMProxy({ cwd }); + // Option 1: If the user has provided a forcing flag, we use it + if (force && force in this.PROXY_MAP) { + return new this.PROXY_MAP[force]({ cwd }); } - if (force === 'yarn1') { - return new Yarn1Proxy({ cwd }); - } - if (force === 'yarn2') { - return new Yarn2Proxy({ cwd }); + + // Option 2: If the user is running a command via npx/pnpx/yarn create/etc, we infer the package manager from the command + const inferredPackageManager = this.inferPackageManagerFromUserAgent(); + if (inferredPackageManager && inferredPackageManager in this.PROXY_MAP) { + return new this.PROXY_MAP[inferredPackageManager]({ cwd }); } + // Option 3: We try to infer the package manager from the closest lockfile const yarnVersion = getYarnVersion(cwd); const closestLockfilePath = findUpSync([YARN_LOCKFILE, PNPM_LOCKFILE, NPM_LOCKFILE], { @@ -56,6 +61,42 @@ export class JsPackageManagerFactory { throw new Error('Unable to find a usable package manager within NPM, PNPM, Yarn and Yarn 2'); } + + /** + * Look up map of package manager proxies by name + */ + private static PROXY_MAP: Record = { + npm: NPMProxy, + pnpm: PNPMProxy, + yarn1: Yarn1Proxy, + yarn2: Yarn2Proxy, + }; + + /** + * Infer the package manager based on the command the user is running. + * Each package manager sets the `npm_config_user_agent` environment variable with its name and version e.g. "npm/7.24.0" + * Which is really useful when invoking commands via npx/pnpx/yarn create/etc. + */ + private static inferPackageManagerFromUserAgent(): PackageManagerName | undefined { + const userAgent = process.env.npm_config_user_agent; + if (!userAgent) return 'npm'; + const packageSpec = userAgent.split(' ')[0]; + const [pkgMgrName, pkgMgrVersion] = packageSpec.split('/'); + + if (pkgMgrName === 'pnpm') { + return 'pnpm'; + } + + if (pkgMgrName === 'npm') { + return 'npm'; + } + + if (pkgMgrName === 'yarn') { + return `yarn${pkgMgrVersion?.startsWith('1.') ? '1' : '2'}`; + } + + return undefined; + } } function hasNPM(cwd?: string) { From f8bf4efa515289cb968e3eafa5725d73b585aece Mon Sep 17 00:00:00 2001 From: Shaun Lloyd Date: Thu, 7 Dec 2023 14:09:11 -0500 Subject: [PATCH 127/131] Fix packageManager inference --- .../JsPackageManagerFactory.ts | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/code/lib/cli/src/js-package-manager/JsPackageManagerFactory.ts b/code/lib/cli/src/js-package-manager/JsPackageManagerFactory.ts index f725932fed69..b6a6ea297956 100644 --- a/code/lib/cli/src/js-package-manager/JsPackageManagerFactory.ts +++ b/code/lib/cli/src/js-package-manager/JsPackageManagerFactory.ts @@ -79,20 +79,21 @@ export class JsPackageManagerFactory { */ private static inferPackageManagerFromUserAgent(): PackageManagerName | undefined { const userAgent = process.env.npm_config_user_agent; - if (!userAgent) return 'npm'; - const packageSpec = userAgent.split(' ')[0]; - const [pkgMgrName, pkgMgrVersion] = packageSpec.split('/'); + if (userAgent) { + const packageSpec = userAgent.split(' ')[0]; + const [pkgMgrName, pkgMgrVersion] = packageSpec.split('/'); - if (pkgMgrName === 'pnpm') { - return 'pnpm'; - } + if (pkgMgrName === 'pnpm') { + return 'pnpm'; + } - if (pkgMgrName === 'npm') { - return 'npm'; - } + if (pkgMgrName === 'npm') { + return 'npm'; + } - if (pkgMgrName === 'yarn') { - return `yarn${pkgMgrVersion?.startsWith('1.') ? '1' : '2'}`; + if (pkgMgrName === 'yarn') { + return `yarn${pkgMgrVersion?.startsWith('1.') ? '1' : '2'}`; + } } return undefined; From cedc6fb6dc4caec000364fbb02d6381a89a6d1d1 Mon Sep 17 00:00:00 2001 From: Shaun Lloyd Date: Thu, 7 Dec 2023 14:28:49 -0500 Subject: [PATCH 128/131] Remove unused imports --- code/lib/cli/src/helpers.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/code/lib/cli/src/helpers.ts b/code/lib/cli/src/helpers.ts index d322732aea9a..605fab2d1849 100644 --- a/code/lib/cli/src/helpers.ts +++ b/code/lib/cli/src/helpers.ts @@ -13,7 +13,6 @@ import type { JsPackageManager, PackageJson, PackageJsonWithDepsAndDevDeps, - PackageManagerName, } from './js-package-manager'; import type { SupportedFrameworks, SupportedRenderers } from './project_types'; import { SupportedLanguage } from './project_types'; From 026340d0881881538696d7579151d9fe95946e09 Mon Sep 17 00:00:00 2001 From: Michael Shilman Date: Fri, 8 Dec 2023 10:58:43 +0800 Subject: [PATCH 129/131] Remove unused preset-vue-webpack --- code/package.json | 1 - code/presets/vue-webpack/README.md | 6 - code/presets/vue-webpack/package.json | 100 ---------- code/presets/vue-webpack/preset.js | 1 - code/presets/vue-webpack/project.json | 6 - .../src/framework-preset-vue-docs.ts | 33 ---- .../vue-webpack/src/framework-preset-vue.ts | 49 ----- code/presets/vue-webpack/src/index.ts | 8 - code/presets/vue-webpack/src/types.ts | 1 - code/presets/vue-webpack/src/typings.d.ts | 1 - code/presets/vue-webpack/tsconfig.json | 9 - code/yarn.lock | 172 +----------------- .../get-started/installation-problems/vue.mdx | 2 - test-storybooks/ember-cli/package.json | 2 - test-storybooks/external-docs/package.json | 4 +- .../server-kitchen-sink/package.json | 2 - .../standalone-preview/package.json | 2 - 17 files changed, 10 insertions(+), 389 deletions(-) delete mode 100644 code/presets/vue-webpack/README.md delete mode 100644 code/presets/vue-webpack/package.json delete mode 100644 code/presets/vue-webpack/preset.js delete mode 100644 code/presets/vue-webpack/project.json delete mode 100644 code/presets/vue-webpack/src/framework-preset-vue-docs.ts delete mode 100644 code/presets/vue-webpack/src/framework-preset-vue.ts delete mode 100644 code/presets/vue-webpack/src/index.ts delete mode 100644 code/presets/vue-webpack/src/types.ts delete mode 100644 code/presets/vue-webpack/src/typings.d.ts delete mode 100644 code/presets/vue-webpack/tsconfig.json diff --git a/code/package.json b/code/package.json index ed73b890ed7e..e56a2562a9c6 100644 --- a/code/package.json +++ b/code/package.json @@ -159,7 +159,6 @@ "@storybook/preset-react-webpack": "workspace:*", "@storybook/preset-server-webpack": "workspace:*", "@storybook/preset-svelte-webpack": "workspace:*", - "@storybook/preset-vue-webpack": "workspace:*", "@storybook/preset-vue3-webpack": "workspace:*", "@storybook/preset-web-components-webpack": "workspace:*", "@storybook/preview": "workspace:*", diff --git a/code/presets/vue-webpack/README.md b/code/presets/vue-webpack/README.md deleted file mode 100644 index 1e301b010570..000000000000 --- a/code/presets/vue-webpack/README.md +++ /dev/null @@ -1,6 +0,0 @@ -# Storybook Webpack preset for Vue - -This package is a [preset](https://storybook.js.org/docs/vue/addons/writing-presets#presets-api) that configures Storybook's webpack settings for handling Vue. -It's an internal package that's not intended to be used directly by users. - -- More info on [Storybook for Vue](https://storybook.js.org/docs/vue/get-started) diff --git a/code/presets/vue-webpack/package.json b/code/presets/vue-webpack/package.json deleted file mode 100644 index 62a5847895fa..000000000000 --- a/code/presets/vue-webpack/package.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "name": "@storybook/preset-vue-webpack", - "version": "8.0.0-alpha.1", - "description": "Storybook for Vue: Develop Vue Component in isolation with Hot Reloading.", - "keywords": [ - "storybook" - ], - "homepage": "https://github.com/storybookjs/storybook/tree/next/code/presets/vue-webpack", - "bugs": { - "url": "https://github.com/storybookjs/storybook/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/storybookjs/storybook.git", - "directory": "code/presets/vue-webpack" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/storybook" - }, - "license": "MIT", - "exports": { - ".": { - "types": "./dist/index.d.ts", - "node": "./dist/index.js", - "require": "./dist/index.js", - "import": "./dist/index.mjs" - }, - "./preset": { - "types": "./dist/index.d.ts", - "node": "./dist/index.js", - "require": "./dist/index.js", - "import": "./dist/index.mjs" - }, - "./dist/framework-preset-vue-docs": { - "types": "./dist/framework-preset-vue-docs.d.ts", - "require": "./dist/framework-preset-vue-docs.js", - "import": "./dist/framework-preset-vue-docs.mjs" - }, - "./dist/framework-preset-vue": { - "types": "./dist/framework-preset-vue.d.ts", - "require": "./dist/framework-preset-vue.js", - "import": "./dist/framework-preset-vue.mjs" - }, - "./package.json": "./package.json" - }, - "main": "dist/index.js", - "module": "dist/index.mjs", - "types": "dist/index.d.ts", - "files": [ - "dist/**/*", - "README.md", - "*.js", - "*.d.ts", - "!src/**/*" - ], - "scripts": { - "check": "node --loader ../../../scripts/node_modules/esbuild-register/loader.js -r ../../../scripts/node_modules/esbuild-register/register.js ../../../scripts/prepare/check.ts", - "prep": "node --loader ../../../scripts/node_modules/esbuild-register/loader.js -r ../../../scripts/node_modules/esbuild-register/register.js ../../../scripts/prepare/bundle.ts" - }, - "dependencies": { - "@storybook/core-webpack": "workspace:*", - "@storybook/docs-tools": "workspace:*", - "@types/node": "^18.0.0", - "ts-loader": "^9.2.8", - "vue-docgen-api": "^4.44.23", - "vue-docgen-loader": "^1.5.1", - "webpack": "5" - }, - "devDependencies": { - "typescript": "^5.3.2", - "vue": "^2.6.12", - "vue-loader": "^15.7.0", - "vue-template-compiler": "^2.6.14", - "webpack": "5" - }, - "peerDependencies": { - "@babel/core": "*", - "babel-loader": "^7.0.0 || ^8.0.0 || ^9.0.0", - "css-loader": "*", - "vue": "^2.6.8", - "vue-loader": "^15.7.0", - "vue-template-compiler": "^2.6.14" - }, - "engines": { - "node": ">=16.0.0" - }, - "publishConfig": { - "access": "public" - }, - "bundler": { - "entries": [ - "./src/index.ts", - "./src/framework-preset-vue-docs.ts", - "./src/framework-preset-vue.ts" - ], - "platform": "node" - }, - "gitHead": "e6a7fd8a655c69780bc20b9749c2699e44beae17" -} diff --git a/code/presets/vue-webpack/preset.js b/code/presets/vue-webpack/preset.js deleted file mode 100644 index f4f0e998846b..000000000000 --- a/code/presets/vue-webpack/preset.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./dist/index'); diff --git a/code/presets/vue-webpack/project.json b/code/presets/vue-webpack/project.json deleted file mode 100644 index 79087a17eb73..000000000000 --- a/code/presets/vue-webpack/project.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "@storybook/preset-vue-webpack", - "$schema": "../../node_modules/nx/schemas/project-schema.json", - "implicitDependencies": [], - "type": "library" -} diff --git a/code/presets/vue-webpack/src/framework-preset-vue-docs.ts b/code/presets/vue-webpack/src/framework-preset-vue-docs.ts deleted file mode 100644 index bd4dc600add5..000000000000 --- a/code/presets/vue-webpack/src/framework-preset-vue-docs.ts +++ /dev/null @@ -1,33 +0,0 @@ -import type { StorybookConfig } from '@storybook/core-webpack'; -import { hasDocsOrControls } from '@storybook/docs-tools'; - -export const webpackFinal: StorybookConfig['webpackFinal'] = (config, options) => { - if (!hasDocsOrControls(options)) return config; - - let vueDocgenOptions = {}; - - options.presetsList?.forEach((preset) => { - if (preset.name.includes('addon-docs') && preset.options.vueDocgenOptions) { - const appendableOptions = preset.options.vueDocgenOptions; - vueDocgenOptions = { - ...vueDocgenOptions, - ...appendableOptions, - }; - } - }); - - config.module?.rules?.push({ - test: /\.vue$/, - loader: require.resolve('vue-docgen-loader', { - paths: [require.resolve('@storybook/preset-vue-webpack')], - }), - enforce: 'post', - options: { - docgenOptions: { - alias: config.resolve?.alias, - ...vueDocgenOptions, - }, - }, - }); - return config; -}; diff --git a/code/presets/vue-webpack/src/framework-preset-vue.ts b/code/presets/vue-webpack/src/framework-preset-vue.ts deleted file mode 100644 index 6938d4ab5217..000000000000 --- a/code/presets/vue-webpack/src/framework-preset-vue.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* eslint-disable no-param-reassign */ -import { VueLoaderPlugin } from 'vue-loader'; - -import type { StorybookConfig } from '@storybook/core-webpack'; - -export const webpack: StorybookConfig['webpack'] = async (config, { presets }) => { - const typescriptOptions = await presets.apply('typescript', {}); - - config.plugins?.push(new VueLoaderPlugin()); - config.module?.rules?.push({ - test: /\.vue$/, - loader: require.resolve('vue-loader'), - options: {}, - }); - config.module?.rules?.push({ - test: /\.ts$/, - use: [ - { - loader: require.resolve('ts-loader'), - options: { - transpileOnly: !typescriptOptions?.check, - appendTsSuffixTo: [/\.vue$/], - }, - }, - ], - }); - config.module?.rules?.push({ - test: /\.tsx$/, - use: [ - { - loader: require.resolve('ts-loader'), - options: { - transpileOnly: true, - appendTsxSuffixTo: [/\.vue$/], - }, - }, - ], - }); - - if (config.resolve) { - config.resolve.extensions?.push('.vue'); - config.resolve.alias = { - ...config.resolve.alias, - vue$: require.resolve('vue/dist/vue.esm.js'), - }; - } - - return config; -}; diff --git a/code/presets/vue-webpack/src/index.ts b/code/presets/vue-webpack/src/index.ts deleted file mode 100644 index 71b23495a8b2..000000000000 --- a/code/presets/vue-webpack/src/index.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { PresetProperty } from '@storybook/types'; - -export * from './types'; - -export const addons: PresetProperty<'addons'> = [ - require.resolve('@storybook/preset-vue-webpack/dist/framework-preset-vue'), - require.resolve('@storybook/preset-vue-webpack/dist/framework-preset-vue-docs'), -]; diff --git a/code/presets/vue-webpack/src/types.ts b/code/presets/vue-webpack/src/types.ts deleted file mode 100644 index 7b5a8352a9e1..000000000000 --- a/code/presets/vue-webpack/src/types.ts +++ /dev/null @@ -1 +0,0 @@ -export type { BuilderResult, TypescriptOptions, StorybookConfig } from '@storybook/core-webpack'; diff --git a/code/presets/vue-webpack/src/typings.d.ts b/code/presets/vue-webpack/src/typings.d.ts deleted file mode 100644 index 1cb13ccbdae2..000000000000 --- a/code/presets/vue-webpack/src/typings.d.ts +++ /dev/null @@ -1 +0,0 @@ -declare module 'vue-loader'; diff --git a/code/presets/vue-webpack/tsconfig.json b/code/presets/vue-webpack/tsconfig.json deleted file mode 100644 index 55e078e431f6..000000000000 --- a/code/presets/vue-webpack/tsconfig.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "skipLibCheck": true, - "resolveJsonModule": true, - "strict": true - }, - "include": ["src/**/*"] -} diff --git a/code/yarn.lock b/code/yarn.lock index b16fc190b6f4..b20f98adbe2a 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -690,7 +690,7 @@ __metadata: languageName: node linkType: hard -"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.11.5, @babel/parser@npm:^7.13.16, @babel/parser@npm:^7.14.7, @babel/parser@npm:^7.18.4, @babel/parser@npm:^7.20.7, @babel/parser@npm:^7.21.4, @babel/parser@npm:^7.22.15, @babel/parser@npm:^7.23.0, @babel/parser@npm:^7.23.3, @babel/parser@npm:^7.23.5, @babel/parser@npm:^7.4.5, @babel/parser@npm:^7.6.0, @babel/parser@npm:^7.7.0, @babel/parser@npm:^7.9.6": +"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.11.5, @babel/parser@npm:^7.13.16, @babel/parser@npm:^7.14.7, @babel/parser@npm:^7.20.7, @babel/parser@npm:^7.21.4, @babel/parser@npm:^7.22.15, @babel/parser@npm:^7.23.0, @babel/parser@npm:^7.23.3, @babel/parser@npm:^7.23.5, @babel/parser@npm:^7.4.5, @babel/parser@npm:^7.6.0, @babel/parser@npm:^7.7.0, @babel/parser@npm:^7.9.6": version: 7.23.5 resolution: "@babel/parser@npm:7.23.5" bin: @@ -6205,31 +6205,6 @@ __metadata: languageName: unknown linkType: soft -"@storybook/preset-vue-webpack@workspace:*, @storybook/preset-vue-webpack@workspace:presets/vue-webpack": - version: 0.0.0-use.local - resolution: "@storybook/preset-vue-webpack@workspace:presets/vue-webpack" - dependencies: - "@storybook/core-webpack": "workspace:*" - "@storybook/docs-tools": "workspace:*" - "@types/node": "npm:^18.0.0" - ts-loader: "npm:^9.2.8" - typescript: "npm:^5.3.2" - vue: "npm:^2.6.12" - vue-docgen-api: "npm:^4.44.23" - vue-docgen-loader: "npm:^1.5.1" - vue-loader: "npm:^15.7.0" - vue-template-compiler: "npm:^2.6.14" - webpack: "npm:5" - peerDependencies: - "@babel/core": "*" - babel-loader: ^7.0.0 || ^8.0.0 || ^9.0.0 - css-loader: "*" - vue: ^2.6.8 - vue-loader: ^15.7.0 - vue-template-compiler: ^2.6.14 - languageName: unknown - linkType: soft - "@storybook/preset-vue3-webpack@workspace:*, @storybook/preset-vue3-webpack@workspace:presets/vue3-webpack": version: 0.0.0-use.local resolution: "@storybook/preset-vue3-webpack@workspace:presets/vue3-webpack" @@ -6496,7 +6471,6 @@ __metadata: "@storybook/preset-react-webpack": "workspace:*" "@storybook/preset-server-webpack": "workspace:*" "@storybook/preset-svelte-webpack": "workspace:*" - "@storybook/preset-vue-webpack": "workspace:*" "@storybook/preset-vue3-webpack": "workspace:*" "@storybook/preset-web-components-webpack": "workspace:*" "@storybook/preview": "workspace:*" @@ -8880,17 +8854,6 @@ __metadata: languageName: node linkType: hard -"@vue/compiler-sfc@npm:2.7.15": - version: 2.7.15 - resolution: "@vue/compiler-sfc@npm:2.7.15" - dependencies: - "@babel/parser": "npm:^7.18.4" - postcss: "npm:^8.4.14" - source-map: "npm:^0.6.1" - checksum: d5dc7667bea091702657cd9263371d407d708ab0a571da01ebff5870b7800ac709678285c7dc86ae23a0757ff8a5de13dceffc063687be6a7700f58519bd5f57 - languageName: node - linkType: hard - "@vue/compiler-sfc@npm:3.0.0": version: 3.0.0 resolution: "@vue/compiler-sfc@npm:3.0.0" @@ -8955,26 +8918,6 @@ __metadata: languageName: node linkType: hard -"@vue/component-compiler-utils@npm:^3.1.0": - version: 3.3.0 - resolution: "@vue/component-compiler-utils@npm:3.3.0" - dependencies: - consolidate: "npm:^0.15.1" - hash-sum: "npm:^1.0.2" - lru-cache: "npm:^4.1.2" - merge-source-map: "npm:^1.1.0" - postcss: "npm:^7.0.36" - postcss-selector-parser: "npm:^6.0.2" - prettier: "npm:^1.18.2 || ^2.0.0" - source-map: "npm:~0.6.1" - vue-template-es2015-compiler: "npm:^1.9.0" - dependenciesMeta: - prettier: - optional: true - checksum: ab471a561c29a307b92d019be9f0404157d7bec4ac5040bffea918db4fadc784765a52d9621bef9330a108eb123d1bcb4c276bf1c53fd6f4ac022739b3b80cbe - languageName: node - linkType: hard - "@vue/language-core@npm:1.8.24": version: 1.8.24 resolution: "@vue/language-core@npm:1.8.24" @@ -10628,7 +10571,7 @@ __metadata: languageName: node linkType: hard -"bluebird@npm:^3.1.1, bluebird@npm:^3.7.2": +"bluebird@npm:^3.7.2": version: 3.7.2 resolution: "bluebird@npm:3.7.2" checksum: 680de03adc54ff925eaa6c7bb9a47a0690e8b5de60f4792604aae8ed618c65e6b63a7893b57ca924beaf53eee69c5af4f8314148c08124c550fe1df1add897d2 @@ -12238,15 +12181,6 @@ __metadata: languageName: node linkType: hard -"consolidate@npm:^0.15.1": - version: 0.15.1 - resolution: "consolidate@npm:0.15.1" - dependencies: - bluebird: "npm:^3.1.1" - checksum: 02dfbab0a8d5452b74c42dee81526b26a42350ed333575c4f8f099957d02a2dbc92a1f89103b85e83b61371e08a16113ebcddbb38eded53402302e0748f608e1 - languageName: node - linkType: hard - "consolidate@npm:^0.16.0": version: 0.16.0 resolution: "consolidate@npm:0.16.0" @@ -12712,7 +12646,7 @@ __metadata: languageName: node linkType: hard -"csstype@npm:^3.0.2, csstype@npm:^3.1.0, csstype@npm:^3.1.2": +"csstype@npm:^3.0.2, csstype@npm:^3.1.2": version: 3.1.2 resolution: "csstype@npm:3.1.2" checksum: 32c038af259897c807ac738d9eab16b3d86747c72b09d5c740978e06f067f9b7b1737e1b75e407c7ab1fe1543dc95f20e202b4786aeb1b8d3bdf5d5ce655e6c6 @@ -16735,13 +16669,6 @@ __metadata: languageName: node linkType: hard -"hash-sum@npm:^1.0.2": - version: 1.0.2 - resolution: "hash-sum@npm:1.0.2" - checksum: 311b2d7ea317b128860a88c7fd3ae46aef010b7fd7418a44afd2787cd889f24d635fa1e22a51bd5a5d8e338597c1da917d81f572e0de2f375e52e96c9fb63a66 - languageName: node - linkType: hard - "hash-sum@npm:^2.0.0": version: 2.0.0 resolution: "hash-sum@npm:2.0.0" @@ -19704,7 +19631,7 @@ __metadata: languageName: node linkType: hard -"loader-utils@npm:^1.0.2, loader-utils@npm:^1.1.0, loader-utils@npm:^1.2.3": +"loader-utils@npm:^1.1.0, loader-utils@npm:^1.2.3": version: 1.4.2 resolution: "loader-utils@npm:1.4.2" dependencies: @@ -20024,16 +19951,6 @@ __metadata: languageName: node linkType: hard -"lru-cache@npm:^4.1.2": - version: 4.1.5 - resolution: "lru-cache@npm:4.1.5" - dependencies: - pseudomap: "npm:^1.0.2" - yallist: "npm:^2.1.2" - checksum: 1ca5306814e5add9ec63556d6fd9b24a4ecdeaef8e9cea52cbf30301e6b88c8d8ddc7cab45b59b56eb763e6c45af911585dc89925a074ab65e1502e3fe8103cf - languageName: node - linkType: hard - "lru-cache@npm:^5.1.1": version: 5.1.1 resolution: "lru-cache@npm:5.1.1" @@ -23459,7 +23376,7 @@ __metadata: languageName: node linkType: hard -"postcss@npm:8.4.31, postcss@npm:^8.2.14, postcss@npm:^8.4.14, postcss@npm:^8.4.21, postcss@npm:^8.4.23, postcss@npm:^8.4.27, postcss@npm:^8.4.31": +"postcss@npm:8.4.31, postcss@npm:^8.2.14, postcss@npm:^8.4.21, postcss@npm:^8.4.23, postcss@npm:^8.4.27, postcss@npm:^8.4.31": version: 8.4.31 resolution: "postcss@npm:8.4.31" dependencies: @@ -23470,7 +23387,7 @@ __metadata: languageName: node linkType: hard -"postcss@npm:^7.0.14, postcss@npm:^7.0.32, postcss@npm:^7.0.36, postcss@npm:^7.0.5, postcss@npm:^7.0.6": +"postcss@npm:^7.0.14, postcss@npm:^7.0.32, postcss@npm:^7.0.5, postcss@npm:^7.0.6": version: 7.0.39 resolution: "postcss@npm:7.0.39" dependencies: @@ -23534,7 +23451,7 @@ __metadata: languageName: node linkType: hard -"prettier@npm:^1.18.2 || ^2.0.0, prettier@npm:^2.8.0": +"prettier@npm:^2.8.0": version: 2.8.8 resolution: "prettier@npm:2.8.8" bin: @@ -23770,13 +23687,6 @@ __metadata: languageName: node linkType: hard -"pseudomap@npm:^1.0.2": - version: 1.0.2 - resolution: "pseudomap@npm:1.0.2" - checksum: 5a91ce114c64ed3a6a553aa7d2943868811377388bb31447f9d8028271bae9b05b340fe0b6961a64e45b9c72946aeb0a4ab635e8f7cb3715ffd0ff2beeb6a679 - languageName: node - linkType: hard - "psl@npm:^1.1.33": version: 1.9.0 resolution: "psl@npm:1.9.0" @@ -29098,7 +29008,7 @@ __metadata: languageName: node linkType: hard -"vue-docgen-api@npm:^4.40.0, vue-docgen-api@npm:^4.44.23, vue-docgen-api@npm:^4.46.0": +"vue-docgen-api@npm:^4.40.0, vue-docgen-api@npm:^4.46.0": version: 4.75.1 resolution: "vue-docgen-api@npm:4.75.1" dependencies: @@ -29134,13 +29044,6 @@ __metadata: languageName: node linkType: hard -"vue-hot-reload-api@npm:^2.3.0": - version: 2.3.4 - resolution: "vue-hot-reload-api@npm:2.3.4" - checksum: 6501a93582c2bba0f17564d1c61b4301e844e14fbac1cb7c3d726c40961375aefa89f2cc4ee8289c3663e12d108c28a5872ba35cfa7f091d1bcaa39feff9ac60 - languageName: node - linkType: hard - "vue-inbrowser-compiler-independent-utils@npm:^4.69.0": version: 4.71.1 resolution: "vue-inbrowser-compiler-independent-utils@npm:4.71.1" @@ -29150,29 +29053,6 @@ __metadata: languageName: node linkType: hard -"vue-loader@npm:^15.7.0": - version: 15.11.1 - resolution: "vue-loader@npm:15.11.1" - dependencies: - "@vue/component-compiler-utils": "npm:^3.1.0" - hash-sum: "npm:^1.0.2" - loader-utils: "npm:^1.1.0" - vue-hot-reload-api: "npm:^2.3.0" - vue-style-loader: "npm:^4.1.0" - peerDependencies: - css-loader: "*" - webpack: ^3.0.0 || ^4.1.0 || ^5.0.0-0 - peerDependenciesMeta: - cache-loader: - optional: true - prettier: - optional: true - vue-template-compiler: - optional: true - checksum: 22491414f3743d485cf8d966837314706abf35d330bf055e356d55f16df8d4ab21fb712c7168509f7492d62cdf799aedf8d31df36d89bd5a4479b9f90fa094c1 - languageName: node - linkType: hard - "vue-loader@npm:^16.0.0": version: 16.8.3 resolution: "vue-loader@npm:16.8.3" @@ -29186,17 +29066,7 @@ __metadata: languageName: node linkType: hard -"vue-style-loader@npm:^4.1.0": - version: 4.1.3 - resolution: "vue-style-loader@npm:4.1.3" - dependencies: - hash-sum: "npm:^1.0.2" - loader-utils: "npm:^1.0.2" - checksum: 871362711561c817c6b96650cf4bcf422c51d46808650da7e6ec39499d76445d08a1f9f1d1aa0f6cffb191cd128fbd77b6e233d9689a87c21d7e546689bed04c - languageName: node - linkType: hard - -"vue-template-compiler@npm:^2.6.14, vue-template-compiler@npm:^2.7.14": +"vue-template-compiler@npm:^2.7.14": version: 2.7.15 resolution: "vue-template-compiler@npm:2.7.15" dependencies: @@ -29206,13 +29076,6 @@ __metadata: languageName: node linkType: hard -"vue-template-es2015-compiler@npm:^1.9.0": - version: 1.9.1 - resolution: "vue-template-es2015-compiler@npm:1.9.1" - checksum: 21d27d1c6afe10a47f17793e18afb7f321888d3ca728bfdb2a79ff49789ed9b40e98abcb68b5499f3da1bbb76a0f188b94aeb5ab0e879f46d6399ac5d4ae38c8 - languageName: node - linkType: hard - "vue-tsc@npm:latest": version: 1.8.24 resolution: "vue-tsc@npm:1.8.24" @@ -29239,16 +29102,6 @@ __metadata: languageName: node linkType: hard -"vue@npm:^2.6.12": - version: 2.7.15 - resolution: "vue@npm:2.7.15" - dependencies: - "@vue/compiler-sfc": "npm:2.7.15" - csstype: "npm:^3.1.0" - checksum: 92bc7bcef1a54fe6b98409a7094f7c8b1f4b8fcf52469380f130d0d671d581130b1ef8715f0e95020fc5dbffff7f519a0621206484b3fdee5e6319a76073fb0c - languageName: node - linkType: hard - "vue@npm:^3.2.33, vue@npm:^3.2.47": version: 3.3.9 resolution: "vue@npm:3.3.9" @@ -30008,13 +29861,6 @@ __metadata: languageName: node linkType: hard -"yallist@npm:^2.1.2": - version: 2.1.2 - resolution: "yallist@npm:2.1.2" - checksum: 0b9e25aa00adf19e01d2bcd4b208aee2b0db643d9927131797b7af5ff69480fc80f1c3db738cbf3946f0bddf39d8f2d0a5709c644fd42d4aa3a4e6e786c087b5 - languageName: node - linkType: hard - "yallist@npm:^3.0.2": version: 3.1.1 resolution: "yallist@npm:3.1.1" diff --git a/docs/get-started/installation-problems/vue.mdx b/docs/get-started/installation-problems/vue.mdx index 84f464a5680e..1268f226a36b 100644 --- a/docs/get-started/installation-problems/vue.mdx +++ b/docs/get-started/installation-problems/vue.mdx @@ -15,7 +15,5 @@ ``` - For other installation issues, check the Vue README files for additional instructions: - - [Vue 2 with Webpack](https://github.com/storybookjs/storybook/tree/next/code/frameworks/vue-webpack5) - - [Vue 2 with Vite](https://github.com/storybookjs/storybook/tree/next/code/frameworks/vue-vite) - [Vue 3 with Webpack](https://github.com/storybookjs/storybook/tree/next/code/frameworks/vue3-webpack5) - [Vue 3 with Vite](https://github.com/storybookjs/storybook/tree/next/code/frameworks/vue3-vite) diff --git a/test-storybooks/ember-cli/package.json b/test-storybooks/ember-cli/package.json index 030ade6a58e2..e2f454ef9587 100644 --- a/test-storybooks/ember-cli/package.json +++ b/test-storybooks/ember-cli/package.json @@ -57,7 +57,6 @@ "@storybook/preset-react-webpack": "portal:../../code/presets/react-webpack", "@storybook/preset-server-webpack": "portal:../../code/presets/server-webpack", "@storybook/preset-svelte-webpack": "portal:../../code/presets/svelte-webpack", - "@storybook/preset-vue-webpack": "portal:../../code/presets/vue-webpack", "@storybook/preset-vue3-webpack": "portal:../../code/presets/vue3-webpack", "@storybook/preset-web-components-webpack": "portal:../../code/presets/web-components-webpack", "@storybook/react": "portal:../../code/renderers/react", @@ -74,7 +73,6 @@ "@storybook/theming": "portal:../../code/lib/theming", "@storybook/vue": "portal:../../code/renderers/vue", "@storybook/vue-vite": "portal:../../code/frameworks/vue-vite", - "@storybook/vue-webpack5": "portal:../../code/frameworks/vue-webpack5", "@storybook/vue3": "portal:../../code/renderers/vue3", "@storybook/vue3-vite": "portal:../../code/frameworks/vue3-vite", "@storybook/vue3-webpack5": "portal:../../code/frameworks/vue3-webpack5", diff --git a/test-storybooks/external-docs/package.json b/test-storybooks/external-docs/package.json index 359c78de0b19..368f160a40cd 100644 --- a/test-storybooks/external-docs/package.json +++ b/test-storybooks/external-docs/package.json @@ -58,7 +58,6 @@ "@storybook/preset-react-webpack": "portal:../../code/presets/react-webpack", "@storybook/preset-server-webpack": "portal:../../code/presets/server-webpack", "@storybook/preset-svelte-webpack": "portal:../../code/presets/svelte-webpack", - "@storybook/preset-vue-webpack": "portal:../../code/presets/vue-webpack", "@storybook/preset-vue3-webpack": "portal:../../code/presets/vue3-webpack", "@storybook/preset-web-components-webpack": "portal:../../code/presets/web-components-webpack", "@storybook/preview-api": "portal:../../code/lib/preview-api", @@ -76,7 +75,6 @@ "@storybook/theming": "portal:../../code/lib/theming", "@storybook/vue": "portal:../../code/renderers/vue", "@storybook/vue-vite": "portal:../../code/frameworks/vue-vite", - "@storybook/vue-webpack5": "portal:../../code/frameworks/vue-webpack5", "@storybook/vue3": "portal:../../code/renderers/vue3", "@storybook/vue3-vite": "portal:../../code/frameworks/vue3-vite", "@storybook/vue3-webpack5": "portal:../../code/frameworks/vue3-webpack5", @@ -116,4 +114,4 @@ "typescript": "~5.2.2", "webpack": "5" } -} +} \ No newline at end of file diff --git a/test-storybooks/server-kitchen-sink/package.json b/test-storybooks/server-kitchen-sink/package.json index beffa87a6fda..b663db093309 100644 --- a/test-storybooks/server-kitchen-sink/package.json +++ b/test-storybooks/server-kitchen-sink/package.json @@ -60,7 +60,6 @@ "@storybook/preset-react-webpack": "portal:../../code/presets/react-webpack", "@storybook/preset-server-webpack": "portal:../../code/presets/server-webpack", "@storybook/preset-svelte-webpack": "portal:../../code/presets/svelte-webpack", - "@storybook/preset-vue-webpack": "portal:../../code/presets/vue-webpack", "@storybook/preset-vue3-webpack": "portal:../../code/presets/vue3-webpack", "@storybook/preset-web-components-webpack": "portal:../../code/presets/web-components-webpack", "@storybook/react": "portal:../../code/renderers/react", @@ -77,7 +76,6 @@ "@storybook/theming": "portal:../../code/lib/theming", "@storybook/vue": "portal:../../code/renderers/vue", "@storybook/vue-vite": "portal:../../code/frameworks/vue-vite", - "@storybook/vue-webpack5": "portal:../../code/frameworks/vue-webpack5", "@storybook/vue3": "portal:../../code/renderers/vue3", "@storybook/vue3-vite": "portal:../../code/frameworks/vue3-vite", "@storybook/vue3-webpack5": "portal:../../code/frameworks/vue3-webpack5", diff --git a/test-storybooks/standalone-preview/package.json b/test-storybooks/standalone-preview/package.json index 46363a02b6f1..41a52bd14f4c 100644 --- a/test-storybooks/standalone-preview/package.json +++ b/test-storybooks/standalone-preview/package.json @@ -53,7 +53,6 @@ "@storybook/preset-react-webpack": "portal:../../code/presets/react-webpack", "@storybook/preset-server-webpack": "portal:../../code/presets/server-webpack", "@storybook/preset-svelte-webpack": "portal:../../code/presets/svelte-webpack", - "@storybook/preset-vue-webpack": "portal:../../code/presets/vue-webpack", "@storybook/preset-vue3-webpack": "portal:../../code/presets/vue3-webpack", "@storybook/preset-web-components-webpack": "portal:../../code/presets/web-components-webpack", "@storybook/react": "portal:../../code/renderers/react", @@ -70,7 +69,6 @@ "@storybook/theming": "portal:../../code/lib/theming", "@storybook/vue": "portal:../../code/renderers/vue", "@storybook/vue-vite": "portal:../../code/frameworks/vue-vite", - "@storybook/vue-webpack5": "portal:../../code/frameworks/vue-webpack5", "@storybook/vue3": "portal:../../code/renderers/vue3", "@storybook/vue3-vite": "portal:../../code/frameworks/vue3-vite", "@storybook/vue3-webpack5": "portal:../../code/frameworks/vue3-webpack5", From 8fbd37580b1484d0a1bc39d6572e112d8f23c7a5 Mon Sep 17 00:00:00 2001 From: Michael Shilman Date: Fri, 8 Dec 2023 11:10:39 +0800 Subject: [PATCH 130/131] Break the cache --- code/lib/cli/package.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/code/lib/cli/package.json b/code/lib/cli/package.json index b7201c92e647..dd845db3b8c1 100644 --- a/code/lib/cli/package.json +++ b/code/lib/cli/package.json @@ -1,11 +1,13 @@ { "name": "@storybook/cli", "version": "8.0.0-alpha.1", - "description": "Storybook's CLI - easiest method of adding storybook to your projects", + "description": "Storybook's CLI - install, dev, build, upgrade, and more", "keywords": [ "cli", "generator", - "storybook" + "dev", + "build", + "upgrade" ], "homepage": "https://github.com/storybookjs/storybook/tree/next/code/lib/cli", "bugs": { From cc81dadb143e90303d7c945a2f8dd809a2fd44a6 Mon Sep 17 00:00:00 2001 From: Shaun Lloyd Date: Fri, 8 Dec 2023 11:20:13 -0500 Subject: [PATCH 131/131] Add telemetry for successful scaffolding --- code/lib/cli/src/initiate.ts | 2 +- code/lib/cli/src/scaffold-new-project.ts | 26 ++++++++++++++++++------ code/lib/telemetry/src/types.ts | 1 + 3 files changed, 22 insertions(+), 7 deletions(-) diff --git a/code/lib/cli/src/initiate.ts b/code/lib/cli/src/initiate.ts index d5acccbfd36a..5217bca197aa 100644 --- a/code/lib/cli/src/initiate.ts +++ b/code/lib/cli/src/initiate.ts @@ -259,7 +259,7 @@ async function doInitiate( // Check if the current directory is empty. if (options.force !== true && currentDirectoryIsEmpty(packageManager.type)) { // Prompt the user to create a new project from our list. - await scaffoldNewProject(packageManager.type); + await scaffoldNewProject(packageManager.type, options); if (process.env.IN_STORYBOOK_SANDBOX === 'true' || process.env.CI === 'true') { packageManager.addPackageResolutions({ diff --git a/code/lib/cli/src/scaffold-new-project.ts b/code/lib/cli/src/scaffold-new-project.ts index eabd944373b8..d33d82a32d7a 100644 --- a/code/lib/cli/src/scaffold-new-project.ts +++ b/code/lib/cli/src/scaffold-new-project.ts @@ -5,10 +5,13 @@ import { readdirSync, remove } from 'fs-extra'; import prompts from 'prompts'; import dedent from 'ts-dedent'; +import { telemetry } from '@storybook/telemetry'; + import { GenerateNewProjectOnInitError } from '@storybook/core-events/server-errors'; import { logger } from '@storybook/node-logger'; import type { PackageManagerName } from './js-package-manager'; +import type { CommandOptions } from './generators/types'; type CoercedPackageManagerName = 'npm' | 'yarn' | 'pnpm'; @@ -108,7 +111,10 @@ const buildProjectDisplayNameForPrint = ({ displayName }: SupportedProject) => { * * @param packageManager The package manager to use. */ -export const scaffoldNewProject = async (packageManager: PackageManagerName) => { +export const scaffoldNewProject = async ( + packageManager: PackageManagerName, + { disableTelemetry }: CommandOptions +) => { const packageManagerName = packageManagerToCoercedName(packageManager); logger.plain( @@ -135,7 +141,7 @@ export const scaffoldNewProject = async (packageManager: PackageManagerName) => let projectStrategy; if (process.env.STORYBOOK_INIT_EMPTY_TYPE) { - projectStrategy = SUPPORTED_PROJECTS[process.env.STORYBOOK_INIT_EMPTY_TYPE]; + projectStrategy = process.env.STORYBOOK_INIT_EMPTY_TYPE; } if (!projectStrategy) { @@ -152,11 +158,12 @@ export const scaffoldNewProject = async (packageManager: PackageManagerName) => { onCancel: () => process.exit(0) } ); - projectStrategy = SUPPORTED_PROJECTS[project]; + projectStrategy = project; } - const projectDisplayName = buildProjectDisplayNameForPrint(projectStrategy); - const createScript = projectStrategy.createScript[packageManagerName]; + const projectStrategyConfig = SUPPORTED_PROJECTS[projectStrategy]; + const projectDisplayName = buildProjectDisplayNameForPrint(projectStrategyConfig); + const createScript = projectStrategyConfig.createScript[packageManagerName]; logger.line(1); logger.plain( @@ -182,7 +189,14 @@ export const scaffoldNewProject = async (packageManager: PackageManagerName) => throw new GenerateNewProjectOnInitError({ error: e, packageManager: packageManagerName, - projectType: projectDisplayName, + projectType: projectStrategy, + }); + } + + if (!disableTelemetry) { + telemetry('scaffolded-empty', { + packageManager: packageManagerName, + projectType: projectStrategy, }); } diff --git a/code/lib/telemetry/src/types.ts b/code/lib/telemetry/src/types.ts index 35266814dff7..8f091703bcae 100644 --- a/code/lib/telemetry/src/types.ts +++ b/code/lib/telemetry/src/types.ts @@ -9,6 +9,7 @@ export type EventType = | 'build' | 'upgrade' | 'init' + | 'scaffolded-empty' | 'browser' | 'canceled' | 'error'