From 50f84033e35f9c256101f31d0b4b5a066dea848f Mon Sep 17 00:00:00 2001 From: James Garbutt <43081j@users.noreply.github.com> Date: Mon, 17 Jun 2024 22:17:13 +0100 Subject: [PATCH 01/39] feat: migrate from chalk to picocolors This migrates away from chalk to picocolors instead, primarily because the latter is _much_ lighter. Keep in mind, `node-logger` still uses chalk as we use `hex(code)` which doesn't have an alternative in picocolors. This means it will still be in the dependency tree for many packages (for now). This seems preferable over upgrading chalk since the latest version of chalk will still be heavier, and is ESM-only (not sure if we're able to adopt ESM only deps in SB yet). --- code/lib/cli/package.json | 2 +- .../autoblock/block-dependencies-versions.ts | 10 +- .../cli/src/autoblock/block-node-version.ts | 4 +- .../cli/src/autoblock/block-storystorev6.ts | 6 +- code/lib/cli/src/autoblock/index.ts | 6 +- .../src/automigrate/fixes/addon-postcss.ts | 8 +- .../cli/src/automigrate/fixes/addons-api.ts | 12 +-- .../fixes/angular-builders-multiproject.ts | 10 +- .../src/automigrate/fixes/angular-builders.ts | 4 +- .../src/automigrate/fixes/autodocs-tags.ts | 26 ++--- .../src/automigrate/fixes/autodocs-true.ts | 10 +- .../cli/src/automigrate/fixes/builder-vite.ts | 8 +- code/lib/cli/src/automigrate/fixes/cra5.ts | 8 +- .../src/automigrate/fixes/eslint-plugin.ts | 6 +- .../src/automigrate/fixes/initial-globals.ts | 12 ++- .../cli/src/automigrate/fixes/mdx-1-to-3.ts | 6 +- .../cli/src/automigrate/fixes/mdx-to-csf.ts | 14 +-- .../src/automigrate/fixes/new-frameworks.ts | 102 ++++++++++-------- .../cli/src/automigrate/fixes/react-docgen.ts | 16 +-- .../fixes/remove-argtypes-regex.ts | 8 +- .../fixes/remove-global-client-apis.ts | 14 +-- .../fixes/remove-jest-testing-library.ts | 8 +- .../cli/src/automigrate/fixes/sb-binary.ts | 8 +- .../cli/src/automigrate/fixes/sb-scripts.ts | 16 +-- .../automigrate/fixes/storyshots-migration.ts | 6 +- .../upgrade-storybook-related-dependencies.ts | 2 +- code/lib/cli/src/automigrate/fixes/vta.ts | 4 +- code/lib/cli/src/automigrate/fixes/vue3.ts | 10 +- .../fixes/webpack5-compiler-setup.test.ts | 4 +- .../fixes/webpack5-compiler-setup.ts | 20 ++-- .../lib/cli/src/automigrate/fixes/webpack5.ts | 8 +- .../cli/src/automigrate/fixes/wrap-require.ts | 4 +- .../helpers/checkWebpack5Builder.ts | 6 +- .../src/automigrate/helpers/eslintPlugin.ts | 4 +- .../helpers/getMigrationSummary.ts | 28 ++--- .../src/automigrate/helpers/mainConfigFile.ts | 8 +- code/lib/cli/src/automigrate/index.ts | 18 ++-- .../src/doctor/getDuplicatedDepsWarnings.ts | 14 +-- .../getIncompatibleStorybookPackages.test.ts | 2 +- .../getIncompatibleStorybookPackages.ts | 10 +- .../doctor/getMismatchingVersionsWarning.ts | 14 +-- code/lib/cli/src/doctor/index.ts | 8 +- code/lib/cli/src/generate.ts | 10 +- code/lib/cli/src/helpers.ts | 4 +- code/lib/cli/src/initiate.ts | 32 +++--- code/lib/cli/src/link.ts | 4 +- code/lib/cli/src/sandbox.ts | 36 +++---- code/lib/cli/src/scaffold-new-project.ts | 18 ++-- code/lib/cli/src/upgrade.ts | 20 ++-- code/lib/core-common/package.json | 2 +- .../js-package-manager/JsPackageManager.ts | 6 +- code/lib/core-common/src/utils/log-config.ts | 4 +- code/lib/core-common/src/utils/log.ts | 14 +-- .../core-common/src/utils/notify-telemetry.ts | 8 +- code/lib/core-events/package.json | 2 +- .../core-events/src/errors/server-errors.ts | 8 +- code/lib/core-server/package.json | 2 +- code/lib/core-server/src/build-static.ts | 6 +- .../src/utils/StoryIndexGenerator.ts | 6 +- .../src/utils/copy-all-static-files.ts | 12 ++- .../src/utils/output-startup-information.ts | 16 +-- .../lib/core-server/src/utils/output-stats.ts | 6 +- .../core-server/src/utils/server-statics.ts | 10 +- .../lib/core-server/src/utils/update-check.ts | 10 +- .../src/utils/warnWhenUsingArgTypesRegex.ts | 10 +- code/lib/telemetry/package.json | 2 +- code/lib/telemetry/src/notify.ts | 8 +- code/yarn.lock | 17 ++- 68 files changed, 408 insertions(+), 359 deletions(-) diff --git a/code/lib/cli/package.json b/code/lib/cli/package.json index d36b17a533e3..e5dd2d3eac8e 100644 --- a/code/lib/cli/package.json +++ b/code/lib/cli/package.json @@ -70,7 +70,6 @@ "@types/semver": "^7.3.4", "@yarnpkg/fslib": "2.10.3", "@yarnpkg/libzip": "2.3.0", - "chalk": "^4.1.0", "commander": "^6.2.1", "cross-spawn": "^7.0.3", "detect-indent": "^6.1.0", @@ -84,6 +83,7 @@ "jscodeshift": "^0.15.1", "leven": "^3.1.0", "ora": "^5.4.1", + "picocolors": "^1.0.1", "prettier": "^3.1.1", "prompts": "^2.4.0", "read-pkg-up": "^7.0.1", diff --git a/code/lib/cli/src/autoblock/block-dependencies-versions.ts b/code/lib/cli/src/autoblock/block-dependencies-versions.ts index 45db54bac794..aef3a490f237 100644 --- a/code/lib/cli/src/autoblock/block-dependencies-versions.ts +++ b/code/lib/cli/src/autoblock/block-dependencies-versions.ts @@ -1,7 +1,7 @@ import { createBlocker } from './types'; import { dedent } from 'ts-dedent'; import { lt } from 'semver'; -import chalk from 'chalk'; +import picocolors from 'picocolors'; const minimalVersionsMap = { '@angular/core': '15.0.0', @@ -51,7 +51,7 @@ export const blocker = createBlocker({ return dedent` Support for react-script < 5.0.0 has been removed. Please see the migration guide for more information: - ${chalk.yellow( + ${picocolors.yellow( 'https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#create-react-app-dropped-cra4-support' )} @@ -61,7 +61,7 @@ export const blocker = createBlocker({ return dedent` Support for Vue 2 has been removed. Please see the migration guide for more information: - ${chalk.yellow('https://v3-migration.vuejs.org/')} + ${picocolors.yellow('https://v3-migration.vuejs.org/')} Please upgrade to the latest version of Vue. `; @@ -69,7 +69,7 @@ export const blocker = createBlocker({ return dedent` Support for Angular < 15 has been removed. Please see the migration guide for more information: - ${chalk.yellow('https://angular.io/guide/update-to-version-15')} + ${picocolors.yellow('https://angular.io/guide/update-to-version-15')} Please upgrade to the latest version of Angular. `; @@ -77,7 +77,7 @@ export const blocker = createBlocker({ return dedent` Support for Next.js < 13.5 has been removed. Please see the migration guide for more information: - ${chalk.yellow( + ${picocolors.yellow( 'https://nextjs.org/docs/pages/building-your-application/upgrading/version-13' )} diff --git a/code/lib/cli/src/autoblock/block-node-version.ts b/code/lib/cli/src/autoblock/block-node-version.ts index 49c9744b08f0..a54736db960c 100644 --- a/code/lib/cli/src/autoblock/block-node-version.ts +++ b/code/lib/cli/src/autoblock/block-node-version.ts @@ -1,7 +1,7 @@ import { createBlocker } from './types'; import { dedent } from 'ts-dedent'; import { lt } from 'semver'; -import chalk from 'chalk'; +import picocolors from 'picocolors'; export const blocker = createBlocker({ id: 'minimumNode16', @@ -17,7 +17,7 @@ export const blocker = createBlocker({ We've detected you're using Node.js v${data.nodeVersion}. Storybook needs Node.js 18 or higher. - ${chalk.yellow('https://nodejs.org/en/download')} + ${picocolors.yellow('https://nodejs.org/en/download')} `; }, }); diff --git a/code/lib/cli/src/autoblock/block-storystorev6.ts b/code/lib/cli/src/autoblock/block-storystorev6.ts index d284584c9fbc..5041fbd56374 100644 --- a/code/lib/cli/src/autoblock/block-storystorev6.ts +++ b/code/lib/cli/src/autoblock/block-storystorev6.ts @@ -1,7 +1,7 @@ import { createBlocker } from './types'; import { dedent } from 'ts-dedent'; import type { StorybookConfigRaw } from '@storybook/types'; -import chalk from 'chalk'; +import picocolors from 'picocolors'; export const blocker = createBlocker({ id: 'storyStoreV7removal', @@ -20,7 +20,7 @@ export const blocker = createBlocker({ StoryStoreV7 feature must be removed from your Storybook configuration. This feature was removed in Storybook 8.0.0. Please see the migration guide for more information: - ${chalk.yellow( + ${picocolors.yellow( 'https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#storystorev6-and-storiesof-is-deprecated' )} @@ -28,7 +28,7 @@ export const blocker = createBlocker({ export default = { features: { - ${chalk.cyan(`storyStoreV7: false`)}, <--- ${chalk.bold('remove this line')} + ${picocolors.cyan(`storyStoreV7: false`)}, <--- ${picocolors.bold('remove this line')} }, }; diff --git a/code/lib/cli/src/autoblock/index.ts b/code/lib/cli/src/autoblock/index.ts index 6e71266926f6..82e7200f0d23 100644 --- a/code/lib/cli/src/autoblock/index.ts +++ b/code/lib/cli/src/autoblock/index.ts @@ -1,6 +1,6 @@ import type { AutoblockOptions, Blocker } from './types'; import { logger } from '@storybook/node-logger'; -import chalk from 'chalk'; +import picocolors from 'picocolors'; import boxen from 'boxen'; const excludesFalse = (x: T | false): x is T => x !== false; @@ -47,7 +47,9 @@ export const autoblock = async ( if (faults.length > 0) { const messages = { welcome: `Storybook has found potential blockers in your project that need to be resolved before upgrading:`, - reminder: chalk.yellow('Fix the above issues and try running the upgrade command again.'), + reminder: picocolors.yellow( + 'Fix the above issues and try running the upgrade command again.' + ), }; const borderColor = '#FC521F'; diff --git a/code/lib/cli/src/automigrate/fixes/addon-postcss.ts b/code/lib/cli/src/automigrate/fixes/addon-postcss.ts index f8d134183c0b..f3ba17f8cbf9 100644 --- a/code/lib/cli/src/automigrate/fixes/addon-postcss.ts +++ b/code/lib/cli/src/automigrate/fixes/addon-postcss.ts @@ -1,4 +1,4 @@ -import chalk from 'chalk'; +import picocolors from 'picocolors'; import { dedent } from 'ts-dedent'; import type { Fix } from '../types'; import { getAddonNames } from '../helpers/mainConfigFile'; @@ -27,13 +27,13 @@ export const addonPostCSS: Fix = { prompt() { return dedent` - ${chalk.bold( + ${picocolors.bold( 'Attention' )}: We've detected that you're using the following package which is incompatible with Storybook 8 and beyond: - - ${chalk.cyan(`@storybook/addon-postcss`)} + - ${picocolors.cyan(`@storybook/addon-postcss`)} - Please migrate to ${chalk.cyan( + Please migrate to ${picocolors.cyan( `@storybook/addon-styling-webpack` )} once you're done upgrading. `; diff --git a/code/lib/cli/src/automigrate/fixes/addons-api.ts b/code/lib/cli/src/automigrate/fixes/addons-api.ts index f193898aa82f..910f2d90c1de 100644 --- a/code/lib/cli/src/automigrate/fixes/addons-api.ts +++ b/code/lib/cli/src/automigrate/fixes/addons-api.ts @@ -1,4 +1,4 @@ -import chalk from 'chalk'; +import picocolors from 'picocolors'; import { dedent } from 'ts-dedent'; import type { Fix } from '../types'; @@ -26,18 +26,18 @@ export const addonsAPI: Fix = { prompt() { return dedent` - ${chalk.bold( + ${picocolors.bold( 'Attention' )}: We've detected that you're using the following package which is removed in Storybook 8 and beyond: - - ${chalk.cyan(`@storybook/addons`)} + - ${picocolors.cyan(`@storybook/addons`)} - This package has been deprecated and replaced with ${chalk.cyan( + This package has been deprecated and replaced with ${picocolors.cyan( `@storybook/preview-api` - )} and ${chalk.cyan(`@storybook/manager-api`)}. + )} and ${picocolors.cyan(`@storybook/manager-api`)}. You can find more information about the new addons API in the migration guide: - ${chalk.yellow( + ${picocolors.yellow( 'https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#new-addons-api' )} `; diff --git a/code/lib/cli/src/automigrate/fixes/angular-builders-multiproject.ts b/code/lib/cli/src/automigrate/fixes/angular-builders-multiproject.ts index 3f72411be011..539800e12406 100644 --- a/code/lib/cli/src/automigrate/fixes/angular-builders-multiproject.ts +++ b/code/lib/cli/src/automigrate/fixes/angular-builders-multiproject.ts @@ -1,6 +1,6 @@ import { dedent } from 'ts-dedent'; import semver from 'semver'; -import chalk from 'chalk'; +import picocolors from 'picocolors'; import type { Fix } from '../types'; import { isNxProject } from '../../helpers'; import { AngularJSON } from '../../generators/ANGULAR/helpers'; @@ -46,13 +46,13 @@ export const angularBuildersMultiproject: Fix:storybook')} to start Storybook. + )} and execute ${picocolors.yellow('ng run :storybook')} to start Storybook. - ❌ Your Angular workspace uses multiple projects defined in the ${chalk.yellow( + ❌ Your Angular workspace uses multiple projects defined in the ${picocolors.yellow( 'angular.json' - )} file and we were not able to detect a root project. Therefore we are not able to automigrate to use Angular Storybook builder. Instead, please visit ${chalk.yellow( + )} file and we were not able to detect a root project. Therefore we are not able to automigrate to use Angular Storybook builder. Instead, please visit ${picocolors.yellow( 'https://github.com/storybookjs/storybook/tree/next/code/frameworks/angular' )} to do the migration manually. `; diff --git a/code/lib/cli/src/automigrate/fixes/angular-builders.ts b/code/lib/cli/src/automigrate/fixes/angular-builders.ts index ac2f2af99d2e..95a3298a81c8 100644 --- a/code/lib/cli/src/automigrate/fixes/angular-builders.ts +++ b/code/lib/cli/src/automigrate/fixes/angular-builders.ts @@ -1,6 +1,6 @@ import { dedent } from 'ts-dedent'; import type { StorybookConfig } from '@storybook/types'; -import chalk from 'chalk'; +import picocolors from 'picocolors'; import prompts from 'prompts'; import type { Fix } from '../types'; import { isNxProject } from '../../helpers'; @@ -59,7 +59,7 @@ export const angularBuilders: Fix = { Also feel free to remove the Compodoc script from your package.json file if you don't use it apart from Storybook anymore. Storybook uses Compodoc internally and you don't have to call in separately anymore. - Read more about the Angular builder here: ${chalk.yellow( + Read more about the Angular builder here: ${picocolors.yellow( 'https://github.com/storybookjs/storybook/tree/next/code/frameworks/angular#how-do-i-migrate-to-an-angular-storybook-builder' )} `; diff --git a/code/lib/cli/src/automigrate/fixes/autodocs-tags.ts b/code/lib/cli/src/automigrate/fixes/autodocs-tags.ts index 531bcc0ec69d..3b2416af91fd 100644 --- a/code/lib/cli/src/automigrate/fixes/autodocs-tags.ts +++ b/code/lib/cli/src/automigrate/fixes/autodocs-tags.ts @@ -1,5 +1,5 @@ import { dedent } from 'ts-dedent'; -import chalk from 'chalk'; +import picocolors from 'picocolors'; import type { DocsOptions } from '@storybook/types'; import { readConfig, writeConfig } from '@storybook/csf-tools'; import { updateMainConfig } from '../helpers/mainConfigFile'; @@ -27,13 +27,13 @@ export const autodocsTags: Fix = { if (autodocs === true && !previewConfigPath) { throw Error(dedent` - ❌ Failed to remove the deprecated ${chalk.cyan('docs.autodocs')} setting from ${chalk.cyan( - mainConfigPath - )}. + ❌ Failed to remove the deprecated ${picocolors.cyan( + 'docs.autodocs' + )} setting from ${picocolors.cyan(mainConfigPath)}. - There is no preview config file in which to add the ${chalk.cyan('autodocs')} tag. + There is no preview config file in which to add the ${picocolors.cyan('autodocs')} tag. - Please perform the migration by hand: ${chalk.yellow(MIGRATION)} + Please perform the migration by hand: ${picocolors.yellow(MIGRATION)} `); return null; } @@ -49,21 +49,23 @@ export const autodocsTags: Fix = { falseMessage = dedent` - There is no ${chalk.cyan('docs.autodocs = false')} equivalent. - You'll need to check your stories to ensure none are tagged with ${chalk.cyan('autodocs')}. + There is no ${picocolors.cyan('docs.autodocs = false')} equivalent. + You'll need to check your stories to ensure none are tagged with ${picocolors.cyan( + 'autodocs' + )}. `; } else if (autodocs === true) { - trueMessage = ` and update ${chalk.cyan(previewConfigPath)}`; + trueMessage = ` and update ${picocolors.cyan(previewConfigPath)}`; } return dedent` - The ${chalk.cyan('docs.autodocs')} setting in ${chalk.cyan( + The ${picocolors.cyan('docs.autodocs')} setting in ${picocolors.cyan( mainConfigPath )} is deprecated.${falseMessage} - Learn more: ${chalk.yellow(MIGRATION)} + Learn more: ${picocolors.yellow(MIGRATION)} - Remove ${chalk.cyan('docs.autodocs')}${trueMessage}? + Remove ${picocolors.cyan('docs.autodocs')}${trueMessage}? `; }, diff --git a/code/lib/cli/src/automigrate/fixes/autodocs-true.ts b/code/lib/cli/src/automigrate/fixes/autodocs-true.ts index e5c2aceda7c2..d9cac1583b41 100644 --- a/code/lib/cli/src/automigrate/fixes/autodocs-true.ts +++ b/code/lib/cli/src/automigrate/fixes/autodocs-true.ts @@ -1,4 +1,4 @@ -import chalk from 'chalk'; +import picocolors from 'picocolors'; import { dedent } from 'ts-dedent'; import type { Fix } from '../types'; @@ -44,7 +44,9 @@ export const autodocsTrue: Fix = { }, prompt({ value }) { - const autodocsFormatted = chalk.cyan(`docs: { autodocs: ${JSON.stringify(value ?? true)} }`); + const autodocsFormatted = picocolors.cyan( + `docs: { autodocs: ${JSON.stringify(value ?? true)} }` + ); const tagWarning = dedent` NOTE: if you're upgrading from an older 7.0-beta using the 'docsPage' tag, please update your story files to use the 'autodocs' tag instead. @@ -61,7 +63,7 @@ export const autodocsTrue: Fix = { ${autodocsFormatted} ${value === 'tag' ? tagWarning : ''} - More info: ${chalk.yellow( + More info: ${picocolors.yellow( 'https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#autodocs-changes' )} `; @@ -74,7 +76,7 @@ export const autodocsTrue: Fix = { ${autodocsFormatted} - More info: ${chalk.yellow( + More info: ${picocolors.yellow( 'https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#autodocs-changes' )} `; diff --git a/code/lib/cli/src/automigrate/fixes/builder-vite.ts b/code/lib/cli/src/automigrate/fixes/builder-vite.ts index b38cf9ccb677..66e573a0e75c 100644 --- a/code/lib/cli/src/automigrate/fixes/builder-vite.ts +++ b/code/lib/cli/src/automigrate/fixes/builder-vite.ts @@ -1,4 +1,4 @@ -import chalk from 'chalk'; +import picocolors from 'picocolors'; import { dedent } from 'ts-dedent'; import { writeConfig } from '@storybook/csf-tools'; @@ -42,18 +42,18 @@ export const builderVite: Fix = { }, prompt({ builder }) { - const builderFormatted = chalk.cyan(JSON.stringify(builder, null, 2)); + const builderFormatted = picocolors.cyan(JSON.stringify(builder, null, 2)); return dedent` We've detected you're using the community vite builder: ${builderFormatted} - 'storybook-builder-vite' is deprecated and now located at ${chalk.cyan( + 'storybook-builder-vite' is deprecated and now located at ${picocolors.cyan( '@storybook/builder-vite' )}. We can upgrade your project to use the new builder automatically. - More info: ${chalk.yellow( + More info: ${picocolors.yellow( 'https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#vite-builder-renamed' )} `; diff --git a/code/lib/cli/src/automigrate/fixes/cra5.ts b/code/lib/cli/src/automigrate/fixes/cra5.ts index 468fbe90947b..ef831e2b1865 100644 --- a/code/lib/cli/src/automigrate/fixes/cra5.ts +++ b/code/lib/cli/src/automigrate/fixes/cra5.ts @@ -1,4 +1,4 @@ -import chalk from 'chalk'; +import picocolors from 'picocolors'; import { dedent } from 'ts-dedent'; import semver from 'semver'; import type { Fix } from '../types'; @@ -34,17 +34,17 @@ export const cra5: Fix = { }, prompt({ craVersion }) { - const craFormatted = chalk.cyan(`Create React App (CRA) ${craVersion}`); + const craFormatted = picocolors.cyan(`Create React App (CRA) ${craVersion}`); return dedent` We've detected you are running ${craFormatted} which is powered by webpack5. Your Storybook's main.js files specifies webpack4, which is incompatible. - In order to work with your version of CRA, we need to install Storybook's ${chalk.cyan( + In order to work with your version of CRA, we need to install Storybook's ${picocolors.cyan( '@storybook/builder-webpack5' )}. - More info: ${chalk.yellow( + More info: ${picocolors.yellow( 'https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#cra5-upgrade' )} `; diff --git a/code/lib/cli/src/automigrate/fixes/eslint-plugin.ts b/code/lib/cli/src/automigrate/fixes/eslint-plugin.ts index de81e08008d8..b726818899bb 100644 --- a/code/lib/cli/src/automigrate/fixes/eslint-plugin.ts +++ b/code/lib/cli/src/automigrate/fixes/eslint-plugin.ts @@ -1,4 +1,4 @@ -import chalk from 'chalk'; +import picocolors from 'picocolors'; import { dedent } from 'ts-dedent'; import { @@ -57,7 +57,9 @@ export const eslintPlugin: Fix = { In order to have the best experience with Storybook and follow best practices, we advise you to install eslint-plugin-storybook. - More info: ${chalk.yellow('https://github.com/storybookjs/eslint-plugin-storybook#readme')} + More info: ${picocolors.yellow( + 'https://github.com/storybookjs/eslint-plugin-storybook#readme' + )} `; }, diff --git a/code/lib/cli/src/automigrate/fixes/initial-globals.ts b/code/lib/cli/src/automigrate/fixes/initial-globals.ts index c9fac6d4cdbf..fd13157ca5bc 100644 --- a/code/lib/cli/src/automigrate/fixes/initial-globals.ts +++ b/code/lib/cli/src/automigrate/fixes/initial-globals.ts @@ -1,5 +1,5 @@ import { dedent } from 'ts-dedent'; -import chalk from 'chalk'; +import picocolors from 'picocolors'; import { readFile, writeFile } from 'fs-extra'; import type { Expression } from '@babel/types'; import type { ConfigFile } from '@storybook/csf-tools'; @@ -33,12 +33,14 @@ export const initialGlobals: Fix = { prompt({ previewConfigPath }) { return dedent` - The ${chalk.cyan('globals')} setting in ${chalk.cyan(previewConfigPath)} is deprecated - and has been renamed to ${chalk.cyan('initialGlobals')}. + The ${picocolors.cyan('globals')} setting in ${picocolors.cyan( + previewConfigPath + )} is deprecated + and has been renamed to ${picocolors.cyan('initialGlobals')}. - Learn more: ${chalk.yellow(MIGRATION)} + Learn more: ${picocolors.yellow(MIGRATION)} - Rename ${chalk.cyan('globals')} to ${chalk.cyan('initalGlobals')}? + Rename ${picocolors.cyan('globals')} to ${picocolors.cyan('initalGlobals')}? `; }, diff --git a/code/lib/cli/src/automigrate/fixes/mdx-1-to-3.ts b/code/lib/cli/src/automigrate/fixes/mdx-1-to-3.ts index 8b556033a6ac..b66b4cb8da4e 100644 --- a/code/lib/cli/src/automigrate/fixes/mdx-1-to-3.ts +++ b/code/lib/cli/src/automigrate/fixes/mdx-1-to-3.ts @@ -1,4 +1,4 @@ -import chalk from 'chalk'; +import picocolors from 'picocolors'; import { dedent } from 'ts-dedent'; import { basename } from 'path'; import fse from 'fs-extra'; @@ -56,7 +56,7 @@ export const mdx1to3: Fix = { prompt({ storiesMdxFiles }) { return dedent` - We've found ${chalk.yellow(storiesMdxFiles.length)} '.stories.mdx' files in your project. + We've found ${picocolors.yellow(storiesMdxFiles.length)} '.stories.mdx' files in your project. Storybook has upgraded to MDX3 (https://mdxjs.com/blog/v3/). MDX3 itself doesn't contain disruptive breaking changes, whereas the transition from MDX1 to MDX2 was a significant change. We can try to automatically upgrade your MDX files to MDX3 format using some common patterns. @@ -64,7 +64,7 @@ export const mdx1to3: Fix = { After this install completes, and before you start Storybook, we strongly recommend reading the MDX2 section of the 7.0 migration guide. It contains useful tools for detecting and fixing any remaining issues. - ${chalk.cyan('https://storybook.js.org/migration-guides/7.0')} + ${picocolors.cyan('https://storybook.js.org/migration-guides/7.0')} `; }, diff --git a/code/lib/cli/src/automigrate/fixes/mdx-to-csf.ts b/code/lib/cli/src/automigrate/fixes/mdx-to-csf.ts index 72dc4ddbde00..74793efdb0c1 100644 --- a/code/lib/cli/src/automigrate/fixes/mdx-to-csf.ts +++ b/code/lib/cli/src/automigrate/fixes/mdx-to-csf.ts @@ -1,4 +1,4 @@ -import chalk from 'chalk'; +import picocolors from 'picocolors'; import dedent from 'ts-dedent'; import type { StoriesEntry } from '@storybook/types'; import { updateMainConfig } from '../helpers/mainConfigFile'; @@ -40,9 +40,9 @@ export const mdxToCSF: Fix = { if (!existingStoriesEntries) { throw new Error(dedent` - ❌ Unable to determine Storybook stories globs in ${chalk.blue( + ❌ Unable to determine Storybook stories globs in ${picocolors.blue( mainConfig - )}, skipping ${chalk.cyan(this.id)} fix. + )}, skipping ${picocolors.cyan(this.id)} fix. In Storybook 7, we have deprecated defining stories in MDX files, and consequently have changed the suffix to simply .mdx. @@ -50,7 +50,7 @@ export const mdxToCSF: Fix = { We were unable to automatically migrate your 'stories' config to include any .mdx file instead of just .stories.mdx. We suggest you make this change manually. - To learn more about this change, see: ${chalk.yellow( + To learn more about this change, see: ${picocolors.yellow( 'https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#mdx-docs-files' )} `); @@ -94,7 +94,7 @@ export const mdxToCSF: Fix = { .join('\n'); return dedent` We've detected your project has one or more globs in your 'stories' config that matches .stories.mdx files: - ${chalk.cyan(prettyExistingStoriesEntries)} + ${picocolors.cyan(prettyExistingStoriesEntries)} In Storybook 7, we have deprecated defining stories in MDX files, and consequently have changed the suffix to simply .mdx. Since Storybook 8, we have removed the support of story definition in MDX files entirely. Therefore '.stories.mdx' files aren't supported anymore. @@ -102,11 +102,11 @@ export const mdxToCSF: Fix = { We can automatically migrate your 'stories' config to include any .mdx file instead of just .stories.mdx. That would result in the following 'stories' config: - ${chalk.cyan(prettyNextStoriesEntries)} + ${picocolors.cyan(prettyNextStoriesEntries)} Additionally, we will run the 'mdx-to-csf' codemod for you, which tries to transform '*.stories.mdx' files to '*.stories.js' and '*.mdx' files. - To learn more about this change, see: ${chalk.yellow( + To learn more about this change, see: ${picocolors.yellow( 'https://storybook.js.org/docs/migration-guide#storiesmdx-to-mdxcsf' )} `; diff --git a/code/lib/cli/src/automigrate/fixes/new-frameworks.ts b/code/lib/cli/src/automigrate/fixes/new-frameworks.ts index 97ace48c8ee9..e18c5c137a4c 100644 --- a/code/lib/cli/src/automigrate/fixes/new-frameworks.ts +++ b/code/lib/cli/src/automigrate/fixes/new-frameworks.ts @@ -1,4 +1,4 @@ -import chalk from 'chalk'; +import picocolors from 'picocolors'; import dedent from 'ts-dedent'; import semver from 'semver'; import { frameworkPackages, rendererPackages } from '@storybook/core-common'; @@ -206,13 +206,13 @@ export const newFrameworks: Fix = { if (viteVersion && semver.lt(viteVersion, '3.0.0')) { throw new Error(dedent` - ❌ Your project should be upgraded to use the framework package ${chalk.bold( + ❌ Your project should be upgraded to use the framework package ${picocolors.bold( newFrameworkPackage - )}, but we detected that you are using Vite ${chalk.bold( + )}, but we detected that you are using Vite ${picocolors.bold( viteVersion - )}, which is unsupported since ${chalk.bold( + )}, which is unsupported since ${picocolors.bold( 'Storybook 7.0' - )}. Please upgrade Vite to ${chalk.bold('3.0.0 or higher')} and rerun this migration. + )}. Please upgrade Vite to ${picocolors.bold('3.0.0 or higher')} and rerun this migration. `); } @@ -258,41 +258,47 @@ export const newFrameworks: Fix = { if (dependenciesToRemove.length > 0) { migrationSteps += `- Remove the following dependencies: - ${dependenciesToRemove.map((dep) => `- * ${chalk.cyan(dep)}`).join('\n')}\n`; + ${dependenciesToRemove.map((dep) => `- * ${picocolors.cyan(dep)}`).join('\n')}\n`; } if (dependenciesToAdd.length > 0) { migrationSteps += `- Add the following dependencies: - ${dependenciesToAdd.map((dep) => `- * ${chalk.cyan(dep)}`).join('\n')}\n`; + ${dependenciesToAdd.map((dep) => `- * ${picocolors.cyan(dep)}`).join('\n')}\n`; } if (!hasFrameworkInMainConfig) { - migrationSteps += `- Update or specify the ${chalk.yellow('framework')} field in ${chalk.blue( - mainConfigPath - )} with the value of "${chalk.cyan(frameworkPackage)}".\n`; + migrationSteps += `- Update or specify the ${picocolors.yellow( + 'framework' + )} field in ${picocolors.blue(mainConfigPath)} with the value of "${picocolors.cyan( + frameworkPackage + )}".\n`; } if (Object.keys(rendererOptions).length > 0) { - migrationSteps += `- Move the ${chalk.yellow(`${renderer}Options`)} field in ${chalk.blue( - mainConfigPath - )} to ${chalk.yellow('framework.options')}, and remove that field entirely. - More info: ${chalk.yellow( + migrationSteps += `- Move the ${picocolors.yellow( + `${renderer}Options` + )} field in ${picocolors.blue(mainConfigPath)} to ${picocolors.yellow( + 'framework.options' + )}, and remove that field entirely. + More info: ${picocolors.yellow( 'https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#frameworkoptions-renamed' )}\n`; } if (addonsToRemove.length > 0) { - migrationSteps += `- Remove the following addons from your ${chalk.blue( + migrationSteps += `- Remove the following addons from your ${picocolors.blue( mainConfigPath )}, as the new framework also supports features provided by them: - ${addonsToRemove.map((dep) => `- * ${chalk.cyan(dep)}`).join('\n')} + ${addonsToRemove.map((dep) => `- * ${picocolors.cyan(dep)}`).join('\n')} `; } if (Object.keys(addonOptions).length > 0) { - migrationSteps += `- Move the addon options "${chalk.yellow( + migrationSteps += `- Move the addon options "${picocolors.yellow( Object.keys(addonOptions).join(', ') - )}" in ${chalk.blue(mainConfigPath)} to the ${chalk.yellow('framework.options')} field.\n`; + )}" in ${picocolors.blue(mainConfigPath)} to the ${picocolors.yellow( + 'framework.options' + )} field.\n`; } if (builderConfig) { @@ -300,14 +306,16 @@ export const newFrameworks: Fix = { typeof builderConfig === 'object' && Object.keys(builderConfig.options || {}).length > 0 ) { - migrationSteps += `- Move the ${chalk.yellow('core.builder.options')} field in ${chalk.blue( - mainConfigPath - )} to ${chalk.yellow('framework.options.builder')}\n`; + migrationSteps += `- Move the ${picocolors.yellow( + 'core.builder.options' + )} field in ${picocolors.blue(mainConfigPath)} to ${picocolors.yellow( + 'framework.options.builder' + )}\n`; } - migrationSteps += `- Remove the ${chalk.yellow('core.builder')} field in ${chalk.blue( - mainConfigPath - )}.\n`; + migrationSteps += `- Remove the ${picocolors.yellow( + 'core.builder' + )} field in ${picocolors.blue(mainConfigPath)}.\n`; } if ( @@ -315,47 +323,49 @@ export const newFrameworks: Fix = { dependenciesToRemove.includes('@storybook/manager-webpack4') ) { disclaimer = dedent`\n\n - ${chalk.underline(chalk.bold(chalk.cyan('Webpack 4 users')))} + ${picocolors.underline(picocolors.bold(picocolors.cyan('Webpack 4 users')))} Unless you're using Storybook's Vite builder, this automigration will install a Webpack 5 based framework. Given you were using Storybook's Webpack 4 builder (default in 6.x, discontinued in 7.0), this could be a breaking change -- especially if your project has a custom webpack configuration. - To learn more about migrating from Webpack4, see: ${chalk.yellow( + To learn more about migrating from Webpack4, see: ${picocolors.yellow( 'https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#webpack4-support-discontinued' )}`; } if (metaFramework === 'nextjs') { if (dependenciesToRemove.includes('storybook-addon-next-router')) { - migrationSteps += `- Migrate the usage of the ${chalk.cyan( + migrationSteps += `- Migrate the usage of the ${picocolors.cyan( 'storybook-addon-next-router' - )} addon to use the APIs from the ${chalk.magenta( + )} addon to use the APIs from the ${picocolors.magenta( '@storybook/nextjs' )} framework package instead. Follow the instructions below.`; } if (frameworkPackage === '@storybook/react-vite') { disclaimer = dedent`\n\n - ${chalk.bold('Important')}: We've detected you are using Storybook in a Next.js project. + ${picocolors.bold( + 'Important' + )}: We've detected you are using Storybook in a Next.js project. - This migration is set to update your project to use the ${chalk.magenta( + This migration is set to update your project to use the ${picocolors.magenta( '@storybook/react-vite' - )} framework, but Storybook provides a framework package specifically for Next.js projects: ${chalk.magenta( + )} framework, but Storybook provides a framework package specifically for Next.js projects: ${picocolors.magenta( '@storybook/nextjs' )}. This package provides a better, out of the box experience for Next.js users, however it is only compatible with the Webpack 5 builder, so we can't automigrate for you, as you are using the Vite builder. If you switch this project to use Webpack 5 and rerun this migration, we can update your project. - If you are interested in using this package, see: ${chalk.yellow( + If you are interested in using this package, see: ${picocolors.yellow( 'https://github.com/storybookjs/storybook/blob/next/code/frameworks/nextjs/README.md' )} `; } else if (frameworkPackage === '@storybook/nextjs') { disclaimer = dedent`\n\n - The ${chalk.magenta( + The ${picocolors.magenta( '@storybook/nextjs' - )} package provides great user experience for Next.js users, and we highly recommend you to read more about it at ${chalk.yellow( + )} package provides great user experience for Next.js users, and we highly recommend you to read more about it at ${picocolors.yellow( 'https://github.com/storybookjs/storybook/blob/next/code/frameworks/nextjs/README.md' )} `; @@ -365,31 +375,33 @@ export const newFrameworks: Fix = { if (metaFramework === 'sveltekit') { if (frameworkPackage === '@storybook/svelte-webpack5') { disclaimer = dedent`\n\n - ${chalk.bold('Important')}: We've detected you are using Storybook in a SvelteKit project. + ${picocolors.bold( + 'Important' + )}: We've detected you are using Storybook in a SvelteKit project. - This migration is set to update your project to use the ${chalk.magenta( + This migration is set to update your project to use the ${picocolors.magenta( '@storybook/svelte-webpack5' - )} framework, but Storybook provides a framework package specifically for SvelteKit projects: ${chalk.magenta( + )} framework, but Storybook provides a framework package specifically for SvelteKit projects: ${picocolors.magenta( '@storybook/sveltekit' )}. This package provides a better experience for SvelteKit users, however it is only compatible with the Vite builder, so we can't automigrate for you, as you are using the Webpack builder. - If you are interested in using this package, see: ${chalk.yellow( + If you are interested in using this package, see: ${picocolors.yellow( 'https://github.com/storybookjs/storybook/blob/next/code/frameworks/sveltekit/README.md' )} `; } else { - migrationSteps += `- Remove the ${chalk.yellow( + migrationSteps += `- Remove the ${picocolors.yellow( `${renderer}Options` - )} field from ${chalk.blue(mainConfigPath)}. - More info: ${chalk.yellow( + )} field from ${picocolors.blue(mainConfigPath)}. + More info: ${picocolors.yellow( 'https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#vite-builder-uses-vite-config-automatically' )}\n`; disclaimer = dedent`\n\n - The ${chalk.magenta( + The ${picocolors.magenta( '@storybook/sveltekit' - )} package provides great user experience for SvelteKit users, and we highly recommend you to read more about it at ${chalk.yellow( + )} package provides great user experience for SvelteKit users, and we highly recommend you to read more about it at ${picocolors.yellow( 'https://github.com/storybookjs/storybook/blob/next/code/frameworks/sveltekit/README.md' )} `; @@ -401,14 +413,14 @@ export const newFrameworks: Fix = { Storybook 7 introduced the concept of frameworks, which abstracts configuration for renderers (e.g. React, Vue), builders (e.g. Webpack, Vite) and defaults to make integrations easier. - Your project should be updated to use Storybook's framework: ${chalk.magenta( + Your project should be updated to use Storybook's framework: ${picocolors.magenta( frameworkPackage )}. We can attempt to do this for you automatically. Here are the steps this migration will do to migrate your project: ${migrationSteps} - To learn more about the new framework format, see: ${chalk.yellow( + To learn more about the new framework format, see: ${picocolors.yellow( 'https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#new-framework-api' )}${disclaimer} `; diff --git a/code/lib/cli/src/automigrate/fixes/react-docgen.ts b/code/lib/cli/src/automigrate/fixes/react-docgen.ts index 9359a96bacd9..ee883c512dda 100644 --- a/code/lib/cli/src/automigrate/fixes/react-docgen.ts +++ b/code/lib/cli/src/automigrate/fixes/react-docgen.ts @@ -1,7 +1,7 @@ import { dedent } from 'ts-dedent'; import { getRendererName, updateMainConfig } from '../helpers/mainConfigFile'; import type { Fix } from '../types'; -import chalk from 'chalk'; +import picocolors from 'picocolors'; const logger = console; @@ -46,25 +46,25 @@ export const reactDocgen: Fix = { `; } else { return dedent` - Since Storybook 8.0, ${chalk.cyan( + Since Storybook 8.0, ${picocolors.cyan( 'react-docgen' - )} is now the default for generating component controls, replacing ${chalk.cyan( + )} is now the default for generating component controls, replacing ${picocolors.cyan( 'react-docgen-typescript' )}. This offers better performance and suits most cases. However, for complex TypeScript types or specific type features, the generated controls might not be as precise. For more on this change, check the migration guide: - ${chalk.yellow( + ${picocolors.yellow( 'https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#react-docgen-component-analysis-by-default' )} For known "react-docgen" limitations, see: - ${chalk.yellow('https://github.com/storybookjs/storybook/issues/26606')} + ${picocolors.yellow('https://github.com/storybookjs/storybook/issues/26606')} - Press Y to revert to ${chalk.cyan('react-docgen-typescript')}, press N to use ${chalk.cyan( - 'react-docgen' - )} + Press Y to revert to ${picocolors.cyan( + 'react-docgen-typescript' + )}, press N to use ${picocolors.cyan('react-docgen')} `; } }, diff --git a/code/lib/cli/src/automigrate/fixes/remove-argtypes-regex.ts b/code/lib/cli/src/automigrate/fixes/remove-argtypes-regex.ts index 3220bbeeec9d..67b0ce73c5db 100644 --- a/code/lib/cli/src/automigrate/fixes/remove-argtypes-regex.ts +++ b/code/lib/cli/src/automigrate/fixes/remove-argtypes-regex.ts @@ -4,7 +4,7 @@ import * as babel from '@babel/core'; import type { BabelFile, NodePath } from '@babel/core'; import { babelParse } from '@storybook/csf-tools'; import dedent from 'ts-dedent'; -import chalk from 'chalk'; +import picocolors from 'picocolors'; export const removeArgtypesRegex: Fix<{ argTypesRegex: NodePath; previewConfigPath: string }> = { id: 'remove-argtypes-regex', @@ -35,7 +35,7 @@ export const removeArgtypesRegex: Fix<{ argTypesRegex: NodePath; previewConfigPa }, prompt({ argTypesRegex, previewConfigPath }) { return dedent` - ${chalk.bold('Attention')}: We've detected that you're using argTypesRegex: + ${picocolors.bold('Attention')}: We've detected that you're using argTypesRegex: ${argTypesRegex.buildCodeFrameError(`${previewConfigPath}`).message} @@ -48,12 +48,12 @@ export const removeArgtypesRegex: Fix<{ argTypesRegex: NodePath; previewConfigPa (fn) function to mock your component's methods instead. Use the following command to check for implied mocked actions in your play functions: - ${chalk.cyan( + ${picocolors.cyan( 'npx storybook migrate find-implicit-spies --glob="**/*.stories.@(js|jsx|ts|tsx)"' )} Then, refer to our docs to migrate your play functions to Storybook 8: - ${chalk.yellow( + ${picocolors.yellow( 'https://storybook.js.org/docs/8.0/essentials/actions#via-storybooktest-fn-spy-function' )} `; diff --git a/code/lib/cli/src/automigrate/fixes/remove-global-client-apis.ts b/code/lib/cli/src/automigrate/fixes/remove-global-client-apis.ts index 64de15f9a4b4..97327507af6a 100644 --- a/code/lib/cli/src/automigrate/fixes/remove-global-client-apis.ts +++ b/code/lib/cli/src/automigrate/fixes/remove-global-client-apis.ts @@ -1,4 +1,4 @@ -import chalk from 'chalk'; +import picocolors from 'picocolors'; import dedent from 'ts-dedent'; import { readFile } from 'fs-extra'; import type { Fix } from '../types'; @@ -46,16 +46,18 @@ export const removedGlobalClientAPIs: Fix = { }, prompt({ usedAPIs, previewPath }) { return dedent` - ${chalk.bold( - chalk.red('Attention') + ${picocolors.bold( + picocolors.red('Attention') )}: We could not automatically make this change. You'll need to do it manually. - The following APIs (used in "${chalk.yellow(previewPath)}") have been removed from Storybook: + The following APIs (used in "${picocolors.yellow( + previewPath + )}") have been removed from Storybook: - ${usedAPIs.map((api) => `- ${chalk.cyan(api)}`).join('\n')} + ${usedAPIs.map((api) => `- ${picocolors.cyan(api)}`).join('\n')} Please see the migration guide for more information: - ${chalk.yellow( + ${picocolors.yellow( 'https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#removed-global-client-apis' )} `; diff --git a/code/lib/cli/src/automigrate/fixes/remove-jest-testing-library.ts b/code/lib/cli/src/automigrate/fixes/remove-jest-testing-library.ts index 59ce82d3cbbe..e1a189e70a6c 100644 --- a/code/lib/cli/src/automigrate/fixes/remove-jest-testing-library.ts +++ b/code/lib/cli/src/automigrate/fixes/remove-jest-testing-library.ts @@ -1,4 +1,4 @@ -import chalk from 'chalk'; +import picocolors from 'picocolors'; import dedent from 'ts-dedent'; import type { Fix } from '../types'; import { getStorybookVersionSpecifier } from '../../helpers'; @@ -21,13 +21,13 @@ export const removeJestTestingLibrary: Fix<{ incompatiblePackages: string[] }> = }, prompt({ incompatiblePackages }) { return dedent` - ${chalk.bold( + ${picocolors.bold( 'Attention' )}: We've detected that you're using the following packages which are known to be incompatible since Storybook 8: - ${incompatiblePackages.map((name) => `- ${chalk.cyan(`${name}`)}`).join('\n')} + ${incompatiblePackages.map((name) => `- ${picocolors.cyan(`${name}`)}`).join('\n')} - We will uninstall them for you and install ${chalk.cyan('@storybook/test')} instead. + We will uninstall them for you and install ${picocolors.cyan('@storybook/test')} instead. Also, we can help you migrate your stories to use the new package. `; diff --git a/code/lib/cli/src/automigrate/fixes/sb-binary.ts b/code/lib/cli/src/automigrate/fixes/sb-binary.ts index 53b583b8a58f..3d28edfcbd81 100644 --- a/code/lib/cli/src/automigrate/fixes/sb-binary.ts +++ b/code/lib/cli/src/automigrate/fixes/sb-binary.ts @@ -1,4 +1,4 @@ -import chalk from 'chalk'; +import picocolors from 'picocolors'; import { dedent } from 'ts-dedent'; import type { Fix } from '../types'; import { getStorybookVersionSpecifier } from '../../helpers'; @@ -53,10 +53,10 @@ export const sbBinary: Fix = { }, prompt({ storybookVersion, hasSbBinary, hasStorybookBinary }) { - const sbFormatted = chalk.cyan(`Storybook ${storybookVersion}`); + const sbFormatted = picocolors.cyan(`Storybook ${storybookVersion}`); const storybookBinaryMessage = !hasStorybookBinary - ? `We've detected you are using ${sbFormatted} without Storybook's ${chalk.magenta( + ? `We've detected you are using ${sbFormatted} without Storybook's ${picocolors.magenta( 'storybook' )} binary. Starting in Storybook 7.0, it has to be installed.` : ''; @@ -69,7 +69,7 @@ export const sbBinary: Fix = { ${storybookBinaryMessage} ${extraMessage} - More info: ${chalk.yellow( + More info: ${picocolors.yellow( 'https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#start-storybook--build-storybook-binaries-removed' )} `; diff --git a/code/lib/cli/src/automigrate/fixes/sb-scripts.ts b/code/lib/cli/src/automigrate/fixes/sb-scripts.ts index aad1796b9a38..374c5c6745bd 100644 --- a/code/lib/cli/src/automigrate/fixes/sb-scripts.ts +++ b/code/lib/cli/src/automigrate/fixes/sb-scripts.ts @@ -1,4 +1,4 @@ -import chalk from 'chalk'; +import picocolors from 'picocolors'; import { dedent } from 'ts-dedent'; import semver from 'semver'; import type { PackageJson } from '@storybook/types'; @@ -98,16 +98,16 @@ export const sbScripts: Fix = { }, prompt({ storybookVersion, storybookScripts }) { - const sbFormatted = chalk.cyan(`Storybook ${storybookVersion}`); + const sbFormatted = picocolors.cyan(`Storybook ${storybookVersion}`); const newScriptsMessage = Object.keys(storybookScripts).reduce((acc: string[], scriptKey) => { acc.push( [ - chalk.bold(scriptKey), + picocolors.bold(scriptKey), 'from:', - chalk.cyan(storybookScripts[scriptKey].before), + picocolors.cyan(storybookScripts[scriptKey].before), 'to:', - chalk.cyan(storybookScripts[scriptKey].after), + picocolors.cyan(storybookScripts[scriptKey].after), ].join('\n') ); return acc; @@ -115,16 +115,16 @@ export const sbScripts: Fix = { return dedent` We've detected you are using ${sbFormatted} with scripts from previous versions of Storybook. - Starting in Storybook 7, the ${chalk.yellow('start-storybook')} and ${chalk.yellow( + Starting in Storybook 7, the ${picocolors.yellow('start-storybook')} and ${picocolors.yellow( 'build-storybook' - )} binaries have changed to ${chalk.magenta('storybook dev')} and ${chalk.magenta( + )} binaries have changed to ${picocolors.magenta('storybook dev')} and ${picocolors.magenta( 'storybook build' )} respectively. In order to work with ${sbFormatted}, your storybook scripts have to be adjusted to use the binary. We can adjust them for you: ${newScriptsMessage.join('\n\n')} - In case this migration did not cover all of your scripts, or you'd like more info: ${chalk.yellow( + In case this migration did not cover all of your scripts, or you'd like more info: ${picocolors.yellow( 'https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#start-storybook--build-storybook-binaries-removed' )} `; diff --git a/code/lib/cli/src/automigrate/fixes/storyshots-migration.ts b/code/lib/cli/src/automigrate/fixes/storyshots-migration.ts index deba1b9df901..8045a696a46e 100644 --- a/code/lib/cli/src/automigrate/fixes/storyshots-migration.ts +++ b/code/lib/cli/src/automigrate/fixes/storyshots-migration.ts @@ -1,4 +1,4 @@ -import chalk from 'chalk'; +import picocolors from 'picocolors'; import dedent from 'ts-dedent'; import type { Fix } from '../types'; @@ -20,12 +20,12 @@ export const storyshotsMigration: Fix = { }, prompt() { return dedent` - ${chalk.bold( + ${picocolors.bold( 'Attention' )}: Storyshots is now officially deprecated, is no longer being maintained, and was removed in Storybook 8. We recommend following the migration guide we've prepared to help you during this transition period: - ${chalk.yellow('https://storybook.js.org/docs/writing-tests/storyshots-migration-guide')} + ${picocolors.yellow('https://storybook.js.org/docs/writing-tests/storyshots-migration-guide')} `; }, }; diff --git a/code/lib/cli/src/automigrate/fixes/upgrade-storybook-related-dependencies.ts b/code/lib/cli/src/automigrate/fixes/upgrade-storybook-related-dependencies.ts index c5a9d4218bb5..434204ef0e86 100644 --- a/code/lib/cli/src/automigrate/fixes/upgrade-storybook-related-dependencies.ts +++ b/code/lib/cli/src/automigrate/fixes/upgrade-storybook-related-dependencies.ts @@ -1,5 +1,5 @@ import { dedent } from 'ts-dedent'; -import { cyan, yellow } from 'chalk'; +import { cyan, yellow } from 'picocolors'; import { gt } from 'semver'; import type { JsPackageManager } from '@storybook/core-common'; import { isCorePackage } from '@storybook/core-common'; diff --git a/code/lib/cli/src/automigrate/fixes/vta.ts b/code/lib/cli/src/automigrate/fixes/vta.ts index 468cfacf3238..eaebf13301fa 100644 --- a/code/lib/cli/src/automigrate/fixes/vta.ts +++ b/code/lib/cli/src/automigrate/fixes/vta.ts @@ -1,5 +1,5 @@ import { dedent } from 'ts-dedent'; -import chalk from 'chalk'; +import picocolors from 'picocolors'; import { getAddonNames, updateMainConfig } from '../helpers/mainConfigFile'; import type { Fix } from '../types'; @@ -32,7 +32,7 @@ export const vta: Fix = { return dedent` New to Storybook 8: Storybook's Visual Tests addon helps you catch unintentional changes/bugs in your stories. The addon is powered by Chromatic, a cloud-based testing tool developed by Storybook's core team. - Learn more: ${chalk.yellow('https://storybook.js.org/docs/writing-tests/visual-testing')} + Learn more: ${picocolors.yellow('https://storybook.js.org/docs/writing-tests/visual-testing')} Install Visual Tests addon in your project? `; diff --git a/code/lib/cli/src/automigrate/fixes/vue3.ts b/code/lib/cli/src/automigrate/fixes/vue3.ts index f641b30373de..69038c5a17cd 100644 --- a/code/lib/cli/src/automigrate/fixes/vue3.ts +++ b/code/lib/cli/src/automigrate/fixes/vue3.ts @@ -1,4 +1,4 @@ -import chalk from 'chalk'; +import picocolors from 'picocolors'; import { dedent } from 'ts-dedent'; import semver from 'semver'; import type { Fix } from '../types'; @@ -33,17 +33,17 @@ export const vue3: Fix = { }, prompt({ vueVersion, storybookVersion }) { - const vueFormatted = chalk.cyan(`Vue ${vueVersion}`); - const sbFormatted = chalk.cyan(`Storybook ${storybookVersion}`); + const vueFormatted = picocolors.cyan(`Vue ${vueVersion}`); + const sbFormatted = picocolors.cyan(`Storybook ${storybookVersion}`); return dedent` We've detected you are running ${vueFormatted} with Storybook. ${sbFormatted} runs webpack4 by default, which is incompatible. - In order to work with your version of Vue, we need to install Storybook's ${chalk.cyan( + In order to work with your version of Vue, we need to install Storybook's ${picocolors.cyan( 'webpack5 builder' )}. - More info: ${chalk.yellow( + More info: ${picocolors.yellow( 'https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#vue3-upgrade' )} `; diff --git a/code/lib/cli/src/automigrate/fixes/webpack5-compiler-setup.test.ts b/code/lib/cli/src/automigrate/fixes/webpack5-compiler-setup.test.ts index dcebc1f28b8b..373096a3c214 100644 --- a/code/lib/cli/src/automigrate/fixes/webpack5-compiler-setup.test.ts +++ b/code/lib/cli/src/automigrate/fixes/webpack5-compiler-setup.test.ts @@ -34,8 +34,8 @@ vi.mock('prompts', () => { }; }); -// mock chalk yellow and cyan -vi.mock('chalk', () => { +// mock picocolors yellow and cyan +vi.mock('picocolors', () => { return { default: { yellow: (str: string) => str, diff --git a/code/lib/cli/src/automigrate/fixes/webpack5-compiler-setup.ts b/code/lib/cli/src/automigrate/fixes/webpack5-compiler-setup.ts index d899ee5df3dd..c2dae6bc632b 100644 --- a/code/lib/cli/src/automigrate/fixes/webpack5-compiler-setup.ts +++ b/code/lib/cli/src/automigrate/fixes/webpack5-compiler-setup.ts @@ -17,7 +17,7 @@ import { compilerNameToCoreCompiler, } from '../../project_types'; import dedent from 'ts-dedent'; -import chalk from 'chalk'; +import picocolors from 'picocolors'; import { add } from '../../add'; type Options = { @@ -113,23 +113,23 @@ export const webpack5CompilerSetup = { if (shouldRemoveSWCFlag) { message.push(dedent` We need to update your Storybook configuration for Webpack 5. - The ${chalk.yellow('framework.options.builder.useSWC')} flag will be removed.`); + The ${picocolors.yellow('framework.options.builder.useSWC')} flag will be removed.`); } if (isNextJs) { message.push(dedent` Storybook now detects whether it should use Babel or SWC as a compiler by applying the same logic as Next.js itself:\n - - If you have a ${chalk.yellow('.babelrc')} (or ${chalk.yellow( + - If you have a ${picocolors.yellow('.babelrc')} (or ${picocolors.yellow( 'babel.config.js' )}) file in your project, Storybook will use Babel as the compiler. - - If you have a ${chalk.yellow('.babelrc')} (or ${chalk.yellow( + - If you have a ${picocolors.yellow('.babelrc')} (or ${picocolors.yellow( 'babel.config.js' )}) file in your project and you have set - ${chalk.yellow('experimental.forceSwcTransforms = true')} in your ${chalk.yellow( - 'next.config.js' - )} file, + ${picocolors.yellow( + 'experimental.forceSwcTransforms = true' + )} in your ${picocolors.yellow('next.config.js')} file, Storybook will use SWC as the compiler. - - If you don't have a ${chalk.yellow('.babelrc')} (or ${chalk.yellow( + - If you don't have a ${picocolors.yellow('.babelrc')} (or ${picocolors.yellow( 'babel.config.js' )}) file in your project, Storybook will use SWC as the compiler. `); @@ -140,7 +140,7 @@ export const webpack5CompilerSetup = { - SWC: Fast and easy to configure. Ideal if you want faster builds and have a straightforward configuration without the need for Babel's extensibility.\n In the next step, Storybook will ask you to choose a compiler to automatically set it up for you.\n After the migration, you can switch Webpack5 compilers by swapping the addon in your project. - You can find more information here: ${chalk.yellow( + You can find more information here: ${picocolors.yellow( 'https://storybook.js.org/docs/8.0/builders/webpack#compiler-support' )} `); @@ -150,7 +150,7 @@ export const webpack5CompilerSetup = { We have detected, that you want to use SWC as the compiler for Webpack5.\n In the next step, Storybook will install @storybook/addon-webpack5-compiler-swc and will add it to your addons list in your Storybook config.\n After the migration, you can switch Webpack5 compilers by swapping the addon in your project. - You can find more information here: ${chalk.yellow( + You can find more information here: ${picocolors.yellow( 'https://storybook.js.org/docs/8.0/builders/webpack#compiler-support' )} `); diff --git a/code/lib/cli/src/automigrate/fixes/webpack5.ts b/code/lib/cli/src/automigrate/fixes/webpack5.ts index a2072be41eb9..734c22afb23d 100644 --- a/code/lib/cli/src/automigrate/fixes/webpack5.ts +++ b/code/lib/cli/src/automigrate/fixes/webpack5.ts @@ -1,4 +1,4 @@ -import chalk from 'chalk'; +import picocolors from 'picocolors'; import { dedent } from 'ts-dedent'; import semver from 'semver'; import type { Fix } from '../types'; @@ -42,17 +42,17 @@ export const webpack5 = { }, prompt({ webpackVersion }) { - const webpackFormatted = chalk.cyan(`webpack ${webpackVersion}`); + const webpackFormatted = picocolors.cyan(`webpack ${webpackVersion}`); return dedent` We've detected you're running ${webpackFormatted}. Your Storybook's main.js files specifies webpack4, which is incompatible. - To run Storybook in webpack5-mode, we can install Storybook's ${chalk.cyan( + To run Storybook in webpack5-mode, we can install Storybook's ${picocolors.cyan( '@storybook/builder-webpack5' )} for you. - More info: ${chalk.yellow( + More info: ${picocolors.yellow( 'https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#webpack-5-manager-build' )} `; diff --git a/code/lib/cli/src/automigrate/fixes/wrap-require.ts b/code/lib/cli/src/automigrate/fixes/wrap-require.ts index e241f05858ab..aa0114b5a6ff 100644 --- a/code/lib/cli/src/automigrate/fixes/wrap-require.ts +++ b/code/lib/cli/src/automigrate/fixes/wrap-require.ts @@ -1,4 +1,4 @@ -import chalk from 'chalk'; +import picocolors from 'picocolors'; import { dedent } from 'ts-dedent'; import { readConfig } from '@storybook/csf-tools'; import type { Fix } from '../types'; @@ -48,7 +48,7 @@ export const wrapRequire: Fix = { }, prompt({ storybookVersion, isStorybookInMonorepo }) { - const sbFormatted = chalk.cyan(`Storybook ${storybookVersion}`); + const sbFormatted = picocolors.cyan(`Storybook ${storybookVersion}`); return dedent`We have detected that you're using ${sbFormatted} in a ${ isStorybookInMonorepo ? 'monorepo' : 'PnP' diff --git a/code/lib/cli/src/automigrate/helpers/checkWebpack5Builder.ts b/code/lib/cli/src/automigrate/helpers/checkWebpack5Builder.ts index a350b23fd82b..72aec1db8336 100644 --- a/code/lib/cli/src/automigrate/helpers/checkWebpack5Builder.ts +++ b/code/lib/cli/src/automigrate/helpers/checkWebpack5Builder.ts @@ -1,4 +1,4 @@ -import chalk from 'chalk'; +import picocolors from 'picocolors'; import semver from 'semver'; import dedent from 'ts-dedent'; import type { StorybookConfigRaw } from '@storybook/types'; @@ -20,11 +20,11 @@ export const checkWebpack5Builder = async ({ To upgrade to the latest stable release, run this from your project directory: - ${chalk.cyan('npx storybook@latest upgrade')} + ${picocolors.cyan('npx storybook@latest upgrade')} To upgrade to the latest pre-release, run this from your project directory: - ${chalk.cyan('npx storybook@next upgrade')} + ${picocolors.cyan('npx storybook@next upgrade')} `.trim() ); return null; diff --git a/code/lib/cli/src/automigrate/helpers/eslintPlugin.ts b/code/lib/cli/src/automigrate/helpers/eslintPlugin.ts index 7f238a4f5dbd..f74ca37ec216 100644 --- a/code/lib/cli/src/automigrate/helpers/eslintPlugin.ts +++ b/code/lib/cli/src/automigrate/helpers/eslintPlugin.ts @@ -2,7 +2,7 @@ import fse, { readFile, readJson, writeJson } from 'fs-extra'; import { dedent } from 'ts-dedent'; import detectIndent from 'detect-indent'; import prompts from 'prompts'; -import chalk from 'chalk'; +import picocolors from 'picocolors'; import { readConfig, writeConfig } from '@storybook/csf-tools'; import type { JsPackageManager } from '@storybook/core-common'; @@ -95,7 +95,7 @@ export const suggestESLintPlugin = async (): Promise => { type: 'confirm', name: 'shouldInstall', message: dedent` - We have detected that you're using ESLint. Storybook provides a plugin that gives the best experience with Storybook and helps follow best practices: ${chalk.yellow( + We have detected that you're using ESLint. Storybook provides a plugin that gives the best experience with Storybook and helps follow best practices: ${picocolors.yellow( 'https://github.com/storybookjs/eslint-plugin-storybook#readme' )} diff --git a/code/lib/cli/src/automigrate/helpers/getMigrationSummary.ts b/code/lib/cli/src/automigrate/helpers/getMigrationSummary.ts index e0f708543bef..71d4b12ab0da 100644 --- a/code/lib/cli/src/automigrate/helpers/getMigrationSummary.ts +++ b/code/lib/cli/src/automigrate/helpers/getMigrationSummary.ts @@ -1,4 +1,4 @@ -import chalk from 'chalk'; +import picocolors from 'picocolors'; import boxen from 'boxen'; import dedent from 'ts-dedent'; import { type InstallationMetadata } from '@storybook/core-common'; @@ -15,34 +15,36 @@ function getGlossaryMessages( ) { const messages = []; if (fixSummary.succeeded.length > 0) { - messages.push(chalk.bold('Successful migrations:')); - messages.push(fixSummary.succeeded.map((m) => chalk.green(m)).join(', ')); + messages.push(picocolors.bold('Successful migrations:')); + messages.push(fixSummary.succeeded.map((m) => picocolors.green(m)).join(', ')); } if (Object.keys(fixSummary.failed).length > 0) { - messages.push(chalk.bold('Failed migrations:')); + messages.push(picocolors.bold('Failed migrations:')); messages.push( Object.entries(fixSummary.failed) .map(([id, error]) => { - return `${chalk.redBright(id)}:\n${error}`; + return `${picocolors.redBright(id)}:\n${error}`; }) .join('\n') ); - messages.push(`You can find the full logs in ${chalk.cyan(logFile)}`); + messages.push(`You can find the full logs in ${picocolors.cyan(logFile)}`); } if (fixSummary.manual.length > 0) { - messages.push(chalk.bold('Manual migrations:')); + messages.push(picocolors.bold('Manual migrations:')); messages.push( fixSummary.manual - .map((m) => (fixResults[m] === FixStatus.MANUAL_SUCCEEDED ? chalk.green(m) : chalk.blue(m))) + .map((m) => + fixResults[m] === FixStatus.MANUAL_SUCCEEDED ? picocolors.green(m) : picocolors.blue(m) + ) .join(', ') ); } if (fixSummary.skipped.length > 0) { - messages.push(chalk.bold('Skipped migrations:')); - messages.push(fixSummary.skipped.map((m) => chalk.cyan(m)).join(', ')); + messages.push(picocolors.bold('Skipped migrations:')); + messages.push(fixSummary.skipped.map((m) => picocolors.cyan(m)).join(', ')); } return messages; @@ -62,16 +64,16 @@ export function getMigrationSummary({ const messages = []; messages.push(getGlossaryMessages(fixSummary, fixResults, logFile).join(messageDivider)); - messages.push(dedent`If you'd like to run the migrations again, you can do so by running '${chalk.cyan( + messages.push(dedent`If you'd like to run the migrations again, you can do so by running '${picocolors.cyan( 'npx storybook automigrate' )}' The automigrations try to migrate common patterns in your project, but might not contain everything needed to migrate to the latest version of Storybook. - Please check the changelog and migration guide for manual migrations and more information: ${chalk.yellow( + Please check the changelog and migration guide for manual migrations and more information: ${picocolors.yellow( 'https://storybook.js.org/docs/8.0/migration-guide' )} - And reach out on Discord if you need help: ${chalk.yellow('https://discord.gg/storybook')} + And reach out on Discord if you need help: ${picocolors.yellow('https://discord.gg/storybook')} `); const hasNoFixes = Object.values(fixResults).every((r) => r === FixStatus.UNNECESSARY); diff --git a/code/lib/cli/src/automigrate/helpers/mainConfigFile.ts b/code/lib/cli/src/automigrate/helpers/mainConfigFile.ts index 11a13c127e0e..bd0152d9eca5 100644 --- a/code/lib/cli/src/automigrate/helpers/mainConfigFile.ts +++ b/code/lib/cli/src/automigrate/helpers/mainConfigFile.ts @@ -9,7 +9,7 @@ import { import type { StorybookConfigRaw, StorybookConfig } from '@storybook/types'; import type { ConfigFile } from '@storybook/csf-tools'; import { readConfig, writeConfig as writeConfigFile } from '@storybook/csf-tools'; -import chalk from 'chalk'; +import picocolors from 'picocolors'; import dedent from 'ts-dedent'; import path from 'path'; import type { JsPackageManager } from '@storybook/core-common'; @@ -137,7 +137,7 @@ export const getStorybookData = async ({ mainConfig = (await loadMainConfig({ configDir, noCache: true })) as StorybookConfigRaw; } catch (err) { throw new Error( - dedent`Unable to find or evaluate ${chalk.blue(mainConfigPath)}: ${String(err)}` + dedent`Unable to find or evaluate ${picocolors.blue(mainConfigPath)}: ${String(err)}` ); } @@ -178,13 +178,13 @@ export const updateMainConfig = async ( } } catch (e) { logger.info( - `❌ The migration failed to update your ${chalk.blue( + `❌ The migration failed to update your ${picocolors.blue( mainConfigPath )} on your behalf because of the following error: ${e}\n` ); logger.info( - `⚠️ Storybook automigrations are based on AST parsing and it's possible that your ${chalk.blue( + `⚠️ Storybook automigrations are based on AST parsing and it's possible that your ${picocolors.blue( mainConfigPath )} file contains a non-standard format (e.g. your export is not an object) or that there was an error when parsing dynamic values (e.g. "require" calls, or usage of environment variables). When your main config is non-standard, automigrations are unfortunately not possible. Please follow the instructions given previously and follow the documentation to make the updates manually.` ); diff --git a/code/lib/cli/src/automigrate/index.ts b/code/lib/cli/src/automigrate/index.ts index c5353602dbaa..153ae14198f0 100644 --- a/code/lib/cli/src/automigrate/index.ts +++ b/code/lib/cli/src/automigrate/index.ts @@ -1,5 +1,5 @@ import prompts from 'prompts'; -import chalk from 'chalk'; +import picocolors from 'picocolors'; import boxen from 'boxen'; import { createWriteStream, move, remove } from 'fs-extra'; import { join } from 'path'; @@ -60,7 +60,7 @@ const cleanup = () => { const logAvailableMigrations = () => { const availableFixes = allFixes - .map((f) => chalk.yellow(f.id)) + .map((f) => picocolors.yellow(f.id)) .map((x) => `- ${x}`) .join('\n'); @@ -153,7 +153,7 @@ export const automigrate = async ({ const fixes: Fix[] = fixId ? selectedFixes.filter((f) => f.id === fixId) : selectedFixes; if (fixId && fixes.length === 0) { - logger.info(`📭 No migrations found for ${chalk.magenta(fixId)}.`); + logger.info(`📭 No migrations found for ${picocolors.magenta(fixId)}.`); logAvailableMigrations(); return null; } @@ -264,7 +264,7 @@ export async function runFixes({ }); } } catch (error) { - logger.info(`⚠️ failed to check fix ${chalk.bold(f.id)}`); + logger.info(`⚠️ failed to check fix ${picocolors.bold(f.id)}`); if (error instanceof Error) { logger.error(`\n${error.stack}`); fixSummary.failed[f.id] = error.message; @@ -276,7 +276,7 @@ export async function runFixes({ const promptType: Prompt = typeof f.promptType === 'function' ? await f.promptType(result) : f.promptType ?? 'auto'; - logger.info(`\n🔎 found a '${chalk.cyan(f.id)}' migration:`); + logger.info(`\n🔎 found a '${picocolors.cyan(f.id)}' migration:`); const message = f.prompt(result); const getTitle = () => { @@ -341,7 +341,9 @@ export async function runFixes({ { type: 'confirm', name: 'fix', - message: `Do you want to run the '${chalk.cyan(f.id)}' migration on your project?`, + message: `Do you want to run the '${picocolors.cyan( + f.id + )}' migration on your project?`, initial: f.promptDefaultValue ?? true, }, { @@ -382,7 +384,7 @@ export async function runFixes({ mainConfigPath, skipInstall, }); - logger.info(`✅ ran ${chalk.cyan(f.id)} migration`); + logger.info(`✅ ran ${picocolors.cyan(f.id)} migration`); fixResults[f.id] = FixStatus.SUCCEEDED; fixSummary.succeeded.push(f.id); @@ -391,7 +393,7 @@ export async function runFixes({ fixSummary.failed[f.id] = error instanceof Error ? error.message : 'Failed to run migration'; - logger.info(`❌ error when running ${chalk.cyan(f.id)} migration`); + logger.info(`❌ error when running ${picocolors.cyan(f.id)} migration`); logger.info(error); logger.info(); } diff --git a/code/lib/cli/src/doctor/getDuplicatedDepsWarnings.ts b/code/lib/cli/src/doctor/getDuplicatedDepsWarnings.ts index 272313300728..a447ff97eacf 100644 --- a/code/lib/cli/src/doctor/getDuplicatedDepsWarnings.ts +++ b/code/lib/cli/src/doctor/getDuplicatedDepsWarnings.ts @@ -1,4 +1,4 @@ -import chalk from 'chalk'; +import picocolors from 'picocolors'; import { frameworkPackages, rendererPackages } from '@storybook/core-common'; import type { InstallationMetadata } from '@storybook/core-common'; import { hasMultipleVersions } from './hasMultipleVersions'; @@ -67,9 +67,9 @@ export function getDuplicatedDepsWarnings( const hasMultipleMajorVersions = hasMultipleVersions(packageVersions); if (disallowList.includes(dep) && hasMultipleMajorVersions) { - acc.critical.push(`${chalk.redBright(dep)}:\n${packageVersions.join(', ')}`); + acc.critical.push(`${picocolors.redBright(dep)}:\n${packageVersions.join(', ')}`); } else { - acc.trivial.push(`${chalk.hex('#ff9800')(dep)}:\n${packageVersions.join(', ')}`); + acc.trivial.push(`${picocolors.hex('#ff9800')(dep)}:\n${packageVersions.join(', ')}`); } return acc; @@ -83,7 +83,7 @@ export function getDuplicatedDepsWarnings( if (critical.length > 0) { messages.push( - `${chalk.bold( + `${picocolors.bold( 'Critical:' )} The following dependencies are duplicated and WILL cause unexpected behavior:` ); @@ -92,7 +92,7 @@ export function getDuplicatedDepsWarnings( if (trivial.length > 0) { messages.push( - `${chalk.bold( + `${picocolors.bold( 'Attention:' )} The following dependencies are duplicated which might cause unexpected behavior:` ); @@ -101,14 +101,14 @@ export function getDuplicatedDepsWarnings( messages.push( '\n', - `Please try de-duplicating these dependencies by running ${chalk.cyan( + `Please try de-duplicating these dependencies by running ${picocolors.cyan( `${installationMetadata.dedupeCommand}` )}` ); messages.push( '\n', - `You can find more information for a given dependency by running ${chalk.cyan( + `You can find more information for a given dependency by running ${picocolors.cyan( `${installationMetadata.infoCommand} ` )}` ); diff --git a/code/lib/cli/src/doctor/getIncompatibleStorybookPackages.test.ts b/code/lib/cli/src/doctor/getIncompatibleStorybookPackages.test.ts index 5d5a2d8a6e87..f38326e4dd70 100644 --- a/code/lib/cli/src/doctor/getIncompatibleStorybookPackages.test.ts +++ b/code/lib/cli/src/doctor/getIncompatibleStorybookPackages.test.ts @@ -7,7 +7,7 @@ import { } from './getIncompatibleStorybookPackages'; import type { JsPackageManager } from '@storybook/core-common'; -vi.mock('chalk', () => { +vi.mock('picocolors', () => { return { default: { yellow: (str: string) => str, diff --git a/code/lib/cli/src/doctor/getIncompatibleStorybookPackages.ts b/code/lib/cli/src/doctor/getIncompatibleStorybookPackages.ts index 09f0c40d5bb9..6fe2e5bb3797 100644 --- a/code/lib/cli/src/doctor/getIncompatibleStorybookPackages.ts +++ b/code/lib/cli/src/doctor/getIncompatibleStorybookPackages.ts @@ -1,5 +1,5 @@ /* eslint-disable local-rules/no-uncategorized-errors */ -import chalk from 'chalk'; +import picocolors from 'picocolors'; import semver from 'semver'; import type { JsPackageManager } from '@storybook/core-common'; import { JsPackageManagerFactory, versions as storybookCorePackages } from '@storybook/core-common'; @@ -103,15 +103,15 @@ export const getIncompatiblePackagesSummary = ( if (incompatiblePackages.length > 0) { summaryMessage.push( - `The following packages are incompatible with Storybook ${chalk.bold( + `The following packages are incompatible with Storybook ${picocolors.bold( currentStorybookVersion )} as they depend on different major versions of Storybook packages:` ); incompatiblePackages.forEach( ({ packageName: addonName, packageVersion: addonVersion, homepage, availableUpdate }) => { - const packageDescription = `${chalk.cyan(addonName)}@${chalk.cyan(addonVersion)}`; + const packageDescription = `${picocolors.cyan(addonName)}@${picocolors.cyan(addonVersion)}`; const updateMessage = availableUpdate ? ` (${availableUpdate} available!)` : ''; - const packageRepo = homepage ? `\n Repo: ${chalk.yellow(homepage)}` : ''; + const packageRepo = homepage ? `\n Repo: ${picocolors.yellow(homepage)}` : ''; summaryMessage.push(`- ${packageDescription}${updateMessage}${packageRepo}`); } @@ -121,7 +121,7 @@ export const getIncompatiblePackagesSummary = ( '\n', 'Please consider updating your packages or contacting the maintainers for compatibility details.', 'For more on Storybook 8 compatibility, see the linked GitHub issue:', - chalk.yellow('https://github.com/storybookjs/storybook/issues/26031') + picocolors.yellow('https://github.com/storybookjs/storybook/issues/26031') ); } diff --git a/code/lib/cli/src/doctor/getMismatchingVersionsWarning.ts b/code/lib/cli/src/doctor/getMismatchingVersionsWarning.ts index f8c9e0874a0f..11545df30184 100644 --- a/code/lib/cli/src/doctor/getMismatchingVersionsWarning.ts +++ b/code/lib/cli/src/doctor/getMismatchingVersionsWarning.ts @@ -1,4 +1,4 @@ -import chalk from 'chalk'; +import picocolors from 'picocolors'; import semver from 'semver'; import { frameworkPackages, versions as storybookCorePackages } from '@storybook/core-common'; import type { InstallationMetadata } from '@storybook/core-common'; @@ -40,7 +40,7 @@ export function getMismatchingVersionsWarnings( } messages.push( - `${chalk.bold( + `${picocolors.bold( 'Attention:' )} There seems to be a mismatch between your Storybook package versions. This can result in a broken Storybook installation.` ); @@ -56,9 +56,9 @@ export function getMismatchingVersionsWarnings( } messages.push( - `The version of your storybook core packages should align with ${chalk.yellow( + `The version of your storybook core packages should align with ${picocolors.yellow( versionToCompare - )} (from the ${chalk.cyan(packageToDisplay)} package) or higher.` + )} (from the ${picocolors.cyan(packageToDisplay)} package) or higher.` ); const filteredDependencies = Object.entries(installationMetadata?.dependencies || []).filter( @@ -79,7 +79,7 @@ export function getMismatchingVersionsWarnings( filteredDependencies .map( ([name, dep]) => - `${chalk.hex('#ff9800')(name)}: ${dep[0].version} ${ + `${picocolors.hex('#ff9800')(name)}: ${dep[0].version} ${ allDependencies?.[name] ? packageJsonSuffix : '' }` ) @@ -92,11 +92,11 @@ export function getMismatchingVersionsWarnings( } messages.push( - `You can run ${chalk.cyan( + `You can run ${picocolors.cyan( 'npx storybook@latest upgrade' )} to upgrade all of your Storybook packages to the latest version. - Alternatively you can try manually changing the versions to match in your package.json. We also recommend regenerating your lockfile, or running the following command to possibly deduplicate your Storybook package versions: ${chalk.cyan( + Alternatively you can try manually changing the versions to match in your package.json. We also recommend regenerating your lockfile, or running the following command to possibly deduplicate your Storybook package versions: ${picocolors.cyan( installationMetadata?.dedupeCommand )}` ); diff --git a/code/lib/cli/src/doctor/index.ts b/code/lib/cli/src/doctor/index.ts index 22e47ce7d32c..ef1e23bdeb24 100644 --- a/code/lib/cli/src/doctor/index.ts +++ b/code/lib/cli/src/doctor/index.ts @@ -1,4 +1,4 @@ -import chalk from 'chalk'; +import picocolors from 'picocolors'; import boxen from 'boxen'; import { createWriteStream, move, remove } from 'fs-extra'; import dedent from 'ts-dedent'; @@ -82,7 +82,7 @@ export const doctor = async ({ } catch (err: any) { if (err.message.includes('No configuration files have been found')) { logger.info( - dedent`[Storybook doctor] Could not find or evaluate your Storybook main.js config directory at ${chalk.blue( + dedent`[Storybook doctor] Could not find or evaluate your Storybook main.js config directory at ${picocolors.blue( userSpecifiedConfigDir || '.storybook' )} so the doctor command cannot proceed. You might be running this command in a monorepo or a non-standard project structure. If that is the case, please rerun this command by specifying the path to your Storybook config directory via the --config-dir option.` ); @@ -140,7 +140,7 @@ export const doctor = async ({ } } - const commandMessage = `You can always recheck the health of your project by running:\n${chalk.cyan( + const commandMessage = `You can always recheck the health of your project by running:\n${picocolors.cyan( 'npx storybook doctor' )}`; logger.info(); @@ -149,7 +149,7 @@ export const doctor = async ({ logger.info(commandMessage); logger.info(); - logger.info(`Full logs are available in ${chalk.cyan(LOG_FILE_PATH)}`); + logger.info(`Full logs are available in ${picocolors.cyan(LOG_FILE_PATH)}`); await move(TEMP_LOG_FILE_PATH, join(process.cwd(), LOG_FILE_NAME), { overwrite: true }); } else { diff --git a/code/lib/cli/src/generate.ts b/code/lib/cli/src/generate.ts index a1a3d83ddfbb..3e3b4c755629 100644 --- a/code/lib/cli/src/generate.ts +++ b/code/lib/cli/src/generate.ts @@ -1,5 +1,5 @@ import program from 'commander'; -import chalk from 'chalk'; +import picocolors from 'picocolors'; import envinfo from 'envinfo'; import leven from 'leven'; import { sync as readUpSync } from 'read-pkg-up'; @@ -114,7 +114,7 @@ command('upgrade') command('info') .description('Prints debugging information about the local environment') .action(async () => { - consoleLogger.log(chalk.bold('\nStorybook Environment Info:')); + consoleLogger.log(picocolors.bold('\nStorybook Environment Info:')); const pkgManager = await JsPackageManagerFactory.getPackageManager(); const activePackageManager = pkgManager.type.replace(/\d/, ''); // 'yarn1' -> 'yarn' const output = await envinfo.run({ @@ -128,7 +128,7 @@ command('info') consoleLogger.log( output.replace( activePackageManagerLine, - chalk.bold(`${activePackageManagerLine} <----- active`) + picocolors.bold(`${activePackageManagerLine} <----- active`) ) ); }); @@ -254,7 +254,7 @@ command('dev') ) .action(async (options) => { logger.setLevel(program.loglevel); - consoleLogger.log(chalk.bold(`${pkg.name} v${pkg.version}`) + chalk.reset('\n')); + consoleLogger.log(picocolors.bold(`${pkg.name} v${pkg.version}`) + picocolors.reset('\n')); // The key is the field created in `options` variable for // each command line argument. Value is the env variable. @@ -294,7 +294,7 @@ command('build') .action(async (options) => { process.env.NODE_ENV = process.env.NODE_ENV || 'production'; logger.setLevel(program.loglevel); - consoleLogger.log(chalk.bold(`${pkg.name} v${pkg.version}\n`)); + consoleLogger.log(picocolors.bold(`${pkg.name} v${pkg.version}\n`)); // The key is the field created in `options` variable for // each command line argument. Value is the env variable. diff --git a/code/lib/cli/src/helpers.ts b/code/lib/cli/src/helpers.ts index 5c8351cca7b0..b665c52619d6 100644 --- a/code/lib/cli/src/helpers.ts +++ b/code/lib/cli/src/helpers.ts @@ -1,4 +1,4 @@ -import chalk from 'chalk'; +import picocolors from 'picocolors'; import fs from 'fs'; import fse from 'fs-extra'; import path, { join } from 'path'; @@ -33,7 +33,7 @@ export function readFileAsJson(jsonPath: string, allowComments?: boolean) { try { return JSON.parse(jsonContent); } catch (e) { - logger.error(chalk.red(`Invalid json in file: ${filePath}`)); + logger.error(picocolors.red(`Invalid json in file: ${filePath}`)); throw e; } } diff --git a/code/lib/cli/src/initiate.ts b/code/lib/cli/src/initiate.ts index dabe81cb2fcb..8c764c778851 100644 --- a/code/lib/cli/src/initiate.ts +++ b/code/lib/cli/src/initiate.ts @@ -1,6 +1,6 @@ import { appendFile, readFile } from 'fs/promises'; import findUp from 'find-up'; -import chalk from 'chalk'; +import picocolors from 'picocolors'; import prompts from 'prompts'; import { telemetry } from '@storybook/telemetry'; import { withTelemetry } from '@storybook/core-server'; @@ -184,7 +184,7 @@ const installStorybook = async ( return await runGenerator(); } catch (err: any) { if (err?.message !== 'Canceled by the user' && err?.stack) { - logger.error(`\n ${chalk.red(err.stack)}`); + logger.error(`\n ${picocolors.red(err.stack)}`); } throw new HandledError(err); } @@ -249,15 +249,15 @@ export async function doInitiate(options: CommandOptions): Promise< const borderColor = isOutdated ? '#FC521F' : '#F1618C'; const messages = { - welcome: `Adding Storybook version ${chalk.bold(currentVersion)} to your project..`, - notLatest: chalk.red(dedent` - This version is behind the latest release, which is: ${chalk.bold(latestVersion)}! + welcome: `Adding Storybook version ${picocolors.bold(currentVersion)} to your project..`, + notLatest: picocolors.red(dedent` + This version is behind the latest release, which is: ${picocolors.bold(latestVersion)}! You likely ran the init command through npx, which can use a locally cached version, to get the latest please run: - ${chalk.bold('npx storybook@latest init')} + ${picocolors.bold('npx storybook@latest init')} You may want to CTRL+C to stop, and run with the latest version instead. `), - prelease: chalk.yellow('This is a pre-release version.'), + prelease: picocolors.yellow('This is a pre-release version.'), }; logger.log( @@ -353,22 +353,22 @@ export async function doInitiate(options: CommandOptions): Promise< if (projectType === ProjectType.REACT_NATIVE) { logger.log(dedent` - ${chalk.yellow('NOTE: installation is not 100% automated.')} + ${picocolors.yellow('NOTE: installation is not 100% automated.')} To run Storybook, you will need to: 1. Replace the contents of your app entry with the following - ${chalk.inverse(' ' + "export {default} from './.storybook';" + ' ')} + ${picocolors.inverse(' ' + "export {default} from './.storybook';" + ' ')} 2. Enable transformer.unstable_allowRequireContext in your metro config For a more detailed guide go to: - ${chalk.cyan('https://github.com/storybookjs/react-native#existing-project')} + ${picocolors.cyan('https://github.com/storybookjs/react-native#existing-project')} Then to run your Storybook, type: - ${chalk.inverse(' ' + packageManager.getRunCommand('start') + ' ')} + ${picocolors.inverse(' ' + packageManager.getRunCommand('start') + ' ')} `); @@ -393,12 +393,14 @@ export async function doInitiate(options: CommandOptions): Promise< boxen( dedent` Storybook was successfully installed in your project! 🎉 - To run Storybook manually, run ${chalk.yellow( - chalk.bold(storybookCommand) + To run Storybook manually, run ${picocolors.yellow( + picocolors.bold(storybookCommand) )}. CTRL+C to stop. - Wanna know more about Storybook? Check out ${chalk.cyan('https://storybook.js.org/')} - Having trouble or want to chat? Join us at ${chalk.cyan('https://discord.gg/storybook/')} + Wanna know more about Storybook? Check out ${picocolors.cyan('https://storybook.js.org/')} + Having trouble or want to chat? Join us at ${picocolors.cyan( + 'https://discord.gg/storybook/' + )} `, { borderStyle: 'round', padding: 1, borderColor: '#F1618C' } ) diff --git a/code/lib/cli/src/link.ts b/code/lib/cli/src/link.ts index 3af08643874b..4e242cdb12af 100644 --- a/code/lib/cli/src/link.ts +++ b/code/lib/cli/src/link.ts @@ -2,7 +2,7 @@ import fse from 'fs-extra'; import path from 'path'; import { sync as spawnSync, spawn as spawnAsync } from 'cross-spawn'; import { logger } from '@storybook/node-logger'; -import chalk from 'chalk'; +import picocolors from 'picocolors'; type ExecOptions = Parameters[2]; @@ -44,7 +44,7 @@ export const exec = async ( if (code === 0) { resolve(undefined); } else { - logger.error(chalk.red(`An error occurred while executing: \`${command}\``)); + logger.error(picocolors.red(`An error occurred while executing: \`${command}\``)); if (errorMessage) { logger.info(errorMessage); } diff --git a/code/lib/cli/src/sandbox.ts b/code/lib/cli/src/sandbox.ts index 621d62976c10..08809c31cd37 100644 --- a/code/lib/cli/src/sandbox.ts +++ b/code/lib/cli/src/sandbox.ts @@ -1,6 +1,6 @@ import prompts from 'prompts'; import path from 'path'; -import chalk from 'chalk'; +import picocolors from 'picocolors'; import boxen from 'boxen'; import { dedent } from 'ts-dedent'; import { downloadTemplate } from 'giget'; @@ -56,18 +56,18 @@ export const sandbox = async ({ const branch = isPrerelease ? 'next' : 'main'; const messages = { - welcome: `Creating a Storybook ${chalk.bold(currentVersion)} sandbox..`, - notLatest: chalk.red(dedent` - This version is behind the latest release, which is: ${chalk.bold(latestVersion)}! + welcome: `Creating a Storybook ${picocolors.bold(currentVersion)} sandbox..`, + notLatest: picocolors.red(dedent` + This version is behind the latest release, which is: ${picocolors.bold(latestVersion)}! You likely ran the init command through npx, which can use a locally cached version, to get the latest please run: - ${chalk.bold('npx storybook@latest sandbox')} + ${picocolors.bold('npx storybook@latest sandbox')} You may want to CTRL+C to stop, and run with the latest version instead. `), - longInitTime: chalk.yellow( + longInitTime: picocolors.yellow( 'The creation of the sandbox will take longer, because we will need to run init.' ), - prerelease: chalk.yellow('This is a pre-release version.'), + prerelease: picocolors.yellow('This is a pre-release version.'), }; logger.log( @@ -114,12 +114,12 @@ export const sandbox = async ({ dedent` 🔎 You filtered out all templates. 🔍 - After filtering all the templates with "${chalk.yellow( + After filtering all the templates with "${picocolors.yellow( filterValue )}", we found no results. Please try again with a different filter. Available templates: - ${keys.map((key) => chalk.blue`- ${key}`).join('\n')} + ${keys.map((key) => picocolors.blue`- ${key}`).join('\n')} `.trim(), { borderStyle: 'round', padding: 1, borderColor: '#F1618C' } as any ) @@ -133,9 +133,9 @@ export const sandbox = async ({ logger.info( boxen( dedent` - 🤗 Welcome to ${chalk.yellow('sb sandbox')}! 🤗 + 🤗 Welcome to ${picocolors.yellow('sb sandbox')}! 🤗 - Create a ${chalk.green('new project')} to minimally reproduce Storybook issues. + Create a ${picocolors.green('new project')} to minimally reproduce Storybook issues. 1. select an environment that most closely matches your project setup. 2. select a location for the reproduction, outside of your project. @@ -198,7 +198,7 @@ export const sandbox = async ({ logger.info(`🏃 Adding ${selectedConfig.name} into ${templateDestination}`); - logger.log(`📦 Downloading sandbox template (${chalk.bold(downloadType)})...`); + logger.log(`📦 Downloading sandbox template (${picocolors.bold(downloadType)})...`); try { // Download the sandbox based on subfolder "after-storybook" and selected branch const gitPath = `github:storybookjs/sandboxes/${templateId}/${downloadType}#${branch}`; @@ -208,9 +208,9 @@ export const sandbox = async ({ }); // throw an error if templateDestination is an empty directory using fs-extra if ((await readdir(templateDestination)).length === 0) { - const selected = chalk.yellow(templateId); + const selected = picocolors.yellow(templateId); throw new Error(dedent` - Template downloaded from ${chalk.blue(gitPath)} is empty. + Template downloaded from ${picocolors.blue(gitPath)} is empty. Are you use it exists? Or did you want to set ${selected} to inDevelopment first? `); } @@ -236,23 +236,23 @@ export const sandbox = async ({ } const initMessage = init - ? chalk.yellow(dedent` + ? picocolors.yellow(dedent` yarn install yarn storybook `) - : `Recreate your setup, then ${chalk.yellow(`npx storybook@latest init`)}`; + : `Recreate your setup, then ${picocolors.yellow(`npx storybook@latest init`)}`; logger.info( boxen( dedent` 🎉 Your Storybook reproduction project is ready to use! 🎉 - ${chalk.yellow(`cd ${selectedDirectory}`)} + ${picocolors.yellow(`cd ${selectedDirectory}`)} ${initMessage} Once you've recreated the problem you're experiencing, please: - 1. Document any additional steps in ${chalk.cyan('README.md')} + 1. Document any additional steps in ${picocolors.cyan('README.md')} 2. Publish the repository to github 3. Link to the repro repository in your issue diff --git a/code/lib/cli/src/scaffold-new-project.ts b/code/lib/cli/src/scaffold-new-project.ts index 16ca8b7d444c..49d79e720b6a 100644 --- a/code/lib/cli/src/scaffold-new-project.ts +++ b/code/lib/cli/src/scaffold-new-project.ts @@ -1,5 +1,5 @@ import boxen from 'boxen'; -import chalk from 'chalk'; +import picocolors from 'picocolors'; import execa from 'execa'; import { readdirSync, remove } from 'fs-extra'; import prompts from 'prompts'; @@ -103,7 +103,7 @@ const packageManagerToCoercedName = ( const buildProjectDisplayNameForPrint = ({ displayName }: SupportedProject) => { const { type, builder, language } = displayName; - return `${chalk.bold.blue(type)} ${builder ? `+ ${builder} ` : ''}(${language})`; + return `${picocolors.bold.blue(type)} ${builder ? `+ ${builder} ` : ''}(${language})`; }; /** @@ -122,14 +122,14 @@ export const scaffoldNewProject = async ( dedent` Would you like to generate a new project from the following list? - ${chalk.bold('Note:')} + ${picocolors.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.')} + ${picocolors.bold('Press ^C at any time to quit.')} `, { - title: chalk.bold('🔎 Empty directory detected'), + title: picocolors.bold('🔎 Empty directory detected'), padding: 1, borderStyle: 'double', borderColor: 'yellow', @@ -167,7 +167,7 @@ export const scaffoldNewProject = async ( logger.line(1); logger.plain( - `Creating a new "${projectDisplayName}" project with ${chalk.bold(packageManagerName)}...` + `Creating a new "${projectDisplayName}" project with ${picocolors.bold(packageManagerName)}...` ); logger.line(1); @@ -203,12 +203,14 @@ export const scaffoldNewProject = async ( logger.plain( boxen( dedent` - "${projectDisplayName}" project with ${chalk.bold(packageManagerName)} created successfully! + "${projectDisplayName}" project with ${picocolors.bold( + packageManagerName + )} created successfully! Continuing with Storybook installation... `, { - title: chalk.bold('✅ Success!'), + title: picocolors.bold('✅ Success!'), padding: 1, borderStyle: 'double', borderColor: 'green', diff --git a/code/lib/cli/src/upgrade.ts b/code/lib/cli/src/upgrade.ts index 204e24710c6b..507488b80981 100644 --- a/code/lib/cli/src/upgrade.ts +++ b/code/lib/cli/src/upgrade.ts @@ -10,7 +10,7 @@ import { UpgradeStorybookUnknownCurrentVersionError, } from '@storybook/core-events/server-errors'; -import chalk from 'chalk'; +import picocolors from 'picocolors'; import dedent from 'ts-dedent'; import boxen from 'boxen'; import type { JsPackageManager, PackageManagerName } from '@storybook/core-common'; @@ -165,17 +165,19 @@ export const doUpgrade = async ({ const borderColor = isCLIOutdated ? '#FC521F' : '#F1618C'; const messages = { - welcome: `Upgrading Storybook from version ${chalk.bold(beforeVersion)} to version ${chalk.bold( - currentCLIVersion - )}..`, - notLatest: chalk.red(dedent` - This version is behind the latest release, which is: ${chalk.bold(latestCLIVersionOnNPM)}! + welcome: `Upgrading Storybook from version ${picocolors.bold( + beforeVersion + )} to version ${picocolors.bold(currentCLIVersion)}..`, + notLatest: picocolors.red(dedent` + This version is behind the latest release, which is: ${picocolors.bold( + latestCLIVersionOnNPM + )}! You likely ran the upgrade command through npx, which can use a locally cached version, to upgrade to the latest version please run: - ${chalk.bold('npx storybook@latest upgrade')} + ${picocolors.bold('npx storybook@latest upgrade')} You may want to CTRL+C to stop, and run with the latest version instead. `), - prerelease: chalk.yellow('This is a pre-release version.'), + prerelease: picocolors.yellow('This is a pre-release version.'), }; logger.plain( @@ -246,7 +248,7 @@ export const doUpgrade = async ({ const upgradedDependencies = toUpgradedDependencies(packageJson.dependencies); const upgradedDevDependencies = toUpgradedDependencies(packageJson.devDependencies); - logger.info(`Updating dependencies in ${chalk.cyan('package.json')}..`); + logger.info(`Updating dependencies in ${picocolors.cyan('package.json')}..`); if (upgradedDependencies.length > 0) { await packageManager.addDependencies( { installAsDevDependencies: false, skipInstall: true, packageJson }, diff --git a/code/lib/core-common/package.json b/code/lib/core-common/package.json index e92ee9948da7..aeb46590a1ea 100644 --- a/code/lib/core-common/package.json +++ b/code/lib/core-common/package.json @@ -50,7 +50,6 @@ "@storybook/types": "workspace:*", "@yarnpkg/fslib": "2.10.3", "@yarnpkg/libzip": "2.3.0", - "chalk": "^4.1.0", "cross-spawn": "^7.0.3", "esbuild": "^0.18.0 || ^0.19.0 || ^0.20.0 || ^0.21.0", "esbuild-register": "^3.5.0", @@ -63,6 +62,7 @@ "handlebars": "^4.7.7", "lazy-universal-dotenv": "^4.0.0", "node-fetch": "^2.0.0", + "picocolors": "^1.0.1", "picomatch": "^2.3.0", "pkg-dir": "^5.0.0", "prettier-fallback": "npm:prettier@^3", diff --git a/code/lib/core-common/src/js-package-manager/JsPackageManager.ts b/code/lib/core-common/src/js-package-manager/JsPackageManager.ts index 8f306850b032..ee748f66b604 100644 --- a/code/lib/core-common/src/js-package-manager/JsPackageManager.ts +++ b/code/lib/core-common/src/js-package-manager/JsPackageManager.ts @@ -1,4 +1,4 @@ -import chalk from 'chalk'; +import picocolors from 'picocolors'; import { gt, satisfies } from 'semver'; import type { CommonOptions } from 'execa'; import { command as execaCommand, sync as execaCommandSync } from 'execa'; @@ -392,11 +392,11 @@ export abstract class JsPackageManager { latest = await this.latestVersion(packageName, constraint); } catch (e) { if (current) { - logger.warn(`\n ${chalk.yellow(String(e))}`); + logger.warn(`\n ${picocolors.yellow(String(e))}`); return current; } - logger.error(`\n ${chalk.red(String(e))}`); + logger.error(`\n ${picocolors.red(String(e))}`); throw new HandledError(e); } diff --git a/code/lib/core-common/src/utils/log-config.ts b/code/lib/core-common/src/utils/log-config.ts index 5d50f0285298..aab43e9b29ec 100644 --- a/code/lib/core-common/src/utils/log-config.ts +++ b/code/lib/core-common/src/utils/log-config.ts @@ -1,6 +1,6 @@ -import chalk from 'chalk'; +import picocolors from 'picocolors'; export function logConfig(caption: unknown, config: unknown) { - console.log(chalk.cyan(caption)); + console.log(picocolors.cyan(String(caption))); console.dir(config, { depth: null }); } diff --git a/code/lib/core-common/src/utils/log.ts b/code/lib/core-common/src/utils/log.ts index 43119e616b24..3f7e8d51cb72 100644 --- a/code/lib/core-common/src/utils/log.ts +++ b/code/lib/core-common/src/utils/log.ts @@ -1,15 +1,15 @@ -import chalk from 'chalk'; +import picocolors from 'picocolors'; const logger = console; export const commandLog = (message: string) => { - process.stdout.write(chalk.cyan(' • ') + message); + process.stdout.write(picocolors.cyan(' • ') + message); // Need `void` to be able to use this function in a then of a Promise return (errorMessage?: string | void, errorInfo?: string) => { if (errorMessage) { - process.stdout.write(`. ${chalk.red('✖')}\n`); - logger.error(`\n ${chalk.red(errorMessage)}`); + process.stdout.write(`. ${picocolors.red('✖')}\n`); + logger.error(`\n ${picocolors.red(errorMessage)}`); if (!errorInfo) { return; @@ -17,13 +17,13 @@ export const commandLog = (message: string) => { const newErrorInfo = errorInfo .split('\n') - .map((line) => ` ${chalk.dim(line)}`) + .map((line) => ` ${picocolors.dim(line)}`) .join('\n'); logger.error(`${newErrorInfo}\n`); return; } - process.stdout.write(`. ${chalk.green('✓')}\n`); + process.stdout.write(`. ${picocolors.green('✓')}\n`); }; }; @@ -56,7 +56,7 @@ export function codeLog(codeLines: string[], leftPadAmount?: number) { .map((line) => { const rightPadAmount = maxLength - line.length; let newLine = line + getChars(' ', rightPadAmount); - newLine = getChars(' ', leftPadAmount || 2) + chalk.inverse(` ${newLine} `); + newLine = getChars(' ', leftPadAmount || 2) + picocolors.inverse(` ${newLine} `); return newLine; }) .join('\n'); diff --git a/code/lib/core-common/src/utils/notify-telemetry.ts b/code/lib/core-common/src/utils/notify-telemetry.ts index 53b291b4b6a8..38703a3f09fe 100644 --- a/code/lib/core-common/src/utils/notify-telemetry.ts +++ b/code/lib/core-common/src/utils/notify-telemetry.ts @@ -1,4 +1,4 @@ -import chalk from 'chalk'; +import picocolors from 'picocolors'; import { cache } from './cache'; const TELEMETRY_KEY_NOTIFY_DATE = 'telemetry-notification-date'; @@ -18,14 +18,14 @@ export const notifyTelemetry = async () => { cache.set(TELEMETRY_KEY_NOTIFY_DATE, Date.now().toString()); logger.log( - `${chalk.magenta.bold( - 'Attention' + `${picocolors.magenta( + picocolors.bold('Attention') )}: Storybook now collects completely anonymous telemetry regarding usage.` ); logger.log(`This information is used to shape Storybook's roadmap and prioritize features.`); logger.log( `You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:` ); - logger.log(chalk.cyan('https://storybook.js.org/telemetry')); + logger.log(picocolors.cyan('https://storybook.js.org/telemetry')); logger.log(); }; diff --git a/code/lib/core-events/package.json b/code/lib/core-events/package.json index 24fefcf9b258..0caf1250bbd1 100644 --- a/code/lib/core-events/package.json +++ b/code/lib/core-events/package.json @@ -82,7 +82,7 @@ "ts-dedent": "^2.0.0" }, "devDependencies": { - "chalk": "^4.1.0", + "picocolors": "^1.0.1", "typescript": "^5.3.2" }, "publishConfig": { diff --git a/code/lib/core-events/src/errors/server-errors.ts b/code/lib/core-events/src/errors/server-errors.ts index e6719945d3f6..7a0cd12522a3 100644 --- a/code/lib/core-events/src/errors/server-errors.ts +++ b/code/lib/core-events/src/errors/server-errors.ts @@ -1,4 +1,4 @@ -import { bold, gray, grey, white, yellow, underline } from 'chalk'; +import { bold, gray, white, yellow, underline, cyan } from 'picocolors'; import dedent from 'ts-dedent'; import { StorybookError } from './storybook-error'; @@ -421,11 +421,11 @@ export class MainFileESMOnlyImportError extends StorybookError { if (this.data.line) { message.push( white( - `In your ${yellow(this.data.location)} file, line ${bold.cyan( - this.data.num + `In your ${yellow(this.data.location)} file, line ${bold( + cyan(this.data.num) )} threw an error:` ), - grey(this.data.line) + gray(this.data.line) ); } diff --git a/code/lib/core-server/package.json b/code/lib/core-server/package.json index ae1462790348..222f42b04b22 100644 --- a/code/lib/core-server/package.json +++ b/code/lib/core-server/package.json @@ -79,7 +79,6 @@ "@types/pretty-hrtime": "^1.0.0", "@types/semver": "^7.3.4", "better-opn": "^3.0.2", - "chalk": "^4.1.0", "cli-table3": "^0.6.1", "compression": "^1.7.4", "detect-port": "^1.3.0", @@ -89,6 +88,7 @@ "globby": "^14.0.1", "lodash": "^4.17.21", "open": "^8.4.0", + "picocolors": "^1.0.1", "pretty-hrtime": "^1.0.3", "prompts": "^2.4.0", "read-pkg-up": "^7.0.1", diff --git a/code/lib/core-server/src/build-static.ts b/code/lib/core-server/src/build-static.ts index f1f842eaea28..fb945e98bc9b 100644 --- a/code/lib/core-server/src/build-static.ts +++ b/code/lib/core-server/src/build-static.ts @@ -1,4 +1,4 @@ -import chalk from 'chalk'; +import picocolors from 'picocolors'; import { copy, emptyDir, ensureDir } from 'fs-extra'; import { dirname, join, relative, resolve } from 'path'; import { global } from '@storybook/global'; @@ -36,7 +36,9 @@ export async function buildStaticStandalone(options: BuildStaticStandaloneOption options.outputDir = resolve(options.outputDir); options.configDir = resolve(options.configDir); - logger.info(chalk`=> Cleaning outputDir: {cyan ${relative(process.cwd(), options.outputDir)}}`); + logger.info( + `=> Cleaning outputDir: ${picocolors.cyan(relative(process.cwd(), options.outputDir))}` + ); if (options.outputDir === '/') { throw new Error("Won't remove directory '/'. Check your outputDir!"); } diff --git a/code/lib/core-server/src/utils/StoryIndexGenerator.ts b/code/lib/core-server/src/utils/StoryIndexGenerator.ts index 487447d18f4f..9c9565545911 100644 --- a/code/lib/core-server/src/utils/StoryIndexGenerator.ts +++ b/code/lib/core-server/src/utils/StoryIndexGenerator.ts @@ -1,5 +1,5 @@ import path from 'path'; -import chalk from 'chalk'; +import picocolors from 'picocolors'; import fs from 'fs-extra'; import slash from 'slash'; import invariant from 'tiny-invariant'; @@ -131,7 +131,7 @@ export class StoryIndexGenerator { if (files.length === 0) { once.warn( - `No story files found for the specified pattern: ${chalk.blue( + `No story files found for the specified pattern: ${picocolors.blue( path.join(specifier.directory, specifier.files) )}` ); @@ -495,7 +495,7 @@ export class StoryIndexGenerator { } catch (err) { if (err && (err as { source: any }).source?.match(/mdast-util-mdx-jsx/g)) { logger.warn( - `💡 This seems to be an MDX2 syntax error. Please refer to the MDX section in the following resource for assistance on how to fix this: ${chalk.yellow( + `💡 This seems to be an MDX2 syntax error. Please refer to the MDX section in the following resource for assistance on how to fix this: ${picocolors.yellow( 'https://storybook.js.org/migration-guides/7.0' )}` ); diff --git a/code/lib/core-server/src/utils/copy-all-static-files.ts b/code/lib/core-server/src/utils/copy-all-static-files.ts index 5b0fb5227353..d21b395ce772 100644 --- a/code/lib/core-server/src/utils/copy-all-static-files.ts +++ b/code/lib/core-server/src/utils/copy-all-static-files.ts @@ -1,4 +1,4 @@ -import chalk from 'chalk'; +import picocolors from 'picocolors'; import fs from 'fs-extra'; import { join, relative } from 'path'; import { logger } from '@storybook/node-logger'; @@ -16,9 +16,9 @@ export async function copyAllStaticFiles(staticDirs: any[] | undefined, outputDi // we copy prebuild static files from node_modules/@storybook/manager & preview if (!staticDir.includes('node_modules')) { logger.info( - chalk`=> Copying static files: {cyan ${print(staticDir)}} => {cyan ${print( - targetDir - )}}` + `=> Copying static files: ${picocolors.cyan(print(staticDir))} => ${picocolors.cyan( + print(targetDir) + )}` ); } @@ -61,7 +61,9 @@ export async function copyAllStaticFilesRelativeToMain( const skipPaths = ['index.html', 'iframe.html'].map((f) => join(targetPath, f)); if (!from.includes('node_modules')) { logger.info( - chalk`=> Copying static files: {cyan ${print(from)}} at {cyan ${print(targetPath)}}` + `=> Copying static files: ${picocolors.cyan(print(from))} at ${picocolors.cyan( + print(targetPath) + )}` ); } await fs.copy(from, targetPath, { diff --git a/code/lib/core-server/src/utils/output-startup-information.ts b/code/lib/core-server/src/utils/output-startup-information.ts index bc4af06174ca..12c736331d52 100644 --- a/code/lib/core-server/src/utils/output-startup-information.ts +++ b/code/lib/core-server/src/utils/output-startup-information.ts @@ -1,4 +1,4 @@ -import chalk from 'chalk'; +import picocolors from 'picocolors'; import { colors } from '@storybook/node-logger'; import boxen from 'boxen'; import { dedent } from 'ts-dedent'; @@ -47,13 +47,13 @@ export function outputStartupInformation(options: { }); serveMessage.push( - ['Local:', chalk.cyan(address)], - ['On your network:', chalk.cyan(networkAddress)] + ['Local:', picocolors.cyan(address)], + ['On your network:', picocolors.cyan(networkAddress)] ); const timeStatement = [ - managerTotalTime && `${chalk.underline(prettyTime(managerTotalTime))} for manager`, - previewTotalTime && `${chalk.underline(prettyTime(previewTotalTime))} for preview`, + managerTotalTime && `${picocolors.underline(prettyTime(managerTotalTime))} for manager`, + previewTotalTime && `${picocolors.underline(prettyTime(previewTotalTime))} for preview`, ] .filter(Boolean) .join(' and '); @@ -61,8 +61,10 @@ export function outputStartupInformation(options: { console.log( boxen( dedent` - ${colors.green(`Storybook ${chalk.bold(version)} for ${chalk.bold(name)} started`)} - ${chalk.gray(timeStatement)} + ${colors.green( + `Storybook ${picocolors.bold(version)} for ${picocolors.bold(name)} started` + )} + ${picocolors.gray(timeStatement)} ${serveMessage.toString()}${updateMessage ? `\n\n${updateMessage}` : ''} `, diff --git a/code/lib/core-server/src/utils/output-stats.ts b/code/lib/core-server/src/utils/output-stats.ts index dd560c661bb5..907e8ae2e76a 100644 --- a/code/lib/core-server/src/utils/output-stats.ts +++ b/code/lib/core-server/src/utils/output-stats.ts @@ -1,18 +1,18 @@ import { stringifyStream } from '@discoveryjs/json-ext'; import { logger } from '@storybook/node-logger'; import type { Stats } from '@storybook/types'; -import chalk from 'chalk'; +import picocolors from 'picocolors'; import fs from 'fs-extra'; import path from 'path'; export async function outputStats(directory: string, previewStats?: any, managerStats?: any) { if (previewStats) { const filePath = await writeStats(directory, 'preview', previewStats as Stats); - logger.info(`=> preview stats written to ${chalk.cyan(filePath)}`); + logger.info(`=> preview stats written to ${picocolors.cyan(filePath)}`); } if (managerStats) { const filePath = await writeStats(directory, 'manager', managerStats as Stats); - logger.info(`=> manager stats written to ${chalk.cyan(filePath)}`); + logger.info(`=> manager stats written to ${picocolors.cyan(filePath)}`); } } diff --git a/code/lib/core-server/src/utils/server-statics.ts b/code/lib/core-server/src/utils/server-statics.ts index 2a0b93e1ca41..47dff83e0ca9 100644 --- a/code/lib/core-server/src/utils/server-statics.ts +++ b/code/lib/core-server/src/utils/server-statics.ts @@ -1,7 +1,7 @@ import { logger } from '@storybook/node-logger'; import type { Options } from '@storybook/types'; import { getDirectoryFromWorkingDir } from '@storybook/core-common'; -import chalk from 'chalk'; +import picocolors from 'picocolors'; import type { Router } from 'express'; import express from 'express'; import { pathExists } from 'fs-extra'; @@ -34,7 +34,9 @@ export async function useStatics(router: Router, options: Options) { // Don't log for the internal static dir if (!targetEndpoint.startsWith('/sb-')) { logger.info( - chalk`=> Serving static files from {cyan ${staticDir}} at {cyan ${targetEndpoint}}` + `=> Serving static files from ${picocolors.cyan(staticDir)} at ${picocolors.cyan( + targetEndpoint + )}` ); } @@ -67,8 +69,8 @@ export const parseStaticDir = async (arg: string) => { if (!(await pathExists(staticPath))) { throw new Error( - dedent(chalk` - Failed to load static files, no such directory: {cyan ${staticPath}} + dedent(` + Failed to load static files, no such directory: ${picocolors.cyan(staticPath)} Make sure this directory exists. `) ); diff --git a/code/lib/core-server/src/utils/update-check.ts b/code/lib/core-server/src/utils/update-check.ts index bb387e6e75f2..076127c52983 100644 --- a/code/lib/core-server/src/utils/update-check.ts +++ b/code/lib/core-server/src/utils/update-check.ts @@ -1,5 +1,5 @@ import fetch from 'node-fetch'; -import chalk from 'chalk'; +import picocolors from 'picocolors'; import { colors } from '@storybook/node-logger'; import semver from 'semver'; import { dedent } from 'ts-dedent'; @@ -43,13 +43,13 @@ export function createUpdateMessage(updateInfo: VersionCheck, version: string): updateInfo.success && semver.lt(version, updateInfo.data.latest.version) ? dedent` ${colors.orange( - `A new version (${chalk.bold(updateInfo.data.latest.version)}) is available!` + `A new version (${picocolors.bold(updateInfo.data.latest.version)}) is available!` )} - ${chalk.gray('Upgrade now:')} ${colors.green(upgradeCommand)} + ${picocolors.gray('Upgrade now:')} ${colors.green(upgradeCommand)} - ${chalk.gray('Read full changelog:')} ${chalk.gray.underline( - 'https://github.com/storybookjs/storybook/blob/main/CHANGELOG.md' + ${picocolors.gray('Read full changelog:')} ${picocolors.gray( + picocolors.underline('https://github.com/storybookjs/storybook/blob/main/CHANGELOG.md') )} ` : ''; diff --git a/code/lib/core-server/src/utils/warnWhenUsingArgTypesRegex.ts b/code/lib/core-server/src/utils/warnWhenUsingArgTypesRegex.ts index fa336373a8a4..af87f3d92c93 100644 --- a/code/lib/core-server/src/utils/warnWhenUsingArgTypesRegex.ts +++ b/code/lib/core-server/src/utils/warnWhenUsingArgTypesRegex.ts @@ -5,7 +5,7 @@ import * as babel from '@babel/core'; import type { BabelFile } from '@babel/core'; import { babelParse } from '@storybook/csf-tools'; import dedent from 'ts-dedent'; -import chalk from 'chalk'; +import picocolors from 'picocolors'; export async function warnWhenUsingArgTypesRegex( packageJson: PackageJson, @@ -33,17 +33,17 @@ export async function warnWhenUsingArgTypesRegex( Identifier: (path) => { if (path.node.name === 'argTypesRegex') { const message = dedent` - ${chalk.bold('Attention')}: We've detected that you're using ${chalk.cyan( + ${picocolors.bold('Attention')}: We've detected that you're using ${picocolors.cyan( 'actions.argTypesRegex' )} together with the visual test addon: ${path.buildCodeFrameError(previewConfig).message} - We recommend removing the ${chalk.cyan( + We recommend removing the ${picocolors.cyan( 'argTypesRegex' - )} and assigning explicit action with the ${chalk.cyan( + )} and assigning explicit action with the ${picocolors.cyan( 'fn' - )} function from ${chalk.cyan('@storybook/test')} instead: + )} function from ${picocolors.cyan('@storybook/test')} instead: https://storybook.js.org/docs/essentials/actions#via-storybooktest-fn-spy-function The build used by the addon for snapshot testing doesn't take the regex into account, which can cause hard to debug problems when a snapshot depends on the presence of action props. diff --git a/code/lib/telemetry/package.json b/code/lib/telemetry/package.json index c98d7fc7da3d..7a936749163f 100644 --- a/code/lib/telemetry/package.json +++ b/code/lib/telemetry/package.json @@ -47,10 +47,10 @@ "@storybook/client-logger": "workspace:*", "@storybook/core-common": "workspace:*", "@storybook/csf-tools": "workspace:*", - "chalk": "^4.1.0", "detect-package-manager": "^2.0.1", "fetch-retry": "^5.0.2", "fs-extra": "^11.1.0", + "picocolors": "^1.0.1", "read-pkg-up": "^7.0.1" }, "devDependencies": { diff --git a/code/lib/telemetry/src/notify.ts b/code/lib/telemetry/src/notify.ts index dc57c7ff0003..856617a2e923 100644 --- a/code/lib/telemetry/src/notify.ts +++ b/code/lib/telemetry/src/notify.ts @@ -1,4 +1,4 @@ -import chalk from 'chalk'; +import picocolors from 'picocolors'; import { cache } from '@storybook/core-common'; const TELEMETRY_KEY_NOTIFY_DATE = 'telemetry-notification-date'; @@ -19,14 +19,14 @@ export const notify = async () => { logger.log(); logger.log( - `${chalk.magenta.bold( - 'attention' + `${picocolors.magenta( + picocolors.bold('attention') )} => Storybook now collects completely anonymous telemetry regarding usage.` ); logger.log(`This information is used to shape Storybook's roadmap and prioritize features.`); logger.log( `You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:` ); - logger.log(chalk.cyan('https://storybook.js.org/telemetry')); + logger.log(picocolors.cyan('https://storybook.js.org/telemetry')); logger.log(); }; diff --git a/code/yarn.lock b/code/yarn.lock index da5523a1023d..3f471ba3d000 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -5757,7 +5757,6 @@ __metadata: "@yarnpkg/fslib": "npm:2.10.3" "@yarnpkg/libzip": "npm:2.3.0" boxen: "npm:^7.1.1" - chalk: "npm:^4.1.0" commander: "npm:^6.2.1" cross-spawn: "npm:^7.0.3" detect-indent: "npm:^6.1.0" @@ -5771,6 +5770,7 @@ __metadata: jscodeshift: "npm:^0.15.1" leven: "npm:^3.1.0" ora: "npm:^5.4.1" + picocolors: "npm:^1.0.1" prettier: "npm:^3.1.1" prompts: "npm:^2.4.0" read-pkg-up: "npm:^7.0.1" @@ -5884,7 +5884,6 @@ __metadata: "@types/pretty-hrtime": "npm:^1.0.0" "@yarnpkg/fslib": "npm:2.10.3" "@yarnpkg/libzip": "npm:2.3.0" - chalk: "npm:^4.1.0" cross-spawn: "npm:^7.0.3" esbuild: "npm:^0.18.0 || ^0.19.0 || ^0.20.0 || ^0.21.0" esbuild-register: "npm:^3.5.0" @@ -5898,6 +5897,7 @@ __metadata: lazy-universal-dotenv: "npm:^4.0.0" mock-fs: "npm:^5.2.0" node-fetch: "npm:^2.0.0" + picocolors: "npm:^1.0.1" picomatch: "npm:^2.3.0" pkg-dir: "npm:^5.0.0" prettier-fallback: "npm:prettier@^3" @@ -5925,7 +5925,7 @@ __metadata: resolution: "@storybook/core-events@workspace:lib/core-events" dependencies: "@storybook/csf": "npm:^0.1.8" - chalk: "npm:^4.1.0" + picocolors: "npm:^1.0.1" ts-dedent: "npm:^2.0.0" typescript: "npm:^5.3.2" languageName: unknown @@ -5965,7 +5965,6 @@ __metadata: better-opn: "npm:^3.0.2" boxen: "npm:^7.1.1" camelcase: "npm:^8.0.0" - chalk: "npm:^4.1.0" cli-table3: "npm:^0.6.1" compression: "npm:^1.7.4" detect-port: "npm:^1.3.0" @@ -5976,6 +5975,7 @@ __metadata: lodash: "npm:^4.17.21" node-fetch: "npm:^3.3.1" open: "npm:^8.4.0" + picocolors: "npm:^1.0.1" pretty-hrtime: "npm:^1.0.3" prompts: "npm:^2.4.0" read-pkg-up: "npm:^7.0.1" @@ -7023,12 +7023,12 @@ __metadata: "@storybook/client-logger": "workspace:*" "@storybook/core-common": "workspace:*" "@storybook/csf-tools": "workspace:*" - chalk: "npm:^4.1.0" detect-package-manager: "npm:^2.0.1" fetch-retry: "npm:^5.0.2" fs-extra: "npm:^11.1.0" nanoid: "npm:^4.0.2" node-fetch: "npm:^3.3.1" + picocolors: "npm:^1.0.1" read-pkg-up: "npm:^7.0.1" typescript: "npm:^5.3.2" languageName: unknown @@ -22479,6 +22479,13 @@ __metadata: languageName: node linkType: hard +"picocolors@npm:^1.0.1": + version: 1.0.1 + resolution: "picocolors@npm:1.0.1" + checksum: 10c0/c63cdad2bf812ef0d66c8db29583802355d4ca67b9285d846f390cc15c2f6ccb94e8cb7eb6a6e97fc5990a6d3ad4ae42d86c84d3146e667c739a4234ed50d400 + languageName: node + linkType: hard + "picomatch@npm:4.0.1": version: 4.0.1 resolution: "picomatch@npm:4.0.1" From 050044f47c6e4cf0a9d324784e054a3f74b282eb Mon Sep 17 00:00:00 2001 From: 43081j <43081j@users.noreply.github.com> Date: Sun, 23 Jun 2024 01:08:35 +0100 Subject: [PATCH 02/39] feat: migrate from qs Moves the `manager-api`, `preview-api` and `ui/amanger` to use `picoquery` instead of `qs` - a much smaller and faster alternative. Note that we still have `qs` in our overall monorepo tree, but that can be tackled in a follow-up PR. --- code/lib/manager-api/package.json | 1 - code/lib/preview-api/package.json | 3 +- .../src/modules/preview-web/SelectionStore.ts | 2 +- .../src/modules/preview-web/UrlStore.test.ts | 4 +-- .../src/modules/preview-web/UrlStore.ts | 36 ++++++++++--------- code/lib/router/package.json | 2 +- code/ui/manager/package.json | 2 +- .../preview/utils/stringifyQueryParams.tsx | 4 +-- code/yarn.lock | 28 +++++++++++---- 9 files changed, 49 insertions(+), 33 deletions(-) diff --git a/code/lib/manager-api/package.json b/code/lib/manager-api/package.json index 49270d11882d..5868ec58a2a9 100644 --- a/code/lib/manager-api/package.json +++ b/code/lib/manager-api/package.json @@ -62,7 +62,6 @@ }, "devDependencies": { "@types/lodash": "^4.14.167", - "@types/qs": "^6", "@types/semver": "^7.3.4", "flush-promises": "^1.0.2", "react": "^18.2.0", diff --git a/code/lib/preview-api/package.json b/code/lib/preview-api/package.json index 75415839d0d2..27d13a212ad8 100644 --- a/code/lib/preview-api/package.json +++ b/code/lib/preview-api/package.json @@ -50,11 +50,10 @@ "@storybook/csf": "^0.1.8", "@storybook/global": "^5.0.0", "@storybook/types": "workspace:*", - "@types/qs": "^6.9.5", "dequal": "^2.0.2", "lodash": "^4.17.21", "memoizerific": "^1.11.3", - "qs": "^6.10.0", + "picoquery": "^1.0.0", "tiny-invariant": "^1.3.1", "ts-dedent": "^2.0.0", "util-deprecate": "^1.0.2" diff --git a/code/lib/preview-api/src/modules/preview-web/SelectionStore.ts b/code/lib/preview-api/src/modules/preview-web/SelectionStore.ts index 4faa9cb1089f..4b11ced29088 100644 --- a/code/lib/preview-api/src/modules/preview-web/SelectionStore.ts +++ b/code/lib/preview-api/src/modules/preview-web/SelectionStore.ts @@ -20,5 +20,5 @@ export interface SelectionStore { setSelection(selection: Selection): void; - setQueryParams(queryParams: qs.ParsedQs): void; + setQueryParams(queryParams: Record): void; } diff --git a/code/lib/preview-api/src/modules/preview-web/UrlStore.test.ts b/code/lib/preview-api/src/modules/preview-web/UrlStore.test.ts index cc6e57171968..ca1472e9ff42 100644 --- a/code/lib/preview-api/src/modules/preview-web/UrlStore.test.ts +++ b/code/lib/preview-api/src/modules/preview-web/UrlStore.test.ts @@ -39,7 +39,7 @@ describe('UrlStore', () => { ); }); it('should replace legacy parameters but preserve others', () => { - document.location.search = 'foo=bar&selectedStory=selStory&selectedKind=selKind'; + document.location.search = '?foo=bar&selectedStory=selStory&selectedKind=selKind'; setPath({ storyId: 'story--id', viewMode: 'story' }); expect(history.replaceState).toHaveBeenCalledWith( {}, @@ -48,7 +48,7 @@ describe('UrlStore', () => { ); }); it('should ignore + keep hashes', () => { - document.location.search = 'foo=bar&selectedStory=selStory&selectedKind=selKind'; + document.location.search = '?foo=bar&selectedStory=selStory&selectedKind=selKind'; document.location.hash = '#foobar'; setPath({ storyId: 'story--id', viewMode: 'story' }); expect(history.replaceState).toHaveBeenCalledWith( diff --git a/code/lib/preview-api/src/modules/preview-web/UrlStore.ts b/code/lib/preview-api/src/modules/preview-web/UrlStore.ts index b7890cc3687a..5b211235ef99 100644 --- a/code/lib/preview-api/src/modules/preview-web/UrlStore.ts +++ b/code/lib/preview-api/src/modules/preview-web/UrlStore.ts @@ -1,5 +1,5 @@ import { global } from '@storybook/global'; -import qs from 'qs'; +import * as pq from 'picoquery'; import type { ViewMode } from '@storybook/types'; import { parseArgsParam } from './parseArgsParam'; @@ -20,19 +20,20 @@ const getQueryString = ({ extraParams, }: { selection?: Selection; - extraParams?: qs.ParsedQs; + extraParams?: Record; }) => { - const search = typeof document !== 'undefined' ? document.location.search : ''; - const { path, selectedKind, selectedStory, ...rest } = qs.parse(search, { - ignoreQueryPrefix: true, - }); - return qs.stringify( - { + const search = + typeof document !== 'undefined' && document.location.search + ? document.location.search.slice(1) + : ''; + const { path, selectedKind, selectedStory, ...rest } = pq.parse(search); + return ( + '?' + + pq.stringify({ ...rest, ...extraParams, ...(selection && { id: selection.storyId, viewMode: selection.viewMode }), - }, - { encode: false, addQueryPrefix: true } + }) ); }; @@ -45,10 +46,10 @@ export const setPath = (selection?: Selection) => { }; type ValueOf = T[keyof T]; -const isObject = (val: Record) => +const isObject = (val: Record): val is object => val != null && typeof val === 'object' && Array.isArray(val) === false; -const getFirstString = (v: ValueOf): string | void => { +const getFirstString = (v: ValueOf>): string | void => { if (v === undefined) { return undefined; } @@ -58,15 +59,18 @@ const getFirstString = (v: ValueOf): string | void => { if (Array.isArray(v)) { return getFirstString(v[0]); } - if (isObject(v)) { - return getFirstString(Object.values(v).filter(Boolean) as string[]); + if (isObject(v as Record)) { + return getFirstString( + Object.values(v as Record).filter(Boolean) as string[] + ); } return undefined; }; export const getSelectionSpecifierFromPath: () => SelectionSpecifier | null = () => { if (typeof document !== 'undefined') { - const query = qs.parse(document.location.search, { ignoreQueryPrefix: true }); + const queryStr = document.location.search ? document.location.search.slice(1) : ''; + const query = pq.parse(queryStr); const args = typeof query.args === 'string' ? parseArgsParam(query.args) : undefined; const globals = typeof query.globals === 'string' ? parseArgsParam(query.globals) : undefined; @@ -100,7 +104,7 @@ export class UrlStore implements SelectionStore { setPath(this.selection); } - setQueryParams(queryParams: qs.ParsedQs) { + setQueryParams(queryParams: Record) { const query = getQueryString({ extraParams: queryParams }); const { hash = '' } = document.location; history.replaceState({}, '', `${document.location.pathname}${query}${hash}`); diff --git a/code/lib/router/package.json b/code/lib/router/package.json index c9a4b1bf2888..312a61f703fa 100644 --- a/code/lib/router/package.json +++ b/code/lib/router/package.json @@ -51,7 +51,7 @@ "dependencies": { "@storybook/client-logger": "workspace:*", "memoizerific": "^1.11.3", - "qs": "^6.10.0" + "picoquery": "^1.0.0" }, "devDependencies": { "@storybook/global": "^5.0.0", diff --git a/code/ui/manager/package.json b/code/ui/manager/package.json index a976dab95595..62cbcf87ac97 100644 --- a/code/ui/manager/package.json +++ b/code/ui/manager/package.json @@ -97,8 +97,8 @@ "lodash": "^4.17.21", "markdown-to-jsx": "^7.4.5", "memoizerific": "^1.11.3", + "picoquery": "^1.0.0", "polished": "^4.2.2", - "qs": "^6.10.0", "react": "^18.2.0", "react-dom": "^18.2.0", "react-draggable": "^4.4.5", diff --git a/code/ui/manager/src/components/preview/utils/stringifyQueryParams.tsx b/code/ui/manager/src/components/preview/utils/stringifyQueryParams.tsx index 4175503808bb..f98f5aed2066 100644 --- a/code/ui/manager/src/components/preview/utils/stringifyQueryParams.tsx +++ b/code/ui/manager/src/components/preview/utils/stringifyQueryParams.tsx @@ -1,4 +1,4 @@ -import qs from 'qs'; +import { stringify } from 'picoquery'; export const stringifyQueryParams = (queryParams: Record) => - qs.stringify(queryParams, { addQueryPrefix: true, encode: false }).replace(/^\?/, '&'); + '&' + stringify(queryParams); diff --git a/code/yarn.lock b/code/yarn.lock index da5523a1023d..6eedbb821c1e 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -6232,7 +6232,6 @@ __metadata: "@storybook/theming": "workspace:*" "@storybook/types": "workspace:*" "@types/lodash": "npm:^4.14.167" - "@types/qs": "npm:^6" "@types/semver": "npm:^7.3.4" dequal: "npm:^2.0.2" flush-promises: "npm:^1.0.2" @@ -6277,8 +6276,8 @@ __metadata: lodash: "npm:^4.17.21" markdown-to-jsx: "npm:^7.4.5" memoizerific: "npm:^1.11.3" + picoquery: "npm:^1.0.0" polished: "npm:^4.2.2" - qs: "npm:^6.10.0" react: "npm:^18.2.0" react-dom: "npm:^18.2.0" react-draggable: "npm:^4.4.5" @@ -6568,12 +6567,11 @@ __metadata: "@storybook/csf": "npm:^0.1.8" "@storybook/global": "npm:^5.0.0" "@storybook/types": "workspace:*" - "@types/qs": "npm:^6.9.5" ansi-to-html: "npm:^0.6.11" dequal: "npm:^2.0.2" lodash: "npm:^4.17.21" memoizerific: "npm:^1.11.3" - qs: "npm:^6.10.0" + picoquery: "npm:^1.0.0" slash: "npm:^5.0.0" tiny-invariant: "npm:^1.3.1" ts-dedent: "npm:^2.0.0" @@ -6877,7 +6875,7 @@ __metadata: dequal: "npm:^2.0.2" lodash: "npm:^4.17.21" memoizerific: "npm:^1.11.3" - qs: "npm:^6.10.0" + picoquery: "npm:^1.0.0" react: "npm:^18.2.0" react-dom: "npm:^18.2.0" react-router-dom: "npm:6.0.2" @@ -8191,7 +8189,7 @@ __metadata: languageName: node linkType: hard -"@types/qs@npm:*, @types/qs@npm:^6, @types/qs@npm:^6.9.5": +"@types/qs@npm:*": version: 6.9.10 resolution: "@types/qs@npm:6.9.10" checksum: 10c0/6be12e5f062d1b41eb037d59bf9cb65bc9410cedd5e6da832dfd7c8e2b3f4c91e81c9b90b51811140770e5052c6c4e8361181bd9437ddcd4515dc128b7c00353 @@ -14953,6 +14951,13 @@ __metadata: languageName: node linkType: hard +"fast-decode-uri-component@npm:^1.0.1": + version: 1.0.1 + resolution: "fast-decode-uri-component@npm:1.0.1" + checksum: 10c0/039d50c2e99d64f999c3f2126c23fbf75a04a4117e218a149ca0b1d2aeb8c834b7b19d643b9d35d4eabce357189a6a94085f78cf48869e6e26cc59b036284bc3 + languageName: node + linkType: hard + "fast-deep-equal@npm:^3.1.1, fast-deep-equal@npm:^3.1.3": version: 3.1.3 resolution: "fast-deep-equal@npm:3.1.3" @@ -22493,6 +22498,15 @@ __metadata: languageName: node linkType: hard +"picoquery@npm:^1.0.0": + version: 1.0.0 + resolution: "picoquery@npm:1.0.0" + dependencies: + fast-decode-uri-component: "npm:^1.0.1" + checksum: 10c0/d5d89ca0ce6f150db02175b072eb881460bb3dc2a7a50d55be1b4f05d953136efc3815504d93045c8ba014c318f4a4e1f523b1a960db9db0bde357bca28aacde + languageName: node + linkType: hard + "pidtree@npm:0.6.0": version: 0.6.0 resolution: "pidtree@npm:0.6.0" @@ -23340,7 +23354,7 @@ __metadata: languageName: node linkType: hard -"qs@npm:^6.10.0, qs@npm:^6.10.1, qs@npm:^6.11.2, qs@npm:^6.4.0": +"qs@npm:^6.10.1, qs@npm:^6.11.2, qs@npm:^6.4.0": version: 6.11.2 resolution: "qs@npm:6.11.2" dependencies: From 2b8156a716732d8f74fe00f36eb0e42479df073b Mon Sep 17 00:00:00 2001 From: Michael Shilman Date: Sun, 23 Jun 2024 21:52:36 +0800 Subject: [PATCH 03/39] Use destructured imports --- code/lib/preview-api/src/modules/preview-web/UrlStore.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/lib/preview-api/src/modules/preview-web/UrlStore.ts b/code/lib/preview-api/src/modules/preview-web/UrlStore.ts index 5b211235ef99..b5089b3fd33a 100644 --- a/code/lib/preview-api/src/modules/preview-web/UrlStore.ts +++ b/code/lib/preview-api/src/modules/preview-web/UrlStore.ts @@ -1,5 +1,5 @@ import { global } from '@storybook/global'; -import * as pq from 'picoquery'; +import { parse, stringify } from 'picoquery'; import type { ViewMode } from '@storybook/types'; import { parseArgsParam } from './parseArgsParam'; @@ -26,10 +26,10 @@ const getQueryString = ({ typeof document !== 'undefined' && document.location.search ? document.location.search.slice(1) : ''; - const { path, selectedKind, selectedStory, ...rest } = pq.parse(search); + const { path, selectedKind, selectedStory, ...rest } = parse(search); return ( '?' + - pq.stringify({ + stringify({ ...rest, ...extraParams, ...(selection && { id: selection.storyId, viewMode: selection.viewMode }), @@ -70,7 +70,7 @@ const getFirstString = (v: ValueOf>): string | void export const getSelectionSpecifierFromPath: () => SelectionSpecifier | null = () => { if (typeof document !== 'undefined') { const queryStr = document.location.search ? document.location.search.slice(1) : ''; - const query = pq.parse(queryStr); + const query = parse(queryStr); const args = typeof query.args === 'string' ? parseArgsParam(query.args) : undefined; const globals = typeof query.globals === 'string' ? parseArgsParam(query.globals) : undefined; From 23f28dcd799405167168a1b36e7a19acc8a89b2c Mon Sep 17 00:00:00 2001 From: Michael Shilman Date: Sun, 23 Jun 2024 22:26:34 +0800 Subject: [PATCH 04/39] qs => picoquery --- code/lib/preview-api/src/modules/preview-web/WebView.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/code/lib/preview-api/src/modules/preview-web/WebView.ts b/code/lib/preview-api/src/modules/preview-web/WebView.ts index 82c6a294bf05..3f317701d087 100644 --- a/code/lib/preview-api/src/modules/preview-web/WebView.ts +++ b/code/lib/preview-api/src/modules/preview-web/WebView.ts @@ -2,7 +2,7 @@ import { global } from '@storybook/global'; import { logger } from '@storybook/client-logger'; import AnsiToHtml from 'ansi-to-html'; import { dedent } from 'ts-dedent'; -import qs from 'qs'; +import { parse } from 'picoquery'; import type { PreparedStory } from '@storybook/types'; import type { View } from './View'; @@ -48,9 +48,7 @@ export class WebView implements View { // Special code for testing situations if (typeof document !== 'undefined') { // eslint-disable-next-line @typescript-eslint/naming-convention - const { __SPECIAL_TEST_PARAMETER__ } = qs.parse(document.location.search, { - ignoreQueryPrefix: true, - }); + const { __SPECIAL_TEST_PARAMETER__ } = parse(document.location.search); switch (__SPECIAL_TEST_PARAMETER__) { case 'preparing-story': { this.showPreparingStory(); From 3c04a1e524069de068226faf93a044fb31ce3fbc Mon Sep 17 00:00:00 2001 From: 43081j <43081j@users.noreply.github.com> Date: Mon, 24 Jun 2024 18:03:24 +0100 Subject: [PATCH 05/39] feat: use js syntax in query strings Uses the `foo.bar[0]` syntax picoquery provides, rather than dot-syntax (`foo.bar.0`). --- code/lib/preview-api/package.json | 2 +- code/lib/router/package.json | 2 +- code/lib/router/src/utils.test.ts | 26 ++++++++++++------------- code/lib/router/src/utils.ts | 32 +++++++++++++++++-------------- code/ui/manager/package.json | 2 +- code/yarn.lock | 14 +++++++------- 6 files changed, 41 insertions(+), 37 deletions(-) diff --git a/code/lib/preview-api/package.json b/code/lib/preview-api/package.json index 27d13a212ad8..17e2aace0f67 100644 --- a/code/lib/preview-api/package.json +++ b/code/lib/preview-api/package.json @@ -53,7 +53,7 @@ "dequal": "^2.0.2", "lodash": "^4.17.21", "memoizerific": "^1.11.3", - "picoquery": "^1.0.0", + "picoquery": "^1.3.0", "tiny-invariant": "^1.3.1", "ts-dedent": "^2.0.0", "util-deprecate": "^1.0.2" diff --git a/code/lib/router/package.json b/code/lib/router/package.json index 312a61f703fa..663deceab519 100644 --- a/code/lib/router/package.json +++ b/code/lib/router/package.json @@ -51,7 +51,7 @@ "dependencies": { "@storybook/client-logger": "workspace:*", "memoizerific": "^1.11.3", - "picoquery": "^1.0.0" + "picoquery": "^1.3.0" }, "devDependencies": { "@storybook/global": "^5.0.0", diff --git a/code/lib/router/src/utils.test.ts b/code/lib/router/src/utils.test.ts index e12d257aa316..5eb0571b8f3a 100644 --- a/code/lib/router/src/utils.test.ts +++ b/code/lib/router/src/utils.test.ts @@ -137,12 +137,12 @@ describe('buildArgsParam', () => { it('builds arrays', () => { const param = buildArgsParam({}, { arr: ['1', '2', '3'] }); - expect(param).toEqual('arr[0]:1;arr[1]:2;arr[2]:3'); + expect(param).toEqual('arr%5B0%5D:1;arr%5B1%5D:2;arr%5B2%5D:3'); }); it('builds sparse arrays', () => { const param = buildArgsParam({}, { arr: ['1', , '3'] }); - expect(param).toEqual('arr[0]:1;arr[2]:3'); + expect(param).toEqual('arr%5B0%5D:1;arr%5B2%5D:3'); }); it('builds simple objects', () => { @@ -157,22 +157,22 @@ describe('buildArgsParam', () => { it('builds arrays in objects', () => { const param = buildArgsParam({}, { obj: { foo: ['1', , '3'] } }); - expect(param).toEqual('obj.foo[0]:1;obj.foo[2]:3'); + expect(param).toEqual('obj.foo%5B0%5D:1;obj.foo%5B2%5D:3'); }); it('builds single object in array', () => { const param = buildArgsParam({}, { arr: [{ one: '1', two: '2' }] }); - expect(param).toEqual('arr[0].one:1;arr[0].two:2'); + expect(param).toEqual('arr%5B0%5D.one:1;arr%5B0%5D.two:2'); }); it('builds multiple objects in array', () => { const param = buildArgsParam({}, { arr: [{ one: '1' }, { two: '2' }] }); - expect(param).toEqual('arr[0].one:1;arr[1].two:2'); + expect(param).toEqual('arr%5B0%5D.one:1;arr%5B1%5D.two:2'); }); it('builds nested object in array', () => { const param = buildArgsParam({}, { arr: [{ foo: { bar: 'val' } }] }); - expect(param).toEqual('arr[0].foo.bar:val'); + expect(param).toEqual('arr%5B0%5D.foo.bar:val'); }); it('encodes space as +', () => { @@ -187,7 +187,7 @@ describe('buildArgsParam', () => { it('encodes nested null values as !null', () => { const param = buildArgsParam({}, { foo: { bar: [{ key: null }], baz: null } }); - expect(param).toEqual('foo.bar[0].key:!null;foo.baz:!null'); + expect(param).toEqual('foo.bar%5B0%5D.key:!null;foo.baz:!null'); }); it('encodes hex color values as !hex(value)', () => { @@ -197,17 +197,17 @@ describe('buildArgsParam', () => { it('encodes rgba color values by prefixing and compacting', () => { const param = buildArgsParam({}, { rgb: 'rgb(255, 71, 133)', rgba: 'rgba(255, 71, 133, 0.5)' }); - expect(param).toEqual('rgb:!rgb(255,71,133);rgba:!rgba(255,71,133,0.5)'); + expect(param).toEqual('rgb:!rgb(255%2C71%2C133);rgba:!rgba(255%2C71%2C133%2C0.5)'); }); it('encodes hsla color values by prefixing and compacting', () => { const param = buildArgsParam({}, { hsl: 'hsl(45, 99%, 70%)', hsla: 'hsla(45, 99%, 70%, 0.5)' }); - expect(param).toEqual('hsl:!hsl(45,99,70);hsla:!hsla(45,99,70,0.5)'); + expect(param).toEqual('hsl:!hsl(45%2C99%2C70);hsla:!hsla(45%2C99%2C70%2C0.5)'); }); it('encodes Date objects as !date(ISO string)', () => { const param = buildArgsParam({}, { key: new Date('2001-02-03T04:05:06.789Z') }); - expect(param).toEqual('key:!date(2001-02-03T04:05:06.789Z)'); + expect(param).toEqual('key:!date(2001-02-03T04%3A05%3A06.789Z)'); }); describe('with initial state', () => { @@ -223,7 +223,7 @@ describe('buildArgsParam', () => { it('sets !undefined for removed array values', () => { const param = buildArgsParam({ arr: [1] }, { arr: [] }); - expect(param).toEqual('arr[0]:!undefined'); + expect(param).toEqual('arr%5B0%5D:!undefined'); }); it('sets !undefined for removed object properties', () => { @@ -233,7 +233,7 @@ describe('buildArgsParam', () => { it('omits unchanged array values (yielding sparse arrays)', () => { const param = buildArgsParam({ arr: [1, 2, 3] }, { arr: [1, 3, 4] }); - expect(param).toEqual('arr[1]:3;arr[2]:4'); + expect(param).toEqual('arr%5B1%5D:3;arr%5B2%5D:4'); }); it('omits nested unchanged object properties and array values', () => { @@ -241,7 +241,7 @@ describe('buildArgsParam', () => { { obj: { nested: [{ one: 1 }, { two: 2 }] } }, { obj: { nested: [{ one: 1 }, { two: 2, three: 3 }] } } ); - expect(param).toEqual('obj.nested[1].three:3'); + expect(param).toEqual('obj.nested%5B1%5D.three:3'); }); }); }); diff --git a/code/lib/router/src/utils.ts b/code/lib/router/src/utils.ts index c7cefd89bad3..596188609e0c 100644 --- a/code/lib/router/src/utils.ts +++ b/code/lib/router/src/utils.ts @@ -2,8 +2,8 @@ import { once } from '@storybook/client-logger'; import { dequal as deepEqual } from 'dequal'; import isPlainObject from 'lodash/isPlainObject.js'; import memoize from 'memoizerific'; -import type { IStringifyOptions } from 'qs'; -import qs from 'qs'; +import type { Options as QueryOptions } from 'picoquery'; +import { stringify, parse } from 'picoquery'; import { dedent } from 'ts-dedent'; export interface StoryData { @@ -105,6 +105,10 @@ const encodeSpecialValues = (value: unknown): any => { return `!${value}`; } + if (value instanceof Date) { + return `!date(${value.toISOString()})`; + } + if (Array.isArray(value)) return value.map(encodeSpecialValues); if (isPlainObject(value)) { return Object.entries(value as Record).reduce( @@ -115,12 +119,10 @@ const encodeSpecialValues = (value: unknown): any => { return value; }; -const QS_OPTIONS: IStringifyOptions = { - encode: false, // we handle URL encoding ourselves +const QS_OPTIONS: Partial = { delimiter: ';', // we don't actually create multiple query params - allowDots: true, // encode objects using dot notation: obj.key=val - format: 'RFC1738', // encode spaces using the + sign - serializeDate: (date: Date) => `!date(${date.toISOString()})`, + nesting: true, + nestingSyntax: 'js', // encode objects using dot notation: obj.key=val }; export const buildArgsParam = (initialArgs: Args | undefined, args: Args): string => { const update = deepDiff(initialArgs, args); @@ -136,9 +138,8 @@ export const buildArgsParam = (initialArgs: Args | undefined, args: Args): strin return acc; }, {} as Args); - return qs - .stringify(encodeSpecialValues(object), QS_OPTIONS) - .replace(/ /g, '+') + return stringify(encodeSpecialValues(object), QS_OPTIONS) + .replace(/%20/g, '+') .split(';') .map((part: string) => part.replace('=', ':')) .join(';'); @@ -149,11 +150,14 @@ interface Query { } export const queryFromString = memoize(1000)( - (s?: string): Query => (s !== undefined ? qs.parse(s, { ignoreQueryPrefix: true }) : {}) + (s?: string): Query => (s !== undefined ? parse(s) : {}) ); -export const queryFromLocation = (location: Partial) => queryFromString(location.search); -export const stringifyQuery = (query: Query) => - qs.stringify(query, { addQueryPrefix: true, encode: false }); +export const queryFromLocation = (location: Partial) => + queryFromString(location.search ? location.search.slice(1) : ''); +export const stringifyQuery = (query: Query) => { + const queryStr = stringify(query); + return queryStr ? '?' + queryStr : ''; +}; type Match = { path: string }; diff --git a/code/ui/manager/package.json b/code/ui/manager/package.json index 62cbcf87ac97..05a20747c5e9 100644 --- a/code/ui/manager/package.json +++ b/code/ui/manager/package.json @@ -97,7 +97,7 @@ "lodash": "^4.17.21", "markdown-to-jsx": "^7.4.5", "memoizerific": "^1.11.3", - "picoquery": "^1.0.0", + "picoquery": "^1.3.0", "polished": "^4.2.2", "react": "^18.2.0", "react-dom": "^18.2.0", diff --git a/code/yarn.lock b/code/yarn.lock index 4ae5456b9ac5..c304fd27c3e9 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -6276,7 +6276,7 @@ __metadata: lodash: "npm:^4.17.21" markdown-to-jsx: "npm:^7.4.5" memoizerific: "npm:^1.11.3" - picoquery: "npm:^1.0.0" + picoquery: "npm:^1.3.0" polished: "npm:^4.2.2" react: "npm:^18.2.0" react-dom: "npm:^18.2.0" @@ -6571,7 +6571,7 @@ __metadata: dequal: "npm:^2.0.2" lodash: "npm:^4.17.21" memoizerific: "npm:^1.11.3" - picoquery: "npm:^1.0.0" + picoquery: "npm:^1.3.0" slash: "npm:^5.0.0" tiny-invariant: "npm:^1.3.1" ts-dedent: "npm:^2.0.0" @@ -6875,7 +6875,7 @@ __metadata: dequal: "npm:^2.0.2" lodash: "npm:^4.17.21" memoizerific: "npm:^1.11.3" - picoquery: "npm:^1.0.0" + picoquery: "npm:^1.3.0" react: "npm:^18.2.0" react-dom: "npm:^18.2.0" react-router-dom: "npm:6.0.2" @@ -22481,12 +22481,12 @@ __metadata: languageName: node linkType: hard -"picoquery@npm:^1.0.0": - version: 1.0.0 - resolution: "picoquery@npm:1.0.0" +"picoquery@npm:^1.3.0": + version: 1.3.0 + resolution: "picoquery@npm:1.3.0" dependencies: fast-decode-uri-component: "npm:^1.0.1" - checksum: 10c0/d5d89ca0ce6f150db02175b072eb881460bb3dc2a7a50d55be1b4f05d953136efc3815504d93045c8ba014c318f4a4e1f523b1a960db9db0bde357bca28aacde + checksum: 10c0/7bbd692d3996caff8e19bb0590b925d673ec87bc3c005cce55610c64a7348129bfc6b4f47dcd578ebcf4ea12db958fb004439cf827b67741b927a17f32af00d4 languageName: node linkType: hard From 4474a040197def77a4f53cff86a3904a9197f75b Mon Sep 17 00:00:00 2001 From: 43081j <43081j@users.noreply.github.com> Date: Mon, 24 Jun 2024 19:27:49 +0100 Subject: [PATCH 06/39] feat (preview-api): move to picoquery Moves the preview api to use picoquery. Note that tests will not pass yet. --- .../src/modules/preview-web/parseArgsParam.ts | 25 ++++++++----------- code/lib/router/src/utils.ts | 3 +++ 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/code/lib/preview-api/src/modules/preview-web/parseArgsParam.ts b/code/lib/preview-api/src/modules/preview-web/parseArgsParam.ts index 3212a95b3e96..2e618a82cfc7 100644 --- a/code/lib/preview-api/src/modules/preview-web/parseArgsParam.ts +++ b/code/lib/preview-api/src/modules/preview-web/parseArgsParam.ts @@ -1,4 +1,4 @@ -import qs from 'qs'; +import { parse, type Options } from 'picoquery'; import { dedent } from 'ts-dedent'; import type { Args } from '@storybook/types'; import { once } from '@storybook/client-logger'; @@ -30,17 +30,14 @@ const validateArgs = (key = '', value: unknown): boolean => { return false; }; -const QS_OPTIONS = { +const QS_OPTIONS: Partial = { delimiter: ';', // we're parsing a single query param - allowDots: true, // objects are encoded using dot notation - allowSparse: true, // arrays will be merged on top of their initial value - decoder( - str: string, - defaultDecoder: (str: string, decoder?: any, charset?: string) => string, - charset: string, - type: 'key' | 'value' - ) { - if (type === 'value' && str.startsWith('!')) { + nesting: true, + arrayRepeat: true, + arrayRepeatSyntax: 'bracket', + nestingSyntax: 'js', // objects are encoded using dot notation + valueDeserializer(str: string) { + if (str.startsWith('!')) { if (str === '!undefined') return undefined; if (str === '!null') return null; if (str === '!true') return true; @@ -59,13 +56,13 @@ const QS_OPTIONS = { : `${color[1]}(${color[2]}, ${color[3]}%, ${color[4]}%)`; } } - if (type === 'value' && NUMBER_REGEXP.test(str)) return Number(str); - return defaultDecoder(str, defaultDecoder, charset); + if (NUMBER_REGEXP.test(str)) return Number(str); + return str; }, }; export const parseArgsParam = (argsString: string): Args => { const parts = argsString.split(';').map((part) => part.replace('=', '~').replace(':', '=')); - return Object.entries(qs.parse(parts.join(';'), QS_OPTIONS)).reduce((acc, [key, value]) => { + return Object.entries(parse(parts.join(';'), QS_OPTIONS)).reduce((acc, [key, value]) => { if (validateArgs(key, value)) return Object.assign(acc, { [key]: value }); once.warn(dedent` Omitted potentially unsafe URL args. diff --git a/code/lib/router/src/utils.ts b/code/lib/router/src/utils.ts index 596188609e0c..b7d1097e27e3 100644 --- a/code/lib/router/src/utils.ts +++ b/code/lib/router/src/utils.ts @@ -92,6 +92,9 @@ const validateArgs = (key = '', value: unknown): boolean => { return false; }; +// Note this isn't a picoquery serializer because pq will turn any object +// into a nested key internally. So we need to deal witth things like `Date` +// up front. const encodeSpecialValues = (value: unknown): any => { if (value === undefined) return '!undefined'; if (value === null) return '!null'; From fcce3bbb3882e820cb883064451e6bce28747d5c Mon Sep 17 00:00:00 2001 From: 43081j <43081j@users.noreply.github.com> Date: Tue, 25 Jun 2024 17:31:44 +0100 Subject: [PATCH 07/39] fix: decode some known query string chars Decodes certain chars we want to keep in our URIs (e.g. `[`). --- .../src/modules/preview-web/UrlStore.ts | 21 ++++++--------- code/lib/router/src/utils.test.ts | 26 +++++++++---------- code/lib/router/src/utils.ts | 24 ++++++++++++++++- 3 files changed, 44 insertions(+), 27 deletions(-) diff --git a/code/lib/preview-api/src/modules/preview-web/UrlStore.ts b/code/lib/preview-api/src/modules/preview-web/UrlStore.ts index b5089b3fd33a..72da8f23fe72 100644 --- a/code/lib/preview-api/src/modules/preview-web/UrlStore.ts +++ b/code/lib/preview-api/src/modules/preview-web/UrlStore.ts @@ -22,19 +22,14 @@ const getQueryString = ({ selection?: Selection; extraParams?: Record; }) => { - const search = - typeof document !== 'undefined' && document.location.search - ? document.location.search.slice(1) - : ''; + const search = document?.location.search.slice(1); const { path, selectedKind, selectedStory, ...rest } = parse(search); - return ( - '?' + - stringify({ - ...rest, - ...extraParams, - ...(selection && { id: selection.storyId, viewMode: selection.viewMode }), - }) - ); + const queryStr = stringify({ + ...rest, + ...extraParams, + ...(selection && { id: selection.storyId, viewMode: selection.viewMode }), + }); + return `?${queryStr}`; }; export const setPath = (selection?: Selection) => { @@ -69,7 +64,7 @@ const getFirstString = (v: ValueOf>): string | void export const getSelectionSpecifierFromPath: () => SelectionSpecifier | null = () => { if (typeof document !== 'undefined') { - const queryStr = document.location.search ? document.location.search.slice(1) : ''; + const queryStr = document.location.search.slice(1); const query = parse(queryStr); const args = typeof query.args === 'string' ? parseArgsParam(query.args) : undefined; const globals = typeof query.globals === 'string' ? parseArgsParam(query.globals) : undefined; diff --git a/code/lib/router/src/utils.test.ts b/code/lib/router/src/utils.test.ts index 5eb0571b8f3a..e12d257aa316 100644 --- a/code/lib/router/src/utils.test.ts +++ b/code/lib/router/src/utils.test.ts @@ -137,12 +137,12 @@ describe('buildArgsParam', () => { it('builds arrays', () => { const param = buildArgsParam({}, { arr: ['1', '2', '3'] }); - expect(param).toEqual('arr%5B0%5D:1;arr%5B1%5D:2;arr%5B2%5D:3'); + expect(param).toEqual('arr[0]:1;arr[1]:2;arr[2]:3'); }); it('builds sparse arrays', () => { const param = buildArgsParam({}, { arr: ['1', , '3'] }); - expect(param).toEqual('arr%5B0%5D:1;arr%5B2%5D:3'); + expect(param).toEqual('arr[0]:1;arr[2]:3'); }); it('builds simple objects', () => { @@ -157,22 +157,22 @@ describe('buildArgsParam', () => { it('builds arrays in objects', () => { const param = buildArgsParam({}, { obj: { foo: ['1', , '3'] } }); - expect(param).toEqual('obj.foo%5B0%5D:1;obj.foo%5B2%5D:3'); + expect(param).toEqual('obj.foo[0]:1;obj.foo[2]:3'); }); it('builds single object in array', () => { const param = buildArgsParam({}, { arr: [{ one: '1', two: '2' }] }); - expect(param).toEqual('arr%5B0%5D.one:1;arr%5B0%5D.two:2'); + expect(param).toEqual('arr[0].one:1;arr[0].two:2'); }); it('builds multiple objects in array', () => { const param = buildArgsParam({}, { arr: [{ one: '1' }, { two: '2' }] }); - expect(param).toEqual('arr%5B0%5D.one:1;arr%5B1%5D.two:2'); + expect(param).toEqual('arr[0].one:1;arr[1].two:2'); }); it('builds nested object in array', () => { const param = buildArgsParam({}, { arr: [{ foo: { bar: 'val' } }] }); - expect(param).toEqual('arr%5B0%5D.foo.bar:val'); + expect(param).toEqual('arr[0].foo.bar:val'); }); it('encodes space as +', () => { @@ -187,7 +187,7 @@ describe('buildArgsParam', () => { it('encodes nested null values as !null', () => { const param = buildArgsParam({}, { foo: { bar: [{ key: null }], baz: null } }); - expect(param).toEqual('foo.bar%5B0%5D.key:!null;foo.baz:!null'); + expect(param).toEqual('foo.bar[0].key:!null;foo.baz:!null'); }); it('encodes hex color values as !hex(value)', () => { @@ -197,17 +197,17 @@ describe('buildArgsParam', () => { it('encodes rgba color values by prefixing and compacting', () => { const param = buildArgsParam({}, { rgb: 'rgb(255, 71, 133)', rgba: 'rgba(255, 71, 133, 0.5)' }); - expect(param).toEqual('rgb:!rgb(255%2C71%2C133);rgba:!rgba(255%2C71%2C133%2C0.5)'); + expect(param).toEqual('rgb:!rgb(255,71,133);rgba:!rgba(255,71,133,0.5)'); }); it('encodes hsla color values by prefixing and compacting', () => { const param = buildArgsParam({}, { hsl: 'hsl(45, 99%, 70%)', hsla: 'hsla(45, 99%, 70%, 0.5)' }); - expect(param).toEqual('hsl:!hsl(45%2C99%2C70);hsla:!hsla(45%2C99%2C70%2C0.5)'); + expect(param).toEqual('hsl:!hsl(45,99,70);hsla:!hsla(45,99,70,0.5)'); }); it('encodes Date objects as !date(ISO string)', () => { const param = buildArgsParam({}, { key: new Date('2001-02-03T04:05:06.789Z') }); - expect(param).toEqual('key:!date(2001-02-03T04%3A05%3A06.789Z)'); + expect(param).toEqual('key:!date(2001-02-03T04:05:06.789Z)'); }); describe('with initial state', () => { @@ -223,7 +223,7 @@ describe('buildArgsParam', () => { it('sets !undefined for removed array values', () => { const param = buildArgsParam({ arr: [1] }, { arr: [] }); - expect(param).toEqual('arr%5B0%5D:!undefined'); + expect(param).toEqual('arr[0]:!undefined'); }); it('sets !undefined for removed object properties', () => { @@ -233,7 +233,7 @@ describe('buildArgsParam', () => { it('omits unchanged array values (yielding sparse arrays)', () => { const param = buildArgsParam({ arr: [1, 2, 3] }, { arr: [1, 3, 4] }); - expect(param).toEqual('arr%5B1%5D:3;arr%5B2%5D:4'); + expect(param).toEqual('arr[1]:3;arr[2]:4'); }); it('omits nested unchanged object properties and array values', () => { @@ -241,7 +241,7 @@ describe('buildArgsParam', () => { { obj: { nested: [{ one: 1 }, { two: 2 }] } }, { obj: { nested: [{ one: 1 }, { two: 2, three: 3 }] } } ); - expect(param).toEqual('obj.nested%5B1%5D.three:3'); + expect(param).toEqual('obj.nested[1].three:3'); }); }); }); diff --git a/code/lib/router/src/utils.ts b/code/lib/router/src/utils.ts index b7d1097e27e3..ac141c3a0b3b 100644 --- a/code/lib/router/src/utils.ts +++ b/code/lib/router/src/utils.ts @@ -127,6 +127,28 @@ const QS_OPTIONS: Partial = { nesting: true, nestingSyntax: 'js', // encode objects using dot notation: obj.key=val }; + +// Replaces some url-encoded characters with their decoded equivalents. +// The URI RFC specifies these should be encoded, but all browsers will +// tolerate them being decoded, so we opt to go with it for cleaner looking +// URIs. +const decodeKnownQueryChar = (chr: string) => { + switch (chr) { + case '%20': + return '+'; + case '%5B': + return '['; + case '%5D': + return ']'; + case '%2C': + return ','; + case '%3A': + return ':'; + } + return chr; +}; +const knownQueryChar = /%[0-9A-F]{2}/g; + export const buildArgsParam = (initialArgs: Args | undefined, args: Args): string => { const update = deepDiff(initialArgs, args); if (!update || update === DEEPLY_EQUAL) return ''; @@ -142,7 +164,7 @@ export const buildArgsParam = (initialArgs: Args | undefined, args: Args): strin }, {} as Args); return stringify(encodeSpecialValues(object), QS_OPTIONS) - .replace(/%20/g, '+') + .replace(knownQueryChar, decodeKnownQueryChar) .split(';') .map((part: string) => part.replace('=', ':')) .join(';'); From 13053d7a2deb1535b34bc52e6d49f625c50cbd95 Mon Sep 17 00:00:00 2001 From: 43081j <43081j@users.noreply.github.com> Date: Sun, 28 Jul 2024 10:49:07 +0100 Subject: [PATCH 08/39] test: fix parseArgsParam tests --- code/core/package.json | 2 +- .../preview-web/parseArgsParam.test.ts | 21 +- code/yarn.lock | 189 ++++++++++++++++-- 3 files changed, 181 insertions(+), 31 deletions(-) diff --git a/code/core/package.json b/code/core/package.json index 2882c273f465..42d351ffc5e8 100644 --- a/code/core/package.json +++ b/code/core/package.json @@ -352,7 +352,7 @@ "npmlog": "^7.0.0", "open": "^8.4.0", "picomatch": "^2.3.0", - "picoquery": "^1.3.0", + "picoquery": "^1.4.0", "polished": "^4.2.2", "prettier": "^3.2.5", "pretty-hrtime": "^1.0.3", diff --git a/code/core/src/preview-api/modules/preview-web/parseArgsParam.test.ts b/code/core/src/preview-api/modules/preview-web/parseArgsParam.test.ts index f72df087ddcd..e484b511d3cd 100644 --- a/code/core/src/preview-api/modules/preview-web/parseArgsParam.test.ts +++ b/code/core/src/preview-api/modules/preview-web/parseArgsParam.test.ts @@ -57,7 +57,7 @@ describe('parseArgsParam', () => { }); it('parses Date with timezone offset', () => { - const args = parseArgsParam('key:!date(2001-02-03T04:05:06.789+09:00)'); + const args = parseArgsParam('key:!date(2001-02-03T04:05:06.789%2B09:00)'); expect(args).toStrictEqual({ key: new Date('2001-02-03T04:05:06.789+09:00') }); }); @@ -126,7 +126,7 @@ describe('parseArgsParam', () => { }); it('parses single object in array', () => { - const args = parseArgsParam('arr[].one:A;arr[].two:B'); + const args = parseArgsParam('arr[0].one:A;arr[0].two:B'); expect(args).toStrictEqual({ arr: [{ one: 'A', two: 'B' }] }); }); @@ -134,14 +134,10 @@ describe('parseArgsParam', () => { expect(parseArgsParam('arr[0].key:A;arr[1].key:B')).toStrictEqual({ arr: [{ key: 'A' }, { key: 'B' }], }); - expect(parseArgsParam('arr[0][key]:A;arr[1][key]:B')).toStrictEqual({ - arr: [{ key: 'A' }, { key: 'B' }], - }); }); it('parses nested object in array', () => { - expect(parseArgsParam('arr[].foo.bar:val')).toStrictEqual({ arr: [{ foo: { bar: 'val' } }] }); - expect(parseArgsParam('arr[][foo][bar]:val')).toStrictEqual({ arr: [{ foo: { bar: 'val' } }] }); + expect(parseArgsParam('arr[0].foo.bar:val')).toStrictEqual({ arr: [{ foo: { bar: 'val' } }] }); }); describe('key sanitization', () => { @@ -163,8 +159,6 @@ describe('parseArgsParam', () => { expect(parseArgsParam('a/b:val')).toStrictEqual({}); expect(parseArgsParam('a\\b:val')).toStrictEqual({}); expect(parseArgsParam('a|b:val')).toStrictEqual({}); - expect(parseArgsParam('a[b:val')).toStrictEqual({}); - expect(parseArgsParam('a]b:val')).toStrictEqual({}); expect(parseArgsParam('a{b:val')).toStrictEqual({}); expect(parseArgsParam('a}b:val')).toStrictEqual({}); expect(parseArgsParam('a?b:val')).toStrictEqual({}); @@ -184,14 +178,10 @@ describe('parseArgsParam', () => { it('also applies to nested object keys', () => { expect(parseArgsParam('obj.a!b:val')).toStrictEqual({}); - expect(parseArgsParam('obj[a!b]:val')).toStrictEqual({}); - expect(parseArgsParam('arr[][a!b]:val')).toStrictEqual({}); - expect(parseArgsParam('arr[0][a!b]:val')).toStrictEqual({}); }); it('completely omits an arg when a (deeply) nested key is invalid', () => { expect(parseArgsParam('obj.foo.a!b:val;obj.foo.bar:val;obj.baz:val')).toStrictEqual({}); - expect(parseArgsParam('obj.foo[][a!b]:val;obj.foo.bar:val;obj.baz:val')).toStrictEqual({}); expect(parseArgsParam('obj.foo.a!b:val;key:val')).toStrictEqual({ key: 'val' }); }); }); @@ -246,9 +236,6 @@ describe('parseArgsParam', () => { it('also applies to nested object and array values', () => { expect(parseArgsParam('obj.key:a!b')).toStrictEqual({}); - expect(parseArgsParam('obj[key]:a!b')).toStrictEqual({}); - expect(parseArgsParam('arr[][key]:a!b')).toStrictEqual({}); - expect(parseArgsParam('arr[0][key]:a!b')).toStrictEqual({}); expect(parseArgsParam('arr[]:a!b')).toStrictEqual({}); expect(parseArgsParam('arr[0]:a!b')).toStrictEqual({}); }); @@ -257,7 +244,7 @@ describe('parseArgsParam', () => { expect(parseArgsParam('obj.key:a!b;obj.foo:val;obj.bar.baz:val')).toStrictEqual({}); expect(parseArgsParam('obj.arr[]:a!b;obj.foo:val;obj.bar.baz:val')).toStrictEqual({}); expect(parseArgsParam('obj.arr[0]:val;obj.arr[1]:a!b;obj.foo:val')).toStrictEqual({}); - expect(parseArgsParam('obj.arr[][one]:a!b;obj.arr[][two]:val')).toStrictEqual({}); + expect(parseArgsParam('obj.arr[]:a!b;obj.arr[]:val')).toStrictEqual({}); expect(parseArgsParam('arr[]:val;arr[]:a!b;key:val')).toStrictEqual({ key: 'val' }); expect(parseArgsParam('arr[0]:val;arr[1]:a!1;key:val')).toStrictEqual({ key: 'val' }); expect(parseArgsParam('arr[0]:val;arr[2]:a!1;key:val')).toStrictEqual({ key: 'val' }); diff --git a/code/yarn.lock b/code/yarn.lock index af1e1c14190b..092f5969f580 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -370,6 +370,16 @@ __metadata: languageName: node linkType: hard +"@babel/code-frame@npm:^7.24.1": + version: 7.24.2 + resolution: "@babel/code-frame@npm:7.24.2" + dependencies: + "@babel/highlight": "npm:^7.24.2" + picocolors: "npm:^1.0.0" + checksum: 10c0/d1d4cba89475ab6aab7a88242e1fd73b15ecb9f30c109b69752956434d10a26a52cbd37727c4eca104b6d45227bd1dfce39a6a6f4a14c9b2f07f871e968cf406 + languageName: node + linkType: hard + "@babel/compat-data@npm:^7.22.6, @babel/compat-data@npm:^7.23.5, @babel/compat-data@npm:^7.24.4, @babel/compat-data@npm:^7.24.7": version: 7.24.7 resolution: "@babel/compat-data@npm:7.24.7" @@ -470,6 +480,18 @@ __metadata: languageName: node linkType: hard +"@babel/generator@npm:^7.24.1": + version: 7.24.4 + resolution: "@babel/generator@npm:7.24.4" + dependencies: + "@babel/types": "npm:^7.24.0" + "@jridgewell/gen-mapping": "npm:^0.3.5" + "@jridgewell/trace-mapping": "npm:^0.3.25" + jsesc: "npm:^2.5.1" + checksum: 10c0/67a1b2f7cc985aaaa11b01e8ddd4fffa4f285837bc7a209738eb8203aa34bdafeb8507ed75fd883ddbabd641a036ca0a8d984e760f28ad4a9d60bff29d0a60bb + languageName: node + linkType: hard + "@babel/helper-annotate-as-pure@npm:7.22.5": version: 7.22.5 resolution: "@babel/helper-annotate-as-pure@npm:7.22.5" @@ -582,6 +604,16 @@ __metadata: languageName: node linkType: hard +"@babel/helper-function-name@npm:^7.23.0": + version: 7.23.0 + resolution: "@babel/helper-function-name@npm:7.23.0" + dependencies: + "@babel/template": "npm:^7.22.15" + "@babel/types": "npm:^7.23.0" + checksum: 10c0/d771dd1f3222b120518176733c52b7cadac1c256ff49b1889dbbe5e3fed81db855b8cc4e40d949c9d3eae0e795e8229c1c8c24c0e83f27cfa6ee3766696c6428 + languageName: node + linkType: hard + "@babel/helper-function-name@npm:^7.24.7": version: 7.24.7 resolution: "@babel/helper-function-name@npm:7.24.7" @@ -592,6 +624,15 @@ __metadata: languageName: node linkType: hard +"@babel/helper-hoist-variables@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/helper-hoist-variables@npm:7.22.5" + dependencies: + "@babel/types": "npm:^7.22.5" + checksum: 10c0/60a3077f756a1cd9f14eb89f0037f487d81ede2b7cfe652ea6869cd4ec4c782b0fb1de01b8494b9a2d2050e3d154d7d5ad3be24806790acfb8cbe2073bf1e208 + languageName: node + linkType: hard + "@babel/helper-hoist-variables@npm:^7.24.7": version: 7.24.7 resolution: "@babel/helper-hoist-variables@npm:7.24.7" @@ -645,7 +686,14 @@ __metadata: languageName: node linkType: hard -"@babel/helper-plugin-utils@npm:^7.0.0, @babel/helper-plugin-utils@npm:^7.10.4, @babel/helper-plugin-utils@npm:^7.12.13, @babel/helper-plugin-utils@npm:^7.14.5, @babel/helper-plugin-utils@npm:^7.18.6, @babel/helper-plugin-utils@npm:^7.20.2, @babel/helper-plugin-utils@npm:^7.22.5, @babel/helper-plugin-utils@npm:^7.24.0, @babel/helper-plugin-utils@npm:^7.24.7, @babel/helper-plugin-utils@npm:^7.8.0, @babel/helper-plugin-utils@npm:^7.8.3": +"@babel/helper-plugin-utils@npm:^7.0.0, @babel/helper-plugin-utils@npm:^7.10.4, @babel/helper-plugin-utils@npm:^7.12.13, @babel/helper-plugin-utils@npm:^7.14.5, @babel/helper-plugin-utils@npm:^7.18.6, @babel/helper-plugin-utils@npm:^7.20.2, @babel/helper-plugin-utils@npm:^7.22.5, @babel/helper-plugin-utils@npm:^7.24.0, @babel/helper-plugin-utils@npm:^7.8.0, @babel/helper-plugin-utils@npm:^7.8.3": + version: 7.24.0 + resolution: "@babel/helper-plugin-utils@npm:7.24.0" + checksum: 10c0/90f41bd1b4dfe7226b1d33a4bb745844c5c63e400f9e4e8bf9103a7ceddd7d425d65333b564d9daba3cebd105985764d51b4bd4c95822b97c2e3ac1201a8a5da + languageName: node + linkType: hard + +"@babel/helper-plugin-utils@npm:^7.24.7": version: 7.24.7 resolution: "@babel/helper-plugin-utils@npm:7.24.7" checksum: 10c0/c3d38cd9b3520757bb4a279255cc3f956fc0ac1c193964bd0816ebd5c86e30710be8e35252227e0c9d9e0f4f56d9b5f916537f2bc588084b0988b4787a967d31 @@ -698,7 +746,7 @@ __metadata: languageName: node linkType: hard -"@babel/helper-split-export-declaration@npm:7.22.6": +"@babel/helper-split-export-declaration@npm:7.22.6, @babel/helper-split-export-declaration@npm:^7.22.6": version: 7.22.6 resolution: "@babel/helper-split-export-declaration@npm:7.22.6" dependencies: @@ -716,6 +764,13 @@ __metadata: 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" + checksum: 10c0/f348d5637ad70b6b54b026d6544bd9040f78d24e7ec245a0fc42293968181f6ae9879c22d89744730d246ce8ec53588f716f102addd4df8bbc79b73ea10004ac + languageName: node + linkType: hard + "@babel/helper-string-parser@npm:^7.24.7": version: 7.24.7 resolution: "@babel/helper-string-parser@npm:7.24.7" @@ -723,6 +778,13 @@ __metadata: languageName: node linkType: hard +"@babel/helper-validator-identifier@npm:^7.22.20": + version: 7.22.20 + resolution: "@babel/helper-validator-identifier@npm:7.22.20" + checksum: 10c0/dcad63db345fb110e032de46c3688384b0008a42a4845180ce7cd62b1a9c0507a1bed727c4d1060ed1a03ae57b4d918570259f81724aaac1a5b776056f37504e + languageName: node + linkType: hard + "@babel/helper-validator-identifier@npm:^7.24.7": version: 7.24.7 resolution: "@babel/helper-validator-identifier@npm:7.24.7" @@ -759,6 +821,18 @@ __metadata: languageName: node linkType: hard +"@babel/highlight@npm:^7.24.2": + version: 7.24.2 + resolution: "@babel/highlight@npm:7.24.2" + dependencies: + "@babel/helper-validator-identifier": "npm:^7.22.20" + chalk: "npm:^2.4.2" + js-tokens: "npm:^4.0.0" + picocolors: "npm:^1.0.0" + checksum: 10c0/98ce00321daedeed33a4ed9362dc089a70375ff1b3b91228b9f05e6591d387a81a8cba68886e207861b8871efa0bc997ceabdd9c90f6cce3ee1b2f7f941b42db + languageName: node + linkType: hard + "@babel/highlight@npm:^7.24.7": version: 7.24.7 resolution: "@babel/highlight@npm:7.24.7" @@ -780,6 +854,15 @@ __metadata: languageName: node linkType: hard +"@babel/parser@npm:^7.24.1": + version: 7.24.4 + resolution: "@babel/parser@npm:7.24.4" + bin: + parser: ./bin/babel-parser.js + checksum: 10c0/8381e1efead5069cb7ed2abc3a583f4a86289b2f376c75cecc69f59a8eb36df18274b1886cecf2f97a6a0dff5334b27330f58535be9b3e4e26102cc50e12eac8 + languageName: node + linkType: hard + "@babel/plugin-bugfix-firefox-class-in-computed-class-key@npm:^7.24.4": version: 7.24.4 resolution: "@babel/plugin-bugfix-firefox-class-in-computed-class-key@npm:7.24.4" @@ -2238,6 +2321,17 @@ __metadata: languageName: node linkType: hard +"@babel/template@npm:^7.22.15": + version: 7.24.0 + resolution: "@babel/template@npm:7.24.0" + dependencies: + "@babel/code-frame": "npm:^7.23.5" + "@babel/parser": "npm:^7.24.0" + "@babel/types": "npm:^7.24.0" + checksum: 10c0/9d3dd8d22fe1c36bc3bdef6118af1f4b030aaf6d7d2619f5da203efa818a2185d717523486c111de8d99a8649ddf4bbf6b2a7a64962d8411cf6a8fa89f010e54 + languageName: node + linkType: hard + "@babel/template@npm:^7.23.9, @babel/template@npm:^7.24.0, @babel/template@npm:^7.24.7": version: 7.24.7 resolution: "@babel/template@npm:7.24.7" @@ -2249,7 +2343,25 @@ __metadata: languageName: node linkType: hard -"@babel/traverse@npm:^7.1.6, @babel/traverse@npm:^7.16.0, @babel/traverse@npm:^7.18.9, @babel/traverse@npm:^7.23.9, @babel/traverse@npm:^7.24.0, @babel/traverse@npm:^7.24.1, @babel/traverse@npm:^7.24.7, @babel/traverse@npm:^7.4.5": +"@babel/traverse@npm:^7.1.6, @babel/traverse@npm:^7.16.0, @babel/traverse@npm:^7.18.9, @babel/traverse@npm:^7.23.9, @babel/traverse@npm:^7.24.0, @babel/traverse@npm:^7.24.1, @babel/traverse@npm:^7.4.5": + version: 7.24.1 + resolution: "@babel/traverse@npm:7.24.1" + dependencies: + "@babel/code-frame": "npm:^7.24.1" + "@babel/generator": "npm:^7.24.1" + "@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.24.1" + "@babel/types": "npm:^7.24.0" + debug: "npm:^4.3.1" + globals: "npm:^11.1.0" + checksum: 10c0/c087b918f6823776537ba246136c70e7ce0719fc05361ebcbfd16f4e6f2f6f1f8f4f9167f1d9b675f27d12074839605189cc9d689de20b89a85e7c140f23daab + languageName: node + linkType: hard + +"@babel/traverse@npm:^7.24.7": version: 7.24.7 resolution: "@babel/traverse@npm:7.24.7" dependencies: @@ -2278,6 +2390,17 @@ __metadata: languageName: node linkType: hard +"@babel/types@npm:^7.23.0": + version: 7.24.0 + resolution: "@babel/types@npm:7.24.0" + 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: 10c0/777a0bb5dbe038ca4c905fdafb1cdb6bdd10fe9d63ce13eca0bd91909363cbad554a53dc1f902004b78c1dcbc742056f877f2c99eeedff647333b1fadf51235d + languageName: node + linkType: hard + "@base2/pretty-print-object@npm:1.0.1": version: 1.0.1 resolution: "@base2/pretty-print-object@npm:1.0.1" @@ -5838,7 +5961,7 @@ __metadata: npmlog: "npm:^7.0.0" open: "npm:^8.4.0" picomatch: "npm:^2.3.0" - picoquery: "npm:^1.3.0" + picoquery: "npm:^1.4.0" polished: "npm:^4.2.2" prettier: "npm:^3.2.5" pretty-hrtime: "npm:^1.0.3" @@ -9244,7 +9367,16 @@ __metadata: languageName: node linkType: hard -"acorn@npm:^8.0.0, acorn@npm:^8.10.0, acorn@npm:^8.11.2, acorn@npm:^8.11.3, acorn@npm:^8.12.1, acorn@npm:^8.4.1, acorn@npm:^8.6.0, acorn@npm:^8.7.1, acorn@npm:^8.8.2, acorn@npm:^8.9.0": +"acorn@npm:^8.0.0, acorn@npm:^8.10.0, acorn@npm:^8.11.2, acorn@npm:^8.11.3, acorn@npm:^8.4.1, acorn@npm:^8.6.0, acorn@npm:^8.7.1, acorn@npm:^8.8.2, acorn@npm:^8.9.0": + version: 8.11.3 + resolution: "acorn@npm:8.11.3" + bin: + acorn: bin/acorn + checksum: 10c0/3ff155f8812e4a746fee8ecff1f227d527c4c45655bb1fad6347c3cb58e46190598217551b1500f18542d2bbe5c87120cb6927f5a074a59166fbdd9468f0a299 + languageName: node + linkType: hard + +"acorn@npm:^8.12.1": version: 8.12.1 resolution: "acorn@npm:8.12.1" bin: @@ -9935,7 +10067,7 @@ __metadata: languageName: node linkType: hard -"available-typed-arrays@npm:^1.0.7": +"available-typed-arrays@npm:^1.0.6, available-typed-arrays@npm:^1.0.7": version: 1.0.7 resolution: "available-typed-arrays@npm:1.0.7" dependencies: @@ -10462,7 +10594,16 @@ __metadata: languageName: node linkType: hard -"braces@npm:^3.0.2, braces@npm:^3.0.3, braces@npm:~3.0.2": +"braces@npm:^3.0.2, braces@npm:~3.0.2": + version: 3.0.2 + resolution: "braces@npm:3.0.2" + dependencies: + fill-range: "npm:^7.0.1" + checksum: 10c0/321b4d675791479293264019156ca322163f02dc06e3c4cab33bb15cd43d80b51efef69b0930cfde3acd63d126ebca24cd0544fa6f261e093a0fb41ab9dda381 + languageName: node + linkType: hard + +"braces@npm:^3.0.3": version: 3.0.3 resolution: "braces@npm:3.0.3" dependencies: @@ -14789,6 +14930,15 @@ __metadata: languageName: node linkType: hard +"fill-range@npm:^7.0.1": + version: 7.0.1 + resolution: "fill-range@npm:7.0.1" + dependencies: + to-regex-range: "npm:^5.0.1" + checksum: 10c0/7cdad7d426ffbaadf45aeb5d15ec675bbd77f7597ad5399e3d2766987ed20bda24d5fac64b3ee79d93276f5865608bb22344a26b9b1ae6c4d00bd94bf611623f + languageName: node + linkType: hard + "fill-range@npm:^7.1.1": version: 7.1.1 resolution: "fill-range@npm:7.1.1" @@ -16022,7 +16172,7 @@ __metadata: languageName: node linkType: hard -"has-tostringtag@npm:^1.0.0, has-tostringtag@npm:^1.0.2": +"has-tostringtag@npm:^1.0.0, has-tostringtag@npm:^1.0.1, has-tostringtag@npm:^1.0.2": version: 1.0.2 resolution: "has-tostringtag@npm:1.0.2" dependencies: @@ -22034,12 +22184,12 @@ __metadata: languageName: node linkType: hard -"picoquery@npm:^1.3.0": - version: 1.3.0 - resolution: "picoquery@npm:1.3.0" +"picoquery@npm:^1.4.0": + version: 1.4.0 + resolution: "picoquery@npm:1.4.0" dependencies: fast-decode-uri-component: "npm:^1.0.1" - checksum: 10c0/7bbd692d3996caff8e19bb0590b925d673ec87bc3c005cce55610c64a7348129bfc6b4f47dcd578ebcf4ea12db958fb004439cf827b67741b927a17f32af00d4 + checksum: 10c0/8c2bdb85eabb51ce1534d0a70ac288dac8d241a32e5d1ee960ee1ed7c5f522752db23cdc63318ac69ce892bdbcc465f4e2d25a5b970b7a29ffa36455cc2d022c languageName: node linkType: hard @@ -28507,7 +28657,20 @@ __metadata: languageName: node linkType: hard -"which-typed-array@npm:^1.1.14, which-typed-array@npm:^1.1.15, which-typed-array@npm:^1.1.2, which-typed-array@npm:^1.1.9": +"which-typed-array@npm:^1.1.14, which-typed-array@npm:^1.1.2, which-typed-array@npm:^1.1.9": + version: 1.1.14 + resolution: "which-typed-array@npm:1.1.14" + dependencies: + available-typed-arrays: "npm:^1.0.6" + call-bind: "npm:^1.0.5" + for-each: "npm:^0.3.3" + gopd: "npm:^1.0.1" + has-tostringtag: "npm:^1.0.1" + checksum: 10c0/0960f1e77807058819451b98c51d4cd72031593e8de990b24bd3fc22e176f5eee22921d68d852297c786aec117689f0423ed20aa4fde7ce2704d680677891f56 + languageName: node + linkType: hard + +"which-typed-array@npm:^1.1.15": version: 1.1.15 resolution: "which-typed-array@npm:1.1.15" dependencies: From 5171010d595d9f7f29c623fe0b7c8b401bd12a7c Mon Sep 17 00:00:00 2001 From: 43081j <43081j@users.noreply.github.com> Date: Sun, 28 Jul 2024 12:59:47 +0100 Subject: [PATCH 09/39] test: add prefix to test queries --- code/core/src/manager-api/tests/url.test.js | 12 ++++++------ code/core/src/router/utils.ts | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/code/core/src/manager-api/tests/url.test.js b/code/core/src/manager-api/tests/url.test.js index 53946d7ab6b9..ef9e70482dc2 100644 --- a/code/core/src/manager-api/tests/url.test.js +++ b/code/core/src/manager-api/tests/url.test.js @@ -18,7 +18,7 @@ describe('initial state', () => { describe('config query parameters', () => { it('handles full parameter', () => { const navigate = vi.fn(); - const location = { search: new URLSearchParams({ full: '1' }).toString() }; + const location = { search: '?' + new URLSearchParams({ full: '1' }).toString() }; const { state: { layout }, @@ -33,7 +33,7 @@ describe('initial state', () => { it('handles nav parameter', () => { const navigate = vi.fn(); - const location = { search: new URLSearchParams({ nav: '0' }).toString() }; + const location = { search: '?' + new URLSearchParams({ nav: '0' }).toString() }; const { state: { layout }, @@ -44,7 +44,7 @@ describe('initial state', () => { it('handles shortcuts parameter', () => { const navigate = vi.fn(); - const location = { search: new URLSearchParams({ shortcuts: '0' }).toString() }; + const location = { search: '?' + new URLSearchParams({ shortcuts: '0' }).toString() }; const { state: { ui }, @@ -55,7 +55,7 @@ describe('initial state', () => { it('handles panel parameter, bottom', () => { const navigate = vi.fn(); - const location = { search: new URLSearchParams({ panel: 'bottom' }).toString() }; + const location = { search: '?' + new URLSearchParams({ panel: 'bottom' }).toString() }; const { state: { layout }, @@ -66,7 +66,7 @@ describe('initial state', () => { it('handles panel parameter, right', () => { const navigate = vi.fn(); - const location = { search: new URLSearchParams({ panel: 'right' }).toString() }; + const location = { search: '?' + new URLSearchParams({ panel: 'right' }).toString() }; const { state: { layout }, @@ -77,7 +77,7 @@ describe('initial state', () => { it('handles panel parameter, 0', () => { const navigate = vi.fn(); - const location = { search: new URLSearchParams({ panel: '0' }).toString() }; + const location = { search: '?' + new URLSearchParams({ panel: '0' }).toString() }; const { state: { layout }, diff --git a/code/core/src/router/utils.ts b/code/core/src/router/utils.ts index c670c5aea790..e8a357b06f29 100644 --- a/code/core/src/router/utils.ts +++ b/code/core/src/router/utils.ts @@ -175,7 +175,7 @@ interface Query { } export const queryFromString = memoize(1000)( - (s?: string): Query => (s !== undefined ? parse(s) : {}) + (s?: string): Query => (s !== undefined ? parse(s, QS_OPTIONS) : {}) ); export const queryFromLocation = (location: Partial) => queryFromString(location.search ? location.search.slice(1) : ''); From 8f6ff036d1313c8b981993a9df9b6baabc9b14ea Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 2 Aug 2024 22:56:45 +0200 Subject: [PATCH 10/39] dedupe --- code/yarn.lock | 179 +++---------------------------------------------- 1 file changed, 8 insertions(+), 171 deletions(-) diff --git a/code/yarn.lock b/code/yarn.lock index f38ef7f57730..0c6f112474b9 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -370,16 +370,6 @@ __metadata: languageName: node linkType: hard -"@babel/code-frame@npm:^7.24.1": - version: 7.24.2 - resolution: "@babel/code-frame@npm:7.24.2" - dependencies: - "@babel/highlight": "npm:^7.24.2" - picocolors: "npm:^1.0.0" - checksum: 10c0/d1d4cba89475ab6aab7a88242e1fd73b15ecb9f30c109b69752956434d10a26a52cbd37727c4eca104b6d45227bd1dfce39a6a6f4a14c9b2f07f871e968cf406 - languageName: node - linkType: hard - "@babel/compat-data@npm:^7.22.6, @babel/compat-data@npm:^7.23.5, @babel/compat-data@npm:^7.24.4, @babel/compat-data@npm:^7.24.7": version: 7.24.7 resolution: "@babel/compat-data@npm:7.24.7" @@ -480,18 +470,6 @@ __metadata: languageName: node linkType: hard -"@babel/generator@npm:^7.24.1": - version: 7.24.4 - resolution: "@babel/generator@npm:7.24.4" - dependencies: - "@babel/types": "npm:^7.24.0" - "@jridgewell/gen-mapping": "npm:^0.3.5" - "@jridgewell/trace-mapping": "npm:^0.3.25" - jsesc: "npm:^2.5.1" - checksum: 10c0/67a1b2f7cc985aaaa11b01e8ddd4fffa4f285837bc7a209738eb8203aa34bdafeb8507ed75fd883ddbabd641a036ca0a8d984e760f28ad4a9d60bff29d0a60bb - languageName: node - linkType: hard - "@babel/helper-annotate-as-pure@npm:7.22.5": version: 7.22.5 resolution: "@babel/helper-annotate-as-pure@npm:7.22.5" @@ -604,16 +582,6 @@ __metadata: languageName: node linkType: hard -"@babel/helper-function-name@npm:^7.23.0": - version: 7.23.0 - resolution: "@babel/helper-function-name@npm:7.23.0" - dependencies: - "@babel/template": "npm:^7.22.15" - "@babel/types": "npm:^7.23.0" - checksum: 10c0/d771dd1f3222b120518176733c52b7cadac1c256ff49b1889dbbe5e3fed81db855b8cc4e40d949c9d3eae0e795e8229c1c8c24c0e83f27cfa6ee3766696c6428 - languageName: node - linkType: hard - "@babel/helper-function-name@npm:^7.24.7": version: 7.24.7 resolution: "@babel/helper-function-name@npm:7.24.7" @@ -624,15 +592,6 @@ __metadata: languageName: node linkType: hard -"@babel/helper-hoist-variables@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/helper-hoist-variables@npm:7.22.5" - dependencies: - "@babel/types": "npm:^7.22.5" - checksum: 10c0/60a3077f756a1cd9f14eb89f0037f487d81ede2b7cfe652ea6869cd4ec4c782b0fb1de01b8494b9a2d2050e3d154d7d5ad3be24806790acfb8cbe2073bf1e208 - languageName: node - linkType: hard - "@babel/helper-hoist-variables@npm:^7.24.7": version: 7.24.7 resolution: "@babel/helper-hoist-variables@npm:7.24.7" @@ -686,14 +645,7 @@ __metadata: languageName: node linkType: hard -"@babel/helper-plugin-utils@npm:^7.0.0, @babel/helper-plugin-utils@npm:^7.10.4, @babel/helper-plugin-utils@npm:^7.12.13, @babel/helper-plugin-utils@npm:^7.14.5, @babel/helper-plugin-utils@npm:^7.18.6, @babel/helper-plugin-utils@npm:^7.20.2, @babel/helper-plugin-utils@npm:^7.22.5, @babel/helper-plugin-utils@npm:^7.24.0, @babel/helper-plugin-utils@npm:^7.8.0, @babel/helper-plugin-utils@npm:^7.8.3": - version: 7.24.0 - resolution: "@babel/helper-plugin-utils@npm:7.24.0" - checksum: 10c0/90f41bd1b4dfe7226b1d33a4bb745844c5c63e400f9e4e8bf9103a7ceddd7d425d65333b564d9daba3cebd105985764d51b4bd4c95822b97c2e3ac1201a8a5da - languageName: node - linkType: hard - -"@babel/helper-plugin-utils@npm:^7.24.7": +"@babel/helper-plugin-utils@npm:^7.0.0, @babel/helper-plugin-utils@npm:^7.10.4, @babel/helper-plugin-utils@npm:^7.12.13, @babel/helper-plugin-utils@npm:^7.14.5, @babel/helper-plugin-utils@npm:^7.18.6, @babel/helper-plugin-utils@npm:^7.20.2, @babel/helper-plugin-utils@npm:^7.22.5, @babel/helper-plugin-utils@npm:^7.24.0, @babel/helper-plugin-utils@npm:^7.24.7, @babel/helper-plugin-utils@npm:^7.8.0, @babel/helper-plugin-utils@npm:^7.8.3": version: 7.24.7 resolution: "@babel/helper-plugin-utils@npm:7.24.7" checksum: 10c0/c3d38cd9b3520757bb4a279255cc3f956fc0ac1c193964bd0816ebd5c86e30710be8e35252227e0c9d9e0f4f56d9b5f916537f2bc588084b0988b4787a967d31 @@ -746,7 +698,7 @@ __metadata: languageName: node linkType: hard -"@babel/helper-split-export-declaration@npm:7.22.6, @babel/helper-split-export-declaration@npm:^7.22.6": +"@babel/helper-split-export-declaration@npm:7.22.6": version: 7.22.6 resolution: "@babel/helper-split-export-declaration@npm:7.22.6" dependencies: @@ -764,13 +716,6 @@ __metadata: 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" - checksum: 10c0/f348d5637ad70b6b54b026d6544bd9040f78d24e7ec245a0fc42293968181f6ae9879c22d89744730d246ce8ec53588f716f102addd4df8bbc79b73ea10004ac - languageName: node - linkType: hard - "@babel/helper-string-parser@npm:^7.24.7": version: 7.24.7 resolution: "@babel/helper-string-parser@npm:7.24.7" @@ -778,13 +723,6 @@ __metadata: languageName: node linkType: hard -"@babel/helper-validator-identifier@npm:^7.22.20": - version: 7.22.20 - resolution: "@babel/helper-validator-identifier@npm:7.22.20" - checksum: 10c0/dcad63db345fb110e032de46c3688384b0008a42a4845180ce7cd62b1a9c0507a1bed727c4d1060ed1a03ae57b4d918570259f81724aaac1a5b776056f37504e - languageName: node - linkType: hard - "@babel/helper-validator-identifier@npm:^7.24.7": version: 7.24.7 resolution: "@babel/helper-validator-identifier@npm:7.24.7" @@ -821,18 +759,6 @@ __metadata: languageName: node linkType: hard -"@babel/highlight@npm:^7.24.2": - version: 7.24.2 - resolution: "@babel/highlight@npm:7.24.2" - dependencies: - "@babel/helper-validator-identifier": "npm:^7.22.20" - chalk: "npm:^2.4.2" - js-tokens: "npm:^4.0.0" - picocolors: "npm:^1.0.0" - checksum: 10c0/98ce00321daedeed33a4ed9362dc089a70375ff1b3b91228b9f05e6591d387a81a8cba68886e207861b8871efa0bc997ceabdd9c90f6cce3ee1b2f7f941b42db - languageName: node - linkType: hard - "@babel/highlight@npm:^7.24.7": version: 7.24.7 resolution: "@babel/highlight@npm:7.24.7" @@ -854,15 +780,6 @@ __metadata: languageName: node linkType: hard -"@babel/parser@npm:^7.24.1": - version: 7.24.4 - resolution: "@babel/parser@npm:7.24.4" - bin: - parser: ./bin/babel-parser.js - checksum: 10c0/8381e1efead5069cb7ed2abc3a583f4a86289b2f376c75cecc69f59a8eb36df18274b1886cecf2f97a6a0dff5334b27330f58535be9b3e4e26102cc50e12eac8 - languageName: node - linkType: hard - "@babel/plugin-bugfix-firefox-class-in-computed-class-key@npm:^7.24.4": version: 7.24.4 resolution: "@babel/plugin-bugfix-firefox-class-in-computed-class-key@npm:7.24.4" @@ -2321,17 +2238,6 @@ __metadata: languageName: node linkType: hard -"@babel/template@npm:^7.22.15": - version: 7.24.0 - resolution: "@babel/template@npm:7.24.0" - dependencies: - "@babel/code-frame": "npm:^7.23.5" - "@babel/parser": "npm:^7.24.0" - "@babel/types": "npm:^7.24.0" - checksum: 10c0/9d3dd8d22fe1c36bc3bdef6118af1f4b030aaf6d7d2619f5da203efa818a2185d717523486c111de8d99a8649ddf4bbf6b2a7a64962d8411cf6a8fa89f010e54 - languageName: node - linkType: hard - "@babel/template@npm:^7.23.9, @babel/template@npm:^7.24.0, @babel/template@npm:^7.24.7": version: 7.24.7 resolution: "@babel/template@npm:7.24.7" @@ -2343,25 +2249,7 @@ __metadata: languageName: node linkType: hard -"@babel/traverse@npm:^7.1.6, @babel/traverse@npm:^7.16.0, @babel/traverse@npm:^7.18.9, @babel/traverse@npm:^7.23.9, @babel/traverse@npm:^7.24.0, @babel/traverse@npm:^7.24.1, @babel/traverse@npm:^7.4.5": - version: 7.24.1 - resolution: "@babel/traverse@npm:7.24.1" - dependencies: - "@babel/code-frame": "npm:^7.24.1" - "@babel/generator": "npm:^7.24.1" - "@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.24.1" - "@babel/types": "npm:^7.24.0" - debug: "npm:^4.3.1" - globals: "npm:^11.1.0" - checksum: 10c0/c087b918f6823776537ba246136c70e7ce0719fc05361ebcbfd16f4e6f2f6f1f8f4f9167f1d9b675f27d12074839605189cc9d689de20b89a85e7c140f23daab - languageName: node - linkType: hard - -"@babel/traverse@npm:^7.24.7": +"@babel/traverse@npm:^7.1.6, @babel/traverse@npm:^7.16.0, @babel/traverse@npm:^7.18.9, @babel/traverse@npm:^7.23.9, @babel/traverse@npm:^7.24.0, @babel/traverse@npm:^7.24.1, @babel/traverse@npm:^7.24.7, @babel/traverse@npm:^7.4.5": version: 7.24.7 resolution: "@babel/traverse@npm:7.24.7" dependencies: @@ -2390,17 +2278,6 @@ __metadata: languageName: node linkType: hard -"@babel/types@npm:^7.23.0": - version: 7.24.0 - resolution: "@babel/types@npm:7.24.0" - 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: 10c0/777a0bb5dbe038ca4c905fdafb1cdb6bdd10fe9d63ce13eca0bd91909363cbad554a53dc1f902004b78c1dcbc742056f877f2c99eeedff647333b1fadf51235d - languageName: node - linkType: hard - "@base2/pretty-print-object@npm:1.0.1": version: 1.0.1 resolution: "@base2/pretty-print-object@npm:1.0.1" @@ -9379,16 +9256,7 @@ __metadata: languageName: node linkType: hard -"acorn@npm:^8.0.0, acorn@npm:^8.10.0, acorn@npm:^8.11.2, acorn@npm:^8.11.3, acorn@npm:^8.4.1, acorn@npm:^8.6.0, acorn@npm:^8.7.1, acorn@npm:^8.8.2, acorn@npm:^8.9.0": - version: 8.11.3 - resolution: "acorn@npm:8.11.3" - bin: - acorn: bin/acorn - checksum: 10c0/3ff155f8812e4a746fee8ecff1f227d527c4c45655bb1fad6347c3cb58e46190598217551b1500f18542d2bbe5c87120cb6927f5a074a59166fbdd9468f0a299 - languageName: node - linkType: hard - -"acorn@npm:^8.12.1": +"acorn@npm:^8.0.0, acorn@npm:^8.10.0, acorn@npm:^8.11.2, acorn@npm:^8.11.3, acorn@npm:^8.12.1, acorn@npm:^8.4.1, acorn@npm:^8.6.0, acorn@npm:^8.7.1, acorn@npm:^8.8.2, acorn@npm:^8.9.0": version: 8.12.1 resolution: "acorn@npm:8.12.1" bin: @@ -10079,7 +9947,7 @@ __metadata: languageName: node linkType: hard -"available-typed-arrays@npm:^1.0.6, available-typed-arrays@npm:^1.0.7": +"available-typed-arrays@npm:^1.0.7": version: 1.0.7 resolution: "available-typed-arrays@npm:1.0.7" dependencies: @@ -10606,16 +10474,7 @@ __metadata: languageName: node linkType: hard -"braces@npm:^3.0.2, braces@npm:~3.0.2": - version: 3.0.2 - resolution: "braces@npm:3.0.2" - dependencies: - fill-range: "npm:^7.0.1" - checksum: 10c0/321b4d675791479293264019156ca322163f02dc06e3c4cab33bb15cd43d80b51efef69b0930cfde3acd63d126ebca24cd0544fa6f261e093a0fb41ab9dda381 - languageName: node - linkType: hard - -"braces@npm:^3.0.3": +"braces@npm:^3.0.2, braces@npm:^3.0.3, braces@npm:~3.0.2": version: 3.0.3 resolution: "braces@npm:3.0.3" dependencies: @@ -14942,15 +14801,6 @@ __metadata: languageName: node linkType: hard -"fill-range@npm:^7.0.1": - version: 7.0.1 - resolution: "fill-range@npm:7.0.1" - dependencies: - to-regex-range: "npm:^5.0.1" - checksum: 10c0/7cdad7d426ffbaadf45aeb5d15ec675bbd77f7597ad5399e3d2766987ed20bda24d5fac64b3ee79d93276f5865608bb22344a26b9b1ae6c4d00bd94bf611623f - languageName: node - linkType: hard - "fill-range@npm:^7.1.1": version: 7.1.1 resolution: "fill-range@npm:7.1.1" @@ -16184,7 +16034,7 @@ __metadata: languageName: node linkType: hard -"has-tostringtag@npm:^1.0.0, has-tostringtag@npm:^1.0.1, has-tostringtag@npm:^1.0.2": +"has-tostringtag@npm:^1.0.0, has-tostringtag@npm:^1.0.2": version: 1.0.2 resolution: "has-tostringtag@npm:1.0.2" dependencies: @@ -28675,20 +28525,7 @@ __metadata: languageName: node linkType: hard -"which-typed-array@npm:^1.1.14, which-typed-array@npm:^1.1.2, which-typed-array@npm:^1.1.9": - version: 1.1.14 - resolution: "which-typed-array@npm:1.1.14" - dependencies: - available-typed-arrays: "npm:^1.0.6" - call-bind: "npm:^1.0.5" - for-each: "npm:^0.3.3" - gopd: "npm:^1.0.1" - has-tostringtag: "npm:^1.0.1" - checksum: 10c0/0960f1e77807058819451b98c51d4cd72031593e8de990b24bd3fc22e176f5eee22921d68d852297c786aec117689f0423ed20aa4fde7ce2704d680677891f56 - languageName: node - linkType: hard - -"which-typed-array@npm:^1.1.15": +"which-typed-array@npm:^1.1.14, which-typed-array@npm:^1.1.15, which-typed-array@npm:^1.1.2, which-typed-array@npm:^1.1.9": version: 1.1.15 resolution: "which-typed-array@npm:1.1.15" dependencies: From e233abea31a98edda96c310df48781b7b1fe1ec6 Mon Sep 17 00:00:00 2001 From: James Garbutt <43081j@users.noreply.github.com> Date: Tue, 3 Sep 2024 17:51:50 +0700 Subject: [PATCH 11/39] chore: update picocolors --- code/core/package.json | 2 +- code/lib/cli/package.json | 2 +- code/yarn.lock | 13 ++++++++++--- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/code/core/package.json b/code/core/package.json index dc5948900296..955579cf82b2 100644 --- a/code/core/package.json +++ b/code/core/package.json @@ -380,7 +380,7 @@ "nanoid": "^4.0.2", "npmlog": "^7.0.0", "open": "^8.4.0", - "picocolors": "^1.0.1", + "picocolors": "^1.1.0", "picomatch": "^2.3.0", "polished": "^4.2.2", "prettier": "^3.2.5", diff --git a/code/lib/cli/package.json b/code/lib/cli/package.json index 327164dccaef..89b2e66c33e3 100644 --- a/code/lib/cli/package.json +++ b/code/lib/cli/package.json @@ -310,7 +310,7 @@ }, "dependencies": { "@storybook/core": "workspace:*", - "picocolors": "^1.0.1" + "picocolors": "^1.1.0" }, "devDependencies": { "typescript": "^5.3.2" diff --git a/code/yarn.lock b/code/yarn.lock index 0cd25257f93c..84280e3f1376 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -6687,7 +6687,7 @@ __metadata: nanoid: "npm:^4.0.2" npmlog: "npm:^7.0.0" open: "npm:^8.4.0" - picocolors: "npm:^1.0.1" + picocolors: "npm:^1.1.0" picomatch: "npm:^2.3.0" polished: "npm:^4.2.2" prettier: "npm:^3.2.5" @@ -22949,13 +22949,20 @@ __metadata: languageName: node linkType: hard -"picocolors@npm:^1.0.0, picocolors@npm:^1.0.1": +"picocolors@npm:^1.0.0": version: 1.0.1 resolution: "picocolors@npm:1.0.1" checksum: 10c0/c63cdad2bf812ef0d66c8db29583802355d4ca67b9285d846f390cc15c2f6ccb94e8cb7eb6a6e97fc5990a6d3ad4ae42d86c84d3146e667c739a4234ed50d400 languageName: node linkType: hard +"picocolors@npm:^1.1.0": + version: 1.1.0 + resolution: "picocolors@npm:1.1.0" + checksum: 10c0/86946f6032148801ef09c051c6fb13b5cf942eaf147e30ea79edb91dd32d700934edebe782a1078ff859fb2b816792e97ef4dab03d7f0b804f6b01a0df35e023 + languageName: node + linkType: hard + "picomatch@npm:4.0.1": version: 4.0.1 resolution: "picomatch@npm:4.0.1" @@ -26452,7 +26459,7 @@ __metadata: resolution: "storybook@workspace:lib/cli" dependencies: "@storybook/core": "workspace:*" - picocolors: "npm:^1.0.1" + picocolors: "npm:^1.1.0" typescript: "npm:^5.3.2" bin: getstorybook: ./bin/index.cjs From 0002066784477d9cfcb6228de5f8a2da4d7d4168 Mon Sep 17 00:00:00 2001 From: shreysinha25 Date: Sun, 15 Sep 2024 16:32:32 +0530 Subject: [PATCH 12/39] fix issue #29122 [Bug]: Brand image css class conflict causes image to resize on hot reloads --- code/core/src/manager/components/sidebar/Brand.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/core/src/manager/components/sidebar/Brand.tsx b/code/core/src/manager/components/sidebar/Brand.tsx index 995b924948ec..f4ca666e0579 100644 --- a/code/core/src/manager/components/sidebar/Brand.tsx +++ b/code/core/src/manager/components/sidebar/Brand.tsx @@ -12,7 +12,7 @@ export const StorybookLogoStyled = styled(StorybookLogo)(({ theme }) => ({ export const Img = styled.img({ display: 'block', - maxWidth: '150px', + maxWidth: '150px !important', maxHeight: '100px', }); From 1376017e6898346ecd21d686ab35ab8be58e3ad8 Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Tue, 17 Sep 2024 15:46:46 +0200 Subject: [PATCH 13/39] remove more chalk usage --- code/core/src/cli/bin/index.ts | 6 +++--- code/core/src/cli/eslintPlugin.ts | 3 +-- code/lib/cli-storybook/package.json | 2 +- .../src/automigrate/fixes/missing-storybook-dependencies.ts | 4 ++-- code/lib/cli-storybook/src/automigrate/helpers/cleanLog.ts | 2 +- code/lib/create-storybook/package.json | 1 - 6 files changed, 8 insertions(+), 10 deletions(-) diff --git a/code/core/src/cli/bin/index.ts b/code/core/src/cli/bin/index.ts index 20cc55c1d809..060879635d61 100644 --- a/code/core/src/cli/bin/index.ts +++ b/code/core/src/cli/bin/index.ts @@ -3,10 +3,10 @@ import { addToGlobalContext } from '@storybook/core/telemetry'; import { logger } from '@storybook/core/node-logger'; -import chalk from 'chalk'; import { program } from 'commander'; import { findPackageSync } from 'fd-package-json'; import leven from 'leven'; +import picocolors from 'picocolors'; import invariant from 'tiny-invariant'; import { build } from '../build'; @@ -70,7 +70,7 @@ command('dev') ) .action(async (options) => { logger.setLevel(options.loglevel); - consoleLogger.log(chalk.bold(`${pkg.name} v${pkg.version}`) + chalk.reset('\n')); + consoleLogger.log(picocolors.bold(`${pkg.name} v${pkg.version}`) + picocolors.reset('\n')); // The key is the field created in `options` variable for // each command line argument. Value is the env variable. @@ -110,7 +110,7 @@ command('build') .action(async (options) => { process.env.NODE_ENV = process.env.NODE_ENV || 'production'; logger.setLevel(options.loglevel); - consoleLogger.log(chalk.bold(`${pkg.name} v${pkg.version}\n`)); + consoleLogger.log(picocolors.bold(`${pkg.name} v${pkg.version}\n`)); // The key is the field created in `options` variable for // each command line argument. Value is the env variable. diff --git a/code/core/src/cli/eslintPlugin.ts b/code/core/src/cli/eslintPlugin.ts index 9d45b887347d..24903afc35cd 100644 --- a/code/core/src/cli/eslintPlugin.ts +++ b/code/core/src/cli/eslintPlugin.ts @@ -1,4 +1,3 @@ -import picocolors from 'picocolors'; import { existsSync } from 'node:fs'; import { readFile, writeFile } from 'node:fs/promises'; @@ -7,8 +6,8 @@ import { paddedLog } from '@storybook/core/common'; import { readConfig, writeConfig } from '@storybook/core/csf-tools'; -import chalk from 'chalk'; import detectIndent from 'detect-indent'; +import picocolors from 'picocolors'; import prompts from 'prompts'; import { dedent } from 'ts-dedent'; diff --git a/code/lib/cli-storybook/package.json b/code/lib/cli-storybook/package.json index 7623c68b2f4d..5a83d698ffaf 100644 --- a/code/lib/cli-storybook/package.json +++ b/code/lib/cli-storybook/package.json @@ -44,7 +44,6 @@ "@babel/types": "^7.24.0", "@storybook/codemod": "workspace:*", "@types/semver": "^7.3.4", - "chalk": "^4.1.0", "commander": "^12.1.0", "create-storybook": "workspace:*", "cross-spawn": "^7.0.3", @@ -66,6 +65,7 @@ "@types/cross-spawn": "^6.0.2", "@types/prompts": "^2.0.9", "boxen": "^7.1.1", + "picocolors": "^1.1.0", "slash": "^5.0.0", "strip-ansi": "^7.1.0", "typescript": "^5.3.2" diff --git a/code/lib/cli-storybook/src/automigrate/fixes/missing-storybook-dependencies.ts b/code/lib/cli-storybook/src/automigrate/fixes/missing-storybook-dependencies.ts index ad912867f6f2..9b5892b51a32 100644 --- a/code/lib/cli-storybook/src/automigrate/fixes/missing-storybook-dependencies.ts +++ b/code/lib/cli-storybook/src/automigrate/fixes/missing-storybook-dependencies.ts @@ -4,7 +4,7 @@ import { getStorybookVersionSpecifier } from 'storybook/internal/cli'; import type { InstallationMetadata, JsPackageManager } from '@storybook/core/common'; -import chalk from 'chalk'; +import picocolors from 'picocolors'; import { dedent } from 'ts-dedent'; import type { Fix } from '../types'; @@ -112,7 +112,7 @@ export const missingStorybookDependencies: Fix - `- ${chalk.cyan(pkg)}: (${files.length} ${files.length === 1 ? 'file' : 'files'})` + `- ${picocolors.cyan(pkg)}: (${files.length} ${files.length === 1 ? 'file' : 'files'})` ) .sort() .join('\n')} diff --git a/code/lib/cli-storybook/src/automigrate/helpers/cleanLog.ts b/code/lib/cli-storybook/src/automigrate/helpers/cleanLog.ts index 7cb8c864197a..2f8a7b7ed856 100644 --- a/code/lib/cli-storybook/src/automigrate/helpers/cleanLog.ts +++ b/code/lib/cli-storybook/src/automigrate/helpers/cleanLog.ts @@ -13,7 +13,7 @@ export const ansiRegex = ({ onlyFirst = false } = {}) => { export const cleanLog = (str: string) => str - // remove chalk ANSI colors + // remove picocolors ANSI colors .replace(ansiRegex(), '') // fix boxen output .replace(/╮│/g, '╮\n│') diff --git a/code/lib/create-storybook/package.json b/code/lib/create-storybook/package.json index 612b559bcae2..d6e17d14edc5 100644 --- a/code/lib/create-storybook/package.json +++ b/code/lib/create-storybook/package.json @@ -56,7 +56,6 @@ }, "dependencies": { "@types/semver": "^7.3.4", - "chalk": "^4.1.0", "commander": "^12.1.0", "execa": "^5.0.0", "fd-package-json": "^1.2.0", From fce9cbe7ac86564f6a3ebdc3e730c83c1be089de Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Tue, 17 Sep 2024 15:46:56 +0200 Subject: [PATCH 14/39] bring back chalk to core because node-logger uses it --- code/core/package.json | 1 + code/yarn.lock | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/code/core/package.json b/code/core/package.json index dc7269fc9a39..d38d09089f75 100644 --- a/code/core/package.json +++ b/code/core/package.json @@ -345,6 +345,7 @@ "browser-dtector": "^3.4.0", "camelcase": "^8.0.0", "chai": "^4.4.1", + "chalk": "^5.3.0", "cli-table3": "^0.6.1", "commander": "^12.1.0", "comment-parser": "^1.4.1", diff --git a/code/yarn.lock b/code/yarn.lock index 2fee948647fe..f19449a312c0 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -6772,7 +6772,6 @@ __metadata: "@types/prompts": "npm:^2.0.9" "@types/semver": "npm:^7.3.4" boxen: "npm:^7.1.1" - chalk: "npm:^4.1.0" commander: "npm:^12.1.0" create-storybook: "workspace:*" cross-spawn: "npm:^7.0.3" @@ -6784,6 +6783,7 @@ __metadata: globby: "npm:^14.0.1" jscodeshift: "npm:^0.15.1" leven: "npm:^3.1.0" + picocolors: "npm:^1.1.0" prompts: "npm:^2.4.0" semver: "npm:^7.3.7" slash: "npm:^5.0.0" @@ -6945,6 +6945,7 @@ __metadata: browser-dtector: "npm:^3.4.0" camelcase: "npm:^8.0.0" chai: "npm:^4.4.1" + chalk: "npm:^5.3.0" cli-table3: "npm:^0.6.1" commander: "npm:^12.1.0" comment-parser: "npm:^1.4.1" @@ -13386,7 +13387,6 @@ __metadata: "@types/semver": "npm:^7.3.4" "@types/util-deprecate": "npm:^1.0.0" boxen: "npm:^7.1.1" - chalk: "npm:^4.1.0" commander: "npm:^12.1.0" execa: "npm:^5.0.0" fd-package-json: "npm:^1.2.0" From a76e0609d887041b7e61c4369b0b56736100b918 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 25 Sep 2024 15:53:25 +0200 Subject: [PATCH 15/39] rename variable to indicate we're not using `qs` anymore --- .../src/preview-api/modules/preview-web/parseArgsParam.ts | 4 ++-- code/core/src/router/utils.ts | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/code/core/src/preview-api/modules/preview-web/parseArgsParam.ts b/code/core/src/preview-api/modules/preview-web/parseArgsParam.ts index ececf4f2dd53..f45aee739893 100644 --- a/code/core/src/preview-api/modules/preview-web/parseArgsParam.ts +++ b/code/core/src/preview-api/modules/preview-web/parseArgsParam.ts @@ -53,7 +53,7 @@ const validateArgs = (key = '', value: unknown): boolean => { return false; }; -const QS_OPTIONS: Partial = { +const QUERY_OPTIONS: Partial = { delimiter: ';', // we're parsing a single query param nesting: true, arrayRepeat: true, @@ -108,7 +108,7 @@ const QS_OPTIONS: Partial = { }; export const parseArgsParam = (argsString: string): Args => { const parts = argsString.split(';').map((part) => part.replace('=', '~').replace(':', '=')); - return Object.entries(parse(parts.join(';'), QS_OPTIONS)).reduce((acc, [key, value]) => { + return Object.entries(parse(parts.join(';'), QUERY_OPTIONS)).reduce((acc, [key, value]) => { if (validateArgs(key, value)) { return Object.assign(acc, { [key]: value }); } diff --git a/code/core/src/router/utils.ts b/code/core/src/router/utils.ts index 2459cbaffe4f..363b104226cd 100644 --- a/code/core/src/router/utils.ts +++ b/code/core/src/router/utils.ts @@ -163,7 +163,7 @@ const encodeSpecialValues = (value: unknown): any => { return value; }; -const QS_OPTIONS: Partial = { +const QUERY_OPTIONS: Partial = { delimiter: ';', // we don't actually create multiple query params nesting: true, nestingSyntax: 'js', // encode objects using dot notation: obj.key=val @@ -209,7 +209,7 @@ export const buildArgsParam = (initialArgs: Args | undefined, args: Args): strin return acc; }, {} as Args); - return stringify(encodeSpecialValues(object), QS_OPTIONS) + return stringify(encodeSpecialValues(object), QUERY_OPTIONS) .replace(knownQueryChar, decodeKnownQueryChar) .split(';') .map((part: string) => part.replace('=', ':')) @@ -221,7 +221,7 @@ interface Query { } export const queryFromString = memoize(1000)( - (s?: string): Query => (s !== undefined ? parse(s, QS_OPTIONS) : {}) + (s?: string): Query => (s !== undefined ? parse(s, QUERY_OPTIONS) : {}) ); export const queryFromLocation = (location: Partial) => queryFromString(location.search ? location.search.slice(1) : ''); From 4468a15752aea0cdc2d0ce499e1bf59aa6fb2664 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 25 Sep 2024 15:54:31 +0200 Subject: [PATCH 16/39] dedupe --- code/yarn.lock | 46 ++++++---------------------------------------- 1 file changed, 6 insertions(+), 40 deletions(-) diff --git a/code/yarn.lock b/code/yarn.lock index 4d807264d5a3..052c66d16889 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -4999,7 +4999,7 @@ __metadata: languageName: node linkType: hard -"@radix-ui/react-slot@npm:1.0.2, @radix-ui/react-slot@npm:^1.0.2": +"@radix-ui/react-slot@npm:1.0.2": version: 1.0.2 resolution: "@radix-ui/react-slot@npm:1.0.2" dependencies: @@ -5015,7 +5015,7 @@ __metadata: languageName: node linkType: hard -"@radix-ui/react-slot@npm:1.1.0": +"@radix-ui/react-slot@npm:1.1.0, @radix-ui/react-slot@npm:^1.0.2": version: 1.1.0 resolution: "@radix-ui/react-slot@npm:1.1.0" dependencies: @@ -13720,14 +13720,7 @@ __metadata: languageName: node linkType: hard -"emoji-regex@npm:^10.2.1": - version: 10.3.0 - resolution: "emoji-regex@npm:10.3.0" - checksum: 10c0/b4838e8dcdceb44cf47f59abe352c25ff4fe7857acaf5fb51097c427f6f75b44d052eb907a7a3b86f86bc4eae3a93f5c2b7460abe79c407307e6212d65c91163 - languageName: node - linkType: hard - -"emoji-regex@npm:^10.3.0": +"emoji-regex@npm:^10.2.1, emoji-regex@npm:^10.3.0": version: 10.4.0 resolution: "emoji-regex@npm:10.4.0" checksum: 10c0/a3fcedfc58bfcce21a05a5f36a529d81e88d602100145fcca3dc6f795e3c8acc4fc18fe773fbf9b6d6e9371205edb3afa2668ec3473fa2aa7fd47d2a9d46482d @@ -18338,16 +18331,7 @@ __metadata: languageName: node linkType: hard -"jiti@npm:^1.20.0": - version: 1.21.0 - resolution: "jiti@npm:1.21.0" - bin: - jiti: bin/jiti.js - checksum: 10c0/7f361219fe6c7a5e440d5f1dba4ab763a5538d2df8708cdc22561cf25ea3e44b837687931fca7cdd8cdd9f567300e90be989dd1321650045012d8f9ed6aab07f - languageName: node - linkType: hard - -"jiti@npm:^1.21.6": +"jiti@npm:^1.20.0, jiti@npm:^1.21.6": version: 1.21.6 resolution: "jiti@npm:1.21.6" bin: @@ -23163,16 +23147,7 @@ __metadata: languageName: node linkType: hard -"prettier@npm:*, prettier@npm:^3.1.1": - version: 3.2.5 - resolution: "prettier@npm:3.2.5" - bin: - prettier: bin/prettier.cjs - checksum: 10c0/ea327f37a7d46f2324a34ad35292af2ad4c4c3c3355da07313339d7e554320f66f65f91e856add8530157a733c6c4a897dc41b577056be5c24c40f739f5ee8c6 - languageName: node - linkType: hard - -"prettier@npm:^3.2.5": +"prettier@npm:*, prettier@npm:^3.1.1, prettier@npm:^3.2.5": version: 3.3.3 resolution: "prettier@npm:3.3.3" bin: @@ -25470,16 +25445,7 @@ __metadata: languageName: node linkType: hard -"semver@npm:^7.0.0, semver@npm:^7.1.1, semver@npm:^7.2.1, semver@npm:^7.3.4, semver@npm:^7.3.5, semver@npm:^7.3.7, semver@npm:^7.3.8, semver@npm:^7.5.3, semver@npm:^7.5.4, semver@npm:^7.6.0, semver@npm:^7.6.2": - version: 7.6.2 - resolution: "semver@npm:7.6.2" - bin: - semver: bin/semver.js - checksum: 10c0/97d3441e97ace8be4b1976433d1c32658f6afaff09f143e52c593bae7eef33de19e3e369c88bd985ce1042c6f441c80c6803078d1de2a9988080b66684cbb30c - languageName: node - linkType: hard - -"semver@npm:^7.6.3": +"semver@npm:^7.0.0, semver@npm:^7.1.1, semver@npm:^7.2.1, semver@npm:^7.3.4, semver@npm:^7.3.5, semver@npm:^7.3.7, semver@npm:^7.3.8, semver@npm:^7.5.3, semver@npm:^7.5.4, semver@npm:^7.6.0, semver@npm:^7.6.2, semver@npm:^7.6.3": version: 7.6.3 resolution: "semver@npm:7.6.3" bin: From f8c9172925eaaeeaff8207f2f5075d9453e3b070 Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Thu, 26 Sep 2024 10:38:00 +0200 Subject: [PATCH 17/39] Discard changes to code/core/src/preview-api/modules/preview-web/parseArgsParam.test.ts --- .../preview-web/parseArgsParam.test.ts | 21 +++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/code/core/src/preview-api/modules/preview-web/parseArgsParam.test.ts b/code/core/src/preview-api/modules/preview-web/parseArgsParam.test.ts index f0416db84dc5..28879b3464df 100644 --- a/code/core/src/preview-api/modules/preview-web/parseArgsParam.test.ts +++ b/code/core/src/preview-api/modules/preview-web/parseArgsParam.test.ts @@ -58,7 +58,7 @@ describe('parseArgsParam', () => { }); it('parses Date with timezone offset', () => { - const args = parseArgsParam('key:!date(2001-02-03T04:05:06.789%2B09:00)'); + const args = parseArgsParam('key:!date(2001-02-03T04:05:06.789+09:00)'); expect(args).toStrictEqual({ key: new Date('2001-02-03T04:05:06.789+09:00') }); }); @@ -127,7 +127,7 @@ describe('parseArgsParam', () => { }); it('parses single object in array', () => { - const args = parseArgsParam('arr[0].one:A;arr[0].two:B'); + const args = parseArgsParam('arr[].one:A;arr[].two:B'); expect(args).toStrictEqual({ arr: [{ one: 'A', two: 'B' }] }); }); @@ -135,10 +135,14 @@ describe('parseArgsParam', () => { expect(parseArgsParam('arr[0].key:A;arr[1].key:B')).toStrictEqual({ arr: [{ key: 'A' }, { key: 'B' }], }); + expect(parseArgsParam('arr[0][key]:A;arr[1][key]:B')).toStrictEqual({ + arr: [{ key: 'A' }, { key: 'B' }], + }); }); it('parses nested object in array', () => { - expect(parseArgsParam('arr[0].foo.bar:val')).toStrictEqual({ arr: [{ foo: { bar: 'val' } }] }); + expect(parseArgsParam('arr[].foo.bar:val')).toStrictEqual({ arr: [{ foo: { bar: 'val' } }] }); + expect(parseArgsParam('arr[][foo][bar]:val')).toStrictEqual({ arr: [{ foo: { bar: 'val' } }] }); }); describe('key sanitization', () => { @@ -160,6 +164,8 @@ describe('parseArgsParam', () => { expect(parseArgsParam('a/b:val')).toStrictEqual({}); expect(parseArgsParam('a\\b:val')).toStrictEqual({}); expect(parseArgsParam('a|b:val')).toStrictEqual({}); + expect(parseArgsParam('a[b:val')).toStrictEqual({}); + expect(parseArgsParam('a]b:val')).toStrictEqual({}); expect(parseArgsParam('a{b:val')).toStrictEqual({}); expect(parseArgsParam('a}b:val')).toStrictEqual({}); expect(parseArgsParam('a?b:val')).toStrictEqual({}); @@ -179,10 +185,14 @@ describe('parseArgsParam', () => { it('also applies to nested object keys', () => { expect(parseArgsParam('obj.a!b:val')).toStrictEqual({}); + expect(parseArgsParam('obj[a!b]:val')).toStrictEqual({}); + expect(parseArgsParam('arr[][a!b]:val')).toStrictEqual({}); + expect(parseArgsParam('arr[0][a!b]:val')).toStrictEqual({}); }); it('completely omits an arg when a (deeply) nested key is invalid', () => { expect(parseArgsParam('obj.foo.a!b:val;obj.foo.bar:val;obj.baz:val')).toStrictEqual({}); + expect(parseArgsParam('obj.foo[][a!b]:val;obj.foo.bar:val;obj.baz:val')).toStrictEqual({}); expect(parseArgsParam('obj.foo.a!b:val;key:val')).toStrictEqual({ key: 'val' }); }); }); @@ -237,6 +247,9 @@ describe('parseArgsParam', () => { it('also applies to nested object and array values', () => { expect(parseArgsParam('obj.key:a!b')).toStrictEqual({}); + expect(parseArgsParam('obj[key]:a!b')).toStrictEqual({}); + expect(parseArgsParam('arr[][key]:a!b')).toStrictEqual({}); + expect(parseArgsParam('arr[0][key]:a!b')).toStrictEqual({}); expect(parseArgsParam('arr[]:a!b')).toStrictEqual({}); expect(parseArgsParam('arr[0]:a!b')).toStrictEqual({}); }); @@ -245,7 +258,7 @@ describe('parseArgsParam', () => { expect(parseArgsParam('obj.key:a!b;obj.foo:val;obj.bar.baz:val')).toStrictEqual({}); expect(parseArgsParam('obj.arr[]:a!b;obj.foo:val;obj.bar.baz:val')).toStrictEqual({}); expect(parseArgsParam('obj.arr[0]:val;obj.arr[1]:a!b;obj.foo:val')).toStrictEqual({}); - expect(parseArgsParam('obj.arr[]:a!b;obj.arr[]:val')).toStrictEqual({}); + expect(parseArgsParam('obj.arr[][one]:a!b;obj.arr[][two]:val')).toStrictEqual({}); expect(parseArgsParam('arr[]:val;arr[]:a!b;key:val')).toStrictEqual({ key: 'val' }); expect(parseArgsParam('arr[0]:val;arr[1]:a!1;key:val')).toStrictEqual({ key: 'val' }); expect(parseArgsParam('arr[0]:val;arr[2]:a!1;key:val')).toStrictEqual({ key: 'val' }); From b45ea689bae53053147c0cb70f9fed1b6a9b4e8a Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Thu, 26 Sep 2024 10:55:13 +0200 Subject: [PATCH 18/39] fix parseArgsParams and tests --- .../preview-web/parseArgsParam.test.ts | 19 ++----------------- .../modules/preview-web/parseArgsParam.ts | 2 +- 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/code/core/src/preview-api/modules/preview-web/parseArgsParam.test.ts b/code/core/src/preview-api/modules/preview-web/parseArgsParam.test.ts index 28879b3464df..7b8da7118702 100644 --- a/code/core/src/preview-api/modules/preview-web/parseArgsParam.test.ts +++ b/code/core/src/preview-api/modules/preview-web/parseArgsParam.test.ts @@ -127,7 +127,7 @@ describe('parseArgsParam', () => { }); it('parses single object in array', () => { - const args = parseArgsParam('arr[].one:A;arr[].two:B'); + const args = parseArgsParam('arr[0].one:A;arr[0].two:B'); expect(args).toStrictEqual({ arr: [{ one: 'A', two: 'B' }] }); }); @@ -135,14 +135,10 @@ describe('parseArgsParam', () => { expect(parseArgsParam('arr[0].key:A;arr[1].key:B')).toStrictEqual({ arr: [{ key: 'A' }, { key: 'B' }], }); - expect(parseArgsParam('arr[0][key]:A;arr[1][key]:B')).toStrictEqual({ - arr: [{ key: 'A' }, { key: 'B' }], - }); }); it('parses nested object in array', () => { - expect(parseArgsParam('arr[].foo.bar:val')).toStrictEqual({ arr: [{ foo: { bar: 'val' } }] }); - expect(parseArgsParam('arr[][foo][bar]:val')).toStrictEqual({ arr: [{ foo: { bar: 'val' } }] }); + expect(parseArgsParam('arr[0].foo.bar:val')).toStrictEqual({ arr: [{ foo: { bar: 'val' } }] }); }); describe('key sanitization', () => { @@ -164,8 +160,6 @@ describe('parseArgsParam', () => { expect(parseArgsParam('a/b:val')).toStrictEqual({}); expect(parseArgsParam('a\\b:val')).toStrictEqual({}); expect(parseArgsParam('a|b:val')).toStrictEqual({}); - expect(parseArgsParam('a[b:val')).toStrictEqual({}); - expect(parseArgsParam('a]b:val')).toStrictEqual({}); expect(parseArgsParam('a{b:val')).toStrictEqual({}); expect(parseArgsParam('a}b:val')).toStrictEqual({}); expect(parseArgsParam('a?b:val')).toStrictEqual({}); @@ -185,14 +179,10 @@ describe('parseArgsParam', () => { it('also applies to nested object keys', () => { expect(parseArgsParam('obj.a!b:val')).toStrictEqual({}); - expect(parseArgsParam('obj[a!b]:val')).toStrictEqual({}); - expect(parseArgsParam('arr[][a!b]:val')).toStrictEqual({}); - expect(parseArgsParam('arr[0][a!b]:val')).toStrictEqual({}); }); it('completely omits an arg when a (deeply) nested key is invalid', () => { expect(parseArgsParam('obj.foo.a!b:val;obj.foo.bar:val;obj.baz:val')).toStrictEqual({}); - expect(parseArgsParam('obj.foo[][a!b]:val;obj.foo.bar:val;obj.baz:val')).toStrictEqual({}); expect(parseArgsParam('obj.foo.a!b:val;key:val')).toStrictEqual({ key: 'val' }); }); }); @@ -247,10 +237,6 @@ describe('parseArgsParam', () => { it('also applies to nested object and array values', () => { expect(parseArgsParam('obj.key:a!b')).toStrictEqual({}); - expect(parseArgsParam('obj[key]:a!b')).toStrictEqual({}); - expect(parseArgsParam('arr[][key]:a!b')).toStrictEqual({}); - expect(parseArgsParam('arr[0][key]:a!b')).toStrictEqual({}); - expect(parseArgsParam('arr[]:a!b')).toStrictEqual({}); expect(parseArgsParam('arr[0]:a!b')).toStrictEqual({}); }); @@ -258,7 +244,6 @@ describe('parseArgsParam', () => { expect(parseArgsParam('obj.key:a!b;obj.foo:val;obj.bar.baz:val')).toStrictEqual({}); expect(parseArgsParam('obj.arr[]:a!b;obj.foo:val;obj.bar.baz:val')).toStrictEqual({}); expect(parseArgsParam('obj.arr[0]:val;obj.arr[1]:a!b;obj.foo:val')).toStrictEqual({}); - expect(parseArgsParam('obj.arr[][one]:a!b;obj.arr[][two]:val')).toStrictEqual({}); expect(parseArgsParam('arr[]:val;arr[]:a!b;key:val')).toStrictEqual({ key: 'val' }); expect(parseArgsParam('arr[0]:val;arr[1]:a!1;key:val')).toStrictEqual({ key: 'val' }); expect(parseArgsParam('arr[0]:val;arr[2]:a!1;key:val')).toStrictEqual({ key: 'val' }); diff --git a/code/core/src/preview-api/modules/preview-web/parseArgsParam.ts b/code/core/src/preview-api/modules/preview-web/parseArgsParam.ts index f45aee739893..f85614ad3137 100644 --- a/code/core/src/preview-api/modules/preview-web/parseArgsParam.ts +++ b/code/core/src/preview-api/modules/preview-web/parseArgsParam.ts @@ -78,7 +78,7 @@ const QUERY_OPTIONS: Partial = { } if (str.startsWith('!date(') && str.endsWith(')')) { - return new Date(str.slice(6, -1)); + return new Date(str.replaceAll(' ', '+').slice(6, -1)); } if (str.startsWith('!hex(') && str.endsWith(')')) { From 099be6bc9dd031d99a0be53812c6bb2877a6f331 Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Thu, 26 Sep 2024 11:13:17 +0200 Subject: [PATCH 19/39] format --- code/core/src/common/js-package-manager/JsPackageManager.ts | 2 +- .../src/preview-api/modules/store/csf/portable-stories.ts | 2 +- code/e2e-tests/util.ts | 2 +- code/frameworks/angular/src/server/angular-cli-webpack.js | 2 +- code/frameworks/vue3-vite/src/preset.ts | 2 +- .../cli-storybook/src/automigrate/helpers/mainConfigFile.ts | 4 +++- .../src/automigrate/helpers/new-frameworks-utils.ts | 4 ++-- code/lib/cli-storybook/src/automigrate/index.ts | 2 +- code/lib/codemod/src/transforms/__tests__/mdx-to-csf.test.ts | 2 +- code/renderers/vue3/src/docs/extractArgTypes.ts | 2 +- 10 files changed, 13 insertions(+), 11 deletions(-) diff --git a/code/core/src/common/js-package-manager/JsPackageManager.ts b/code/core/src/common/js-package-manager/JsPackageManager.ts index 1d1f2ef5367c..3827c6003ce2 100644 --- a/code/core/src/common/js-package-manager/JsPackageManager.ts +++ b/code/core/src/common/js-package-manager/JsPackageManager.ts @@ -60,7 +60,7 @@ export abstract class JsPackageManager { /** Get the INSTALLED version of a package from the package.json file */ async getPackageVersion(packageName: string, basePath = this.cwd): Promise { const packageJSON = await this.getPackageJSON(packageName, basePath); - return packageJSON ? packageJSON.version ?? null : null; + return packageJSON ? (packageJSON.version ?? null) : null; } constructor(options?: JsPackageManagerOptions) { diff --git a/code/core/src/preview-api/modules/store/csf/portable-stories.ts b/code/core/src/preview-api/modules/store/csf/portable-stories.ts index fd50bd57c2dd..2ae9143a1a5d 100644 --- a/code/core/src/preview-api/modules/store/csf/portable-stories.ts +++ b/code/core/src/preview-api/modules/store/csf/portable-stories.ts @@ -126,7 +126,7 @@ export function composeStory 0 ? defaultConfig - : globalThis.defaultProjectAnnotations ?? {}, + : (globalThis.defaultProjectAnnotations ?? {}), globalThis.globalProjectAnnotations ?? {}, projectAnnotations ?? {}, ]) diff --git a/code/e2e-tests/util.ts b/code/e2e-tests/util.ts index 00122ef595d2..2137386c6675 100644 --- a/code/e2e-tests/util.ts +++ b/code/e2e-tests/util.ts @@ -49,7 +49,7 @@ export class SbPage { await this.page.waitForURL((url) => url.search.includes( - `path=/${viewMode ?? name === 'docs' ? 'docs' : 'story'}/${titleId}--${storyId}` + `path=/${(viewMode ?? name === 'docs') ? 'docs' : 'story'}/${titleId}--${storyId}` ) ); diff --git a/code/frameworks/angular/src/server/angular-cli-webpack.js b/code/frameworks/angular/src/server/angular-cli-webpack.js index 92ed6225d19f..6be86712e5bc 100644 --- a/code/frameworks/angular/src/server/angular-cli-webpack.js +++ b/code/frameworks/angular/src/server/angular-cli-webpack.js @@ -68,7 +68,7 @@ exports.getWebpackConfig = async (baseConfig, { builderOptions, builderContext } outputPath: typeof builderOptions.outputPath === 'string' ? builderOptions.outputPath - : builderOptions.outputPath?.base ?? 'noop-out', + : (builderOptions.outputPath?.base ?? 'noop-out'), // Fixed options optimization: false, diff --git a/code/frameworks/vue3-vite/src/preset.ts b/code/frameworks/vue3-vite/src/preset.ts index 574ab0a04ad3..8bbaf394d442 100644 --- a/code/frameworks/vue3-vite/src/preset.ts +++ b/code/frameworks/vue3-vite/src/preset.ts @@ -22,7 +22,7 @@ export const viteFinal: StorybookConfig['viteFinal'] = async (config, options) = const framework = await options.presets.apply('framework'); const frameworkOptions: FrameworkOptions = - typeof framework === 'string' ? {} : framework.options ?? {}; + typeof framework === 'string' ? {} : (framework.options ?? {}); const docgen = resolveDocgenOptions(frameworkOptions.docgen); diff --git a/code/lib/cli-storybook/src/automigrate/helpers/mainConfigFile.ts b/code/lib/cli-storybook/src/automigrate/helpers/mainConfigFile.ts index bf9daf36c7ae..c306d2578a13 100644 --- a/code/lib/cli-storybook/src/automigrate/helpers/mainConfigFile.ts +++ b/code/lib/cli-storybook/src/automigrate/helpers/mainConfigFile.ts @@ -94,7 +94,9 @@ export const getBuilderPackageName = (mainConfig?: StorybookConfigRaw) => { export const getFrameworkOptions = ( mainConfig?: StorybookConfigRaw ): Record | null => { - return typeof mainConfig?.framework === 'string' ? null : mainConfig?.framework?.options ?? null; + return typeof mainConfig?.framework === 'string' + ? null + : (mainConfig?.framework?.options ?? null); }; /** diff --git a/code/lib/cli-storybook/src/automigrate/helpers/new-frameworks-utils.ts b/code/lib/cli-storybook/src/automigrate/helpers/new-frameworks-utils.ts index a4ab6ee34a4f..280bb2cf5034 100644 --- a/code/lib/cli-storybook/src/automigrate/helpers/new-frameworks-utils.ts +++ b/code/lib/cli-storybook/src/automigrate/helpers/new-frameworks-utils.ts @@ -77,14 +77,14 @@ export const detectBuilderInfo = async ({ const builderPackageName = getBuilderPackageName(mainConfig); const frameworkPackageName = getFrameworkPackageName(mainConfig) as string; - let builderOptions = typeof builder !== 'string' ? builder?.options ?? {} : {}; + let builderOptions = typeof builder !== 'string' ? (builder?.options ?? {}) : {}; if (builderPackageName) { builderOrFrameworkName = builderPackageName; } else if (framework) { if (Object.keys(frameworkPackages).includes(frameworkPackageName)) { builderOrFrameworkName = frameworkPackageName; - builderOptions = typeof framework === 'object' ? framework.options?.builder ?? {} : {}; + builderOptions = typeof framework === 'object' ? (framework.options?.builder ?? {}) : {}; } } diff --git a/code/lib/cli-storybook/src/automigrate/index.ts b/code/lib/cli-storybook/src/automigrate/index.ts index ff727783dff3..e5b8126d5e29 100644 --- a/code/lib/cli-storybook/src/automigrate/index.ts +++ b/code/lib/cli-storybook/src/automigrate/index.ts @@ -275,7 +275,7 @@ export async function runFixes({ if (result) { const promptType: Prompt = - typeof f.promptType === 'function' ? await f.promptType(result) : f.promptType ?? 'auto'; + typeof f.promptType === 'function' ? await f.promptType(result) : (f.promptType ?? 'auto'); logger.info(`\n🔎 found a '${chalk.cyan(f.id)}' migration:`); const message = f.prompt(result); diff --git a/code/lib/codemod/src/transforms/__tests__/mdx-to-csf.test.ts b/code/lib/codemod/src/transforms/__tests__/mdx-to-csf.test.ts index 304fb0c40b05..6d41995d3e82 100644 --- a/code/lib/codemod/src/transforms/__tests__/mdx-to-csf.test.ts +++ b/code/lib/codemod/src/transforms/__tests__/mdx-to-csf.test.ts @@ -7,7 +7,7 @@ import { dedent } from 'ts-dedent'; import jscodeshift, { nameToValidExport } from '../mdx-to-csf'; expect.addSnapshotSerializer({ - print: (val: any) => (typeof val === 'string' ? val : JSON.stringify(val, null, 2) ?? ''), + print: (val: any) => (typeof val === 'string' ? val : (JSON.stringify(val, null, 2) ?? '')), test: () => true, }); diff --git a/code/renderers/vue3/src/docs/extractArgTypes.ts b/code/renderers/vue3/src/docs/extractArgTypes.ts index 7e76c731177f..f52f21c15255 100644 --- a/code/renderers/vue3/src/docs/extractArgTypes.ts +++ b/code/renderers/vue3/src/docs/extractArgTypes.ts @@ -129,7 +129,7 @@ export const extractFromVueDocgenApi = ( } } - const required = 'required' in docgenInfo ? docgenInfo.required ?? false : false; + const required = 'required' in docgenInfo ? (docgenInfo.required ?? false) : false; return { name: docgenInfo.name, From c08542be88f3aaf534846f65909da9c8d77f465f Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Thu, 26 Sep 2024 15:25:33 +0200 Subject: [PATCH 20/39] fix --- code/core/src/router/router.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/core/src/router/router.tsx b/code/core/src/router/router.tsx index 1866984ca3ea..d2b9d3f6e8b1 100644 --- a/code/core/src/router/router.tsx +++ b/code/core/src/router/router.tsx @@ -6,7 +6,7 @@ import { global } from '@storybook/global'; import * as R from 'react-router-dom'; import type { LinkProps, NavigateOptions, RenderData } from './types'; -import { getMatch, parsePath, queryFromString } from './utils'; +import { getMatch, parsePath, queryFromLocation } from './utils'; const { document } = global; @@ -76,7 +76,7 @@ Link.displayName = 'QueryLink'; */ export const Location = ({ children }: LocationProps) => { const location = R.useLocation(); - const { path, singleStory } = queryFromString(location.search); + const { path, singleStory } = queryFromLocation(location); const { viewMode, storyId, refId } = parsePath(path); return ( From 8ab6f623e092b55da2c5aa7a991436e1cfa2ca2e Mon Sep 17 00:00:00 2001 From: Michael Shilman Date: Thu, 26 Sep 2024 22:09:52 -0400 Subject: [PATCH 21/39] A11y: Improve test runner recipe --- docs/_snippets/test-runner-a11y-configure.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/_snippets/test-runner-a11y-configure.md b/docs/_snippets/test-runner-a11y-configure.md index 1218954e8f91..cae622a42136 100644 --- a/docs/_snippets/test-runner-a11y-configure.md +++ b/docs/_snippets/test-runner-a11y-configure.md @@ -20,7 +20,8 @@ module.exports = { rules: storyContext.parameters?.a11y?.config?.rules, }); - await checkA11y(page, '#storybook-root', { + const element = storyContext.parameters?.a11y?.element ?? '#storybook-root'; + await checkA11y(page, element, { detailedReport: true, detailedReportOptions: { html: true, @@ -53,7 +54,8 @@ const config: TestRunnerConfig = { rules: storyContext.parameters?.a11y?.config?.rules, }); - await checkA11y(page, '#storybook-root', { + const element = storyContext.parameters?.a11y?.element ?? '#storybook-root'; + await checkA11y(page, element, { detailedReport: true, detailedReportOptions: { html: true, @@ -64,4 +66,3 @@ const config: TestRunnerConfig = { export default config; ``` - From 9f9446be8790c6b30904c28913fbdf321730101e Mon Sep 17 00:00:00 2001 From: storybook-bot <32066757+storybook-bot@users.noreply.github.com> Date: Sat, 28 Sep 2024 11:01:42 +0000 Subject: [PATCH 22/39] Update CHANGELOG.md for v8.3.4 [skip ci] --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3115c6b4c070..dd75af133731 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## 8.3.4 + +- Addon Test: Support story name as test description - [#29147](https://github.com/storybookjs/storybook/pull/29147), thanks @InfiniteXyy! +- Addon-Interactions: Use ansi-to-html for colored test errors - [#29110](https://github.com/storybookjs/storybook/pull/29110), thanks @kasperpeulen! + ## 8.3.3 - CLI: Show constraints in error when getting depndencies - [#29187](https://github.com/storybookjs/storybook/pull/29187), thanks @andrasczeh! From df1aad2f66438e05db1bc907f3594522db73db4f Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Mon, 30 Sep 2024 12:47:04 +0200 Subject: [PATCH 23/39] Fixes by not re-using query-options meant for args&globals use only --- .../preview/utils/stringifyQueryParams.tsx | 10 ++++++-- .../modules/preview-web/WebView.ts | 2 +- code/core/src/router/utils.ts | 23 +++++++++---------- 3 files changed, 20 insertions(+), 15 deletions(-) diff --git a/code/core/src/manager/components/preview/utils/stringifyQueryParams.tsx b/code/core/src/manager/components/preview/utils/stringifyQueryParams.tsx index f98f5aed2066..dea058659eac 100644 --- a/code/core/src/manager/components/preview/utils/stringifyQueryParams.tsx +++ b/code/core/src/manager/components/preview/utils/stringifyQueryParams.tsx @@ -1,4 +1,10 @@ import { stringify } from 'picoquery'; -export const stringifyQueryParams = (queryParams: Record) => - '&' + stringify(queryParams); +export const stringifyQueryParams = (queryParams: Record) => { + const result = stringify(queryParams); + if (result === '') { + return ''; + } + + return `&${result}`; +}; diff --git a/code/core/src/preview-api/modules/preview-web/WebView.ts b/code/core/src/preview-api/modules/preview-web/WebView.ts index 6d15d09dd1a9..90b0d23dce7b 100644 --- a/code/core/src/preview-api/modules/preview-web/WebView.ts +++ b/code/core/src/preview-api/modules/preview-web/WebView.ts @@ -50,7 +50,7 @@ export class WebView implements View { // Special code for testing situations if (typeof document !== 'undefined') { // eslint-disable-next-line @typescript-eslint/naming-convention - const { __SPECIAL_TEST_PARAMETER__ } = parse(document.location.search); + const { __SPECIAL_TEST_PARAMETER__ } = parse(document.location.search.slice(1)); switch (__SPECIAL_TEST_PARAMETER__) { case 'preparing-story': { this.showPreparingStory(); diff --git a/code/core/src/router/utils.ts b/code/core/src/router/utils.ts index 363b104226cd..f10df1098caa 100644 --- a/code/core/src/router/utils.ts +++ b/code/core/src/router/utils.ts @@ -163,12 +163,6 @@ const encodeSpecialValues = (value: unknown): any => { return value; }; -const QUERY_OPTIONS: Partial = { - delimiter: ';', // we don't actually create multiple query params - nesting: true, - nestingSyntax: 'js', // encode objects using dot notation: obj.key=val -}; - // Replaces some url-encoded characters with their decoded equivalents. // The URI RFC specifies these should be encoded, but all browsers will // tolerate them being decoded, so we opt to go with it for cleaner looking @@ -209,7 +203,11 @@ export const buildArgsParam = (initialArgs: Args | undefined, args: Args): strin return acc; }, {} as Args); - return stringify(encodeSpecialValues(object), QUERY_OPTIONS) + return stringify(encodeSpecialValues(object), { + delimiter: ';', // we don't actually create multiple query params + nesting: true, + nestingSyntax: 'js', // encode objects using dot notation: obj.key=val + }) .replace(knownQueryChar, decodeKnownQueryChar) .split(';') .map((part: string) => part.replace('=', ':')) @@ -220,11 +218,12 @@ interface Query { [key: string]: any; } -export const queryFromString = memoize(1000)( - (s?: string): Query => (s !== undefined ? parse(s, QUERY_OPTIONS) : {}) -); -export const queryFromLocation = (location: Partial) => - queryFromString(location.search ? location.search.slice(1) : ''); +const queryFromString = memoize(1000)((s?: string): Query => (s !== undefined ? parse(s) : {})); + +export const queryFromLocation = (location: Partial) => { + return queryFromString(location.search ? location.search.slice(1) : ''); +}; + export const stringifyQuery = (query: Query) => { const queryStr = stringify(query); return queryStr ? '?' + queryStr : ''; From 6066c64be196c9a876ae5f12fb97643031fe18f4 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Mon, 30 Sep 2024 12:58:52 +0200 Subject: [PATCH 24/39] make our color examples lowercase always & fix a bug where we didn't detect uppercase color prefixes --- code/.storybook/preview.tsx | 6 +++--- .../src/preview-api/modules/preview-web/parseArgsParam.ts | 6 +++--- code/lib/blocks/src/controls/Color.stories.tsx | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/code/.storybook/preview.tsx b/code/.storybook/preview.tsx index 1f366074846f..90ed8c8635f4 100644 --- a/code/.storybook/preview.tsx +++ b/code/.storybook/preview.tsx @@ -320,9 +320,9 @@ export const parameters = { { color: '#ff4785', title: 'Coral' }, { color: '#1EA7FD', title: 'Ocean' }, { color: 'rgb(252, 82, 31)', title: 'Orange' }, - { color: 'RGBA(255, 174, 0, 0.5)', title: 'Gold' }, + { color: 'rgba(255, 174, 0, 0.5)', title: 'Gold' }, { color: 'hsl(101, 52%, 49%)', title: 'Green' }, - { color: 'HSLA(179,65%,53%,0.5)', title: 'Seafoam' }, + { color: 'hsla(179,65%,53%,0.5)', title: 'Seafoam' }, { color: '#6F2CAC', title: 'Purple' }, { color: '#2A0481', title: 'Ultraviolet' }, { color: 'black' }, @@ -338,7 +338,7 @@ export const parameters = { '#fe4a49', '#FED766', 'rgba(0, 159, 183, 1)', - 'HSLA(240,11%,91%,0.5)', + 'hsla(240,11%,91%,0.5)', 'slategray', ], }, diff --git a/code/core/src/preview-api/modules/preview-web/parseArgsParam.ts b/code/core/src/preview-api/modules/preview-web/parseArgsParam.ts index f85614ad3137..625b102e322a 100644 --- a/code/core/src/preview-api/modules/preview-web/parseArgsParam.ts +++ b/code/core/src/preview-api/modules/preview-web/parseArgsParam.ts @@ -87,14 +87,14 @@ const QUERY_OPTIONS: Partial = { const color = str.slice(1).match(COLOR_REGEXP); if (color) { - if (str.startsWith('!rgba')) { + if (str.startsWith('!rgba') || str.startsWith('!RGBA')) { return `${color[1]}(${color[2]}, ${color[3]}, ${color[4]}, ${color[5]})`; } - if (str.startsWith('!hsla')) { + if (str.startsWith('!hsla') || str.startsWith('!HSLA')) { return `${color[1]}(${color[2]}, ${color[3]}%, ${color[4]}%, ${color[5]})`; } - return str.startsWith('!rgb') + return str.startsWith('!rgb') || str.startsWith('!RGB') ? `${color[1]}(${color[2]}, ${color[3]}, ${color[4]})` : `${color[1]}(${color[2]}, ${color[3]}%, ${color[4]}%)`; } diff --git a/code/lib/blocks/src/controls/Color.stories.tsx b/code/lib/blocks/src/controls/Color.stories.tsx index f12a0f05f80b..8b77cff62f0c 100644 --- a/code/lib/blocks/src/controls/Color.stories.tsx +++ b/code/lib/blocks/src/controls/Color.stories.tsx @@ -40,9 +40,9 @@ export const WithPresetColors: Story = { { color: '#ff4785', title: 'Coral' }, { color: '#1EA7FD', title: 'Ocean' }, { color: 'rgb(252, 82, 31)', title: 'Orange' }, - { color: 'RGBA(255, 174, 0, 0.5)', title: 'Gold' }, + { color: 'rgba(255, 174, 0, 0.5)', title: 'Gold' }, { color: 'hsl(101, 52%, 49%)', title: 'Green' }, - { color: 'HSLA(179,65%,53%,0.5)', title: 'Seafoam' }, + { color: 'hsla(179,65%,53%,0.5)', title: 'Seafoam' }, { color: '#6F2CAC', title: 'Purple' }, { color: '#2A0481', title: 'Ultraviolet' }, { color: 'black' }, @@ -58,7 +58,7 @@ export const WithPresetColors: Story = { '#fe4a49', '#FED766', 'rgba(0, 159, 183, 1)', - 'HSLA(240,11%,91%,0.5)', + 'hsla(240,11%,91%,0.5)', 'slategray', ], }, From 1f435629cc30064b2ccc1b8b26634d2c151271bf Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Mon, 30 Sep 2024 14:54:18 +0200 Subject: [PATCH 25/39] fix --- code/core/src/manager/globals/exports.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/code/core/src/manager/globals/exports.ts b/code/core/src/manager/globals/exports.ts index 2596f0f01602..ff8a7182e815 100644 --- a/code/core/src/manager/globals/exports.ts +++ b/code/core/src/manager/globals/exports.ts @@ -618,7 +618,6 @@ export default { 'getMatch', 'parsePath', 'queryFromLocation', - 'queryFromString', 'stringifyQuery', 'useNavigate', ], @@ -635,7 +634,6 @@ export default { 'getMatch', 'parsePath', 'queryFromLocation', - 'queryFromString', 'stringifyQuery', 'useNavigate', ], @@ -652,7 +650,6 @@ export default { 'getMatch', 'parsePath', 'queryFromLocation', - 'queryFromString', 'stringifyQuery', 'useNavigate', ], From 6e1dbe47b75732319d66c3e0c2789511a624633b Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Mon, 30 Sep 2024 16:28:24 +0200 Subject: [PATCH 26/39] add a custom hex color function --- code/core/src/node-logger/index.ts | 37 ++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 9 deletions(-) diff --git a/code/core/src/node-logger/index.ts b/code/core/src/node-logger/index.ts index 1a8abc242d25..921502eb525e 100644 --- a/code/core/src/node-logger/index.ts +++ b/code/core/src/node-logger/index.ts @@ -1,5 +1,4 @@ /// -import chalk from 'chalk'; import npmLog from 'npmlog'; import prettyTime from 'pretty-hrtime'; @@ -7,14 +6,34 @@ import prettyTime from 'pretty-hrtime'; // there are issues with the build: https://github.com/storybookjs/storybook/issues/14621 npmLog.stream = process.stdout; +function hex(hexColor: string) { + // Ensure the hex color is 6 characters long and starts with '#' + if (!/^#?[0-9A-Fa-f]{6}$/.test(hexColor)) { + throw new Error('Invalid hex color. It must be a 6-character hex code.'); + } + + // Remove the leading '#' if it exists + if (hexColor.startsWith('#')) { + hexColor = hexColor.slice(1); + } + + // Convert hex to RGB + const r = parseInt(hexColor.slice(0, 2), 16); + const g = parseInt(hexColor.slice(2, 4), 16); + const b = parseInt(hexColor.slice(4, 6), 16); + + // Return the ANSI escape sequence for the given RGB color + return (text: string) => `\x1b[38;2;${r};${g};${b}m${text}\x1b[0m`; +} + export const colors = { - pink: chalk.hex('F1618C'), - purple: chalk.hex('B57EE5'), - orange: chalk.hex('F3AD38'), - green: chalk.hex('A2E05E'), - blue: chalk.hex('6DABF5'), - red: chalk.hex('F16161'), - gray: chalk.gray, + pink: hex('#F1618C'), + purple: hex('#B57EE5'), + orange: hex('#F3AD38'), + green: hex('#A2E05E'), + blue: hex('#6DABF5'), + red: hex('#F16161'), + gray: hex('#B8C2CC'), }; export const logger = { @@ -40,7 +59,7 @@ export const logger = { console.log( msg - .replace(message.toString(), chalk.red(message.toString())) + .replace(message.toString(), colors.red(message.toString())) .replaceAll(process.cwd(), '.') ); } From cec1db1c2aa0b1da362bd8dadff84c449f9b3dc2 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Mon, 30 Sep 2024 16:41:32 +0200 Subject: [PATCH 27/39] fixes --- code/addons/test/src/postinstall.ts | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/code/addons/test/src/postinstall.ts b/code/addons/test/src/postinstall.ts index 695cbf90225f..ac64b80bdc22 100644 --- a/code/addons/test/src/postinstall.ts +++ b/code/addons/test/src/postinstall.ts @@ -14,6 +14,7 @@ import { import { colors, logger } from 'storybook/internal/node-logger'; import { findUp } from 'find-up'; +import picocolors from 'picocolors'; import { coerce, satisfies } from 'semver'; import c from 'tinyrainbow'; import { dedent } from 'ts-dedent'; @@ -30,7 +31,7 @@ export default async function postInstall(options: PostinstallOptions) { printSuccess( '👋 Howdy!', dedent` - I'm the installation helper for ${colors.pink.bold(ADDON_NAME)} + I'm the installation helper for ${colors.pink(ADDON_NAME)} Hold on for a moment while I look at your project and get it set up... ` @@ -78,14 +79,14 @@ export default async function postInstall(options: PostinstallOptions) { if (!isRendererSupported) { reasons.push(dedent` - • The addon cannot yet be used with ${colors.pink.bold(info.frameworkPackageName)} + • The addon cannot yet be used with ${picocolors.bold(colors.pink(info.frameworkPackageName))} `); } if (coercedVitestVersion && !satisfies(coercedVitestVersion, '>=2.0.0')) { reasons.push(` • The addon requires Vitest 2.0.0 or later. You are currently using ${vitestVersionSpecifier}. - Please update your ${colors.pink.bold('vitest')} dependency and try again. + Please update your ${picocolors.bold(colors.pink('vitest'))} dependency and try again. `); } @@ -93,7 +94,7 @@ export default async function postInstall(options: PostinstallOptions) { const nextVersion = await packageManager.getInstalledVersion('next'); if (!nextVersion) { reasons.push(dedent` - • You are using ${colors.pink.bold('@storybook/nextjs')} without having ${colors.pink.bold('next')} installed. + • You are using ${picocolors.bold(colors.pink('@storybook/nextjs'))} without having ${picocolors.bold(colors.pink('next'))} installed. Please install "next" or use a different Storybook framework integration and try again. `); } @@ -105,7 +106,7 @@ export default async function postInstall(options: PostinstallOptions) { ); reasons.push( dedent` - To roll back the installation, remove ${colors.pink.bold(ADDON_NAME)} from the "addons" array + To roll back the installation, remove ${picocolors.bold(colors.pink(ADDON_NAME))} from the "addons" array in your main Storybook config file and remove the dependency from your package.json file. ` ); @@ -148,7 +149,7 @@ export default async function postInstall(options: PostinstallOptions) { dedent` It looks like you're using Next.js. - Adding ${colors.pink.bold(`@storybook/experimental-nextjs-vite/vite-plugin`)} so you can use it with Vitest. + Adding ${picocolors.bold(colors.pink(`@storybook/experimental-nextjs-vite/vite-plugin`))} so you can use it with Vitest. More info about the plugin at: ${c.cyan`https://github.com/storybookjs/vite-plugin-storybook-nextjs`} ` @@ -256,7 +257,7 @@ export default async function postInstall(options: PostinstallOptions) { '🚨 Oh no!', dedent` You seem to have an existing test configuration in your Vite config file: - ${colors.gray(vitestWorkspaceFile)} + ${colors.gray(vitestWorkspaceFile || '')} I was able to configure most of the addon but could not safely extend your existing workspace file automatically, you must do it yourself. This was the last step. From 7b4c03f53991ecc995ec2a01e6ca330b31bc6db7 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Mon, 30 Sep 2024 16:43:42 +0200 Subject: [PATCH 28/39] fixes --- .../src/automigrate/helpers/getMigrationSummary.ts | 2 +- .../lib/cli-storybook/src/doctor/getDuplicatedDepsWarnings.ts | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/code/lib/cli-storybook/src/automigrate/helpers/getMigrationSummary.ts b/code/lib/cli-storybook/src/automigrate/helpers/getMigrationSummary.ts index 35de10d25fc2..67e07c9a5b29 100644 --- a/code/lib/cli-storybook/src/automigrate/helpers/getMigrationSummary.ts +++ b/code/lib/cli-storybook/src/automigrate/helpers/getMigrationSummary.ts @@ -26,7 +26,7 @@ function getGlossaryMessages( messages.push( Object.entries(fixSummary.failed) .map(([id, error]) => { - return `${picocolors.redBright(id)}:\n${error}`; + return `${picocolors.bold(picocolors.red(id))}:\n${error}`; }) .join('\n') ); diff --git a/code/lib/cli-storybook/src/doctor/getDuplicatedDepsWarnings.ts b/code/lib/cli-storybook/src/doctor/getDuplicatedDepsWarnings.ts index 72fa1f14ec80..617713f5adfc 100644 --- a/code/lib/cli-storybook/src/doctor/getDuplicatedDepsWarnings.ts +++ b/code/lib/cli-storybook/src/doctor/getDuplicatedDepsWarnings.ts @@ -67,7 +67,9 @@ export function getDuplicatedDepsWarnings( const hasMultipleMajorVersions = hasMultipleVersions(packageVersions); if (disallowList.includes(dep) && hasMultipleMajorVersions) { - acc.critical.push(`${picocolors.redBright(dep)}:\n${packageVersions.join(', ')}`); + acc.critical.push( + `${picocolors.bold(picocolors.red(dep))}:\n${packageVersions.join(', ')}` + ); } else { acc.trivial.push(`${picocolors.yellow(dep)}:\n${packageVersions.join(', ')}`); } From 7db8894a52658e1da2cf6beb398510d474ede886 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Mon, 30 Sep 2024 17:43:32 +0200 Subject: [PATCH 29/39] linting fixes --- code/addons/test/package.json | 2 ++ code/core/src/cli/helpers.ts | 2 +- code/core/src/common/js-package-manager/JsPackageManager.ts | 2 +- code/core/src/core-server/utils/StoryIndexGenerator.ts | 2 +- .../src/core-server/utils/output-startup-information.ts | 2 +- code/core/src/core-server/utils/server-statics.ts | 2 +- code/core/src/server-errors.ts | 6 +++--- code/lib/cli-storybook/src/automigrate/fixes/mdx-to-csf.ts | 2 +- code/lib/cli-storybook/src/bin/index.ts | 2 +- code/lib/cli-storybook/src/link.ts | 2 +- code/lib/cli-storybook/src/sandbox.ts | 2 +- code/lib/cli-storybook/src/upgrade.ts | 2 +- code/lib/create-storybook/package.json | 2 ++ code/lib/create-storybook/src/initiate.ts | 2 +- code/lib/create-storybook/src/scaffold-new-project.ts | 2 +- code/yarn.lock | 4 ++++ 16 files changed, 23 insertions(+), 15 deletions(-) diff --git a/code/addons/test/package.json b/code/addons/test/package.json index 4f70358b3d9a..3463074b176d 100644 --- a/code/addons/test/package.json +++ b/code/addons/test/package.json @@ -77,6 +77,8 @@ "@vitest/browser": "^2.0.0", "boxen": "^8.0.1", "find-up": "^7.0.0", + "picocolors": "^1.1.0", + "picomatch": "^2.3.0", "semver": "^7.6.3", "tinyrainbow": "^1.2.0", "ts-dedent": "^2.2.0", diff --git a/code/core/src/cli/helpers.ts b/code/core/src/cli/helpers.ts index 0c3e4da76b5b..38cf6151294f 100644 --- a/code/core/src/cli/helpers.ts +++ b/code/core/src/cli/helpers.ts @@ -11,8 +11,8 @@ import { import { versions as storybookMonorepoPackages } from '@storybook/core/common'; import type { SupportedFrameworks, SupportedRenderers } from '@storybook/core/types'; -import picocolors from 'picocolors'; import { findUpSync } from 'find-up'; +import picocolors from 'picocolors'; import { coerce, satisfies } from 'semver'; import stripJsonComments from 'strip-json-comments'; import invariant from 'tiny-invariant'; diff --git a/code/core/src/common/js-package-manager/JsPackageManager.ts b/code/core/src/common/js-package-manager/JsPackageManager.ts index 876de7c3ed64..5b0bdde0fdb6 100644 --- a/code/core/src/common/js-package-manager/JsPackageManager.ts +++ b/code/core/src/common/js-package-manager/JsPackageManager.ts @@ -2,9 +2,9 @@ import { existsSync, readFileSync } from 'node:fs'; import { readFile, writeFile } from 'node:fs/promises'; import { dirname, resolve } from 'node:path'; -import picocolors from 'picocolors'; import type { CommonOptions } from 'execa'; import { execaCommand, execaCommandSync } from 'execa'; +import picocolors from 'picocolors'; import { gt, satisfies } from 'semver'; import invariant from 'tiny-invariant'; import { dedent } from 'ts-dedent'; diff --git a/code/core/src/core-server/utils/StoryIndexGenerator.ts b/code/core/src/core-server/utils/StoryIndexGenerator.ts index 3debf1d152e3..aed65a46bf6b 100644 --- a/code/core/src/core-server/utils/StoryIndexGenerator.ts +++ b/code/core/src/core-server/utils/StoryIndexGenerator.ts @@ -23,8 +23,8 @@ import { getStorySortParameter, loadConfig } from '@storybook/core/csf-tools'; import { logger, once } from '@storybook/core/node-logger'; import { sortStoriesV7, userOrAutoTitleFromSpecifier } from '@storybook/core/preview-api'; -import picocolors from 'picocolors'; import { findUp } from 'find-up'; +import picocolors from 'picocolors'; import slash from 'slash'; import invariant from 'tiny-invariant'; import { dedent } from 'ts-dedent'; diff --git a/code/core/src/core-server/utils/output-startup-information.ts b/code/core/src/core-server/utils/output-startup-information.ts index 2edd5b97b3e4..411e3e80be46 100644 --- a/code/core/src/core-server/utils/output-startup-information.ts +++ b/code/core/src/core-server/utils/output-startup-information.ts @@ -3,8 +3,8 @@ import type { VersionCheck } from '@storybook/core/types'; import { colors } from '@storybook/core/node-logger'; import boxen from 'boxen'; -import picocolors from 'picocolors'; import Table from 'cli-table3'; +import picocolors from 'picocolors'; import prettyTime from 'pretty-hrtime'; import { dedent } from 'ts-dedent'; diff --git a/code/core/src/core-server/utils/server-statics.ts b/code/core/src/core-server/utils/server-statics.ts index 211f4adc3bab..b6bc406923e8 100644 --- a/code/core/src/core-server/utils/server-statics.ts +++ b/code/core/src/core-server/utils/server-statics.ts @@ -6,9 +6,9 @@ import type { Options } from '@storybook/core/types'; import { logger } from '@storybook/core/node-logger'; -import picocolors from 'picocolors'; import type { Router } from 'express'; import express from 'express'; +import picocolors from 'picocolors'; import { dedent } from 'ts-dedent'; export async function useStatics(router: Router, options: Options) { diff --git a/code/core/src/server-errors.ts b/code/core/src/server-errors.ts index 8ed38af4b67d..5df2a3df9667 100644 --- a/code/core/src/server-errors.ts +++ b/code/core/src/server-errors.ts @@ -350,9 +350,9 @@ export class MainFileESMOnlyImportError extends StorybookError { if (data.line) { message.push( picocolors.white( - `In your ${picocolors.yellow(data.location)} file, line ${picocolors.bold(picocolors.cyan( - data.num - ))} threw an error:` + `In your ${picocolors.yellow(data.location)} file, line ${picocolors.bold( + picocolors.cyan(data.num) + )} threw an error:` ), picocolors.gray(data.line) ); diff --git a/code/lib/cli-storybook/src/automigrate/fixes/mdx-to-csf.ts b/code/lib/cli-storybook/src/automigrate/fixes/mdx-to-csf.ts index 6b259fca50bc..55e36258c9cd 100644 --- a/code/lib/cli-storybook/src/automigrate/fixes/mdx-to-csf.ts +++ b/code/lib/cli-storybook/src/automigrate/fixes/mdx-to-csf.ts @@ -2,8 +2,8 @@ import type { StoriesEntry } from 'storybook/internal/types'; import { runCodemod } from '@storybook/codemod'; -import picocolors from 'picocolors'; import { glob } from 'glob'; +import picocolors from 'picocolors'; import { prompt } from 'prompts'; import { dedent } from 'ts-dedent'; diff --git a/code/lib/cli-storybook/src/bin/index.ts b/code/lib/cli-storybook/src/bin/index.ts index aa8c5d52cbf7..33105a269d68 100644 --- a/code/lib/cli-storybook/src/bin/index.ts +++ b/code/lib/cli-storybook/src/bin/index.ts @@ -7,11 +7,11 @@ import { withTelemetry } from 'storybook/internal/core-server'; import { logger } from 'storybook/internal/node-logger'; import { addToGlobalContext, telemetry } from 'storybook/internal/telemetry'; -import picocolors from 'picocolors'; import { program } from 'commander'; import envinfo from 'envinfo'; import { findPackageSync } from 'fd-package-json'; import leven from 'leven'; +import picocolors from 'picocolors'; import invariant from 'tiny-invariant'; import { add } from '../add'; diff --git a/code/lib/cli-storybook/src/link.ts b/code/lib/cli-storybook/src/link.ts index 30c8ed471502..5db8d2cbd930 100644 --- a/code/lib/cli-storybook/src/link.ts +++ b/code/lib/cli-storybook/src/link.ts @@ -3,8 +3,8 @@ import { basename, extname, join } from 'node:path'; import { logger } from 'storybook/internal/node-logger'; -import picocolors from 'picocolors'; import { spawn as spawnAsync, sync as spawnSync } from 'cross-spawn'; +import picocolors from 'picocolors'; type ExecOptions = Parameters[2]; diff --git a/code/lib/cli-storybook/src/sandbox.ts b/code/lib/cli-storybook/src/sandbox.ts index 6ec40f9b3661..3b43a05af5d5 100644 --- a/code/lib/cli-storybook/src/sandbox.ts +++ b/code/lib/cli-storybook/src/sandbox.ts @@ -7,9 +7,9 @@ import { JsPackageManagerFactory } from 'storybook/internal/common'; import { versions } from 'storybook/internal/common'; import boxen from 'boxen'; -import picocolors from 'picocolors'; import { initiate } from 'create-storybook'; import { downloadTemplate } from 'giget'; +import picocolors from 'picocolors'; import prompts from 'prompts'; import { lt, prerelease } from 'semver'; import invariant from 'tiny-invariant'; diff --git a/code/lib/cli-storybook/src/upgrade.ts b/code/lib/cli-storybook/src/upgrade.ts index b0b477b4fd14..6657fb0ee691 100644 --- a/code/lib/cli-storybook/src/upgrade.ts +++ b/code/lib/cli-storybook/src/upgrade.ts @@ -18,8 +18,8 @@ import { import { telemetry } from 'storybook/internal/telemetry'; import boxen from 'boxen'; -import picocolors from 'picocolors'; import { sync as spawnSync } from 'cross-spawn'; +import picocolors from 'picocolors'; import semver, { clean, eq, lt, prerelease } from 'semver'; import { dedent } from 'ts-dedent'; diff --git a/code/lib/create-storybook/package.json b/code/lib/create-storybook/package.json index c61f95f48d66..1980484b1090 100644 --- a/code/lib/create-storybook/package.json +++ b/code/lib/create-storybook/package.json @@ -72,6 +72,8 @@ "@types/prompts": "^2.0.9", "@types/util-deprecate": "^1.0.0", "boxen": "^7.1.1", + "picocolors": "^1.1.0", + "picomatch": "^2.3.0", "typescript": "^5.3.2" }, "publishConfig": { diff --git a/code/lib/create-storybook/src/initiate.ts b/code/lib/create-storybook/src/initiate.ts index f3c5ac9b42d1..adf25ebd5107 100644 --- a/code/lib/create-storybook/src/initiate.ts +++ b/code/lib/create-storybook/src/initiate.ts @@ -17,8 +17,8 @@ import { NxProjectDetectedError } from 'storybook/internal/server-errors'; import { telemetry } from 'storybook/internal/telemetry'; import boxen from 'boxen'; -import picocolors from 'picocolors'; import findUp from 'find-up'; +import picocolors from 'picocolors'; import prompts from 'prompts'; import { lt, prerelease } from 'semver'; import { dedent } from 'ts-dedent'; diff --git a/code/lib/create-storybook/src/scaffold-new-project.ts b/code/lib/create-storybook/src/scaffold-new-project.ts index 32999133be12..f41d9c876010 100644 --- a/code/lib/create-storybook/src/scaffold-new-project.ts +++ b/code/lib/create-storybook/src/scaffold-new-project.ts @@ -7,8 +7,8 @@ import { GenerateNewProjectOnInitError } from 'storybook/internal/server-errors' import { telemetry } from 'storybook/internal/telemetry'; import boxen from 'boxen'; -import picocolors from 'picocolors'; import execa from 'execa'; +import picocolors from 'picocolors'; import prompts from 'prompts'; import { dedent } from 'ts-dedent'; diff --git a/code/yarn.lock b/code/yarn.lock index 2b39c1a33a17..f26330834d9b 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -7126,6 +7126,8 @@ __metadata: "@vitest/browser": "npm:^2.0.0" boxen: "npm:^8.0.1" find-up: "npm:^7.0.0" + picocolors: "npm:^1.1.0" + picomatch: "npm:^2.3.0" semver: "npm:^7.6.3" tinyrainbow: "npm:^1.2.0" ts-dedent: "npm:^2.2.0" @@ -13385,6 +13387,8 @@ __metadata: fd-package-json: "npm:^1.2.0" find-up: "npm:^5.0.0" ora: "npm:^5.4.1" + picocolors: "npm:^1.1.0" + picomatch: "npm:^2.3.0" prettier: "npm:^3.1.1" prompts: "npm:^2.4.0" semver: "npm:^7.3.7" From d00ba27050d9d8b4723774667878a60df100316a Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Mon, 30 Sep 2024 17:48:15 +0200 Subject: [PATCH 30/39] fix snapshots --- .../portable-stories-legacy.test.tsx.snap | 34 ------------------- .../8428-js-static-prop-types/docgen.snapshot | 2 +- .../docgen.snapshot | 2 +- 3 files changed, 2 insertions(+), 36 deletions(-) diff --git a/code/renderers/react/src/__test__/__snapshots__/portable-stories-legacy.test.tsx.snap b/code/renderers/react/src/__test__/__snapshots__/portable-stories-legacy.test.tsx.snap index b690349bed8d..b4753327aaf1 100644 --- a/code/renderers/react/src/__test__/__snapshots__/portable-stories-legacy.test.tsx.snap +++ b/code/renderers/react/src/__test__/__snapshots__/portable-stories-legacy.test.tsx.snap @@ -147,40 +147,6 @@ exports[`Legacy Portable Stories API > Renders Modal story 1`] = ` `; -exports[`Legacy Portable Stories API > Renders MountInPlayFunction story 1`] = ` - -
-
- loaded data -
-
- mockFn return value -
-
- -`; - -exports[`Legacy Portable Stories API > Renders MountInPlayFunctionThrow story 1`] = ` - -
-
- loaded data -
-
- mockFn return value -
-
- -`; - exports[`Legacy Portable Stories API > Renders WithActionArg story 1`] = `
diff --git a/code/renderers/react/template/stories/docgen-components/8428-js-static-prop-types/docgen.snapshot b/code/renderers/react/template/stories/docgen-components/8428-js-static-prop-types/docgen.snapshot index 20d501e37200..93141203b686 100644 --- a/code/renderers/react/template/stories/docgen-components/8428-js-static-prop-types/docgen.snapshot +++ b/code/renderers/react/template/stories/docgen-components/8428-js-static-prop-types/docgen.snapshot @@ -1,4 +1,4 @@ -function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } +function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; } function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } import React from 'react'; diff --git a/code/renderers/react/template/stories/docgen-components/9556-ts-react-default-exports/docgen.snapshot b/code/renderers/react/template/stories/docgen-components/9556-ts-react-default-exports/docgen.snapshot index 96720e8f4df7..deeed4ffa007 100644 --- a/code/renderers/react/template/stories/docgen-components/9556-ts-react-default-exports/docgen.snapshot +++ b/code/renderers/react/template/stories/docgen-components/9556-ts-react-default-exports/docgen.snapshot @@ -1,4 +1,4 @@ -function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); } +function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } import React from 'react'; export const Button = ({ isDisabled = false, From e891f0c10e5e7d2b472b7995f41908a48b1bb783 Mon Sep 17 00:00:00 2001 From: JavanPoirier <42590458+JavanPoirier@users.noreply.github.com> Date: Mon, 30 Sep 2024 12:31:11 -0400 Subject: [PATCH 31/39] Fix viteFinal link --- docs/get-started/frameworks/nextjs.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/get-started/frameworks/nextjs.mdx b/docs/get-started/frameworks/nextjs.mdx index 597522f03020..14e2c3e55294 100644 --- a/docs/get-started/frameworks/nextjs.mdx +++ b/docs/get-started/frameworks/nextjs.mdx @@ -107,7 +107,7 @@ Storybook for Next.js is a [framework](../../contribute/framework.mdx) that make {/* prettier-ignore-end */} - If your Storybook configuration contains custom Webpack operations in [`webpackFinal`](../../api/main-config/main-config-webpack-final.mdx), you will likely need to create equivalents in [`viteFinal`]((../../api/main-config/main-config-vite-final.mdx)). + If your Storybook configuration contains custom Webpack operations in [`webpackFinal`](../../api/main-config/main-config-webpack-final.mdx), you will likely need to create equivalents in [`viteFinal`](../../api/main-config/main-config-vite-final.mdx). Finally, if you were using Storybook plugins to integrate with Next.js, those are no longer necessary when using this framework and can be removed: From 4444fe474b376a9b2aa87171eb3fd38cc6f40b6a Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 1 Oct 2024 09:54:32 +0200 Subject: [PATCH 32/39] complete chalk removal --- code/core/package.json | 1 - .../scripts/helpers/generateTypesFiles.ts | 4 +- code/core/scripts/prep.ts | 15 +- code/yarn.lock | 1106 ++--------------- scripts/build-package.ts | 10 +- scripts/check-package.ts | 10 +- scripts/dangerfile.ts | 2 +- scripts/event-log-checker.ts | 6 +- scripts/get-template.ts | 6 +- scripts/knip.config.ts | 5 +- scripts/package.json | 3 +- scripts/prepare/tools.ts | 4 +- scripts/release/cancel-preparation-runs.ts | 13 +- scripts/release/generate-pr-description.ts | 8 +- scripts/release/get-changelog-from-file.ts | 6 +- scripts/release/get-current-version.ts | 4 +- scripts/release/get-version-changelog.ts | 4 +- scripts/release/is-pr-frozen.ts | 6 +- scripts/release/is-prerelease.ts | 10 +- scripts/release/is-version-published.ts | 8 +- scripts/release/pick-patches.ts | 6 +- scripts/release/publish.ts | 18 +- scripts/release/unreleased-changes-exists.ts | 8 +- scripts/release/utils/get-changes.ts | 24 +- scripts/release/version.ts | 54 +- scripts/release/write-changelog.ts | 12 +- scripts/run-registry.ts | 6 +- scripts/utils/exec.ts | 4 +- scripts/utils/options.ts | 7 +- scripts/yarn.lock | 29 +- 30 files changed, 229 insertions(+), 1170 deletions(-) diff --git a/code/core/package.json b/code/core/package.json index 79285d57a217..2fd8d9dc72eb 100644 --- a/code/core/package.json +++ b/code/core/package.json @@ -344,7 +344,6 @@ "browser-dtector": "^3.4.0", "camelcase": "^8.0.0", "chai": "^4.4.1", - "chalk": "^5.3.0", "cli-table3": "^0.6.1", "commander": "^12.1.0", "comment-parser": "^1.4.1", diff --git a/code/core/scripts/helpers/generateTypesFiles.ts b/code/core/scripts/helpers/generateTypesFiles.ts index a657c6fbd8a7..3016a16ba8f8 100644 --- a/code/core/scripts/helpers/generateTypesFiles.ts +++ b/code/core/scripts/helpers/generateTypesFiles.ts @@ -1,7 +1,7 @@ import { join, relative } from 'node:path'; import { spawn } from '../../../../scripts/prepare/tools'; -import { chalk, limit, process } from '../../../../scripts/prepare/tools'; +import { limit, picocolor, process } from '../../../../scripts/prepare/tools'; import type { getEntries } from '../entries'; export async function generateTypesFiles( @@ -69,7 +69,7 @@ export async function generateTypesFiles( console.log(index, fileName); process.exit(dtsProcess.exitCode || 1); } else { - console.log('Generated types for', chalk.cyan(relative(cwd, dtsEntries[index]))); + console.log('Generated types for', picocolors.cyan(relative(cwd, dtsEntries[index]))); } }); }) diff --git a/code/core/scripts/prep.ts b/code/core/scripts/prep.ts index df5d79f708ec..f8726e79df48 100644 --- a/code/core/scripts/prep.ts +++ b/code/core/scripts/prep.ts @@ -6,13 +6,13 @@ import { dirname, join } from 'node:path'; import type { Metafile } from 'esbuild'; import { - chalk, dedent, esbuild, globalExternals, measure, merge, nodeInternals, + picocolors, prettyTime, process, } from '../../../scripts/prepare/tools'; @@ -77,12 +77,15 @@ async function run() { types, ]); - console.log('Files generated in', chalk.yellow(prettyTime(filesTime))); - console.log('Package.json generated in', chalk.yellow(prettyTime(packageJsonTime))); - console.log(isWatch ? 'Watcher started in' : 'Bundled in', chalk.yellow(prettyTime(distTime))); + console.log('Files generated in', picocolors.yellow(prettyTime(filesTime))); + console.log('Package.json generated in', picocolors.yellow(prettyTime(packageJsonTime))); + console.log( + isWatch ? 'Watcher started in' : 'Bundled in', + picocolors.yellow(prettyTime(distTime)) + ); console.log( isOptimized ? 'Generated types in' : 'Generated type mappers in', - chalk.yellow(prettyTime(typesTime)) + picocolors.yellow(prettyTime(typesTime)) ); async function generateDistFiles() { @@ -313,7 +316,7 @@ async function run() { // show a log message when a file is compiled watch(join(cwd, 'dist'), { recursive: true }, (event, filename) => { - console.log(`compiled ${chalk.cyan(filename)}`); + console.log(`compiled ${picocolors.cyan(filename)}`); }); } else { // repo root/bench/esbuild-metafiles/core diff --git a/code/yarn.lock b/code/yarn.lock index f26330834d9b..47ab3731f211 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -377,31 +377,7 @@ __metadata: languageName: node linkType: hard -"@babel/code-frame@npm:^7.24.1, @babel/code-frame@npm:^7.24.2": - version: 7.24.2 - resolution: "@babel/code-frame@npm:7.24.2" - dependencies: - "@babel/highlight": "npm:^7.24.2" - picocolors: "npm:^1.0.0" - checksum: 10c0/d1d4cba89475ab6aab7a88242e1fd73b15ecb9f30c109b69752956434d10a26a52cbd37727c4eca104b6d45227bd1dfce39a6a6f4a14c9b2f07f871e968cf406 - languageName: node - linkType: hard - -"@babel/compat-data@npm:^7.22.6, @babel/compat-data@npm:^7.23.5": - version: 7.24.7 - resolution: "@babel/compat-data@npm:7.24.7" - checksum: 10c0/dcd93a5632b04536498fbe2be5af1057f635fd7f7090483d8e797878559037e5130b26862ceb359acbae93ed27e076d395ddb4663db6b28a665756ffd02d324f - languageName: node - linkType: hard - -"@babel/compat-data@npm:^7.24.4": - version: 7.24.4 - resolution: "@babel/compat-data@npm:7.24.4" - checksum: 10c0/9cd8a9cd28a5ca6db5d0e27417d609f95a8762b655e8c9c97fd2de08997043ae99f0139007083c5e607601c6122e8432c85fe391731b19bf26ad458fa0c60dd3 - languageName: node - linkType: hard - -"@babel/compat-data@npm:^7.25.2": +"@babel/compat-data@npm:^7.22.6, @babel/compat-data@npm:^7.23.5, @babel/compat-data@npm:^7.24.4, @babel/compat-data@npm:^7.25.2": version: 7.25.2 resolution: "@babel/compat-data@npm:7.25.2" checksum: 10c0/5bf1f14d6e5f0d37c19543e99209ff4a94bb97915e1ce01e5334a144aa08cd56b6e62ece8135dac77e126723d63d4d4b96fc603a12c43b88c28f4b5e070270c5 @@ -454,30 +430,7 @@ __metadata: languageName: node linkType: hard -"@babel/core@npm:^7.12.0, @babel/core@npm:^7.12.3, @babel/core@npm:^7.13.16, @babel/core@npm:^7.18.9, @babel/core@npm:^7.20.12, @babel/core@npm:^7.23.0, @babel/core@npm:^7.23.2, @babel/core@npm:^7.24.4, @babel/core@npm:^7.3.4, @babel/core@npm:^7.7.5": - version: 7.24.4 - resolution: "@babel/core@npm:7.24.4" - dependencies: - "@ampproject/remapping": "npm:^2.2.0" - "@babel/code-frame": "npm:^7.24.2" - "@babel/generator": "npm:^7.24.4" - "@babel/helper-compilation-targets": "npm:^7.23.6" - "@babel/helper-module-transforms": "npm:^7.23.3" - "@babel/helpers": "npm:^7.24.4" - "@babel/parser": "npm:^7.24.4" - "@babel/template": "npm:^7.24.0" - "@babel/traverse": "npm:^7.24.1" - "@babel/types": "npm:^7.24.0" - 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: 10c0/fc136966583e64d6f84f4a676368de6ab4583aa87f867186068655b30ef67f21f8e65a88c6d446a7efd219ad7ffb9185c82e8a90183ee033f6f47b5026641e16 - languageName: node - linkType: hard - -"@babel/core@npm:^7.23.9": +"@babel/core@npm:^7.12.0, @babel/core@npm:^7.12.3, @babel/core@npm:^7.13.16, @babel/core@npm:^7.18.9, @babel/core@npm:^7.20.12, @babel/core@npm:^7.23.0, @babel/core@npm:^7.23.2, @babel/core@npm:^7.23.9, @babel/core@npm:^7.24.4, @babel/core@npm:^7.3.4, @babel/core@npm:^7.7.5": version: 7.25.2 resolution: "@babel/core@npm:7.25.2" dependencies: @@ -523,19 +476,7 @@ __metadata: languageName: node linkType: hard -"@babel/generator@npm:^7.12.11, @babel/generator@npm:^7.23.6, @babel/generator@npm:^7.24.4, @babel/generator@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/generator@npm:7.24.7" - dependencies: - "@babel/types": "npm:^7.24.7" - "@jridgewell/gen-mapping": "npm:^0.3.5" - "@jridgewell/trace-mapping": "npm:^0.3.25" - jsesc: "npm:^2.5.1" - checksum: 10c0/06b1f3350baf527a3309e50ffd7065f7aee04dd06e1e7db794ddfde7fe9d81f28df64edd587173f8f9295496a7ddb74b9a185d4bf4de7bb619e6d4ec45c8fd35 - languageName: node - linkType: hard - -"@babel/generator@npm:^7.23.0, @babel/generator@npm:^7.25.0": +"@babel/generator@npm:^7.12.11, @babel/generator@npm:^7.23.0, @babel/generator@npm:^7.23.6, @babel/generator@npm:^7.24.4, @babel/generator@npm:^7.25.0": version: 7.25.0 resolution: "@babel/generator@npm:7.25.0" dependencies: @@ -547,18 +488,6 @@ __metadata: languageName: node linkType: hard -"@babel/generator@npm:^7.24.1": - version: 7.24.4 - resolution: "@babel/generator@npm:7.24.4" - dependencies: - "@babel/types": "npm:^7.24.0" - "@jridgewell/gen-mapping": "npm:^0.3.5" - "@jridgewell/trace-mapping": "npm:^0.3.25" - jsesc: "npm:^2.5.1" - checksum: 10c0/67a1b2f7cc985aaaa11b01e8ddd4fffa4f285837bc7a209738eb8203aa34bdafeb8507ed75fd883ddbabd641a036ca0a8d984e760f28ad4a9d60bff29d0a60bb - languageName: node - linkType: hard - "@babel/helper-annotate-as-pure@npm:7.22.5": version: 7.22.5 resolution: "@babel/helper-annotate-as-pure@npm:7.22.5" @@ -577,15 +506,6 @@ __metadata: languageName: node linkType: hard -"@babel/helper-builder-binary-assignment-operator-visitor@npm:^7.22.15": - version: 7.22.15 - resolution: "@babel/helper-builder-binary-assignment-operator-visitor@npm:7.22.15" - dependencies: - "@babel/types": "npm:^7.22.15" - checksum: 10c0/2535e3824ca6337f65786bbac98e562f71699f25532cecd196f027d7698b4967a96953d64e36567956658ad1a05ccbdc62d1ba79ee751c79f4f1d2d3ecc2e01c - languageName: node - linkType: hard - "@babel/helper-builder-binary-assignment-operator-visitor@npm:^7.24.7": version: 7.24.7 resolution: "@babel/helper-builder-binary-assignment-operator-visitor@npm:7.24.7" @@ -628,25 +548,6 @@ __metadata: languageName: node linkType: hard -"@babel/helper-create-class-features-plugin@npm:^7.24.1, @babel/helper-create-class-features-plugin@npm:^7.24.4": - version: 7.24.4 - resolution: "@babel/helper-create-class-features-plugin@npm:7.24.4" - dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.22.5" - "@babel/helper-environment-visitor": "npm:^7.22.20" - "@babel/helper-function-name": "npm:^7.23.0" - "@babel/helper-member-expression-to-functions": "npm:^7.23.0" - "@babel/helper-optimise-call-expression": "npm:^7.22.5" - "@babel/helper-replace-supers": "npm:^7.24.1" - "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.22.5" - "@babel/helper-split-export-declaration": "npm:^7.22.6" - semver: "npm:^6.3.1" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10c0/6ebb38375dcd44c79f40008c2de4d023376cf436c135439f15c9c54603c2d6a8ada39b2e07be545da684d9e40b602a0cb0d1670f3877d056deb5f0d786c4bf86 - languageName: node - linkType: hard - "@babel/helper-create-regexp-features-plugin@npm:^7.18.6, @babel/helper-create-regexp-features-plugin@npm:^7.24.7": version: 7.24.7 resolution: "@babel/helper-create-regexp-features-plugin@npm:7.24.7" @@ -660,19 +561,6 @@ __metadata: languageName: node linkType: hard -"@babel/helper-create-regexp-features-plugin@npm:^7.22.15": - version: 7.22.15 - resolution: "@babel/helper-create-regexp-features-plugin@npm:7.22.15" - dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.22.5" - regexpu-core: "npm:^5.3.1" - semver: "npm:^6.3.1" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10c0/8eba4c1b7b94a83e7a82df5c3e504584ff0ba6ab8710a67ecc2c434a7fb841a29c2f5c94d2de51f25446119a1df538fa90b37bd570db22ddd5e7147fe98277c6 - languageName: node - linkType: hard - "@babel/helper-define-polyfill-provider@npm:^0.5.0": version: 0.5.0 resolution: "@babel/helper-define-polyfill-provider@npm:0.5.0" @@ -731,15 +619,6 @@ __metadata: languageName: node linkType: hard -"@babel/helper-member-expression-to-functions@npm:^7.23.0": - version: 7.23.0 - resolution: "@babel/helper-member-expression-to-functions@npm:7.23.0" - dependencies: - "@babel/types": "npm:^7.23.0" - checksum: 10c0/b810daddf093ffd0802f1429052349ed9ea08ef7d0c56da34ffbcdecbdafac86f95bdea2fe30e0e0e629febc7dd41b56cb5eacc10d1a44336d37b755dac31fa4 - languageName: node - linkType: hard - "@babel/helper-member-expression-to-functions@npm:^7.24.7": version: 7.24.7 resolution: "@babel/helper-member-expression-to-functions@npm:7.24.7" @@ -750,7 +629,7 @@ __metadata: languageName: node linkType: hard -"@babel/helper-module-imports@npm:^7.16.7, @babel/helper-module-imports@npm:^7.22.15, @babel/helper-module-imports@npm:^7.24.7, @babel/helper-module-imports@npm:^7.8.3": +"@babel/helper-module-imports@npm:^7.16.7, @babel/helper-module-imports@npm:^7.22.15, @babel/helper-module-imports@npm:^7.24.3, @babel/helper-module-imports@npm:^7.24.7, @babel/helper-module-imports@npm:^7.8.3": version: 7.24.7 resolution: "@babel/helper-module-imports@npm:7.24.7" dependencies: @@ -760,15 +639,6 @@ __metadata: languageName: node linkType: hard -"@babel/helper-module-imports@npm:^7.24.1, @babel/helper-module-imports@npm:^7.24.3": - version: 7.24.3 - resolution: "@babel/helper-module-imports@npm:7.24.3" - dependencies: - "@babel/types": "npm:^7.24.0" - checksum: 10c0/052c188adcd100f5e8b6ff0c9643ddaabc58b6700d3bbbc26804141ad68375a9f97d9d173658d373d31853019e65f62610239e3295cdd58e573bdcb2fded188d - languageName: node - linkType: hard - "@babel/helper-module-transforms@npm:^7.23.3, @babel/helper-module-transforms@npm:^7.24.7, @babel/helper-module-transforms@npm:^7.25.2": version: 7.25.2 resolution: "@babel/helper-module-transforms@npm:7.25.2" @@ -783,15 +653,6 @@ __metadata: languageName: node linkType: hard -"@babel/helper-optimise-call-expression@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/helper-optimise-call-expression@npm:7.22.5" - dependencies: - "@babel/types": "npm:^7.22.5" - checksum: 10c0/31b41a764fc3c585196cf5b776b70cf4705c132e4ce9723f39871f215f2ddbfb2e28a62f9917610f67c8216c1080482b9b05f65dd195dae2a52cef461f2ac7b8 - languageName: node - linkType: hard - "@babel/helper-optimise-call-expression@npm:^7.24.7": version: 7.24.7 resolution: "@babel/helper-optimise-call-expression@npm:7.24.7" @@ -801,14 +662,7 @@ __metadata: languageName: node linkType: hard -"@babel/helper-plugin-utils@npm:^7.0.0, @babel/helper-plugin-utils@npm:^7.10.4, @babel/helper-plugin-utils@npm:^7.12.13, @babel/helper-plugin-utils@npm:^7.14.5, @babel/helper-plugin-utils@npm:^7.18.6, @babel/helper-plugin-utils@npm:^7.20.2, @babel/helper-plugin-utils@npm:^7.22.5, @babel/helper-plugin-utils@npm:^7.24.0, @babel/helper-plugin-utils@npm:^7.8.0, @babel/helper-plugin-utils@npm:^7.8.3": - version: 7.24.0 - resolution: "@babel/helper-plugin-utils@npm:7.24.0" - checksum: 10c0/90f41bd1b4dfe7226b1d33a4bb745844c5c63e400f9e4e8bf9103a7ceddd7d425d65333b564d9daba3cebd105985764d51b4bd4c95822b97c2e3ac1201a8a5da - languageName: node - linkType: hard - -"@babel/helper-plugin-utils@npm:^7.24.7": +"@babel/helper-plugin-utils@npm:^7.0.0, @babel/helper-plugin-utils@npm:^7.10.4, @babel/helper-plugin-utils@npm:^7.12.13, @babel/helper-plugin-utils@npm:^7.14.5, @babel/helper-plugin-utils@npm:^7.18.6, @babel/helper-plugin-utils@npm:^7.20.2, @babel/helper-plugin-utils@npm:^7.22.5, @babel/helper-plugin-utils@npm:^7.24.0, @babel/helper-plugin-utils@npm:^7.24.7, @babel/helper-plugin-utils@npm:^7.8.0, @babel/helper-plugin-utils@npm:^7.8.3": version: 7.24.7 resolution: "@babel/helper-plugin-utils@npm:7.24.7" checksum: 10c0/c3d38cd9b3520757bb4a279255cc3f956fc0ac1c193964bd0816ebd5c86e30710be8e35252227e0c9d9e0f4f56d9b5f916537f2bc588084b0988b4787a967d31 @@ -828,19 +682,6 @@ __metadata: languageName: node linkType: hard -"@babel/helper-replace-supers@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/helper-replace-supers@npm:7.24.1" - dependencies: - "@babel/helper-environment-visitor": "npm:^7.22.20" - "@babel/helper-member-expression-to-functions": "npm:^7.23.0" - "@babel/helper-optimise-call-expression": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10c0/d39a3df7892b7c3c0e307fb229646168a9bd35e26a72080c2530729322600e8cff5f738f44a14860a2358faffa741b6a6a0d6749f113387b03ddbfa0ec10e1a0 - languageName: node - linkType: hard - "@babel/helper-replace-supers@npm:^7.24.7": version: 7.24.7 resolution: "@babel/helper-replace-supers@npm:7.24.7" @@ -854,15 +695,6 @@ __metadata: languageName: node linkType: hard -"@babel/helper-simple-access@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/helper-simple-access@npm:7.22.5" - dependencies: - "@babel/types": "npm:^7.22.5" - checksum: 10c0/f0cf81a30ba3d09a625fd50e5a9069e575c5b6719234e04ee74247057f8104beca89ed03e9217b6e9b0493434cedc18c5ecca4cea6244990836f1f893e140369 - languageName: node - linkType: hard - "@babel/helper-simple-access@npm:^7.24.7": version: 7.24.7 resolution: "@babel/helper-simple-access@npm:7.24.7" @@ -883,15 +715,6 @@ __metadata: languageName: node linkType: hard -"@babel/helper-skip-transparent-expression-wrappers@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/helper-skip-transparent-expression-wrappers@npm:7.22.5" - dependencies: - "@babel/types": "npm:^7.22.5" - checksum: 10c0/ab7fa2aa709ab49bb8cd86515a1e715a3108c4bb9a616965ba76b43dc346dee66d1004ccf4d222b596b6224e43e04cbc5c3a34459501b388451f8c589fbc3691 - languageName: node - linkType: hard - "@babel/helper-split-export-declaration@npm:7.22.6": version: 7.22.6 resolution: "@babel/helper-split-export-declaration@npm:7.22.6" @@ -910,20 +733,6 @@ __metadata: 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" - checksum: 10c0/f348d5637ad70b6b54b026d6544bd9040f78d24e7ec245a0fc42293968181f6ae9879c22d89744730d246ce8ec53588f716f102addd4df8bbc79b73ea10004ac - languageName: node - linkType: hard - -"@babel/helper-string-parser@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/helper-string-parser@npm:7.24.7" - checksum: 10c0/47840c7004e735f3dc93939c77b099bb41a64bf3dda0cae62f60e6f74a5ff80b63e9b7cf77b5ec25a324516381fc994e1f62f922533236a8e3a6af57decb5e1e - languageName: node - linkType: hard - "@babel/helper-string-parser@npm:^7.24.8": version: 7.24.8 resolution: "@babel/helper-string-parser@npm:7.24.8" @@ -938,13 +747,6 @@ __metadata: languageName: node linkType: hard -"@babel/helper-validator-identifier@npm:^7.22.20": - version: 7.22.20 - resolution: "@babel/helper-validator-identifier@npm:7.22.20" - checksum: 10c0/dcad63db345fb110e032de46c3688384b0008a42a4845180ce7cd62b1a9c0507a1bed727c4d1060ed1a03ae57b4d918570259f81724aaac1a5b776056f37504e - languageName: node - linkType: hard - "@babel/helper-validator-option@npm:^7.22.15, @babel/helper-validator-option@npm:^7.23.5, @babel/helper-validator-option@npm:^7.24.8": version: 7.24.8 resolution: "@babel/helper-validator-option@npm:7.24.8" @@ -974,29 +776,6 @@ __metadata: languageName: node linkType: hard -"@babel/helpers@npm:^7.24.4": - version: 7.24.4 - resolution: "@babel/helpers@npm:7.24.4" - dependencies: - "@babel/template": "npm:^7.24.0" - "@babel/traverse": "npm:^7.24.1" - "@babel/types": "npm:^7.24.0" - checksum: 10c0/747ef62b7fe87de31a2f3c19ff337a86cbb79be2f6c18af63133b614ab5a8f6da5b06ae4b06fb0e71271cb6a27efec6f8b6c9f44c60b8a18777832dc7929e6c5 - languageName: node - linkType: hard - -"@babel/highlight@npm:^7.24.2": - version: 7.24.2 - resolution: "@babel/highlight@npm:7.24.2" - dependencies: - "@babel/helper-validator-identifier": "npm:^7.22.20" - chalk: "npm:^2.4.2" - js-tokens: "npm:^4.0.0" - picocolors: "npm:^1.0.0" - checksum: 10c0/98ce00321daedeed33a4ed9362dc089a70375ff1b3b91228b9f05e6591d387a81a8cba68886e207861b8871efa0bc997ceabdd9c90f6cce3ee1b2f7f941b42db - languageName: node - linkType: hard - "@babel/highlight@npm:^7.24.7": version: 7.24.7 resolution: "@babel/highlight@npm:7.24.7" @@ -1009,16 +788,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.20.7, @babel/parser@npm:^7.23.0, @babel/parser@npm:^7.23.5, @babel/parser@npm:^7.23.6, @babel/parser@npm:^7.23.9, @babel/parser@npm:^7.24.0, @babel/parser@npm:^7.24.4, @babel/parser@npm:^7.24.7, @babel/parser@npm:^7.4.5, @babel/parser@npm:^7.6.0, @babel/parser@npm:^7.9.6": - version: 7.24.7 - resolution: "@babel/parser@npm:7.24.7" - bin: - parser: ./bin/babel-parser.js - checksum: 10c0/8b244756872185a1c6f14b979b3535e682ff08cb5a2a5fd97cc36c017c7ef431ba76439e95e419d43000c5b07720495b00cf29a7f0d9a483643d08802b58819b - languageName: node - linkType: hard - -"@babel/parser@npm:^7.20.5, @babel/parser@npm:^7.22.5, @babel/parser@npm:^7.25.0, @babel/parser@npm:^7.25.3": +"@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.5, @babel/parser@npm:^7.20.7, @babel/parser@npm:^7.22.5, @babel/parser@npm:^7.23.0, @babel/parser@npm:^7.23.5, @babel/parser@npm:^7.23.6, @babel/parser@npm:^7.23.9, @babel/parser@npm:^7.24.0, @babel/parser@npm:^7.24.4, @babel/parser@npm:^7.24.7, @babel/parser@npm:^7.25.0, @babel/parser@npm:^7.25.3, @babel/parser@npm:^7.4.5, @babel/parser@npm:^7.6.0, @babel/parser@npm:^7.9.6": version: 7.25.3 resolution: "@babel/parser@npm:7.25.3" dependencies: @@ -1029,15 +799,6 @@ __metadata: languageName: node linkType: hard -"@babel/parser@npm:^7.24.1": - version: 7.24.4 - resolution: "@babel/parser@npm:7.24.4" - bin: - parser: ./bin/babel-parser.js - checksum: 10c0/8381e1efead5069cb7ed2abc3a583f4a86289b2f376c75cecc69f59a8eb36df18274b1886cecf2f97a6a0dff5334b27330f58535be9b3e4e26102cc50e12eac8 - languageName: node - linkType: hard - "@babel/plugin-bugfix-firefox-class-in-computed-class-key@npm:^7.24.4": version: 7.24.4 resolution: "@babel/plugin-bugfix-firefox-class-in-computed-class-key@npm:7.24.4" @@ -1050,7 +811,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:^7.23.3": +"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:^7.23.3, @babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:7.24.7" dependencies: @@ -1061,18 +822,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:7.24.1" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.0" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10c0/d4e592e6fc4878654243d2e7b51ea86471b868a8cb09de29e73b65d2b64159990c6c198fd7c9c2af2e38b1cddf70206243792853c47384a84f829dada152f605 - languageName: node - linkType: hard - -"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@npm:^7.23.3": +"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@npm:^7.23.3, @babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@npm:7.24.7" dependencies: @@ -1085,20 +835,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@npm:7.24.1" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.0" - "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.22.5" - "@babel/plugin-transform-optional-chaining": "npm:^7.24.1" - peerDependencies: - "@babel/core": ^7.13.0 - checksum: 10c0/351c36e45795a7890d610ab9041a52f4078a59429f6e74c281984aa44149a10d43e82b3a8172c703c0d5679471e165d1c02b6d2e45a677958ee301b89403f202 - languageName: node - linkType: hard - -"@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@npm:^7.23.7": +"@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@npm:^7.23.7, @babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@npm:7.24.7" dependencies: @@ -1110,18 +847,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@npm:7.24.1" - dependencies: - "@babel/helper-environment-visitor": "npm:^7.22.20" - "@babel/helper-plugin-utils": "npm:^7.24.0" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10c0/d7dd5a59a54635a3152895dcaa68f3370bb09d1f9906c1e72232ff759159e6be48de4a598a993c986997280a2dc29922a48aaa98020f16439f3f57ad72788354 - languageName: node - linkType: hard - "@babel/plugin-proposal-class-properties@npm:^7.13.0, @babel/plugin-proposal-class-properties@npm:^7.16.5": version: 7.18.6 resolution: "@babel/plugin-proposal-class-properties@npm:7.18.6" @@ -1306,7 +1031,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-syntax-import-attributes@npm:^7.23.3": +"@babel/plugin-syntax-import-attributes@npm:^7.23.3, @babel/plugin-syntax-import-attributes@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-syntax-import-attributes@npm:7.24.7" dependencies: @@ -1317,17 +1042,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-syntax-import-attributes@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-syntax-import-attributes@npm:7.24.1" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/309634e3335777aee902552b2cf244c4a8050213cc878b3fb9d70ad8cbbff325dc46ac5e5791836ff477ea373b27832238205f6ceaff81f7ea7c4c7e8fbb13bb - languageName: node - linkType: hard - "@babel/plugin-syntax-import-meta@npm:^7.10.4": version: 7.10.4 resolution: "@babel/plugin-syntax-import-meta@npm:7.10.4" @@ -1449,17 +1163,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-syntax-typescript@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-syntax-typescript@npm:7.24.1" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/7a81e277dcfe3138847e8e5944e02a42ff3c2e864aea6f33fd9b70d1556d12b0e70f0d56cc1985d353c91bcbf8fe163e6cc17418da21129b7f7f1d8b9ac00c93 - languageName: node - linkType: hard - "@babel/plugin-syntax-typescript@npm:^7.24.7, @babel/plugin-syntax-typescript@npm:^7.3.3": version: 7.24.7 resolution: "@babel/plugin-syntax-typescript@npm:7.24.7" @@ -1483,7 +1186,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-arrow-functions@npm:^7.23.3": +"@babel/plugin-transform-arrow-functions@npm:^7.23.3, @babel/plugin-transform-arrow-functions@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-arrow-functions@npm:7.24.7" dependencies: @@ -1494,17 +1197,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-arrow-functions@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-arrow-functions@npm:7.24.1" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/f44bfacf087dc21b422bab99f4e9344ee7b695b05c947dacae66de05c723ab9d91800be7edc1fa016185e8c819f3aca2b4a5f66d8a4d1e47d9bad80b8fa55b8e - languageName: node - linkType: hard - "@babel/plugin-transform-async-generator-functions@npm:7.23.9": version: 7.23.9 resolution: "@babel/plugin-transform-async-generator-functions@npm:7.23.9" @@ -1519,7 +1211,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-async-generator-functions@npm:^7.23.9": +"@babel/plugin-transform-async-generator-functions@npm:^7.23.9, @babel/plugin-transform-async-generator-functions@npm:^7.24.3": version: 7.24.7 resolution: "@babel/plugin-transform-async-generator-functions@npm:7.24.7" dependencies: @@ -1533,20 +1225,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-async-generator-functions@npm:^7.24.3": - version: 7.24.3 - resolution: "@babel/plugin-transform-async-generator-functions@npm:7.24.3" - dependencies: - "@babel/helper-environment-visitor": "npm:^7.22.20" - "@babel/helper-plugin-utils": "npm:^7.24.0" - "@babel/helper-remap-async-to-generator": "npm:^7.22.20" - "@babel/plugin-syntax-async-generators": "npm:^7.8.4" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/55ceed059f819dcccbfe69600bfa1c055ada466bd54eda117cfdd2cf773dd85799e2f6556e4a559b076e93b9704abcca2aef9d72aad7dc8a5d3d17886052f1d3 - languageName: node - linkType: hard - "@babel/plugin-transform-async-to-generator@npm:7.23.3": version: 7.23.3 resolution: "@babel/plugin-transform-async-to-generator@npm:7.23.3" @@ -1560,7 +1238,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-async-to-generator@npm:^7.23.3": +"@babel/plugin-transform-async-to-generator@npm:^7.23.3, @babel/plugin-transform-async-to-generator@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-async-to-generator@npm:7.24.7" dependencies: @@ -1573,20 +1251,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-async-to-generator@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-async-to-generator@npm:7.24.1" - dependencies: - "@babel/helper-module-imports": "npm:^7.24.1" - "@babel/helper-plugin-utils": "npm:^7.24.0" - "@babel/helper-remap-async-to-generator": "npm:^7.22.20" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/3731ba8e83cbea1ab22905031f25b3aeb0b97c6467360a2cc685352f16e7c786417d8883bc747f5a0beff32266bdb12a05b6292e7b8b75967087200a7bc012c4 - languageName: node - linkType: hard - -"@babel/plugin-transform-block-scoped-functions@npm:^7.23.3": +"@babel/plugin-transform-block-scoped-functions@npm:^7.23.3, @babel/plugin-transform-block-scoped-functions@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-block-scoped-functions@npm:7.24.7" dependencies: @@ -1597,18 +1262,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-block-scoped-functions@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-block-scoped-functions@npm:7.24.1" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/6fbaa85f5204f34845dfc0bebf62fdd3ac5a286241c85651e59d426001e7a1785ac501f154e093e0b8ee49e1f51e3f8b06575a5ae8d4a9406d43e4816bf18c37 - languageName: node - linkType: hard - -"@babel/plugin-transform-block-scoping@npm:^7.23.4, @babel/plugin-transform-block-scoping@npm:^7.8.3": +"@babel/plugin-transform-block-scoping@npm:^7.23.4, @babel/plugin-transform-block-scoping@npm:^7.24.4, @babel/plugin-transform-block-scoping@npm:^7.8.3": version: 7.24.7 resolution: "@babel/plugin-transform-block-scoping@npm:7.24.7" dependencies: @@ -1619,17 +1273,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-block-scoping@npm:^7.24.4": - version: 7.24.4 - resolution: "@babel/plugin-transform-block-scoping@npm:7.24.4" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/62f55fd1b60a115506e9553c3bf925179b1ab8a42dc31471c4e3ada20573a488b5c5e3317145da352493ef07f1d9750ce1f8a49cb3f39489ac1ab42e5ddc883d - languageName: node - linkType: hard - "@babel/plugin-transform-class-properties@npm:^7.22.5, @babel/plugin-transform-class-properties@npm:^7.23.3, @babel/plugin-transform-class-properties@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-class-properties@npm:7.24.7" @@ -1642,7 +1285,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-class-static-block@npm:^7.23.4": +"@babel/plugin-transform-class-static-block@npm:^7.23.4, @babel/plugin-transform-class-static-block@npm:^7.24.4": version: 7.24.7 resolution: "@babel/plugin-transform-class-static-block@npm:7.24.7" dependencies: @@ -1655,20 +1298,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-class-static-block@npm:^7.24.4": - version: 7.24.4 - resolution: "@babel/plugin-transform-class-static-block@npm:7.24.4" - dependencies: - "@babel/helper-create-class-features-plugin": "npm:^7.24.4" - "@babel/helper-plugin-utils": "npm:^7.24.0" - "@babel/plugin-syntax-class-static-block": "npm:^7.14.5" - peerDependencies: - "@babel/core": ^7.12.0 - checksum: 10c0/19dfeaf4a2ac03695034f7211a8b5ad89103b224608ac3e91791055107c5fe4d7ebe5d9fbb31b4a91265694af78762260642eb270f4b239c175984ee4b253f80 - languageName: node - linkType: hard - -"@babel/plugin-transform-classes@npm:^7.23.8": +"@babel/plugin-transform-classes@npm:^7.23.8, @babel/plugin-transform-classes@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-classes@npm:7.24.7" dependencies: @@ -1686,25 +1316,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-classes@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-classes@npm:7.24.1" - dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.22.5" - "@babel/helper-compilation-targets": "npm:^7.23.6" - "@babel/helper-environment-visitor": "npm:^7.22.20" - "@babel/helper-function-name": "npm:^7.23.0" - "@babel/helper-plugin-utils": "npm:^7.24.0" - "@babel/helper-replace-supers": "npm:^7.24.1" - "@babel/helper-split-export-declaration": "npm:^7.22.6" - globals: "npm:^11.1.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/586a95826be4d68056fa23d8e6c34353ce2ea59bf3ca8cf62bc784e60964d492d76e1b48760c43fd486ffb65a79d3fed9a4f91289e4f526f88c3b6acc0dfb00e - languageName: node - linkType: hard - -"@babel/plugin-transform-computed-properties@npm:^7.23.3": +"@babel/plugin-transform-computed-properties@npm:^7.23.3, @babel/plugin-transform-computed-properties@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-computed-properties@npm:7.24.7" dependencies: @@ -1716,19 +1328,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-computed-properties@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-computed-properties@npm:7.24.1" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.0" - "@babel/template": "npm:^7.24.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/8292c508b656b7722e2c2ca0f6f31339852e3ed2b9b80f6e068a4010e961b431ca109ecd467fc906283f4b1574c1e7b1cb68d35a4dea12079d386c15ff7e0eac - languageName: node - linkType: hard - -"@babel/plugin-transform-destructuring@npm:^7.23.3": +"@babel/plugin-transform-destructuring@npm:^7.23.3, @babel/plugin-transform-destructuring@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-destructuring@npm:7.24.7" dependencies: @@ -1739,18 +1339,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-destructuring@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-destructuring@npm:7.24.1" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/a08e706a9274a699abc3093f38c72d4a5354eac11c44572cc9ea049915b6e03255744297069fd94fcce82380725c5d6b1b11b9a84c0081aa3aa6fc2fdab98ef6 - languageName: node - linkType: hard - -"@babel/plugin-transform-dotall-regex@npm:^7.23.3": +"@babel/plugin-transform-dotall-regex@npm:^7.23.3, @babel/plugin-transform-dotall-regex@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-dotall-regex@npm:7.24.7" dependencies: @@ -1762,19 +1351,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-dotall-regex@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-dotall-regex@npm:7.24.1" - dependencies: - "@babel/helper-create-regexp-features-plugin": "npm:^7.22.15" - "@babel/helper-plugin-utils": "npm:^7.24.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/758def705ec5a87ef910280dc2df5d2fda59dc5d4771c1725c7aed0988ae5b79e29aeb48109120301a3e1c6c03dfac84700469de06f38ca92c96834e09eadf5d - languageName: node - linkType: hard - -"@babel/plugin-transform-duplicate-keys@npm:^7.23.3": +"@babel/plugin-transform-duplicate-keys@npm:^7.23.3, @babel/plugin-transform-duplicate-keys@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-duplicate-keys@npm:7.24.7" dependencies: @@ -1785,18 +1362,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-duplicate-keys@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-duplicate-keys@npm:7.24.1" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/41072f57f83a6c2b15f3ee0b6779cdca105ff3d98061efe92ac02d6c7b90fdb6e7e293b8a4d5b9c690d9ae5d3ae73e6bde4596dc4d8c66526a0e5e1abc73c88c - languageName: node - linkType: hard - -"@babel/plugin-transform-dynamic-import@npm:^7.23.4": +"@babel/plugin-transform-dynamic-import@npm:^7.23.4, @babel/plugin-transform-dynamic-import@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-dynamic-import@npm:7.24.7" dependencies: @@ -1808,19 +1374,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-dynamic-import@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-dynamic-import@npm:7.24.1" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.0" - "@babel/plugin-syntax-dynamic-import": "npm:^7.8.3" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/7e2834780e9b5251ef341854043a89c91473b83c335358620ca721554877e64e416aeb3288a35f03e825c4958e07d5d00ead08c4490fadc276a21fe151d812f1 - languageName: node - linkType: hard - -"@babel/plugin-transform-exponentiation-operator@npm:^7.23.3": +"@babel/plugin-transform-exponentiation-operator@npm:^7.23.3, @babel/plugin-transform-exponentiation-operator@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-exponentiation-operator@npm:7.24.7" dependencies: @@ -1832,18 +1386,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-exponentiation-operator@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-exponentiation-operator@npm:7.24.1" - dependencies: - "@babel/helper-builder-binary-assignment-operator-visitor": "npm:^7.22.15" - "@babel/helper-plugin-utils": "npm:^7.24.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/f0fc4c5a9add25fd6bf23dabe6752e9b7c0a2b2554933dddfd16601245a2ba332b647951079c782bf3b94c6330e3638b9b4e0227f469a7c1c707446ba0eba6c7 - languageName: node - linkType: hard - "@babel/plugin-transform-export-namespace-from@npm:^7.23.4, @babel/plugin-transform-export-namespace-from@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-export-namespace-from@npm:7.24.7" @@ -1868,7 +1410,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-for-of@npm:^7.23.6": +"@babel/plugin-transform-for-of@npm:^7.23.6, @babel/plugin-transform-for-of@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-for-of@npm:7.24.7" dependencies: @@ -1880,19 +1422,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-for-of@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-for-of@npm:7.24.1" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.0" - "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/e4bc92b1f334246e62d4bde079938df940794db564742034f6597f2e38bd426e11ae8c5670448e15dd6e45c462f2a9ab3fa87259bddf7c08553ffd9457fc2b2c - languageName: node - linkType: hard - -"@babel/plugin-transform-function-name@npm:^7.23.3": +"@babel/plugin-transform-function-name@npm:^7.23.3, @babel/plugin-transform-function-name@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-function-name@npm:7.24.7" dependencies: @@ -1905,20 +1435,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-function-name@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-function-name@npm:7.24.1" - dependencies: - "@babel/helper-compilation-targets": "npm:^7.23.6" - "@babel/helper-function-name": "npm:^7.23.0" - "@babel/helper-plugin-utils": "npm:^7.24.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/65c1735ec3b5e43db9b5aebf3c16171c04b3050c92396b9e22dda0d2aaf51f43fdcf147f70a40678fd9a4ee2272a5acec4826e9c21bcf968762f4c184897ad75 - languageName: node - linkType: hard - -"@babel/plugin-transform-json-strings@npm:^7.23.4": +"@babel/plugin-transform-json-strings@npm:^7.23.4, @babel/plugin-transform-json-strings@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-json-strings@npm:7.24.7" dependencies: @@ -1930,19 +1447,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-json-strings@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-json-strings@npm:7.24.1" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.0" - "@babel/plugin-syntax-json-strings": "npm:^7.8.3" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/13d9b6a3c31ab4be853b3d49d8d1171f9bd8198562fd75da8f31e7de31398e1cfa6eb1d073bed93c9746e4f9c47a53b20f8f4c255ece3f88c90852ad3181dc2d - languageName: node - linkType: hard - -"@babel/plugin-transform-literals@npm:^7.23.3": +"@babel/plugin-transform-literals@npm:^7.23.3, @babel/plugin-transform-literals@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-literals@npm:7.24.7" dependencies: @@ -1953,18 +1458,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-literals@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-literals@npm:7.24.1" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/a27cc7d565ee57b5a2bf136fa889c5c2f5988545ae7b3b2c83a7afe5dd37dfac80dca88b1c633c65851ce6af7d2095c04c01228657ce0198f918e64b5ccd01fa - languageName: node - linkType: hard - -"@babel/plugin-transform-logical-assignment-operators@npm:^7.23.4": +"@babel/plugin-transform-logical-assignment-operators@npm:^7.23.4, @babel/plugin-transform-logical-assignment-operators@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-logical-assignment-operators@npm:7.24.7" dependencies: @@ -1976,19 +1470,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-logical-assignment-operators@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-logical-assignment-operators@npm:7.24.1" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.0" - "@babel/plugin-syntax-logical-assignment-operators": "npm:^7.10.4" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/98a2e0843ddfe51443c1bfcf08ba40ad8856fd4f8e397b392a5390a54f257c8c1b9a99d8ffc0fc7e8c55cce45e2cd9c2795a4450303f48f501bcbd662de44554 - languageName: node - linkType: hard - -"@babel/plugin-transform-member-expression-literals@npm:^7.23.3": +"@babel/plugin-transform-member-expression-literals@npm:^7.23.3, @babel/plugin-transform-member-expression-literals@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-member-expression-literals@npm:7.24.7" dependencies: @@ -1999,18 +1481,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-member-expression-literals@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-member-expression-literals@npm:7.24.1" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/2af731d02aa4c757ef80c46df42264128cbe45bfd15e1812d1a595265b690a44ad036041c406a73411733540e1c4256d8174705ae6b8cfaf757fc175613993fd - 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.3, @babel/plugin-transform-modules-amd@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-modules-amd@npm:7.24.7" dependencies: @@ -2022,19 +1493,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-modules-amd@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-modules-amd@npm:7.24.1" - dependencies: - "@babel/helper-module-transforms": "npm:^7.23.3" - "@babel/helper-plugin-utils": "npm:^7.24.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/71fd04e5e7026e6e52701214b1e9f7508ba371b757e5075fbb938a79235ed66a54ce65f89bb92b59159e9f03f01b392e6c4de6d255b948bec975a90cfd6809ef - languageName: node - linkType: hard - -"@babel/plugin-transform-modules-commonjs@npm:^7.13.8, @babel/plugin-transform-modules-commonjs@npm:^7.23.0, @babel/plugin-transform-modules-commonjs@npm:^7.23.3": +"@babel/plugin-transform-modules-commonjs@npm:^7.13.8, @babel/plugin-transform-modules-commonjs@npm:^7.23.0, @babel/plugin-transform-modules-commonjs@npm:^7.23.3, @babel/plugin-transform-modules-commonjs@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-modules-commonjs@npm:7.24.7" dependencies: @@ -2047,20 +1506,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-modules-commonjs@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-modules-commonjs@npm:7.24.1" - dependencies: - "@babel/helper-module-transforms": "npm:^7.23.3" - "@babel/helper-plugin-utils": "npm:^7.24.0" - "@babel/helper-simple-access": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/efb3ea2047604a7eb44a9289311ebb29842fe6510ff8b66a77a60440448c65e1312a60dc48191ed98246bdbd163b5b6f3348a0669bcc0e3809e69c7c776b20fa - languageName: node - linkType: hard - -"@babel/plugin-transform-modules-systemjs@npm:^7.23.9": +"@babel/plugin-transform-modules-systemjs@npm:^7.23.9, @babel/plugin-transform-modules-systemjs@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-modules-systemjs@npm:7.24.7" dependencies: @@ -2074,21 +1520,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-modules-systemjs@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-modules-systemjs@npm:7.24.1" - dependencies: - "@babel/helper-hoist-variables": "npm:^7.22.5" - "@babel/helper-module-transforms": "npm:^7.23.3" - "@babel/helper-plugin-utils": "npm:^7.24.0" - "@babel/helper-validator-identifier": "npm:^7.22.20" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/38145f8abe8a4ce2b41adabe5d65eb7bd54a139dc58e2885fec975eb5cf247bd938c1dd9f09145c46dbe57d25dd0ef7f00a020e5eb0cbe8195b2065d51e2d93d - languageName: node - linkType: hard - -"@babel/plugin-transform-modules-umd@npm:^7.23.3": +"@babel/plugin-transform-modules-umd@npm:^7.23.3, @babel/plugin-transform-modules-umd@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-modules-umd@npm:7.24.7" dependencies: @@ -2100,18 +1532,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-modules-umd@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-modules-umd@npm:7.24.1" - dependencies: - "@babel/helper-module-transforms": "npm:^7.23.3" - "@babel/helper-plugin-utils": "npm:^7.24.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/14c90c58562b54e17fe4a8ded3f627f9a993648f8378ef00cb2f6c34532032b83290d2ad54c7fff4f0c2cd49091bda780f8cc28926ec4b77a6c2141105a2e699 - languageName: node - linkType: hard - "@babel/plugin-transform-named-capturing-groups-regex@npm:^7.22.5": version: 7.24.7 resolution: "@babel/plugin-transform-named-capturing-groups-regex@npm:7.24.7" @@ -2124,49 +1544,26 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-new-target@npm:^7.23.3": +"@babel/plugin-transform-new-target@npm:^7.23.3, @babel/plugin-transform-new-target@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-new-target@npm:7.24.7" dependencies: "@babel/helper-plugin-utils": "npm:^7.24.7" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10c0/2540808a35e1a978e537334c43dab439cf24c93e7beb213a2e71902f6710e60e0184316643790c0a6644e7a8021e52f7ab8165e6b3e2d6651be07bdf517b67df - languageName: node - linkType: hard - -"@babel/plugin-transform-new-target@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-new-target@npm:7.24.1" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/c4cabe628163855f175a8799eb73d692b6f1dc347aae5022af0c253f80c92edb962e48ddccc98b691eff3d5d8e53c9a8f10894c33ba4cebc2e2f8f8fe554fb7a - languageName: node - linkType: hard - -"@babel/plugin-transform-nullish-coalescing-operator@npm:^7.22.11, @babel/plugin-transform-nullish-coalescing-operator@npm:^7.23.4": - version: 7.24.7 - resolution: "@babel/plugin-transform-nullish-coalescing-operator@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - "@babel/plugin-syntax-nullish-coalescing-operator": "npm:^7.8.3" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/7243c8ff734ed5ef759dd8768773c4b443c12e792727e759a1aec2c7fa2bfdd24f1ecb42e292a7b3d8bd3d7f7b861cf256a8eb4ba144fc9cc463892c303083d9 + checksum: 10c0/2540808a35e1a978e537334c43dab439cf24c93e7beb213a2e71902f6710e60e0184316643790c0a6644e7a8021e52f7ab8165e6b3e2d6651be07bdf517b67df languageName: node linkType: hard -"@babel/plugin-transform-nullish-coalescing-operator@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-nullish-coalescing-operator@npm:7.24.1" +"@babel/plugin-transform-nullish-coalescing-operator@npm:^7.22.11, @babel/plugin-transform-nullish-coalescing-operator@npm:^7.23.4, @babel/plugin-transform-nullish-coalescing-operator@npm:^7.24.1": + version: 7.24.7 + resolution: "@babel/plugin-transform-nullish-coalescing-operator@npm:7.24.7" dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.0" + "@babel/helper-plugin-utils": "npm:^7.24.7" "@babel/plugin-syntax-nullish-coalescing-operator": "npm:^7.8.3" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10c0/c8532951506fb031287280cebeef10aa714f8a7cea2b62a13c805f0e0af945ba77a7c87e4bbbe4c37fe973e0e5d5e649cfac7f0374f57efc54cdf9656362a392 + checksum: 10c0/7243c8ff734ed5ef759dd8768773c4b443c12e792727e759a1aec2c7fa2bfdd24f1ecb42e292a7b3d8bd3d7f7b861cf256a8eb4ba144fc9cc463892c303083d9 languageName: node linkType: hard @@ -2207,7 +1604,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-object-super@npm:^7.23.3": +"@babel/plugin-transform-object-super@npm:^7.23.3, @babel/plugin-transform-object-super@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-object-super@npm:7.24.7" dependencies: @@ -2219,19 +1616,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-object-super@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-object-super@npm:7.24.1" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.0" - "@babel/helper-replace-supers": "npm:^7.24.1" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/d30e6b9e59a707efd7ed524fc0a8deeea046011a6990250f2e9280516683138e2d13d9c52daf41d78407bdab0378aef7478326f2a15305b773d851cb6e106157 - languageName: node - linkType: hard - -"@babel/plugin-transform-optional-catch-binding@npm:^7.23.4": +"@babel/plugin-transform-optional-catch-binding@npm:^7.23.4, @babel/plugin-transform-optional-catch-binding@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-optional-catch-binding@npm:7.24.7" dependencies: @@ -2243,19 +1628,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-optional-catch-binding@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-optional-catch-binding@npm:7.24.1" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.0" - "@babel/plugin-syntax-optional-catch-binding": "npm:^7.8.3" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/68408b9ef772d9aa5dccf166c86dc4d2505990ce93e03dcfc65c73fb95c2511248e009ba9ccf5b96405fb85de1c16ad8291016b1cc5689ee4becb1e3050e0ae7 - languageName: node - linkType: hard - -"@babel/plugin-transform-optional-chaining@npm:^7.23.0, @babel/plugin-transform-optional-chaining@npm:^7.23.4, @babel/plugin-transform-optional-chaining@npm:^7.24.7": +"@babel/plugin-transform-optional-chaining@npm:^7.23.0, @babel/plugin-transform-optional-chaining@npm:^7.23.4, @babel/plugin-transform-optional-chaining@npm:^7.24.1, @babel/plugin-transform-optional-chaining@npm:^7.24.7": version: 7.24.7 resolution: "@babel/plugin-transform-optional-chaining@npm:7.24.7" dependencies: @@ -2268,20 +1641,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-optional-chaining@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-optional-chaining@npm:7.24.1" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.0" - "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.22.5" - "@babel/plugin-syntax-optional-chaining": "npm:^7.8.3" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/b4688795229c9e9ce978eccf979fe515eb4e8d864d2dcd696baa937c8db13e3d46cff664a3cd6119dfe60e261f5d359b10c6783effab7cc91d75d03ad7f43d05 - languageName: node - linkType: hard - -"@babel/plugin-transform-parameters@npm:^7.23.3, @babel/plugin-transform-parameters@npm:^7.24.7": +"@babel/plugin-transform-parameters@npm:^7.23.3, @babel/plugin-transform-parameters@npm:^7.24.1, @babel/plugin-transform-parameters@npm:^7.24.7": version: 7.24.7 resolution: "@babel/plugin-transform-parameters@npm:7.24.7" dependencies: @@ -2292,18 +1652,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-parameters@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-parameters@npm:7.24.1" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/eee8d2f72d3ee0876dc8d85f949f4adf34685cfe36c814ebc20c96315f3891a53d43c764d636b939e34d55e6a6a4af9aa57ed0d7f9439eb5771a07277c669e55 - languageName: node - linkType: hard - -"@babel/plugin-transform-private-methods@npm:^7.22.5, @babel/plugin-transform-private-methods@npm:^7.23.3": +"@babel/plugin-transform-private-methods@npm:^7.22.5, @babel/plugin-transform-private-methods@npm:^7.23.3, @babel/plugin-transform-private-methods@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-private-methods@npm:7.24.7" dependencies: @@ -2315,19 +1664,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-private-methods@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-private-methods@npm:7.24.1" - dependencies: - "@babel/helper-create-class-features-plugin": "npm:^7.24.1" - "@babel/helper-plugin-utils": "npm:^7.24.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/d8e18587d2a8b71a795da5e8841b0e64f1525a99ad73ea8b9caa331bc271d69646e2e1e749fd634321f3df9d126070208ddac22a27ccf070566b2efb74fecd99 - languageName: node - linkType: hard - -"@babel/plugin-transform-private-property-in-object@npm:^7.23.4": +"@babel/plugin-transform-private-property-in-object@npm:^7.23.4, @babel/plugin-transform-private-property-in-object@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-private-property-in-object@npm:7.24.7" dependencies: @@ -2341,21 +1678,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-private-property-in-object@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-private-property-in-object@npm:7.24.1" - dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.22.5" - "@babel/helper-create-class-features-plugin": "npm:^7.24.1" - "@babel/helper-plugin-utils": "npm:^7.24.0" - "@babel/plugin-syntax-private-property-in-object": "npm:^7.14.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/33d2b9737de7667d7a1b704eef99bfecc6736157d9ea28c2e09010d5f25e33ff841c41d89a4430c5d47f4eb3384e24770fa0ec79600e1e38d6d16e2f9333b4b5 - languageName: node - linkType: hard - -"@babel/plugin-transform-property-literals@npm:^7.23.3": +"@babel/plugin-transform-property-literals@npm:^7.23.3, @babel/plugin-transform-property-literals@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-property-literals@npm:7.24.7" dependencies: @@ -2366,17 +1689,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-property-literals@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-property-literals@npm:7.24.1" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/3bf3e01f7bb8215a8b6d0081b6f86fea23e3a4543b619e059a264ede028bc58cdfb0acb2c43271271915a74917effa547bc280ac636a9901fa9f2fb45623f87e - languageName: node - linkType: hard - "@babel/plugin-transform-react-display-name@npm:^7.24.1": version: 7.24.1 resolution: "@babel/plugin-transform-react-display-name@npm:7.24.1" @@ -2448,7 +1760,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-regenerator@npm:^7.23.3": +"@babel/plugin-transform-regenerator@npm:^7.23.3, @babel/plugin-transform-regenerator@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-regenerator@npm:7.24.7" dependencies: @@ -2460,19 +1772,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-regenerator@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-regenerator@npm:7.24.1" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.0" - regenerator-transform: "npm:^0.15.2" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/0a333585d7c0b38d31cc549d0f3cf7c396d1d50b6588a307dc58325505ddd4f5446188bc536c4779431b396251801b3f32d6d8e87db8274bc84e8c41950737f7 - languageName: node - linkType: hard - -"@babel/plugin-transform-reserved-words@npm:^7.23.3": +"@babel/plugin-transform-reserved-words@npm:^7.23.3, @babel/plugin-transform-reserved-words@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-reserved-words@npm:7.24.7" dependencies: @@ -2483,17 +1783,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-reserved-words@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-reserved-words@npm:7.24.1" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/936d6e73cafb2cbb495f6817c6f8463288dbc9ab3c44684b931ebc1ece24f0d55dfabc1a75ba1de5b48843d0fef448dcfdbecb8485e4014f8f41d0d1440c536f - languageName: node - linkType: hard - "@babel/plugin-transform-runtime@npm:7.24.0": version: 7.24.0 resolution: "@babel/plugin-transform-runtime@npm:7.24.0" @@ -2526,7 +1815,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-shorthand-properties@npm:^7.23.3": +"@babel/plugin-transform-shorthand-properties@npm:^7.23.3, @babel/plugin-transform-shorthand-properties@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-shorthand-properties@npm:7.24.7" dependencies: @@ -2537,18 +1826,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-shorthand-properties@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-shorthand-properties@npm:7.24.1" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/8273347621183aada3cf1f3019d8d5f29467ba13a75b72cb405bc7f23b7e05fd85f4edb1e4d9f0103153dddb61826a42dc24d466480d707f8932c1923a4c25fa - languageName: node - linkType: hard - -"@babel/plugin-transform-spread@npm:^7.23.3": +"@babel/plugin-transform-spread@npm:^7.23.3, @babel/plugin-transform-spread@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-spread@npm:7.24.7" dependencies: @@ -2560,19 +1838,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-spread@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-spread@npm:7.24.1" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.0" - "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/50a0302e344546d57e5c9f4dea575f88e084352eeac4e9a3e238c41739eef2df1daf4a7ebbb3ccb7acd3447f6a5ce9938405f98bf5f5583deceb8257f5a673c9 - languageName: node - linkType: hard - -"@babel/plugin-transform-sticky-regex@npm:^7.23.3": +"@babel/plugin-transform-sticky-regex@npm:^7.23.3, @babel/plugin-transform-sticky-regex@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-sticky-regex@npm:7.24.7" dependencies: @@ -2583,18 +1849,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-sticky-regex@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-sticky-regex@npm:7.24.1" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/786fe2ae11ef9046b9fa95677935abe495031eebf1274ad03f2054a20adea7b9dbd00336ac0b143f7924bc562e5e09793f6e8613607674b97e067d4838ccc4a0 - languageName: node - linkType: hard - -"@babel/plugin-transform-template-literals@npm:^7.23.3": +"@babel/plugin-transform-template-literals@npm:^7.23.3, @babel/plugin-transform-template-literals@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-template-literals@npm:7.24.7" dependencies: @@ -2605,18 +1860,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-template-literals@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-template-literals@npm:7.24.1" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/f73bcda5488eb81c6e7a876498d9e6b72be32fca5a4d9db9053491a2d1300cd27b889b463fd2558f3cd5826a85ed00f61d81b234aa55cb5a0abf1b6fa1bd5026 - languageName: node - linkType: hard - -"@babel/plugin-transform-typeof-symbol@npm:^7.23.3": +"@babel/plugin-transform-typeof-symbol@npm:^7.23.3, @babel/plugin-transform-typeof-symbol@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-typeof-symbol@npm:7.24.7" dependencies: @@ -2627,18 +1871,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-typeof-symbol@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-typeof-symbol@npm:7.24.1" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/d392f549bfd13414f59feecdf3fb286f266a3eb9107a9de818e57907bda56eed08d1f6f8e314d09bf99252df026a7fd4d5df839acd45078a777abcebaa9a8593 - languageName: node - linkType: hard - -"@babel/plugin-transform-typescript@npm:^7.13.0": +"@babel/plugin-transform-typescript@npm:^7.13.0, @babel/plugin-transform-typescript@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-typescript@npm:7.24.7" dependencies: @@ -2652,21 +1885,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-typescript@npm:^7.24.1": - version: 7.24.4 - resolution: "@babel/plugin-transform-typescript@npm:7.24.4" - dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.22.5" - "@babel/helper-create-class-features-plugin": "npm:^7.24.4" - "@babel/helper-plugin-utils": "npm:^7.24.0" - "@babel/plugin-syntax-typescript": "npm:^7.24.1" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/fa6625046f219cdc75061025c8031ada75ef631b137f1442e3d0054ba4e63548eb12cf55e2e1f442c889aa5fdd76d0d0b7904fdf812ce4c38748446227acc798 - languageName: node - linkType: hard - -"@babel/plugin-transform-unicode-escapes@npm:^7.23.3": +"@babel/plugin-transform-unicode-escapes@npm:^7.23.3, @babel/plugin-transform-unicode-escapes@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-unicode-escapes@npm:7.24.7" dependencies: @@ -2677,18 +1896,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-unicode-escapes@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-unicode-escapes@npm:7.24.1" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/67a72a1ed99639de6a93aead35b1993cb3f0eb178a8991fcef48732c38c9f0279c85bbe1e2e2477b85afea873e738ff0955a35057635ce67bc149038e2d8a28e - languageName: node - linkType: hard - -"@babel/plugin-transform-unicode-property-regex@npm:^7.23.3": +"@babel/plugin-transform-unicode-property-regex@npm:^7.23.3, @babel/plugin-transform-unicode-property-regex@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-unicode-property-regex@npm:7.24.7" dependencies: @@ -2700,19 +1908,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-unicode-property-regex@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-unicode-property-regex@npm:7.24.1" - dependencies: - "@babel/helper-create-regexp-features-plugin": "npm:^7.22.15" - "@babel/helper-plugin-utils": "npm:^7.24.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/d9d9752df7d51bf9357c0bf3762fe16b8c841fca9ecf4409a16f15ccc34be06e8e71abfaee1251b7d451227e70e6b873b36f86b090efdb20f6f7de5fdb6c7a05 - languageName: node - linkType: hard - -"@babel/plugin-transform-unicode-regex@npm:^7.23.3": +"@babel/plugin-transform-unicode-regex@npm:^7.23.3, @babel/plugin-transform-unicode-regex@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-unicode-regex@npm:7.24.7" dependencies: @@ -2724,19 +1920,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-unicode-regex@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-unicode-regex@npm:7.24.1" - dependencies: - "@babel/helper-create-regexp-features-plugin": "npm:^7.22.15" - "@babel/helper-plugin-utils": "npm:^7.24.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/6046ab38e5d14ed97dbb921bd79ac1d7ad9d3286da44a48930e980b16896db2df21e093563ec3c916a630dc346639bf47c5924a33902a06fe3bbb5cdc7ef5f2f - languageName: node - linkType: hard - -"@babel/plugin-transform-unicode-sets-regex@npm:^7.23.3": +"@babel/plugin-transform-unicode-sets-regex@npm:^7.23.3, @babel/plugin-transform-unicode-sets-regex@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-unicode-sets-regex@npm:7.24.7" dependencies: @@ -2748,18 +1932,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-unicode-sets-regex@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-unicode-sets-regex@npm:7.24.1" - dependencies: - "@babel/helper-create-regexp-features-plugin": "npm:^7.22.15" - "@babel/helper-plugin-utils": "npm:^7.24.0" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10c0/b6c1f6b90afeeddf97e5713f72575787fcb7179be7b4c961869bfbc66915f66540dc49da93e4369da15596bd44b896d1eb8a50f5e1fd907abd7a1a625901006b - languageName: node - linkType: hard - "@babel/polyfill@npm:^7.11.5": version: 7.12.1 resolution: "@babel/polyfill@npm:7.12.1" @@ -3104,25 +2276,7 @@ __metadata: languageName: node linkType: hard -"@babel/traverse@npm:^7.1.6, @babel/traverse@npm:^7.16.0, @babel/traverse@npm:^7.18.9, @babel/traverse@npm:^7.23.9, @babel/traverse@npm:^7.24.0, @babel/traverse@npm:^7.24.1, @babel/traverse@npm:^7.4.5": - version: 7.24.1 - resolution: "@babel/traverse@npm:7.24.1" - dependencies: - "@babel/code-frame": "npm:^7.24.1" - "@babel/generator": "npm:^7.24.1" - "@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.24.1" - "@babel/types": "npm:^7.24.0" - debug: "npm:^4.3.1" - globals: "npm:^11.1.0" - checksum: 10c0/c087b918f6823776537ba246136c70e7ce0719fc05361ebcbfd16f4e6f2f6f1f8f4f9167f1d9b675f27d12074839605189cc9d689de20b89a85e7c140f23daab - languageName: node - linkType: hard - -"@babel/traverse@npm:^7.22.5, @babel/traverse@npm:^7.25.2": +"@babel/traverse@npm:^7.1.6, @babel/traverse@npm:^7.16.0, @babel/traverse@npm:^7.18.9, @babel/traverse@npm:^7.22.5, @babel/traverse@npm:^7.23.9, @babel/traverse@npm:^7.24.0, @babel/traverse@npm:^7.24.1, @babel/traverse@npm:^7.24.7, @babel/traverse@npm:^7.25.2, @babel/traverse@npm:^7.4.5": version: 7.25.3 resolution: "@babel/traverse@npm:7.25.3" dependencies: @@ -3137,24 +2291,6 @@ __metadata: languageName: node linkType: hard -"@babel/traverse@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/traverse@npm:7.24.7" - dependencies: - "@babel/code-frame": "npm:^7.24.7" - "@babel/generator": "npm:^7.24.7" - "@babel/helper-environment-visitor": "npm:^7.24.7" - "@babel/helper-function-name": "npm:^7.24.7" - "@babel/helper-hoist-variables": "npm:^7.24.7" - "@babel/helper-split-export-declaration": "npm:^7.24.7" - "@babel/parser": "npm:^7.24.7" - "@babel/types": "npm:^7.24.7" - debug: "npm:^4.3.1" - globals: "npm:^11.1.0" - checksum: 10c0/a5135e589c3f1972b8877805f50a084a04865ccb1d68e5e1f3b94a8841b3485da4142e33413d8fd76bc0e6444531d3adf1f59f359c11ffac452b743d835068ab - languageName: node - linkType: hard - "@babel/types@npm:7.17.0": version: 7.17.0 resolution: "@babel/types@npm:7.17.0" @@ -3165,18 +2301,7 @@ __metadata: 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.22.5, @babel/types@npm:^7.23.6, @babel/types@npm:^7.23.9, @babel/types@npm:^7.24.0, @babel/types@npm:^7.24.7, @babel/types@npm:^7.4.4, @babel/types@npm:^7.6.1, @babel/types@npm:^7.7.2, @babel/types@npm:^7.8.3, @babel/types@npm:^7.9.6": - version: 7.24.7 - resolution: "@babel/types@npm:7.24.7" - dependencies: - "@babel/helper-string-parser": "npm:^7.24.7" - "@babel/helper-validator-identifier": "npm:^7.24.7" - to-fast-properties: "npm:^2.0.0" - checksum: 10c0/d9ecbfc3eb2b05fb1e6eeea546836ac30d990f395ef3fe3f75ced777a222c3cfc4489492f72e0ce3d9a5a28860a1ce5f81e66b88cf5088909068b3ff4fab72c1 - languageName: node - linkType: hard - -"@babel/types@npm:^7.17.0, @babel/types@npm:^7.25.0, @babel/types@npm:^7.25.2": +"@babel/types@npm:^7.0.0, @babel/types@npm:^7.11.5, @babel/types@npm:^7.17.0, @babel/types@npm:^7.18.9, @babel/types@npm:^7.2.0, @babel/types@npm:^7.20.7, @babel/types@npm:^7.22.5, @babel/types@npm:^7.23.0, @babel/types@npm:^7.23.4, @babel/types@npm:^7.23.6, @babel/types@npm:^7.23.9, @babel/types@npm:^7.24.0, @babel/types@npm:^7.24.7, @babel/types@npm:^7.25.0, @babel/types@npm:^7.25.2, @babel/types@npm:^7.4.4, @babel/types@npm:^7.6.1, @babel/types@npm:^7.7.2, @babel/types@npm:^7.9.6": version: 7.25.2 resolution: "@babel/types@npm:7.25.2" dependencies: @@ -3187,17 +2312,6 @@ __metadata: languageName: node linkType: hard -"@babel/types@npm:^7.22.15, @babel/types@npm:^7.23.0, @babel/types@npm:^7.23.4": - version: 7.24.0 - resolution: "@babel/types@npm:7.24.0" - 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: 10c0/777a0bb5dbe038ca4c905fdafb1cdb6bdd10fe9d63ce13eca0bd91909363cbad554a53dc1f902004b78c1dcbc742056f877f2c99eeedff647333b1fadf51235d - languageName: node - linkType: hard - "@base2/pretty-print-object@npm:1.0.1": version: 1.0.1 resolution: "@base2/pretty-print-object@npm:1.0.1" @@ -6942,7 +6056,6 @@ __metadata: browser-dtector: "npm:^3.4.0" camelcase: "npm:^8.0.0" chai: "npm:^4.4.1" - chalk: "npm:^5.3.0" cli-table3: "npm:^0.6.1" commander: "npm:^12.1.0" comment-parser: "npm:^1.4.1" @@ -7220,7 +6333,7 @@ __metadata: languageName: unknown linkType: soft -"@storybook/icons@npm:^1.2.10": +"@storybook/icons@npm:^1.2.10, @storybook/icons@npm:^1.2.5": version: 1.2.10 resolution: "@storybook/icons@npm:1.2.10" peerDependencies: @@ -7230,16 +6343,6 @@ __metadata: languageName: node linkType: hard -"@storybook/icons@npm:^1.2.5": - version: 1.2.5 - resolution: "@storybook/icons@npm:1.2.5" - peerDependencies: - react: ^16.8.0 || ^17.0.0 || ^18.0.0 - react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 - checksum: 10c0/089622af6de4ab82624d894fbe43688a0eb72f15e6bb8fc19c54fb9f9d7312ce7caf34acebcbd63319dbaef129d8547bc23a5600955d04f6034355e7d82dcfa1 - languageName: node - linkType: hard - "@storybook/instrumenter@workspace:*, @storybook/instrumenter@workspace:lib/instrumenter": version: 0.0.0-use.local resolution: "@storybook/instrumenter@workspace:lib/instrumenter" @@ -10523,16 +9626,7 @@ __metadata: languageName: node linkType: hard -"acorn@npm:^8.0.0, acorn@npm:^8.10.0, acorn@npm:^8.11.2, acorn@npm:^8.11.3, acorn@npm:^8.4.1, acorn@npm:^8.6.0, acorn@npm:^8.7.1, acorn@npm:^8.8.2, acorn@npm:^8.9.0": - version: 8.11.3 - resolution: "acorn@npm:8.11.3" - bin: - acorn: bin/acorn - checksum: 10c0/3ff155f8812e4a746fee8ecff1f227d527c4c45655bb1fad6347c3cb58e46190598217551b1500f18542d2bbe5c87120cb6927f5a074a59166fbdd9468f0a299 - languageName: node - linkType: hard - -"acorn@npm:^8.12.1": +"acorn@npm:^8.0.0, acorn@npm:^8.10.0, acorn@npm:^8.11.2, acorn@npm:^8.11.3, acorn@npm:^8.12.1, acorn@npm:^8.4.1, acorn@npm:^8.6.0, acorn@npm:^8.7.1, acorn@npm:^8.8.2, acorn@npm:^8.9.0": version: 8.12.1 resolution: "acorn@npm:8.12.1" bin: @@ -11220,7 +10314,7 @@ __metadata: languageName: node linkType: hard -"available-typed-arrays@npm:^1.0.6, available-typed-arrays@npm:^1.0.7": +"available-typed-arrays@npm:^1.0.7": version: 1.0.7 resolution: "available-typed-arrays@npm:1.0.7" dependencies: @@ -11770,16 +10864,7 @@ __metadata: languageName: node linkType: hard -"braces@npm:^3.0.2, braces@npm:~3.0.2": - version: 3.0.2 - resolution: "braces@npm:3.0.2" - dependencies: - fill-range: "npm:^7.0.1" - checksum: 10c0/321b4d675791479293264019156ca322163f02dc06e3c4cab33bb15cd43d80b51efef69b0930cfde3acd63d126ebca24cd0544fa6f261e093a0fb41ab9dda381 - languageName: node - linkType: hard - -"braces@npm:^3.0.3": +"braces@npm:^3.0.2, braces@npm:^3.0.3, braces@npm:~3.0.2": version: 3.0.3 resolution: "braces@npm:3.0.3" dependencies: @@ -16219,15 +15304,6 @@ __metadata: languageName: node linkType: hard -"fill-range@npm:^7.0.1": - version: 7.0.1 - resolution: "fill-range@npm:7.0.1" - dependencies: - to-regex-range: "npm:^5.0.1" - checksum: 10c0/7cdad7d426ffbaadf45aeb5d15ec675bbd77f7597ad5399e3d2766987ed20bda24d5fac64b3ee79d93276f5865608bb22344a26b9b1ae6c4d00bd94bf611623f - languageName: node - linkType: hard - "fill-range@npm:^7.1.1": version: 7.1.1 resolution: "fill-range@npm:7.1.1" @@ -17458,7 +16534,7 @@ __metadata: languageName: node linkType: hard -"has-tostringtag@npm:^1.0.0, has-tostringtag@npm:^1.0.1, has-tostringtag@npm:^1.0.2": +"has-tostringtag@npm:^1.0.0, has-tostringtag@npm:^1.0.2": version: 1.0.2 resolution: "has-tostringtag@npm:1.0.2" dependencies: @@ -20266,14 +19342,7 @@ __metadata: languageName: node linkType: hard -"lru-cache@npm:^10.0.1": - version: 10.1.0 - resolution: "lru-cache@npm:10.1.0" - checksum: 10c0/778bc8b2626daccd75f24c4b4d10632496e21ba064b126f526c626fbdbc5b28c472013fccd45d7646b9e1ef052444824854aed617b59cd570d01a8b7d651fc1e - languageName: node - linkType: hard - -"lru-cache@npm:^10.2.0": +"lru-cache@npm:^10.0.1, lru-cache@npm:^10.2.0": version: 10.4.3 resolution: "lru-cache@npm:10.4.3" checksum: 10c0/ebd04fbca961e6c1d6c0af3799adcc966a1babe798f685bb84e6599266599cd95d94630b10262f5424539bc4640107e8a33aa28585374abf561d30d16f4b39fb @@ -23556,14 +22625,7 @@ __metadata: languageName: node linkType: hard -"picocolors@npm:^1.0.0, picocolors@npm:^1.0.1": - version: 1.0.1 - resolution: "picocolors@npm:1.0.1" - checksum: 10c0/c63cdad2bf812ef0d66c8db29583802355d4ca67b9285d846f390cc15c2f6ccb94e8cb7eb6a6e97fc5990a6d3ad4ae42d86c84d3146e667c739a4234ed50d400 - languageName: node - linkType: hard - -"picocolors@npm:^1.1.0": +"picocolors@npm:^1.0.0, picocolors@npm:^1.0.1, picocolors@npm:^1.1.0": version: 1.1.0 resolution: "picocolors@npm:1.1.0" checksum: 10c0/86946f6032148801ef09c051c6fb13b5cf942eaf147e30ea79edb91dd32d700934edebe782a1078ff859fb2b816792e97ef4dab03d7f0b804f6b01a0df35e023 @@ -30212,20 +29274,7 @@ __metadata: languageName: node linkType: hard -"which-typed-array@npm:^1.1.14, which-typed-array@npm:^1.1.2, which-typed-array@npm:^1.1.9": - version: 1.1.14 - resolution: "which-typed-array@npm:1.1.14" - dependencies: - available-typed-arrays: "npm:^1.0.6" - call-bind: "npm:^1.0.5" - for-each: "npm:^0.3.3" - gopd: "npm:^1.0.1" - has-tostringtag: "npm:^1.0.1" - checksum: 10c0/0960f1e77807058819451b98c51d4cd72031593e8de990b24bd3fc22e176f5eee22921d68d852297c786aec117689f0423ed20aa4fde7ce2704d680677891f56 - languageName: node - linkType: hard - -"which-typed-array@npm:^1.1.15": +"which-typed-array@npm:^1.1.14, which-typed-array@npm:^1.1.15, which-typed-array@npm:^1.1.2, which-typed-array@npm:^1.1.9": version: 1.1.15 resolution: "which-typed-array@npm:1.1.15" dependencies: @@ -30411,22 +29460,7 @@ __metadata: languageName: node linkType: hard -"ws@npm:^8.13.0, ws@npm:^8.2.3": - version: 8.16.0 - resolution: "ws@npm:8.16.0" - peerDependencies: - bufferutil: ^4.0.1 - utf-8-validate: ">=5.0.2" - peerDependenciesMeta: - bufferutil: - optional: true - utf-8-validate: - optional: true - checksum: 10c0/a7783bb421c648b1e622b423409cb2a58ac5839521d2f689e84bc9dc41d59379c692dd405b15a997ea1d4c0c2e5314ad707332d0c558f15232d2bc07c0b4618a - languageName: node - linkType: hard - -"ws@npm:^8.18.0": +"ws@npm:^8.13.0, ws@npm:^8.18.0, ws@npm:^8.2.3": version: 8.18.0 resolution: "ws@npm:8.18.0" peerDependencies: diff --git a/scripts/build-package.ts b/scripts/build-package.ts index 60ac5b012e13..96ddb84c2fbc 100644 --- a/scripts/build-package.ts +++ b/scripts/build-package.ts @@ -1,8 +1,8 @@ -import chalk from 'chalk'; import { program } from 'commander'; import { execaCommand } from 'execa'; import { readJSON } from 'fs-extra'; import { posix, resolve, sep } from 'path'; +import picocolors from 'picocolors'; import prompts from 'prompts'; import windowSize from 'window-size'; @@ -63,7 +63,9 @@ async function run() { ...packageTasks, }; - const main = program.version('5.0.0').option('--all', `build everything ${chalk.gray('(all)')}`); + const main = program + .version('5.0.0') + .option('--all', `build everything ${picocolors.gray('(all)')}`); Object.keys(tasks) .reduce((acc, key) => acc.option(tasks[key].suffix, tasks[key].helpText), main) @@ -154,10 +156,10 @@ async function run() { ); sub.stdout?.on('data', (data) => { - process.stdout.write(`${chalk.cyan(v.name)}:\n${data}`); + process.stdout.write(`${picocolors.cyan(v.name)}:\n${data}`); }); sub.stderr?.on('data', (data) => { - process.stderr.write(`${chalk.red(v.name)}:\n${data}`); + process.stderr.write(`${picocolors.red(v.name)}:\n${data}`); }); }); } diff --git a/scripts/check-package.ts b/scripts/check-package.ts index c8873e6cf846..8b9c49985fb5 100644 --- a/scripts/check-package.ts +++ b/scripts/check-package.ts @@ -1,11 +1,11 @@ // This script makes sure that we can support type checking, // without having to build dts files for all packages in the monorepo. // It is not implemented yet for angular, svelte and vue. -import chalk from 'chalk'; import { program } from 'commander'; import { execaCommand } from 'execa'; import { readJSON } from 'fs-extra'; import { resolve } from 'path'; +import picocolors from 'picocolors'; import prompts from 'prompts'; import windowSize from 'window-size'; @@ -53,7 +53,9 @@ async function run() { ...packageTasks, }; - const main = program.version('5.0.0').option('--all', `check everything ${chalk.gray('(all)')}`); + const main = program + .version('5.0.0') + .option('--all', `check everything ${picocolors.gray('(all)')}`); Object.keys(tasks) .reduce((acc, key) => acc.option(tasks[key].suffix, tasks[key].helpText), main) @@ -122,10 +124,10 @@ async function run() { }); sub.stdout.on('data', (data) => { - process.stdout.write(`${chalk.cyan(v.name)}:\n${data}`); + process.stdout.write(`${picocolors.cyan(v.name)}:\n${data}`); }); sub.stderr.on('data', (data) => { - process.stderr.write(`${chalk.red(v.name)}:\n${data}`); + process.stderr.write(`${picocolors.red(v.name)}:\n${data}`); }); }); } diff --git a/scripts/dangerfile.ts b/scripts/dangerfile.ts index 51a144e550cf..93382ae441cf 100644 --- a/scripts/dangerfile.ts +++ b/scripts/dangerfile.ts @@ -1,4 +1,4 @@ -/* eslint-disable import/extensions */ +/* eslint-disable import/no-extraneous-dependencies, import/extensions */ import { execSync } from 'child_process'; import { danger, fail } from 'danger'; diff --git a/scripts/event-log-checker.ts b/scripts/event-log-checker.ts index 4893eaeb449c..cb85959503aa 100644 --- a/scripts/event-log-checker.ts +++ b/scripts/event-log-checker.ts @@ -1,5 +1,5 @@ import assert from 'assert'; -import chalk from 'chalk'; +import picocolors from 'picocolors'; import versions from '../code/core/src/common/versions'; import { oneWayHash } from '../code/core/src/telemetry/one-way-hash'; @@ -89,8 +89,8 @@ async function run() { }); } catch (err) { if (err instanceof assert.AssertionError) { - console.log(`Assertions failed for ${chalk.bold(templateName)}\n`); - console.log(chalk.bold(chalk.red`✕ ${testMessage}:`)); + console.log(`Assertions failed for ${picocolors.bold(templateName)}\n`); + console.log(picocolors.bold(picocolors.red`✕ ${testMessage}:`)); console.log(err); process.exit(1); } diff --git a/scripts/get-template.ts b/scripts/get-template.ts index 28b390c665bd..728632392489 100644 --- a/scripts/get-template.ts +++ b/scripts/get-template.ts @@ -1,7 +1,7 @@ -import chalk from 'chalk'; import { program } from 'commander'; import { pathExists, readFile } from 'fs-extra'; import { readdir } from 'fs/promises'; +import picocolors from 'picocolors'; import { dedent } from 'ts-dedent'; import yaml from 'yaml'; @@ -103,7 +103,7 @@ async function checkParallelism(cadence?: Cadence, scriptName?: TaskKey) { let isIncorrect = false; cadences.forEach((cad) => { - summary.push(`\n${chalk.bold(cad)}`); + summary.push(`\n${picocolors.bold(cad)}`); const cadenceTemplates = Object.entries(allTemplates).filter(([key]) => templatesByCadence[cad].includes(key as TemplateKey) ); @@ -129,7 +129,7 @@ async function checkParallelism(cadence?: Cadence, scriptName?: TaskKey) { if (newParallelism !== currentParallelism) { summary.push( - `-- ❌ ${tasksMap[script]} - parallelism: ${currentParallelism} ${chalk.bgRed( + `-- ❌ ${tasksMap[script]} - parallelism: ${currentParallelism} ${picocolors.bgRed( `(should be ${newParallelism})` )}` ); diff --git a/scripts/knip.config.ts b/scripts/knip.config.ts index e9a90982e3cb..ef23f8c556bd 100644 --- a/scripts/knip.config.ts +++ b/scripts/knip.config.ts @@ -70,7 +70,10 @@ const baseConfig = { export const addBundlerEntries = async (config: KnipConfig) => { const baseDir = join(__dirname, '../code'); const rootManifest = await import(join(baseDir, 'package.json')); - const workspaceDirs = await fg(rootManifest.workspaces.packages, { cwd: baseDir, onlyDirectories: true }); + const workspaceDirs = await fg(rootManifest.workspaces.packages, { + cwd: baseDir, + onlyDirectories: true, + }); const workspaceDirectories = workspaceDirs.map((dir) => relative(baseDir, join(baseDir, dir))); for (const wsDir of workspaceDirectories) { for (const configKey of Object.keys(baseConfig.workspaces)) { diff --git a/scripts/package.json b/scripts/package.json index 456ba6c06038..21507314596a 100644 --- a/scripts/package.json +++ b/scripts/package.json @@ -96,7 +96,6 @@ "@vitest/coverage-v8": "^2.0.5", "ansi-regex": "^6.0.1", "browser-assert": "^1.2.1", - "chalk": "^4.1.0", "chromatic": "^11.5.5", "codecov": "^3.8.1", "commander": "^12.1.0", @@ -138,11 +137,13 @@ "knip": "^5.30.1", "lint-staged": "^15.2.7", "memoizerific": "^1.11.3", + "minimatch": "^10.0.1", "node-gyp": "^9.3.1", "nx": "18.0.6", "ora": "^5.4.1", "p-limit": "^3.1.0", "p-retry": "^5.1.2", + "picocolors": "^1.1.0", "playwright": "1.46.0", "playwright-core": "1.46.0", "prettier": "^3.3.2", diff --git a/scripts/prepare/tools.ts b/scripts/prepare/tools.ts index 5b81ed2b3f62..eb4214a945ba 100644 --- a/scripts/prepare/tools.ts +++ b/scripts/prepare/tools.ts @@ -3,12 +3,12 @@ import { dirname, join } from 'node:path'; import * as process from 'node:process'; import { globalExternals } from '@fal-works/esbuild-plugin-global-externals'; -import chalk from 'chalk'; import { spawn } from 'cross-spawn'; import * as esbuild from 'esbuild'; import { readJson } from 'fs-extra'; import { glob } from 'glob'; import limit from 'p-limit'; +import picocolors from 'picocolors'; import * as prettier from 'prettier'; import prettyTime from 'pretty-hrtime'; import * as rollup from 'rollup'; @@ -103,7 +103,7 @@ export { process, esbuild, prettyTime, - chalk, + picocolors, dedent, limit, sortPackageJson, diff --git a/scripts/release/cancel-preparation-runs.ts b/scripts/release/cancel-preparation-runs.ts index aa5916de8208..b3d922dbef5a 100644 --- a/scripts/release/cancel-preparation-runs.ts +++ b/scripts/release/cancel-preparation-runs.ts @@ -2,8 +2,8 @@ * This script cancels all running preparation workflows in GitHub. It will fetch all active runs * for the preparation workflows, and cancel them. */ -import chalk from 'chalk'; import { program } from 'commander'; +import picocolors from 'picocolors'; import { dedent } from 'ts-dedent'; import { esMain } from '../utils/esmain'; @@ -35,12 +35,12 @@ export const run = async () => { )?.id; console.log(`Found workflow IDs for the preparation workflows: - ${chalk.blue(PREPARE_PATCH_WORKFLOW_PATH)}: ${chalk.green(preparePatchWorkflowId)} - ${chalk.blue(PREPARE_NON_PATCH_WORKFLOW_PATH)}: ${chalk.green(prepareNonPatchWorkflowId)}`); + ${picocolors.blue(PREPARE_PATCH_WORKFLOW_PATH)}: ${picocolors.green(preparePatchWorkflowId)} + ${picocolors.blue(PREPARE_NON_PATCH_WORKFLOW_PATH)}: ${picocolors.green(prepareNonPatchWorkflowId)}`); if (!preparePatchWorkflowId || !prepareNonPatchWorkflowId) { throw new Error(dedent`🚨 Could not find workflow IDs for the preparation workflows - - Looked for paths: "${chalk.blue(PREPARE_PATCH_WORKFLOW_PATH)}" and "${chalk.blue( + - Looked for paths: "${picocolors.blue(PREPARE_PATCH_WORKFLOW_PATH)}" and "${picocolors.blue( PREPARE_NON_PATCH_WORKFLOW_PATH )}", are they still correct? - Found workflows: @@ -75,7 +75,10 @@ export const run = async () => { console.log(`🔍 Found ${runsToCancel.length} runs to cancel. Cancelling them now: ${runsToCancel - .map((r) => `${chalk.green(r.path)} - ${chalk.green(r.id)}: ${chalk.blue(r.status)}`) + .map( + (r) => + `${picocolors.green(r.path)} - ${picocolors.green(r.id)}: ${picocolors.blue(r.status)}` + ) .join('\n ')}`); const result = await Promise.allSettled( diff --git a/scripts/release/generate-pr-description.ts b/scripts/release/generate-pr-description.ts index f1a79da2d6db..0d569e20e01b 100644 --- a/scripts/release/generate-pr-description.ts +++ b/scripts/release/generate-pr-description.ts @@ -1,6 +1,6 @@ import { setOutput } from '@actions/core'; -import chalk from 'chalk'; import { program } from 'commander'; +import picocolors from 'picocolors'; import semver from 'semver'; import { dedent } from 'ts-dedent'; import { z } from 'zod'; @@ -246,9 +246,9 @@ export const run = async (rawOptions: unknown) => { const currentVersion = options.currentVersion || (await getCurrentVersion()); console.log( - `💬 Generating PR description for ${chalk.blue(nextVersion)} between ${chalk.green( + `💬 Generating PR description for ${picocolors.blue(nextVersion)} between ${picocolors.green( currentVersion - )} and ${chalk.green('HEAD')}` + )} and ${picocolors.green('HEAD')}` ); const { changes, changelogText } = await getChanges({ @@ -289,7 +289,7 @@ export const run = async (rawOptions: unknown) => { if (process.env.GITHUB_ACTIONS === 'true') { setOutput('description', description); } - console.log(`✅ Generated PR description for ${chalk.blue(nextVersion)}`); + console.log(`✅ Generated PR description for ${picocolors.blue(nextVersion)}`); if (verbose) { console.log(description); } diff --git a/scripts/release/get-changelog-from-file.ts b/scripts/release/get-changelog-from-file.ts index f428310cc656..354605e04644 100644 --- a/scripts/release/get-changelog-from-file.ts +++ b/scripts/release/get-changelog-from-file.ts @@ -1,9 +1,9 @@ import { join } from 'node:path'; import { setOutput } from '@actions/core'; -import chalk from 'chalk'; import { program } from 'commander'; import { readFile } from 'fs-extra'; +import picocolors from 'picocolors'; import semver from 'semver'; import { dedent } from 'ts-dedent'; @@ -29,13 +29,13 @@ export const getChangelogFromFile = async (args: { const changelogFilename = isPrerelease ? 'CHANGELOG.prerelease.md' : 'CHANGELOG.md'; const changelogPath = join(__dirname, '..', '..', changelogFilename); - console.log(`📝 Getting changelog from ${chalk.blue(changelogPath)}`); + console.log(`📝 Getting changelog from ${picocolors.blue(changelogPath)}`); const fullChangelog = await readFile(changelogPath, 'utf-8'); const changelogForVersion = fullChangelog.split(/(^|\n)## /).find((v) => v.startsWith(version)); if (!changelogForVersion) { throw new Error( - `Could not find changelog entry for version ${chalk.blue(version)} in ${chalk.green( + `Could not find changelog entry for version ${picocolors.blue(version)} in ${picocolors.green( changelogPath )}` ); diff --git a/scripts/release/get-current-version.ts b/scripts/release/get-current-version.ts index f640ccb5907e..8530f6cf9646 100644 --- a/scripts/release/get-current-version.ts +++ b/scripts/release/get-current-version.ts @@ -1,8 +1,8 @@ import { join } from 'node:path'; import { setOutput } from '@actions/core'; -import chalk from 'chalk'; import { readJson } from 'fs-extra'; +import picocolors from 'picocolors'; import { esMain } from '../utils/esmain'; @@ -15,7 +15,7 @@ export const getCurrentVersion = async () => { if (process.env.GITHUB_ACTIONS === 'true') { setOutput('current-version', version); } - console.log(`📦 Current version is ${chalk.green(version)}`); + console.log(`📦 Current version is ${picocolors.green(version)}`); return version; }; diff --git a/scripts/release/get-version-changelog.ts b/scripts/release/get-version-changelog.ts index 6e1af6a7b5b7..e85ac5257643 100644 --- a/scripts/release/get-version-changelog.ts +++ b/scripts/release/get-version-changelog.ts @@ -1,6 +1,6 @@ import { setOutput } from '@actions/core'; -import chalk from 'chalk'; import { program } from 'commander'; +import picocolors from 'picocolors'; import { esMain } from '../utils/esmain'; import { getCurrentVersion } from './get-current-version'; @@ -17,7 +17,7 @@ program export const getVersionChangelog = async (args: { version?: string; verbose?: boolean }) => { const version = args.version || (await getCurrentVersion()); - console.log(`📝 Getting changelog for version ${chalk.blue(version)}`); + console.log(`📝 Getting changelog for version ${picocolors.blue(version)}`); const { changelogText } = await getChanges({ from: version, version, verbose: args.verbose }); diff --git a/scripts/release/is-pr-frozen.ts b/scripts/release/is-pr-frozen.ts index af5a957af8ae..d8c80708fc71 100644 --- a/scripts/release/is-pr-frozen.ts +++ b/scripts/release/is-pr-frozen.ts @@ -1,9 +1,9 @@ import { join } from 'node:path'; import { setOutput } from '@actions/core'; -import chalk from 'chalk'; import { program } from 'commander'; import { readJson } from 'fs-extra'; +import picocolors from 'picocolors'; import { esMain } from '../utils/esmain'; import { getPullInfoFromCommit } from './utils/get-github-info'; @@ -39,7 +39,7 @@ const getRepo = async (verbose?: boolean): Promise => { const pushUrl = originRemote.refs.push; const repo = pushUrl.replace(/\.git$/, '').replace(/.*:(\/\/github\.com\/)*/, ''); if (verbose) { - console.log(`📦 Extracted repo: ${chalk.blue(repo)}`); + console.log(`📦 Extracted repo: ${picocolors.blue(repo)}`); } return repo; }; @@ -50,7 +50,7 @@ export const run = async (options: unknown) => { const version = await getCurrentVersion(); const branch = `version-${patch ? 'patch' : 'non-patch'}-from-${version}`; - console.log(`💬 Determining if pull request from branch '${chalk.blue(branch)}' is frozen`); + console.log(`💬 Determining if pull request from branch '${picocolors.blue(branch)}' is frozen`); console.log(`⬇️ Fetching remote 'origin/${branch}'...`); try { diff --git a/scripts/release/is-prerelease.ts b/scripts/release/is-prerelease.ts index d92f17279b82..65b2ddf0ddc7 100644 --- a/scripts/release/is-prerelease.ts +++ b/scripts/release/is-prerelease.ts @@ -1,6 +1,6 @@ import { setOutput } from '@actions/core'; -import chalk from 'chalk'; import { program } from 'commander'; +import picocolors from 'picocolors'; import semver from 'semver'; import { esMain } from '../utils/esmain'; @@ -17,10 +17,10 @@ program export const isPrerelease = async (args: { version?: string; verbose?: boolean }) => { if (args.verbose) { if (args.version) { - console.log(`📦 Checking if version ${chalk.blue(args.version)} is a prerelease`); + console.log(`📦 Checking if version ${picocolors.blue(args.version)} is a prerelease`); } else { console.log( - `📦 Checking if current version in ${chalk.blue('code/package.json')} is a prerelease` + `📦 Checking if current version in ${picocolors.blue('code/package.json')} is a prerelease` ); } } @@ -31,8 +31,8 @@ export const isPrerelease = async (args: { version?: string; verbose?: boolean } setOutput('prerelease', result); } console.log( - `📦 Version ${chalk.blue(version)} ${ - result ? chalk.green('IS') : chalk.red('IS NOT') + `📦 Version ${picocolors.blue(version)} ${ + result ? picocolors.green('IS') : picocolors.red('IS NOT') } a prerelease` ); diff --git a/scripts/release/is-version-published.ts b/scripts/release/is-version-published.ts index 6af757eb654c..a6a6891b2124 100644 --- a/scripts/release/is-version-published.ts +++ b/scripts/release/is-version-published.ts @@ -1,6 +1,6 @@ import { setOutput } from '@actions/core'; -import chalk from 'chalk'; import { program } from 'commander'; +import picocolors from 'picocolors'; import { esMain } from '../utils/esmain'; import { getCurrentVersion } from './get-current-version'; @@ -19,12 +19,14 @@ const isVersionPublished = async ({ version: string; verbose?: boolean; }) => { - const prettyPackage = `${chalk.blue(packageName)}@${chalk.green(version)}`; + const prettyPackage = `${picocolors.blue(packageName)}@${picocolors.green(version)}`; console.log(`⛅ Checking if ${prettyPackage} is published...`); if (verbose) { console.log(`Fetching from npm:`); - console.log(`https://registry.npmjs.org/${chalk.blue(packageName)}/${chalk.green(version)}`); + console.log( + `https://registry.npmjs.org/${picocolors.blue(packageName)}/${picocolors.green(version)}` + ); } const response = await fetch(`https://registry.npmjs.org/${packageName}/${version}`); if (response.status === 404) { diff --git a/scripts/release/pick-patches.ts b/scripts/release/pick-patches.ts index 824f8c6d0cd9..33a94a332d12 100644 --- a/scripts/release/pick-patches.ts +++ b/scripts/release/pick-patches.ts @@ -1,7 +1,7 @@ import { setOutput } from '@actions/core'; -import chalk from 'chalk'; import { program } from 'commander'; import ora from 'ora'; +import picocolors from 'picocolors'; import invariant from 'tiny-invariant'; import { esMain } from '../utils/esmain'; @@ -25,7 +25,7 @@ interface PR { } function formatPR(pr: PR): string { - return `https://github.com/${OWNER}/${REPO}/pull/${pr.number} "${pr.title}" ${chalk.yellow( + return `https://github.com/${OWNER}/${REPO}/pull/${pr.number} "${pr.title}" ${picocolors.yellow( pr.mergeCommit )}`; } @@ -71,7 +71,7 @@ export const run = async (_: unknown) => { } failedCherryPicks.push(pr.mergeCommit); prSpinner.info( - `This PR can be picked manually with: ${chalk.grey( + `This PR can be picked manually with: ${picocolors.grey( `git cherry-pick -m1 -x ${pr.mergeCommit}` )}` ); diff --git a/scripts/release/publish.ts b/scripts/release/publish.ts index 65347010181d..83839dd4a003 100644 --- a/scripts/release/publish.ts +++ b/scripts/release/publish.ts @@ -1,10 +1,10 @@ import { join } from 'node:path'; -import chalk from 'chalk'; import { program } from 'commander'; import { execaCommand } from 'execa'; import { readJson } from 'fs-extra'; import pRetry from 'p-retry'; +import picocolors from 'picocolors'; import semver from 'semver'; import dedent from 'ts-dedent'; import { z } from 'zod'; @@ -51,7 +51,7 @@ const getCurrentVersion = async (verbose?: boolean) => { console.log(`📐 Reading current version of Storybook...`); } const { version } = await readJson(CODE_PACKAGE_JSON_PATH); - console.log(`📐 Current version of Storybook is ${chalk.green(version)}`); + console.log(`📐 Current version of Storybook is ${picocolors.green(version)}`); return version; }; @@ -64,13 +64,13 @@ const isCurrentVersionPublished = async ({ currentVersion: string; verbose?: boolean; }) => { - const prettyPackage = `${chalk.blue(packageName)}@${chalk.green(currentVersion)}`; + const prettyPackage = `${picocolors.blue(packageName)}@${picocolors.green(currentVersion)}`; console.log(`⛅ Checking if ${prettyPackage} is published...`); if (verbose) { console.log(`Fetching from npm:`); console.log( - `https://registry.npmjs.org/${chalk.blue(packageName)}/${chalk.green(currentVersion)}` + `https://registry.npmjs.org/${picocolors.blue(packageName)}/${picocolors.green(currentVersion)}` ); } const response = await fetch(`https://registry.npmjs.org/${packageName}/${currentVersion}`); @@ -133,7 +133,7 @@ const publishAllPackages = async ({ } if (dryRun) { console.log(`📦 Dry run, skipping publish. Would have executed: - ${chalk.blue(command)}`); + ${picocolors.blue(command)}`); return; } @@ -155,7 +155,7 @@ const publishAllPackages = async ({ retries: 4, onFailedAttempt: (error) => console.log( - chalk.yellow( + picocolors.yellow( dedent`❗One or more packages failed to publish, retrying... This was attempt number ${error.attemptNumber}, there are ${error.retriesLeft} retries left. 🤞` ) @@ -180,15 +180,15 @@ export const run = async (options: unknown) => { }); if (isAlreadyPublished) { throw new Error( - `⛔ Current version (${chalk.green(currentVersion)}) is already published, aborting.` + `⛔ Current version (${picocolors.green(currentVersion)}) is already published, aborting.` ); } await buildAllPackages(); await publishAllPackages({ tag, verbose, dryRun }); console.log( - `✅ Published all packages with version ${chalk.green(currentVersion)}${ - tag ? ` at tag ${chalk.blue(tag)}` : '' + `✅ Published all packages with version ${picocolors.green(currentVersion)}${ + tag ? ` at tag ${picocolors.blue(tag)}` : '' }` ); }; diff --git a/scripts/release/unreleased-changes-exists.ts b/scripts/release/unreleased-changes-exists.ts index 217bfa033a47..ad869461107b 100644 --- a/scripts/release/unreleased-changes-exists.ts +++ b/scripts/release/unreleased-changes-exists.ts @@ -1,7 +1,7 @@ import { setOutput } from '@actions/core'; -import chalk from 'chalk'; import { program } from 'commander'; import { intersection } from 'es-toolkit'; +import picocolors from 'picocolors'; import { z } from 'zod'; import { esMain } from '../utils/esmain'; @@ -68,11 +68,11 @@ export const run = async ( } if (hasChangesToRelease) { console.log( - `${chalk.green('🦋 The following changes are releasable')}: -${chalk.blue(changesToRelease.map(({ title, pull }) => ` #${pull}: ${title}`).join('\n'))}` + `${picocolors.green('🦋 The following changes are releasable')}: +${picocolors.blue(changesToRelease.map(({ title, pull }) => ` #${pull}: ${title}`).join('\n'))}` ); } else { - console.log(chalk.red('🫙 No changes to release!')); + console.log(picocolors.red('🫙 No changes to release!')); } return { changesToRelease, hasChangesToRelease }; diff --git a/scripts/release/utils/get-changes.ts b/scripts/release/utils/get-changes.ts index 5588a10eba52..f7f255ddd451 100644 --- a/scripts/release/utils/get-changes.ts +++ b/scripts/release/utils/get-changes.ts @@ -1,4 +1,4 @@ -import chalk from 'chalk'; +import picocolors from 'picocolors'; import semver from 'semver'; import type { PullRequestInfo } from './get-github-info'; @@ -27,13 +27,15 @@ export const LABELS_BY_IMPORTANCE = { const getCommitAt = async (id: string, verbose?: boolean) => { if (!semver.valid(id)) { - console.log(`🔍 ${chalk.red(id)} is not a valid semver string, assuming it is a commit hash`); + console.log( + `🔍 ${picocolors.red(id)} is not a valid semver string, assuming it is a commit hash` + ); return id; } const version = id.startsWith('v') ? id : `v${id}`; const commitSha = (await git.raw(['rev-list', '-n', '1', version])).split('\n')[0]; if (verbose) { - console.log(`🔍 Commit at tag ${chalk.green(version)}: ${chalk.blue(commitSha)}`); + console.log(`🔍 Commit at tag ${picocolors.green(version)}: ${picocolors.blue(commitSha)}`); } return commitSha; }; @@ -50,12 +52,12 @@ export const getFromCommit = async (from?: string | undefined, verbose?: boolean } actualFrom = latest; if (verbose) { - console.log(`🔍 No 'from' specified, found latest tag: ${chalk.blue(latest)}`); + console.log(`🔍 No 'from' specified, found latest tag: ${picocolors.blue(latest)}`); } } const commit = await getCommitAt(actualFrom!, verbose); if (verbose) { - console.log(`🔍 Found 'from' commit: ${chalk.blue(commit)}`); + console.log(`🔍 Found 'from' commit: ${picocolors.blue(commit)}`); } return commit; }; @@ -64,14 +66,14 @@ export const getToCommit = async (to?: string | undefined, verbose?: boolean) => if (!to) { const head = await git.revparse('HEAD'); if (verbose) { - console.log(`🔍 No 'to' specified, HEAD is at commit: ${chalk.blue(head)}`); + console.log(`🔍 No 'to' specified, HEAD is at commit: ${picocolors.blue(head)}`); } return head; } const commit = await getCommitAt(to, verbose); if (verbose) { - console.log(`🔍 Found 'to' commit: ${chalk.blue(commit)}`); + console.log(`🔍 Found 'to' commit: ${picocolors.blue(commit)}`); } return commit; }; @@ -88,9 +90,9 @@ export const getAllCommitsBetween = async ({ const logResult = await git.log({ from, to, '--first-parent': null }); if (verbose) { console.log( - `🔍 Found ${chalk.blue(logResult.total)} commits between ${chalk.green( + `🔍 Found ${picocolors.blue(logResult.total)} commits between ${picocolors.green( `${from}` - )} and ${chalk.green(`${to}`)}:` + )} and ${picocolors.green(`${to}`)}:` ); console.dir(logResult.all, { depth: null, colors: true }); } @@ -110,7 +112,7 @@ export const getRepo = async (verbose?: boolean): Promise => { const pushUrl = originRemote.refs.push; const repo = pushUrl.replace(/\.git$/, '').replace(/.*:(\/\/github\.com\/)*/, ''); if (verbose) { - console.log(`📦 Extracted repo: ${chalk.blue(repo)}`); + console.log(`📦 Extracted repo: ${picocolors.blue(repo)}`); } return repo; }; @@ -234,7 +236,7 @@ export const getChanges = async ({ unpickedPatches?: boolean; verbose?: boolean; }) => { - console.log(`💬 Getting changes for ${chalk.blue(version)}`); + console.log(`💬 Getting changes for ${picocolors.blue(version)}`); let commits; if (unpickedPatches) { diff --git a/scripts/release/version.ts b/scripts/release/version.ts index 422de3501bc0..34019fd561a2 100644 --- a/scripts/release/version.ts +++ b/scripts/release/version.ts @@ -1,10 +1,10 @@ import { join } from 'node:path'; import { setOutput } from '@actions/core'; -import chalk from 'chalk'; import { program } from 'commander'; import { execaCommand } from 'execa'; import { readFile, readJson, writeFile, writeJson } from 'fs-extra'; +import picocolors from 'picocolors'; import semver from 'semver'; import { z } from 'zod'; @@ -116,14 +116,14 @@ const getCurrentVersion = async () => { }; const bumpCodeVersion = async (nextVersion: string) => { - console.log(`🤜 Bumping version of ${chalk.cyan('code')}'s package.json...`); + console.log(`🤜 Bumping version of ${picocolors.cyan('code')}'s package.json...`); const codePkgJson = await readJson(CODE_PACKAGE_JSON_PATH); codePkgJson.version = nextVersion; await writeJson(CODE_PACKAGE_JSON_PATH, codePkgJson, { spaces: 2 }); - console.log(`✅ Bumped version of ${chalk.cyan('code')}'s package.json`); + console.log(`✅ Bumped version of ${picocolors.cyan('code')}'s package.json`); }; const bumpVersionSources = async (currentVersion: string, nextVersion: string) => { @@ -131,7 +131,7 @@ const bumpVersionSources = async (currentVersion: string, nextVersion: string) = join(CODE_DIR_PATH, 'core', 'src', 'manager-api', 'version.ts'), join(CODE_DIR_PATH, 'core', 'src', 'common', 'versions.ts'), ]; - console.log(`🤜 Bumping versions in...:\n ${chalk.cyan(filesToUpdate.join('\n '))}`); + console.log(`🤜 Bumping versions in...:\n ${picocolors.cyan(filesToUpdate.join('\n '))}`); await Promise.all( filesToUpdate.map(async (filename) => { @@ -141,7 +141,7 @@ const bumpVersionSources = async (currentVersion: string, nextVersion: string) = }) ); - console.log(`✅ Bumped versions in:\n ${chalk.cyan(filesToUpdate.join('\n '))}`); + console.log(`✅ Bumped versions in:\n ${picocolors.cyan(filesToUpdate.join('\n '))}`); }; const bumpAllPackageJsons = async ({ @@ -154,7 +154,7 @@ const bumpAllPackageJsons = async ({ verbose?: boolean; }) => { console.log( - `🤜 Bumping versions and dependencies in ${chalk.cyan( + `🤜 Bumping versions and dependencies in ${picocolors.cyan( `all ${packages.length} package.json` )}'s...` ); @@ -171,7 +171,7 @@ const bumpAllPackageJsons = async ({ packageJson.version = nextVersion; if (verbose) { console.log( - ` Bumping ${chalk.blue(pkg.name)}'s version to ${chalk.yellow(nextVersion)}` + ` Bumping ${picocolors.blue(pkg.name)}'s version to ${picocolors.yellow(nextVersion)}` ); } await writeJson(packageJsonPath, packageJson, { spaces: 2 }); @@ -181,15 +181,15 @@ const bumpAllPackageJsons = async ({ const bumpDeferred = async (nextVersion: string) => { console.log( - `⏳ Setting a ${chalk.cyan('deferred')} version bump with ${chalk.blue( + `⏳ Setting a ${picocolors.cyan('deferred')} version bump with ${picocolors.blue( 'code/package.json#deferredNextVersion' - )} = ${chalk.yellow(nextVersion)}...` + )} = ${picocolors.yellow(nextVersion)}...` ); const codePkgJson = await readJson(CODE_PACKAGE_JSON_PATH); if (codePkgJson.deferredNextVersion) { console.warn( - `❗ A "deferredNextVersion" property already exists with the value of ${chalk.cyan( + `❗ A "deferredNextVersion" property already exists with the value of ${picocolors.cyan( codePkgJson.deferredNextVersion )}. This will be overwritten and ignored.` ); @@ -198,12 +198,12 @@ const bumpDeferred = async (nextVersion: string) => { codePkgJson.deferredNextVersion = nextVersion; await writeJson(CODE_PACKAGE_JSON_PATH, codePkgJson, { spaces: 2 }); - console.log(`✅ Set a ${chalk.cyan('deferred')} version bump. Not bumping any packages.`); + console.log(`✅ Set a ${picocolors.cyan('deferred')} version bump. Not bumping any packages.`); }; const applyDeferredVersionBump = async () => { console.log( - `⏩ Applying previously deferred version bump set at ${chalk.blue( + `⏩ Applying previously deferred version bump set at ${picocolors.blue( 'code/package.json#deferredNextVersion' )}...` ); @@ -221,9 +221,9 @@ const applyDeferredVersionBump = async () => { await writeJson(CODE_PACKAGE_JSON_PATH, codePkgJson, { spaces: 2 }); console.log( - `✅ Extracted and removed deferred version ${chalk.green( + `✅ Extracted and removed deferred version ${picocolors.green( deferredNextVersion - )} from ${chalk.blue('code/package.json#deferredNextVersion')}` + )} from ${picocolors.blue('code/package.json#deferredNextVersion')}` ); return deferredNextVersion; @@ -240,11 +240,11 @@ export const run = async (options: unknown) => { const [packages, currentVersion] = await Promise.all([getWorkspaces(), getCurrentVersion()]); console.log( - `📦 found ${packages.length} storybook packages at version ${chalk.red(currentVersion)}` + `📦 found ${packages.length} storybook packages at version ${picocolors.red(currentVersion)}` ); if (verbose) { const formattedPackages = packages.map( - (pkg) => `${chalk.green(pkg.name.padEnd(60))}: ${chalk.cyan(pkg.location)}` + (pkg) => `${picocolors.green(pkg.name.padEnd(60))}: ${picocolors.cyan(pkg.location)}` ); console.log(`📦 Packages: ${formattedPackages.join('\n ')}`); @@ -255,42 +255,46 @@ export const run = async (options: unknown) => { if ('apply' in options && options.apply) { nextVersion = await applyDeferredVersionBump(); } else if ('exact' in options && options.exact) { - console.log(`📈 Exact version selected: ${chalk.green(options.exact)}`); + console.log(`📈 Exact version selected: ${picocolors.green(options.exact)}`); nextVersion = options.exact; } else { const { releaseType, preId } = options as BumpOptions; - console.log(`📈 Release type selected: ${chalk.green(releaseType)}`); + console.log(`📈 Release type selected: ${picocolors.green(releaseType)}`); if (preId) { - console.log(`🆔 Version prerelease identifier selected: ${chalk.yellow(preId)}`); + console.log(`🆔 Version prerelease identifier selected: ${picocolors.yellow(preId)}`); } nextVersion = semver.inc(currentVersion, releaseType, preId); console.log( - `⏭ Bumping version ${chalk.blue(currentVersion)} with release type ${chalk.green( + `⏭ Bumping version ${picocolors.blue(currentVersion)} with release type ${picocolors.green( releaseType )}${ - preId ? ` and ${chalk.yellow(preId)}` : '' - } results in version: ${chalk.bgGreenBright.bold(nextVersion)}` + preId ? ` and ${picocolors.yellow(preId)}` : '' + } results in version: ${picocolors.bgGreenBright.bold(nextVersion)}` ); } if ('deferred' in options && options.deferred) { await bumpDeferred(nextVersion); } else { - console.log(`⏭ Bumping all packages to ${chalk.blue(nextVersion)}...`); + console.log(`⏭ Bumping all packages to ${picocolors.blue(nextVersion)}...`); await bumpCodeVersion(nextVersion); await bumpVersionSources(currentVersion, nextVersion); await bumpAllPackageJsons({ packages, nextVersion, verbose }); - console.log(`⬆️ Updating lock file with ${chalk.blue('yarn install --mode=update-lockfile')}`); + console.log( + `⬆️ Updating lock file with ${picocolors.blue('yarn install --mode=update-lockfile')}` + ); await execaCommand(`yarn install --mode=update-lockfile`, { cwd: join(CODE_DIR_PATH), stdio: verbose ? 'inherit' : undefined, cleanup: true, }); - console.log(`✅ Updated lock file with ${chalk.blue('yarn install --mode=update-lockfile')}`); + console.log( + `✅ Updated lock file with ${picocolors.blue('yarn install --mode=update-lockfile')}` + ); } if (process.env.GITHUB_ACTIONS === 'true') { diff --git a/scripts/release/write-changelog.ts b/scripts/release/write-changelog.ts index 8f927b3c6434..59e0d3273958 100644 --- a/scripts/release/write-changelog.ts +++ b/scripts/release/write-changelog.ts @@ -1,8 +1,8 @@ import { join } from 'node:path'; -import chalk from 'chalk'; import { program } from 'commander'; import { readFile, writeFile, writeJson } from 'fs-extra'; +import picocolors from 'picocolors'; import semver from 'semver'; import { z } from 'zod'; @@ -47,7 +47,7 @@ const validateOptions = (args: unknown[], options: { [key: string]: any }): opti optionsSchema.parse(options); if (args.length !== 1 || !semver.valid(args[0] as string)) { console.error( - `🚨 Invalid arguments, expected a single argument with the version to generate changelog for, eg. ${chalk.green( + `🚨 Invalid arguments, expected a single argument with the version to generate changelog for, eg. ${picocolors.green( '7.1.0-beta.8' )}` ); @@ -70,7 +70,7 @@ const writeToChangelogFile = async ({ const changelogPath = join(__dirname, '..', '..', changelogFilename); if (verbose) { - console.log(`📝 Writing changelog to ${chalk.blue(changelogPath)}`); + console.log(`📝 Writing changelog to ${picocolors.blue(changelogPath)}`); } const currentChangelog = await readFile(changelogPath, 'utf-8'); @@ -93,7 +93,7 @@ const writeToDocsVersionFile = async ({ const filepath = join(__dirname, '..', '..', 'docs', 'versions', filename); if (verbose) { - console.log(`📝 Writing changelog to ${chalk.blue(filepath)}`); + console.log(`📝 Writing changelog to ${picocolors.blue(filepath)}`); } const textWithoutHeading = changelogText.split('\n').slice(2).join('\n').replaceAll('"', '\\"'); @@ -116,9 +116,9 @@ export const run = async (args: unknown[], options: unknown) => { const version = args[0] as string; console.log( - `💬 Generating changelog for ${chalk.blue(version)} between ${chalk.green( + `💬 Generating changelog for ${picocolors.blue(version)} between ${picocolors.green( from || 'latest' - )} and ${chalk.green(to || 'HEAD')}` + )} and ${picocolors.green(to || 'HEAD')}` ); const { changelogText } = await getChanges({ version, from, to, unpickedPatches, verbose }); diff --git a/scripts/run-registry.ts b/scripts/run-registry.ts index 4f837b952794..825788b24f51 100755 --- a/scripts/run-registry.ts +++ b/scripts/run-registry.ts @@ -4,11 +4,11 @@ import http from 'node:http'; import type { Server } from 'node:http'; import { join, resolve as resolvePath } from 'node:path'; -import chalk from 'chalk'; import { program } from 'commander'; import { execa, execaSync } from 'execa'; import { pathExists, readJSON, remove } from 'fs-extra'; import pLimit from 'p-limit'; +import picocolors from 'picocolors'; import { parseConfigFile, runServer } from 'verdaccio'; import { maxConcurrentTasks } from './utils/concurrency'; @@ -197,7 +197,9 @@ const run = async () => { } ); - logger.log(`📦 found ${packages.length} storybook packages at version ${chalk.blue(version)}`); + logger.log( + `📦 found ${packages.length} storybook packages at version ${picocolors.blue(version)}` + ); if (opts.publish) { await publish(packages, 'http://localhost:6002'); diff --git a/scripts/utils/exec.ts b/scripts/utils/exec.ts index 2998e4877acb..c12c9eea2f9f 100644 --- a/scripts/utils/exec.ts +++ b/scripts/utils/exec.ts @@ -1,6 +1,6 @@ -import chalk from 'chalk'; import type { ExecaChildProcess, Options } from 'execa'; import { execa } from 'execa'; +import picocolors from 'picocolors'; const logger = console; @@ -50,7 +50,7 @@ export const exec = async ( } } catch (err) { if (!(typeof err === 'object' && 'killed' in err && err.killed)) { - logger.error(chalk.red(`An error occurred while executing: \`${command}\``)); + logger.error(picocolors.red(`An error occurred while executing: \`${command}\``)); logger.log(`${errorMessage}\n`); } diff --git a/scripts/utils/options.ts b/scripts/utils/options.ts index 6bf48e804744..f3caf64e28b2 100644 --- a/scripts/utils/options.ts +++ b/scripts/utils/options.ts @@ -1,8 +1,7 @@ /** Use commander and prompts to gather a list of options for a script */ -import chalk from 'chalk'; import { type Command, type Option as CommanderOption, program } from 'commander'; -// eslint-disable-next-line import/extensions import { kebabCase } from 'es-toolkit/compat'; +import picocolors from 'picocolors'; import prompts from 'prompts'; import type { Falsy, PrevCaller, PromptObject, PromptType } from 'prompts'; import { dedent } from 'ts-dedent'; @@ -131,9 +130,9 @@ export function getOptions( const checkStringValue = (raw: string) => { if (option.values && !option.values.includes(raw)) { - const possibleOptions = chalk.cyan(option.values.join('\n')); + const possibleOptions = picocolors.cyan(option.values.join('\n')); throw new Error( - dedent`Unexpected value '${chalk.yellow(raw)}' for option '${chalk.magenta(key)}'. + dedent`Unexpected value '${picocolors.yellow(raw)}' for option '${picocolors.magenta(key)}'. These are the possible options: ${possibleOptions}\n\n` diff --git a/scripts/yarn.lock b/scripts/yarn.lock index a0e46537c940..8668a1a7ac3e 100644 --- a/scripts/yarn.lock +++ b/scripts/yarn.lock @@ -1560,7 +1560,6 @@ __metadata: "@vitest/coverage-v8": "npm:^2.0.5" ansi-regex: "npm:^6.0.1" browser-assert: "npm:^1.2.1" - chalk: "npm:^4.1.0" chromatic: "npm:^11.5.5" codecov: "npm:^3.8.1" commander: "npm:^12.1.0" @@ -1603,11 +1602,13 @@ __metadata: knip: "npm:^5.30.1" lint-staged: "npm:^15.2.7" memoizerific: "npm:^1.11.3" + minimatch: "npm:^10.0.1" node-gyp: "npm:^9.3.1" nx: "npm:18.0.6" ora: "npm:^5.4.1" p-limit: "npm:^3.1.0" p-retry: "npm:^5.1.2" + picocolors: "npm:^1.1.0" playwright: "npm:1.46.0" playwright-core: "npm:1.46.0" prettier: "npm:^3.3.2" @@ -7342,14 +7343,7 @@ __metadata: languageName: node 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, ignore@npm:^5.3.1": - version: 5.3.1 - resolution: "ignore@npm:5.3.1" - checksum: 10c0/703f7f45ffb2a27fb2c5a8db0c32e7dee66b33a225d28e8db4e1be6474795f606686a6e3bcc50e1aa12f2042db4c9d4a7d60af3250511de74620fbed052ea4cd - languageName: node - linkType: hard - -"ignore@npm:^5.1.8": +"ignore@npm:^5.0.0, ignore@npm:^5.0.4, ignore@npm:^5.0.5, ignore@npm:^5.1.1, ignore@npm:^5.1.8, ignore@npm:^5.2.0, ignore@npm:^5.2.4, ignore@npm:^5.3.1": version: 5.3.2 resolution: "ignore@npm:5.3.2" checksum: 10c0/f9f652c957983634ded1e7f02da3b559a0d4cc210fca3792cb67f1b153623c9c42efdc1c4121af171e295444459fc4a9201101fb041b1104a3c000bccb188337 @@ -9673,6 +9667,15 @@ __metadata: languageName: node linkType: hard +"minimatch@npm:^10.0.1": + version: 10.0.1 + resolution: "minimatch@npm:10.0.1" + dependencies: + brace-expansion: "npm:^2.0.1" + checksum: 10c0/e6c29a81fe83e1877ad51348306be2e8aeca18c88fdee7a99df44322314279e15799e41d7cb274e4e8bb0b451a3bc622d6182e157dfa1717d6cda75e9cd8cd5d + languageName: node + linkType: hard + "minimatch@npm:^5.0.1": version: 5.1.6 resolution: "minimatch@npm:5.1.6" @@ -10759,10 +10762,10 @@ __metadata: languageName: node linkType: hard -"picocolors@npm:^1.0.0": - version: 1.0.0 - resolution: "picocolors@npm:1.0.0" - checksum: 10c0/20a5b249e331c14479d94ec6817a182fd7a5680debae82705747b2db7ec50009a5f6648d0621c561b0572703f84dbef0858abcbd5856d3c5511426afcb1961f7 +"picocolors@npm:^1.0.0, picocolors@npm:^1.1.0": + version: 1.1.0 + resolution: "picocolors@npm:1.1.0" + checksum: 10c0/86946f6032148801ef09c051c6fb13b5cf942eaf147e30ea79edb91dd32d700934edebe782a1078ff859fb2b816792e97ef4dab03d7f0b804f6b01a0df35e023 languageName: node linkType: hard From dfcf47f9e49ac3c929c7f5274bf8d82e98317e04 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 1 Oct 2024 09:54:32 +0200 Subject: [PATCH 33/39] complete chalk removal --- code/core/package.json | 1 - .../scripts/helpers/generateTypesFiles.ts | 4 +- code/core/scripts/prep.ts | 15 +- code/yarn.lock | 1106 ++--------------- scripts/build-package.ts | 10 +- scripts/check-package.ts | 10 +- scripts/dangerfile.ts | 2 +- scripts/event-log-checker.ts | 6 +- scripts/get-template.ts | 6 +- scripts/knip.config.ts | 5 +- scripts/package.json | 3 +- scripts/prepare/tools.ts | 4 +- scripts/release/cancel-preparation-runs.ts | 13 +- scripts/release/generate-pr-description.ts | 8 +- scripts/release/get-changelog-from-file.ts | 6 +- scripts/release/get-current-version.ts | 4 +- scripts/release/get-version-changelog.ts | 4 +- scripts/release/is-pr-frozen.ts | 6 +- scripts/release/is-prerelease.ts | 10 +- scripts/release/is-version-published.ts | 8 +- scripts/release/pick-patches.ts | 6 +- scripts/release/publish.ts | 18 +- scripts/release/unreleased-changes-exists.ts | 8 +- scripts/release/utils/get-changes.ts | 24 +- scripts/release/version.ts | 54 +- scripts/release/write-changelog.ts | 12 +- scripts/run-registry.ts | 6 +- scripts/utils/exec.ts | 4 +- scripts/utils/options.ts | 7 +- scripts/yarn.lock | 29 +- 30 files changed, 229 insertions(+), 1170 deletions(-) diff --git a/code/core/package.json b/code/core/package.json index 79285d57a217..2fd8d9dc72eb 100644 --- a/code/core/package.json +++ b/code/core/package.json @@ -344,7 +344,6 @@ "browser-dtector": "^3.4.0", "camelcase": "^8.0.0", "chai": "^4.4.1", - "chalk": "^5.3.0", "cli-table3": "^0.6.1", "commander": "^12.1.0", "comment-parser": "^1.4.1", diff --git a/code/core/scripts/helpers/generateTypesFiles.ts b/code/core/scripts/helpers/generateTypesFiles.ts index a657c6fbd8a7..fd7a7eff789d 100644 --- a/code/core/scripts/helpers/generateTypesFiles.ts +++ b/code/core/scripts/helpers/generateTypesFiles.ts @@ -1,7 +1,7 @@ import { join, relative } from 'node:path'; import { spawn } from '../../../../scripts/prepare/tools'; -import { chalk, limit, process } from '../../../../scripts/prepare/tools'; +import { limit, picocolors, process } from '../../../../scripts/prepare/tools'; import type { getEntries } from '../entries'; export async function generateTypesFiles( @@ -69,7 +69,7 @@ export async function generateTypesFiles( console.log(index, fileName); process.exit(dtsProcess.exitCode || 1); } else { - console.log('Generated types for', chalk.cyan(relative(cwd, dtsEntries[index]))); + console.log('Generated types for', picocolors.cyan(relative(cwd, dtsEntries[index]))); } }); }) diff --git a/code/core/scripts/prep.ts b/code/core/scripts/prep.ts index df5d79f708ec..f8726e79df48 100644 --- a/code/core/scripts/prep.ts +++ b/code/core/scripts/prep.ts @@ -6,13 +6,13 @@ import { dirname, join } from 'node:path'; import type { Metafile } from 'esbuild'; import { - chalk, dedent, esbuild, globalExternals, measure, merge, nodeInternals, + picocolors, prettyTime, process, } from '../../../scripts/prepare/tools'; @@ -77,12 +77,15 @@ async function run() { types, ]); - console.log('Files generated in', chalk.yellow(prettyTime(filesTime))); - console.log('Package.json generated in', chalk.yellow(prettyTime(packageJsonTime))); - console.log(isWatch ? 'Watcher started in' : 'Bundled in', chalk.yellow(prettyTime(distTime))); + console.log('Files generated in', picocolors.yellow(prettyTime(filesTime))); + console.log('Package.json generated in', picocolors.yellow(prettyTime(packageJsonTime))); + console.log( + isWatch ? 'Watcher started in' : 'Bundled in', + picocolors.yellow(prettyTime(distTime)) + ); console.log( isOptimized ? 'Generated types in' : 'Generated type mappers in', - chalk.yellow(prettyTime(typesTime)) + picocolors.yellow(prettyTime(typesTime)) ); async function generateDistFiles() { @@ -313,7 +316,7 @@ async function run() { // show a log message when a file is compiled watch(join(cwd, 'dist'), { recursive: true }, (event, filename) => { - console.log(`compiled ${chalk.cyan(filename)}`); + console.log(`compiled ${picocolors.cyan(filename)}`); }); } else { // repo root/bench/esbuild-metafiles/core diff --git a/code/yarn.lock b/code/yarn.lock index f26330834d9b..47ab3731f211 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -377,31 +377,7 @@ __metadata: languageName: node linkType: hard -"@babel/code-frame@npm:^7.24.1, @babel/code-frame@npm:^7.24.2": - version: 7.24.2 - resolution: "@babel/code-frame@npm:7.24.2" - dependencies: - "@babel/highlight": "npm:^7.24.2" - picocolors: "npm:^1.0.0" - checksum: 10c0/d1d4cba89475ab6aab7a88242e1fd73b15ecb9f30c109b69752956434d10a26a52cbd37727c4eca104b6d45227bd1dfce39a6a6f4a14c9b2f07f871e968cf406 - languageName: node - linkType: hard - -"@babel/compat-data@npm:^7.22.6, @babel/compat-data@npm:^7.23.5": - version: 7.24.7 - resolution: "@babel/compat-data@npm:7.24.7" - checksum: 10c0/dcd93a5632b04536498fbe2be5af1057f635fd7f7090483d8e797878559037e5130b26862ceb359acbae93ed27e076d395ddb4663db6b28a665756ffd02d324f - languageName: node - linkType: hard - -"@babel/compat-data@npm:^7.24.4": - version: 7.24.4 - resolution: "@babel/compat-data@npm:7.24.4" - checksum: 10c0/9cd8a9cd28a5ca6db5d0e27417d609f95a8762b655e8c9c97fd2de08997043ae99f0139007083c5e607601c6122e8432c85fe391731b19bf26ad458fa0c60dd3 - languageName: node - linkType: hard - -"@babel/compat-data@npm:^7.25.2": +"@babel/compat-data@npm:^7.22.6, @babel/compat-data@npm:^7.23.5, @babel/compat-data@npm:^7.24.4, @babel/compat-data@npm:^7.25.2": version: 7.25.2 resolution: "@babel/compat-data@npm:7.25.2" checksum: 10c0/5bf1f14d6e5f0d37c19543e99209ff4a94bb97915e1ce01e5334a144aa08cd56b6e62ece8135dac77e126723d63d4d4b96fc603a12c43b88c28f4b5e070270c5 @@ -454,30 +430,7 @@ __metadata: languageName: node linkType: hard -"@babel/core@npm:^7.12.0, @babel/core@npm:^7.12.3, @babel/core@npm:^7.13.16, @babel/core@npm:^7.18.9, @babel/core@npm:^7.20.12, @babel/core@npm:^7.23.0, @babel/core@npm:^7.23.2, @babel/core@npm:^7.24.4, @babel/core@npm:^7.3.4, @babel/core@npm:^7.7.5": - version: 7.24.4 - resolution: "@babel/core@npm:7.24.4" - dependencies: - "@ampproject/remapping": "npm:^2.2.0" - "@babel/code-frame": "npm:^7.24.2" - "@babel/generator": "npm:^7.24.4" - "@babel/helper-compilation-targets": "npm:^7.23.6" - "@babel/helper-module-transforms": "npm:^7.23.3" - "@babel/helpers": "npm:^7.24.4" - "@babel/parser": "npm:^7.24.4" - "@babel/template": "npm:^7.24.0" - "@babel/traverse": "npm:^7.24.1" - "@babel/types": "npm:^7.24.0" - 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: 10c0/fc136966583e64d6f84f4a676368de6ab4583aa87f867186068655b30ef67f21f8e65a88c6d446a7efd219ad7ffb9185c82e8a90183ee033f6f47b5026641e16 - languageName: node - linkType: hard - -"@babel/core@npm:^7.23.9": +"@babel/core@npm:^7.12.0, @babel/core@npm:^7.12.3, @babel/core@npm:^7.13.16, @babel/core@npm:^7.18.9, @babel/core@npm:^7.20.12, @babel/core@npm:^7.23.0, @babel/core@npm:^7.23.2, @babel/core@npm:^7.23.9, @babel/core@npm:^7.24.4, @babel/core@npm:^7.3.4, @babel/core@npm:^7.7.5": version: 7.25.2 resolution: "@babel/core@npm:7.25.2" dependencies: @@ -523,19 +476,7 @@ __metadata: languageName: node linkType: hard -"@babel/generator@npm:^7.12.11, @babel/generator@npm:^7.23.6, @babel/generator@npm:^7.24.4, @babel/generator@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/generator@npm:7.24.7" - dependencies: - "@babel/types": "npm:^7.24.7" - "@jridgewell/gen-mapping": "npm:^0.3.5" - "@jridgewell/trace-mapping": "npm:^0.3.25" - jsesc: "npm:^2.5.1" - checksum: 10c0/06b1f3350baf527a3309e50ffd7065f7aee04dd06e1e7db794ddfde7fe9d81f28df64edd587173f8f9295496a7ddb74b9a185d4bf4de7bb619e6d4ec45c8fd35 - languageName: node - linkType: hard - -"@babel/generator@npm:^7.23.0, @babel/generator@npm:^7.25.0": +"@babel/generator@npm:^7.12.11, @babel/generator@npm:^7.23.0, @babel/generator@npm:^7.23.6, @babel/generator@npm:^7.24.4, @babel/generator@npm:^7.25.0": version: 7.25.0 resolution: "@babel/generator@npm:7.25.0" dependencies: @@ -547,18 +488,6 @@ __metadata: languageName: node linkType: hard -"@babel/generator@npm:^7.24.1": - version: 7.24.4 - resolution: "@babel/generator@npm:7.24.4" - dependencies: - "@babel/types": "npm:^7.24.0" - "@jridgewell/gen-mapping": "npm:^0.3.5" - "@jridgewell/trace-mapping": "npm:^0.3.25" - jsesc: "npm:^2.5.1" - checksum: 10c0/67a1b2f7cc985aaaa11b01e8ddd4fffa4f285837bc7a209738eb8203aa34bdafeb8507ed75fd883ddbabd641a036ca0a8d984e760f28ad4a9d60bff29d0a60bb - languageName: node - linkType: hard - "@babel/helper-annotate-as-pure@npm:7.22.5": version: 7.22.5 resolution: "@babel/helper-annotate-as-pure@npm:7.22.5" @@ -577,15 +506,6 @@ __metadata: languageName: node linkType: hard -"@babel/helper-builder-binary-assignment-operator-visitor@npm:^7.22.15": - version: 7.22.15 - resolution: "@babel/helper-builder-binary-assignment-operator-visitor@npm:7.22.15" - dependencies: - "@babel/types": "npm:^7.22.15" - checksum: 10c0/2535e3824ca6337f65786bbac98e562f71699f25532cecd196f027d7698b4967a96953d64e36567956658ad1a05ccbdc62d1ba79ee751c79f4f1d2d3ecc2e01c - languageName: node - linkType: hard - "@babel/helper-builder-binary-assignment-operator-visitor@npm:^7.24.7": version: 7.24.7 resolution: "@babel/helper-builder-binary-assignment-operator-visitor@npm:7.24.7" @@ -628,25 +548,6 @@ __metadata: languageName: node linkType: hard -"@babel/helper-create-class-features-plugin@npm:^7.24.1, @babel/helper-create-class-features-plugin@npm:^7.24.4": - version: 7.24.4 - resolution: "@babel/helper-create-class-features-plugin@npm:7.24.4" - dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.22.5" - "@babel/helper-environment-visitor": "npm:^7.22.20" - "@babel/helper-function-name": "npm:^7.23.0" - "@babel/helper-member-expression-to-functions": "npm:^7.23.0" - "@babel/helper-optimise-call-expression": "npm:^7.22.5" - "@babel/helper-replace-supers": "npm:^7.24.1" - "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.22.5" - "@babel/helper-split-export-declaration": "npm:^7.22.6" - semver: "npm:^6.3.1" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10c0/6ebb38375dcd44c79f40008c2de4d023376cf436c135439f15c9c54603c2d6a8ada39b2e07be545da684d9e40b602a0cb0d1670f3877d056deb5f0d786c4bf86 - languageName: node - linkType: hard - "@babel/helper-create-regexp-features-plugin@npm:^7.18.6, @babel/helper-create-regexp-features-plugin@npm:^7.24.7": version: 7.24.7 resolution: "@babel/helper-create-regexp-features-plugin@npm:7.24.7" @@ -660,19 +561,6 @@ __metadata: languageName: node linkType: hard -"@babel/helper-create-regexp-features-plugin@npm:^7.22.15": - version: 7.22.15 - resolution: "@babel/helper-create-regexp-features-plugin@npm:7.22.15" - dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.22.5" - regexpu-core: "npm:^5.3.1" - semver: "npm:^6.3.1" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10c0/8eba4c1b7b94a83e7a82df5c3e504584ff0ba6ab8710a67ecc2c434a7fb841a29c2f5c94d2de51f25446119a1df538fa90b37bd570db22ddd5e7147fe98277c6 - languageName: node - linkType: hard - "@babel/helper-define-polyfill-provider@npm:^0.5.0": version: 0.5.0 resolution: "@babel/helper-define-polyfill-provider@npm:0.5.0" @@ -731,15 +619,6 @@ __metadata: languageName: node linkType: hard -"@babel/helper-member-expression-to-functions@npm:^7.23.0": - version: 7.23.0 - resolution: "@babel/helper-member-expression-to-functions@npm:7.23.0" - dependencies: - "@babel/types": "npm:^7.23.0" - checksum: 10c0/b810daddf093ffd0802f1429052349ed9ea08ef7d0c56da34ffbcdecbdafac86f95bdea2fe30e0e0e629febc7dd41b56cb5eacc10d1a44336d37b755dac31fa4 - languageName: node - linkType: hard - "@babel/helper-member-expression-to-functions@npm:^7.24.7": version: 7.24.7 resolution: "@babel/helper-member-expression-to-functions@npm:7.24.7" @@ -750,7 +629,7 @@ __metadata: languageName: node linkType: hard -"@babel/helper-module-imports@npm:^7.16.7, @babel/helper-module-imports@npm:^7.22.15, @babel/helper-module-imports@npm:^7.24.7, @babel/helper-module-imports@npm:^7.8.3": +"@babel/helper-module-imports@npm:^7.16.7, @babel/helper-module-imports@npm:^7.22.15, @babel/helper-module-imports@npm:^7.24.3, @babel/helper-module-imports@npm:^7.24.7, @babel/helper-module-imports@npm:^7.8.3": version: 7.24.7 resolution: "@babel/helper-module-imports@npm:7.24.7" dependencies: @@ -760,15 +639,6 @@ __metadata: languageName: node linkType: hard -"@babel/helper-module-imports@npm:^7.24.1, @babel/helper-module-imports@npm:^7.24.3": - version: 7.24.3 - resolution: "@babel/helper-module-imports@npm:7.24.3" - dependencies: - "@babel/types": "npm:^7.24.0" - checksum: 10c0/052c188adcd100f5e8b6ff0c9643ddaabc58b6700d3bbbc26804141ad68375a9f97d9d173658d373d31853019e65f62610239e3295cdd58e573bdcb2fded188d - languageName: node - linkType: hard - "@babel/helper-module-transforms@npm:^7.23.3, @babel/helper-module-transforms@npm:^7.24.7, @babel/helper-module-transforms@npm:^7.25.2": version: 7.25.2 resolution: "@babel/helper-module-transforms@npm:7.25.2" @@ -783,15 +653,6 @@ __metadata: languageName: node linkType: hard -"@babel/helper-optimise-call-expression@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/helper-optimise-call-expression@npm:7.22.5" - dependencies: - "@babel/types": "npm:^7.22.5" - checksum: 10c0/31b41a764fc3c585196cf5b776b70cf4705c132e4ce9723f39871f215f2ddbfb2e28a62f9917610f67c8216c1080482b9b05f65dd195dae2a52cef461f2ac7b8 - languageName: node - linkType: hard - "@babel/helper-optimise-call-expression@npm:^7.24.7": version: 7.24.7 resolution: "@babel/helper-optimise-call-expression@npm:7.24.7" @@ -801,14 +662,7 @@ __metadata: languageName: node linkType: hard -"@babel/helper-plugin-utils@npm:^7.0.0, @babel/helper-plugin-utils@npm:^7.10.4, @babel/helper-plugin-utils@npm:^7.12.13, @babel/helper-plugin-utils@npm:^7.14.5, @babel/helper-plugin-utils@npm:^7.18.6, @babel/helper-plugin-utils@npm:^7.20.2, @babel/helper-plugin-utils@npm:^7.22.5, @babel/helper-plugin-utils@npm:^7.24.0, @babel/helper-plugin-utils@npm:^7.8.0, @babel/helper-plugin-utils@npm:^7.8.3": - version: 7.24.0 - resolution: "@babel/helper-plugin-utils@npm:7.24.0" - checksum: 10c0/90f41bd1b4dfe7226b1d33a4bb745844c5c63e400f9e4e8bf9103a7ceddd7d425d65333b564d9daba3cebd105985764d51b4bd4c95822b97c2e3ac1201a8a5da - languageName: node - linkType: hard - -"@babel/helper-plugin-utils@npm:^7.24.7": +"@babel/helper-plugin-utils@npm:^7.0.0, @babel/helper-plugin-utils@npm:^7.10.4, @babel/helper-plugin-utils@npm:^7.12.13, @babel/helper-plugin-utils@npm:^7.14.5, @babel/helper-plugin-utils@npm:^7.18.6, @babel/helper-plugin-utils@npm:^7.20.2, @babel/helper-plugin-utils@npm:^7.22.5, @babel/helper-plugin-utils@npm:^7.24.0, @babel/helper-plugin-utils@npm:^7.24.7, @babel/helper-plugin-utils@npm:^7.8.0, @babel/helper-plugin-utils@npm:^7.8.3": version: 7.24.7 resolution: "@babel/helper-plugin-utils@npm:7.24.7" checksum: 10c0/c3d38cd9b3520757bb4a279255cc3f956fc0ac1c193964bd0816ebd5c86e30710be8e35252227e0c9d9e0f4f56d9b5f916537f2bc588084b0988b4787a967d31 @@ -828,19 +682,6 @@ __metadata: languageName: node linkType: hard -"@babel/helper-replace-supers@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/helper-replace-supers@npm:7.24.1" - dependencies: - "@babel/helper-environment-visitor": "npm:^7.22.20" - "@babel/helper-member-expression-to-functions": "npm:^7.23.0" - "@babel/helper-optimise-call-expression": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10c0/d39a3df7892b7c3c0e307fb229646168a9bd35e26a72080c2530729322600e8cff5f738f44a14860a2358faffa741b6a6a0d6749f113387b03ddbfa0ec10e1a0 - languageName: node - linkType: hard - "@babel/helper-replace-supers@npm:^7.24.7": version: 7.24.7 resolution: "@babel/helper-replace-supers@npm:7.24.7" @@ -854,15 +695,6 @@ __metadata: languageName: node linkType: hard -"@babel/helper-simple-access@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/helper-simple-access@npm:7.22.5" - dependencies: - "@babel/types": "npm:^7.22.5" - checksum: 10c0/f0cf81a30ba3d09a625fd50e5a9069e575c5b6719234e04ee74247057f8104beca89ed03e9217b6e9b0493434cedc18c5ecca4cea6244990836f1f893e140369 - languageName: node - linkType: hard - "@babel/helper-simple-access@npm:^7.24.7": version: 7.24.7 resolution: "@babel/helper-simple-access@npm:7.24.7" @@ -883,15 +715,6 @@ __metadata: languageName: node linkType: hard -"@babel/helper-skip-transparent-expression-wrappers@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/helper-skip-transparent-expression-wrappers@npm:7.22.5" - dependencies: - "@babel/types": "npm:^7.22.5" - checksum: 10c0/ab7fa2aa709ab49bb8cd86515a1e715a3108c4bb9a616965ba76b43dc346dee66d1004ccf4d222b596b6224e43e04cbc5c3a34459501b388451f8c589fbc3691 - languageName: node - linkType: hard - "@babel/helper-split-export-declaration@npm:7.22.6": version: 7.22.6 resolution: "@babel/helper-split-export-declaration@npm:7.22.6" @@ -910,20 +733,6 @@ __metadata: 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" - checksum: 10c0/f348d5637ad70b6b54b026d6544bd9040f78d24e7ec245a0fc42293968181f6ae9879c22d89744730d246ce8ec53588f716f102addd4df8bbc79b73ea10004ac - languageName: node - linkType: hard - -"@babel/helper-string-parser@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/helper-string-parser@npm:7.24.7" - checksum: 10c0/47840c7004e735f3dc93939c77b099bb41a64bf3dda0cae62f60e6f74a5ff80b63e9b7cf77b5ec25a324516381fc994e1f62f922533236a8e3a6af57decb5e1e - languageName: node - linkType: hard - "@babel/helper-string-parser@npm:^7.24.8": version: 7.24.8 resolution: "@babel/helper-string-parser@npm:7.24.8" @@ -938,13 +747,6 @@ __metadata: languageName: node linkType: hard -"@babel/helper-validator-identifier@npm:^7.22.20": - version: 7.22.20 - resolution: "@babel/helper-validator-identifier@npm:7.22.20" - checksum: 10c0/dcad63db345fb110e032de46c3688384b0008a42a4845180ce7cd62b1a9c0507a1bed727c4d1060ed1a03ae57b4d918570259f81724aaac1a5b776056f37504e - languageName: node - linkType: hard - "@babel/helper-validator-option@npm:^7.22.15, @babel/helper-validator-option@npm:^7.23.5, @babel/helper-validator-option@npm:^7.24.8": version: 7.24.8 resolution: "@babel/helper-validator-option@npm:7.24.8" @@ -974,29 +776,6 @@ __metadata: languageName: node linkType: hard -"@babel/helpers@npm:^7.24.4": - version: 7.24.4 - resolution: "@babel/helpers@npm:7.24.4" - dependencies: - "@babel/template": "npm:^7.24.0" - "@babel/traverse": "npm:^7.24.1" - "@babel/types": "npm:^7.24.0" - checksum: 10c0/747ef62b7fe87de31a2f3c19ff337a86cbb79be2f6c18af63133b614ab5a8f6da5b06ae4b06fb0e71271cb6a27efec6f8b6c9f44c60b8a18777832dc7929e6c5 - languageName: node - linkType: hard - -"@babel/highlight@npm:^7.24.2": - version: 7.24.2 - resolution: "@babel/highlight@npm:7.24.2" - dependencies: - "@babel/helper-validator-identifier": "npm:^7.22.20" - chalk: "npm:^2.4.2" - js-tokens: "npm:^4.0.0" - picocolors: "npm:^1.0.0" - checksum: 10c0/98ce00321daedeed33a4ed9362dc089a70375ff1b3b91228b9f05e6591d387a81a8cba68886e207861b8871efa0bc997ceabdd9c90f6cce3ee1b2f7f941b42db - languageName: node - linkType: hard - "@babel/highlight@npm:^7.24.7": version: 7.24.7 resolution: "@babel/highlight@npm:7.24.7" @@ -1009,16 +788,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.20.7, @babel/parser@npm:^7.23.0, @babel/parser@npm:^7.23.5, @babel/parser@npm:^7.23.6, @babel/parser@npm:^7.23.9, @babel/parser@npm:^7.24.0, @babel/parser@npm:^7.24.4, @babel/parser@npm:^7.24.7, @babel/parser@npm:^7.4.5, @babel/parser@npm:^7.6.0, @babel/parser@npm:^7.9.6": - version: 7.24.7 - resolution: "@babel/parser@npm:7.24.7" - bin: - parser: ./bin/babel-parser.js - checksum: 10c0/8b244756872185a1c6f14b979b3535e682ff08cb5a2a5fd97cc36c017c7ef431ba76439e95e419d43000c5b07720495b00cf29a7f0d9a483643d08802b58819b - languageName: node - linkType: hard - -"@babel/parser@npm:^7.20.5, @babel/parser@npm:^7.22.5, @babel/parser@npm:^7.25.0, @babel/parser@npm:^7.25.3": +"@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.5, @babel/parser@npm:^7.20.7, @babel/parser@npm:^7.22.5, @babel/parser@npm:^7.23.0, @babel/parser@npm:^7.23.5, @babel/parser@npm:^7.23.6, @babel/parser@npm:^7.23.9, @babel/parser@npm:^7.24.0, @babel/parser@npm:^7.24.4, @babel/parser@npm:^7.24.7, @babel/parser@npm:^7.25.0, @babel/parser@npm:^7.25.3, @babel/parser@npm:^7.4.5, @babel/parser@npm:^7.6.0, @babel/parser@npm:^7.9.6": version: 7.25.3 resolution: "@babel/parser@npm:7.25.3" dependencies: @@ -1029,15 +799,6 @@ __metadata: languageName: node linkType: hard -"@babel/parser@npm:^7.24.1": - version: 7.24.4 - resolution: "@babel/parser@npm:7.24.4" - bin: - parser: ./bin/babel-parser.js - checksum: 10c0/8381e1efead5069cb7ed2abc3a583f4a86289b2f376c75cecc69f59a8eb36df18274b1886cecf2f97a6a0dff5334b27330f58535be9b3e4e26102cc50e12eac8 - languageName: node - linkType: hard - "@babel/plugin-bugfix-firefox-class-in-computed-class-key@npm:^7.24.4": version: 7.24.4 resolution: "@babel/plugin-bugfix-firefox-class-in-computed-class-key@npm:7.24.4" @@ -1050,7 +811,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:^7.23.3": +"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:^7.23.3, @babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:7.24.7" dependencies: @@ -1061,18 +822,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:7.24.1" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.0" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10c0/d4e592e6fc4878654243d2e7b51ea86471b868a8cb09de29e73b65d2b64159990c6c198fd7c9c2af2e38b1cddf70206243792853c47384a84f829dada152f605 - languageName: node - linkType: hard - -"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@npm:^7.23.3": +"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@npm:^7.23.3, @babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@npm:7.24.7" dependencies: @@ -1085,20 +835,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@npm:7.24.1" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.0" - "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.22.5" - "@babel/plugin-transform-optional-chaining": "npm:^7.24.1" - peerDependencies: - "@babel/core": ^7.13.0 - checksum: 10c0/351c36e45795a7890d610ab9041a52f4078a59429f6e74c281984aa44149a10d43e82b3a8172c703c0d5679471e165d1c02b6d2e45a677958ee301b89403f202 - languageName: node - linkType: hard - -"@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@npm:^7.23.7": +"@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@npm:^7.23.7, @babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@npm:7.24.7" dependencies: @@ -1110,18 +847,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@npm:7.24.1" - dependencies: - "@babel/helper-environment-visitor": "npm:^7.22.20" - "@babel/helper-plugin-utils": "npm:^7.24.0" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10c0/d7dd5a59a54635a3152895dcaa68f3370bb09d1f9906c1e72232ff759159e6be48de4a598a993c986997280a2dc29922a48aaa98020f16439f3f57ad72788354 - languageName: node - linkType: hard - "@babel/plugin-proposal-class-properties@npm:^7.13.0, @babel/plugin-proposal-class-properties@npm:^7.16.5": version: 7.18.6 resolution: "@babel/plugin-proposal-class-properties@npm:7.18.6" @@ -1306,7 +1031,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-syntax-import-attributes@npm:^7.23.3": +"@babel/plugin-syntax-import-attributes@npm:^7.23.3, @babel/plugin-syntax-import-attributes@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-syntax-import-attributes@npm:7.24.7" dependencies: @@ -1317,17 +1042,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-syntax-import-attributes@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-syntax-import-attributes@npm:7.24.1" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/309634e3335777aee902552b2cf244c4a8050213cc878b3fb9d70ad8cbbff325dc46ac5e5791836ff477ea373b27832238205f6ceaff81f7ea7c4c7e8fbb13bb - languageName: node - linkType: hard - "@babel/plugin-syntax-import-meta@npm:^7.10.4": version: 7.10.4 resolution: "@babel/plugin-syntax-import-meta@npm:7.10.4" @@ -1449,17 +1163,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-syntax-typescript@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-syntax-typescript@npm:7.24.1" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/7a81e277dcfe3138847e8e5944e02a42ff3c2e864aea6f33fd9b70d1556d12b0e70f0d56cc1985d353c91bcbf8fe163e6cc17418da21129b7f7f1d8b9ac00c93 - languageName: node - linkType: hard - "@babel/plugin-syntax-typescript@npm:^7.24.7, @babel/plugin-syntax-typescript@npm:^7.3.3": version: 7.24.7 resolution: "@babel/plugin-syntax-typescript@npm:7.24.7" @@ -1483,7 +1186,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-arrow-functions@npm:^7.23.3": +"@babel/plugin-transform-arrow-functions@npm:^7.23.3, @babel/plugin-transform-arrow-functions@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-arrow-functions@npm:7.24.7" dependencies: @@ -1494,17 +1197,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-arrow-functions@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-arrow-functions@npm:7.24.1" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/f44bfacf087dc21b422bab99f4e9344ee7b695b05c947dacae66de05c723ab9d91800be7edc1fa016185e8c819f3aca2b4a5f66d8a4d1e47d9bad80b8fa55b8e - languageName: node - linkType: hard - "@babel/plugin-transform-async-generator-functions@npm:7.23.9": version: 7.23.9 resolution: "@babel/plugin-transform-async-generator-functions@npm:7.23.9" @@ -1519,7 +1211,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-async-generator-functions@npm:^7.23.9": +"@babel/plugin-transform-async-generator-functions@npm:^7.23.9, @babel/plugin-transform-async-generator-functions@npm:^7.24.3": version: 7.24.7 resolution: "@babel/plugin-transform-async-generator-functions@npm:7.24.7" dependencies: @@ -1533,20 +1225,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-async-generator-functions@npm:^7.24.3": - version: 7.24.3 - resolution: "@babel/plugin-transform-async-generator-functions@npm:7.24.3" - dependencies: - "@babel/helper-environment-visitor": "npm:^7.22.20" - "@babel/helper-plugin-utils": "npm:^7.24.0" - "@babel/helper-remap-async-to-generator": "npm:^7.22.20" - "@babel/plugin-syntax-async-generators": "npm:^7.8.4" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/55ceed059f819dcccbfe69600bfa1c055ada466bd54eda117cfdd2cf773dd85799e2f6556e4a559b076e93b9704abcca2aef9d72aad7dc8a5d3d17886052f1d3 - languageName: node - linkType: hard - "@babel/plugin-transform-async-to-generator@npm:7.23.3": version: 7.23.3 resolution: "@babel/plugin-transform-async-to-generator@npm:7.23.3" @@ -1560,7 +1238,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-async-to-generator@npm:^7.23.3": +"@babel/plugin-transform-async-to-generator@npm:^7.23.3, @babel/plugin-transform-async-to-generator@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-async-to-generator@npm:7.24.7" dependencies: @@ -1573,20 +1251,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-async-to-generator@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-async-to-generator@npm:7.24.1" - dependencies: - "@babel/helper-module-imports": "npm:^7.24.1" - "@babel/helper-plugin-utils": "npm:^7.24.0" - "@babel/helper-remap-async-to-generator": "npm:^7.22.20" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/3731ba8e83cbea1ab22905031f25b3aeb0b97c6467360a2cc685352f16e7c786417d8883bc747f5a0beff32266bdb12a05b6292e7b8b75967087200a7bc012c4 - languageName: node - linkType: hard - -"@babel/plugin-transform-block-scoped-functions@npm:^7.23.3": +"@babel/plugin-transform-block-scoped-functions@npm:^7.23.3, @babel/plugin-transform-block-scoped-functions@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-block-scoped-functions@npm:7.24.7" dependencies: @@ -1597,18 +1262,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-block-scoped-functions@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-block-scoped-functions@npm:7.24.1" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/6fbaa85f5204f34845dfc0bebf62fdd3ac5a286241c85651e59d426001e7a1785ac501f154e093e0b8ee49e1f51e3f8b06575a5ae8d4a9406d43e4816bf18c37 - languageName: node - linkType: hard - -"@babel/plugin-transform-block-scoping@npm:^7.23.4, @babel/plugin-transform-block-scoping@npm:^7.8.3": +"@babel/plugin-transform-block-scoping@npm:^7.23.4, @babel/plugin-transform-block-scoping@npm:^7.24.4, @babel/plugin-transform-block-scoping@npm:^7.8.3": version: 7.24.7 resolution: "@babel/plugin-transform-block-scoping@npm:7.24.7" dependencies: @@ -1619,17 +1273,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-block-scoping@npm:^7.24.4": - version: 7.24.4 - resolution: "@babel/plugin-transform-block-scoping@npm:7.24.4" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/62f55fd1b60a115506e9553c3bf925179b1ab8a42dc31471c4e3ada20573a488b5c5e3317145da352493ef07f1d9750ce1f8a49cb3f39489ac1ab42e5ddc883d - languageName: node - linkType: hard - "@babel/plugin-transform-class-properties@npm:^7.22.5, @babel/plugin-transform-class-properties@npm:^7.23.3, @babel/plugin-transform-class-properties@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-class-properties@npm:7.24.7" @@ -1642,7 +1285,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-class-static-block@npm:^7.23.4": +"@babel/plugin-transform-class-static-block@npm:^7.23.4, @babel/plugin-transform-class-static-block@npm:^7.24.4": version: 7.24.7 resolution: "@babel/plugin-transform-class-static-block@npm:7.24.7" dependencies: @@ -1655,20 +1298,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-class-static-block@npm:^7.24.4": - version: 7.24.4 - resolution: "@babel/plugin-transform-class-static-block@npm:7.24.4" - dependencies: - "@babel/helper-create-class-features-plugin": "npm:^7.24.4" - "@babel/helper-plugin-utils": "npm:^7.24.0" - "@babel/plugin-syntax-class-static-block": "npm:^7.14.5" - peerDependencies: - "@babel/core": ^7.12.0 - checksum: 10c0/19dfeaf4a2ac03695034f7211a8b5ad89103b224608ac3e91791055107c5fe4d7ebe5d9fbb31b4a91265694af78762260642eb270f4b239c175984ee4b253f80 - languageName: node - linkType: hard - -"@babel/plugin-transform-classes@npm:^7.23.8": +"@babel/plugin-transform-classes@npm:^7.23.8, @babel/plugin-transform-classes@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-classes@npm:7.24.7" dependencies: @@ -1686,25 +1316,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-classes@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-classes@npm:7.24.1" - dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.22.5" - "@babel/helper-compilation-targets": "npm:^7.23.6" - "@babel/helper-environment-visitor": "npm:^7.22.20" - "@babel/helper-function-name": "npm:^7.23.0" - "@babel/helper-plugin-utils": "npm:^7.24.0" - "@babel/helper-replace-supers": "npm:^7.24.1" - "@babel/helper-split-export-declaration": "npm:^7.22.6" - globals: "npm:^11.1.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/586a95826be4d68056fa23d8e6c34353ce2ea59bf3ca8cf62bc784e60964d492d76e1b48760c43fd486ffb65a79d3fed9a4f91289e4f526f88c3b6acc0dfb00e - languageName: node - linkType: hard - -"@babel/plugin-transform-computed-properties@npm:^7.23.3": +"@babel/plugin-transform-computed-properties@npm:^7.23.3, @babel/plugin-transform-computed-properties@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-computed-properties@npm:7.24.7" dependencies: @@ -1716,19 +1328,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-computed-properties@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-computed-properties@npm:7.24.1" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.0" - "@babel/template": "npm:^7.24.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/8292c508b656b7722e2c2ca0f6f31339852e3ed2b9b80f6e068a4010e961b431ca109ecd467fc906283f4b1574c1e7b1cb68d35a4dea12079d386c15ff7e0eac - languageName: node - linkType: hard - -"@babel/plugin-transform-destructuring@npm:^7.23.3": +"@babel/plugin-transform-destructuring@npm:^7.23.3, @babel/plugin-transform-destructuring@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-destructuring@npm:7.24.7" dependencies: @@ -1739,18 +1339,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-destructuring@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-destructuring@npm:7.24.1" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/a08e706a9274a699abc3093f38c72d4a5354eac11c44572cc9ea049915b6e03255744297069fd94fcce82380725c5d6b1b11b9a84c0081aa3aa6fc2fdab98ef6 - languageName: node - linkType: hard - -"@babel/plugin-transform-dotall-regex@npm:^7.23.3": +"@babel/plugin-transform-dotall-regex@npm:^7.23.3, @babel/plugin-transform-dotall-regex@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-dotall-regex@npm:7.24.7" dependencies: @@ -1762,19 +1351,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-dotall-regex@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-dotall-regex@npm:7.24.1" - dependencies: - "@babel/helper-create-regexp-features-plugin": "npm:^7.22.15" - "@babel/helper-plugin-utils": "npm:^7.24.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/758def705ec5a87ef910280dc2df5d2fda59dc5d4771c1725c7aed0988ae5b79e29aeb48109120301a3e1c6c03dfac84700469de06f38ca92c96834e09eadf5d - languageName: node - linkType: hard - -"@babel/plugin-transform-duplicate-keys@npm:^7.23.3": +"@babel/plugin-transform-duplicate-keys@npm:^7.23.3, @babel/plugin-transform-duplicate-keys@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-duplicate-keys@npm:7.24.7" dependencies: @@ -1785,18 +1362,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-duplicate-keys@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-duplicate-keys@npm:7.24.1" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/41072f57f83a6c2b15f3ee0b6779cdca105ff3d98061efe92ac02d6c7b90fdb6e7e293b8a4d5b9c690d9ae5d3ae73e6bde4596dc4d8c66526a0e5e1abc73c88c - languageName: node - linkType: hard - -"@babel/plugin-transform-dynamic-import@npm:^7.23.4": +"@babel/plugin-transform-dynamic-import@npm:^7.23.4, @babel/plugin-transform-dynamic-import@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-dynamic-import@npm:7.24.7" dependencies: @@ -1808,19 +1374,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-dynamic-import@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-dynamic-import@npm:7.24.1" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.0" - "@babel/plugin-syntax-dynamic-import": "npm:^7.8.3" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/7e2834780e9b5251ef341854043a89c91473b83c335358620ca721554877e64e416aeb3288a35f03e825c4958e07d5d00ead08c4490fadc276a21fe151d812f1 - languageName: node - linkType: hard - -"@babel/plugin-transform-exponentiation-operator@npm:^7.23.3": +"@babel/plugin-transform-exponentiation-operator@npm:^7.23.3, @babel/plugin-transform-exponentiation-operator@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-exponentiation-operator@npm:7.24.7" dependencies: @@ -1832,18 +1386,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-exponentiation-operator@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-exponentiation-operator@npm:7.24.1" - dependencies: - "@babel/helper-builder-binary-assignment-operator-visitor": "npm:^7.22.15" - "@babel/helper-plugin-utils": "npm:^7.24.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/f0fc4c5a9add25fd6bf23dabe6752e9b7c0a2b2554933dddfd16601245a2ba332b647951079c782bf3b94c6330e3638b9b4e0227f469a7c1c707446ba0eba6c7 - languageName: node - linkType: hard - "@babel/plugin-transform-export-namespace-from@npm:^7.23.4, @babel/plugin-transform-export-namespace-from@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-export-namespace-from@npm:7.24.7" @@ -1868,7 +1410,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-for-of@npm:^7.23.6": +"@babel/plugin-transform-for-of@npm:^7.23.6, @babel/plugin-transform-for-of@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-for-of@npm:7.24.7" dependencies: @@ -1880,19 +1422,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-for-of@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-for-of@npm:7.24.1" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.0" - "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/e4bc92b1f334246e62d4bde079938df940794db564742034f6597f2e38bd426e11ae8c5670448e15dd6e45c462f2a9ab3fa87259bddf7c08553ffd9457fc2b2c - languageName: node - linkType: hard - -"@babel/plugin-transform-function-name@npm:^7.23.3": +"@babel/plugin-transform-function-name@npm:^7.23.3, @babel/plugin-transform-function-name@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-function-name@npm:7.24.7" dependencies: @@ -1905,20 +1435,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-function-name@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-function-name@npm:7.24.1" - dependencies: - "@babel/helper-compilation-targets": "npm:^7.23.6" - "@babel/helper-function-name": "npm:^7.23.0" - "@babel/helper-plugin-utils": "npm:^7.24.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/65c1735ec3b5e43db9b5aebf3c16171c04b3050c92396b9e22dda0d2aaf51f43fdcf147f70a40678fd9a4ee2272a5acec4826e9c21bcf968762f4c184897ad75 - languageName: node - linkType: hard - -"@babel/plugin-transform-json-strings@npm:^7.23.4": +"@babel/plugin-transform-json-strings@npm:^7.23.4, @babel/plugin-transform-json-strings@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-json-strings@npm:7.24.7" dependencies: @@ -1930,19 +1447,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-json-strings@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-json-strings@npm:7.24.1" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.0" - "@babel/plugin-syntax-json-strings": "npm:^7.8.3" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/13d9b6a3c31ab4be853b3d49d8d1171f9bd8198562fd75da8f31e7de31398e1cfa6eb1d073bed93c9746e4f9c47a53b20f8f4c255ece3f88c90852ad3181dc2d - languageName: node - linkType: hard - -"@babel/plugin-transform-literals@npm:^7.23.3": +"@babel/plugin-transform-literals@npm:^7.23.3, @babel/plugin-transform-literals@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-literals@npm:7.24.7" dependencies: @@ -1953,18 +1458,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-literals@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-literals@npm:7.24.1" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/a27cc7d565ee57b5a2bf136fa889c5c2f5988545ae7b3b2c83a7afe5dd37dfac80dca88b1c633c65851ce6af7d2095c04c01228657ce0198f918e64b5ccd01fa - languageName: node - linkType: hard - -"@babel/plugin-transform-logical-assignment-operators@npm:^7.23.4": +"@babel/plugin-transform-logical-assignment-operators@npm:^7.23.4, @babel/plugin-transform-logical-assignment-operators@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-logical-assignment-operators@npm:7.24.7" dependencies: @@ -1976,19 +1470,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-logical-assignment-operators@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-logical-assignment-operators@npm:7.24.1" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.0" - "@babel/plugin-syntax-logical-assignment-operators": "npm:^7.10.4" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/98a2e0843ddfe51443c1bfcf08ba40ad8856fd4f8e397b392a5390a54f257c8c1b9a99d8ffc0fc7e8c55cce45e2cd9c2795a4450303f48f501bcbd662de44554 - languageName: node - linkType: hard - -"@babel/plugin-transform-member-expression-literals@npm:^7.23.3": +"@babel/plugin-transform-member-expression-literals@npm:^7.23.3, @babel/plugin-transform-member-expression-literals@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-member-expression-literals@npm:7.24.7" dependencies: @@ -1999,18 +1481,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-member-expression-literals@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-member-expression-literals@npm:7.24.1" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/2af731d02aa4c757ef80c46df42264128cbe45bfd15e1812d1a595265b690a44ad036041c406a73411733540e1c4256d8174705ae6b8cfaf757fc175613993fd - 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.3, @babel/plugin-transform-modules-amd@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-modules-amd@npm:7.24.7" dependencies: @@ -2022,19 +1493,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-modules-amd@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-modules-amd@npm:7.24.1" - dependencies: - "@babel/helper-module-transforms": "npm:^7.23.3" - "@babel/helper-plugin-utils": "npm:^7.24.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/71fd04e5e7026e6e52701214b1e9f7508ba371b757e5075fbb938a79235ed66a54ce65f89bb92b59159e9f03f01b392e6c4de6d255b948bec975a90cfd6809ef - languageName: node - linkType: hard - -"@babel/plugin-transform-modules-commonjs@npm:^7.13.8, @babel/plugin-transform-modules-commonjs@npm:^7.23.0, @babel/plugin-transform-modules-commonjs@npm:^7.23.3": +"@babel/plugin-transform-modules-commonjs@npm:^7.13.8, @babel/plugin-transform-modules-commonjs@npm:^7.23.0, @babel/plugin-transform-modules-commonjs@npm:^7.23.3, @babel/plugin-transform-modules-commonjs@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-modules-commonjs@npm:7.24.7" dependencies: @@ -2047,20 +1506,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-modules-commonjs@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-modules-commonjs@npm:7.24.1" - dependencies: - "@babel/helper-module-transforms": "npm:^7.23.3" - "@babel/helper-plugin-utils": "npm:^7.24.0" - "@babel/helper-simple-access": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/efb3ea2047604a7eb44a9289311ebb29842fe6510ff8b66a77a60440448c65e1312a60dc48191ed98246bdbd163b5b6f3348a0669bcc0e3809e69c7c776b20fa - languageName: node - linkType: hard - -"@babel/plugin-transform-modules-systemjs@npm:^7.23.9": +"@babel/plugin-transform-modules-systemjs@npm:^7.23.9, @babel/plugin-transform-modules-systemjs@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-modules-systemjs@npm:7.24.7" dependencies: @@ -2074,21 +1520,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-modules-systemjs@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-modules-systemjs@npm:7.24.1" - dependencies: - "@babel/helper-hoist-variables": "npm:^7.22.5" - "@babel/helper-module-transforms": "npm:^7.23.3" - "@babel/helper-plugin-utils": "npm:^7.24.0" - "@babel/helper-validator-identifier": "npm:^7.22.20" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/38145f8abe8a4ce2b41adabe5d65eb7bd54a139dc58e2885fec975eb5cf247bd938c1dd9f09145c46dbe57d25dd0ef7f00a020e5eb0cbe8195b2065d51e2d93d - languageName: node - linkType: hard - -"@babel/plugin-transform-modules-umd@npm:^7.23.3": +"@babel/plugin-transform-modules-umd@npm:^7.23.3, @babel/plugin-transform-modules-umd@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-modules-umd@npm:7.24.7" dependencies: @@ -2100,18 +1532,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-modules-umd@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-modules-umd@npm:7.24.1" - dependencies: - "@babel/helper-module-transforms": "npm:^7.23.3" - "@babel/helper-plugin-utils": "npm:^7.24.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/14c90c58562b54e17fe4a8ded3f627f9a993648f8378ef00cb2f6c34532032b83290d2ad54c7fff4f0c2cd49091bda780f8cc28926ec4b77a6c2141105a2e699 - languageName: node - linkType: hard - "@babel/plugin-transform-named-capturing-groups-regex@npm:^7.22.5": version: 7.24.7 resolution: "@babel/plugin-transform-named-capturing-groups-regex@npm:7.24.7" @@ -2124,49 +1544,26 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-new-target@npm:^7.23.3": +"@babel/plugin-transform-new-target@npm:^7.23.3, @babel/plugin-transform-new-target@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-new-target@npm:7.24.7" dependencies: "@babel/helper-plugin-utils": "npm:^7.24.7" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10c0/2540808a35e1a978e537334c43dab439cf24c93e7beb213a2e71902f6710e60e0184316643790c0a6644e7a8021e52f7ab8165e6b3e2d6651be07bdf517b67df - languageName: node - linkType: hard - -"@babel/plugin-transform-new-target@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-new-target@npm:7.24.1" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/c4cabe628163855f175a8799eb73d692b6f1dc347aae5022af0c253f80c92edb962e48ddccc98b691eff3d5d8e53c9a8f10894c33ba4cebc2e2f8f8fe554fb7a - languageName: node - linkType: hard - -"@babel/plugin-transform-nullish-coalescing-operator@npm:^7.22.11, @babel/plugin-transform-nullish-coalescing-operator@npm:^7.23.4": - version: 7.24.7 - resolution: "@babel/plugin-transform-nullish-coalescing-operator@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - "@babel/plugin-syntax-nullish-coalescing-operator": "npm:^7.8.3" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/7243c8ff734ed5ef759dd8768773c4b443c12e792727e759a1aec2c7fa2bfdd24f1ecb42e292a7b3d8bd3d7f7b861cf256a8eb4ba144fc9cc463892c303083d9 + checksum: 10c0/2540808a35e1a978e537334c43dab439cf24c93e7beb213a2e71902f6710e60e0184316643790c0a6644e7a8021e52f7ab8165e6b3e2d6651be07bdf517b67df languageName: node linkType: hard -"@babel/plugin-transform-nullish-coalescing-operator@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-nullish-coalescing-operator@npm:7.24.1" +"@babel/plugin-transform-nullish-coalescing-operator@npm:^7.22.11, @babel/plugin-transform-nullish-coalescing-operator@npm:^7.23.4, @babel/plugin-transform-nullish-coalescing-operator@npm:^7.24.1": + version: 7.24.7 + resolution: "@babel/plugin-transform-nullish-coalescing-operator@npm:7.24.7" dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.0" + "@babel/helper-plugin-utils": "npm:^7.24.7" "@babel/plugin-syntax-nullish-coalescing-operator": "npm:^7.8.3" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10c0/c8532951506fb031287280cebeef10aa714f8a7cea2b62a13c805f0e0af945ba77a7c87e4bbbe4c37fe973e0e5d5e649cfac7f0374f57efc54cdf9656362a392 + checksum: 10c0/7243c8ff734ed5ef759dd8768773c4b443c12e792727e759a1aec2c7fa2bfdd24f1ecb42e292a7b3d8bd3d7f7b861cf256a8eb4ba144fc9cc463892c303083d9 languageName: node linkType: hard @@ -2207,7 +1604,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-object-super@npm:^7.23.3": +"@babel/plugin-transform-object-super@npm:^7.23.3, @babel/plugin-transform-object-super@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-object-super@npm:7.24.7" dependencies: @@ -2219,19 +1616,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-object-super@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-object-super@npm:7.24.1" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.0" - "@babel/helper-replace-supers": "npm:^7.24.1" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/d30e6b9e59a707efd7ed524fc0a8deeea046011a6990250f2e9280516683138e2d13d9c52daf41d78407bdab0378aef7478326f2a15305b773d851cb6e106157 - languageName: node - linkType: hard - -"@babel/plugin-transform-optional-catch-binding@npm:^7.23.4": +"@babel/plugin-transform-optional-catch-binding@npm:^7.23.4, @babel/plugin-transform-optional-catch-binding@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-optional-catch-binding@npm:7.24.7" dependencies: @@ -2243,19 +1628,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-optional-catch-binding@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-optional-catch-binding@npm:7.24.1" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.0" - "@babel/plugin-syntax-optional-catch-binding": "npm:^7.8.3" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/68408b9ef772d9aa5dccf166c86dc4d2505990ce93e03dcfc65c73fb95c2511248e009ba9ccf5b96405fb85de1c16ad8291016b1cc5689ee4becb1e3050e0ae7 - languageName: node - linkType: hard - -"@babel/plugin-transform-optional-chaining@npm:^7.23.0, @babel/plugin-transform-optional-chaining@npm:^7.23.4, @babel/plugin-transform-optional-chaining@npm:^7.24.7": +"@babel/plugin-transform-optional-chaining@npm:^7.23.0, @babel/plugin-transform-optional-chaining@npm:^7.23.4, @babel/plugin-transform-optional-chaining@npm:^7.24.1, @babel/plugin-transform-optional-chaining@npm:^7.24.7": version: 7.24.7 resolution: "@babel/plugin-transform-optional-chaining@npm:7.24.7" dependencies: @@ -2268,20 +1641,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-optional-chaining@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-optional-chaining@npm:7.24.1" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.0" - "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.22.5" - "@babel/plugin-syntax-optional-chaining": "npm:^7.8.3" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/b4688795229c9e9ce978eccf979fe515eb4e8d864d2dcd696baa937c8db13e3d46cff664a3cd6119dfe60e261f5d359b10c6783effab7cc91d75d03ad7f43d05 - languageName: node - linkType: hard - -"@babel/plugin-transform-parameters@npm:^7.23.3, @babel/plugin-transform-parameters@npm:^7.24.7": +"@babel/plugin-transform-parameters@npm:^7.23.3, @babel/plugin-transform-parameters@npm:^7.24.1, @babel/plugin-transform-parameters@npm:^7.24.7": version: 7.24.7 resolution: "@babel/plugin-transform-parameters@npm:7.24.7" dependencies: @@ -2292,18 +1652,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-parameters@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-parameters@npm:7.24.1" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/eee8d2f72d3ee0876dc8d85f949f4adf34685cfe36c814ebc20c96315f3891a53d43c764d636b939e34d55e6a6a4af9aa57ed0d7f9439eb5771a07277c669e55 - languageName: node - linkType: hard - -"@babel/plugin-transform-private-methods@npm:^7.22.5, @babel/plugin-transform-private-methods@npm:^7.23.3": +"@babel/plugin-transform-private-methods@npm:^7.22.5, @babel/plugin-transform-private-methods@npm:^7.23.3, @babel/plugin-transform-private-methods@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-private-methods@npm:7.24.7" dependencies: @@ -2315,19 +1664,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-private-methods@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-private-methods@npm:7.24.1" - dependencies: - "@babel/helper-create-class-features-plugin": "npm:^7.24.1" - "@babel/helper-plugin-utils": "npm:^7.24.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/d8e18587d2a8b71a795da5e8841b0e64f1525a99ad73ea8b9caa331bc271d69646e2e1e749fd634321f3df9d126070208ddac22a27ccf070566b2efb74fecd99 - languageName: node - linkType: hard - -"@babel/plugin-transform-private-property-in-object@npm:^7.23.4": +"@babel/plugin-transform-private-property-in-object@npm:^7.23.4, @babel/plugin-transform-private-property-in-object@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-private-property-in-object@npm:7.24.7" dependencies: @@ -2341,21 +1678,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-private-property-in-object@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-private-property-in-object@npm:7.24.1" - dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.22.5" - "@babel/helper-create-class-features-plugin": "npm:^7.24.1" - "@babel/helper-plugin-utils": "npm:^7.24.0" - "@babel/plugin-syntax-private-property-in-object": "npm:^7.14.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/33d2b9737de7667d7a1b704eef99bfecc6736157d9ea28c2e09010d5f25e33ff841c41d89a4430c5d47f4eb3384e24770fa0ec79600e1e38d6d16e2f9333b4b5 - languageName: node - linkType: hard - -"@babel/plugin-transform-property-literals@npm:^7.23.3": +"@babel/plugin-transform-property-literals@npm:^7.23.3, @babel/plugin-transform-property-literals@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-property-literals@npm:7.24.7" dependencies: @@ -2366,17 +1689,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-property-literals@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-property-literals@npm:7.24.1" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/3bf3e01f7bb8215a8b6d0081b6f86fea23e3a4543b619e059a264ede028bc58cdfb0acb2c43271271915a74917effa547bc280ac636a9901fa9f2fb45623f87e - languageName: node - linkType: hard - "@babel/plugin-transform-react-display-name@npm:^7.24.1": version: 7.24.1 resolution: "@babel/plugin-transform-react-display-name@npm:7.24.1" @@ -2448,7 +1760,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-regenerator@npm:^7.23.3": +"@babel/plugin-transform-regenerator@npm:^7.23.3, @babel/plugin-transform-regenerator@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-regenerator@npm:7.24.7" dependencies: @@ -2460,19 +1772,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-regenerator@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-regenerator@npm:7.24.1" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.0" - regenerator-transform: "npm:^0.15.2" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/0a333585d7c0b38d31cc549d0f3cf7c396d1d50b6588a307dc58325505ddd4f5446188bc536c4779431b396251801b3f32d6d8e87db8274bc84e8c41950737f7 - languageName: node - linkType: hard - -"@babel/plugin-transform-reserved-words@npm:^7.23.3": +"@babel/plugin-transform-reserved-words@npm:^7.23.3, @babel/plugin-transform-reserved-words@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-reserved-words@npm:7.24.7" dependencies: @@ -2483,17 +1783,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-reserved-words@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-reserved-words@npm:7.24.1" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/936d6e73cafb2cbb495f6817c6f8463288dbc9ab3c44684b931ebc1ece24f0d55dfabc1a75ba1de5b48843d0fef448dcfdbecb8485e4014f8f41d0d1440c536f - languageName: node - linkType: hard - "@babel/plugin-transform-runtime@npm:7.24.0": version: 7.24.0 resolution: "@babel/plugin-transform-runtime@npm:7.24.0" @@ -2526,7 +1815,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-shorthand-properties@npm:^7.23.3": +"@babel/plugin-transform-shorthand-properties@npm:^7.23.3, @babel/plugin-transform-shorthand-properties@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-shorthand-properties@npm:7.24.7" dependencies: @@ -2537,18 +1826,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-shorthand-properties@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-shorthand-properties@npm:7.24.1" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/8273347621183aada3cf1f3019d8d5f29467ba13a75b72cb405bc7f23b7e05fd85f4edb1e4d9f0103153dddb61826a42dc24d466480d707f8932c1923a4c25fa - languageName: node - linkType: hard - -"@babel/plugin-transform-spread@npm:^7.23.3": +"@babel/plugin-transform-spread@npm:^7.23.3, @babel/plugin-transform-spread@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-spread@npm:7.24.7" dependencies: @@ -2560,19 +1838,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-spread@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-spread@npm:7.24.1" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.0" - "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/50a0302e344546d57e5c9f4dea575f88e084352eeac4e9a3e238c41739eef2df1daf4a7ebbb3ccb7acd3447f6a5ce9938405f98bf5f5583deceb8257f5a673c9 - languageName: node - linkType: hard - -"@babel/plugin-transform-sticky-regex@npm:^7.23.3": +"@babel/plugin-transform-sticky-regex@npm:^7.23.3, @babel/plugin-transform-sticky-regex@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-sticky-regex@npm:7.24.7" dependencies: @@ -2583,18 +1849,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-sticky-regex@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-sticky-regex@npm:7.24.1" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/786fe2ae11ef9046b9fa95677935abe495031eebf1274ad03f2054a20adea7b9dbd00336ac0b143f7924bc562e5e09793f6e8613607674b97e067d4838ccc4a0 - languageName: node - linkType: hard - -"@babel/plugin-transform-template-literals@npm:^7.23.3": +"@babel/plugin-transform-template-literals@npm:^7.23.3, @babel/plugin-transform-template-literals@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-template-literals@npm:7.24.7" dependencies: @@ -2605,18 +1860,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-template-literals@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-template-literals@npm:7.24.1" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/f73bcda5488eb81c6e7a876498d9e6b72be32fca5a4d9db9053491a2d1300cd27b889b463fd2558f3cd5826a85ed00f61d81b234aa55cb5a0abf1b6fa1bd5026 - languageName: node - linkType: hard - -"@babel/plugin-transform-typeof-symbol@npm:^7.23.3": +"@babel/plugin-transform-typeof-symbol@npm:^7.23.3, @babel/plugin-transform-typeof-symbol@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-typeof-symbol@npm:7.24.7" dependencies: @@ -2627,18 +1871,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-typeof-symbol@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-typeof-symbol@npm:7.24.1" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/d392f549bfd13414f59feecdf3fb286f266a3eb9107a9de818e57907bda56eed08d1f6f8e314d09bf99252df026a7fd4d5df839acd45078a777abcebaa9a8593 - languageName: node - linkType: hard - -"@babel/plugin-transform-typescript@npm:^7.13.0": +"@babel/plugin-transform-typescript@npm:^7.13.0, @babel/plugin-transform-typescript@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-typescript@npm:7.24.7" dependencies: @@ -2652,21 +1885,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-typescript@npm:^7.24.1": - version: 7.24.4 - resolution: "@babel/plugin-transform-typescript@npm:7.24.4" - dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.22.5" - "@babel/helper-create-class-features-plugin": "npm:^7.24.4" - "@babel/helper-plugin-utils": "npm:^7.24.0" - "@babel/plugin-syntax-typescript": "npm:^7.24.1" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/fa6625046f219cdc75061025c8031ada75ef631b137f1442e3d0054ba4e63548eb12cf55e2e1f442c889aa5fdd76d0d0b7904fdf812ce4c38748446227acc798 - languageName: node - linkType: hard - -"@babel/plugin-transform-unicode-escapes@npm:^7.23.3": +"@babel/plugin-transform-unicode-escapes@npm:^7.23.3, @babel/plugin-transform-unicode-escapes@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-unicode-escapes@npm:7.24.7" dependencies: @@ -2677,18 +1896,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-unicode-escapes@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-unicode-escapes@npm:7.24.1" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/67a72a1ed99639de6a93aead35b1993cb3f0eb178a8991fcef48732c38c9f0279c85bbe1e2e2477b85afea873e738ff0955a35057635ce67bc149038e2d8a28e - languageName: node - linkType: hard - -"@babel/plugin-transform-unicode-property-regex@npm:^7.23.3": +"@babel/plugin-transform-unicode-property-regex@npm:^7.23.3, @babel/plugin-transform-unicode-property-regex@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-unicode-property-regex@npm:7.24.7" dependencies: @@ -2700,19 +1908,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-unicode-property-regex@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-unicode-property-regex@npm:7.24.1" - dependencies: - "@babel/helper-create-regexp-features-plugin": "npm:^7.22.15" - "@babel/helper-plugin-utils": "npm:^7.24.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/d9d9752df7d51bf9357c0bf3762fe16b8c841fca9ecf4409a16f15ccc34be06e8e71abfaee1251b7d451227e70e6b873b36f86b090efdb20f6f7de5fdb6c7a05 - languageName: node - linkType: hard - -"@babel/plugin-transform-unicode-regex@npm:^7.23.3": +"@babel/plugin-transform-unicode-regex@npm:^7.23.3, @babel/plugin-transform-unicode-regex@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-unicode-regex@npm:7.24.7" dependencies: @@ -2724,19 +1920,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-unicode-regex@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-unicode-regex@npm:7.24.1" - dependencies: - "@babel/helper-create-regexp-features-plugin": "npm:^7.22.15" - "@babel/helper-plugin-utils": "npm:^7.24.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/6046ab38e5d14ed97dbb921bd79ac1d7ad9d3286da44a48930e980b16896db2df21e093563ec3c916a630dc346639bf47c5924a33902a06fe3bbb5cdc7ef5f2f - languageName: node - linkType: hard - -"@babel/plugin-transform-unicode-sets-regex@npm:^7.23.3": +"@babel/plugin-transform-unicode-sets-regex@npm:^7.23.3, @babel/plugin-transform-unicode-sets-regex@npm:^7.24.1": version: 7.24.7 resolution: "@babel/plugin-transform-unicode-sets-regex@npm:7.24.7" dependencies: @@ -2748,18 +1932,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-unicode-sets-regex@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/plugin-transform-unicode-sets-regex@npm:7.24.1" - dependencies: - "@babel/helper-create-regexp-features-plugin": "npm:^7.22.15" - "@babel/helper-plugin-utils": "npm:^7.24.0" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10c0/b6c1f6b90afeeddf97e5713f72575787fcb7179be7b4c961869bfbc66915f66540dc49da93e4369da15596bd44b896d1eb8a50f5e1fd907abd7a1a625901006b - languageName: node - linkType: hard - "@babel/polyfill@npm:^7.11.5": version: 7.12.1 resolution: "@babel/polyfill@npm:7.12.1" @@ -3104,25 +2276,7 @@ __metadata: languageName: node linkType: hard -"@babel/traverse@npm:^7.1.6, @babel/traverse@npm:^7.16.0, @babel/traverse@npm:^7.18.9, @babel/traverse@npm:^7.23.9, @babel/traverse@npm:^7.24.0, @babel/traverse@npm:^7.24.1, @babel/traverse@npm:^7.4.5": - version: 7.24.1 - resolution: "@babel/traverse@npm:7.24.1" - dependencies: - "@babel/code-frame": "npm:^7.24.1" - "@babel/generator": "npm:^7.24.1" - "@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.24.1" - "@babel/types": "npm:^7.24.0" - debug: "npm:^4.3.1" - globals: "npm:^11.1.0" - checksum: 10c0/c087b918f6823776537ba246136c70e7ce0719fc05361ebcbfd16f4e6f2f6f1f8f4f9167f1d9b675f27d12074839605189cc9d689de20b89a85e7c140f23daab - languageName: node - linkType: hard - -"@babel/traverse@npm:^7.22.5, @babel/traverse@npm:^7.25.2": +"@babel/traverse@npm:^7.1.6, @babel/traverse@npm:^7.16.0, @babel/traverse@npm:^7.18.9, @babel/traverse@npm:^7.22.5, @babel/traverse@npm:^7.23.9, @babel/traverse@npm:^7.24.0, @babel/traverse@npm:^7.24.1, @babel/traverse@npm:^7.24.7, @babel/traverse@npm:^7.25.2, @babel/traverse@npm:^7.4.5": version: 7.25.3 resolution: "@babel/traverse@npm:7.25.3" dependencies: @@ -3137,24 +2291,6 @@ __metadata: languageName: node linkType: hard -"@babel/traverse@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/traverse@npm:7.24.7" - dependencies: - "@babel/code-frame": "npm:^7.24.7" - "@babel/generator": "npm:^7.24.7" - "@babel/helper-environment-visitor": "npm:^7.24.7" - "@babel/helper-function-name": "npm:^7.24.7" - "@babel/helper-hoist-variables": "npm:^7.24.7" - "@babel/helper-split-export-declaration": "npm:^7.24.7" - "@babel/parser": "npm:^7.24.7" - "@babel/types": "npm:^7.24.7" - debug: "npm:^4.3.1" - globals: "npm:^11.1.0" - checksum: 10c0/a5135e589c3f1972b8877805f50a084a04865ccb1d68e5e1f3b94a8841b3485da4142e33413d8fd76bc0e6444531d3adf1f59f359c11ffac452b743d835068ab - languageName: node - linkType: hard - "@babel/types@npm:7.17.0": version: 7.17.0 resolution: "@babel/types@npm:7.17.0" @@ -3165,18 +2301,7 @@ __metadata: 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.22.5, @babel/types@npm:^7.23.6, @babel/types@npm:^7.23.9, @babel/types@npm:^7.24.0, @babel/types@npm:^7.24.7, @babel/types@npm:^7.4.4, @babel/types@npm:^7.6.1, @babel/types@npm:^7.7.2, @babel/types@npm:^7.8.3, @babel/types@npm:^7.9.6": - version: 7.24.7 - resolution: "@babel/types@npm:7.24.7" - dependencies: - "@babel/helper-string-parser": "npm:^7.24.7" - "@babel/helper-validator-identifier": "npm:^7.24.7" - to-fast-properties: "npm:^2.0.0" - checksum: 10c0/d9ecbfc3eb2b05fb1e6eeea546836ac30d990f395ef3fe3f75ced777a222c3cfc4489492f72e0ce3d9a5a28860a1ce5f81e66b88cf5088909068b3ff4fab72c1 - languageName: node - linkType: hard - -"@babel/types@npm:^7.17.0, @babel/types@npm:^7.25.0, @babel/types@npm:^7.25.2": +"@babel/types@npm:^7.0.0, @babel/types@npm:^7.11.5, @babel/types@npm:^7.17.0, @babel/types@npm:^7.18.9, @babel/types@npm:^7.2.0, @babel/types@npm:^7.20.7, @babel/types@npm:^7.22.5, @babel/types@npm:^7.23.0, @babel/types@npm:^7.23.4, @babel/types@npm:^7.23.6, @babel/types@npm:^7.23.9, @babel/types@npm:^7.24.0, @babel/types@npm:^7.24.7, @babel/types@npm:^7.25.0, @babel/types@npm:^7.25.2, @babel/types@npm:^7.4.4, @babel/types@npm:^7.6.1, @babel/types@npm:^7.7.2, @babel/types@npm:^7.9.6": version: 7.25.2 resolution: "@babel/types@npm:7.25.2" dependencies: @@ -3187,17 +2312,6 @@ __metadata: languageName: node linkType: hard -"@babel/types@npm:^7.22.15, @babel/types@npm:^7.23.0, @babel/types@npm:^7.23.4": - version: 7.24.0 - resolution: "@babel/types@npm:7.24.0" - 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: 10c0/777a0bb5dbe038ca4c905fdafb1cdb6bdd10fe9d63ce13eca0bd91909363cbad554a53dc1f902004b78c1dcbc742056f877f2c99eeedff647333b1fadf51235d - languageName: node - linkType: hard - "@base2/pretty-print-object@npm:1.0.1": version: 1.0.1 resolution: "@base2/pretty-print-object@npm:1.0.1" @@ -6942,7 +6056,6 @@ __metadata: browser-dtector: "npm:^3.4.0" camelcase: "npm:^8.0.0" chai: "npm:^4.4.1" - chalk: "npm:^5.3.0" cli-table3: "npm:^0.6.1" commander: "npm:^12.1.0" comment-parser: "npm:^1.4.1" @@ -7220,7 +6333,7 @@ __metadata: languageName: unknown linkType: soft -"@storybook/icons@npm:^1.2.10": +"@storybook/icons@npm:^1.2.10, @storybook/icons@npm:^1.2.5": version: 1.2.10 resolution: "@storybook/icons@npm:1.2.10" peerDependencies: @@ -7230,16 +6343,6 @@ __metadata: languageName: node linkType: hard -"@storybook/icons@npm:^1.2.5": - version: 1.2.5 - resolution: "@storybook/icons@npm:1.2.5" - peerDependencies: - react: ^16.8.0 || ^17.0.0 || ^18.0.0 - react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 - checksum: 10c0/089622af6de4ab82624d894fbe43688a0eb72f15e6bb8fc19c54fb9f9d7312ce7caf34acebcbd63319dbaef129d8547bc23a5600955d04f6034355e7d82dcfa1 - languageName: node - linkType: hard - "@storybook/instrumenter@workspace:*, @storybook/instrumenter@workspace:lib/instrumenter": version: 0.0.0-use.local resolution: "@storybook/instrumenter@workspace:lib/instrumenter" @@ -10523,16 +9626,7 @@ __metadata: languageName: node linkType: hard -"acorn@npm:^8.0.0, acorn@npm:^8.10.0, acorn@npm:^8.11.2, acorn@npm:^8.11.3, acorn@npm:^8.4.1, acorn@npm:^8.6.0, acorn@npm:^8.7.1, acorn@npm:^8.8.2, acorn@npm:^8.9.0": - version: 8.11.3 - resolution: "acorn@npm:8.11.3" - bin: - acorn: bin/acorn - checksum: 10c0/3ff155f8812e4a746fee8ecff1f227d527c4c45655bb1fad6347c3cb58e46190598217551b1500f18542d2bbe5c87120cb6927f5a074a59166fbdd9468f0a299 - languageName: node - linkType: hard - -"acorn@npm:^8.12.1": +"acorn@npm:^8.0.0, acorn@npm:^8.10.0, acorn@npm:^8.11.2, acorn@npm:^8.11.3, acorn@npm:^8.12.1, acorn@npm:^8.4.1, acorn@npm:^8.6.0, acorn@npm:^8.7.1, acorn@npm:^8.8.2, acorn@npm:^8.9.0": version: 8.12.1 resolution: "acorn@npm:8.12.1" bin: @@ -11220,7 +10314,7 @@ __metadata: languageName: node linkType: hard -"available-typed-arrays@npm:^1.0.6, available-typed-arrays@npm:^1.0.7": +"available-typed-arrays@npm:^1.0.7": version: 1.0.7 resolution: "available-typed-arrays@npm:1.0.7" dependencies: @@ -11770,16 +10864,7 @@ __metadata: languageName: node linkType: hard -"braces@npm:^3.0.2, braces@npm:~3.0.2": - version: 3.0.2 - resolution: "braces@npm:3.0.2" - dependencies: - fill-range: "npm:^7.0.1" - checksum: 10c0/321b4d675791479293264019156ca322163f02dc06e3c4cab33bb15cd43d80b51efef69b0930cfde3acd63d126ebca24cd0544fa6f261e093a0fb41ab9dda381 - languageName: node - linkType: hard - -"braces@npm:^3.0.3": +"braces@npm:^3.0.2, braces@npm:^3.0.3, braces@npm:~3.0.2": version: 3.0.3 resolution: "braces@npm:3.0.3" dependencies: @@ -16219,15 +15304,6 @@ __metadata: languageName: node linkType: hard -"fill-range@npm:^7.0.1": - version: 7.0.1 - resolution: "fill-range@npm:7.0.1" - dependencies: - to-regex-range: "npm:^5.0.1" - checksum: 10c0/7cdad7d426ffbaadf45aeb5d15ec675bbd77f7597ad5399e3d2766987ed20bda24d5fac64b3ee79d93276f5865608bb22344a26b9b1ae6c4d00bd94bf611623f - languageName: node - linkType: hard - "fill-range@npm:^7.1.1": version: 7.1.1 resolution: "fill-range@npm:7.1.1" @@ -17458,7 +16534,7 @@ __metadata: languageName: node linkType: hard -"has-tostringtag@npm:^1.0.0, has-tostringtag@npm:^1.0.1, has-tostringtag@npm:^1.0.2": +"has-tostringtag@npm:^1.0.0, has-tostringtag@npm:^1.0.2": version: 1.0.2 resolution: "has-tostringtag@npm:1.0.2" dependencies: @@ -20266,14 +19342,7 @@ __metadata: languageName: node linkType: hard -"lru-cache@npm:^10.0.1": - version: 10.1.0 - resolution: "lru-cache@npm:10.1.0" - checksum: 10c0/778bc8b2626daccd75f24c4b4d10632496e21ba064b126f526c626fbdbc5b28c472013fccd45d7646b9e1ef052444824854aed617b59cd570d01a8b7d651fc1e - languageName: node - linkType: hard - -"lru-cache@npm:^10.2.0": +"lru-cache@npm:^10.0.1, lru-cache@npm:^10.2.0": version: 10.4.3 resolution: "lru-cache@npm:10.4.3" checksum: 10c0/ebd04fbca961e6c1d6c0af3799adcc966a1babe798f685bb84e6599266599cd95d94630b10262f5424539bc4640107e8a33aa28585374abf561d30d16f4b39fb @@ -23556,14 +22625,7 @@ __metadata: languageName: node linkType: hard -"picocolors@npm:^1.0.0, picocolors@npm:^1.0.1": - version: 1.0.1 - resolution: "picocolors@npm:1.0.1" - checksum: 10c0/c63cdad2bf812ef0d66c8db29583802355d4ca67b9285d846f390cc15c2f6ccb94e8cb7eb6a6e97fc5990a6d3ad4ae42d86c84d3146e667c739a4234ed50d400 - languageName: node - linkType: hard - -"picocolors@npm:^1.1.0": +"picocolors@npm:^1.0.0, picocolors@npm:^1.0.1, picocolors@npm:^1.1.0": version: 1.1.0 resolution: "picocolors@npm:1.1.0" checksum: 10c0/86946f6032148801ef09c051c6fb13b5cf942eaf147e30ea79edb91dd32d700934edebe782a1078ff859fb2b816792e97ef4dab03d7f0b804f6b01a0df35e023 @@ -30212,20 +29274,7 @@ __metadata: languageName: node linkType: hard -"which-typed-array@npm:^1.1.14, which-typed-array@npm:^1.1.2, which-typed-array@npm:^1.1.9": - version: 1.1.14 - resolution: "which-typed-array@npm:1.1.14" - dependencies: - available-typed-arrays: "npm:^1.0.6" - call-bind: "npm:^1.0.5" - for-each: "npm:^0.3.3" - gopd: "npm:^1.0.1" - has-tostringtag: "npm:^1.0.1" - checksum: 10c0/0960f1e77807058819451b98c51d4cd72031593e8de990b24bd3fc22e176f5eee22921d68d852297c786aec117689f0423ed20aa4fde7ce2704d680677891f56 - languageName: node - linkType: hard - -"which-typed-array@npm:^1.1.15": +"which-typed-array@npm:^1.1.14, which-typed-array@npm:^1.1.15, which-typed-array@npm:^1.1.2, which-typed-array@npm:^1.1.9": version: 1.1.15 resolution: "which-typed-array@npm:1.1.15" dependencies: @@ -30411,22 +29460,7 @@ __metadata: languageName: node linkType: hard -"ws@npm:^8.13.0, ws@npm:^8.2.3": - version: 8.16.0 - resolution: "ws@npm:8.16.0" - peerDependencies: - bufferutil: ^4.0.1 - utf-8-validate: ">=5.0.2" - peerDependenciesMeta: - bufferutil: - optional: true - utf-8-validate: - optional: true - checksum: 10c0/a7783bb421c648b1e622b423409cb2a58ac5839521d2f689e84bc9dc41d59379c692dd405b15a997ea1d4c0c2e5314ad707332d0c558f15232d2bc07c0b4618a - languageName: node - linkType: hard - -"ws@npm:^8.18.0": +"ws@npm:^8.13.0, ws@npm:^8.18.0, ws@npm:^8.2.3": version: 8.18.0 resolution: "ws@npm:8.18.0" peerDependencies: diff --git a/scripts/build-package.ts b/scripts/build-package.ts index 60ac5b012e13..96ddb84c2fbc 100644 --- a/scripts/build-package.ts +++ b/scripts/build-package.ts @@ -1,8 +1,8 @@ -import chalk from 'chalk'; import { program } from 'commander'; import { execaCommand } from 'execa'; import { readJSON } from 'fs-extra'; import { posix, resolve, sep } from 'path'; +import picocolors from 'picocolors'; import prompts from 'prompts'; import windowSize from 'window-size'; @@ -63,7 +63,9 @@ async function run() { ...packageTasks, }; - const main = program.version('5.0.0').option('--all', `build everything ${chalk.gray('(all)')}`); + const main = program + .version('5.0.0') + .option('--all', `build everything ${picocolors.gray('(all)')}`); Object.keys(tasks) .reduce((acc, key) => acc.option(tasks[key].suffix, tasks[key].helpText), main) @@ -154,10 +156,10 @@ async function run() { ); sub.stdout?.on('data', (data) => { - process.stdout.write(`${chalk.cyan(v.name)}:\n${data}`); + process.stdout.write(`${picocolors.cyan(v.name)}:\n${data}`); }); sub.stderr?.on('data', (data) => { - process.stderr.write(`${chalk.red(v.name)}:\n${data}`); + process.stderr.write(`${picocolors.red(v.name)}:\n${data}`); }); }); } diff --git a/scripts/check-package.ts b/scripts/check-package.ts index c8873e6cf846..8b9c49985fb5 100644 --- a/scripts/check-package.ts +++ b/scripts/check-package.ts @@ -1,11 +1,11 @@ // This script makes sure that we can support type checking, // without having to build dts files for all packages in the monorepo. // It is not implemented yet for angular, svelte and vue. -import chalk from 'chalk'; import { program } from 'commander'; import { execaCommand } from 'execa'; import { readJSON } from 'fs-extra'; import { resolve } from 'path'; +import picocolors from 'picocolors'; import prompts from 'prompts'; import windowSize from 'window-size'; @@ -53,7 +53,9 @@ async function run() { ...packageTasks, }; - const main = program.version('5.0.0').option('--all', `check everything ${chalk.gray('(all)')}`); + const main = program + .version('5.0.0') + .option('--all', `check everything ${picocolors.gray('(all)')}`); Object.keys(tasks) .reduce((acc, key) => acc.option(tasks[key].suffix, tasks[key].helpText), main) @@ -122,10 +124,10 @@ async function run() { }); sub.stdout.on('data', (data) => { - process.stdout.write(`${chalk.cyan(v.name)}:\n${data}`); + process.stdout.write(`${picocolors.cyan(v.name)}:\n${data}`); }); sub.stderr.on('data', (data) => { - process.stderr.write(`${chalk.red(v.name)}:\n${data}`); + process.stderr.write(`${picocolors.red(v.name)}:\n${data}`); }); }); } diff --git a/scripts/dangerfile.ts b/scripts/dangerfile.ts index 51a144e550cf..93382ae441cf 100644 --- a/scripts/dangerfile.ts +++ b/scripts/dangerfile.ts @@ -1,4 +1,4 @@ -/* eslint-disable import/extensions */ +/* eslint-disable import/no-extraneous-dependencies, import/extensions */ import { execSync } from 'child_process'; import { danger, fail } from 'danger'; diff --git a/scripts/event-log-checker.ts b/scripts/event-log-checker.ts index 4893eaeb449c..cb85959503aa 100644 --- a/scripts/event-log-checker.ts +++ b/scripts/event-log-checker.ts @@ -1,5 +1,5 @@ import assert from 'assert'; -import chalk from 'chalk'; +import picocolors from 'picocolors'; import versions from '../code/core/src/common/versions'; import { oneWayHash } from '../code/core/src/telemetry/one-way-hash'; @@ -89,8 +89,8 @@ async function run() { }); } catch (err) { if (err instanceof assert.AssertionError) { - console.log(`Assertions failed for ${chalk.bold(templateName)}\n`); - console.log(chalk.bold(chalk.red`✕ ${testMessage}:`)); + console.log(`Assertions failed for ${picocolors.bold(templateName)}\n`); + console.log(picocolors.bold(picocolors.red`✕ ${testMessage}:`)); console.log(err); process.exit(1); } diff --git a/scripts/get-template.ts b/scripts/get-template.ts index 28b390c665bd..728632392489 100644 --- a/scripts/get-template.ts +++ b/scripts/get-template.ts @@ -1,7 +1,7 @@ -import chalk from 'chalk'; import { program } from 'commander'; import { pathExists, readFile } from 'fs-extra'; import { readdir } from 'fs/promises'; +import picocolors from 'picocolors'; import { dedent } from 'ts-dedent'; import yaml from 'yaml'; @@ -103,7 +103,7 @@ async function checkParallelism(cadence?: Cadence, scriptName?: TaskKey) { let isIncorrect = false; cadences.forEach((cad) => { - summary.push(`\n${chalk.bold(cad)}`); + summary.push(`\n${picocolors.bold(cad)}`); const cadenceTemplates = Object.entries(allTemplates).filter(([key]) => templatesByCadence[cad].includes(key as TemplateKey) ); @@ -129,7 +129,7 @@ async function checkParallelism(cadence?: Cadence, scriptName?: TaskKey) { if (newParallelism !== currentParallelism) { summary.push( - `-- ❌ ${tasksMap[script]} - parallelism: ${currentParallelism} ${chalk.bgRed( + `-- ❌ ${tasksMap[script]} - parallelism: ${currentParallelism} ${picocolors.bgRed( `(should be ${newParallelism})` )}` ); diff --git a/scripts/knip.config.ts b/scripts/knip.config.ts index e9a90982e3cb..ef23f8c556bd 100644 --- a/scripts/knip.config.ts +++ b/scripts/knip.config.ts @@ -70,7 +70,10 @@ const baseConfig = { export const addBundlerEntries = async (config: KnipConfig) => { const baseDir = join(__dirname, '../code'); const rootManifest = await import(join(baseDir, 'package.json')); - const workspaceDirs = await fg(rootManifest.workspaces.packages, { cwd: baseDir, onlyDirectories: true }); + const workspaceDirs = await fg(rootManifest.workspaces.packages, { + cwd: baseDir, + onlyDirectories: true, + }); const workspaceDirectories = workspaceDirs.map((dir) => relative(baseDir, join(baseDir, dir))); for (const wsDir of workspaceDirectories) { for (const configKey of Object.keys(baseConfig.workspaces)) { diff --git a/scripts/package.json b/scripts/package.json index 456ba6c06038..21507314596a 100644 --- a/scripts/package.json +++ b/scripts/package.json @@ -96,7 +96,6 @@ "@vitest/coverage-v8": "^2.0.5", "ansi-regex": "^6.0.1", "browser-assert": "^1.2.1", - "chalk": "^4.1.0", "chromatic": "^11.5.5", "codecov": "^3.8.1", "commander": "^12.1.0", @@ -138,11 +137,13 @@ "knip": "^5.30.1", "lint-staged": "^15.2.7", "memoizerific": "^1.11.3", + "minimatch": "^10.0.1", "node-gyp": "^9.3.1", "nx": "18.0.6", "ora": "^5.4.1", "p-limit": "^3.1.0", "p-retry": "^5.1.2", + "picocolors": "^1.1.0", "playwright": "1.46.0", "playwright-core": "1.46.0", "prettier": "^3.3.2", diff --git a/scripts/prepare/tools.ts b/scripts/prepare/tools.ts index 5b81ed2b3f62..eb4214a945ba 100644 --- a/scripts/prepare/tools.ts +++ b/scripts/prepare/tools.ts @@ -3,12 +3,12 @@ import { dirname, join } from 'node:path'; import * as process from 'node:process'; import { globalExternals } from '@fal-works/esbuild-plugin-global-externals'; -import chalk from 'chalk'; import { spawn } from 'cross-spawn'; import * as esbuild from 'esbuild'; import { readJson } from 'fs-extra'; import { glob } from 'glob'; import limit from 'p-limit'; +import picocolors from 'picocolors'; import * as prettier from 'prettier'; import prettyTime from 'pretty-hrtime'; import * as rollup from 'rollup'; @@ -103,7 +103,7 @@ export { process, esbuild, prettyTime, - chalk, + picocolors, dedent, limit, sortPackageJson, diff --git a/scripts/release/cancel-preparation-runs.ts b/scripts/release/cancel-preparation-runs.ts index aa5916de8208..b3d922dbef5a 100644 --- a/scripts/release/cancel-preparation-runs.ts +++ b/scripts/release/cancel-preparation-runs.ts @@ -2,8 +2,8 @@ * This script cancels all running preparation workflows in GitHub. It will fetch all active runs * for the preparation workflows, and cancel them. */ -import chalk from 'chalk'; import { program } from 'commander'; +import picocolors from 'picocolors'; import { dedent } from 'ts-dedent'; import { esMain } from '../utils/esmain'; @@ -35,12 +35,12 @@ export const run = async () => { )?.id; console.log(`Found workflow IDs for the preparation workflows: - ${chalk.blue(PREPARE_PATCH_WORKFLOW_PATH)}: ${chalk.green(preparePatchWorkflowId)} - ${chalk.blue(PREPARE_NON_PATCH_WORKFLOW_PATH)}: ${chalk.green(prepareNonPatchWorkflowId)}`); + ${picocolors.blue(PREPARE_PATCH_WORKFLOW_PATH)}: ${picocolors.green(preparePatchWorkflowId)} + ${picocolors.blue(PREPARE_NON_PATCH_WORKFLOW_PATH)}: ${picocolors.green(prepareNonPatchWorkflowId)}`); if (!preparePatchWorkflowId || !prepareNonPatchWorkflowId) { throw new Error(dedent`🚨 Could not find workflow IDs for the preparation workflows - - Looked for paths: "${chalk.blue(PREPARE_PATCH_WORKFLOW_PATH)}" and "${chalk.blue( + - Looked for paths: "${picocolors.blue(PREPARE_PATCH_WORKFLOW_PATH)}" and "${picocolors.blue( PREPARE_NON_PATCH_WORKFLOW_PATH )}", are they still correct? - Found workflows: @@ -75,7 +75,10 @@ export const run = async () => { console.log(`🔍 Found ${runsToCancel.length} runs to cancel. Cancelling them now: ${runsToCancel - .map((r) => `${chalk.green(r.path)} - ${chalk.green(r.id)}: ${chalk.blue(r.status)}`) + .map( + (r) => + `${picocolors.green(r.path)} - ${picocolors.green(r.id)}: ${picocolors.blue(r.status)}` + ) .join('\n ')}`); const result = await Promise.allSettled( diff --git a/scripts/release/generate-pr-description.ts b/scripts/release/generate-pr-description.ts index f1a79da2d6db..0d569e20e01b 100644 --- a/scripts/release/generate-pr-description.ts +++ b/scripts/release/generate-pr-description.ts @@ -1,6 +1,6 @@ import { setOutput } from '@actions/core'; -import chalk from 'chalk'; import { program } from 'commander'; +import picocolors from 'picocolors'; import semver from 'semver'; import { dedent } from 'ts-dedent'; import { z } from 'zod'; @@ -246,9 +246,9 @@ export const run = async (rawOptions: unknown) => { const currentVersion = options.currentVersion || (await getCurrentVersion()); console.log( - `💬 Generating PR description for ${chalk.blue(nextVersion)} between ${chalk.green( + `💬 Generating PR description for ${picocolors.blue(nextVersion)} between ${picocolors.green( currentVersion - )} and ${chalk.green('HEAD')}` + )} and ${picocolors.green('HEAD')}` ); const { changes, changelogText } = await getChanges({ @@ -289,7 +289,7 @@ export const run = async (rawOptions: unknown) => { if (process.env.GITHUB_ACTIONS === 'true') { setOutput('description', description); } - console.log(`✅ Generated PR description for ${chalk.blue(nextVersion)}`); + console.log(`✅ Generated PR description for ${picocolors.blue(nextVersion)}`); if (verbose) { console.log(description); } diff --git a/scripts/release/get-changelog-from-file.ts b/scripts/release/get-changelog-from-file.ts index f428310cc656..354605e04644 100644 --- a/scripts/release/get-changelog-from-file.ts +++ b/scripts/release/get-changelog-from-file.ts @@ -1,9 +1,9 @@ import { join } from 'node:path'; import { setOutput } from '@actions/core'; -import chalk from 'chalk'; import { program } from 'commander'; import { readFile } from 'fs-extra'; +import picocolors from 'picocolors'; import semver from 'semver'; import { dedent } from 'ts-dedent'; @@ -29,13 +29,13 @@ export const getChangelogFromFile = async (args: { const changelogFilename = isPrerelease ? 'CHANGELOG.prerelease.md' : 'CHANGELOG.md'; const changelogPath = join(__dirname, '..', '..', changelogFilename); - console.log(`📝 Getting changelog from ${chalk.blue(changelogPath)}`); + console.log(`📝 Getting changelog from ${picocolors.blue(changelogPath)}`); const fullChangelog = await readFile(changelogPath, 'utf-8'); const changelogForVersion = fullChangelog.split(/(^|\n)## /).find((v) => v.startsWith(version)); if (!changelogForVersion) { throw new Error( - `Could not find changelog entry for version ${chalk.blue(version)} in ${chalk.green( + `Could not find changelog entry for version ${picocolors.blue(version)} in ${picocolors.green( changelogPath )}` ); diff --git a/scripts/release/get-current-version.ts b/scripts/release/get-current-version.ts index f640ccb5907e..8530f6cf9646 100644 --- a/scripts/release/get-current-version.ts +++ b/scripts/release/get-current-version.ts @@ -1,8 +1,8 @@ import { join } from 'node:path'; import { setOutput } from '@actions/core'; -import chalk from 'chalk'; import { readJson } from 'fs-extra'; +import picocolors from 'picocolors'; import { esMain } from '../utils/esmain'; @@ -15,7 +15,7 @@ export const getCurrentVersion = async () => { if (process.env.GITHUB_ACTIONS === 'true') { setOutput('current-version', version); } - console.log(`📦 Current version is ${chalk.green(version)}`); + console.log(`📦 Current version is ${picocolors.green(version)}`); return version; }; diff --git a/scripts/release/get-version-changelog.ts b/scripts/release/get-version-changelog.ts index 6e1af6a7b5b7..e85ac5257643 100644 --- a/scripts/release/get-version-changelog.ts +++ b/scripts/release/get-version-changelog.ts @@ -1,6 +1,6 @@ import { setOutput } from '@actions/core'; -import chalk from 'chalk'; import { program } from 'commander'; +import picocolors from 'picocolors'; import { esMain } from '../utils/esmain'; import { getCurrentVersion } from './get-current-version'; @@ -17,7 +17,7 @@ program export const getVersionChangelog = async (args: { version?: string; verbose?: boolean }) => { const version = args.version || (await getCurrentVersion()); - console.log(`📝 Getting changelog for version ${chalk.blue(version)}`); + console.log(`📝 Getting changelog for version ${picocolors.blue(version)}`); const { changelogText } = await getChanges({ from: version, version, verbose: args.verbose }); diff --git a/scripts/release/is-pr-frozen.ts b/scripts/release/is-pr-frozen.ts index af5a957af8ae..d8c80708fc71 100644 --- a/scripts/release/is-pr-frozen.ts +++ b/scripts/release/is-pr-frozen.ts @@ -1,9 +1,9 @@ import { join } from 'node:path'; import { setOutput } from '@actions/core'; -import chalk from 'chalk'; import { program } from 'commander'; import { readJson } from 'fs-extra'; +import picocolors from 'picocolors'; import { esMain } from '../utils/esmain'; import { getPullInfoFromCommit } from './utils/get-github-info'; @@ -39,7 +39,7 @@ const getRepo = async (verbose?: boolean): Promise => { const pushUrl = originRemote.refs.push; const repo = pushUrl.replace(/\.git$/, '').replace(/.*:(\/\/github\.com\/)*/, ''); if (verbose) { - console.log(`📦 Extracted repo: ${chalk.blue(repo)}`); + console.log(`📦 Extracted repo: ${picocolors.blue(repo)}`); } return repo; }; @@ -50,7 +50,7 @@ export const run = async (options: unknown) => { const version = await getCurrentVersion(); const branch = `version-${patch ? 'patch' : 'non-patch'}-from-${version}`; - console.log(`💬 Determining if pull request from branch '${chalk.blue(branch)}' is frozen`); + console.log(`💬 Determining if pull request from branch '${picocolors.blue(branch)}' is frozen`); console.log(`⬇️ Fetching remote 'origin/${branch}'...`); try { diff --git a/scripts/release/is-prerelease.ts b/scripts/release/is-prerelease.ts index d92f17279b82..65b2ddf0ddc7 100644 --- a/scripts/release/is-prerelease.ts +++ b/scripts/release/is-prerelease.ts @@ -1,6 +1,6 @@ import { setOutput } from '@actions/core'; -import chalk from 'chalk'; import { program } from 'commander'; +import picocolors from 'picocolors'; import semver from 'semver'; import { esMain } from '../utils/esmain'; @@ -17,10 +17,10 @@ program export const isPrerelease = async (args: { version?: string; verbose?: boolean }) => { if (args.verbose) { if (args.version) { - console.log(`📦 Checking if version ${chalk.blue(args.version)} is a prerelease`); + console.log(`📦 Checking if version ${picocolors.blue(args.version)} is a prerelease`); } else { console.log( - `📦 Checking if current version in ${chalk.blue('code/package.json')} is a prerelease` + `📦 Checking if current version in ${picocolors.blue('code/package.json')} is a prerelease` ); } } @@ -31,8 +31,8 @@ export const isPrerelease = async (args: { version?: string; verbose?: boolean } setOutput('prerelease', result); } console.log( - `📦 Version ${chalk.blue(version)} ${ - result ? chalk.green('IS') : chalk.red('IS NOT') + `📦 Version ${picocolors.blue(version)} ${ + result ? picocolors.green('IS') : picocolors.red('IS NOT') } a prerelease` ); diff --git a/scripts/release/is-version-published.ts b/scripts/release/is-version-published.ts index 6af757eb654c..a6a6891b2124 100644 --- a/scripts/release/is-version-published.ts +++ b/scripts/release/is-version-published.ts @@ -1,6 +1,6 @@ import { setOutput } from '@actions/core'; -import chalk from 'chalk'; import { program } from 'commander'; +import picocolors from 'picocolors'; import { esMain } from '../utils/esmain'; import { getCurrentVersion } from './get-current-version'; @@ -19,12 +19,14 @@ const isVersionPublished = async ({ version: string; verbose?: boolean; }) => { - const prettyPackage = `${chalk.blue(packageName)}@${chalk.green(version)}`; + const prettyPackage = `${picocolors.blue(packageName)}@${picocolors.green(version)}`; console.log(`⛅ Checking if ${prettyPackage} is published...`); if (verbose) { console.log(`Fetching from npm:`); - console.log(`https://registry.npmjs.org/${chalk.blue(packageName)}/${chalk.green(version)}`); + console.log( + `https://registry.npmjs.org/${picocolors.blue(packageName)}/${picocolors.green(version)}` + ); } const response = await fetch(`https://registry.npmjs.org/${packageName}/${version}`); if (response.status === 404) { diff --git a/scripts/release/pick-patches.ts b/scripts/release/pick-patches.ts index 824f8c6d0cd9..33a94a332d12 100644 --- a/scripts/release/pick-patches.ts +++ b/scripts/release/pick-patches.ts @@ -1,7 +1,7 @@ import { setOutput } from '@actions/core'; -import chalk from 'chalk'; import { program } from 'commander'; import ora from 'ora'; +import picocolors from 'picocolors'; import invariant from 'tiny-invariant'; import { esMain } from '../utils/esmain'; @@ -25,7 +25,7 @@ interface PR { } function formatPR(pr: PR): string { - return `https://github.com/${OWNER}/${REPO}/pull/${pr.number} "${pr.title}" ${chalk.yellow( + return `https://github.com/${OWNER}/${REPO}/pull/${pr.number} "${pr.title}" ${picocolors.yellow( pr.mergeCommit )}`; } @@ -71,7 +71,7 @@ export const run = async (_: unknown) => { } failedCherryPicks.push(pr.mergeCommit); prSpinner.info( - `This PR can be picked manually with: ${chalk.grey( + `This PR can be picked manually with: ${picocolors.grey( `git cherry-pick -m1 -x ${pr.mergeCommit}` )}` ); diff --git a/scripts/release/publish.ts b/scripts/release/publish.ts index 65347010181d..83839dd4a003 100644 --- a/scripts/release/publish.ts +++ b/scripts/release/publish.ts @@ -1,10 +1,10 @@ import { join } from 'node:path'; -import chalk from 'chalk'; import { program } from 'commander'; import { execaCommand } from 'execa'; import { readJson } from 'fs-extra'; import pRetry from 'p-retry'; +import picocolors from 'picocolors'; import semver from 'semver'; import dedent from 'ts-dedent'; import { z } from 'zod'; @@ -51,7 +51,7 @@ const getCurrentVersion = async (verbose?: boolean) => { console.log(`📐 Reading current version of Storybook...`); } const { version } = await readJson(CODE_PACKAGE_JSON_PATH); - console.log(`📐 Current version of Storybook is ${chalk.green(version)}`); + console.log(`📐 Current version of Storybook is ${picocolors.green(version)}`); return version; }; @@ -64,13 +64,13 @@ const isCurrentVersionPublished = async ({ currentVersion: string; verbose?: boolean; }) => { - const prettyPackage = `${chalk.blue(packageName)}@${chalk.green(currentVersion)}`; + const prettyPackage = `${picocolors.blue(packageName)}@${picocolors.green(currentVersion)}`; console.log(`⛅ Checking if ${prettyPackage} is published...`); if (verbose) { console.log(`Fetching from npm:`); console.log( - `https://registry.npmjs.org/${chalk.blue(packageName)}/${chalk.green(currentVersion)}` + `https://registry.npmjs.org/${picocolors.blue(packageName)}/${picocolors.green(currentVersion)}` ); } const response = await fetch(`https://registry.npmjs.org/${packageName}/${currentVersion}`); @@ -133,7 +133,7 @@ const publishAllPackages = async ({ } if (dryRun) { console.log(`📦 Dry run, skipping publish. Would have executed: - ${chalk.blue(command)}`); + ${picocolors.blue(command)}`); return; } @@ -155,7 +155,7 @@ const publishAllPackages = async ({ retries: 4, onFailedAttempt: (error) => console.log( - chalk.yellow( + picocolors.yellow( dedent`❗One or more packages failed to publish, retrying... This was attempt number ${error.attemptNumber}, there are ${error.retriesLeft} retries left. 🤞` ) @@ -180,15 +180,15 @@ export const run = async (options: unknown) => { }); if (isAlreadyPublished) { throw new Error( - `⛔ Current version (${chalk.green(currentVersion)}) is already published, aborting.` + `⛔ Current version (${picocolors.green(currentVersion)}) is already published, aborting.` ); } await buildAllPackages(); await publishAllPackages({ tag, verbose, dryRun }); console.log( - `✅ Published all packages with version ${chalk.green(currentVersion)}${ - tag ? ` at tag ${chalk.blue(tag)}` : '' + `✅ Published all packages with version ${picocolors.green(currentVersion)}${ + tag ? ` at tag ${picocolors.blue(tag)}` : '' }` ); }; diff --git a/scripts/release/unreleased-changes-exists.ts b/scripts/release/unreleased-changes-exists.ts index 217bfa033a47..ad869461107b 100644 --- a/scripts/release/unreleased-changes-exists.ts +++ b/scripts/release/unreleased-changes-exists.ts @@ -1,7 +1,7 @@ import { setOutput } from '@actions/core'; -import chalk from 'chalk'; import { program } from 'commander'; import { intersection } from 'es-toolkit'; +import picocolors from 'picocolors'; import { z } from 'zod'; import { esMain } from '../utils/esmain'; @@ -68,11 +68,11 @@ export const run = async ( } if (hasChangesToRelease) { console.log( - `${chalk.green('🦋 The following changes are releasable')}: -${chalk.blue(changesToRelease.map(({ title, pull }) => ` #${pull}: ${title}`).join('\n'))}` + `${picocolors.green('🦋 The following changes are releasable')}: +${picocolors.blue(changesToRelease.map(({ title, pull }) => ` #${pull}: ${title}`).join('\n'))}` ); } else { - console.log(chalk.red('🫙 No changes to release!')); + console.log(picocolors.red('🫙 No changes to release!')); } return { changesToRelease, hasChangesToRelease }; diff --git a/scripts/release/utils/get-changes.ts b/scripts/release/utils/get-changes.ts index 5588a10eba52..f7f255ddd451 100644 --- a/scripts/release/utils/get-changes.ts +++ b/scripts/release/utils/get-changes.ts @@ -1,4 +1,4 @@ -import chalk from 'chalk'; +import picocolors from 'picocolors'; import semver from 'semver'; import type { PullRequestInfo } from './get-github-info'; @@ -27,13 +27,15 @@ export const LABELS_BY_IMPORTANCE = { const getCommitAt = async (id: string, verbose?: boolean) => { if (!semver.valid(id)) { - console.log(`🔍 ${chalk.red(id)} is not a valid semver string, assuming it is a commit hash`); + console.log( + `🔍 ${picocolors.red(id)} is not a valid semver string, assuming it is a commit hash` + ); return id; } const version = id.startsWith('v') ? id : `v${id}`; const commitSha = (await git.raw(['rev-list', '-n', '1', version])).split('\n')[0]; if (verbose) { - console.log(`🔍 Commit at tag ${chalk.green(version)}: ${chalk.blue(commitSha)}`); + console.log(`🔍 Commit at tag ${picocolors.green(version)}: ${picocolors.blue(commitSha)}`); } return commitSha; }; @@ -50,12 +52,12 @@ export const getFromCommit = async (from?: string | undefined, verbose?: boolean } actualFrom = latest; if (verbose) { - console.log(`🔍 No 'from' specified, found latest tag: ${chalk.blue(latest)}`); + console.log(`🔍 No 'from' specified, found latest tag: ${picocolors.blue(latest)}`); } } const commit = await getCommitAt(actualFrom!, verbose); if (verbose) { - console.log(`🔍 Found 'from' commit: ${chalk.blue(commit)}`); + console.log(`🔍 Found 'from' commit: ${picocolors.blue(commit)}`); } return commit; }; @@ -64,14 +66,14 @@ export const getToCommit = async (to?: string | undefined, verbose?: boolean) => if (!to) { const head = await git.revparse('HEAD'); if (verbose) { - console.log(`🔍 No 'to' specified, HEAD is at commit: ${chalk.blue(head)}`); + console.log(`🔍 No 'to' specified, HEAD is at commit: ${picocolors.blue(head)}`); } return head; } const commit = await getCommitAt(to, verbose); if (verbose) { - console.log(`🔍 Found 'to' commit: ${chalk.blue(commit)}`); + console.log(`🔍 Found 'to' commit: ${picocolors.blue(commit)}`); } return commit; }; @@ -88,9 +90,9 @@ export const getAllCommitsBetween = async ({ const logResult = await git.log({ from, to, '--first-parent': null }); if (verbose) { console.log( - `🔍 Found ${chalk.blue(logResult.total)} commits between ${chalk.green( + `🔍 Found ${picocolors.blue(logResult.total)} commits between ${picocolors.green( `${from}` - )} and ${chalk.green(`${to}`)}:` + )} and ${picocolors.green(`${to}`)}:` ); console.dir(logResult.all, { depth: null, colors: true }); } @@ -110,7 +112,7 @@ export const getRepo = async (verbose?: boolean): Promise => { const pushUrl = originRemote.refs.push; const repo = pushUrl.replace(/\.git$/, '').replace(/.*:(\/\/github\.com\/)*/, ''); if (verbose) { - console.log(`📦 Extracted repo: ${chalk.blue(repo)}`); + console.log(`📦 Extracted repo: ${picocolors.blue(repo)}`); } return repo; }; @@ -234,7 +236,7 @@ export const getChanges = async ({ unpickedPatches?: boolean; verbose?: boolean; }) => { - console.log(`💬 Getting changes for ${chalk.blue(version)}`); + console.log(`💬 Getting changes for ${picocolors.blue(version)}`); let commits; if (unpickedPatches) { diff --git a/scripts/release/version.ts b/scripts/release/version.ts index 422de3501bc0..34019fd561a2 100644 --- a/scripts/release/version.ts +++ b/scripts/release/version.ts @@ -1,10 +1,10 @@ import { join } from 'node:path'; import { setOutput } from '@actions/core'; -import chalk from 'chalk'; import { program } from 'commander'; import { execaCommand } from 'execa'; import { readFile, readJson, writeFile, writeJson } from 'fs-extra'; +import picocolors from 'picocolors'; import semver from 'semver'; import { z } from 'zod'; @@ -116,14 +116,14 @@ const getCurrentVersion = async () => { }; const bumpCodeVersion = async (nextVersion: string) => { - console.log(`🤜 Bumping version of ${chalk.cyan('code')}'s package.json...`); + console.log(`🤜 Bumping version of ${picocolors.cyan('code')}'s package.json...`); const codePkgJson = await readJson(CODE_PACKAGE_JSON_PATH); codePkgJson.version = nextVersion; await writeJson(CODE_PACKAGE_JSON_PATH, codePkgJson, { spaces: 2 }); - console.log(`✅ Bumped version of ${chalk.cyan('code')}'s package.json`); + console.log(`✅ Bumped version of ${picocolors.cyan('code')}'s package.json`); }; const bumpVersionSources = async (currentVersion: string, nextVersion: string) => { @@ -131,7 +131,7 @@ const bumpVersionSources = async (currentVersion: string, nextVersion: string) = join(CODE_DIR_PATH, 'core', 'src', 'manager-api', 'version.ts'), join(CODE_DIR_PATH, 'core', 'src', 'common', 'versions.ts'), ]; - console.log(`🤜 Bumping versions in...:\n ${chalk.cyan(filesToUpdate.join('\n '))}`); + console.log(`🤜 Bumping versions in...:\n ${picocolors.cyan(filesToUpdate.join('\n '))}`); await Promise.all( filesToUpdate.map(async (filename) => { @@ -141,7 +141,7 @@ const bumpVersionSources = async (currentVersion: string, nextVersion: string) = }) ); - console.log(`✅ Bumped versions in:\n ${chalk.cyan(filesToUpdate.join('\n '))}`); + console.log(`✅ Bumped versions in:\n ${picocolors.cyan(filesToUpdate.join('\n '))}`); }; const bumpAllPackageJsons = async ({ @@ -154,7 +154,7 @@ const bumpAllPackageJsons = async ({ verbose?: boolean; }) => { console.log( - `🤜 Bumping versions and dependencies in ${chalk.cyan( + `🤜 Bumping versions and dependencies in ${picocolors.cyan( `all ${packages.length} package.json` )}'s...` ); @@ -171,7 +171,7 @@ const bumpAllPackageJsons = async ({ packageJson.version = nextVersion; if (verbose) { console.log( - ` Bumping ${chalk.blue(pkg.name)}'s version to ${chalk.yellow(nextVersion)}` + ` Bumping ${picocolors.blue(pkg.name)}'s version to ${picocolors.yellow(nextVersion)}` ); } await writeJson(packageJsonPath, packageJson, { spaces: 2 }); @@ -181,15 +181,15 @@ const bumpAllPackageJsons = async ({ const bumpDeferred = async (nextVersion: string) => { console.log( - `⏳ Setting a ${chalk.cyan('deferred')} version bump with ${chalk.blue( + `⏳ Setting a ${picocolors.cyan('deferred')} version bump with ${picocolors.blue( 'code/package.json#deferredNextVersion' - )} = ${chalk.yellow(nextVersion)}...` + )} = ${picocolors.yellow(nextVersion)}...` ); const codePkgJson = await readJson(CODE_PACKAGE_JSON_PATH); if (codePkgJson.deferredNextVersion) { console.warn( - `❗ A "deferredNextVersion" property already exists with the value of ${chalk.cyan( + `❗ A "deferredNextVersion" property already exists with the value of ${picocolors.cyan( codePkgJson.deferredNextVersion )}. This will be overwritten and ignored.` ); @@ -198,12 +198,12 @@ const bumpDeferred = async (nextVersion: string) => { codePkgJson.deferredNextVersion = nextVersion; await writeJson(CODE_PACKAGE_JSON_PATH, codePkgJson, { spaces: 2 }); - console.log(`✅ Set a ${chalk.cyan('deferred')} version bump. Not bumping any packages.`); + console.log(`✅ Set a ${picocolors.cyan('deferred')} version bump. Not bumping any packages.`); }; const applyDeferredVersionBump = async () => { console.log( - `⏩ Applying previously deferred version bump set at ${chalk.blue( + `⏩ Applying previously deferred version bump set at ${picocolors.blue( 'code/package.json#deferredNextVersion' )}...` ); @@ -221,9 +221,9 @@ const applyDeferredVersionBump = async () => { await writeJson(CODE_PACKAGE_JSON_PATH, codePkgJson, { spaces: 2 }); console.log( - `✅ Extracted and removed deferred version ${chalk.green( + `✅ Extracted and removed deferred version ${picocolors.green( deferredNextVersion - )} from ${chalk.blue('code/package.json#deferredNextVersion')}` + )} from ${picocolors.blue('code/package.json#deferredNextVersion')}` ); return deferredNextVersion; @@ -240,11 +240,11 @@ export const run = async (options: unknown) => { const [packages, currentVersion] = await Promise.all([getWorkspaces(), getCurrentVersion()]); console.log( - `📦 found ${packages.length} storybook packages at version ${chalk.red(currentVersion)}` + `📦 found ${packages.length} storybook packages at version ${picocolors.red(currentVersion)}` ); if (verbose) { const formattedPackages = packages.map( - (pkg) => `${chalk.green(pkg.name.padEnd(60))}: ${chalk.cyan(pkg.location)}` + (pkg) => `${picocolors.green(pkg.name.padEnd(60))}: ${picocolors.cyan(pkg.location)}` ); console.log(`📦 Packages: ${formattedPackages.join('\n ')}`); @@ -255,42 +255,46 @@ export const run = async (options: unknown) => { if ('apply' in options && options.apply) { nextVersion = await applyDeferredVersionBump(); } else if ('exact' in options && options.exact) { - console.log(`📈 Exact version selected: ${chalk.green(options.exact)}`); + console.log(`📈 Exact version selected: ${picocolors.green(options.exact)}`); nextVersion = options.exact; } else { const { releaseType, preId } = options as BumpOptions; - console.log(`📈 Release type selected: ${chalk.green(releaseType)}`); + console.log(`📈 Release type selected: ${picocolors.green(releaseType)}`); if (preId) { - console.log(`🆔 Version prerelease identifier selected: ${chalk.yellow(preId)}`); + console.log(`🆔 Version prerelease identifier selected: ${picocolors.yellow(preId)}`); } nextVersion = semver.inc(currentVersion, releaseType, preId); console.log( - `⏭ Bumping version ${chalk.blue(currentVersion)} with release type ${chalk.green( + `⏭ Bumping version ${picocolors.blue(currentVersion)} with release type ${picocolors.green( releaseType )}${ - preId ? ` and ${chalk.yellow(preId)}` : '' - } results in version: ${chalk.bgGreenBright.bold(nextVersion)}` + preId ? ` and ${picocolors.yellow(preId)}` : '' + } results in version: ${picocolors.bgGreenBright.bold(nextVersion)}` ); } if ('deferred' in options && options.deferred) { await bumpDeferred(nextVersion); } else { - console.log(`⏭ Bumping all packages to ${chalk.blue(nextVersion)}...`); + console.log(`⏭ Bumping all packages to ${picocolors.blue(nextVersion)}...`); await bumpCodeVersion(nextVersion); await bumpVersionSources(currentVersion, nextVersion); await bumpAllPackageJsons({ packages, nextVersion, verbose }); - console.log(`⬆️ Updating lock file with ${chalk.blue('yarn install --mode=update-lockfile')}`); + console.log( + `⬆️ Updating lock file with ${picocolors.blue('yarn install --mode=update-lockfile')}` + ); await execaCommand(`yarn install --mode=update-lockfile`, { cwd: join(CODE_DIR_PATH), stdio: verbose ? 'inherit' : undefined, cleanup: true, }); - console.log(`✅ Updated lock file with ${chalk.blue('yarn install --mode=update-lockfile')}`); + console.log( + `✅ Updated lock file with ${picocolors.blue('yarn install --mode=update-lockfile')}` + ); } if (process.env.GITHUB_ACTIONS === 'true') { diff --git a/scripts/release/write-changelog.ts b/scripts/release/write-changelog.ts index 8f927b3c6434..59e0d3273958 100644 --- a/scripts/release/write-changelog.ts +++ b/scripts/release/write-changelog.ts @@ -1,8 +1,8 @@ import { join } from 'node:path'; -import chalk from 'chalk'; import { program } from 'commander'; import { readFile, writeFile, writeJson } from 'fs-extra'; +import picocolors from 'picocolors'; import semver from 'semver'; import { z } from 'zod'; @@ -47,7 +47,7 @@ const validateOptions = (args: unknown[], options: { [key: string]: any }): opti optionsSchema.parse(options); if (args.length !== 1 || !semver.valid(args[0] as string)) { console.error( - `🚨 Invalid arguments, expected a single argument with the version to generate changelog for, eg. ${chalk.green( + `🚨 Invalid arguments, expected a single argument with the version to generate changelog for, eg. ${picocolors.green( '7.1.0-beta.8' )}` ); @@ -70,7 +70,7 @@ const writeToChangelogFile = async ({ const changelogPath = join(__dirname, '..', '..', changelogFilename); if (verbose) { - console.log(`📝 Writing changelog to ${chalk.blue(changelogPath)}`); + console.log(`📝 Writing changelog to ${picocolors.blue(changelogPath)}`); } const currentChangelog = await readFile(changelogPath, 'utf-8'); @@ -93,7 +93,7 @@ const writeToDocsVersionFile = async ({ const filepath = join(__dirname, '..', '..', 'docs', 'versions', filename); if (verbose) { - console.log(`📝 Writing changelog to ${chalk.blue(filepath)}`); + console.log(`📝 Writing changelog to ${picocolors.blue(filepath)}`); } const textWithoutHeading = changelogText.split('\n').slice(2).join('\n').replaceAll('"', '\\"'); @@ -116,9 +116,9 @@ export const run = async (args: unknown[], options: unknown) => { const version = args[0] as string; console.log( - `💬 Generating changelog for ${chalk.blue(version)} between ${chalk.green( + `💬 Generating changelog for ${picocolors.blue(version)} between ${picocolors.green( from || 'latest' - )} and ${chalk.green(to || 'HEAD')}` + )} and ${picocolors.green(to || 'HEAD')}` ); const { changelogText } = await getChanges({ version, from, to, unpickedPatches, verbose }); diff --git a/scripts/run-registry.ts b/scripts/run-registry.ts index 4f837b952794..825788b24f51 100755 --- a/scripts/run-registry.ts +++ b/scripts/run-registry.ts @@ -4,11 +4,11 @@ import http from 'node:http'; import type { Server } from 'node:http'; import { join, resolve as resolvePath } from 'node:path'; -import chalk from 'chalk'; import { program } from 'commander'; import { execa, execaSync } from 'execa'; import { pathExists, readJSON, remove } from 'fs-extra'; import pLimit from 'p-limit'; +import picocolors from 'picocolors'; import { parseConfigFile, runServer } from 'verdaccio'; import { maxConcurrentTasks } from './utils/concurrency'; @@ -197,7 +197,9 @@ const run = async () => { } ); - logger.log(`📦 found ${packages.length} storybook packages at version ${chalk.blue(version)}`); + logger.log( + `📦 found ${packages.length} storybook packages at version ${picocolors.blue(version)}` + ); if (opts.publish) { await publish(packages, 'http://localhost:6002'); diff --git a/scripts/utils/exec.ts b/scripts/utils/exec.ts index 2998e4877acb..c12c9eea2f9f 100644 --- a/scripts/utils/exec.ts +++ b/scripts/utils/exec.ts @@ -1,6 +1,6 @@ -import chalk from 'chalk'; import type { ExecaChildProcess, Options } from 'execa'; import { execa } from 'execa'; +import picocolors from 'picocolors'; const logger = console; @@ -50,7 +50,7 @@ export const exec = async ( } } catch (err) { if (!(typeof err === 'object' && 'killed' in err && err.killed)) { - logger.error(chalk.red(`An error occurred while executing: \`${command}\``)); + logger.error(picocolors.red(`An error occurred while executing: \`${command}\``)); logger.log(`${errorMessage}\n`); } diff --git a/scripts/utils/options.ts b/scripts/utils/options.ts index 6bf48e804744..f3caf64e28b2 100644 --- a/scripts/utils/options.ts +++ b/scripts/utils/options.ts @@ -1,8 +1,7 @@ /** Use commander and prompts to gather a list of options for a script */ -import chalk from 'chalk'; import { type Command, type Option as CommanderOption, program } from 'commander'; -// eslint-disable-next-line import/extensions import { kebabCase } from 'es-toolkit/compat'; +import picocolors from 'picocolors'; import prompts from 'prompts'; import type { Falsy, PrevCaller, PromptObject, PromptType } from 'prompts'; import { dedent } from 'ts-dedent'; @@ -131,9 +130,9 @@ export function getOptions( const checkStringValue = (raw: string) => { if (option.values && !option.values.includes(raw)) { - const possibleOptions = chalk.cyan(option.values.join('\n')); + const possibleOptions = picocolors.cyan(option.values.join('\n')); throw new Error( - dedent`Unexpected value '${chalk.yellow(raw)}' for option '${chalk.magenta(key)}'. + dedent`Unexpected value '${picocolors.yellow(raw)}' for option '${picocolors.magenta(key)}'. These are the possible options: ${possibleOptions}\n\n` diff --git a/scripts/yarn.lock b/scripts/yarn.lock index a0e46537c940..8668a1a7ac3e 100644 --- a/scripts/yarn.lock +++ b/scripts/yarn.lock @@ -1560,7 +1560,6 @@ __metadata: "@vitest/coverage-v8": "npm:^2.0.5" ansi-regex: "npm:^6.0.1" browser-assert: "npm:^1.2.1" - chalk: "npm:^4.1.0" chromatic: "npm:^11.5.5" codecov: "npm:^3.8.1" commander: "npm:^12.1.0" @@ -1603,11 +1602,13 @@ __metadata: knip: "npm:^5.30.1" lint-staged: "npm:^15.2.7" memoizerific: "npm:^1.11.3" + minimatch: "npm:^10.0.1" node-gyp: "npm:^9.3.1" nx: "npm:18.0.6" ora: "npm:^5.4.1" p-limit: "npm:^3.1.0" p-retry: "npm:^5.1.2" + picocolors: "npm:^1.1.0" playwright: "npm:1.46.0" playwright-core: "npm:1.46.0" prettier: "npm:^3.3.2" @@ -7342,14 +7343,7 @@ __metadata: languageName: node 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, ignore@npm:^5.3.1": - version: 5.3.1 - resolution: "ignore@npm:5.3.1" - checksum: 10c0/703f7f45ffb2a27fb2c5a8db0c32e7dee66b33a225d28e8db4e1be6474795f606686a6e3bcc50e1aa12f2042db4c9d4a7d60af3250511de74620fbed052ea4cd - languageName: node - linkType: hard - -"ignore@npm:^5.1.8": +"ignore@npm:^5.0.0, ignore@npm:^5.0.4, ignore@npm:^5.0.5, ignore@npm:^5.1.1, ignore@npm:^5.1.8, ignore@npm:^5.2.0, ignore@npm:^5.2.4, ignore@npm:^5.3.1": version: 5.3.2 resolution: "ignore@npm:5.3.2" checksum: 10c0/f9f652c957983634ded1e7f02da3b559a0d4cc210fca3792cb67f1b153623c9c42efdc1c4121af171e295444459fc4a9201101fb041b1104a3c000bccb188337 @@ -9673,6 +9667,15 @@ __metadata: languageName: node linkType: hard +"minimatch@npm:^10.0.1": + version: 10.0.1 + resolution: "minimatch@npm:10.0.1" + dependencies: + brace-expansion: "npm:^2.0.1" + checksum: 10c0/e6c29a81fe83e1877ad51348306be2e8aeca18c88fdee7a99df44322314279e15799e41d7cb274e4e8bb0b451a3bc622d6182e157dfa1717d6cda75e9cd8cd5d + languageName: node + linkType: hard + "minimatch@npm:^5.0.1": version: 5.1.6 resolution: "minimatch@npm:5.1.6" @@ -10759,10 +10762,10 @@ __metadata: languageName: node linkType: hard -"picocolors@npm:^1.0.0": - version: 1.0.0 - resolution: "picocolors@npm:1.0.0" - checksum: 10c0/20a5b249e331c14479d94ec6817a182fd7a5680debae82705747b2db7ec50009a5f6648d0621c561b0572703f84dbef0858abcbd5856d3c5511426afcb1961f7 +"picocolors@npm:^1.0.0, picocolors@npm:^1.1.0": + version: 1.1.0 + resolution: "picocolors@npm:1.1.0" + checksum: 10c0/86946f6032148801ef09c051c6fb13b5cf942eaf147e30ea79edb91dd32d700934edebe782a1078ff859fb2b816792e97ef4dab03d7f0b804f6b01a0df35e023 languageName: node linkType: hard From 6d79d3fbd25f0794ac0e6e32972814c9d7ab8e4b Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 1 Oct 2024 10:12:41 +0200 Subject: [PATCH 34/39] fixes --- .../docgen-components/8428-js-static-prop-types/docgen.snapshot | 2 +- .../9556-ts-react-default-exports/docgen.snapshot | 2 +- scripts/release/version.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/code/renderers/react/template/stories/docgen-components/8428-js-static-prop-types/docgen.snapshot b/code/renderers/react/template/stories/docgen-components/8428-js-static-prop-types/docgen.snapshot index 93141203b686..20d501e37200 100644 --- a/code/renderers/react/template/stories/docgen-components/8428-js-static-prop-types/docgen.snapshot +++ b/code/renderers/react/template/stories/docgen-components/8428-js-static-prop-types/docgen.snapshot @@ -1,4 +1,4 @@ -function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; } function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } import React from 'react'; diff --git a/code/renderers/react/template/stories/docgen-components/9556-ts-react-default-exports/docgen.snapshot b/code/renderers/react/template/stories/docgen-components/9556-ts-react-default-exports/docgen.snapshot index deeed4ffa007..96720e8f4df7 100644 --- a/code/renderers/react/template/stories/docgen-components/9556-ts-react-default-exports/docgen.snapshot +++ b/code/renderers/react/template/stories/docgen-components/9556-ts-react-default-exports/docgen.snapshot @@ -1,4 +1,4 @@ -function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } +function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); } import React from 'react'; export const Button = ({ isDisabled = false, diff --git a/scripts/release/version.ts b/scripts/release/version.ts index 34019fd561a2..bdaef52fa18e 100644 --- a/scripts/release/version.ts +++ b/scripts/release/version.ts @@ -271,7 +271,7 @@ export const run = async (options: unknown) => { releaseType )}${ preId ? ` and ${picocolors.yellow(preId)}` : '' - } results in version: ${picocolors.bgGreenBright.bold(nextVersion)}` + } results in version: ${picocolors.bold(picocolors.greenBright(nextVersion))}` ); } From d8c3f9829bcff8f4db9ff087a8cb750148854922 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 1 Oct 2024 10:22:15 +0200 Subject: [PATCH 35/39] fixes --- scripts/event-log-checker.ts | 2 +- scripts/release/pick-patches.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/event-log-checker.ts b/scripts/event-log-checker.ts index cb85959503aa..403bde0b51f5 100644 --- a/scripts/event-log-checker.ts +++ b/scripts/event-log-checker.ts @@ -90,7 +90,7 @@ async function run() { } catch (err) { if (err instanceof assert.AssertionError) { console.log(`Assertions failed for ${picocolors.bold(templateName)}\n`); - console.log(picocolors.bold(picocolors.red`✕ ${testMessage}:`)); + console.log(picocolors.bold(picocolors.red(`✕ ${testMessage}:`))); console.log(err); process.exit(1); } diff --git a/scripts/release/pick-patches.ts b/scripts/release/pick-patches.ts index 33a94a332d12..d25667cc4974 100644 --- a/scripts/release/pick-patches.ts +++ b/scripts/release/pick-patches.ts @@ -71,7 +71,7 @@ export const run = async (_: unknown) => { } failedCherryPicks.push(pr.mergeCommit); prSpinner.info( - `This PR can be picked manually with: ${picocolors.grey( + `This PR can be picked manually with: ${picocolors.gray( `git cherry-pick -m1 -x ${pr.mergeCommit}` )}` ); From 16c79dfcbe516a6b5439ab7b5b76ac2d87669688 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 1 Oct 2024 11:50:17 +0200 Subject: [PATCH 36/39] only reset color --- code/core/src/node-logger/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/core/src/node-logger/index.ts b/code/core/src/node-logger/index.ts index 921502eb525e..7235ceff3751 100644 --- a/code/core/src/node-logger/index.ts +++ b/code/core/src/node-logger/index.ts @@ -23,7 +23,7 @@ function hex(hexColor: string) { const b = parseInt(hexColor.slice(4, 6), 16); // Return the ANSI escape sequence for the given RGB color - return (text: string) => `\x1b[38;2;${r};${g};${b}m${text}\x1b[0m`; + return (text: string) => `\x1b[38;2;${r};${g};${b}m${text}\x1b[39m`; } export const colors = { From 0cfc563e28a740b12537c2c5a91e2ab9339c8135 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 1 Oct 2024 12:14:52 +0200 Subject: [PATCH 37/39] cleanup --- code/addons/test/package.json | 1 - code/lib/create-storybook/package.json | 1 - code/yarn.lock | 2 -- 3 files changed, 4 deletions(-) diff --git a/code/addons/test/package.json b/code/addons/test/package.json index 3463074b176d..9d288f74aa4f 100644 --- a/code/addons/test/package.json +++ b/code/addons/test/package.json @@ -78,7 +78,6 @@ "boxen": "^8.0.1", "find-up": "^7.0.0", "picocolors": "^1.1.0", - "picomatch": "^2.3.0", "semver": "^7.6.3", "tinyrainbow": "^1.2.0", "ts-dedent": "^2.2.0", diff --git a/code/lib/create-storybook/package.json b/code/lib/create-storybook/package.json index 1980484b1090..0a80d09e97ca 100644 --- a/code/lib/create-storybook/package.json +++ b/code/lib/create-storybook/package.json @@ -73,7 +73,6 @@ "@types/util-deprecate": "^1.0.0", "boxen": "^7.1.1", "picocolors": "^1.1.0", - "picomatch": "^2.3.0", "typescript": "^5.3.2" }, "publishConfig": { diff --git a/code/yarn.lock b/code/yarn.lock index b255f0f07562..35f63b19acf0 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -6239,7 +6239,6 @@ __metadata: boxen: "npm:^8.0.1" find-up: "npm:^7.0.0" picocolors: "npm:^1.1.0" - picomatch: "npm:^2.3.0" semver: "npm:^7.6.3" tinyrainbow: "npm:^1.2.0" ts-dedent: "npm:^2.2.0" @@ -12472,7 +12471,6 @@ __metadata: find-up: "npm:^5.0.0" ora: "npm:^5.4.1" picocolors: "npm:^1.1.0" - picomatch: "npm:^2.3.0" prettier: "npm:^3.1.1" prompts: "npm:^2.4.0" semver: "npm:^7.3.7" From 3919b23f0597992c0a989fad5fdee134df7d6ad6 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 1 Oct 2024 12:51:15 +0200 Subject: [PATCH 38/39] cleanup --- code/lib/cli/package.json | 3 +-- code/yarn.lock | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/code/lib/cli/package.json b/code/lib/cli/package.json index 338a5aa5dc83..2ded4dedd357 100644 --- a/code/lib/cli/package.json +++ b/code/lib/cli/package.json @@ -317,8 +317,7 @@ "prep": "jiti ../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/core": "workspace:*", - "picocolors": "^1.1.0" + "@storybook/core": "workspace:*" }, "devDependencies": { "typescript": "^5.3.2" diff --git a/code/yarn.lock b/code/yarn.lock index 35f63b19acf0..a3ab66666dda 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -26225,7 +26225,6 @@ __metadata: resolution: "storybook@workspace:lib/cli" dependencies: "@storybook/core": "workspace:*" - picocolors: "npm:^1.1.0" typescript: "npm:^5.3.2" peerDependencies: prettier: ^2 || ^3 From 9f0d2953927236e6c2b9671cec1dbe1615f29f89 Mon Sep 17 00:00:00 2001 From: storybook-bot <32066757+storybook-bot@users.noreply.github.com> Date: Tue, 1 Oct 2024 12:47:31 +0000 Subject: [PATCH 39/39] Write changelog for 8.4.0-alpha.3 [skip ci] --- CHANGELOG.prerelease.md | 6 ++++++ code/package.json | 3 ++- docs/versions/next.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.prerelease.md b/CHANGELOG.prerelease.md index 07dc041fa818..580b7e71ceca 100644 --- a/CHANGELOG.prerelease.md +++ b/CHANGELOG.prerelease.md @@ -1,3 +1,9 @@ +## 8.4.0-alpha.3 + +- CLI: Migrate from `chalk` to `picocolors` - [#28262](https://github.com/storybookjs/storybook/pull/28262), thanks @43081j! +- Core: Migrate from `qs` to `picoquery` - [#28315](https://github.com/storybookjs/storybook/pull/28315), thanks @43081j! +- UI: Brand image css class conflict causes image to resize on hot reloads - [#29129](https://github.com/storybookjs/storybook/pull/29129), thanks @ShreySinha02! + ## 8.4.0-alpha.2 - CLI: Don't add `@storybook/addon-links` by default - [#29177](https://github.com/storybookjs/storybook/pull/29177), thanks @tobiasdiez! diff --git a/code/package.json b/code/package.json index 997df4c077e8..a4415a6c0195 100644 --- a/code/package.json +++ b/code/package.json @@ -293,5 +293,6 @@ "Dependency Upgrades" ] ] - } + }, + "deferredNextVersion": "8.4.0-alpha.3" } diff --git a/docs/versions/next.json b/docs/versions/next.json index 29a63859284a..eb05e2df02ca 100644 --- a/docs/versions/next.json +++ b/docs/versions/next.json @@ -1 +1 @@ -{"version":"8.4.0-alpha.2","info":{"plain":"- CLI: Don't add `@storybook/addon-links` by default - [#29177](https://github.com/storybookjs/storybook/pull/29177), thanks @tobiasdiez!\n- Core: Make `prettier` an optional peer dependency - [#29223](https://github.com/storybookjs/storybook/pull/29223), thanks @JReinhold!\n- Core: Remove `handlebars` usage - [#29208](https://github.com/storybookjs/storybook/pull/29208), thanks @ndelangen!\n- Core: Replace `lodash` with `es-toolkit` - [#28981](https://github.com/storybookjs/storybook/pull/28981), thanks @ndelangen!\n- UI: Use production-mode `react` in manager - [#29197](https://github.com/storybookjs/storybook/pull/29197), thanks @ndelangen!"}} +{"version":"8.4.0-alpha.3","info":{"plain":"- CLI: Migrate from `chalk` to `picocolors` - [#28262](https://github.com/storybookjs/storybook/pull/28262), thanks @43081j!\n- Core: Migrate from `qs` to `picoquery` - [#28315](https://github.com/storybookjs/storybook/pull/28315), thanks @43081j!\n- UI: Brand image css class conflict causes image to resize on hot reloads - [#29129](https://github.com/storybookjs/storybook/pull/29129), thanks @ShreySinha02!"}}