From c08b184f5395cbafc79fdd4d5e4388f28e26bf5a Mon Sep 17 00:00:00 2001 From: patricklafrance Date: Wed, 11 Dec 2024 12:19:51 -0500 Subject: [PATCH 01/18] More stuff --- package.json | 5 ----- pnpm-lock.yaml | 19 ++++++++----------- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/package.json b/package.json index 624ee13a..70715278 100644 --- a/package.json +++ b/package.json @@ -46,11 +46,6 @@ "turbo": "2.3.3", "typescript": "5.5.4" }, - "pnpm": { - "overrides": { - "minimist": "^0.2.4" - } - }, "engines": { "node": ">=22.0.0", "pnpm": ">=9" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 08317a55..b91d3e95 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -4,9 +4,6 @@ settings: autoInstallPeers: true excludeLinksFromLockfile: false -overrides: - minimist: ^0.2.4 - importers: .: @@ -5233,8 +5230,8 @@ packages: resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} engines: {node: '>=16 || 14 >=14.17'} - minimist@0.2.4: - resolution: {integrity: sha512-Pkrrm8NjyQ8yVt8Am9M+yUt74zE3iokhzbG1bFVNjLB92vwM71hf40RkEsryg98BujhVOncKm/C1xROxZ030LQ==} + minimist@1.2.8: + resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} minipass@7.1.2: resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==} @@ -11570,7 +11567,7 @@ snapshots: html-encoding-sniffer: 3.0.0 http-proxy: 1.18.1 mime: 1.6.0 - minimist: 0.2.4 + minimist: 1.2.8 opener: 1.5.2 portfinder: 1.0.32 secure-compare: 3.0.1 @@ -12355,7 +12352,7 @@ snapshots: json5@1.0.2: dependencies: - minimist: 0.2.4 + minimist: 1.2.8 json5@2.2.3: {} @@ -12399,7 +12396,7 @@ snapshots: fast-glob: 3.3.2 jiti: 2.4.1 js-yaml: 4.1.0 - minimist: 0.2.4 + minimist: 1.2.8 picocolors: 1.1.1 picomatch: 4.0.2 pretty-ms: 9.2.0 @@ -12880,13 +12877,13 @@ snapshots: dependencies: brace-expansion: 2.0.1 - minimist@0.2.4: {} + minimist@1.2.8: {} minipass@7.1.2: {} mkdirp@0.5.6: dependencies: - minimist: 0.2.4 + minimist: 1.2.8 mlly@1.7.3: dependencies: @@ -14562,7 +14559,7 @@ snapshots: dependencies: '@types/json5': 0.0.29 json5: 1.0.2 - minimist: 0.2.4 + minimist: 1.2.8 strip-bom: 3.0.0 tslib@2.8.1: {} From 983c471ef7f338d63ad4b6ff85c18690489b48f6 Mon Sep 17 00:00:00 2001 From: patricklafrance Date: Wed, 11 Dec 2024 12:43:27 -0500 Subject: [PATCH 02/18] More stuff --- README.md | 1 + docs/default.md | 1 + docs/rsbuild/default.md | 77 +++++ docs/samples.md | 4 - docs/static/rsbuild.svg | 1 + packages/rsbuild-configs/.eslintignore | 2 + packages/rsbuild-configs/.eslintrc.json | 5 + packages/rsbuild-configs/README.md | 22 ++ packages/rsbuild-configs/jest.config.ts | 15 + packages/rsbuild-configs/package.json | 62 ++++ .../rsbuild-configs/src/applyTransformers.ts | 12 + packages/rsbuild-configs/src/build.ts | 173 +++++++++++ packages/rsbuild-configs/src/dev.ts | 146 +++++++++ packages/rsbuild-configs/src/index.ts | 3 + packages/rsbuild-configs/src/storybook.ts | 1 + packages/rsbuild-configs/swc.jest.ts | 3 + packages/rsbuild-configs/tsconfig.json | 8 + packages/rsbuild-configs/tsup.config.ts | 5 + packages/webpack-configs/package.json | 24 +- pnpm-lock.yaml | 290 +++++++++++++++++- 20 files changed, 833 insertions(+), 22 deletions(-) create mode 100644 docs/rsbuild/default.md create mode 100644 docs/static/rsbuild.svg create mode 100644 packages/rsbuild-configs/.eslintignore create mode 100644 packages/rsbuild-configs/.eslintrc.json create mode 100644 packages/rsbuild-configs/README.md create mode 100644 packages/rsbuild-configs/jest.config.ts create mode 100644 packages/rsbuild-configs/package.json create mode 100644 packages/rsbuild-configs/src/applyTransformers.ts create mode 100644 packages/rsbuild-configs/src/build.ts create mode 100644 packages/rsbuild-configs/src/dev.ts create mode 100644 packages/rsbuild-configs/src/index.ts create mode 100644 packages/rsbuild-configs/src/storybook.ts create mode 100644 packages/rsbuild-configs/swc.jest.ts create mode 100644 packages/rsbuild-configs/tsconfig.json create mode 100644 packages/rsbuild-configs/tsup.config.ts diff --git a/README.md b/README.md index 93f98388..f0b8d715 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,7 @@ Common configurations for building web apps at [Workleap](https://workleap.com/) | [@workleap/tsup-configs](packages/tsup-configs/README.md) | [![npm version](https://img.shields.io/npm/v/@workleap/tsup-configs)](https://www.npmjs.com/package/@workleap/tsup-configs) | | [@workleap/swc-configs](packages/swc-configs/README.md) | [![npm version](https://img.shields.io/npm/v/@workleap/swc-configs)](https://www.npmjs.com/package/@workleap/swc-configs) | | [@workleap/webpack-configs](packages/webpack-configs/README.md) | [![npm version](https://img.shields.io/npm/v/@workleap/webpack-configs)](https://www.npmjs.com/package/@workleap/webpack-configs) | +| [@workleap/rsbuild-configs](packages/rsbuild-configs/README.md) | [![npm version](https://img.shields.io/npm/v/@workleap/rsbuild-configs)](https://www.npmjs.com/package/@workleap/rsbuild-configs) | ## Have a question or found an issue? diff --git a/docs/default.md b/docs/default.md index 95a14395..009a7a3b 100644 --- a/docs/default.md +++ b/docs/default.md @@ -67,6 +67,7 @@ The majority of the shared tooling configurations targets [ESM](https://develope | ![](./static/tsup.svg){ class="h-5 w-5 mr-2 -mt-1" }[tsup](https://tsup.egoist.dev/) | [![npm version](https://img.shields.io/npm/v/@workleap/tsup-configs)](https://www.npmjs.com/package/@workleap/tsup-configs) | [Getting started](tsup/default.md) | | ![](./static/typescript.svg){ class="h-5 w-5 mr-2 -mt-1" }[Typescript](https://www.typescriptlang.org/) | [![npm version](https://img.shields.io/npm/v/@workleap/typescript-configs)](https://www.npmjs.com/package/@workleap/typescript-configs) | [Getting started](typescript/default.md) | | ![](./static/webpack.svg){ class="h-5 w-5 mr-2 -mt-1" }[webpack](https://webpack.js.org/) | [![npm version](https://img.shields.io/npm/v/@workleap/webpack-configs)](https://www.npmjs.com/package/@workleap/webpack-configs) | [Getting started](webpack/default.md) | +| ![](./static/rsbuild.svg){ class="h-5 w-5 mr-2 -mt-1" }[Rsbuild](https://rsbuild.dev/) | [![npm version](https://img.shields.io/npm/v/@workleap/rsbuild-configs)](https://www.npmjs.com/package/@workleap/rsbuild-configs) | [Getting started](rsbuild/default.md) | diff --git a/docs/rsbuild/default.md b/docs/rsbuild/default.md new file mode 100644 index 00000000..dcfb204c --- /dev/null +++ b/docs/rsbuild/default.md @@ -0,0 +1,77 @@ +--- +order: 110 +icon: /static/rsbuild.svg +label: Rsbuild +expanded: true +toc: + depth: 2-3 +--- + +# Webpack + + + +## A word about Rspack + +[Rspack](https://www.rspack.dev/) is a partial rewrite of [webpack](https://webpack.js.org/) in Rust and will most likely be its successor once it's features complete and stable. Our goal is to migrate to Rspack somewhere in 2024 or 2025 when a `1.0` version is released and [Module Federation](https://module-federation.io/) support is available. + +Meanwhile, you can **confidently start a new project with webpack** as the **migration** process to Rspack is expected to be **seamless**; Rspack is committed to support the full webpack API and its massive plugin ecosystem. + +## Main features + +The shared configurations offered by `@workleap/webpack-configs` includes the following features :point_down: + +### Language support + +- JavaScript +- TypeScript +- CSS (with CSS modules and PostCSS) + +### Framework support + +- React + +### Asset support + +- SVG as React components +- PNG +- JPEG +- GIF + +### Development features + +- Development server +- File system caching +- Fast Refresh or Hot Module Reload +- Sourcemap + +### Production features + +- File system caching +- Minification +- Output to `/dist` + +### Target environment + +As per the [PostCSS](../postcss/default.md) and [SWC](../swc/default.md) configurations. + +## Getting started + +To get started, follow the quick start guide to configure webpack for either a [development environment](configure-dev.md) or a [production environment](configure-build.md). diff --git a/docs/samples.md b/docs/samples.md index 98c6ae21..562b01d0 100644 --- a/docs/samples.md +++ b/docs/samples.md @@ -11,7 +11,3 @@ icon: command-palette - :icon-mark-github: [Components library](https://github.com/gsoft-inc/wl-web-configs/tree/main/sample/components) - :icon-mark-github: [TypeScript library](https://github.com/gsoft-inc/wl-web-configs/tree/main/sample/utils) - :icon-mark-github: [Monorepo workspace](https://github.com/gsoft-inc/wl-web-configs/blob/main/tsconfig.json) - -## Foundy CLI templates - -- :icon-mark-github: [Web application](https://github.com/gsoft-inc/wl-foundry-cli/tree/main/templates/web-application) diff --git a/docs/static/rsbuild.svg b/docs/static/rsbuild.svg new file mode 100644 index 00000000..2f1889bd --- /dev/null +++ b/docs/static/rsbuild.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/rsbuild-configs/.eslintignore b/packages/rsbuild-configs/.eslintignore new file mode 100644 index 00000000..de4d1f00 --- /dev/null +++ b/packages/rsbuild-configs/.eslintignore @@ -0,0 +1,2 @@ +dist +node_modules diff --git a/packages/rsbuild-configs/.eslintrc.json b/packages/rsbuild-configs/.eslintrc.json new file mode 100644 index 00000000..d9f48339 --- /dev/null +++ b/packages/rsbuild-configs/.eslintrc.json @@ -0,0 +1,5 @@ +{ + "$schema": "https://json.schemastore.org/eslintrc", + "root": true, + "extends": "plugin:@workleap/typescript-library" +} diff --git a/packages/rsbuild-configs/README.md b/packages/rsbuild-configs/README.md new file mode 100644 index 00000000..3efbef53 --- /dev/null +++ b/packages/rsbuild-configs/README.md @@ -0,0 +1,22 @@ +# webpack-configs + +[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](../../LICENSE) +[![npm version](https://img.shields.io/npm/v/@workleap/webpack-configs)](https://www.npmjs.com/package/@workleap/webpack-configs) + +## Usage + +View the [user's documentation](https://gsoft-inc.github.io/wl-web-configs/). + +## 🀝 Contributing + +View the [contributor's documentation](../../CONTRIBUTING.md). + +### Notes + +#### Add the @swc/helpers packages to all monorepo imported projects having JSX code + +To work properly, all projects having React/JSX code that are referenced by the host project must also install `@swc/helpers` as a `devDependency`. + +## License + +Copyright © 2023, Workleap. This code is licensed under the Apache License, Version 2.0. You may obtain a copy of this license at https://github.com/gsoft-inc/workleap-license/blob/master/LICENSE. diff --git a/packages/rsbuild-configs/jest.config.ts b/packages/rsbuild-configs/jest.config.ts new file mode 100644 index 00000000..1142ff96 --- /dev/null +++ b/packages/rsbuild-configs/jest.config.ts @@ -0,0 +1,15 @@ +import type { Config } from "jest"; +import { swcConfig } from "./swc.jest.ts"; + +const config: Config = { + testRegex: "/tests/*/.*\\.test\\.(ts|tsx)$", + testPathIgnorePatterns: ["/node_modules/", "/dist/"], + transform: { + "^.+\\.ts$": ["@swc/jest", swcConfig as Record] + }, + cacheDirectory: "./node_modules/.cache/jest", + clearMocks: true, + verbose: true +}; + +export default config; diff --git a/packages/rsbuild-configs/package.json b/packages/rsbuild-configs/package.json new file mode 100644 index 00000000..3ee4daa5 --- /dev/null +++ b/packages/rsbuild-configs/package.json @@ -0,0 +1,62 @@ +{ + "name": "@workleap/rsbuild-configs", + "author": "Workleap", + "description": "Workleap recommended Rsbuild config.", + "version": "0.0.1", + "license": "Apache-2.0", + "repository": { + "type": "git", + "url": "git+https://github.com/gsoft-inc/wl-web-configs.git", + "directory": "packages/rsbuild-configs" + }, + "type": "module", + "publishConfig": { + "access": "public", + "provenance": true + }, + "exports": { + ".": { + "import": "./dist/index.js", + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + }, + "files": [ + "dist", + "CHANGELOG.md", + "README.md" + ], + "scripts": { + "build": "tsup", + "eslint": "eslint . --max-warnings=-0 --cache --cache-location node_modules/.cache/eslint", + "typecheck": "tsc", + "test": "jest" + }, + "peerDependencies": { + "@rsbuild/core": "*", + "@rspack/core": "*" + }, + "dependencies": { + "@rsbuild/plugin-basic-ssl": "^1.1.1", + "@rsbuild/plugin-react": "^1.1.0", + "@rsbuild/plugin-svgr": "^1.0.6" + }, + "devDependencies": { + "@rsbuild/core": "1.1.9", + "@rspack/core": "1.1.6", + "@swc/core": "1.10.1", + "@swc/jest": "0.2.37", + "@types/jest": "29.5.14", + "@types/node": "22.10.1", + "@typescript-eslint/parser": "8.18.0", + "@workleap/eslint-plugin": "workspace:*", + "@workleap/swc-configs": "workspace:*", + "@workleap/tsup-configs": "workspace:*", + "@workleap/typescript-configs": "workspace:*", + "eslint": "8.57.0", + "jest": "29.7.0", + "ts-node": "10.9.2", + "tsup": "8.3.5", + "typescript": "5.5.4" + } +} diff --git a/packages/rsbuild-configs/src/applyTransformers.ts b/packages/rsbuild-configs/src/applyTransformers.ts new file mode 100644 index 00000000..a6c36d40 --- /dev/null +++ b/packages/rsbuild-configs/src/applyTransformers.ts @@ -0,0 +1,12 @@ +import type { RsbuildConfig } from "@rsbuild/core"; + +export interface RsbuildConfigTransformerContext { + environment: "dev" | "build"; + verbose: boolean; +} + +export type RsbuildConfigTransformer = (config: RsbuildConfig, context: RsbuildConfigTransformerContext) => RsbuildConfig; + +export function applyTransformers(config: RsbuildConfig, transformers: RsbuildConfigTransformer[], context: RsbuildConfigTransformerContext) { + return transformers.reduce((acc, transformer) => transformer(acc, context), config); +} diff --git a/packages/rsbuild-configs/src/build.ts b/packages/rsbuild-configs/src/build.ts new file mode 100644 index 00000000..fa86357e --- /dev/null +++ b/packages/rsbuild-configs/src/build.ts @@ -0,0 +1,173 @@ +import { defineConfig, type DistPathConfig, type HtmlConfig, type Minify, type RsbuildConfig, type RsbuildEntry, type RsbuildPlugins, type SourceMap } from "@rsbuild/core"; +import { pluginReact, type PluginReactOptions } from "@rsbuild/plugin-react"; +import { pluginSvgr, type PluginSvgrOptions } from "@rsbuild/plugin-svgr"; +import { SwcJsMinimizerRspackPlugin, type Optimization } from "@rspack/core"; +import path from "node:path"; +import { applyTransformers, type RsbuildConfigTransformer } from "./applyTransformers.ts"; + +export type OptimizeOption = boolean | "readable"; + +export type DefineBuildHtmlPluginConfigFunction = (defaultOptions: HtmlConfig) => HtmlConfig; +export type DefineBuildDefineReactPluginConfigFunction = (defaultOptions: PluginReactOptions) => PluginReactOptions; +export type DefineBuildSvgrPluginConfigFunction = (defaultOptions: PluginSvgrOptions) => PluginSvgrOptions; + +export interface DefineBuildConfigOptions { + entry?: RsbuildEntry; + // Similar to webpack.output.path. + distPath?: DistPathConfig; + // Similar to webpack.publicPath. + assetPrefix?: `${string}/` | "auto"; + plugins?: RsbuildPlugins; + html?: false | DefineBuildHtmlPluginConfigFunction; + minify?: Minify; + sourceMap?: boolean | SourceMap; + optimize?: OptimizeOption; + react?: false | DefineBuildDefineReactPluginConfigFunction; + svgr? : false | DefineBuildSvgrPluginConfigFunction; + environmentVariables?: Record; + transformers?: RsbuildConfigTransformer[]; + verbose?: boolean; +} + +function defaultDefineHtmlPluginConfig(options: HtmlConfig) { + return options; +} + +function defaultDefineReactPluginConfig(options: PluginReactOptions) { + return options; +} + +function defineSvgrPluginConfig(options: PluginSvgrOptions) { + return options; +} + +export function getOptimizationConfig(optimize: OptimizeOption): Optimization { + if (optimize === "readable") { + return { + minimize: true, + minimizer: [ + new SwcJsMinimizerRspackPlugin({ + minimizerOptions: { + mangle: false, + compress: { + toplevel: true, + hoist_props: false + } + } + }) + ], + chunkIds: "named", + moduleIds: "named", + mangleExports: false + }; + } else if (optimize) { + return { + minimize: true + }; + } + + // Doesn't turnoff everything but is good enough to help with debugging scenarios. + return { + minimize: false, + chunkIds: "named", + moduleIds: "named", + concatenateModules: false, + mangleExports: false, + removeAvailableModules: false, + usedExports: false + }; +} + +export function defineBuildConfig(options: DefineBuildConfigOptions = {}) { + const { + entry = { + index: path.resolve("./src/index.tsx") + }, + distPath = { + root: path.resolve("./dist") + }, + // The trailing / is very important, otherwise paths will not be resolved correctly. + assetPrefix = "http://localhost:8080/", + plugins = [], + html = defaultDefineHtmlPluginConfig, + minify = true, + sourceMap = { + js: "source-map", + css: true + }, + react = defaultDefineReactPluginConfig, + optimize = true, + svgr = defineSvgrPluginConfig, + // Using an empty object literal as the default value to ensure + // "process.env" is always available. + environmentVariables = {}, + transformers = [], + verbose = false + } = options; + + const config: RsbuildConfig = { + mode: "production", + source: { + entry, + // Stringify the environment variables because the plugin does a direct text replacement. Otherwise, "production" would become production + // after replacement and cause an undefined var error because the production var doesn't exist. + // For more information, view: https://rsbuild.dev/guide/advanced/env-vars#using-define. + define: { + "process.env": Object.keys(environmentVariables).reduce((acc, key) => { + acc[key] = JSON.stringify(environmentVariables[key]); + + return acc; + }, {} as Record) + } + }, + output: { + target: "web", + distPath, + cleanDistPath: true, + assetPrefix, + filename: { + html: "[name].html", + js: "[name].js", + css: "[name].css", + svg: "[name].[contenthash:8].svg", + font: "[name].[contenthash:8][ext]", + image: "[name].[contenthash:8][ext]", + media: "[name].[contenthash:8][ext]", + assets: "[name].[contenthash:8][ext]" + }, + minify, + sourceMap + }, + html: html + ? html({ template: path.resolve("./public/index.html") }) + : undefined, + plugins: [ + react && pluginReact(react({ + fastRefresh: false + })), + svgr && pluginSvgr(svgr({ + svgrOptions: { + exportType: "named" + } + })), + ...plugins + ].filter(Boolean), + tools: { + rspack: { + optimization: getOptimizationConfig(optimize), + infrastructureLogging: verbose ? { + appendOnly: true, + level: "verbose", + debug: /PackFileCache/ + } : undefined + } + } + }; + + const transformedConfig = applyTransformers(config, transformers, { + environment: "build", + verbose + }); + + return defineConfig(transformedConfig); +} diff --git a/packages/rsbuild-configs/src/dev.ts b/packages/rsbuild-configs/src/dev.ts new file mode 100644 index 00000000..854658a5 --- /dev/null +++ b/packages/rsbuild-configs/src/dev.ts @@ -0,0 +1,146 @@ +import { defineConfig, type HtmlConfig, type RsbuildConfig, type RsbuildEntry, type RsbuildPlugins, type ServerConfig, type SourceMap } from "@rsbuild/core"; +import { pluginBasicSsl } from "@rsbuild/plugin-basic-ssl"; +import { pluginReact, type PluginReactOptions } from "@rsbuild/plugin-react"; +import { pluginSvgr, type PluginSvgrOptions } from "@rsbuild/plugin-svgr"; +import path from "node:path"; +import { applyTransformers, type RsbuildConfigTransformer } from "./applyTransformers.ts"; + +export type DefineDevHtmlPluginConfigFunction = (defaultOptions: HtmlConfig) => HtmlConfig; +export type DefineDevDefineReactPluginConfigFunction = (defaultOptions: PluginReactOptions) => PluginReactOptions; +export type DefineDevSvgrPluginConfigFunction = (defaultOptions: PluginSvgrOptions) => PluginSvgrOptions; + +export interface DefineDevConfigOptions { + entry?: RsbuildEntry; + https?: boolean | ServerConfig["https"]; + host?: string; + port?: number; + // Similar to webpack.publicPath. + assetPrefix?: `${string}/` | "auto"; + plugins?: RsbuildPlugins; + html?: false | DefineDevHtmlPluginConfigFunction; + lazyCompilation?: boolean; + hmr?: boolean; + fastRefresh?: boolean; + sourceMap?: boolean | SourceMap; + overlay?: false; + react?: false | DefineDevDefineReactPluginConfigFunction; + svgr? : false | DefineDevSvgrPluginConfigFunction; + environmentVariables?: Record; + transformers?: RsbuildConfigTransformer[]; + verbose?: boolean; +} + +function defaultDefineHtmlPluginConfig(options: HtmlConfig) { + return options; +} + +function defaultDefineReactPluginConfig(options: PluginReactOptions) { + return options; +} + +function defineSvgrPluginConfig(options: PluginSvgrOptions) { + return options; +} + +export function defineDevConfig(options: DefineDevConfigOptions = {}) { + const { + entry = { + index: path.resolve("./src/index.tsx") + }, + https = false, + host = "localhost", + port = 8080, + assetPrefix, + plugins = [], + html = defaultDefineHtmlPluginConfig, + lazyCompilation = true, + hmr = true, + fastRefresh = true, + sourceMap = { + js: "cheap-module-source-map", + css: true + }, + overlay, + react = defaultDefineReactPluginConfig, + svgr = defineSvgrPluginConfig, + // Using an empty object literal as the default value to ensure + // "process.env" is always available. + environmentVariables = {}, + transformers = [], + verbose = false + } = options; + + const config: RsbuildConfig = { + mode: "development", + dev: { + // The trailing / is very important, otherwise paths will not be resolved correctly. + assetPrefix: assetPrefix ?? `${https ? "https" : "http"}://${host}:${port}/`, + lazyCompilation, + hmr, + client: (overlay === false || fastRefresh) ? { + overlay: false + } : undefined + }, + server: { + https: typeof https === "boolean" ? undefined : https, + host, + port, + historyApiFallback: true + }, + source: { + entry, + // Stringify the environment variables because the plugin does a direct text replacement. Otherwise, "production" would become production + // after replacement and cause an undefined var error because the production var doesn't exist. + // For more information, view: https://rsbuild.dev/guide/advanced/env-vars#using-define. + define: { + "process.env": Object.keys(environmentVariables).reduce((acc, key) => { + acc[key] = JSON.stringify(environmentVariables[key]); + + return acc; + }, {} as Record) + } + }, + output: { + target: "web", + // // The trailing / is very important, otherwise paths will not be resolved correctly. + // assetPrefix: assetPrefix ?? `${https ? "https" : "http"}://${host}:${port}/`, + minify: false, + sourceMap + }, + html: html + ? html({ template: path.resolve("./public/index.html") }) + : undefined, + plugins: [ + typeof https === "boolean" && https && pluginBasicSsl(), + react && pluginReact(react({ + fastRefresh, + reactRefreshOptions: { + overlay: overlay !== false + } + })), + svgr && pluginSvgr(svgr({ + svgrOptions: { + exportType: "named" + } + })), + ...plugins + ].filter(Boolean), + tools: { + rspack: { + infrastructureLogging: verbose ? { + appendOnly: true, + level: "verbose", + debug: /PackFileCache/ + } : undefined + } + } + }; + + const transformedConfig = applyTransformers(config, transformers, { + environment: "dev", + verbose + }); + + return defineConfig(transformedConfig); +} + diff --git a/packages/rsbuild-configs/src/index.ts b/packages/rsbuild-configs/src/index.ts new file mode 100644 index 00000000..d50b2ca9 --- /dev/null +++ b/packages/rsbuild-configs/src/index.ts @@ -0,0 +1,3 @@ +export * from "./build.ts"; +export * from "./dev.ts"; + diff --git a/packages/rsbuild-configs/src/storybook.ts b/packages/rsbuild-configs/src/storybook.ts new file mode 100644 index 00000000..954ddd23 --- /dev/null +++ b/packages/rsbuild-configs/src/storybook.ts @@ -0,0 +1 @@ +// TBD diff --git a/packages/rsbuild-configs/swc.jest.ts b/packages/rsbuild-configs/swc.jest.ts new file mode 100644 index 00000000..2e6bdb4c --- /dev/null +++ b/packages/rsbuild-configs/swc.jest.ts @@ -0,0 +1,3 @@ +import { defineJestConfig } from "@workleap/swc-configs"; + +export const swcConfig = defineJestConfig(); diff --git a/packages/rsbuild-configs/tsconfig.json b/packages/rsbuild-configs/tsconfig.json new file mode 100644 index 00000000..596c3d1a --- /dev/null +++ b/packages/rsbuild-configs/tsconfig.json @@ -0,0 +1,8 @@ +{ + "extends": "@workleap/typescript-configs/library.json", + "compilerOptions": { + "incremental": true, + "tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json", + }, + "exclude": ["dist", "node_modules"] +} diff --git a/packages/rsbuild-configs/tsup.config.ts b/packages/rsbuild-configs/tsup.config.ts new file mode 100644 index 00000000..fbbc7e07 --- /dev/null +++ b/packages/rsbuild-configs/tsup.config.ts @@ -0,0 +1,5 @@ +import { defineBuildConfig } from "@workleap/tsup-configs"; + +export default defineBuildConfig({ + platform: "node" +}); diff --git a/packages/webpack-configs/package.json b/packages/webpack-configs/package.json index 56660540..9c22cd89 100644 --- a/packages/webpack-configs/package.json +++ b/packages/webpack-configs/package.json @@ -45,6 +45,18 @@ "optional": true } }, + "dependencies": { + "@pmmmwh/react-refresh-webpack-plugin": "^0.5.15", + "@svgr/webpack": "^8.1.0", + "css-loader": "^7.1.2", + "html-webpack-plugin": "^5.6.3", + "mini-css-extract-plugin": "^2.9.2", + "postcss-loader": "^8.1.1", + "react-refresh": "^0.16.0", + "style-loader": "^4.0.0", + "swc-loader": "^0.2.6", + "terser-webpack-plugin": "^5.3.10" + }, "devDependencies": { "@svgr/core": "8.1.0", "@swc/core": "1.10.1", @@ -62,17 +74,5 @@ "ts-node": "10.9.2", "tsup": "8.3.5", "typescript": "5.5.4" - }, - "dependencies": { - "@pmmmwh/react-refresh-webpack-plugin": "^0.5.15", - "@svgr/webpack": "^8.1.0", - "css-loader": "^7.1.2", - "html-webpack-plugin": "^5.6.3", - "mini-css-extract-plugin": "^2.9.2", - "postcss-loader": "^8.1.1", - "react-refresh": "^0.16.0", - "style-loader": "^4.0.0", - "swc-loader": "^0.2.6", - "terser-webpack-plugin": "^5.3.10" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b91d3e95..e5c005d9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -212,6 +212,67 @@ importers: specifier: 5.5.4 version: 5.5.4 + packages/rsbuild-configs: + dependencies: + '@rsbuild/plugin-basic-ssl': + specifier: ^1.1.1 + version: 1.1.1(@rsbuild/core@1.1.9) + '@rsbuild/plugin-react': + specifier: ^1.1.0 + version: 1.1.0(@rsbuild/core@1.1.9) + '@rsbuild/plugin-svgr': + specifier: ^1.0.6 + version: 1.0.6(@rsbuild/core@1.1.9)(typescript@5.5.4) + devDependencies: + '@rsbuild/core': + specifier: 1.1.9 + version: 1.1.9 + '@rspack/core': + specifier: 1.1.6 + version: 1.1.6(@swc/helpers@0.5.15) + '@swc/core': + specifier: 1.10.1 + version: 1.10.1(@swc/helpers@0.5.15) + '@swc/jest': + specifier: 0.2.37 + version: 0.2.37(@swc/core@1.10.1(@swc/helpers@0.5.15)) + '@types/jest': + specifier: 29.5.14 + version: 29.5.14 + '@types/node': + specifier: 22.10.1 + version: 22.10.1 + '@typescript-eslint/parser': + specifier: 8.18.0 + version: 8.18.0(eslint@8.57.0)(typescript@5.5.4) + '@workleap/eslint-plugin': + specifier: workspace:* + version: link:../eslint-plugin + '@workleap/swc-configs': + specifier: workspace:* + version: link:../swc-configs + '@workleap/tsup-configs': + specifier: workspace:* + version: link:../tsup-configs + '@workleap/typescript-configs': + specifier: workspace:* + version: link:../typescript-configs + eslint: + specifier: 8.57.0 + version: 8.57.0 + jest: + specifier: 29.7.0 + version: 29.7.0(@types/node@22.10.1)(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.1)(typescript@5.5.4)) + ts-node: + specifier: 10.9.2 + version: 10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.1)(typescript@5.5.4) + tsup: + specifier: 8.3.5 + version: 8.3.5(@swc/core@1.10.1)(jiti@2.4.1)(postcss@8.4.49)(typescript@5.5.4)(yaml@2.6.1) + typescript: + specifier: 5.5.4 + version: 5.5.4 + packages/stylelint-configs: dependencies: prettier: @@ -353,10 +414,10 @@ importers: version: 4.24.2 css-loader: specifier: ^7.1.2 - version: 7.1.2(webpack@5.97.1(@swc/core@1.10.1(@swc/helpers@0.5.15))) + version: 7.1.2(@rspack/core@1.1.6(@swc/helpers@0.5.15))(webpack@5.97.1(@swc/core@1.10.1(@swc/helpers@0.5.15))) html-webpack-plugin: specifier: ^5.6.3 - version: 5.6.3(webpack@5.97.1(@swc/core@1.10.1(@swc/helpers@0.5.15))) + version: 5.6.3(@rspack/core@1.1.6(@swc/helpers@0.5.15))(webpack@5.97.1(@swc/core@1.10.1(@swc/helpers@0.5.15))) mini-css-extract-plugin: specifier: ^2.9.2 version: 2.9.2(webpack@5.97.1(@swc/core@1.10.1(@swc/helpers@0.5.15))) @@ -365,7 +426,7 @@ importers: version: 8.4.49 postcss-loader: specifier: ^8.1.1 - version: 8.1.1(postcss@8.4.49)(typescript@5.5.4)(webpack@5.97.1(@swc/core@1.10.1(@swc/helpers@0.5.15))) + version: 8.1.1(@rspack/core@1.1.6(@swc/helpers@0.5.15))(postcss@8.4.49)(typescript@5.5.4)(webpack@5.97.1(@swc/core@1.10.1(@swc/helpers@0.5.15))) react-refresh: specifier: ^0.16.0 version: 0.16.0 @@ -1947,6 +2008,18 @@ packages: '@manypkg/get-packages@1.1.3': resolution: {integrity: sha512-fo+QhuU3qE/2TQMQmbVMqaQ6EWbMhi4ABWP+O4AM1NqPBuy0OrApV5LO6BrrgnhtAHS2NH6RrVk9OL181tTi8A==} + '@module-federation/runtime-tools@0.5.1': + resolution: {integrity: sha512-nfBedkoZ3/SWyO0hnmaxuz0R0iGPSikHZOAZ0N/dVSQaIzlffUo35B5nlC2wgWIc0JdMZfkwkjZRrnuuDIJbzg==} + + '@module-federation/runtime@0.5.1': + resolution: {integrity: sha512-xgiMUWwGLWDrvZc9JibuEbXIbhXg6z2oUkemogSvQ4LKvrl/n0kbqP1Blk669mXzyWbqtSp6PpvNdwaE1aN5xQ==} + + '@module-federation/sdk@0.5.1': + resolution: {integrity: sha512-exvchtjNURJJkpqjQ3/opdbfeT2wPKvrbnGnyRkrwW5o3FH1LaST1tkiNviT6OXTexGaVc2DahbdniQHVtQ7pA==} + + '@module-federation/webpack-bundler-runtime@0.5.1': + resolution: {integrity: sha512-mMhRFH0k2VjwHt3Jol9JkUsmI/4XlrAoBG3E0o7HoyoPYv1UFOWyqAflfANcUPgbYpvqmyLzDcO+3IT36LXnrA==} + '@mswjs/interceptors@0.37.3': resolution: {integrity: sha512-USvgCL/uOGFtVa6SVyRrC8kIAedzRohxIXN5LISlg5C5vLZCn7dgMFVSNhSF9cuBEFrm/O2spDWEZeMnw4ZXYg==} engines: {node: '>=18'} @@ -2181,6 +2254,98 @@ packages: cpu: [x64] os: [win32] + '@rsbuild/core@1.1.9': + resolution: {integrity: sha512-mHZveEwlTtW9nxWa+T0xUm6ssm+HkDYZ0NENLfWMUmsL0LjMJrpQzRlbD+p5+9Uf+KXUo3Dbtv0ScA+p7cuGTg==} + engines: {node: '>=16.7.0'} + hasBin: true + + '@rsbuild/plugin-basic-ssl@1.1.1': + resolution: {integrity: sha512-q4u7H8yh/S/DHwxG85bWbGXFiVV9RMDJDupOBHJVPtevU9mLCB4n5Qbrxu/l8CCdmZcBlvfWGjkDA/YoY61dig==} + peerDependencies: + '@rsbuild/core': 0.x || 1.x || ^1.0.1-beta.0 + peerDependenciesMeta: + '@rsbuild/core': + optional: true + + '@rsbuild/plugin-react@1.1.0': + resolution: {integrity: sha512-uqdRoV2V91G1XIA14dAmxqYTlTDVf0ktpE7TgwG29oQ2j+DerF1kh29WPHK9HvGE34JTfaBrsme2Zmb6bGD0cw==} + peerDependencies: + '@rsbuild/core': 1.x + + '@rsbuild/plugin-svgr@1.0.6': + resolution: {integrity: sha512-znLFk2fumNObMntkjrpZhO3guXmaQZbqv0JjhqBVng63bNdsJAmfZGXX5He8Avp4VDlv6EJI6BC5SIEs8XspTg==} + peerDependencies: + '@rsbuild/core': 1.x + + '@rspack/binding-darwin-arm64@1.1.6': + resolution: {integrity: sha512-x9dxm2yyiMuL1FBwvWNNMs2/mEUJmRoSRgYb8pblR7HDaTRORrjBFCqhaYlGyAqtQaeUy7o2VAQlE0BavIiFYA==} + cpu: [arm64] + os: [darwin] + + '@rspack/binding-darwin-x64@1.1.6': + resolution: {integrity: sha512-o0seilveftGiDjy3VPxug20HmAgYyQbNEuagR3i93/t/PT/eWXHnik+C1jjwqcivZL1Zllqvy4tbZw393aROEQ==} + cpu: [x64] + os: [darwin] + + '@rspack/binding-linux-arm64-gnu@1.1.6': + resolution: {integrity: sha512-4atnoknJx/c3KaQElsMIxHMpPf2jcRRdWsH/SdqJIRSrkWWakMK9Yv4TFwH680I4HDTMf1XLboMVScHzW8e+Mg==} + cpu: [arm64] + os: [linux] + + '@rspack/binding-linux-arm64-musl@1.1.6': + resolution: {integrity: sha512-7QMtwUtgFpt3/Y3/X18fSyN+kk4H8ZnZ8tDzQskVWc/j2AQYShZq56XQYqrhClzwujcCVAHauIQ2eiuJ2ASGag==} + cpu: [arm64] + os: [linux] + + '@rspack/binding-linux-x64-gnu@1.1.6': + resolution: {integrity: sha512-MTjDEfPn4TwHoqs5d5Fck06kmXiTHZctGIcRVfrpg0RK0r1NLEHN+oosavRZ9c9H70f34+NmcHk+/qvV4c8lWg==} + cpu: [x64] + os: [linux] + + '@rspack/binding-linux-x64-musl@1.1.6': + resolution: {integrity: sha512-LqDw7PTVr/4ZuGA0izgDQfamfr72USFHltR1Qhy2YVC3JmDmhG/pQi13LHcOLVaGH1xoeyCmEPNJpVizzDxSjg==} + cpu: [x64] + os: [linux] + + '@rspack/binding-win32-arm64-msvc@1.1.6': + resolution: {integrity: sha512-RHApLM93YN0WdHpS35u2cm7VCqZ8Yg3CrNRL16VJtyT9e6MBqeScoe4XIgIWKPm7edFyedYAjLX0wQOApwfjkg==} + cpu: [arm64] + os: [win32] + + '@rspack/binding-win32-ia32-msvc@1.1.6': + resolution: {integrity: sha512-Y6lx4q0eJawRfMPBo/AclTJAPTZ325DSPFBQJB3TnWh9Z2X7P7pQcYc8PHDmfDuYRIdg5WRsQRvVxihSvF7v8w==} + cpu: [ia32] + os: [win32] + + '@rspack/binding-win32-x64-msvc@1.1.6': + resolution: {integrity: sha512-UuCsfhC/yNuU7xLASOxNXcmsXi2ZvBX14GkxvcdChw6q7IIGNYUKXo1zgR8C1PE/6qDSxmLxbRMS+71d0H3HQg==} + cpu: [x64] + os: [win32] + + '@rspack/binding@1.1.6': + resolution: {integrity: sha512-vfeBEgGOYVwqj5cQjGyvdfrr/BEihAHlyIsobL98FZjTF0uig+bj2yJUH5Ib5F0BpIUKVG3Pw0IjlUBqcVpZsQ==} + + '@rspack/core@1.1.6': + resolution: {integrity: sha512-q0VLphOF5VW2FEG7Vbdq3Ke4I74FbELE/8xmKghSalFtULLZ44SoSz8lyotfMim9GXIRFhDokAaH8WICmPxG+g==} + engines: {node: '>=16.0.0'} + peerDependencies: + '@swc/helpers': '>=0.5.1' + peerDependenciesMeta: + '@swc/helpers': + optional: true + + '@rspack/lite-tapable@1.0.1': + resolution: {integrity: sha512-VynGOEsVw2s8TAlLf/uESfrgfrq2+rcXB1muPJYBWbsm1Oa6r5qVQhjA5ggM6z/coYPrsVMgovl3Ff7Q7OCp1w==} + engines: {node: '>=16.0.0'} + + '@rspack/plugin-react-refresh@1.0.1': + resolution: {integrity: sha512-KSBc3bsr3mrAPViv7w9MpE9KEWm6q87EyRXyHlRfJ9PpQ56NbX9KZ7AXo7jPeECb0q5sfpM2PSEf+syBiMgLSw==} + peerDependencies: + react-refresh: '>=0.10.0 <1.0.0' + peerDependenciesMeta: + react-refresh: + optional: true + '@rtsao/scc@1.1.0': resolution: {integrity: sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==} @@ -3263,6 +3428,9 @@ packages: core-js-pure@3.39.0: resolution: {integrity: sha512-7fEcWwKI4rJinnK+wLTezeg2smbFFdSBP6E2kQZNbnzM2s1rpKQ6aaRteZSSg7FLU3P0HGGVo/gbpfanU36urg==} + core-js@3.39.0: + resolution: {integrity: sha512-raM0ew0/jJUqkJ0E6e8UDtl+y/7ktFivgWvqw8dNSQeNWoSDLvQ1H/RN3aPXB9tBd4/FhyR4RDPGhsNIMsAn7g==} + core-util-is@1.0.3: resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==} @@ -8849,6 +9017,22 @@ snapshots: globby: 11.1.0 read-yaml-file: 1.1.0 + '@module-federation/runtime-tools@0.5.1': + dependencies: + '@module-federation/runtime': 0.5.1 + '@module-federation/webpack-bundler-runtime': 0.5.1 + + '@module-federation/runtime@0.5.1': + dependencies: + '@module-federation/sdk': 0.5.1 + + '@module-federation/sdk@0.5.1': {} + + '@module-federation/webpack-bundler-runtime@0.5.1': + dependencies: + '@module-federation/runtime': 0.5.1 + '@module-federation/sdk': 0.5.1 + '@mswjs/interceptors@0.37.3': dependencies: '@open-draft/deferred-promise': 2.2.0 @@ -9080,6 +9264,95 @@ snapshots: '@rollup/rollup-win32-x64-msvc@4.28.1': optional: true + '@rsbuild/core@1.1.9': + dependencies: + '@rspack/core': 1.1.6(@swc/helpers@0.5.15) + '@rspack/lite-tapable': 1.0.1 + '@swc/helpers': 0.5.15 + core-js: 3.39.0 + + '@rsbuild/plugin-basic-ssl@1.1.1(@rsbuild/core@1.1.9)': + dependencies: + selfsigned: 2.4.1 + optionalDependencies: + '@rsbuild/core': 1.1.9 + + '@rsbuild/plugin-react@1.1.0(@rsbuild/core@1.1.9)': + dependencies: + '@rsbuild/core': 1.1.9 + '@rspack/plugin-react-refresh': 1.0.1(react-refresh@0.16.0) + react-refresh: 0.16.0 + + '@rsbuild/plugin-svgr@1.0.6(@rsbuild/core@1.1.9)(typescript@5.5.4)': + dependencies: + '@rsbuild/core': 1.1.9 + '@rsbuild/plugin-react': 1.1.0(@rsbuild/core@1.1.9) + '@svgr/core': 8.1.0(typescript@5.5.4) + '@svgr/plugin-jsx': 8.1.0(@svgr/core@8.1.0(typescript@5.5.4)) + '@svgr/plugin-svgo': 8.1.0(@svgr/core@8.1.0(typescript@5.5.4))(typescript@5.5.4) + deepmerge: 4.3.1 + loader-utils: 2.0.4 + transitivePeerDependencies: + - supports-color + - typescript + + '@rspack/binding-darwin-arm64@1.1.6': + optional: true + + '@rspack/binding-darwin-x64@1.1.6': + optional: true + + '@rspack/binding-linux-arm64-gnu@1.1.6': + optional: true + + '@rspack/binding-linux-arm64-musl@1.1.6': + optional: true + + '@rspack/binding-linux-x64-gnu@1.1.6': + optional: true + + '@rspack/binding-linux-x64-musl@1.1.6': + optional: true + + '@rspack/binding-win32-arm64-msvc@1.1.6': + optional: true + + '@rspack/binding-win32-ia32-msvc@1.1.6': + optional: true + + '@rspack/binding-win32-x64-msvc@1.1.6': + optional: true + + '@rspack/binding@1.1.6': + optionalDependencies: + '@rspack/binding-darwin-arm64': 1.1.6 + '@rspack/binding-darwin-x64': 1.1.6 + '@rspack/binding-linux-arm64-gnu': 1.1.6 + '@rspack/binding-linux-arm64-musl': 1.1.6 + '@rspack/binding-linux-x64-gnu': 1.1.6 + '@rspack/binding-linux-x64-musl': 1.1.6 + '@rspack/binding-win32-arm64-msvc': 1.1.6 + '@rspack/binding-win32-ia32-msvc': 1.1.6 + '@rspack/binding-win32-x64-msvc': 1.1.6 + + '@rspack/core@1.1.6(@swc/helpers@0.5.15)': + dependencies: + '@module-federation/runtime-tools': 0.5.1 + '@rspack/binding': 1.1.6 + '@rspack/lite-tapable': 1.0.1 + caniuse-lite: 1.0.30001687 + optionalDependencies: + '@swc/helpers': 0.5.15 + + '@rspack/lite-tapable@1.0.1': {} + + '@rspack/plugin-react-refresh@1.0.1(react-refresh@0.16.0)': + dependencies: + error-stack-parser: 2.1.4 + html-entities: 2.5.2 + optionalDependencies: + react-refresh: 0.16.0 + '@rtsao/scc@1.1.0': {} '@sinclair/typebox@0.27.8': {} @@ -10284,6 +10557,8 @@ snapshots: core-js-pure@3.39.0: {} + core-js@3.39.0: {} + core-util-is@1.0.3: {} corser@2.0.1: {} @@ -10368,7 +10643,7 @@ snapshots: postcss-selector-parser: 7.0.0 postcss-value-parser: 4.2.0 - css-loader@7.1.2(webpack@5.97.1(@swc/core@1.10.1(@swc/helpers@0.5.15))): + css-loader@7.1.2(@rspack/core@1.1.6(@swc/helpers@0.5.15))(webpack@5.97.1(@swc/core@1.10.1(@swc/helpers@0.5.15))): dependencies: icss-utils: 5.1.0(postcss@8.4.49) postcss: 8.4.49 @@ -10379,6 +10654,7 @@ snapshots: postcss-value-parser: 4.2.0 semver: 7.6.3 optionalDependencies: + '@rspack/core': 1.1.6(@swc/helpers@0.5.15) webpack: 5.97.1(@swc/core@1.10.1(@swc/helpers@0.5.15)) css-prefers-color-scheme@10.0.0(postcss@8.4.49): @@ -11494,7 +11770,7 @@ snapshots: html-tags@3.3.1: {} - html-webpack-plugin@5.6.3(webpack@5.97.1(@swc/core@1.10.1(@swc/helpers@0.5.15))): + html-webpack-plugin@5.6.3(@rspack/core@1.1.6(@swc/helpers@0.5.15))(webpack@5.97.1(@swc/core@1.10.1(@swc/helpers@0.5.15))): dependencies: '@types/html-minifier-terser': 6.1.0 html-minifier-terser: 6.1.0 @@ -11502,6 +11778,7 @@ snapshots: pretty-error: 4.0.0 tapable: 2.2.1 optionalDependencies: + '@rspack/core': 1.1.6(@swc/helpers@0.5.15) webpack: 5.97.1(@swc/core@1.10.1(@swc/helpers@0.5.15)) htmlparser2@6.1.0: @@ -13381,13 +13658,14 @@ snapshots: postcss: 8.4.49 yaml: 2.6.1 - postcss-loader@8.1.1(postcss@8.4.49)(typescript@5.5.4)(webpack@5.97.1(@swc/core@1.10.1(@swc/helpers@0.5.15))): + postcss-loader@8.1.1(@rspack/core@1.1.6(@swc/helpers@0.5.15))(postcss@8.4.49)(typescript@5.5.4)(webpack@5.97.1(@swc/core@1.10.1(@swc/helpers@0.5.15))): dependencies: cosmiconfig: 9.0.0(typescript@5.5.4) jiti: 1.21.6 postcss: 8.4.49 semver: 7.6.3 optionalDependencies: + '@rspack/core': 1.1.6(@swc/helpers@0.5.15) webpack: 5.97.1(@swc/core@1.10.1(@swc/helpers@0.5.15)) transitivePeerDependencies: - typescript From 1edebbbc4f9b59e370dd14f041394436d69ecb9d Mon Sep 17 00:00:00 2001 From: patricklafrance Date: Wed, 11 Dec 2024 13:59:06 -0500 Subject: [PATCH 03/18] More stuff --- .changeset/config.json | 2 +- .github/workflows/ci.yml | 4 +- knip.ts | 20 +- package.json | 14 +- packages/rsbuild-configs/README.md | 10 +- pnpm-lock.yaml | 275 ++++++++++++----- pnpm-workspace.yaml | 2 +- sample/tsup-lib/src/index.ts | 1 - .../rsbuild}/app/.browserslistrc | 0 {sample => samples/rsbuild}/app/.eslintignore | 0 .../rsbuild}/app/.eslintrc.json | 0 .../rsbuild}/app/.stylelintrc.json | 0 .../rsbuild}/app/jest.config.ts | 0 samples/rsbuild/app/nodemon.json | 5 + samples/rsbuild/app/package.json | 59 ++++ .../rsbuild}/app/public/favicon.png | Bin .../rsbuild}/app/public/index.html | 0 .../rsbuild}/app/public/mockServiceWorker.js | 0 samples/rsbuild/app/rsbuild.build.ts | 8 + samples/rsbuild/app/rsbuild.dev.ts | 10 + samples/rsbuild/app/src/About.tsx | 12 + {sample => samples/rsbuild}/app/src/App.tsx | 0 {sample => samples/rsbuild}/app/src/Fetch.tsx | 0 {sample => samples/rsbuild}/app/src/Home.css | 0 samples/rsbuild/app/src/Home.tsx | 15 + .../rsbuild}/app/src/RootLayout.css | 0 .../rsbuild}/app/src/RootLayout.tsx | 0 .../rsbuild}/app/src/assets/add.svg | 0 {sample => samples/rsbuild}/app/src/index.tsx | 0 .../rsbuild}/app/src/mocks/browser.ts | 0 .../rsbuild}/app/src/mocks/handlers.ts | 0 .../rsbuild}/app/src/types/svgr.d.ts | 0 {sample => samples/rsbuild}/app/swc.jest.ts | 0 .../rsbuild}/app/tests/About.test.tsx | 0 samples/rsbuild/app/tsconfig.json | 12 + samples/rsbuild/app/types/images.d.ts | 8 + .../rsbuild}/components/.eslintignore | 0 .../rsbuild}/components/.eslintrc.json | 0 .../rsbuild}/components/.stylelintrc.json | 0 .../rsbuild}/components/jest.config.ts | 0 .../rsbuild}/components/package.json | 2 +- .../rsbuild}/components/src/Button.css | 0 .../rsbuild}/components/src/Button.tsx | 0 .../rsbuild}/components/src/index.ts | 0 .../rsbuild}/components/swc.jest.ts | 0 .../rsbuild}/components/tests/Button.test.tsx | 0 .../rsbuild}/components/tsconfig.json | 0 samples/webpack/app/.browserslistrc | 1 + .../webpack/app}/.eslintignore | 0 samples/webpack/app/.eslintrc.json | 5 + samples/webpack/app/.stylelintrc.json | 4 + samples/webpack/app/jest.config.ts | 19 ++ {sample => samples/webpack}/app/nodemon.json | 0 {sample => samples/webpack}/app/package.json | 18 +- .../webpack}/app/postcss.config.ts | 0 samples/webpack/app/public/favicon.png | Bin 0 -> 31428 bytes samples/webpack/app/public/index.html | 9 + .../webpack/app/public/mockServiceWorker.js | 292 ++++++++++++++++++ {sample => samples/webpack}/app/src/About.tsx | 4 +- samples/webpack/app/src/App.tsx | 43 +++ samples/webpack/app/src/Fetch.tsx | 31 ++ samples/webpack/app/src/Home.css | 3 + {sample => samples/webpack}/app/src/Home.tsx | 2 +- samples/webpack/app/src/RootLayout.css | 10 + samples/webpack/app/src/RootLayout.tsx | 17 + samples/webpack/app/src/assets/add.svg | 1 + samples/webpack/app/src/index.tsx | 17 + samples/webpack/app/src/mocks/browser.ts | 5 + samples/webpack/app/src/mocks/handlers.ts | 28 ++ samples/webpack/app/src/types/svgr.d.ts | 4 + {sample => samples/webpack}/app/swc.build.js | 0 {sample => samples/webpack}/app/swc.dev.js | 0 samples/webpack/app/swc.jest.ts | 5 + samples/webpack/app/tests/About.test.tsx | 8 + {sample => samples/webpack}/app/tsconfig.json | 2 +- .../webpack}/app/webpack.build.js | 0 .../webpack}/app/webpack.dev.js | 0 samples/webpack/components/.eslintignore | 2 + samples/webpack/components/.eslintrc.json | 5 + samples/webpack/components/.stylelintrc.json | 4 + samples/webpack/components/jest.config.ts | 19 ++ samples/webpack/components/package.json | 43 +++ samples/webpack/components/src/Button.css | 4 + samples/webpack/components/src/Button.tsx | 12 + samples/webpack/components/src/index.ts | 1 + samples/webpack/components/swc.jest.ts | 5 + .../webpack/components/tests/Button.test.tsx | 8 + .../webpack/components}/tsconfig.json | 0 samples/webpack/tsup-lib/.eslintignore | 2 + .../webpack}/tsup-lib/.eslintrc.json | 0 .../webpack}/tsup-lib/package.json | 2 +- .../webpack}/tsup-lib/src/helloFrom.ts | 0 samples/webpack/tsup-lib/src/index.ts | 1 + samples/webpack/tsup-lib/tsconfig.json | 8 + .../webpack}/tsup-lib/tsup.build.ts | 0 .../webpack}/tsup-lib/tsup.dev.ts | 0 tsconfig.json | 2 +- 97 files changed, 977 insertions(+), 128 deletions(-) delete mode 100644 sample/tsup-lib/src/index.ts rename {sample => samples/rsbuild}/app/.browserslistrc (100%) rename {sample => samples/rsbuild}/app/.eslintignore (100%) rename {sample => samples/rsbuild}/app/.eslintrc.json (100%) rename {sample => samples/rsbuild}/app/.stylelintrc.json (100%) rename {sample => samples/rsbuild}/app/jest.config.ts (100%) create mode 100644 samples/rsbuild/app/nodemon.json create mode 100644 samples/rsbuild/app/package.json rename {sample => samples/rsbuild}/app/public/favicon.png (100%) rename {sample => samples/rsbuild}/app/public/index.html (100%) rename {sample => samples/rsbuild}/app/public/mockServiceWorker.js (100%) create mode 100644 samples/rsbuild/app/rsbuild.build.ts create mode 100644 samples/rsbuild/app/rsbuild.dev.ts create mode 100644 samples/rsbuild/app/src/About.tsx rename {sample => samples/rsbuild}/app/src/App.tsx (100%) rename {sample => samples/rsbuild}/app/src/Fetch.tsx (100%) rename {sample => samples/rsbuild}/app/src/Home.css (100%) create mode 100644 samples/rsbuild/app/src/Home.tsx rename {sample => samples/rsbuild}/app/src/RootLayout.css (100%) rename {sample => samples/rsbuild}/app/src/RootLayout.tsx (100%) rename {sample => samples/rsbuild}/app/src/assets/add.svg (100%) rename {sample => samples/rsbuild}/app/src/index.tsx (100%) rename {sample => samples/rsbuild}/app/src/mocks/browser.ts (100%) rename {sample => samples/rsbuild}/app/src/mocks/handlers.ts (100%) rename {sample => samples/rsbuild}/app/src/types/svgr.d.ts (100%) rename {sample => samples/rsbuild}/app/swc.jest.ts (100%) rename {sample => samples/rsbuild}/app/tests/About.test.tsx (100%) create mode 100644 samples/rsbuild/app/tsconfig.json create mode 100644 samples/rsbuild/app/types/images.d.ts rename {sample => samples/rsbuild}/components/.eslintignore (100%) rename {sample => samples/rsbuild}/components/.eslintrc.json (100%) rename {sample => samples/rsbuild}/components/.stylelintrc.json (100%) rename {sample => samples/rsbuild}/components/jest.config.ts (100%) rename {sample => samples/rsbuild}/components/package.json (96%) rename {sample => samples/rsbuild}/components/src/Button.css (100%) rename {sample => samples/rsbuild}/components/src/Button.tsx (100%) rename {sample => samples/rsbuild}/components/src/index.ts (100%) rename {sample => samples/rsbuild}/components/swc.jest.ts (100%) rename {sample => samples/rsbuild}/components/tests/Button.test.tsx (100%) rename {sample => samples/rsbuild}/components/tsconfig.json (100%) create mode 100644 samples/webpack/app/.browserslistrc rename {sample/tsup-lib => samples/webpack/app}/.eslintignore (100%) create mode 100644 samples/webpack/app/.eslintrc.json create mode 100644 samples/webpack/app/.stylelintrc.json create mode 100644 samples/webpack/app/jest.config.ts rename {sample => samples/webpack}/app/nodemon.json (100%) rename {sample => samples/webpack}/app/package.json (91%) rename {sample => samples/webpack}/app/postcss.config.ts (100%) create mode 100644 samples/webpack/app/public/favicon.png create mode 100644 samples/webpack/app/public/index.html create mode 100644 samples/webpack/app/public/mockServiceWorker.js rename {sample => samples/webpack}/app/src/About.tsx (69%) create mode 100644 samples/webpack/app/src/App.tsx create mode 100644 samples/webpack/app/src/Fetch.tsx create mode 100644 samples/webpack/app/src/Home.css rename {sample => samples/webpack}/app/src/Home.tsx (86%) create mode 100644 samples/webpack/app/src/RootLayout.css create mode 100644 samples/webpack/app/src/RootLayout.tsx create mode 100644 samples/webpack/app/src/assets/add.svg create mode 100644 samples/webpack/app/src/index.tsx create mode 100644 samples/webpack/app/src/mocks/browser.ts create mode 100644 samples/webpack/app/src/mocks/handlers.ts create mode 100644 samples/webpack/app/src/types/svgr.d.ts rename {sample => samples/webpack}/app/swc.build.js (100%) rename {sample => samples/webpack}/app/swc.dev.js (100%) create mode 100644 samples/webpack/app/swc.jest.ts create mode 100644 samples/webpack/app/tests/About.test.tsx rename {sample => samples/webpack}/app/tsconfig.json (80%) rename {sample => samples/webpack}/app/webpack.build.js (100%) rename {sample => samples/webpack}/app/webpack.dev.js (100%) create mode 100644 samples/webpack/components/.eslintignore create mode 100644 samples/webpack/components/.eslintrc.json create mode 100644 samples/webpack/components/.stylelintrc.json create mode 100644 samples/webpack/components/jest.config.ts create mode 100644 samples/webpack/components/package.json create mode 100644 samples/webpack/components/src/Button.css create mode 100644 samples/webpack/components/src/Button.tsx create mode 100644 samples/webpack/components/src/index.ts create mode 100644 samples/webpack/components/swc.jest.ts create mode 100644 samples/webpack/components/tests/Button.test.tsx rename {sample/tsup-lib => samples/webpack/components}/tsconfig.json (100%) create mode 100644 samples/webpack/tsup-lib/.eslintignore rename {sample => samples/webpack}/tsup-lib/.eslintrc.json (100%) rename {sample => samples/webpack}/tsup-lib/package.json (96%) rename {sample => samples/webpack}/tsup-lib/src/helloFrom.ts (100%) create mode 100644 samples/webpack/tsup-lib/src/index.ts create mode 100644 samples/webpack/tsup-lib/tsconfig.json rename {sample => samples/webpack}/tsup-lib/tsup.build.ts (100%) rename {sample => samples/webpack}/tsup-lib/tsup.dev.ts (100%) diff --git a/.changeset/config.json b/.changeset/config.json index 927fda69..aadc412d 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -10,7 +10,7 @@ "access": "restricted", "baseBranch": "main", "updateInternalDependencies": "patch", - "ignore": ["@sample/*"], + "ignore": ["@webpack-sample/*"], "___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": { "onlyUpdatePeerDependentsWhenOutOfRange": true } diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 67146661..d32a45a5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -54,8 +54,8 @@ jobs: - name: Build packages run: pnpm build-pkg - - name: Build sample - run: pnpm build-sample + - name: Build webpack sample + run: pnpm build-webpack - name: Test packages run: pnpm test diff --git a/knip.ts b/knip.ts index ccf3ecba..47b8db6a 100644 --- a/knip.ts +++ b/knip.ts @@ -91,7 +91,7 @@ const configurePackage: KnipTransformer = config => { }; }; -const configureSample: KnipTransformer = ({ entry, ...config }) => { +const configureWebpackSample: KnipTransformer = ({ entry, ...config }) => { return { ...config, entry: [ @@ -142,21 +142,21 @@ const webpackConfig: KnipWorkspaceConfig = defineWorkspace({ configureTsup ]); -const sampleAppConfig = defineWorkspace({}, [ - configureSample, +const webpackSampleAppConfig = defineWorkspace({}, [ + configureWebpackSample, ignoreBrowserslist, configurePostcss, configureWebpack, configureMsw ]); -const sampleComponentsConfig = defineWorkspace({}, [ - configureSample, +const webpackSampleComponentsConfig = defineWorkspace({}, [ + configureWebpackSample, configureTsup ]); -const sampleUtilsConfig = defineWorkspace({}, [ - configureSample, +const webpackSampleTsupLibConfig = defineWorkspace({}, [ + configureWebpackSample, configureTsup ]); @@ -166,9 +166,9 @@ const config: KnipConfig = { "packages/*": packagesConfig, "packages/swc-configs": swcConfig, "packages/webpack-configs": webpackConfig, - "sample/app": sampleAppConfig, - "sample/components": sampleComponentsConfig, - "sample/utils": sampleUtilsConfig + "samples/webpack/app": webpackSampleAppConfig, + "samples/webpack/components": webpackSampleComponentsConfig, + "samples/webpack/tsup-lib": webpackSampleTsupLibConfig }, ignoreWorkspaces: [ // Until it's migrated to ESLint 9. diff --git a/package.json b/package.json index 70715278..305fa4e2 100644 --- a/package.json +++ b/package.json @@ -10,15 +10,19 @@ "url": "git+https://github.com/gsoft-inc/wl-web-configs.git" }, "scripts": { - "dev-sample": "turbo run dev --filter=./sample/*", - "dev-sample-msw": "turbo run dev-msw --filter=./sample/*", + "dev-webpack": "turbo run dev --filter=./samples/webpack/*", + "dev-webpack-msw": "turbo run dev-msw --filter=./samples/webpack/*", + "dev-rsbuild": "turbo run dev --filter=./samples/rsbuild/*", + "dev-rsbuild-msw": "turbo run dev-msw --filter=./samples/rsbuild/*", "dev-docs": "retype start", "build-pkg": "turbo run build --filter=./packages/*", - "build-sample": "turbo run build --filter=./sample/*", - "serve-sample": "turbo run serve-build --filter=./sample/*", + "build-webpack": "turbo run build --filter=./samples/webpack/*", + "build-rsbuild": "turbo run build --filter=./samples/rsbuild/*", + "serve-webpack": "turbo run serve-build --filter=./samples/webpack/*", + "serve-rsbuild": "turbo run serve-build --filter=./samples/rsbuild/*", "prelint": "turbo run build --filter=./packages/*", "lint": "turbo run lint --continue", - "eslint": "eslint . --ignore-pattern packages --ignore-pattern sample --max-warnings=-0 --cache --cache-location node_modules/.cache/eslint", + "eslint": "eslint . --ignore-pattern packages --ignore-pattern samples --max-warnings=-0 --cache --cache-location node_modules/.cache/eslint", "typecheck": "tsc", "syncpack": "syncpack lint", "knip": "knip --cache --cache-location ./node_modules/.cache/knip", diff --git a/packages/rsbuild-configs/README.md b/packages/rsbuild-configs/README.md index 3efbef53..002bf5ce 100644 --- a/packages/rsbuild-configs/README.md +++ b/packages/rsbuild-configs/README.md @@ -1,7 +1,7 @@ -# webpack-configs +# rsbuild-configs [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](../../LICENSE) -[![npm version](https://img.shields.io/npm/v/@workleap/webpack-configs)](https://www.npmjs.com/package/@workleap/webpack-configs) +[![npm version](https://img.shields.io/npm/v/@workleap/rsbuild-configs)](https://www.npmjs.com/package/@workleap/rsbuild-configs) ## Usage @@ -11,12 +11,6 @@ View the [user's documentation](https://gsoft-inc.github.io/wl-web-configs/). View the [contributor's documentation](../../CONTRIBUTING.md). -### Notes - -#### Add the @swc/helpers packages to all monorepo imported projects having JSX code - -To work properly, all projects having React/JSX code that are referenced by the host project must also install `@swc/helpers` as a `devDependency`. - ## License Copyright © 2023, Workleap. This code is licensed under the Apache License, Version 2.0. You may obtain a copy of this license at https://github.com/gsoft-inc/workleap-license/blob/master/LICENSE. diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e5c005d9..cf2d224d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -495,12 +495,172 @@ importers: specifier: 5.5.4 version: 5.5.4 - sample/app: + samples/rsbuild/app: dependencies: - '@sample/components': + '@rsbuild-sample/components': specifier: workspace:* version: link:../components - '@sample/tsup-lib': + react: + specifier: 19.0.0 + version: 19.0.0 + react-dom: + specifier: 19.0.0 + version: 19.0.0(react@19.0.0) + react-router: + specifier: 7.0.2 + version: 7.0.2(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + devDependencies: + '@rsbuild/core': + specifier: 1.1.9 + version: 1.1.9 + '@rspack/core': + specifier: 1.1.6 + version: 1.1.6(@swc/helpers@0.5.15) + '@swc/core': + specifier: 1.10.1 + version: 1.10.1(@swc/helpers@0.5.15) + '@swc/jest': + specifier: 0.2.37 + version: 0.2.37(@swc/core@1.10.1(@swc/helpers@0.5.15)) + '@testing-library/react': + specifier: 16.1.0 + version: 16.1.0(@testing-library/dom@10.4.0)(@types/react-dom@19.0.2(@types/react@19.0.1))(@types/react@19.0.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@types/jest': + specifier: 29.5.14 + version: 29.5.14 + '@types/node': + specifier: 22.10.1 + version: 22.10.1 + '@types/react': + specifier: 19.0.1 + version: 19.0.1 + '@types/react-dom': + specifier: 19.0.2 + version: 19.0.2(@types/react@19.0.1) + '@typescript-eslint/parser': + specifier: 8.18.0 + version: 8.18.0(eslint@8.57.0)(typescript@5.5.4) + '@workleap/browserslist-config': + specifier: workspace:* + version: link:../../../packages/browserslist-config + '@workleap/eslint-plugin': + specifier: workspace:* + version: link:../../../packages/eslint-plugin + '@workleap/rsbuild-configs': + specifier: workspace:* + version: link:../../../packages/rsbuild-configs + '@workleap/stylelint-configs': + specifier: workspace:* + version: link:../../../packages/stylelint-configs + '@workleap/swc-configs': + specifier: workspace:* + version: link:../../../packages/swc-configs + '@workleap/typescript-configs': + specifier: workspace:* + version: link:../../../packages/typescript-configs + browserslist: + specifier: 4.24.2 + version: 4.24.2 + cross-env: + specifier: 7.0.3 + version: 7.0.3 + eslint: + specifier: 8.57.0 + version: 8.57.0 + http-server: + specifier: 14.1.1 + version: 14.1.1 + identity-obj-proxy: + specifier: 3.0.0 + version: 3.0.0 + jest: + specifier: 29.7.0 + version: 29.7.0(@types/node@22.10.1)(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.1)(typescript@5.5.4)) + jest-environment-jsdom: + specifier: 29.7.0 + version: 29.7.0 + msw: + specifier: 2.6.8 + version: 2.6.8(@types/node@22.10.1)(typescript@5.5.4) + nodemon: + specifier: 3.1.7 + version: 3.1.7 + stylelint: + specifier: 16.11.0 + version: 16.11.0(typescript@5.5.4) + ts-node: + specifier: 10.9.2 + version: 10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.1)(typescript@5.5.4) + typescript: + specifier: 5.5.4 + version: 5.5.4 + + samples/rsbuild/components: + devDependencies: + '@swc/core': + specifier: 1.10.1 + version: 1.10.1(@swc/helpers@0.5.15) + '@swc/jest': + specifier: 0.2.37 + version: 0.2.37(@swc/core@1.10.1(@swc/helpers@0.5.15)) + '@testing-library/react': + specifier: 16.1.0 + version: 16.1.0(@testing-library/dom@10.4.0)(@types/react-dom@19.0.2(@types/react@19.0.1))(@types/react@19.0.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@types/jest': + specifier: 29.5.14 + version: 29.5.14 + '@types/react': + specifier: 19.0.1 + version: 19.0.1 + '@types/react-dom': + specifier: 19.0.2 + version: 19.0.2(@types/react@19.0.1) + '@typescript-eslint/parser': + specifier: 8.18.0 + version: 8.18.0(eslint@8.57.0)(typescript@5.5.4) + '@workleap/eslint-plugin': + specifier: workspace:* + version: link:../../../packages/eslint-plugin + '@workleap/stylelint-configs': + specifier: workspace:* + version: link:../../../packages/stylelint-configs + '@workleap/swc-configs': + specifier: workspace:* + version: link:../../../packages/swc-configs + '@workleap/typescript-configs': + specifier: workspace:* + version: link:../../../packages/typescript-configs + eslint: + specifier: 8.57.0 + version: 8.57.0 + identity-obj-proxy: + specifier: 3.0.0 + version: 3.0.0 + jest: + specifier: 29.7.0 + version: 29.7.0(@types/node@22.10.1)(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.1)(typescript@5.5.4)) + jest-environment-jsdom: + specifier: 29.7.0 + version: 29.7.0 + react: + specifier: 19.0.0 + version: 19.0.0 + react-dom: + specifier: 19.0.0 + version: 19.0.0(react@19.0.0) + ts-node: + specifier: 10.9.2 + version: 10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.1)(typescript@5.5.4) + typescript: + specifier: 5.5.4 + version: 5.5.4 + + samples/webpack/app: + dependencies: + '@webpack-sample/components': + specifier: workspace:* + version: link:../components + '@webpack-sample/tsup-lib': specifier: workspace:* version: link:../tsup-lib react: @@ -542,25 +702,25 @@ importers: version: 8.18.0(eslint@8.57.0)(typescript@5.5.4) '@workleap/browserslist-config': specifier: workspace:* - version: link:../../packages/browserslist-config + version: link:../../../packages/browserslist-config '@workleap/eslint-plugin': specifier: workspace:* - version: link:../../packages/eslint-plugin + version: link:../../../packages/eslint-plugin '@workleap/postcss-configs': specifier: workspace:* - version: link:../../packages/postcss-configs + version: link:../../../packages/postcss-configs '@workleap/stylelint-configs': specifier: workspace:* - version: link:../../packages/stylelint-configs + version: link:../../../packages/stylelint-configs '@workleap/swc-configs': specifier: workspace:* - version: link:../../packages/swc-configs + version: link:../../../packages/swc-configs '@workleap/typescript-configs': specifier: workspace:* - version: link:../../packages/typescript-configs + version: link:../../../packages/typescript-configs '@workleap/webpack-configs': specifier: workspace:* - version: link:../../packages/webpack-configs + version: link:../../../packages/webpack-configs browserslist: specifier: 4.24.2 version: 4.24.2 @@ -610,7 +770,7 @@ importers: specifier: 5.1.0 version: 5.1.0(webpack-cli@5.1.4)(webpack@5.97.1) - sample/components: + samples/webpack/components: devDependencies: '@swc/core': specifier: 1.10.1 @@ -635,16 +795,16 @@ importers: version: 8.18.0(eslint@8.57.0)(typescript@5.5.4) '@workleap/eslint-plugin': specifier: workspace:* - version: link:../../packages/eslint-plugin + version: link:../../../packages/eslint-plugin '@workleap/stylelint-configs': specifier: workspace:* - version: link:../../packages/stylelint-configs + version: link:../../../packages/stylelint-configs '@workleap/swc-configs': specifier: workspace:* - version: link:../../packages/swc-configs + version: link:../../../packages/swc-configs '@workleap/typescript-configs': specifier: workspace:* - version: link:../../packages/typescript-configs + version: link:../../../packages/typescript-configs eslint: specifier: 8.57.0 version: 8.57.0 @@ -670,20 +830,20 @@ importers: specifier: 5.5.4 version: 5.5.4 - sample/tsup-lib: + samples/webpack/tsup-lib: devDependencies: '@typescript-eslint/parser': specifier: 8.18.0 version: 8.18.0(eslint@8.57.0)(typescript@5.5.4) '@workleap/eslint-plugin': specifier: workspace:* - version: link:../../packages/eslint-plugin + version: link:../../../packages/eslint-plugin '@workleap/tsup-configs': specifier: workspace:* - version: link:../../packages/tsup-configs + version: link:../../../packages/tsup-configs '@workleap/typescript-configs': specifier: workspace:* - version: link:../../packages/typescript-configs + version: link:../../../packages/typescript-configs eslint: specifier: 8.57.0 version: 8.57.0 @@ -1810,22 +1970,12 @@ packages: cpu: [x64] os: [win32] - '@eslint-community/eslint-utils@4.4.0': - resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 - '@eslint-community/eslint-utils@4.4.1': resolution: {integrity: sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 - '@eslint-community/regexpp@4.10.0': - resolution: {integrity: sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==} - engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - '@eslint-community/regexpp@4.12.1': resolution: {integrity: sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} @@ -3469,10 +3619,6 @@ packages: engines: {node: '>=10.14', npm: '>=6', yarn: '>=1'} hasBin: true - cross-spawn@7.0.3: - resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} - engines: {node: '>= 8'} - cross-spawn@7.0.6: resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} engines: {node: '>= 8'} @@ -3596,15 +3742,6 @@ packages: supports-color: optional: true - debug@4.3.4: - resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} - engines: {node: '>=6.0'} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - debug@4.4.0: resolution: {integrity: sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==} engines: {node: '>=6.0'} @@ -4209,9 +4346,6 @@ packages: resolution: {integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==} hasBin: true - flatted@3.3.1: - resolution: {integrity: sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==} - flatted@3.3.2: resolution: {integrity: sha512-AiwGJM8YcNOaobumgtng+6NHuOqC3A7MixFeDafM3X9cIUM+xUXoS5Vfgf+OihAYe20fxqNM9yPBXJzRtZ/4eA==} @@ -4324,6 +4458,7 @@ packages: glob@7.2.3: resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} + deprecated: Glob versions prior to v9 are no longer supported global-modules@2.0.0: resolution: {integrity: sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A==} @@ -4526,10 +4661,6 @@ packages: ignore-by-default@1.0.1: resolution: {integrity: sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==} - ignore@5.3.1: - resolution: {integrity: sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==} - engines: {node: '>= 4'} - ignore@5.3.2: resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} engines: {node: '>= 4'} @@ -4560,6 +4691,7 @@ packages: inflight@1.0.6: resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} + deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. inherits@2.0.3: resolution: {integrity: sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==} @@ -5419,9 +5551,6 @@ packages: ms@2.0.0: resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==} - ms@2.1.2: - resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} - ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} @@ -6275,6 +6404,7 @@ packages: rimraf@3.0.2: resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} + deprecated: Rimraf versions prior to v4 are no longer supported hasBin: true rollup@4.28.1: @@ -8661,27 +8791,20 @@ snapshots: '@esbuild/win32-x64@0.24.0': optional: true - '@eslint-community/eslint-utils@4.4.0(eslint@8.57.0)': - dependencies: - eslint: 8.57.0 - eslint-visitor-keys: 3.4.3 - '@eslint-community/eslint-utils@4.4.1(eslint@8.57.0)': dependencies: eslint: 8.57.0 eslint-visitor-keys: 3.4.3 - '@eslint-community/regexpp@4.10.0': {} - '@eslint-community/regexpp@4.12.1': {} '@eslint/eslintrc@2.1.4': dependencies: ajv: 6.12.6 - debug: 4.3.4 + debug: 4.4.0(supports-color@5.5.0) espree: 9.6.1 globals: 13.24.0 - ignore: 5.3.1 + ignore: 5.3.2 import-fresh: 3.3.0 js-yaml: 4.1.0 minimatch: 3.1.2 @@ -8694,7 +8817,7 @@ snapshots: '@humanwhocodes/config-array@0.11.14': dependencies: '@humanwhocodes/object-schema': 2.0.2 - debug: 4.3.4 + debug: 4.4.0(supports-color@5.5.0) minimatch: 3.1.2 transitivePeerDependencies: - supports-color @@ -10617,12 +10740,6 @@ snapshots: dependencies: cross-spawn: 7.0.6 - cross-spawn@7.0.3: - dependencies: - path-key: 3.1.1 - shebang-command: 2.0.0 - which: 2.0.2 - cross-spawn@7.0.6: dependencies: path-key: 3.1.1 @@ -10748,10 +10865,6 @@ snapshots: dependencies: ms: 2.1.3 - debug@4.3.4: - dependencies: - ms: 2.1.2 - debug@4.4.0(supports-color@5.5.0): dependencies: ms: 2.1.3 @@ -11305,8 +11418,8 @@ snapshots: eslint@8.57.0: dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) - '@eslint-community/regexpp': 4.10.0 + '@eslint-community/eslint-utils': 4.4.1(eslint@8.57.0) + '@eslint-community/regexpp': 4.12.1 '@eslint/eslintrc': 2.1.4 '@eslint/js': 8.57.0 '@humanwhocodes/config-array': 0.11.14 @@ -11315,8 +11428,8 @@ snapshots: '@ungap/structured-clone': 1.2.0 ajv: 6.12.6 chalk: 4.1.2 - cross-spawn: 7.0.3 - debug: 4.3.4 + cross-spawn: 7.0.6 + debug: 4.4.0(supports-color@5.5.0) doctrine: 3.0.0 escape-string-regexp: 4.0.0 eslint-scope: 7.2.2 @@ -11330,7 +11443,7 @@ snapshots: glob-parent: 6.0.2 globals: 13.24.0 graphemer: 1.4.0 - ignore: 5.3.1 + ignore: 5.3.2 imurmurhash: 0.1.4 is-glob: 4.0.3 is-path-inside: 3.0.3 @@ -11533,7 +11646,7 @@ snapshots: flat-cache@3.2.0: dependencies: - flatted: 3.3.1 + flatted: 3.3.2 keyv: 4.5.4 rimraf: 3.0.2 @@ -11544,8 +11657,6 @@ snapshots: flat@5.0.2: {} - flatted@3.3.1: {} - flatted@3.3.2: {} follow-redirects@1.15.9: {} @@ -11885,8 +11996,6 @@ snapshots: ignore-by-default@1.0.1: {} - ignore@5.3.1: {} - ignore@5.3.2: {} ignore@6.0.2: {} @@ -13173,8 +13282,6 @@ snapshots: ms@2.0.0: {} - ms@2.1.2: {} - ms@2.1.3: {} msw@2.6.8(@types/node@22.10.1)(typescript@5.5.4): diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index f4525e8e..4145d02c 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,3 +1,3 @@ packages: - "packages/*" - - "sample/*" + - "samples/**" diff --git a/sample/tsup-lib/src/index.ts b/sample/tsup-lib/src/index.ts deleted file mode 100644 index eb3a5a09..00000000 --- a/sample/tsup-lib/src/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./helloFrom.js"; diff --git a/sample/app/.browserslistrc b/samples/rsbuild/app/.browserslistrc similarity index 100% rename from sample/app/.browserslistrc rename to samples/rsbuild/app/.browserslistrc diff --git a/sample/app/.eslintignore b/samples/rsbuild/app/.eslintignore similarity index 100% rename from sample/app/.eslintignore rename to samples/rsbuild/app/.eslintignore diff --git a/sample/app/.eslintrc.json b/samples/rsbuild/app/.eslintrc.json similarity index 100% rename from sample/app/.eslintrc.json rename to samples/rsbuild/app/.eslintrc.json diff --git a/sample/app/.stylelintrc.json b/samples/rsbuild/app/.stylelintrc.json similarity index 100% rename from sample/app/.stylelintrc.json rename to samples/rsbuild/app/.stylelintrc.json diff --git a/sample/app/jest.config.ts b/samples/rsbuild/app/jest.config.ts similarity index 100% rename from sample/app/jest.config.ts rename to samples/rsbuild/app/jest.config.ts diff --git a/samples/rsbuild/app/nodemon.json b/samples/rsbuild/app/nodemon.json new file mode 100644 index 00000000..0e44387c --- /dev/null +++ b/samples/rsbuild/app/nodemon.json @@ -0,0 +1,5 @@ +{ + "watch": ["rsbuild.dev.ts"], + "exec": "rsbuild dev --config rsbuild.dev.ts", + "verbose": true +} diff --git a/samples/rsbuild/app/package.json b/samples/rsbuild/app/package.json new file mode 100644 index 00000000..d01d4e16 --- /dev/null +++ b/samples/rsbuild/app/package.json @@ -0,0 +1,59 @@ +{ + "name": "@rsbuild-sample/app", + "author": "Workleap", + "version": "0.0.0", + "description": "Application to try the Rsbuild configs.", + "private": true, + "license": "Apache-2.0", + "type": "module", + "scripts": { + "dev": "nodemon", + "dev-msw": "cross-env USE_MSW=true nodemon", + "dev-verbose": "cross-env VERBOSE=true nodemon", + "dev-msw-verbose": "cross-env USE_MSW=true VERBOSE=true nodemon", + "build": "rsbuild build --config rsbuild.build.ts", + "serve-build": "pnpm build && pnpm http-server dist -p 8080 -P http://localhost:8080? -c-1", + "eslint": "eslint . --max-warnings=-0 --cache --cache-location node_modules/.cache/eslint", + "typecheck": "tsc", + "test": "jest" + }, + "dependencies": { + "@rsbuild-sample/components": "workspace:*", + "react": "19.0.0", + "react-dom": "19.0.0", + "react-router": "7.0.2" + }, + "devDependencies": { + "@rsbuild/core": "1.1.9", + "@rspack/core": "1.1.6", + "@swc/core": "1.10.1", + "@swc/jest": "0.2.37", + "@testing-library/react": "16.1.0", + "@types/jest": "29.5.14", + "@types/node": "22.10.1", + "@types/react": "19.0.1", + "@types/react-dom": "19.0.2", + "@typescript-eslint/parser": "8.18.0", + "@workleap/browserslist-config": "workspace:*", + "@workleap/eslint-plugin": "workspace:*", + "@workleap/stylelint-configs": "workspace:*", + "@workleap/swc-configs": "workspace:*", + "@workleap/typescript-configs": "workspace:*", + "@workleap/rsbuild-configs": "workspace:*", + "browserslist": "4.24.2", + "cross-env": "7.0.3", + "eslint": "8.57.0", + "http-server": "14.1.1", + "identity-obj-proxy": "3.0.0", + "jest": "29.7.0", + "jest-environment-jsdom": "29.7.0", + "msw": "2.6.8", + "nodemon": "3.1.7", + "stylelint": "16.11.0", + "ts-node": "10.9.2", + "typescript": "5.5.4" + }, + "msw": { + "workerDirectory": "public" + } +} diff --git a/sample/app/public/favicon.png b/samples/rsbuild/app/public/favicon.png similarity index 100% rename from sample/app/public/favicon.png rename to samples/rsbuild/app/public/favicon.png diff --git a/sample/app/public/index.html b/samples/rsbuild/app/public/index.html similarity index 100% rename from sample/app/public/index.html rename to samples/rsbuild/app/public/index.html diff --git a/sample/app/public/mockServiceWorker.js b/samples/rsbuild/app/public/mockServiceWorker.js similarity index 100% rename from sample/app/public/mockServiceWorker.js rename to samples/rsbuild/app/public/mockServiceWorker.js diff --git a/samples/rsbuild/app/rsbuild.build.ts b/samples/rsbuild/app/rsbuild.build.ts new file mode 100644 index 00000000..92b2358b --- /dev/null +++ b/samples/rsbuild/app/rsbuild.build.ts @@ -0,0 +1,8 @@ +import { defineBuildConfig } from "@workleap/rsbuild-configs"; + +export default defineBuildConfig({ + verbose: process.env.VERBOSE === "true", + environmentVariables: { + "USE_MSW": process.env.USE_MSW === "true" + } +}); diff --git a/samples/rsbuild/app/rsbuild.dev.ts b/samples/rsbuild/app/rsbuild.dev.ts new file mode 100644 index 00000000..00c89178 --- /dev/null +++ b/samples/rsbuild/app/rsbuild.dev.ts @@ -0,0 +1,10 @@ +import { defineDevConfig } from "@workleap/rsbuild-configs"; + +export default defineDevConfig({ + verbose: process.env.VERBOSE === "true", + environmentVariables: { + "USE_MSW": process.env.USE_MSW === "true", + "STRING": "STRING_VALUE", + "INT": 1 + } +}); diff --git a/samples/rsbuild/app/src/About.tsx b/samples/rsbuild/app/src/About.tsx new file mode 100644 index 00000000..af2c1c64 --- /dev/null +++ b/samples/rsbuild/app/src/About.tsx @@ -0,0 +1,12 @@ +import { Button } from "@rsbuild-sample/components"; +// import { helloFrom } from "@rsbuild-sample/tsup-lib"; + +export function About() { + return ( + <> +

About

+ {/*
{helloFrom("the about page")}
*/} + + + ); +} diff --git a/sample/app/src/App.tsx b/samples/rsbuild/app/src/App.tsx similarity index 100% rename from sample/app/src/App.tsx rename to samples/rsbuild/app/src/App.tsx diff --git a/sample/app/src/Fetch.tsx b/samples/rsbuild/app/src/Fetch.tsx similarity index 100% rename from sample/app/src/Fetch.tsx rename to samples/rsbuild/app/src/Fetch.tsx diff --git a/sample/app/src/Home.css b/samples/rsbuild/app/src/Home.css similarity index 100% rename from sample/app/src/Home.css rename to samples/rsbuild/app/src/Home.css diff --git a/samples/rsbuild/app/src/Home.tsx b/samples/rsbuild/app/src/Home.tsx new file mode 100644 index 00000000..5d5558a9 --- /dev/null +++ b/samples/rsbuild/app/src/Home.tsx @@ -0,0 +1,15 @@ +// import { helloFrom } from "@rsbuild-sample/tsup-lib"; +import "./Home.css"; +import { ReactComponent as AddIcon } from "./assets/add.svg"; + +export function Home() { + return ( +
+

Home

+ {/*

{helloFrom("the homepage")}

*/} +

+ Here's an SVG icon loaded with @svgr/webpack: +

+
+ ); +} diff --git a/sample/app/src/RootLayout.css b/samples/rsbuild/app/src/RootLayout.css similarity index 100% rename from sample/app/src/RootLayout.css rename to samples/rsbuild/app/src/RootLayout.css diff --git a/sample/app/src/RootLayout.tsx b/samples/rsbuild/app/src/RootLayout.tsx similarity index 100% rename from sample/app/src/RootLayout.tsx rename to samples/rsbuild/app/src/RootLayout.tsx diff --git a/sample/app/src/assets/add.svg b/samples/rsbuild/app/src/assets/add.svg similarity index 100% rename from sample/app/src/assets/add.svg rename to samples/rsbuild/app/src/assets/add.svg diff --git a/sample/app/src/index.tsx b/samples/rsbuild/app/src/index.tsx similarity index 100% rename from sample/app/src/index.tsx rename to samples/rsbuild/app/src/index.tsx diff --git a/sample/app/src/mocks/browser.ts b/samples/rsbuild/app/src/mocks/browser.ts similarity index 100% rename from sample/app/src/mocks/browser.ts rename to samples/rsbuild/app/src/mocks/browser.ts diff --git a/sample/app/src/mocks/handlers.ts b/samples/rsbuild/app/src/mocks/handlers.ts similarity index 100% rename from sample/app/src/mocks/handlers.ts rename to samples/rsbuild/app/src/mocks/handlers.ts diff --git a/sample/app/src/types/svgr.d.ts b/samples/rsbuild/app/src/types/svgr.d.ts similarity index 100% rename from sample/app/src/types/svgr.d.ts rename to samples/rsbuild/app/src/types/svgr.d.ts diff --git a/sample/app/swc.jest.ts b/samples/rsbuild/app/swc.jest.ts similarity index 100% rename from sample/app/swc.jest.ts rename to samples/rsbuild/app/swc.jest.ts diff --git a/sample/app/tests/About.test.tsx b/samples/rsbuild/app/tests/About.test.tsx similarity index 100% rename from sample/app/tests/About.test.tsx rename to samples/rsbuild/app/tests/About.test.tsx diff --git a/samples/rsbuild/app/tsconfig.json b/samples/rsbuild/app/tsconfig.json new file mode 100644 index 00000000..b5db0fd9 --- /dev/null +++ b/samples/rsbuild/app/tsconfig.json @@ -0,0 +1,12 @@ +{ + "extends": "@workleap/typescript-configs/web-application.json", + "compilerOptions": { + "incremental": true, + "tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json" + // "paths": { + // "@rsbuild-sample/tsup-lib": ["../tsup-lib/src/index.ts"] + // } + }, + "include": ["."], + "exclude": ["public", "dist", "node_modules"] +} diff --git a/samples/rsbuild/app/types/images.d.ts b/samples/rsbuild/app/types/images.d.ts new file mode 100644 index 00000000..5d266c81 --- /dev/null +++ b/samples/rsbuild/app/types/images.d.ts @@ -0,0 +1,8 @@ +declare module "*.svg" { + import type * as React from "react"; + + export const ReactComponent: React.FunctionComponent & { title?: string }>; + + const src: string; + export default src; +} diff --git a/sample/components/.eslintignore b/samples/rsbuild/components/.eslintignore similarity index 100% rename from sample/components/.eslintignore rename to samples/rsbuild/components/.eslintignore diff --git a/sample/components/.eslintrc.json b/samples/rsbuild/components/.eslintrc.json similarity index 100% rename from sample/components/.eslintrc.json rename to samples/rsbuild/components/.eslintrc.json diff --git a/sample/components/.stylelintrc.json b/samples/rsbuild/components/.stylelintrc.json similarity index 100% rename from sample/components/.stylelintrc.json rename to samples/rsbuild/components/.stylelintrc.json diff --git a/sample/components/jest.config.ts b/samples/rsbuild/components/jest.config.ts similarity index 100% rename from sample/components/jest.config.ts rename to samples/rsbuild/components/jest.config.ts diff --git a/sample/components/package.json b/samples/rsbuild/components/package.json similarity index 96% rename from sample/components/package.json rename to samples/rsbuild/components/package.json index 84c7c65d..ea9c7e3c 100644 --- a/sample/components/package.json +++ b/samples/rsbuild/components/package.json @@ -1,5 +1,5 @@ { - "name": "@sample/components", + "name": "@rsbuild-sample/components", "author": "Workleap", "version": "0.0.0", "description": "React components library to try the web configs.", diff --git a/sample/components/src/Button.css b/samples/rsbuild/components/src/Button.css similarity index 100% rename from sample/components/src/Button.css rename to samples/rsbuild/components/src/Button.css diff --git a/sample/components/src/Button.tsx b/samples/rsbuild/components/src/Button.tsx similarity index 100% rename from sample/components/src/Button.tsx rename to samples/rsbuild/components/src/Button.tsx diff --git a/sample/components/src/index.ts b/samples/rsbuild/components/src/index.ts similarity index 100% rename from sample/components/src/index.ts rename to samples/rsbuild/components/src/index.ts diff --git a/sample/components/swc.jest.ts b/samples/rsbuild/components/swc.jest.ts similarity index 100% rename from sample/components/swc.jest.ts rename to samples/rsbuild/components/swc.jest.ts diff --git a/sample/components/tests/Button.test.tsx b/samples/rsbuild/components/tests/Button.test.tsx similarity index 100% rename from sample/components/tests/Button.test.tsx rename to samples/rsbuild/components/tests/Button.test.tsx diff --git a/sample/components/tsconfig.json b/samples/rsbuild/components/tsconfig.json similarity index 100% rename from sample/components/tsconfig.json rename to samples/rsbuild/components/tsconfig.json diff --git a/samples/webpack/app/.browserslistrc b/samples/webpack/app/.browserslistrc new file mode 100644 index 00000000..f8a8f866 --- /dev/null +++ b/samples/webpack/app/.browserslistrc @@ -0,0 +1 @@ +extends @workleap/browserslist-config diff --git a/sample/tsup-lib/.eslintignore b/samples/webpack/app/.eslintignore similarity index 100% rename from sample/tsup-lib/.eslintignore rename to samples/webpack/app/.eslintignore diff --git a/samples/webpack/app/.eslintrc.json b/samples/webpack/app/.eslintrc.json new file mode 100644 index 00000000..ab20e504 --- /dev/null +++ b/samples/webpack/app/.eslintrc.json @@ -0,0 +1,5 @@ +{ + "$schema": "https://json.schemastore.org/eslintrc", + "root": true, + "extends": "plugin:@workleap/web-application" +} diff --git a/samples/webpack/app/.stylelintrc.json b/samples/webpack/app/.stylelintrc.json new file mode 100644 index 00000000..8e2ab9c1 --- /dev/null +++ b/samples/webpack/app/.stylelintrc.json @@ -0,0 +1,4 @@ +{ + "$schema": "https://json.schemastore.org/stylelintrc", + "extends": "@workleap/stylelint-configs" +} diff --git a/samples/webpack/app/jest.config.ts b/samples/webpack/app/jest.config.ts new file mode 100644 index 00000000..262ac9fe --- /dev/null +++ b/samples/webpack/app/jest.config.ts @@ -0,0 +1,19 @@ +import type { Config } from "jest"; +import { swcConfig } from "./swc.jest.ts"; + +const config: Config = { + testRegex: "/tests/*/.*\\.test\\.(ts|tsx)$", + testPathIgnorePatterns: ["/node_modules/", "/dist/"], + testEnvironment: "jsdom", + transform: { + "^.+\\.(js|ts|tsx)$": ["@swc/jest", swcConfig as Record] + }, + moduleNameMapper: { + "\\.css$": "identity-obj-proxy" + }, + cacheDirectory: "./node_modules/.cache/jest", + clearMocks: true, + verbose: true +}; + +export default config; diff --git a/sample/app/nodemon.json b/samples/webpack/app/nodemon.json similarity index 100% rename from sample/app/nodemon.json rename to samples/webpack/app/nodemon.json diff --git a/sample/app/package.json b/samples/webpack/app/package.json similarity index 91% rename from sample/app/package.json rename to samples/webpack/app/package.json index e1ecb500..18428d00 100644 --- a/sample/app/package.json +++ b/samples/webpack/app/package.json @@ -1,8 +1,8 @@ { - "name": "@sample/app", + "name": "@webpack-sample/app", "author": "Workleap", "version": "0.0.0", - "description": "Application to try the web configs.", + "description": "Application to try the webpack configs.", "private": true, "license": "Apache-2.0", "type": "module", @@ -17,6 +17,13 @@ "typecheck": "tsc", "test": "jest" }, + "dependencies": { + "@webpack-sample/components": "workspace:*", + "@webpack-sample/tsup-lib": "workspace:*", + "react": "19.0.0", + "react-dom": "19.0.0", + "react-router": "7.0.2" + }, "devDependencies": { "@swc/core": "1.10.1", "@swc/helpers": "0.5.15", @@ -51,13 +58,6 @@ "webpack-cli": "5.1.4", "webpack-dev-server": "5.1.0" }, - "dependencies": { - "@sample/components": "workspace:*", - "@sample/tsup-lib": "workspace:*", - "react": "19.0.0", - "react-dom": "19.0.0", - "react-router": "7.0.2" - }, "msw": { "workerDirectory": "public" } diff --git a/sample/app/postcss.config.ts b/samples/webpack/app/postcss.config.ts similarity index 100% rename from sample/app/postcss.config.ts rename to samples/webpack/app/postcss.config.ts diff --git a/samples/webpack/app/public/favicon.png b/samples/webpack/app/public/favicon.png new file mode 100644 index 0000000000000000000000000000000000000000..47157f6b014741fca15dd80db4939ee1e1098175 GIT binary patch literal 31428 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 mxo^y^-Z6)u1aY{6#-0B28$;=-+&0)_K + + + + + +
+ + diff --git a/samples/webpack/app/public/mockServiceWorker.js b/samples/webpack/app/public/mockServiceWorker.js new file mode 100644 index 00000000..7898a629 --- /dev/null +++ b/samples/webpack/app/public/mockServiceWorker.js @@ -0,0 +1,292 @@ +/* eslint-disable */ +/* tslint:disable */ + +/** + * Mock Service Worker (2.0.3). + * @see https://github.com/mswjs/msw + * - Please do NOT modify this file. + * - Please do NOT serve this file on production. + */ + +const INTEGRITY_CHECKSUM = '0877fcdc026242810f5bfde0d7178db4' +const IS_MOCKED_RESPONSE = Symbol('isMockedResponse') +const activeClientIds = new Set() + +self.addEventListener('install', function () { + self.skipWaiting() +}) + +self.addEventListener('activate', function (event) { + event.waitUntil(self.clients.claim()) +}) + +self.addEventListener('message', async function (event) { + const clientId = event.source.id + + if (!clientId || !self.clients) { + return + } + + const client = await self.clients.get(clientId) + + if (!client) { + return + } + + const allClients = await self.clients.matchAll({ + type: 'window', + }) + + switch (event.data) { + case 'KEEPALIVE_REQUEST': { + sendToClient(client, { + type: 'KEEPALIVE_RESPONSE', + }) + break + } + + case 'INTEGRITY_CHECK_REQUEST': { + sendToClient(client, { + type: 'INTEGRITY_CHECK_RESPONSE', + payload: INTEGRITY_CHECKSUM, + }) + break + } + + case 'MOCK_ACTIVATE': { + activeClientIds.add(clientId) + + sendToClient(client, { + type: 'MOCKING_ENABLED', + payload: true, + }) + break + } + + case 'MOCK_DEACTIVATE': { + activeClientIds.delete(clientId) + break + } + + case 'CLIENT_CLOSED': { + activeClientIds.delete(clientId) + + const remainingClients = allClients.filter((client) => { + return client.id !== clientId + }) + + // Unregister itself when there are no more clients + if (remainingClients.length === 0) { + self.registration.unregister() + } + + break + } + } +}) + +self.addEventListener('fetch', function (event) { + const { request } = event + + // Bypass navigation requests. + if (request.mode === 'navigate') { + return + } + + // Opening the DevTools triggers the "only-if-cached" request + // that cannot be handled by the worker. Bypass such requests. + if (request.cache === 'only-if-cached' && request.mode !== 'same-origin') { + return + } + + // Bypass all requests when there are no active clients. + // Prevents the self-unregistered worked from handling requests + // after it's been deleted (still remains active until the next reload). + if (activeClientIds.size === 0) { + return + } + + // Generate unique request ID. + const requestId = crypto.randomUUID() + event.respondWith(handleRequest(event, requestId)) +}) + +async function handleRequest(event, requestId) { + const client = await resolveMainClient(event) + const response = await getResponse(event, client, requestId) + + // Send back the response clone for the "response:*" life-cycle events. + // Ensure MSW is active and ready to handle the message, otherwise + // this message will pend indefinitely. + if (client && activeClientIds.has(client.id)) { + ;(async function () { + const responseClone = response.clone() + // When performing original requests, response body will + // always be a ReadableStream, even for 204 responses. + // But when creating a new Response instance on the client, + // the body for a 204 response must be null. + const responseBody = response.status === 204 ? null : responseClone.body + + sendToClient( + client, + { + type: 'RESPONSE', + payload: { + requestId, + isMockedResponse: IS_MOCKED_RESPONSE in response, + type: responseClone.type, + status: responseClone.status, + statusText: responseClone.statusText, + body: responseBody, + headers: Object.fromEntries(responseClone.headers.entries()), + }, + }, + [responseBody], + ) + })() + } + + return response +} + +// Resolve the main client for the given event. +// Client that issues a request doesn't necessarily equal the client +// that registered the worker. It's with the latter the worker should +// communicate with during the response resolving phase. +async function resolveMainClient(event) { + const client = await self.clients.get(event.clientId) + + if (client?.frameType === 'top-level') { + return client + } + + const allClients = await self.clients.matchAll({ + type: 'window', + }) + + return allClients + .filter((client) => { + // Get only those clients that are currently visible. + return client.visibilityState === 'visible' + }) + .find((client) => { + // Find the client ID that's recorded in the + // set of clients that have registered the worker. + return activeClientIds.has(client.id) + }) +} + +async function getResponse(event, client, requestId) { + const { request } = event + + // Clone the request because it might've been already used + // (i.e. its body has been read and sent to the client). + const requestClone = request.clone() + + function passthrough() { + const headers = Object.fromEntries(requestClone.headers.entries()) + + // Remove internal MSW request header so the passthrough request + // complies with any potential CORS preflight checks on the server. + // Some servers forbid unknown request headers. + delete headers['x-msw-intention'] + + return fetch(requestClone, { headers }) + } + + // Bypass mocking when the client is not active. + if (!client) { + return passthrough() + } + + // Bypass initial page load requests (i.e. static assets). + // The absence of the immediate/parent client in the map of the active clients + // means that MSW hasn't dispatched the "MOCK_ACTIVATE" event yet + // and is not ready to handle requests. + if (!activeClientIds.has(client.id)) { + return passthrough() + } + + // Bypass requests with the explicit bypass header. + // Such requests can be issued by "ctx.fetch()". + const mswIntention = request.headers.get('x-msw-intention') + if (['bypass', 'passthrough'].includes(mswIntention)) { + return passthrough() + } + + // Notify the client that a request has been intercepted. + const requestBuffer = await request.arrayBuffer() + const clientMessage = await sendToClient( + client, + { + type: 'REQUEST', + payload: { + id: requestId, + url: request.url, + mode: request.mode, + method: request.method, + headers: Object.fromEntries(request.headers.entries()), + cache: request.cache, + credentials: request.credentials, + destination: request.destination, + integrity: request.integrity, + redirect: request.redirect, + referrer: request.referrer, + referrerPolicy: request.referrerPolicy, + body: requestBuffer, + keepalive: request.keepalive, + }, + }, + [requestBuffer], + ) + + switch (clientMessage.type) { + case 'MOCK_RESPONSE': { + return respondWithMock(clientMessage.data) + } + + case 'MOCK_NOT_FOUND': { + return passthrough() + } + } + + return passthrough() +} + +function sendToClient(client, message, transferrables = []) { + return new Promise((resolve, reject) => { + const channel = new MessageChannel() + + channel.port1.onmessage = (event) => { + if (event.data && event.data.error) { + return reject(event.data.error) + } + + resolve(event.data) + } + + client.postMessage( + message, + [channel.port2].concat(transferrables.filter(Boolean)), + ) + }) +} + +async function respondWithMock(response) { + // Setting response status code to 0 is a no-op. + // However, when responding with a "Response.error()", the produced Response + // instance will have status code set to 0. Since it's not possible to create + // a Response instance with status code 0, handle that use-case separately. + if (response.status === 0) { + return Response.error() + } + + const mockedResponse = new Response(response.body, response) + + Reflect.defineProperty(mockedResponse, IS_MOCKED_RESPONSE, { + value: true, + enumerable: true, + }) + + return mockedResponse +} diff --git a/sample/app/src/About.tsx b/samples/webpack/app/src/About.tsx similarity index 69% rename from sample/app/src/About.tsx rename to samples/webpack/app/src/About.tsx index 2e8a90d7..fd873051 100644 --- a/sample/app/src/About.tsx +++ b/samples/webpack/app/src/About.tsx @@ -1,5 +1,5 @@ -import { Button } from "@sample/components"; -import { helloFrom } from "@sample/tsup-lib"; +import { Button } from "@webpack-sample/components"; +import { helloFrom } from "@webpack-sample/tsup-lib"; export function About() { return ( diff --git a/samples/webpack/app/src/App.tsx b/samples/webpack/app/src/App.tsx new file mode 100644 index 00000000..d1051464 --- /dev/null +++ b/samples/webpack/app/src/App.tsx @@ -0,0 +1,43 @@ +import { createBrowserRouter } from "react-router"; +import { RouterProvider } from "react-router/dom"; +import { About } from "./About.tsx"; +import { Fetch } from "./Fetch.tsx"; +import { Home } from "./Home.tsx"; +import { RootLayout } from "./RootLayout.tsx"; + +const router = createBrowserRouter([ + { + element: , + children: [ + { + index: true, + element: + }, + { + path: "/about", + element: + }, + { + path: "/fetch", + element: + } + ] + } +], { + future: { + v7_relativeSplatPath: false, + v7_startTransition: false, + v7_fetcherPersist: false, + v7_normalizeFormMethod: false, + v7_partialHydration: false, + v7_skipActionErrorRevalidation: false + } +}); + +export function App() { + return ( + + ); +} diff --git a/samples/webpack/app/src/Fetch.tsx b/samples/webpack/app/src/Fetch.tsx new file mode 100644 index 00000000..df27d675 --- /dev/null +++ b/samples/webpack/app/src/Fetch.tsx @@ -0,0 +1,31 @@ +import { useEffect, useState } from "react"; + +export function Fetch() { + const [pokemons, setPokemons] = useState([]); + + useEffect(() => { + fetch("/api/pokemons") + .then(res => { + if (res.ok) { + return res.json(); + } + + throw res; + }) + .then(data => { + setPokemons(data); + }) + .catch(() => { + console.error("An error occured while fetching pokemons."); + }); + }, []); + + return ( + <> +

Fetch

+
    + {pokemons.map(x =>
  • {x}
  • )} +
+ + ); +} diff --git a/samples/webpack/app/src/Home.css b/samples/webpack/app/src/Home.css new file mode 100644 index 00000000..1b38f5c8 --- /dev/null +++ b/samples/webpack/app/src/Home.css @@ -0,0 +1,3 @@ +.title { + color: blue; +} diff --git a/sample/app/src/Home.tsx b/samples/webpack/app/src/Home.tsx similarity index 86% rename from sample/app/src/Home.tsx rename to samples/webpack/app/src/Home.tsx index edd979a2..9419dd47 100644 --- a/sample/app/src/Home.tsx +++ b/samples/webpack/app/src/Home.tsx @@ -1,4 +1,4 @@ -import { helloFrom } from "@sample/tsup-lib"; +import { helloFrom } from "@webpack-sample/tsup-lib"; import "./Home.css"; import AddIcon from "./assets/add.svg"; diff --git a/samples/webpack/app/src/RootLayout.css b/samples/webpack/app/src/RootLayout.css new file mode 100644 index 00000000..f6fe8f72 --- /dev/null +++ b/samples/webpack/app/src/RootLayout.css @@ -0,0 +1,10 @@ +.nav { + display: flex; + gap: 1rem; + margin: 0; + padding: 0; +} + +.nav-item { + list-style-type: none; +} diff --git a/samples/webpack/app/src/RootLayout.tsx b/samples/webpack/app/src/RootLayout.tsx new file mode 100644 index 00000000..dbf2bf78 --- /dev/null +++ b/samples/webpack/app/src/RootLayout.tsx @@ -0,0 +1,17 @@ +import { Link, Outlet } from "react-router"; +import "./RootLayout.css"; + +export function RootLayout() { + return ( + <> + + + + ); +} diff --git a/samples/webpack/app/src/assets/add.svg b/samples/webpack/app/src/assets/add.svg new file mode 100644 index 00000000..d6111558 --- /dev/null +++ b/samples/webpack/app/src/assets/add.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/samples/webpack/app/src/index.tsx b/samples/webpack/app/src/index.tsx new file mode 100644 index 00000000..5d3b525e --- /dev/null +++ b/samples/webpack/app/src/index.tsx @@ -0,0 +1,17 @@ +import { StrictMode } from "react"; +import { createRoot } from "react-dom/client"; +import { App } from "./App.tsx"; + +if (process.env.USE_MSW) { + import("./mocks/browser.ts").then(({ worker }) => { + worker.start(); + }); +} + +const root = createRoot(document.getElementById("root")!); + +root.render( + + + +); diff --git a/samples/webpack/app/src/mocks/browser.ts b/samples/webpack/app/src/mocks/browser.ts new file mode 100644 index 00000000..ebf793a0 --- /dev/null +++ b/samples/webpack/app/src/mocks/browser.ts @@ -0,0 +1,5 @@ +import { setupWorker, type SetupWorker } from "msw/browser"; +import { handlers } from "./handlers.ts"; + +// This configures a Service Worker with the given request handlers. +export const worker: SetupWorker = setupWorker(...handlers); diff --git a/samples/webpack/app/src/mocks/handlers.ts b/samples/webpack/app/src/mocks/handlers.ts new file mode 100644 index 00000000..68f84ef1 --- /dev/null +++ b/samples/webpack/app/src/mocks/handlers.ts @@ -0,0 +1,28 @@ +import { HttpResponse, http, type HttpHandler } from "msw"; + +export const handlers: HttpHandler[] = [ + http.get("/api/pokemons", () => { + return HttpResponse.json([ + "Bulbasaur", + "Ivysaur", + "Venusaur", + "Charmander", + "Charmeleon", + "Charizard", + "Squirtle", + "Wartortle", + "Blastoise", + "Caterpie", + "Metapod", + "Butterfree", + "Weedle", + "Kakuna", + "Beedrill", + "Pidgey", + "Pidgeotto", + "Pidgeot", + "Rattata", + "Raticate" + ]); + }) +]; diff --git a/samples/webpack/app/src/types/svgr.d.ts b/samples/webpack/app/src/types/svgr.d.ts new file mode 100644 index 00000000..7a46c1b3 --- /dev/null +++ b/samples/webpack/app/src/types/svgr.d.ts @@ -0,0 +1,4 @@ +declare module "*.svg" { + const content: React.FunctionComponent>; + export default content; +} diff --git a/sample/app/swc.build.js b/samples/webpack/app/swc.build.js similarity index 100% rename from sample/app/swc.build.js rename to samples/webpack/app/swc.build.js diff --git a/sample/app/swc.dev.js b/samples/webpack/app/swc.dev.js similarity index 100% rename from sample/app/swc.dev.js rename to samples/webpack/app/swc.dev.js diff --git a/samples/webpack/app/swc.jest.ts b/samples/webpack/app/swc.jest.ts new file mode 100644 index 00000000..dc009c5e --- /dev/null +++ b/samples/webpack/app/swc.jest.ts @@ -0,0 +1,5 @@ +import { defineJestConfig } from "@workleap/swc-configs"; + +export const swcConfig = defineJestConfig({ + react: true +}); diff --git a/samples/webpack/app/tests/About.test.tsx b/samples/webpack/app/tests/About.test.tsx new file mode 100644 index 00000000..29ea0f84 --- /dev/null +++ b/samples/webpack/app/tests/About.test.tsx @@ -0,0 +1,8 @@ +import { render, screen } from "@testing-library/react"; +import { About } from "../src/About.tsx"; + +test("About page has a h1 element", async () => { + render(); + + expect(await screen.findByRole("heading")).toBeDefined(); +}); diff --git a/sample/app/tsconfig.json b/samples/webpack/app/tsconfig.json similarity index 80% rename from sample/app/tsconfig.json rename to samples/webpack/app/tsconfig.json index b580c239..da5b2940 100644 --- a/sample/app/tsconfig.json +++ b/samples/webpack/app/tsconfig.json @@ -4,7 +4,7 @@ "incremental": true, "tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json", "paths": { - "@sample/tsup-lib": ["../tsup-lib/src/index.ts"] + "@webpack-sample/tsup-lib": ["../tsup-lib/src/index.ts"] } }, "exclude": ["public", "dist", "node_modules"] diff --git a/sample/app/webpack.build.js b/samples/webpack/app/webpack.build.js similarity index 100% rename from sample/app/webpack.build.js rename to samples/webpack/app/webpack.build.js diff --git a/sample/app/webpack.dev.js b/samples/webpack/app/webpack.dev.js similarity index 100% rename from sample/app/webpack.dev.js rename to samples/webpack/app/webpack.dev.js diff --git a/samples/webpack/components/.eslintignore b/samples/webpack/components/.eslintignore new file mode 100644 index 00000000..de4d1f00 --- /dev/null +++ b/samples/webpack/components/.eslintignore @@ -0,0 +1,2 @@ +dist +node_modules diff --git a/samples/webpack/components/.eslintrc.json b/samples/webpack/components/.eslintrc.json new file mode 100644 index 00000000..bf056420 --- /dev/null +++ b/samples/webpack/components/.eslintrc.json @@ -0,0 +1,5 @@ +{ + "$schema": "https://json.schemastore.org/eslintrc", + "root": true, + "extends": "plugin:@workleap/react-library" +} diff --git a/samples/webpack/components/.stylelintrc.json b/samples/webpack/components/.stylelintrc.json new file mode 100644 index 00000000..8e2ab9c1 --- /dev/null +++ b/samples/webpack/components/.stylelintrc.json @@ -0,0 +1,4 @@ +{ + "$schema": "https://json.schemastore.org/stylelintrc", + "extends": "@workleap/stylelint-configs" +} diff --git a/samples/webpack/components/jest.config.ts b/samples/webpack/components/jest.config.ts new file mode 100644 index 00000000..1e0a3fed --- /dev/null +++ b/samples/webpack/components/jest.config.ts @@ -0,0 +1,19 @@ +import type { Config } from "jest"; +import { swcConfig } from "./swc.jest.ts"; + +const config: Config = { + testRegex: "/tests/*/.*\\.test\\.(ts|tsx)$", + testPathIgnorePatterns: ["/node_modules/", "/dist/"], + testEnvironment: "jsdom", + transform: { + "^.+\\.(ts|tsx)$": ["@swc/jest", swcConfig as Record] + }, + moduleNameMapper: { + "\\.css$": "identity-obj-proxy" + }, + cacheDirectory: "./node_modules/.cache/jest", + clearMocks: true, + verbose: true +}; + +export default config; diff --git a/samples/webpack/components/package.json b/samples/webpack/components/package.json new file mode 100644 index 00000000..1f9b471c --- /dev/null +++ b/samples/webpack/components/package.json @@ -0,0 +1,43 @@ +{ + "name": "@webpack-sample/components", + "author": "Workleap", + "version": "0.0.0", + "description": "React components library to try the web configs.", + "private": true, + "license": "Apache-2.0", + "type": "module", + "exports": "./src/index.ts", + "files": [ + "/dist" + ], + "scripts": { + "eslint": "eslint . --max-warnings=-0 --cache --cache-location node_modules/.cache/eslint", + "typecheck": "tsc", + "test": "jest" + }, + "peerDependencies": { + "react": "*", + "react-dom": "*" + }, + "devDependencies": { + "@swc/core": "1.10.1", + "@swc/jest": "0.2.37", + "@testing-library/react": "16.1.0", + "@types/jest": "29.5.14", + "@types/react": "19.0.1", + "@types/react-dom": "19.0.2", + "@typescript-eslint/parser": "8.18.0", + "@workleap/eslint-plugin": "workspace:*", + "@workleap/stylelint-configs": "workspace:*", + "@workleap/swc-configs": "workspace:*", + "@workleap/typescript-configs": "workspace:*", + "eslint": "8.57.0", + "identity-obj-proxy": "3.0.0", + "jest": "29.7.0", + "jest-environment-jsdom": "29.7.0", + "react": "19.0.0", + "react-dom": "19.0.0", + "ts-node": "10.9.2", + "typescript": "5.5.4" + } +} diff --git a/samples/webpack/components/src/Button.css b/samples/webpack/components/src/Button.css new file mode 100644 index 00000000..30068539 --- /dev/null +++ b/samples/webpack/components/src/Button.css @@ -0,0 +1,4 @@ +.sample-button { + background-color: blue; + color: white; +} diff --git a/samples/webpack/components/src/Button.tsx b/samples/webpack/components/src/Button.tsx new file mode 100644 index 00000000..97bf0d3e --- /dev/null +++ b/samples/webpack/components/src/Button.tsx @@ -0,0 +1,12 @@ +import type { HTMLProps, ReactNode } from "react"; +import "./Button.css"; + +export interface ButtonProps extends Omit, "type" | "className"> { + children: ReactNode; +} + +export function Button({ children, ...props }: ButtonProps) { + return ( + + ); +} diff --git a/samples/webpack/components/src/index.ts b/samples/webpack/components/src/index.ts new file mode 100644 index 00000000..dde4b414 --- /dev/null +++ b/samples/webpack/components/src/index.ts @@ -0,0 +1 @@ +export * from "./Button.tsx"; diff --git a/samples/webpack/components/swc.jest.ts b/samples/webpack/components/swc.jest.ts new file mode 100644 index 00000000..dc009c5e --- /dev/null +++ b/samples/webpack/components/swc.jest.ts @@ -0,0 +1,5 @@ +import { defineJestConfig } from "@workleap/swc-configs"; + +export const swcConfig = defineJestConfig({ + react: true +}); diff --git a/samples/webpack/components/tests/Button.test.tsx b/samples/webpack/components/tests/Button.test.tsx new file mode 100644 index 00000000..d995c76f --- /dev/null +++ b/samples/webpack/components/tests/Button.test.tsx @@ -0,0 +1,8 @@ +import { render, screen } from "@testing-library/react"; +import { Button } from "../src/Button.tsx"; + +test("About page has a h1 element", async () => { + render(); + + expect(await screen.findByRole("button")).toBeDefined(); +}); diff --git a/sample/tsup-lib/tsconfig.json b/samples/webpack/components/tsconfig.json similarity index 100% rename from sample/tsup-lib/tsconfig.json rename to samples/webpack/components/tsconfig.json diff --git a/samples/webpack/tsup-lib/.eslintignore b/samples/webpack/tsup-lib/.eslintignore new file mode 100644 index 00000000..de4d1f00 --- /dev/null +++ b/samples/webpack/tsup-lib/.eslintignore @@ -0,0 +1,2 @@ +dist +node_modules diff --git a/sample/tsup-lib/.eslintrc.json b/samples/webpack/tsup-lib/.eslintrc.json similarity index 100% rename from sample/tsup-lib/.eslintrc.json rename to samples/webpack/tsup-lib/.eslintrc.json diff --git a/sample/tsup-lib/package.json b/samples/webpack/tsup-lib/package.json similarity index 96% rename from sample/tsup-lib/package.json rename to samples/webpack/tsup-lib/package.json index 1ef42a7a..2b442833 100644 --- a/sample/tsup-lib/package.json +++ b/samples/webpack/tsup-lib/package.json @@ -1,5 +1,5 @@ { - "name": "@sample/tsup-lib", + "name": "@webpack-sample/tsup-lib", "author": "Workleap", "version": "0.0.0", "description": "Typescript library to try the web configs.", diff --git a/sample/tsup-lib/src/helloFrom.ts b/samples/webpack/tsup-lib/src/helloFrom.ts similarity index 100% rename from sample/tsup-lib/src/helloFrom.ts rename to samples/webpack/tsup-lib/src/helloFrom.ts diff --git a/samples/webpack/tsup-lib/src/index.ts b/samples/webpack/tsup-lib/src/index.ts new file mode 100644 index 00000000..52b59088 --- /dev/null +++ b/samples/webpack/tsup-lib/src/index.ts @@ -0,0 +1 @@ +export * from "./helloFrom.ts"; diff --git a/samples/webpack/tsup-lib/tsconfig.json b/samples/webpack/tsup-lib/tsconfig.json new file mode 100644 index 00000000..596c3d1a --- /dev/null +++ b/samples/webpack/tsup-lib/tsconfig.json @@ -0,0 +1,8 @@ +{ + "extends": "@workleap/typescript-configs/library.json", + "compilerOptions": { + "incremental": true, + "tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json", + }, + "exclude": ["dist", "node_modules"] +} diff --git a/sample/tsup-lib/tsup.build.ts b/samples/webpack/tsup-lib/tsup.build.ts similarity index 100% rename from sample/tsup-lib/tsup.build.ts rename to samples/webpack/tsup-lib/tsup.build.ts diff --git a/sample/tsup-lib/tsup.dev.ts b/samples/webpack/tsup-lib/tsup.dev.ts similarity index 100% rename from sample/tsup-lib/tsup.dev.ts rename to samples/webpack/tsup-lib/tsup.dev.ts diff --git a/tsconfig.json b/tsconfig.json index b3eea55d..0d049a1a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -4,5 +4,5 @@ "incremental": true, "tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json", }, - "exclude": ["packages", "sample", "node_modules"] + "exclude": ["packages", "samples", "node_modules"] } From 9f3e01346a8ef8e9f091dc71fbfe95316af7cbdc Mon Sep 17 00:00:00 2001 From: patricklafrance Date: Wed, 11 Dec 2024 14:25:34 -0500 Subject: [PATCH 04/18] More stuff --- packages/rsbuild-configs/src/index.ts | 1 + packages/rsbuild-configs/src/storybook.ts | 87 ++++++++++++++++++++++- 2 files changed, 87 insertions(+), 1 deletion(-) diff --git a/packages/rsbuild-configs/src/index.ts b/packages/rsbuild-configs/src/index.ts index d50b2ca9..de0cc2b5 100644 --- a/packages/rsbuild-configs/src/index.ts +++ b/packages/rsbuild-configs/src/index.ts @@ -1,3 +1,4 @@ export * from "./build.ts"; export * from "./dev.ts"; +export * from "./storybook.ts"; diff --git a/packages/rsbuild-configs/src/storybook.ts b/packages/rsbuild-configs/src/storybook.ts index 954ddd23..dbf29ae8 100644 --- a/packages/rsbuild-configs/src/storybook.ts +++ b/packages/rsbuild-configs/src/storybook.ts @@ -1 +1,86 @@ -// TBD +import { defineConfig, type RsbuildConfig, type RsbuildPlugins, type SourceMap } from "@rsbuild/core"; +import { pluginReact, type PluginReactOptions } from "@rsbuild/plugin-react"; +import { pluginSvgr, type PluginSvgrOptions } from "@rsbuild/plugin-svgr"; +import { applyTransformers, type RsbuildConfigTransformer } from "./applyTransformers.ts"; + +export type DefineStorybookDefineReactPluginConfigFunction = (defaultOptions: PluginReactOptions) => PluginReactOptions; +export type DefineStorybookSvgrPluginConfigFunction = (defaultOptions: PluginSvgrOptions) => PluginSvgrOptions; + +export interface DefineStorybookConfigOptions { + plugins?: RsbuildPlugins; + sourceMap?: boolean | SourceMap; + react?: false | DefineStorybookDefineReactPluginConfigFunction; + svgr? : false | DefineStorybookSvgrPluginConfigFunction; + environmentVariables?: Record; + transformers?: RsbuildConfigTransformer[]; + verbose?: boolean; +} + +function defaultDefineReactPluginConfig(options: PluginReactOptions) { + return options; +} + +function defineSvgrPluginConfig(options: PluginSvgrOptions) { + return options; +} + +export function defineStorybook(options: DefineStorybookConfigOptions = {}) { + const { + plugins = [], + sourceMap = { + js: "cheap-module-source-map", + css: true + }, + react = defaultDefineReactPluginConfig, + svgr = defineSvgrPluginConfig, + // Using an empty object literal as the default value to ensure + // "process.env" is always available. + environmentVariables = {}, + transformers = [], + verbose = false + } = options; + + const config: RsbuildConfig = { + source: { + // Stringify the environment variables because the plugin does a direct text replacement. Otherwise, "production" would become production + // after replacement and cause an undefined var error because the production var doesn't exist. + // For more information, view: https://rsbuild.dev/guide/advanced/env-vars#using-define. + define: { + "process.env": Object.keys(environmentVariables).reduce((acc, key) => { + acc[key] = JSON.stringify(environmentVariables[key]); + + return acc; + }, {} as Record) + } + }, + output: { + target: "web", + sourceMap + }, + plugins: [ + react && pluginReact(react({})), + svgr && pluginSvgr(svgr({ + svgrOptions: { + exportType: "named" + } + })), + ...plugins + ].filter(Boolean), + tools: { + rspack: { + infrastructureLogging: verbose ? { + appendOnly: true, + level: "verbose", + debug: /PackFileCache/ + } : undefined + } + } + }; + + const transformedConfig = applyTransformers(config, transformers, { + environment: "dev", + verbose + }); + + return defineConfig(transformedConfig); +} From 0bf96afdefe39dc72994c8f0f263acd85460204a Mon Sep 17 00:00:00 2001 From: patricklafrance Date: Wed, 11 Dec 2024 14:50:39 -0500 Subject: [PATCH 05/18] More stuff --- .changeset/config.json | 2 +- .gitignore | 1 + package.json | 3 + packages/rsbuild-configs/src/storybook.ts | 2 +- pnpm-lock.yaml | 1468 ++++++++++++++++- samples/rsbuild/app/package.json | 2 +- samples/rsbuild/components/package.json | 1 + .../rsbuild/components/src/Button.stories.tsx | 16 + samples/storybook/.browserslistrc | 1 + samples/storybook/.eslintignore | 3 + samples/storybook/.eslintrc.json | 5 + samples/storybook/.storybook/main.ts | 22 + samples/storybook/.storybook/preview.tsx | 5 + samples/storybook/package.json | 38 + samples/storybook/rsbuild.config.ts | 3 + samples/storybook/tsconfig.json | 22 + turbo.json | 2 +- 17 files changed, 1583 insertions(+), 13 deletions(-) create mode 100644 samples/rsbuild/components/src/Button.stories.tsx create mode 100644 samples/storybook/.browserslistrc create mode 100644 samples/storybook/.eslintignore create mode 100644 samples/storybook/.eslintrc.json create mode 100644 samples/storybook/.storybook/main.ts create mode 100644 samples/storybook/.storybook/preview.tsx create mode 100644 samples/storybook/package.json create mode 100644 samples/storybook/rsbuild.config.ts create mode 100644 samples/storybook/tsconfig.json diff --git a/.changeset/config.json b/.changeset/config.json index aadc412d..f6184d33 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -10,7 +10,7 @@ "access": "restricted", "baseBranch": "main", "updateInternalDependencies": "patch", - "ignore": ["@webpack-sample/*"], + "ignore": ["@webpack-sample/*", "@rsbuild-sample/*", "@storybook-sample/*"], "___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": { "onlyUpdatePeerDependentsWhenOutOfRange": true } diff --git a/.gitignore b/.gitignore index 3b7fb980..542e4676 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ node_modules dist +storybook-static .pnpm-debug.log* .netlify .turbo diff --git a/package.json b/package.json index 305fa4e2..486e4dfb 100644 --- a/package.json +++ b/package.json @@ -14,12 +14,15 @@ "dev-webpack-msw": "turbo run dev-msw --filter=./samples/webpack/*", "dev-rsbuild": "turbo run dev --filter=./samples/rsbuild/*", "dev-rsbuild-msw": "turbo run dev-msw --filter=./samples/rsbuild/*", + "dev-storybook": "turbo run dev --filter=./samples/storybook", "dev-docs": "retype start", "build-pkg": "turbo run build --filter=./packages/*", "build-webpack": "turbo run build --filter=./samples/webpack/*", "build-rsbuild": "turbo run build --filter=./samples/rsbuild/*", + "build-storybook": "turbo run build --filter=./samples/storybook", "serve-webpack": "turbo run serve-build --filter=./samples/webpack/*", "serve-rsbuild": "turbo run serve-build --filter=./samples/rsbuild/*", + "serve-storybook": "turbo run serve-build --filter=./samples/storybook", "prelint": "turbo run build --filter=./packages/*", "lint": "turbo run lint --continue", "eslint": "eslint . --ignore-pattern packages --ignore-pattern samples --max-warnings=-0 --cache --cache-location node_modules/.cache/eslint", diff --git a/packages/rsbuild-configs/src/storybook.ts b/packages/rsbuild-configs/src/storybook.ts index dbf29ae8..b6936f89 100644 --- a/packages/rsbuild-configs/src/storybook.ts +++ b/packages/rsbuild-configs/src/storybook.ts @@ -24,7 +24,7 @@ function defineSvgrPluginConfig(options: PluginSvgrOptions) { return options; } -export function defineStorybook(options: DefineStorybookConfigOptions = {}) { +export function defineStorybookConfig(options: DefineStorybookConfigOptions = {}) { const { plugins = [], sourceMap = { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index cf2d224d..c8093188 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -67,7 +67,7 @@ importers: version: 8.57.0 tsup: specifier: 8.3.5 - version: 8.3.5(@swc/core@1.10.1)(jiti@2.4.1)(postcss@8.4.49)(typescript@5.7.2)(yaml@2.6.1) + version: 8.3.5(@swc/core@1.10.1(@swc/helpers@0.5.15))(jiti@2.4.1)(postcss@8.4.49)(typescript@5.7.2)(yaml@2.6.1) packages/eslint-plugin: dependencies: @@ -155,7 +155,7 @@ importers: version: 10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.1)(typescript@5.7.2) tsup: specifier: 8.3.5 - version: 8.3.5(@swc/core@1.10.1)(jiti@2.4.1)(postcss@8.4.49)(typescript@5.7.2)(yaml@2.6.1) + version: 8.3.5(@swc/core@1.10.1(@swc/helpers@0.5.15))(jiti@2.4.1)(postcss@8.4.49)(typescript@5.7.2)(yaml@2.6.1) packages/postcss-configs: dependencies: @@ -597,6 +597,9 @@ importers: samples/rsbuild/components: devDependencies: + '@storybook/react': + specifier: 8.4.7 + version: 8.4.7(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(storybook@8.4.5(prettier@3.4.2))(typescript@5.5.4) '@swc/core': specifier: 1.10.1 version: 1.10.1(@swc/helpers@0.5.15) @@ -655,6 +658,73 @@ importers: specifier: 5.5.4 version: 5.5.4 + samples/storybook: + dependencies: + react: + specifier: 18.3.1 + version: 18.3.1 + react-dom: + specifier: 18.3.1 + version: 18.3.1(react@18.3.1) + devDependencies: + '@rsbuild/core': + specifier: 1.1.9 + version: 1.1.9 + '@rspack/core': + specifier: 1.1.6 + version: 1.1.6(@swc/helpers@0.5.15) + '@storybook/addon-a11y': + specifier: 8.4.5 + version: 8.4.5(storybook@8.4.5(prettier@3.4.2)) + '@storybook/addon-essentials': + specifier: 8.4.5 + version: 8.4.5(@types/react@18.3.12)(storybook@8.4.5(prettier@3.4.2)) + '@storybook/addon-interactions': + specifier: 8.4.5 + version: 8.4.5(storybook@8.4.5(prettier@3.4.2)) + '@storybook/addon-links': + specifier: 8.4.5 + version: 8.4.5(react@18.3.1)(storybook@8.4.5(prettier@3.4.2)) + '@storybook/react': + specifier: 8.4.5 + version: 8.4.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(storybook@8.4.5(prettier@3.4.2))(typescript@5.5.4) + '@types/react': + specifier: 18.3.12 + version: 18.3.12 + '@types/react-dom': + specifier: 18.3.1 + version: 18.3.1 + '@workleap/browserslist-config': + specifier: workspace:* + version: link:../../packages/browserslist-config + '@workleap/eslint-plugin': + specifier: workspace:* + version: link:../../packages/eslint-plugin + '@workleap/rsbuild-configs': + specifier: workspace:* + version: link:../../packages/rsbuild-configs + '@workleap/typescript-configs': + specifier: workspace:* + version: link:../../packages/typescript-configs + browserslist: + specifier: 4.24.2 + version: 4.24.2 + eslint: + specifier: 8.57.0 + version: 8.57.0 + http-server: + specifier: 14.1.1 + version: 14.1.1 + storybook: + specifier: 8.4.5 + version: 8.4.5(prettier@3.4.2) + storybook-react-rsbuild: + specifier: 0.1.5 + version: 0.1.5(@rsbuild/core@1.1.9)(@rspack/core@1.1.6(@swc/helpers@0.5.15))(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(rollup@4.28.1)(storybook@8.4.5(prettier@3.4.2))(typescript@5.5.4)(webpack@5.97.1(esbuild@0.24.0)) + typescript: + specifier: 5.5.4 + version: 5.5.4 + samples/webpack/app: dependencies: '@webpack-sample/components': @@ -860,6 +930,9 @@ packages: resolution: {integrity: sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==} engines: {node: '>=0.10.0'} + '@adobe/css-tools@4.4.1': + resolution: {integrity: sha512-12WGKBQzjUAI4ayyF4IAtfw2QR/IDoqk6jTddXDhtYTJF9ASmoE1zst7cVtP0aL/F1jUJL5r+JxKXKEgHNbEUQ==} + '@altano/repository-tools@0.1.1': resolution: {integrity: sha512-5vbUs2A98CC3g1AlOBdkBE0BMukkLjLIsMHAtuxg6Pt9dQXxYWdLKOf66v6c/vIqtNcgTMv0oGtddLdMuH9X6w==} @@ -2158,6 +2231,12 @@ packages: '@manypkg/get-packages@1.1.3': resolution: {integrity: sha512-fo+QhuU3qE/2TQMQmbVMqaQ6EWbMhi4ABWP+O4AM1NqPBuy0OrApV5LO6BrrgnhtAHS2NH6RrVk9OL181tTi8A==} + '@mdx-js/react@3.1.0': + resolution: {integrity: sha512-QjHtSaoameoalGnKDT3FoIl4+9RwyTmo9ZJGBdLOks/YOiWHoRDI3PUwEzOE7kEmGcV3AFcp9K6dYu9rEuKLAQ==} + peerDependencies: + '@types/react': '>=16' + react: '>=16' + '@module-federation/runtime-tools@0.5.1': resolution: {integrity: sha512-nfBedkoZ3/SWyO0hnmaxuz0R0iGPSikHZOAZ0N/dVSQaIzlffUo35B5nlC2wgWIc0JdMZfkwkjZRrnuuDIJbzg==} @@ -2309,6 +2388,18 @@ packages: webpack-plugin-serve: optional: true + '@polka/url@1.0.0-next.28': + resolution: {integrity: sha512-8LduaNlMZGwdZ6qWrKlfa+2M4gahzFkprZiAt2TF8uS0qQgBizKXpXURqvTJ4WtmupWxaLqjRb2UCTe72mu+Aw==} + + '@rollup/pluginutils@5.1.3': + resolution: {integrity: sha512-Pnsb6f32CD2W3uCaLZIzDmeFyQ2b8UWMFI7xtwUezpcGBDVDW6y9XgAWIlARiGAo6eNF5FK5aQTr0LFyNyqq5A==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + '@rollup/rollup-android-arm-eabi@4.28.1': resolution: {integrity: sha512-2aZp8AES04KI2dy3Ss6/MDjXbwBzj+i0GqKtWXgw2/Ma6E4jJvujryO6gJAghIRVz7Vwr9Gtl/8na3nDUKpraQ==} cpu: [arm] @@ -2427,6 +2518,14 @@ packages: peerDependencies: '@rsbuild/core': 1.x + '@rsbuild/plugin-type-check@1.1.0': + resolution: {integrity: sha512-9W/TxibRe7L6i4JnsIDRJfkvypPZQqCLO/jrAp+Liv4SCo9BVmbk/Rmpj+hfo2gjyewobk0AVi4/YQ5wOP7GSQ==} + peerDependencies: + '@rsbuild/core': 1.x + peerDependenciesMeta: + '@rsbuild/core': + optional: true + '@rspack/binding-darwin-arm64@1.1.6': resolution: {integrity: sha512-x9dxm2yyiMuL1FBwvWNNMs2/mEUJmRoSRgYb8pblR7HDaTRORrjBFCqhaYlGyAqtQaeUy7o2VAQlE0BavIiFYA==} cpu: [arm64] @@ -2517,9 +2616,240 @@ packages: engines: {node: '>=8.10'} hasBin: true + '@storybook/addon-a11y@8.4.5': + resolution: {integrity: sha512-lqIOpWJZNR0Ur+2zUcnFAMvdOe7kYEDeXPv1TM7fwEGyzKPYoM/k5xPA2cJCrYwtydxOqqrmn1jUIw0Qdkhuhg==} + peerDependencies: + storybook: ^8.4.5 + + '@storybook/addon-actions@8.4.5': + resolution: {integrity: sha512-rbB19uiGJ61XHbKIbS1a9bUS6re5L8rT5NMNeEJhCxXRpFUPrlTXMSoD/Pgcn3ENeEMVZsm8/eCzxAVgAP3Mgg==} + peerDependencies: + storybook: ^8.4.5 + + '@storybook/addon-backgrounds@8.4.5': + resolution: {integrity: sha512-FeMt4qHCMYDQiLGGDKiRuSPXFup2WXOaZSdL137v1W36wEL/vGkK1A5iQt1qJ8MZzL5WZQuedox8rSybFy7eow==} + peerDependencies: + storybook: ^8.4.5 + + '@storybook/addon-controls@8.4.5': + resolution: {integrity: sha512-RVTtDDuESLYc1+SJQv2kI7wzBddzAS9uoEe8P75quN6S4pC0GxAB6xirWZ2+WOcba4eHosY+PxMwuBXQfH78Ew==} + peerDependencies: + storybook: ^8.4.5 + + '@storybook/addon-docs@8.4.5': + resolution: {integrity: sha512-zPELIl7wXormOylVaaSpkUIuuCCxrO+OFPMKZnlENt6zSReyy0dJu4V0tzfV8FCw+V4D6Y4wrLRk/TIG951Ojw==} + peerDependencies: + storybook: ^8.4.5 + + '@storybook/addon-docs@8.4.7': + resolution: {integrity: sha512-NwWaiTDT5puCBSUOVuf6ME7Zsbwz7Y79WF5tMZBx/sLQ60vpmJVQsap6NSjvK1Ravhc21EsIXqemAcBjAWu80w==} + peerDependencies: + storybook: ^8.4.7 + + '@storybook/addon-essentials@8.4.5': + resolution: {integrity: sha512-AxetQo/zSPIu3RZqWG2opwAz22Bb+jpf1nWbHp0kEpCrBemcWd8X2gonVmXNOC1PDKNl3jcWyc3lmg/+3mxjYg==} + peerDependencies: + storybook: ^8.4.5 + + '@storybook/addon-highlight@8.4.5': + resolution: {integrity: sha512-sMA7v+4unaKY+5RDhow6lLncJqNX9ZLUnBIt3vzY1ntUsOYVwykAY1Hq4Ysj0luCBXjJJdJ6223ylrycnb7Ilw==} + peerDependencies: + storybook: ^8.4.5 + + '@storybook/addon-interactions@8.4.5': + resolution: {integrity: sha512-s6R8XVD8LTp+LQTDbhtDjDLE6S44I7FtMLxPdMNwN9VEJjBk01NONLDuGDpNq5o/0bnybA3rMHk9+3afsgzidQ==} + peerDependencies: + storybook: ^8.4.5 + + '@storybook/addon-links@8.4.5': + resolution: {integrity: sha512-ac3OtplFdrPw/2jtLnteuVllwu2yCe3sgKJS9AbdYMT/65OW47M7oDnzcpRPsDGufrKlDMBJXXEv4SfTtlT+rg==} + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta + storybook: ^8.4.5 + peerDependenciesMeta: + react: + optional: true + + '@storybook/addon-measure@8.4.5': + resolution: {integrity: sha512-+sNjew991YaoXQyWWloFybjEGrDO40Jk6w8BgZs2X7oc3D5t/6oFzvyC862U++LGqKFA3quXDeBjEb92CI9cRA==} + peerDependencies: + storybook: ^8.4.5 + + '@storybook/addon-outline@8.4.5': + resolution: {integrity: sha512-XlpN98AUDnWQWNFSFVm+HkRUzm3xIUMjBGTkv6HsL6zt6XoJ+LsQMca+PPtYqlBJA+5CU41xMDaG8HC/p+sd3A==} + peerDependencies: + storybook: ^8.4.5 + + '@storybook/addon-toolbars@8.4.5': + resolution: {integrity: sha512-hOq5560ONOU/qrslrwosWzxnC4nrF8HZWD43ciKwtethm8HuptU2M+Jrui1CRsMScEZLopWWVE9o0vJMdKpIFQ==} + peerDependencies: + storybook: ^8.4.5 + + '@storybook/addon-viewport@8.4.5': + resolution: {integrity: sha512-l7Y41gIbJAsIN/QCg1QJ9sr61FLz1C/imUotcDej41tOHxUTSQOlXpNtVnfhUM1vGQc0yNpP3pVxj8BpXi0cAw==} + peerDependencies: + storybook: ^8.4.5 + + '@storybook/blocks@8.4.5': + resolution: {integrity: sha512-Z+LHauSqm3A4HBR9pUEf9KQhD3/3xYMt0FXgA+GHCAyDa6lFeD1C6r9Y2nlT+9dt8gv9B9oygTZvV6GqFVyRSQ==} + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta + storybook: ^8.4.5 + peerDependenciesMeta: + react: + optional: true + react-dom: + optional: true + + '@storybook/blocks@8.4.7': + resolution: {integrity: sha512-+QH7+JwXXXIyP3fRCxz/7E2VZepAanXJM7G8nbR3wWsqWgrRp4Wra6MvybxAYCxU7aNfJX5c+RW84SNikFpcIA==} + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta + storybook: ^8.4.7 + peerDependenciesMeta: + react: + optional: true + react-dom: + optional: true + + '@storybook/components@8.4.5': + resolution: {integrity: sha512-2PdnKfqNNv3sO7qILgWXiNvmLOi503oN9OMemNCQjTIvdvySc5JpS9/eClwcl/JfmE4qHdSHZr8dLLkBM9S7+Q==} + peerDependencies: + storybook: ^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0 + + '@storybook/components@8.4.7': + resolution: {integrity: sha512-uyJIcoyeMWKAvjrG9tJBUCKxr2WZk+PomgrgrUwejkIfXMO76i6jw9BwLa0NZjYdlthDv30r9FfbYZyeNPmF0g==} + peerDependencies: + storybook: ^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0 + + '@storybook/core-webpack@8.4.7': + resolution: {integrity: sha512-Tj+CjQLpFyBJxhhMms+vbPT3+gTRAiQlrhY3L1IEVwBa3wtRMS0qjozH26d1hK4G6mUIEdwu13L54HMU/w33Sg==} + peerDependencies: + storybook: ^8.4.7 + + '@storybook/core@8.4.5': + resolution: {integrity: sha512-aB1sQNX5nRoUAqg5u1py0MuR/VPd6c6PhECa4rW6pmr7kZcfyP4PP6UFpXuN71ypTQlkRE3Vc5PQZ3gLhE9o3g==} + peerDependencies: + prettier: ^2 || ^3 + peerDependenciesMeta: + prettier: + optional: true + + '@storybook/csf-plugin@8.4.5': + resolution: {integrity: sha512-qd2rQTglOTS+phQmTbNTXNjNyxdGvolaqHqDNMw3Vf6h9o3U+mLkwnDWNVnQ9oqvOoUEAqpBthgwzU9FhkIk+A==} + peerDependencies: + storybook: ^8.4.5 + + '@storybook/csf-plugin@8.4.7': + resolution: {integrity: sha512-Fgogplu4HImgC+AYDcdGm1rmL6OR1rVdNX1Be9C/NEXwOCpbbBwi0BxTf/2ZxHRk9fCeaPEcOdP5S8QHfltc1g==} + peerDependencies: + storybook: ^8.4.7 + '@storybook/csf@0.1.12': resolution: {integrity: sha512-9/exVhabisyIVL0VxTCxo01Tdm8wefIXKXfltAPTSr8cbLn5JAxGQ6QV3mjdecLGEOucfoVhAKtJfVHxEK1iqw==} + '@storybook/global@5.0.0': + resolution: {integrity: sha512-FcOqPAXACP0I3oJ/ws6/rrPT9WGhu915Cg8D02a9YxLo0DE9zI+a9A5gRGvmQ09fiWPukqI8ZAEoQEdWUKMQdQ==} + + '@storybook/icons@1.3.0': + resolution: {integrity: sha512-Nz/UzeYQdUZUhacrPyfkiiysSjydyjgg/p0P9HxB4p/WaJUUjMAcaoaLgy3EXx61zZJ3iD36WPuDkZs5QYrA0A==} + engines: {node: '>=14.0.0'} + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta + + '@storybook/instrumenter@8.4.5': + resolution: {integrity: sha512-8qM35FkueuRpJr0zA6ENvhQICbo+iKL1ln450DwV1kKJtc41KdbA3CuCvtZ/FnoPsFnwdtPjhhICFtRt8LRTSg==} + peerDependencies: + storybook: ^8.4.5 + + '@storybook/manager-api@8.4.5': + resolution: {integrity: sha512-t39JaMy3UX4StbUH/tIDcaflBDxTcyIq853wQtBMhVL3e1+Dw3MIiiG/5bw79HU4R7kSmPVLXIIbV3FmXkq7KQ==} + peerDependencies: + storybook: ^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0 + + '@storybook/manager-api@8.4.7': + resolution: {integrity: sha512-ELqemTviCxAsZ5tqUz39sDmQkvhVAvAgiplYy9Uf15kO0SP2+HKsCMzlrm2ue2FfkUNyqbDayCPPCB0Cdn/mpQ==} + peerDependencies: + storybook: ^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0 + + '@storybook/preview-api@8.4.5': + resolution: {integrity: sha512-MKIZ2jQO/3cUdsT57eq8jRgB6inALo9BxrQ88f7mqzltOkMvADvTAY6y8JZqTUoDzWTH/ny/8SGGdtpqlxRuiQ==} + peerDependencies: + storybook: ^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0 + + '@storybook/preview-api@8.4.7': + resolution: {integrity: sha512-0QVQwHw+OyZGHAJEXo6Knx+6/4er7n2rTDE5RYJ9F2E2Lg42E19pfdLlq2Jhoods2Xrclo3wj6GWR//Ahi39Eg==} + peerDependencies: + storybook: ^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0 + + '@storybook/react-docgen-typescript-plugin@1.0.1': + resolution: {integrity: sha512-dqbHa+5gaxaklFCuV1WTvljVPTo3QIJgpW4Ln+QeME7osPZUnUhjN2/djvo+sxrWUrTTuqX5jkn291aDngu9Tw==} + peerDependencies: + typescript: '>= 3.x' + webpack: '>= 4' + + '@storybook/react-dom-shim@8.4.5': + resolution: {integrity: sha512-YTWTfPagptEYXJsnxAl3zP97Ev0zebtaEV0WgjGaEeumr+zsfgKKwzzHxgrtumBmDzwkuKlzFwlQB5A8keOIGA==} + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta + storybook: ^8.4.5 + + '@storybook/react-dom-shim@8.4.7': + resolution: {integrity: sha512-6bkG2jvKTmWrmVzCgwpTxwIugd7Lu+2btsLAqhQSzDyIj2/uhMNp8xIMr/NBDtLgq3nomt9gefNa9xxLwk/OMg==} + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta + storybook: ^8.4.7 + + '@storybook/react@8.4.5': + resolution: {integrity: sha512-2+p4aGEdGOnu2XNhnMi1B8GPeszm34P905HgqGD1cuz9gMt7x/bgZQaVxs6kpHZ3Hb6V9qp62La2dbAYatHdSw==} + engines: {node: '>=18.0.0'} + peerDependencies: + '@storybook/test': 8.4.5 + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta + storybook: ^8.4.5 + typescript: '>= 4.2.x' + peerDependenciesMeta: + '@storybook/test': + optional: true + typescript: + optional: true + + '@storybook/react@8.4.7': + resolution: {integrity: sha512-nQ0/7i2DkaCb7dy0NaT95llRVNYWQiPIVuhNfjr1mVhEP7XD090p0g7eqUmsx8vfdHh2BzWEo6CoBFRd3+EXxw==} + engines: {node: '>=18.0.0'} + peerDependencies: + '@storybook/test': 8.4.7 + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta + storybook: ^8.4.7 + typescript: '>= 4.2.x' + peerDependenciesMeta: + '@storybook/test': + optional: true + typescript: + optional: true + + '@storybook/test@8.4.5': + resolution: {integrity: sha512-mHsRc6m60nfcEBsjvUkKz+Jnz0or4WH5jmJ1VL2pGKO4VzESCPqAwDnwDqP2YyeSQ0b/MAKUT5kdoLE2RE2eVw==} + peerDependencies: + storybook: ^8.4.5 + + '@storybook/theming@8.4.5': + resolution: {integrity: sha512-45e/jeG4iuqdZcHg3PbB6dwXQTwlnnEB7r/QcVExyC7ibrkTnjUfvxzyUw4mmU3CXETFGD5EcUobFkgK+/aPxQ==} + peerDependencies: + storybook: ^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0 + + '@storybook/theming@8.4.7': + resolution: {integrity: sha512-99rgLEjf7iwfSEmdqlHkSG3AyLcK0sfExcr0jnc6rLiAkBhzuIsvcHjjUwkR210SOCgXqBPW0ZA6uhnuyppHLw==} + peerDependencies: + storybook: ^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0 + '@stylistic/eslint-plugin-ts@2.12.0': resolution: {integrity: sha512-JqoHGQCeW0dC3LN/7+ZRwTOCs3kBum2b4k7ovx+0RXeaDIINs5F+/Mp/NvTCPqDzUlBkd1HOaviKyaEWpKA7Yw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -2692,6 +3022,10 @@ packages: resolution: {integrity: sha512-pemlzrSESWbdAloYml3bAJMEfNh1Z7EduzqPKprCH5S341frlpYnUEW0H72dLxa6IsYr+mPno20GiSm+h9dEdQ==} engines: {node: '>=18'} + '@testing-library/jest-dom@6.5.0': + resolution: {integrity: sha512-xGGHpBXYSHUUr6XsKBfs85TWlYKpTc37cSBBVrXcib2MkHLboWlkClhWF37JKlDb9KEq3dHs+f2xR7XJEWGBxA==} + engines: {node: '>=14', npm: '>=6', yarn: '>=1'} + '@testing-library/react@16.1.0': resolution: {integrity: sha512-Q2ToPvg0KsVL0ohND9A3zLJWcOXXcO8IDu3fj11KhNt0UlCWyFyvnCIBkd12tidB2lkiVRG8VFqdhcqhqnAQtg==} engines: {node: '>=18'} @@ -2707,6 +3041,12 @@ packages: '@types/react-dom': optional: true + '@testing-library/user-event@14.5.2': + resolution: {integrity: sha512-YAh82Wh4TIrxYLmfGcixwD18oIjyC1pFQC2Y01F2lzV2HTMiYrI0nze0FD0ocB//CKS/7jIUgae+adPqxK5yCQ==} + engines: {node: '>=12', npm: '>=6'} + peerDependencies: + '@testing-library/dom': '>=7.21.4' + '@tootallnate/once@2.0.0': resolution: {integrity: sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==} engines: {node: '>= 10'} @@ -2766,6 +3106,9 @@ packages: '@types/debug@4.1.12': resolution: {integrity: sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==} + '@types/doctrine@0.0.9': + resolution: {integrity: sha512-eOIHzCUSH7SMfonMG1LsC2f8vxBFtho6NGBznK41R84YzPuvSBzrhEps33IsQiOW9+VL6NQ9DbjQJznk/S4uRA==} + '@types/eslint-scope@3.7.7': resolution: {integrity: sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==} @@ -2796,6 +3139,9 @@ packages: '@types/html-minifier-terser@6.1.0': resolution: {integrity: sha512-oh/6byDPnL1zeNXFrDXFLyZjkr1MsBG667IM792caf1L2UPOOMf65NFzjUH/ltyfwjAGfs1rsX1eftK0jC/KIg==} + '@types/html-minifier-terser@7.0.2': + resolution: {integrity: sha512-mm2HqV22l8lFQh4r2oSsOEVea+m0qqxEmwpc9kC1p/XzmjLWrReR9D/GRs8Pex2NX/imyEH9c5IU/7tMBQCHOA==} + '@types/http-errors@2.0.4': resolution: {integrity: sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA==} @@ -2832,6 +3178,9 @@ packages: '@types/mdast@4.0.4': resolution: {integrity: sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==} + '@types/mdx@2.0.13': + resolution: {integrity: sha512-+OWZQfAYyio6YkJb3HLxDrvnx6SWWDbC0zVPfBRzUk0/nqoDyf6dNxQi3eArPe8rJ473nobTMQ/8Zk+LxJ+Yuw==} + '@types/mime@1.3.5': resolution: {integrity: sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==} @@ -2844,23 +3193,38 @@ packages: '@types/node@12.20.55': resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} + '@types/node@18.19.68': + resolution: {integrity: sha512-QGtpFH1vB99ZmTa63K4/FU8twThj4fuVSBkGddTp7uIL/cuoLWIUSL2RcOaigBhfR+hg5pgGkBnkoOxrTVBMKw==} + '@types/node@22.10.1': resolution: {integrity: sha512-qKgsUwfHZV2WCWLAnVP1JqnpE6Im6h3Y0+fYgMTasNQ7V++CBX5OT1as0g0f+OyubbFqhf6XVNIsmN4IIhEgGQ==} + '@types/prop-types@15.7.14': + resolution: {integrity: sha512-gNMvNH49DJ7OJYv+KAKn0Xp45p8PLl6zo2YnvDIbTd4J6MER2BmWN49TG7n9LvkyihINxeKW8+3bfS2yDC9dzQ==} + '@types/qs@6.9.17': resolution: {integrity: sha512-rX4/bPcfmvxHDv0XjfJELTTr+iB+tn032nPILqHm5wbthUUUuVtNGGqzhya9XUxjTP8Fpr0qYgSZZKxGY++svQ==} '@types/range-parser@1.2.7': resolution: {integrity: sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==} + '@types/react-dom@18.3.1': + resolution: {integrity: sha512-qW1Mfv8taImTthu4KoXgDfLuk4bydU6Q/TkADnDWWHwi4NX4BR+LWfTp2sVmTqRrsHvyDDTelgelxJ+SsejKKQ==} + '@types/react-dom@19.0.2': resolution: {integrity: sha512-c1s+7TKFaDRRxr1TxccIX2u7sfCnc3RxkVyBIUA2lCpyqCF+QoAwQ/CBg7bsMdVwP120HEH143VQezKtef5nCg==} peerDependencies: '@types/react': ^19.0.0 + '@types/react@18.3.12': + resolution: {integrity: sha512-D2wOSq/d6Agt28q7rSI3jhU7G6aiuzljDGZ2hTZHIkrTLUI+AF3WMeKkEZ9nN2fkBAlcktT6vcZjDFiIhMYEQw==} + '@types/react@19.0.1': resolution: {integrity: sha512-YW6614BDhqbpR5KtUYzTA+zlA7nayzJRA9ljz9CQoxthR0sDisYZLuvSMsil36t4EH/uAt8T52Xb4sVw17G+SQ==} + '@types/resolve@1.20.6': + resolution: {integrity: sha512-A4STmOXPhMUtHH+S6ymgE2GiBSMqf4oTvcQZMcHzokuTLVYzXTB8ttjcgxOVaAp2lGwEdzZ0J+cRbbeevQj1UQ==} + '@types/retry@0.12.2': resolution: {integrity: sha512-XISRgDJ2Tc5q4TRqvgJtzsRkFYNJzZrhTdtMoGVBttwzzQJkPnS3WWTFc7kuDRoPtPakl+T+OfdEUjYJj7Jbow==} @@ -2894,6 +3258,9 @@ packages: '@types/unist@3.0.3': resolution: {integrity: sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==} + '@types/uuid@9.0.8': + resolution: {integrity: sha512-jg+97EGIcY9AGHJJRaaPVgetKDsrTgbRjQ5Msgjh/DQKEFl0DtyRr/VCOyD1T2R1MNeWPK/u7JoGhlDZnKBAfA==} + '@types/ws@8.5.13': resolution: {integrity: sha512-osM/gWBTPKgHV8XkTunnegTRIsvF6owmf5w+JtAfOw472dptdm0dlGv4xCt6GwQRcC2XVOvvRE/0bAoQcL2QkA==} @@ -2953,6 +3320,24 @@ packages: '@ungap/structured-clone@1.2.0': resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} + '@vitest/expect@2.0.5': + resolution: {integrity: sha512-yHZtwuP7JZivj65Gxoi8upUN2OzHTi3zVfjwdpu2WrvCZPLwsJ2Ey5ILIPccoW23dd/zQBlJ4/dhi7DWNyXCpA==} + + '@vitest/pretty-format@2.0.5': + resolution: {integrity: sha512-h8k+1oWHfwTkyTkb9egzwNMfJAEx4veaPSnMeKbVSjp4euqGSbQlm5+6VHwTr7u4FJslVVsUG5nopCaAYdOmSQ==} + + '@vitest/pretty-format@2.1.8': + resolution: {integrity: sha512-9HiSZ9zpqNLKlbIDRWOnAWqgcA7xu+8YxXSekhr0Ykab7PAYFkhkwoqVArPOtJhPmYeE2YHgKZlj3CP36z2AJQ==} + + '@vitest/spy@2.0.5': + resolution: {integrity: sha512-c/jdthAhvJdpfVuaexSrnawxZz6pywlTPe84LUB2m/4t3rl2fTo9NFGBG4oWgaD+FTgDDV8hJ/nibT7IfH3JfA==} + + '@vitest/utils@2.0.5': + resolution: {integrity: sha512-d8HKbqIcya+GR67mkZbrzhS5kKhtp8dQLcmRZLGTscGVg7yImT82cIrhtn2L8+VujWcy6KZweApgNmPsTAO/UQ==} + + '@vitest/utils@2.1.8': + resolution: {integrity: sha512-dwSoui6djdwbfFmIgbIjX2ZhIoG7Ex/+xpxyiEgIGzjliY8xGkcpITKTlp6B4MgtGkF2ilvm97cPM96XZaAgcA==} + '@webassemblyjs/ast@1.14.1': resolution: {integrity: sha512-nuBEDgQfm1ccRp/8bCQrx1frohyufl4JlbMMZ4P1wpeOfDhF6FQkxZJ1b/e+PLwr6X1Nhw6OLme5usuBWYBvuQ==} @@ -3195,9 +3580,17 @@ packages: resolution: {integrity: sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==} engines: {node: '>= 0.4'} + assertion-error@2.0.1: + resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} + engines: {node: '>=12'} + ast-types-flow@0.0.8: resolution: {integrity: sha512-OH/2E5Fg20h2aPrbe+QL8JZQFko0YZaF+j4mnQ7BGhfavO7OpSLa8a0y9sBwomHdSbkhTS8TQNayBfnW5DwbvQ==} + ast-types@0.16.1: + resolution: {integrity: sha512-6t10qk83GOG8p0vKmaCr8eiilZwO171AvbROMtvvNiwrTly62t+7XkA8RdIIVbpMhCASAsxgAzdRSwh6nw/5Dg==} + engines: {node: '>=4'} + astral-regex@2.0.0: resolution: {integrity: sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==} engines: {node: '>=8'} @@ -3286,6 +3679,10 @@ packages: before-after-hook@2.2.3: resolution: {integrity: sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==} + better-opn@3.0.2: + resolution: {integrity: sha512-aVNobHnJqLiUelTaHat9DZ1qM2w0C0Eym4LPI/3JxOnSokGVdsl1T1kN7TFvsEAD8G47A6VKQ0TVHqbBnYMJlQ==} + engines: {node: '>=12.0.0'} + better-path-resolve@1.0.0: resolution: {integrity: sha512-pbnl5XzGBdrFU/wT4jqmJVPn2B6UHPBOhzMQkY/SPUPB6QtUXtmBHBIwCbXJol93mOpGMnQyP/+BB19q04xj7g==} engines: {node: '>=4'} @@ -3317,6 +3714,9 @@ packages: resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} engines: {node: '>=8'} + browser-assert@1.2.1: + resolution: {integrity: sha512-nfulgvOR6S4gt9UKCeGJOuSGBPGiFT6oQ/2UBnvTY/5aQ1PnksW72fhZkM30DzoRRv2WpwZf1vHHEr3mtuXIWQ==} + browserslist@4.24.2: resolution: {integrity: sha512-ZIc+Q62revdMcqC6aChtW4jz3My3klmCO1fEmINZY/8J3EpBg5/A/D0AKmBveUh6pgoeycoMkVMko84tuYS+Gg==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} @@ -3375,13 +3775,25 @@ packages: caniuse-lite@1.0.30001687: resolution: {integrity: sha512-0S/FDhf4ZiqrTUiQ39dKeUjYRjkv7lOZU1Dgif2rIqrTzX/1wV2hfKu9TOm1IHkdSijfLswxTFzl/cvir+SLSQ==} + case-sensitive-paths-webpack-plugin@2.4.0: + resolution: {integrity: sha512-roIFONhcxog0JSSWbvVAh3OocukmSgpqOH6YpMkCvav/ySIV3JKg4Dc8vYtQjYi/UxpNE36r/9v+VqTQqgkYmw==} + engines: {node: '>=4'} + ccount@2.0.1: resolution: {integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==} + chai@5.1.2: + resolution: {integrity: sha512-aGtmf24DW6MLHHG5gCx4zaI3uBq3KRtxeVs0DjFH6Z0rDNbsvTxFASFvdj79pxjxZ8/5u3PIiN3IwEIQkiiuPw==} + engines: {node: '>=12'} + chalk-template@1.1.0: resolution: {integrity: sha512-T2VJbcDuZQ0Tb2EWwSotMPJjgpy1/tGee1BTpUNsGZ/qgNjV2t7Mvu+d4600U564nbLesN1x2dPL+xii174Ekg==} engines: {node: '>=14.16'} + chalk@3.0.0: + resolution: {integrity: sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==} + engines: {node: '>=8'} + chalk@4.1.2: resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} engines: {node: '>=10'} @@ -3418,6 +3830,10 @@ packages: chardet@0.7.0: resolution: {integrity: sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==} + check-error@2.1.1: + resolution: {integrity: sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==} + engines: {node: '>= 16'} + chokidar@3.6.0: resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} engines: {node: '>= 8.10.0'} @@ -3520,6 +3936,9 @@ packages: resolution: {integrity: sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==} engines: {node: '>= 12'} + commondir@1.0.1: + resolution: {integrity: sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==} + compressible@2.0.18: resolution: {integrity: sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==} engines: {node: '>= 0.6'} @@ -3546,6 +3965,9 @@ packages: resolution: {integrity: sha512-I5qxpzLv+sJhTVEoLYNcTW+bThDCPsit0vLNKShZx6rLtpilNpmmeTPaeqJb9ZE9dV3DGaeby6Vuhrw38WjeyQ==} engines: {node: ^14.18.0 || >=16.10.0} + constants-browserify@1.0.0: + resolution: {integrity: sha512-xFxOwqIzR/e1k1gLiWEophSCMqXcwVHIH7akf7b/vxcUeGunlj3hvZaaqxwHsTgn+IndtkQJgSztIDWeumWJDQ==} + content-disposition@0.5.4: resolution: {integrity: sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==} engines: {node: '>= 0.6'} @@ -3679,6 +4101,9 @@ packages: resolution: {integrity: sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==} engines: {node: '>= 6'} + css.escape@1.5.1: + resolution: {integrity: sha512-YUifsXXuknHlUsmlgyY0PKzgPOr7/FjCePfHNt0jxm83wHZi44VDMQ7/fGNkjY3/jV1MC+1CmZbaHzugyeRtpg==} + cssdb@8.2.3: resolution: {integrity: sha512-9BDG5XmJrJQQnJ51VFxXCAtpZ5ebDlAREmO8sxMOVU0aSxN/gocbctjIG5LMh3WBUq+xTlb/jw2LoljBEqraTA==} @@ -3761,6 +4186,9 @@ packages: resolution: {integrity: sha512-+8VxcR21HhTy8nOt6jf20w0c9CADrw1O8d+VZ/YzzCt4bJ3uBjw+D1q2osAB8RnpwwaeYBxy0HyKQxD5JBMuuQ==} engines: {node: '>=14.16'} + dedent@0.7.0: + resolution: {integrity: sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==} + dedent@1.5.3: resolution: {integrity: sha512-NHQtfOOW68WD8lgypbLA5oT+Bt0xXJhiYvoR6SmmNXZfpzOGXwdKWmcwG8N7PwVVWV3eF/68nmD9BaJSsTBhyQ==} peerDependencies: @@ -3769,6 +4197,10 @@ packages: babel-plugin-macros: optional: true + deep-eql@5.0.2: + resolution: {integrity: sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==} + engines: {node: '>=6'} + deep-is@0.1.4: resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} @@ -3791,6 +4223,10 @@ packages: resolution: {integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==} engines: {node: '>= 0.4'} + define-lazy-prop@2.0.0: + resolution: {integrity: sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==} + engines: {node: '>=8'} + define-lazy-prop@3.0.0: resolution: {integrity: sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==} engines: {node: '>=12'} @@ -3875,6 +4311,9 @@ packages: dom-accessibility-api@0.5.16: resolution: {integrity: sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg==} + dom-accessibility-api@0.6.3: + resolution: {integrity: sha512-7ZgogeTnjuHbo+ct10G9Ffp0mif17idi0IyWNVA/wcwcm7NPOD/WEHVP3n7n3MhXqxoIYm8d6MuZohYWIZ4T3w==} + dom-converter@0.2.0: resolution: {integrity: sha512-gd3ypIPfOMr9h5jIKq8E3sHOTCjeirnl0WK5ZdS1AW0Odt0b1PaWaHdJ4Qk4klv+YB9aJBS7mESXjFoDQPu6DA==} @@ -3957,6 +4396,9 @@ packages: resolution: {integrity: sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==} engines: {node: '>= 0.8'} + endent@2.1.0: + resolution: {integrity: sha512-r8VyPX7XL8U01Xgnb1CjZ3XV+z90cXIJ9JPE/R9SEC9vpw2P6CfsRPJmp20DppC5N7ZAMCmjYkJIa744Iyg96w==} + enhanced-resolve@5.17.1: resolution: {integrity: sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==} engines: {node: '>=10.13.0'} @@ -4024,6 +4466,11 @@ packages: resolution: {integrity: sha512-w+5mJ3GuFL+NjVtJlvydShqE1eN3h3PbI7/5LAsYJP/2qtuMXjfL2LpHSRqo4b4eSF5K/DH1JXKUAHSB2UW50g==} engines: {node: '>= 0.4'} + esbuild-register@3.6.0: + resolution: {integrity: sha512-H2/S7Pm8a9CL1uhp9OvjwrBh5Pvx0H8qVOxNu8Wed9Y7qv56MPtq+GGM8RJpq6glYJn9Wspr8uw7l55uyinNeg==} + peerDependencies: + esbuild: '>=0.12 <1' + esbuild@0.24.0: resolution: {integrity: sha512-FuLPevChGDshgSicjisSooU0cemp/sGXR841D5LHMB7mTVOmsEHcAxaH3irL53+8YDIeVNQEySh4DaYU/iuPqQ==} engines: {node: '>=18'} @@ -4220,6 +4667,12 @@ packages: estree-util-visit@2.0.0: resolution: {integrity: sha512-m5KgiH85xAhhW8Wta0vShLcUvOsh3LLPI2YVwcbio1l7E09NTLL1EyMZFM1OyWowoH0skScNbhOPl4kcBgzTww==} + estree-walker@2.0.2: + resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} + + estree-walker@3.0.3: + resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} + esutils@2.0.3: resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} engines: {node: '>=0.10.0'} @@ -4275,6 +4728,9 @@ packages: resolution: {integrity: sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==} engines: {node: '>=8.6.0'} + fast-json-parse@1.0.3: + resolution: {integrity: sha512-FRWsaZRWEJ1ESVNbDWmsAlqDk96gPQezzLghafp5J4GUKjbCz3OkAHuZs5TuPEtkbVQERysLp9xv6c24fBm8Aw==} + fast-json-stable-stringify@2.1.0: resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} @@ -4326,6 +4782,10 @@ packages: resolution: {integrity: sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==} engines: {node: '>= 0.8'} + find-cache-dir@3.3.2: + resolution: {integrity: sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==} + engines: {node: '>=8'} + find-up@4.1.0: resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} engines: {node: '>=8'} @@ -4380,6 +4840,10 @@ packages: resolution: {integrity: sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==} engines: {node: '>= 0.6'} + fs-extra@11.2.0: + resolution: {integrity: sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==} + engines: {node: '>=14.14'} + fs-extra@7.0.1: resolution: {integrity: sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==} engines: {node: '>=6 <7 || >=8'} @@ -4570,6 +5034,11 @@ packages: engines: {node: '>=12'} hasBin: true + html-minifier-terser@7.2.0: + resolution: {integrity: sha512-tXgn3QfqPIpGl9o+K5tpcj3/MN4SfLtsx2GWwBC3SSd0tXQGyF3gsSqad8loJgKZGM3ZxbYDd5yhiBIdWpmvLA==} + engines: {node: ^14.13.1 || >=16.0.0} + hasBin: true + html-tags@3.3.1: resolution: {integrity: sha512-ztqyC3kLto0e9WbNp0aeP+M3kTt+nbaIveGmUxAtZa+8iFgKLUOD4YKM5j+f3QD89bra7UeumolZHKuOXnTmeQ==} engines: {node: '>=8'} @@ -4734,6 +5203,10 @@ packages: is-alphanumerical@2.0.1: resolution: {integrity: sha512-hmbYhX/9MUMF5uh7tOXyK/n0ZvWpad5caBA17GsC6vyuCqaWliRG5K1qS9inmUhEMaOBIW7/whAnSwveW/LtZw==} + is-arguments@1.1.1: + resolution: {integrity: sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==} + engines: {node: '>= 0.4'} + is-array-buffer@3.0.4: resolution: {integrity: sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==} engines: {node: '>= 0.4'} @@ -4779,6 +5252,11 @@ packages: is-decimal@2.0.1: resolution: {integrity: sha512-AAB9hiomQs5DXWcRB1rqsxGUstbRroFOPPVAomNk/3XHR5JyEZChOyTWe2oayKnsSsr/kcGqF+z6yuH6HHpN0A==} + is-docker@2.2.1: + resolution: {integrity: sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==} + engines: {node: '>=8'} + hasBin: true + is-docker@3.0.0: resolution: {integrity: sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -4927,6 +5405,10 @@ packages: resolution: {integrity: sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==} engines: {node: '>=0.10.0'} + is-wsl@2.2.0: + resolution: {integrity: sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==} + engines: {node: '>=8'} + is-wsl@3.1.0: resolution: {integrity: sha512-UcVfVfaK4Sc4m7X3dUSoHoozQGBEFeDC+zVo06t98xe8CzHSZZBekNXH+tu0NalHolcJ/QAGqS46Hef7QXBIMw==} engines: {node: '>=16'} @@ -5148,6 +5630,10 @@ packages: resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} hasBin: true + jsdoc-type-pratt-parser@4.1.0: + resolution: {integrity: sha512-Hicd6JK5Njt2QB6XYFS7ok9e37O8AYk3jTcppG4YVQnYjOemymvTcmc7OWsmq/Qqj5TdRFO5/x/tIPmBeRtGHg==} + engines: {node: '>=12.0.0'} + jsdom@20.0.3: resolution: {integrity: sha512-SYhBvTh89tTfCD/CRdSOm13mOBa42iTaTyfyEWBdKcGdPxPtLFBXuHR8XHb33YNYaP+lLbmSvBTsnoesCNJEsQ==} engines: {node: '>=14'} @@ -5200,6 +5686,9 @@ packages: jsonfile@4.0.0: resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==} + jsonfile@6.1.0: + resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} + jsx-ast-utils@3.3.5: resolution: {integrity: sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ==} engines: {node: '>=4.0'} @@ -5311,6 +5800,9 @@ packages: resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} hasBin: true + loupe@3.1.2: + resolution: {integrity: sha512-23I4pFZHmAemUnz8WZXbYRSKYj801VDaNv9ETuMh7IrMc7VuVVSo+Z9iLE3ni30+U48iDWfi30d3twAXBYmnCg==} + lower-case@2.0.2: resolution: {integrity: sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==} @@ -5324,6 +5816,13 @@ packages: resolution: {integrity: sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==} hasBin: true + magic-string@0.30.15: + resolution: {integrity: sha512-zXeaYRgZ6ldS1RJJUrMrYgNJ4fdwnyI6tVqoiIhyCyv5IVTK9BU8Ic2l253GGETQHxI4HNUwhJ3fjDhKqEoaAw==} + + make-dir@3.1.0: + resolution: {integrity: sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==} + engines: {node: '>=8'} + make-dir@4.0.0: resolution: {integrity: sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==} engines: {node: '>=10'} @@ -5334,6 +5833,9 @@ packages: makeerror@1.0.12: resolution: {integrity: sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==} + map-or-similar@1.5.0: + resolution: {integrity: sha512-0aF7ZmVon1igznGI4VS30yugpduQW3y3GkcgGJOp7d8x8QrizhigUxjI/m2UojsXXto+jLAH3KSz+xOJTiORjg==} + mathml-tag-names@2.1.3: resolution: {integrity: sha512-APMBEanjybaPzUrfqU0IMU5I0AswKMH7k8OTLs0vvV4KZpExkTkY87nR/zpbuTPj+gARop7aGUbl11pnDfW6xg==} @@ -5384,6 +5886,9 @@ packages: resolution: {integrity: sha512-q9MmZXd2rRWHS6GU3WEm3HyiXZyyoA1DqdOhEq0lxPBmKb5S7IAOwX0RgUCwJfqjelDCySa5h8ujOy24LqsWcw==} engines: {node: '>= 4.0.0'} + memoizerific@1.11.3: + resolution: {integrity: sha512-/EuHYwAPdLtXwAwSZkh/Gutery6pD2KYd44oQLhAvQp/50mpyduZh8Q7PYHXTCJ+wuXxt7oij2LXyIJOOYFPog==} + meow@13.2.0: resolution: {integrity: sha512-pxQJQzB6djGPXh08dacEloMFopsOqGVRKFPYvPOt9XDZ1HasbgDZA74CJGreSU4G3Ak7EFJGoiH2auq+yXISgA==} engines: {node: '>=18'} @@ -5514,6 +6019,10 @@ packages: resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==} engines: {node: '>=6'} + min-indent@1.0.1: + resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==} + engines: {node: '>=4'} + mini-css-extract-plugin@2.9.2: resolution: {integrity: sha512-GJuACcS//jtq4kCtd5ii/M0SZf7OZRH+BxdqXZHaJfb8TJiVl+NgQRPwiYt2EuqeSkNydn/7vP+bcE27C5mb9w==} engines: {node: '>= 12.13.0'} @@ -5548,6 +6057,10 @@ packages: resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} engines: {node: '>=4'} + mrmime@2.0.0: + resolution: {integrity: sha512-eu38+hdgojoyq63s+yTpN4XMBdt5l8HhMhc4VKLO9KM5caLIBvUm4thi7fFaxyTmCKeNnXZ5pAlBwCUnhA09uw==} + engines: {node: '>=10'} + ms@2.0.0: resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==} @@ -5696,6 +6209,9 @@ packages: resolution: {integrity: sha512-yBYjY9QX2hnRmZHAjG/f13MzmBzxzYgQhFrke06TTyKY5zSTEqkOeukBzIdVA3j3ulu8Qa3MbVFShV7T2RmGtQ==} engines: {node: '>= 0.4'} + objectorarray@1.0.5: + resolution: {integrity: sha512-eJJDYkhJFFbBBAxeh8xW+weHlkI28n2ZdQV/J/DNfWfSKlGEf2xcfAbZTv3riEXHAhL9SVOTs2pRmXiSTf78xg==} + obuf@1.1.2: resolution: {integrity: sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==} @@ -5718,6 +6234,10 @@ packages: resolution: {integrity: sha512-mnkeQ1qP5Ue2wd+aivTD3NHd/lZ96Lu0jgf0pwktLPtx6cTZiH7tyeGRRHs0zX0rbrahXPnXlUnbeXyaBBuIaw==} engines: {node: '>=18'} + open@8.4.2: + resolution: {integrity: sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==} + engines: {node: '>=12'} + opener@1.5.2: resolution: {integrity: sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==} hasBin: true @@ -5821,6 +6341,9 @@ packages: pascal-case@3.1.2: resolution: {integrity: sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==} + path-browserify@1.0.1: + resolution: {integrity: sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==} + path-exists@4.0.0: resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} engines: {node: '>=8'} @@ -5857,6 +6380,10 @@ packages: pathe@1.1.2: resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==} + pathval@2.0.0: + resolution: {integrity: sha512-vE7JKRyES09KiunauX7nd2Q9/L7lhok4smP9RZTDeD4MVs72Dp2qNFVz39Nz5a0FVEW0BJR6C0DYrq6unoziZA==} + engines: {node: '>= 14.16'} + picocolors@1.1.1: resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} @@ -5887,6 +6414,10 @@ packages: pkg-types@1.2.1: resolution: {integrity: sha512-sQoqa8alT3nHjGuTjuKgOnvjo4cljkufdtLMnO2LBP/wRwuDlo1tkaEdMxCRhyGRPacv/ztlZgDPm2b7FAmEvw==} + polished@4.3.1: + resolution: {integrity: sha512-OBatVyC/N7SCW/FaDHrSd+vn0o5cS855TOmYi4OkdWUMSJCET/xip//ch8xGUvtr3i44X9LVyWwQlRMTN3pwSA==} + engines: {node: '>=10'} + portfinder@1.0.32: resolution: {integrity: sha512-on2ZJVVDXRADWE6jnQaX0ioEylzgBpQk8r55NE4wjXW1ZxO+BgDlY6DXwj20i0V8eB4SenDQ00WEaxfiIQPcxg==} engines: {node: '>= 0.12.0'} @@ -6163,6 +6694,10 @@ packages: process-nextick-args@2.0.1: resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==} + process@0.11.10: + resolution: {integrity: sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==} + engines: {node: '>= 0.6.0'} + promise-inflight@1.0.1: resolution: {integrity: sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g==} peerDependencies: @@ -6192,6 +6727,9 @@ packages: pstree.remy@1.1.8: resolution: {integrity: sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==} + punycode@1.4.1: + resolution: {integrity: sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==} + punycode@2.3.1: resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} engines: {node: '>=6'} @@ -6236,6 +6774,20 @@ packages: resolution: {integrity: sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==} engines: {node: '>= 0.8'} + react-docgen-typescript@2.2.2: + resolution: {integrity: sha512-tvg2ZtOpOi6QDwsb3GZhOjDkkX0h8Z2gipvTg6OVMUyoYoURhEiRNePT8NZItTVCDh39JJHnLdfCOkzoLbFnTg==} + peerDependencies: + typescript: '>= 4.3.x' + + react-docgen@7.1.0: + resolution: {integrity: sha512-APPU8HB2uZnpl6Vt/+0AFoVYgSRtfiP6FLrZgPPTDmqSb2R4qZRbgd0A3VzIFxDt5e+Fozjx79WjLWnF69DK8g==} + engines: {node: '>=16.14.0'} + + react-dom@18.3.1: + resolution: {integrity: sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==} + peerDependencies: + react: ^18.3.1 + react-dom@19.0.0: resolution: {integrity: sha512-4GV5sHFG0e/0AD4X+ySy6UJd3jVl1iNsNHdpad0qhABJ11twS3TTBnseqsKurKcsNqCEFeGL3uLpVChpIO3QfQ==} peerDependencies: @@ -6264,6 +6816,10 @@ packages: react-dom: optional: true + react@18.3.1: + resolution: {integrity: sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==} + engines: {node: '>=0.10.0'} + react@19.0.0: resolution: {integrity: sha512-V8AVnmPIICiWpGfm6GLzCR/W5FXLchHop40W4nXBmdlEceh16rCN8O8LNWm5bh5XUX91fh7KpA+W0TgMKmgTpQ==} engines: {node: '>=0.10.0'} @@ -6295,10 +6851,21 @@ packages: resolution: {integrity: sha512-yDMz9g+VaZkqBYS/ozoBJwaBhTbZo3UNYQHNRw1D3UFQB8oHB4uS/tAODO+ZLjGWmUbKnIlOWO+aaIiAxrUWHA==} engines: {node: '>= 14.16.0'} + recast@0.23.9: + resolution: {integrity: sha512-Hx/BGIbwj+Des3+xy5uAtAbdCyqK9y9wbBcDFDYanLS9JnMqf7OeF87HQwUimE87OEc72mr6tkKUKMBBL+hF9Q==} + engines: {node: '>= 4'} + rechoir@0.8.0: resolution: {integrity: sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ==} engines: {node: '>= 10.13.0'} + redent@3.0.0: + resolution: {integrity: sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==} + engines: {node: '>=8'} + + reduce-configs@1.1.0: + resolution: {integrity: sha512-DQxy6liNadHfrLahZR7lMdc227NYVaQZhY5FMsxLEjX8X0SCuH+ESHSLCoz2yDZFq1/CLMDOAHdsEHwOEXKtvg==} + reflect.getprototypeof@1.0.8: resolution: {integrity: sha512-B5dj6usc5dkk8uFliwjwDHM8To5/QwdKz9JcBZ8Ic4G1f0YmeeJTtE/ZTdgRFPAfxZFiUaPhZ1Jcs4qeagItGQ==} engines: {node: '>= 0.4'} @@ -6412,6 +6979,14 @@ packages: engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true + rsbuild-plugin-html-minifier-terser@1.1.1: + resolution: {integrity: sha512-rbDLv+XmGeSQo9JWKSwBst3Qwx1opLqtQCnQ3t9Z0F0ZTxKOC1S/ypPv5tSn/S3GMHct5Yb76mMgh6p80hjOAQ==} + peerDependencies: + '@rsbuild/core': 1.x || ^1.0.1-beta.0 + peerDependenciesMeta: + '@rsbuild/core': + optional: true + run-applescript@7.0.0: resolution: {integrity: sha512-9by4Ij99JUr/MCFBUkDKLWK3G9HVXmabKz9U5MlIAIuvuzkiOicRYs8XJLxX+xahD+mLiiCYDqF9dKAgtzKP1A==} engines: {node: '>=18'} @@ -6444,6 +7019,9 @@ packages: resolution: {integrity: sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==} engines: {node: '>=v12.22.7'} + scheduler@0.23.2: + resolution: {integrity: sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==} + scheduler@0.25.0: resolution: {integrity: sha512-xFVuu11jh+xcO7JOAGJNOXld8/TcEHK/4CituBUeUb5hqxJLj9YuemAEuvm9gQ/+pgXYfbQuqAkiYu+u7YEsNA==} @@ -6537,6 +7115,10 @@ packages: resolution: {integrity: sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==} engines: {node: '>=10'} + sirv@2.0.4: + resolution: {integrity: sha512-94Bdh3cC2PKrbgSOUqTiGPWVZeSiXfKOVZNJniWoqrWrRkB1CJzBU3NEbiTsPcYy1lDsANA/THzS+9WBiy5nfQ==} + engines: {node: '>= 10'} + sisteransi@1.0.5: resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==} @@ -6639,10 +7221,42 @@ packages: resolution: {integrity: sha512-UhDfHmA92YAlNnCfhmq0VeNL5bDbiZGg7sZ2IvPsXubGkiNa9EC+tUTsjBRsYUAz87btI6/1wf4XoVvQ3uRnmQ==} engines: {node: '>=18'} - strict-event-emitter@0.5.1: - resolution: {integrity: sha512-vMgjE/GGEPEFnhFub6pa4FmJBRBVOLpIII2hvCZ8Kzb7K0hlHo7mQv6xYrBvCL2LtAIBwFUK8wvuJgTVSQ5MFQ==} + storybook-builder-rsbuild@0.1.5: + resolution: {integrity: sha512-g8/pVX+2YixHpWt/Q8dQWtkuKpWKxm1i9h+ihTFPO5LQWc3HvlF6PAXccPvedicLizGR2xTaI/RcJkE+2bYXqA==} + peerDependencies: + '@rsbuild/core': ^1.0.1 + storybook: ^8.2.1 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true - string-argv@0.3.2: + storybook-react-rsbuild@0.1.5: + resolution: {integrity: sha512-Cy7Ms5COLR1FTelGRxS5pE9LVlDSvaJeBsTH2MVi/29ZK8UEE0VH+Mnve2MboB93GbC3fhZFtIcNSF2dy9pjTw==} + engines: {node: '>=18.0.0'} + peerDependencies: + '@rsbuild/core': ^1.0.1 + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta + storybook: ^8.2.1 + typescript: '>= 4.2.x' + peerDependenciesMeta: + typescript: + optional: true + + storybook@8.4.5: + resolution: {integrity: sha512-9tfgabXnMibYp3SvoaJXXMD63Pw0SA9Hnf5v6TxysCYZs4DZ/04fAkK+9RW+K4C5JkV83qXMMlrsPj766R47fg==} + hasBin: true + peerDependencies: + prettier: ^2 || ^3 + peerDependenciesMeta: + prettier: + optional: true + + strict-event-emitter@0.5.1: + resolution: {integrity: sha512-vMgjE/GGEPEFnhFub6pa4FmJBRBVOLpIII2hvCZ8Kzb7K0hlHo7mQv6xYrBvCL2LtAIBwFUK8wvuJgTVSQ5MFQ==} + + string-argv@0.3.2: resolution: {integrity: sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==} engines: {node: '>=0.6.19'} @@ -6717,6 +7331,14 @@ packages: resolution: {integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==} engines: {node: '>=6'} + strip-indent@3.0.0: + resolution: {integrity: sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==} + engines: {node: '>=8'} + + strip-indent@4.0.0: + resolution: {integrity: sha512-mnVSV2l+Zv6BLpSD/8V87CW/y9EmmbYzGCIavsnsI6/nwn26DwffM/yztm30Z/I2DY9wdS3vXVCMnHDgZaVNoA==} + engines: {node: '>=12'} + strip-json-comments@3.1.1: resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} engines: {node: '>=8'} @@ -6876,6 +7498,9 @@ packages: resolution: {integrity: sha512-Kw36UHxJEELq2VUqdaSGR2/8cAsPgMtvX8uGVU6Jk26O66PhXec0A5ZnRYs47btbtwPDpXXF66+Fo3vimCM9aQ==} engines: {node: '>=16'} + tiny-invariant@1.3.3: + resolution: {integrity: sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==} + tinyexec@0.3.1: resolution: {integrity: sha512-WiCJLEECkO18gwqIp6+hJg0//p23HXp4S+gGtAKu3mI2F2/sXC4FvHvXvB0zJVVaTPhx1/tOwdbRsa1sOBIKqQ==} @@ -6883,6 +7508,14 @@ packages: resolution: {integrity: sha512-Zc+8eJlFMvgatPZTl6A9L/yht8QqdmUNtURHaKZLmKBE12hNPSrqNkUp2cs3M/UKmNVVAMFQYSjYIVHDjW5zew==} engines: {node: '>=12.0.0'} + tinyrainbow@1.2.0: + resolution: {integrity: sha512-weEDEq7Z5eTHPDh4xjX789+fHfF+P8boiFB+0vbWzpbnbsEr/GRaohi/uMKxg8RZMXnl1ItAi/IUHWMsjDV7kQ==} + engines: {node: '>=14.0.0'} + + tinyspy@3.0.2: + resolution: {integrity: sha512-n1cw8k1k0x4pgA2+9XrOkFydTerNcJ1zWCO5Nn9scWHTD+5tp8dghT2x1uduQePZTZgd3Tupf+x9BxJjeJi77Q==} + engines: {node: '>=14.0.0'} + tmp@0.0.33: resolution: {integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==} engines: {node: '>=0.6.0'} @@ -6898,6 +7531,10 @@ packages: resolution: {integrity: sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==} engines: {node: '>=0.6'} + totalist@3.0.1: + resolution: {integrity: sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==} + engines: {node: '>=6'} + touch@3.1.1: resolution: {integrity: sha512-r0eojU4bI8MnHr8c5bNo7lJDdI2qXlWWJk6a9EAFG7vbhTjElYhBVS3/miuE0uOuoLdb8Mc/rVfsmm6eo5o9GA==} hasBin: true @@ -6935,6 +7572,16 @@ packages: peerDependencies: typescript: '>=4.2.0' + ts-checker-rspack-plugin@1.0.3: + resolution: {integrity: sha512-K5BUrytoFju1Olu11T49vlYvDEGOguBF1CBCl4o2ARxDGPoJHHf7fBzLlK0YYkUqI5EFA5cMRUC6332M7hQBHw==} + engines: {node: '>=16.0.0'} + peerDependencies: + '@rspack/core': ^1.0.0 + typescript: '>=3.8.0' + peerDependenciesMeta: + '@rspack/core': + optional: true + ts-dedent@2.2.0: resolution: {integrity: sha512-q5W7tVM71e2xjHZTlgfTDoPF/SmqKG5hddq9SzR49CH2hayqRKJtQ4mtRlSxKaJlR/+9rEM+mnBHf7I2/BQcpQ==} engines: {node: '>=6.10'} @@ -6962,6 +7609,10 @@ packages: tsconfig-paths@3.15.0: resolution: {integrity: sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==} + tsconfig-paths@4.2.0: + resolution: {integrity: sha512-NoZ4roiN7LnbKn9QqE1amc9DJfzvZXxF4xDavcOWt1BPkdx+m+0gJuPM+S0vCe7zTJMYUP0R8pO2XMr+Y8oLIg==} + engines: {node: '>=6'} + tslib@2.8.1: resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} @@ -7096,6 +7747,9 @@ packages: undefsafe@2.0.5: resolution: {integrity: sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==} + undici-types@5.26.5: + resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} + undici-types@6.20.0: resolution: {integrity: sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==} @@ -7165,10 +7819,18 @@ packages: resolution: {integrity: sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==} engines: {node: '>= 4.0.0'} + universalify@2.0.1: + resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==} + engines: {node: '>= 10.0.0'} + unpipe@1.0.0: resolution: {integrity: sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==} engines: {node: '>= 0.8'} + unplugin@1.16.0: + resolution: {integrity: sha512-5liCNPuJW8dqh3+DM6uNM2EI3MLLpCKp/KY+9pB5M2S2SR2qvvDHhKgBOaTWEbZTAws3CXfB0rKTIolWKL05VQ==} + engines: {node: '>=14.0.0'} + update-browserslist-db@1.1.1: resolution: {integrity: sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==} hasBin: true @@ -7188,9 +7850,16 @@ packages: url-parse@1.5.10: resolution: {integrity: sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==} + url@0.11.4: + resolution: {integrity: sha512-oCwdVC7mTuWiPyjLUz/COz5TLk6wgp0RCsN+wHZ2Ekneac9w8uuV0njcbbie2ME+Vs+d6duwmYuR3HgQXs1fOg==} + engines: {node: '>= 0.4'} + util-deprecate@1.0.2: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} + util@0.12.5: + resolution: {integrity: sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==} + utila@0.4.0: resolution: {integrity: sha512-Z0DbgELS9/L/75wZbro8xAnT50pBVFQZ+hUEueGDU5FN51YSCYM+jdxsfCiHjwNP/4LCDD0i/graKpeBnOXKRA==} @@ -7202,6 +7871,10 @@ packages: resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==} hasBin: true + uuid@9.0.1: + resolution: {integrity: sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==} + hasBin: true + uvu@0.5.6: resolution: {integrity: sha512-+g8ENReyr8YsOc6fv/NVJs2vFdHBnBNdfE49rshrTzDWOlUx4Gq7KOS2GD8eqhy2j+Ejq29+SbKH8yjkAqXqoA==} engines: {node: '>=8'} @@ -7321,6 +7994,9 @@ packages: resolution: {integrity: sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==} engines: {node: '>=10.13.0'} + webpack-virtual-modules@0.6.2: + resolution: {integrity: sha512-66/V2i5hQanC51vBQKPH4aI8NMAcBW59FVBs+rC7eGHupMyfn34q7rZIE+ETlJ+XTevqfUhVVBgSUNSW2flEUQ==} + webpack@5.97.1: resolution: {integrity: sha512-EksG6gFY3L1eFMROS/7Wzgrii5mBAFe4rIr3r2BTfo7bcc+DWwFZ4OJ/miOuHJO/A85HwyI4eQ0F6IKXesO7Fg==} engines: {node: '>=10.13.0'} @@ -7488,6 +8164,8 @@ snapshots: '@aashutoshrathi/word-wrap@1.2.6': {} + '@adobe/css-tools@4.4.1': {} + '@altano/repository-tools@0.1.1': {} '@ampproject/remapping@2.3.0': @@ -9140,6 +9818,12 @@ snapshots: globby: 11.1.0 read-yaml-file: 1.1.0 + '@mdx-js/react@3.1.0(@types/react@18.3.12)(react@18.3.1)': + dependencies: + '@types/mdx': 2.0.13 + '@types/react': 18.3.12 + react: 18.3.1 + '@module-federation/runtime-tools@0.5.1': dependencies: '@module-federation/runtime': 0.5.1 @@ -9330,6 +10014,16 @@ snapshots: type-fest: 4.30.0 webpack-dev-server: 5.1.0(webpack@5.97.1(@swc/core@1.10.1(@swc/helpers@0.5.15))) + '@polka/url@1.0.0-next.28': {} + + '@rollup/pluginutils@5.1.3(rollup@4.28.1)': + dependencies: + '@types/estree': 1.0.6 + estree-walker: 2.0.2 + picomatch: 4.0.2 + optionalDependencies: + rollup: 4.28.1 + '@rollup/rollup-android-arm-eabi@4.28.1': optional: true @@ -9419,6 +10113,18 @@ snapshots: - supports-color - typescript + '@rsbuild/plugin-type-check@1.1.0(@rsbuild/core@1.1.9)(@rspack/core@1.1.6(@swc/helpers@0.5.15))(typescript@5.5.4)': + dependencies: + deepmerge: 4.3.1 + json5: 2.2.3 + reduce-configs: 1.1.0 + ts-checker-rspack-plugin: 1.0.3(@rspack/core@1.1.6(@swc/helpers@0.5.15))(typescript@5.5.4) + optionalDependencies: + '@rsbuild/core': 1.1.9 + transitivePeerDependencies: + - '@rspack/core' + - typescript + '@rspack/binding-darwin-arm64@1.1.6': optional: true @@ -9496,10 +10202,312 @@ snapshots: ignore: 5.3.2 p-map: 4.0.0 + '@storybook/addon-a11y@8.4.5(storybook@8.4.5(prettier@3.4.2))': + dependencies: + '@storybook/addon-highlight': 8.4.5(storybook@8.4.5(prettier@3.4.2)) + axe-core: 4.10.2 + storybook: 8.4.5(prettier@3.4.2) + + '@storybook/addon-actions@8.4.5(storybook@8.4.5(prettier@3.4.2))': + dependencies: + '@storybook/global': 5.0.0 + '@types/uuid': 9.0.8 + dequal: 2.0.3 + polished: 4.3.1 + storybook: 8.4.5(prettier@3.4.2) + uuid: 9.0.1 + + '@storybook/addon-backgrounds@8.4.5(storybook@8.4.5(prettier@3.4.2))': + dependencies: + '@storybook/global': 5.0.0 + memoizerific: 1.11.3 + storybook: 8.4.5(prettier@3.4.2) + ts-dedent: 2.2.0 + + '@storybook/addon-controls@8.4.5(storybook@8.4.5(prettier@3.4.2))': + dependencies: + '@storybook/global': 5.0.0 + dequal: 2.0.3 + storybook: 8.4.5(prettier@3.4.2) + ts-dedent: 2.2.0 + + '@storybook/addon-docs@8.4.5(@types/react@18.3.12)(storybook@8.4.5(prettier@3.4.2))': + dependencies: + '@mdx-js/react': 3.1.0(@types/react@18.3.12)(react@18.3.1) + '@storybook/blocks': 8.4.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(storybook@8.4.5(prettier@3.4.2)) + '@storybook/csf-plugin': 8.4.5(storybook@8.4.5(prettier@3.4.2)) + '@storybook/react-dom-shim': 8.4.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(storybook@8.4.5(prettier@3.4.2)) + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + storybook: 8.4.5(prettier@3.4.2) + ts-dedent: 2.2.0 + transitivePeerDependencies: + - '@types/react' + + '@storybook/addon-docs@8.4.7(@types/react@18.3.12)(storybook@8.4.5(prettier@3.4.2))': + dependencies: + '@mdx-js/react': 3.1.0(@types/react@18.3.12)(react@18.3.1) + '@storybook/blocks': 8.4.7(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(storybook@8.4.5(prettier@3.4.2)) + '@storybook/csf-plugin': 8.4.7(storybook@8.4.5(prettier@3.4.2)) + '@storybook/react-dom-shim': 8.4.7(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(storybook@8.4.5(prettier@3.4.2)) + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + storybook: 8.4.5(prettier@3.4.2) + ts-dedent: 2.2.0 + transitivePeerDependencies: + - '@types/react' + + '@storybook/addon-essentials@8.4.5(@types/react@18.3.12)(storybook@8.4.5(prettier@3.4.2))': + dependencies: + '@storybook/addon-actions': 8.4.5(storybook@8.4.5(prettier@3.4.2)) + '@storybook/addon-backgrounds': 8.4.5(storybook@8.4.5(prettier@3.4.2)) + '@storybook/addon-controls': 8.4.5(storybook@8.4.5(prettier@3.4.2)) + '@storybook/addon-docs': 8.4.5(@types/react@18.3.12)(storybook@8.4.5(prettier@3.4.2)) + '@storybook/addon-highlight': 8.4.5(storybook@8.4.5(prettier@3.4.2)) + '@storybook/addon-measure': 8.4.5(storybook@8.4.5(prettier@3.4.2)) + '@storybook/addon-outline': 8.4.5(storybook@8.4.5(prettier@3.4.2)) + '@storybook/addon-toolbars': 8.4.5(storybook@8.4.5(prettier@3.4.2)) + '@storybook/addon-viewport': 8.4.5(storybook@8.4.5(prettier@3.4.2)) + storybook: 8.4.5(prettier@3.4.2) + ts-dedent: 2.2.0 + transitivePeerDependencies: + - '@types/react' + + '@storybook/addon-highlight@8.4.5(storybook@8.4.5(prettier@3.4.2))': + dependencies: + '@storybook/global': 5.0.0 + storybook: 8.4.5(prettier@3.4.2) + + '@storybook/addon-interactions@8.4.5(storybook@8.4.5(prettier@3.4.2))': + dependencies: + '@storybook/global': 5.0.0 + '@storybook/instrumenter': 8.4.5(storybook@8.4.5(prettier@3.4.2)) + '@storybook/test': 8.4.5(storybook@8.4.5(prettier@3.4.2)) + polished: 4.3.1 + storybook: 8.4.5(prettier@3.4.2) + ts-dedent: 2.2.0 + + '@storybook/addon-links@8.4.5(react@18.3.1)(storybook@8.4.5(prettier@3.4.2))': + dependencies: + '@storybook/csf': 0.1.12 + '@storybook/global': 5.0.0 + storybook: 8.4.5(prettier@3.4.2) + ts-dedent: 2.2.0 + optionalDependencies: + react: 18.3.1 + + '@storybook/addon-measure@8.4.5(storybook@8.4.5(prettier@3.4.2))': + dependencies: + '@storybook/global': 5.0.0 + storybook: 8.4.5(prettier@3.4.2) + tiny-invariant: 1.3.3 + + '@storybook/addon-outline@8.4.5(storybook@8.4.5(prettier@3.4.2))': + dependencies: + '@storybook/global': 5.0.0 + storybook: 8.4.5(prettier@3.4.2) + ts-dedent: 2.2.0 + + '@storybook/addon-toolbars@8.4.5(storybook@8.4.5(prettier@3.4.2))': + dependencies: + storybook: 8.4.5(prettier@3.4.2) + + '@storybook/addon-viewport@8.4.5(storybook@8.4.5(prettier@3.4.2))': + dependencies: + memoizerific: 1.11.3 + storybook: 8.4.5(prettier@3.4.2) + + '@storybook/blocks@8.4.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(storybook@8.4.5(prettier@3.4.2))': + dependencies: + '@storybook/csf': 0.1.12 + '@storybook/icons': 1.3.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + storybook: 8.4.5(prettier@3.4.2) + ts-dedent: 2.2.0 + optionalDependencies: + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + + '@storybook/blocks@8.4.7(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(storybook@8.4.5(prettier@3.4.2))': + dependencies: + '@storybook/csf': 0.1.12 + '@storybook/icons': 1.3.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + storybook: 8.4.5(prettier@3.4.2) + ts-dedent: 2.2.0 + optionalDependencies: + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + + '@storybook/components@8.4.5(storybook@8.4.5(prettier@3.4.2))': + dependencies: + storybook: 8.4.5(prettier@3.4.2) + + '@storybook/components@8.4.7(storybook@8.4.5(prettier@3.4.2))': + dependencies: + storybook: 8.4.5(prettier@3.4.2) + + '@storybook/core-webpack@8.4.7(storybook@8.4.5(prettier@3.4.2))': + dependencies: + '@types/node': 22.10.1 + storybook: 8.4.5(prettier@3.4.2) + ts-dedent: 2.2.0 + + '@storybook/core@8.4.5(prettier@3.4.2)': + dependencies: + '@storybook/csf': 0.1.12 + better-opn: 3.0.2 + browser-assert: 1.2.1 + esbuild: 0.24.0 + esbuild-register: 3.6.0(esbuild@0.24.0) + jsdoc-type-pratt-parser: 4.1.0 + process: 0.11.10 + recast: 0.23.9 + semver: 7.6.3 + util: 0.12.5 + ws: 8.18.0 + optionalDependencies: + prettier: 3.4.2 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + + '@storybook/csf-plugin@8.4.5(storybook@8.4.5(prettier@3.4.2))': + dependencies: + storybook: 8.4.5(prettier@3.4.2) + unplugin: 1.16.0 + + '@storybook/csf-plugin@8.4.7(storybook@8.4.5(prettier@3.4.2))': + dependencies: + storybook: 8.4.5(prettier@3.4.2) + unplugin: 1.16.0 + '@storybook/csf@0.1.12': dependencies: type-fest: 2.19.0 + '@storybook/global@5.0.0': {} + + '@storybook/icons@1.3.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + dependencies: + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + + '@storybook/instrumenter@8.4.5(storybook@8.4.5(prettier@3.4.2))': + dependencies: + '@storybook/global': 5.0.0 + '@vitest/utils': 2.1.8 + storybook: 8.4.5(prettier@3.4.2) + + '@storybook/manager-api@8.4.5(storybook@8.4.5(prettier@3.4.2))': + dependencies: + storybook: 8.4.5(prettier@3.4.2) + + '@storybook/manager-api@8.4.7(storybook@8.4.5(prettier@3.4.2))': + dependencies: + storybook: 8.4.5(prettier@3.4.2) + + '@storybook/preview-api@8.4.5(storybook@8.4.5(prettier@3.4.2))': + dependencies: + storybook: 8.4.5(prettier@3.4.2) + + '@storybook/preview-api@8.4.7(storybook@8.4.5(prettier@3.4.2))': + dependencies: + storybook: 8.4.5(prettier@3.4.2) + + '@storybook/react-docgen-typescript-plugin@1.0.1(typescript@5.5.4)(webpack@5.97.1(esbuild@0.24.0))': + dependencies: + debug: 4.4.0(supports-color@5.5.0) + endent: 2.1.0 + find-cache-dir: 3.3.2 + flat-cache: 3.2.0 + micromatch: 4.0.8 + react-docgen-typescript: 2.2.2(typescript@5.5.4) + tslib: 2.8.1 + typescript: 5.5.4 + webpack: 5.97.1(esbuild@0.24.0) + transitivePeerDependencies: + - supports-color + + '@storybook/react-dom-shim@8.4.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(storybook@8.4.5(prettier@3.4.2))': + dependencies: + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + storybook: 8.4.5(prettier@3.4.2) + + '@storybook/react-dom-shim@8.4.7(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(storybook@8.4.5(prettier@3.4.2))': + dependencies: + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + storybook: 8.4.5(prettier@3.4.2) + + '@storybook/react-dom-shim@8.4.7(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(storybook@8.4.5(prettier@3.4.2))': + dependencies: + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) + storybook: 8.4.5(prettier@3.4.2) + + '@storybook/react@8.4.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(storybook@8.4.5(prettier@3.4.2))(typescript@5.5.4)': + dependencies: + '@storybook/components': 8.4.5(storybook@8.4.5(prettier@3.4.2)) + '@storybook/global': 5.0.0 + '@storybook/manager-api': 8.4.5(storybook@8.4.5(prettier@3.4.2)) + '@storybook/preview-api': 8.4.5(storybook@8.4.5(prettier@3.4.2)) + '@storybook/react-dom-shim': 8.4.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(storybook@8.4.5(prettier@3.4.2)) + '@storybook/theming': 8.4.5(storybook@8.4.5(prettier@3.4.2)) + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + storybook: 8.4.5(prettier@3.4.2) + optionalDependencies: + typescript: 5.5.4 + + '@storybook/react@8.4.7(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(storybook@8.4.5(prettier@3.4.2))(typescript@5.5.4)': + dependencies: + '@storybook/components': 8.4.7(storybook@8.4.5(prettier@3.4.2)) + '@storybook/global': 5.0.0 + '@storybook/manager-api': 8.4.7(storybook@8.4.5(prettier@3.4.2)) + '@storybook/preview-api': 8.4.7(storybook@8.4.5(prettier@3.4.2)) + '@storybook/react-dom-shim': 8.4.7(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(storybook@8.4.5(prettier@3.4.2)) + '@storybook/theming': 8.4.7(storybook@8.4.5(prettier@3.4.2)) + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + storybook: 8.4.5(prettier@3.4.2) + optionalDependencies: + typescript: 5.5.4 + + '@storybook/react@8.4.7(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(storybook@8.4.5(prettier@3.4.2))(typescript@5.5.4)': + dependencies: + '@storybook/components': 8.4.7(storybook@8.4.5(prettier@3.4.2)) + '@storybook/global': 5.0.0 + '@storybook/manager-api': 8.4.7(storybook@8.4.5(prettier@3.4.2)) + '@storybook/preview-api': 8.4.7(storybook@8.4.5(prettier@3.4.2)) + '@storybook/react-dom-shim': 8.4.7(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(storybook@8.4.5(prettier@3.4.2)) + '@storybook/theming': 8.4.7(storybook@8.4.5(prettier@3.4.2)) + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) + storybook: 8.4.5(prettier@3.4.2) + optionalDependencies: + typescript: 5.5.4 + + '@storybook/test@8.4.5(storybook@8.4.5(prettier@3.4.2))': + dependencies: + '@storybook/csf': 0.1.12 + '@storybook/global': 5.0.0 + '@storybook/instrumenter': 8.4.5(storybook@8.4.5(prettier@3.4.2)) + '@testing-library/dom': 10.4.0 + '@testing-library/jest-dom': 6.5.0 + '@testing-library/user-event': 14.5.2(@testing-library/dom@10.4.0) + '@vitest/expect': 2.0.5 + '@vitest/spy': 2.0.5 + storybook: 8.4.5(prettier@3.4.2) + + '@storybook/theming@8.4.5(storybook@8.4.5(prettier@3.4.2))': + dependencies: + storybook: 8.4.5(prettier@3.4.2) + + '@storybook/theming@8.4.7(storybook@8.4.5(prettier@3.4.2))': + dependencies: + storybook: 8.4.5(prettier@3.4.2) + '@stylistic/eslint-plugin-ts@2.12.0(eslint@8.57.0)(typescript@5.7.2)': dependencies: '@typescript-eslint/utils': 8.18.0(eslint@8.57.0)(typescript@5.7.2) @@ -9678,6 +10686,16 @@ snapshots: lz-string: 1.5.0 pretty-format: 27.5.1 + '@testing-library/jest-dom@6.5.0': + dependencies: + '@adobe/css-tools': 4.4.1 + aria-query: 5.3.2 + chalk: 3.0.0 + css.escape: 1.5.1 + dom-accessibility-api: 0.6.3 + lodash: 4.17.21 + redent: 3.0.0 + '@testing-library/react@16.1.0(@testing-library/dom@10.4.0)(@types/react-dom@19.0.2(@types/react@19.0.1))(@types/react@19.0.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': dependencies: '@babel/runtime': 7.26.0 @@ -9688,6 +10706,10 @@ snapshots: '@types/react': 19.0.1 '@types/react-dom': 19.0.2(@types/react@19.0.1) + '@testing-library/user-event@14.5.2(@testing-library/dom@10.4.0)': + dependencies: + '@testing-library/dom': 10.4.0 + '@tootallnate/once@2.0.0': {} '@trysound/sax@0.2.0': {} @@ -9755,6 +10777,8 @@ snapshots: dependencies: '@types/ms': 0.7.34 + '@types/doctrine@0.0.9': {} + '@types/eslint-scope@3.7.7': dependencies: '@types/eslint': 8.56.10 @@ -9802,6 +10826,8 @@ snapshots: '@types/html-minifier-terser@6.1.0': {} + '@types/html-minifier-terser@7.0.2': {} + '@types/http-errors@2.0.4': {} '@types/http-proxy@1.17.15': @@ -9843,6 +10869,8 @@ snapshots: dependencies: '@types/unist': 3.0.3 + '@types/mdx@2.0.13': {} + '@types/mime@1.3.5': {} '@types/ms@0.7.34': {} @@ -9853,22 +10881,39 @@ snapshots: '@types/node@12.20.55': {} + '@types/node@18.19.68': + dependencies: + undici-types: 5.26.5 + '@types/node@22.10.1': dependencies: undici-types: 6.20.0 + '@types/prop-types@15.7.14': {} + '@types/qs@6.9.17': {} '@types/range-parser@1.2.7': {} + '@types/react-dom@18.3.1': + dependencies: + '@types/react': 19.0.1 + '@types/react-dom@19.0.2(@types/react@19.0.1)': dependencies: '@types/react': 19.0.1 + '@types/react@18.3.12': + dependencies: + '@types/prop-types': 15.7.14 + csstype: 3.1.3 + '@types/react@19.0.1': dependencies: csstype: 3.1.3 + '@types/resolve@1.20.6': {} + '@types/retry@0.12.2': {} '@types/send@0.17.4': @@ -9902,6 +10947,8 @@ snapshots: '@types/unist@3.0.3': {} + '@types/uuid@9.0.8': {} + '@types/ws@8.5.13': dependencies: '@types/node': 22.10.1 @@ -10017,6 +11064,38 @@ snapshots: '@ungap/structured-clone@1.2.0': {} + '@vitest/expect@2.0.5': + dependencies: + '@vitest/spy': 2.0.5 + '@vitest/utils': 2.0.5 + chai: 5.1.2 + tinyrainbow: 1.2.0 + + '@vitest/pretty-format@2.0.5': + dependencies: + tinyrainbow: 1.2.0 + + '@vitest/pretty-format@2.1.8': + dependencies: + tinyrainbow: 1.2.0 + + '@vitest/spy@2.0.5': + dependencies: + tinyspy: 3.0.2 + + '@vitest/utils@2.0.5': + dependencies: + '@vitest/pretty-format': 2.0.5 + estree-walker: 3.0.3 + loupe: 3.1.2 + tinyrainbow: 1.2.0 + + '@vitest/utils@2.1.8': + dependencies: + '@vitest/pretty-format': 2.1.8 + loupe: 3.1.2 + tinyrainbow: 1.2.0 + '@webassemblyjs/ast@1.14.1': dependencies: '@webassemblyjs/helper-numbers': 1.13.2 @@ -10294,8 +11373,14 @@ snapshots: is-array-buffer: 3.0.4 is-shared-array-buffer: 1.0.3 + assertion-error@2.0.1: {} + ast-types-flow@0.0.8: {} + ast-types@0.16.1: + dependencies: + tslib: 2.8.1 + astral-regex@2.0.0: {} async@2.6.4: @@ -10415,6 +11500,10 @@ snapshots: before-after-hook@2.2.3: {} + better-opn@3.0.2: + dependencies: + open: 8.4.2 + better-path-resolve@1.0.0: dependencies: is-windows: 1.0.2 @@ -10460,6 +11549,8 @@ snapshots: dependencies: fill-range: 7.1.1 + browser-assert@1.2.1: {} + browserslist@4.24.2: dependencies: caniuse-lite: 1.0.30001687 @@ -10513,12 +11604,27 @@ snapshots: caniuse-lite@1.0.30001687: {} + case-sensitive-paths-webpack-plugin@2.4.0: {} + ccount@2.0.1: {} + chai@5.1.2: + dependencies: + assertion-error: 2.0.1 + check-error: 2.1.1 + deep-eql: 5.0.2 + loupe: 3.1.2 + pathval: 2.0.0 + chalk-template@1.1.0: dependencies: chalk: 5.3.0 + chalk@3.0.0: + dependencies: + ansi-styles: 4.3.0 + supports-color: 7.2.0 + chalk@4.1.2: dependencies: ansi-styles: 4.3.0 @@ -10544,6 +11650,8 @@ snapshots: chardet@0.7.0: {} + check-error@2.1.1: {} + chokidar@3.6.0: dependencies: anymatch: 3.1.3 @@ -10627,6 +11735,8 @@ snapshots: commander@8.3.0: {} + commondir@1.0.1: {} + compressible@2.0.18: dependencies: mime-db: 1.53.0 @@ -10658,6 +11768,8 @@ snapshots: consola@3.2.3: {} + constants-browserify@1.0.0: {} + content-disposition@0.5.4: dependencies: safe-buffer: 5.2.1 @@ -10811,6 +11923,8 @@ snapshots: css-what@6.1.0: {} + css.escape@1.5.1: {} + cssdb@8.2.3: {} cssesc@3.0.0: {} @@ -10879,8 +11993,12 @@ snapshots: decode-uri-component@0.4.1: {} + dedent@0.7.0: {} + dedent@1.5.3: {} + deep-eql@5.0.2: {} + deep-is@0.1.4: {} deepmerge@4.3.1: {} @@ -10903,6 +12021,8 @@ snapshots: es-errors: 1.3.0 gopd: 1.2.0 + define-lazy-prop@2.0.0: {} + define-lazy-prop@3.0.0: {} define-properties@1.2.1: @@ -10961,6 +12081,8 @@ snapshots: dom-accessibility-api@0.5.16: {} + dom-accessibility-api@0.6.3: {} + dom-converter@0.2.0: dependencies: utila: 0.4.0 @@ -11044,6 +12166,12 @@ snapshots: encodeurl@2.0.0: {} + endent@2.1.0: + dependencies: + dedent: 0.7.0 + fast-json-parse: 1.0.3 + objectorarray: 1.0.5 + enhanced-resolve@5.17.1: dependencies: graceful-fs: 4.2.11 @@ -11165,6 +12293,13 @@ snapshots: is-date-object: 1.0.5 is-symbol: 1.1.0 + esbuild-register@3.6.0(esbuild@0.24.0): + dependencies: + debug: 4.4.0(supports-color@5.5.0) + esbuild: 0.24.0 + transitivePeerDependencies: + - supports-color + esbuild@0.24.0: optionalDependencies: '@esbuild/aix-ppc64': 0.24.0 @@ -11492,6 +12627,12 @@ snapshots: '@types/estree-jsx': 1.0.5 '@types/unist': 3.0.3 + estree-walker@2.0.2: {} + + estree-walker@3.0.3: + dependencies: + '@types/estree': 1.0.6 + esutils@2.0.3: {} etag@1.8.1: {} @@ -11584,6 +12725,8 @@ snapshots: merge2: 1.4.1 micromatch: 4.0.8 + fast-json-parse@1.0.3: {} + fast-json-stable-stringify@2.1.0: {} fast-levenshtein@2.0.6: {} @@ -11634,6 +12777,12 @@ snapshots: transitivePeerDependencies: - supports-color + find-cache-dir@3.3.2: + dependencies: + commondir: 1.0.1 + make-dir: 3.1.0 + pkg-dir: 4.2.0 + find-up@4.1.0: dependencies: locate-path: 5.0.0 @@ -11682,6 +12831,12 @@ snapshots: fresh@0.5.2: {} + fs-extra@11.2.0: + dependencies: + graceful-fs: 4.2.11 + jsonfile: 6.1.0 + universalify: 2.0.1 + fs-extra@7.0.1: dependencies: graceful-fs: 4.2.11 @@ -11879,6 +13034,16 @@ snapshots: relateurl: 0.2.7 terser: 5.37.0 + html-minifier-terser@7.2.0: + dependencies: + camel-case: 4.1.2 + clean-css: 5.3.3 + commander: 10.0.1 + entities: 4.5.0 + param-case: 3.0.4 + relateurl: 0.2.7 + terser: 5.37.0 + html-tags@3.3.1: {} html-webpack-plugin@5.6.3(@rspack/core@1.1.6(@swc/helpers@0.5.15))(webpack@5.97.1(@swc/core@1.10.1(@swc/helpers@0.5.15))): @@ -12055,6 +13220,11 @@ snapshots: is-alphabetical: 2.0.1 is-decimal: 2.0.1 + is-arguments@1.1.1: + dependencies: + call-bind: 1.0.8 + has-tostringtag: 1.0.2 + is-array-buffer@3.0.4: dependencies: call-bind: 1.0.8 @@ -12097,6 +13267,8 @@ snapshots: is-decimal@2.0.1: {} + is-docker@2.2.1: {} + is-docker@3.0.0: {} is-empty@1.2.0: {} @@ -12209,6 +13381,10 @@ snapshots: is-windows@1.0.2: {} + is-wsl@2.2.0: + dependencies: + is-docker: 2.2.1 + is-wsl@3.1.0: dependencies: is-inside-container: 1.0.0 @@ -12689,6 +13865,8 @@ snapshots: dependencies: argparse: 2.0.1 + jsdoc-type-pratt-parser@4.1.0: {} + jsdom@20.0.3: dependencies: abab: 2.0.6 @@ -12755,6 +13933,12 @@ snapshots: optionalDependencies: graceful-fs: 4.2.11 + jsonfile@6.1.0: + dependencies: + universalify: 2.0.1 + optionalDependencies: + graceful-fs: 4.2.11 + jsx-ast-utils@3.3.5: dependencies: array-includes: 3.1.8 @@ -12867,6 +14051,8 @@ snapshots: dependencies: js-tokens: 4.0.0 + loupe@3.1.2: {} + lower-case@2.0.2: dependencies: tslib: 2.8.1 @@ -12879,6 +14065,14 @@ snapshots: lz-string@1.5.0: {} + magic-string@0.30.15: + dependencies: + '@jridgewell/sourcemap-codec': 1.5.0 + + make-dir@3.1.0: + dependencies: + semver: 6.3.1 + make-dir@4.0.0: dependencies: semver: 7.6.3 @@ -12889,6 +14083,8 @@ snapshots: dependencies: tmpl: 1.0.5 + map-or-similar@1.5.0: {} + mathml-tag-names@2.1.3: {} mdast-util-from-markdown@0.8.5: @@ -13005,6 +14201,10 @@ snapshots: tree-dump: 1.0.2(tslib@2.8.1) tslib: 2.8.1 + memoizerific@1.11.3: + dependencies: + map-or-similar: 1.5.0 + meow@13.2.0: {} merge-descriptors@1.0.3: {} @@ -13247,6 +14447,8 @@ snapshots: mimic-fn@2.1.0: {} + min-indent@1.0.1: {} + mini-css-extract-plugin@2.9.2(webpack@5.97.1(@swc/core@1.10.1(@swc/helpers@0.5.15))): dependencies: schema-utils: 4.2.0 @@ -13280,6 +14482,8 @@ snapshots: mri@1.2.0: {} + mrmime@2.0.0: {} + ms@2.0.0: {} ms@2.1.3: {} @@ -13442,6 +14646,8 @@ snapshots: define-properties: 1.2.1 es-object-atoms: 1.0.0 + objectorarray@1.0.5: {} + obuf@1.1.2: {} on-finished@2.4.1: @@ -13465,6 +14671,12 @@ snapshots: is-inside-container: 1.0.0 is-wsl: 3.1.0 + open@8.4.2: + dependencies: + define-lazy-prop: 2.0.0 + is-docker: 2.2.1 + is-wsl: 2.2.0 + opener@1.5.2: {} optionator@0.9.3: @@ -13593,6 +14805,8 @@ snapshots: no-case: 3.0.4 tslib: 2.8.1 + path-browserify@1.0.1: {} + path-exists@4.0.0: {} path-is-absolute@1.0.1: {} @@ -13616,6 +14830,8 @@ snapshots: pathe@1.1.2: {} + pathval@2.0.0: {} + picocolors@1.1.1: {} picomatch@2.3.1: {} @@ -13646,6 +14862,10 @@ snapshots: mlly: 1.7.3 pathe: 1.1.2 + polished@4.3.1: + dependencies: + '@babel/runtime': 7.26.0 + portfinder@1.0.32: dependencies: async: 2.6.4 @@ -13963,6 +15183,8 @@ snapshots: process-nextick-args@2.0.1: {} + process@0.11.10: {} + promise-inflight@1.0.1: {} promise-retry@2.0.1: @@ -13992,6 +15214,8 @@ snapshots: pstree.remy@1.1.8: {} + punycode@1.4.1: {} + punycode@2.3.1: {} pure-rand@6.1.0: {} @@ -14038,6 +15262,31 @@ snapshots: iconv-lite: 0.4.24 unpipe: 1.0.0 + react-docgen-typescript@2.2.2(typescript@5.5.4): + dependencies: + typescript: 5.5.4 + + react-docgen@7.1.0: + dependencies: + '@babel/core': 7.26.0 + '@babel/traverse': 7.26.4 + '@babel/types': 7.26.3 + '@types/babel__core': 7.20.5 + '@types/babel__traverse': 7.20.6 + '@types/doctrine': 0.0.9 + '@types/resolve': 1.20.6 + doctrine: 3.0.0 + resolve: 1.22.8 + strip-indent: 4.0.0 + transitivePeerDependencies: + - supports-color + + react-dom@18.3.1(react@18.3.1): + dependencies: + loose-envify: 1.4.0 + react: 18.3.1 + scheduler: 0.23.2 + react-dom@19.0.0(react@19.0.0): dependencies: react: 19.0.0 @@ -14061,6 +15310,10 @@ snapshots: optionalDependencies: react-dom: 19.0.0(react@19.0.0) + react@18.3.1: + dependencies: + loose-envify: 1.4.0 + react@19.0.0: {} read-package-json-fast@3.0.2: @@ -14102,10 +15355,25 @@ snapshots: readdirp@4.0.2: {} + recast@0.23.9: + dependencies: + ast-types: 0.16.1 + esprima: 4.0.1 + source-map: 0.6.1 + tiny-invariant: 1.3.3 + tslib: 2.8.1 + rechoir@0.8.0: dependencies: resolve: 1.22.8 + redent@3.0.0: + dependencies: + indent-string: 4.0.0 + strip-indent: 3.0.0 + + reduce-configs@1.1.0: {} + reflect.getprototypeof@1.0.8: dependencies: call-bind: 1.0.8 @@ -14253,6 +15521,13 @@ snapshots: '@rollup/rollup-win32-x64-msvc': 4.28.1 fsevents: 2.3.3 + rsbuild-plugin-html-minifier-terser@1.1.1(@rsbuild/core@1.1.9): + dependencies: + '@types/html-minifier-terser': 7.0.2 + html-minifier-terser: 7.2.0 + optionalDependencies: + '@rsbuild/core': 1.1.9 + run-applescript@7.0.0: {} run-parallel@1.2.0: @@ -14286,6 +15561,10 @@ snapshots: dependencies: xmlchars: 2.2.0 + scheduler@0.23.2: + dependencies: + loose-envify: 1.4.0 + scheduler@0.25.0: {} schema-utils@3.3.0: @@ -14406,6 +15685,12 @@ snapshots: dependencies: semver: 7.6.3 + sirv@2.0.4: + dependencies: + '@polka/url': 1.0.0-next.28 + mrmime: 2.0.0 + totalist: 3.0.1 + sisteransi@1.0.5: {} slash@3.0.0: {} @@ -14520,6 +15805,70 @@ snapshots: stdin-discarder@0.2.2: {} + storybook-builder-rsbuild@0.1.5(@rsbuild/core@1.1.9)(@rspack/core@1.1.6(@swc/helpers@0.5.15))(@types/react@18.3.12)(storybook@8.4.5(prettier@3.4.2))(typescript@5.5.4): + dependencies: + '@rsbuild/core': 1.1.9 + '@rsbuild/plugin-type-check': 1.1.0(@rsbuild/core@1.1.9)(@rspack/core@1.1.6(@swc/helpers@0.5.15))(typescript@5.5.4) + '@storybook/addon-docs': 8.4.7(@types/react@18.3.12)(storybook@8.4.5(prettier@3.4.2)) + '@storybook/core-webpack': 8.4.7(storybook@8.4.5(prettier@3.4.2)) + browser-assert: 1.2.1 + case-sensitive-paths-webpack-plugin: 2.4.0 + cjs-module-lexer: 1.4.1 + constants-browserify: 1.0.0 + es-module-lexer: 1.5.4 + fs-extra: 11.2.0 + magic-string: 0.30.15 + path-browserify: 1.0.1 + process: 0.11.10 + rsbuild-plugin-html-minifier-terser: 1.1.1(@rsbuild/core@1.1.9) + sirv: 2.0.4 + storybook: 8.4.5(prettier@3.4.2) + ts-dedent: 2.2.0 + url: 0.11.4 + util: 0.12.5 + util-deprecate: 1.0.2 + optionalDependencies: + typescript: 5.5.4 + transitivePeerDependencies: + - '@rspack/core' + - '@types/react' + + storybook-react-rsbuild@0.1.5(@rsbuild/core@1.1.9)(@rspack/core@1.1.6(@swc/helpers@0.5.15))(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(rollup@4.28.1)(storybook@8.4.5(prettier@3.4.2))(typescript@5.5.4)(webpack@5.97.1(esbuild@0.24.0)): + dependencies: + '@rollup/pluginutils': 5.1.3(rollup@4.28.1) + '@rsbuild/core': 1.1.9 + '@storybook/react': 8.4.7(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(storybook@8.4.5(prettier@3.4.2))(typescript@5.5.4) + '@storybook/react-docgen-typescript-plugin': 1.0.1(typescript@5.5.4)(webpack@5.97.1(esbuild@0.24.0)) + '@types/node': 18.19.68 + find-up: 5.0.0 + magic-string: 0.30.15 + react: 18.3.1 + react-docgen: 7.1.0 + react-dom: 18.3.1(react@18.3.1) + resolve: 1.22.8 + storybook: 8.4.5(prettier@3.4.2) + storybook-builder-rsbuild: 0.1.5(@rsbuild/core@1.1.9)(@rspack/core@1.1.6(@swc/helpers@0.5.15))(@types/react@18.3.12)(storybook@8.4.5(prettier@3.4.2))(typescript@5.5.4) + tsconfig-paths: 4.2.0 + optionalDependencies: + typescript: 5.5.4 + transitivePeerDependencies: + - '@rspack/core' + - '@storybook/test' + - '@types/react' + - rollup + - supports-color + - webpack + + storybook@8.4.5(prettier@3.4.2): + dependencies: + '@storybook/core': 8.4.5(prettier@3.4.2) + optionalDependencies: + prettier: 3.4.2 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + strict-event-emitter@0.5.1: {} string-argv@0.3.2: {} @@ -14625,6 +15974,14 @@ snapshots: strip-final-newline@2.0.0: {} + strip-indent@3.0.0: + dependencies: + min-indent: 1.0.1 + + strip-indent@4.0.0: + dependencies: + min-indent: 1.0.1 + strip-json-comments@3.1.1: {} strip-json-comments@5.0.1: {} @@ -14809,6 +16166,17 @@ snapshots: optionalDependencies: '@swc/core': 1.10.1(@swc/helpers@0.5.15) + terser-webpack-plugin@5.3.10(esbuild@0.24.0)(webpack@5.97.1(esbuild@0.24.0)): + dependencies: + '@jridgewell/trace-mapping': 0.3.25 + jest-worker: 27.5.1 + schema-utils: 3.3.0 + serialize-javascript: 6.0.2 + terser: 5.37.0 + webpack: 5.97.1(esbuild@0.24.0) + optionalDependencies: + esbuild: 0.24.0 + terser@5.37.0: dependencies: '@jridgewell/source-map': 0.3.6 @@ -14840,6 +16208,8 @@ snapshots: tightrope@0.2.0: {} + tiny-invariant@1.3.3: {} + tinyexec@0.3.1: {} tinyglobby@0.2.10: @@ -14847,6 +16217,10 @@ snapshots: fdir: 6.4.2(picomatch@4.0.2) picomatch: 4.0.2 + tinyrainbow@1.2.0: {} + + tinyspy@3.0.2: {} + tmp@0.0.33: dependencies: os-tmpdir: 1.0.2 @@ -14859,6 +16233,8 @@ snapshots: toidentifier@1.0.1: {} + totalist@3.0.1: {} + touch@3.1.1: {} tough-cookie@4.1.4: @@ -14894,6 +16270,18 @@ snapshots: dependencies: typescript: 5.7.2 + ts-checker-rspack-plugin@1.0.3(@rspack/core@1.1.6(@swc/helpers@0.5.15))(typescript@5.5.4): + dependencies: + '@babel/code-frame': 7.26.2 + '@rspack/lite-tapable': 1.0.1 + chokidar: 3.6.0 + memfs: 4.15.0 + minimatch: 9.0.5 + picocolors: 1.1.1 + typescript: 5.5.4 + optionalDependencies: + '@rspack/core': 1.1.6(@swc/helpers@0.5.15) + ts-dedent@2.2.0: {} ts-interface-checker@0.1.13: {} @@ -14947,9 +16335,15 @@ snapshots: minimist: 1.2.8 strip-bom: 3.0.0 + tsconfig-paths@4.2.0: + dependencies: + json5: 2.2.3 + minimist: 1.2.8 + strip-bom: 3.0.0 + tslib@2.8.1: {} - tsup@8.3.5(@swc/core@1.10.1)(jiti@2.4.1)(postcss@8.4.49)(typescript@5.5.4)(yaml@2.6.1): + tsup@8.3.5(@swc/core@1.10.1(@swc/helpers@0.5.15))(jiti@2.4.1)(postcss@8.4.49)(typescript@5.7.2)(yaml@2.6.1): dependencies: bundle-require: 5.0.0(esbuild@0.24.0) cac: 6.7.14 @@ -14970,14 +16364,14 @@ snapshots: optionalDependencies: '@swc/core': 1.10.1(@swc/helpers@0.5.15) postcss: 8.4.49 - typescript: 5.5.4 + typescript: 5.7.2 transitivePeerDependencies: - jiti - supports-color - tsx - yaml - tsup@8.3.5(@swc/core@1.10.1)(jiti@2.4.1)(postcss@8.4.49)(typescript@5.7.2)(yaml@2.6.1): + tsup@8.3.5(@swc/core@1.10.1)(jiti@2.4.1)(postcss@8.4.49)(typescript@5.5.4)(yaml@2.6.1): dependencies: bundle-require: 5.0.0(esbuild@0.24.0) cac: 6.7.14 @@ -14998,7 +16392,7 @@ snapshots: optionalDependencies: '@swc/core': 1.10.1(@swc/helpers@0.5.15) postcss: 8.4.49 - typescript: 5.7.2 + typescript: 5.5.4 transitivePeerDependencies: - jiti - supports-color @@ -15107,6 +16501,8 @@ snapshots: undefsafe@2.0.5: {} + undici-types@5.26.5: {} + undici-types@6.20.0: {} undici@6.21.0: {} @@ -15202,8 +16598,15 @@ snapshots: universalify@0.2.0: {} + universalify@2.0.1: {} + unpipe@1.0.0: {} + unplugin@1.16.0: + dependencies: + acorn: 8.14.0 + webpack-virtual-modules: 0.6.2 + update-browserslist-db@1.1.1(browserslist@4.24.2): dependencies: browserslist: 4.24.2 @@ -15223,14 +16626,29 @@ snapshots: querystringify: 2.2.0 requires-port: 1.0.0 + url@0.11.4: + dependencies: + punycode: 1.4.1 + qs: 6.13.1 + util-deprecate@1.0.2: {} + util@0.12.5: + dependencies: + inherits: 2.0.4 + is-arguments: 1.1.1 + is-generator-function: 1.0.10 + is-typed-array: 1.1.13 + which-typed-array: 1.1.16 + utila@0.4.0: {} utils-merge@1.0.1: {} uuid@8.3.2: {} + uuid@9.0.1: {} + uvu@0.5.6: dependencies: dequal: 2.0.3 @@ -15444,6 +16862,8 @@ snapshots: webpack-sources@3.2.3: {} + webpack-virtual-modules@0.6.2: {} + webpack@5.97.1(@swc/core@1.10.1(@swc/helpers@0.5.15)): dependencies: '@types/eslint-scope': 3.7.7 @@ -15506,6 +16926,36 @@ snapshots: - esbuild - uglify-js + webpack@5.97.1(esbuild@0.24.0): + dependencies: + '@types/eslint-scope': 3.7.7 + '@types/estree': 1.0.6 + '@webassemblyjs/ast': 1.14.1 + '@webassemblyjs/wasm-edit': 1.14.1 + '@webassemblyjs/wasm-parser': 1.14.1 + acorn: 8.14.0 + browserslist: 4.24.2 + chrome-trace-event: 1.0.4 + enhanced-resolve: 5.17.1 + es-module-lexer: 1.5.4 + eslint-scope: 5.1.1 + events: 3.3.0 + glob-to-regexp: 0.4.1 + graceful-fs: 4.2.11 + json-parse-even-better-errors: 2.3.1 + loader-runner: 4.3.0 + mime-types: 2.1.35 + neo-async: 2.6.2 + schema-utils: 3.3.0 + tapable: 2.2.1 + terser-webpack-plugin: 5.3.10(esbuild@0.24.0)(webpack@5.97.1(esbuild@0.24.0)) + watchpack: 2.4.2 + webpack-sources: 3.2.3 + transitivePeerDependencies: + - '@swc/core' + - esbuild + - uglify-js + websocket-driver@0.7.4: dependencies: http-parser-js: 0.5.8 diff --git a/samples/rsbuild/app/package.json b/samples/rsbuild/app/package.json index d01d4e16..2f24ef82 100644 --- a/samples/rsbuild/app/package.json +++ b/samples/rsbuild/app/package.json @@ -36,10 +36,10 @@ "@typescript-eslint/parser": "8.18.0", "@workleap/browserslist-config": "workspace:*", "@workleap/eslint-plugin": "workspace:*", + "@workleap/rsbuild-configs": "workspace:*", "@workleap/stylelint-configs": "workspace:*", "@workleap/swc-configs": "workspace:*", "@workleap/typescript-configs": "workspace:*", - "@workleap/rsbuild-configs": "workspace:*", "browserslist": "4.24.2", "cross-env": "7.0.3", "eslint": "8.57.0", diff --git a/samples/rsbuild/components/package.json b/samples/rsbuild/components/package.json index ea9c7e3c..e54c33a8 100644 --- a/samples/rsbuild/components/package.json +++ b/samples/rsbuild/components/package.json @@ -20,6 +20,7 @@ "react-dom": "*" }, "devDependencies": { + "@storybook/react": "8.4.7", "@swc/core": "1.10.1", "@swc/jest": "0.2.37", "@testing-library/react": "16.1.0", diff --git a/samples/rsbuild/components/src/Button.stories.tsx b/samples/rsbuild/components/src/Button.stories.tsx new file mode 100644 index 00000000..3a24d900 --- /dev/null +++ b/samples/rsbuild/components/src/Button.stories.tsx @@ -0,0 +1,16 @@ +import type { Meta, StoryObj } from "@storybook/react"; +import { Button } from "./Button.tsx"; + +const meta: Meta = { + component: Button +}; + +export default meta; + +type Story = StoryObj; + +export const Default: Story = { + args: { + children: "Click me!" + } +}; diff --git a/samples/storybook/.browserslistrc b/samples/storybook/.browserslistrc new file mode 100644 index 00000000..ffa3bf6b --- /dev/null +++ b/samples/storybook/.browserslistrc @@ -0,0 +1 @@ +extends @workleap/browserslist-config \ No newline at end of file diff --git a/samples/storybook/.eslintignore b/samples/storybook/.eslintignore new file mode 100644 index 00000000..42d440b0 --- /dev/null +++ b/samples/storybook/.eslintignore @@ -0,0 +1,3 @@ +node_modules +storybook-static +!.storybook diff --git a/samples/storybook/.eslintrc.json b/samples/storybook/.eslintrc.json new file mode 100644 index 00000000..ab20e504 --- /dev/null +++ b/samples/storybook/.eslintrc.json @@ -0,0 +1,5 @@ +{ + "$schema": "https://json.schemastore.org/eslintrc", + "root": true, + "extends": "plugin:@workleap/web-application" +} diff --git a/samples/storybook/.storybook/main.ts b/samples/storybook/.storybook/main.ts new file mode 100644 index 00000000..c6c0347c --- /dev/null +++ b/samples/storybook/.storybook/main.ts @@ -0,0 +1,22 @@ +// They are installed in this nested project, but not at the root of the workspace. +/* eslint-disable storybook/no-uninstalled-addons */ + +import type { StorybookConfig } from "storybook-react-rsbuild"; + +const storybookConfig: StorybookConfig = { + framework: "storybook-react-rsbuild", + addons: [ + "@storybook/addon-links", + "@storybook/addon-essentials", + "@storybook/addon-interactions", + "@storybook/addon-a11y" + ], + stories: [ + "../../rsbuild/components/src/**/*.stories.(tsx|mdx)" + ], + docs: { + autodocs: false + } +}; + +export default storybookConfig; diff --git a/samples/storybook/.storybook/preview.tsx b/samples/storybook/.storybook/preview.tsx new file mode 100644 index 00000000..4786cd60 --- /dev/null +++ b/samples/storybook/.storybook/preview.tsx @@ -0,0 +1,5 @@ +import type { Preview } from "@storybook/react"; + +const preview: Preview = {}; + +export default preview; diff --git a/samples/storybook/package.json b/samples/storybook/package.json new file mode 100644 index 00000000..959a19ee --- /dev/null +++ b/samples/storybook/package.json @@ -0,0 +1,38 @@ +{ + "name": "@storybook-sample/storybook", + "version": "0.0.0", + "private": true, + "type": "module", + "scripts": { + "dev": "storybook dev -p 6006", + "build": "storybook build", + "serve-build": "pnpm http-server storybook-static -p 8080 -P http://localhost:8080? -c-1", + "eslint": "eslint . --max-warnings=-0 --cache --cache-location node_modules/.cache/eslint", + "typecheck": "tsc" + }, + "dependencies": { + "react": "18.3.1", + "react-dom": "18.3.1" + }, + "devDependencies": { + "@rsbuild/core": "1.1.9", + "@rspack/core": "1.1.6", + "@storybook/addon-a11y": "8.4.5", + "@storybook/addon-essentials": "8.4.5", + "@storybook/addon-interactions": "8.4.5", + "@storybook/addon-links": "8.4.5", + "@storybook/react": "8.4.5", + "@types/react": "18.3.12", + "@types/react-dom": "18.3.1", + "@workleap/browserslist-config": "workspace:*", + "@workleap/eslint-plugin": "workspace:*", + "@workleap/rsbuild-configs": "workspace:*", + "@workleap/typescript-configs": "workspace:*", + "browserslist": "4.24.2", + "eslint": "8.57.0", + "http-server": "14.1.1", + "storybook": "8.4.5", + "storybook-react-rsbuild": "0.1.5", + "typescript": "5.5.4" + } +} diff --git a/samples/storybook/rsbuild.config.ts b/samples/storybook/rsbuild.config.ts new file mode 100644 index 00000000..ce709cc8 --- /dev/null +++ b/samples/storybook/rsbuild.config.ts @@ -0,0 +1,3 @@ +import { defineStorybookConfig } from "@workleap/rsbuild-configs"; + +export default defineStorybookConfig(); diff --git a/samples/storybook/tsconfig.json b/samples/storybook/tsconfig.json new file mode 100644 index 00000000..49e7a2a3 --- /dev/null +++ b/samples/storybook/tsconfig.json @@ -0,0 +1,22 @@ +{ + "extends": "@workleap/typescript-configs/web-application.json", + "compilerOptions": { + "incremental": true, + "tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json", + // "paths": { + // "@rslib-poc/components-lib": ["../../libs/components-lib/src/index.ts"], + // "@rslib-poc/ext-lib": ["../../libs/ext-lib/src/index.ts"], + // "@rslib-poc/ts-lib": ["../../libs/ts-lib/src/index.ts"], + // } + }, + // "include": [ + // "**/*", + // /** + // * Since we are using module augmentation in the packages, and we use tsconfig paths to resolve the packages + // * from this repo, we need to include the types folder in the packages to make sure the types are included + // * in the build. + // */ + // "../../libs/**/types" + // ], + "exclude": ["dist", "node_modules"] +} diff --git a/turbo.json b/turbo.json index 5f5e52aa..9f78d527 100644 --- a/turbo.json +++ b/turbo.json @@ -15,7 +15,7 @@ }, "build": { "dependsOn": ["^build"], - "outputs": ["dist/**"] + "outputs": ["dist/**", "storybook-static/**"] }, "serve-build": { "dependsOn": ["build"], From 55a6cacc50cce8dfcd8d3bbcf08c99411481bad4 Mon Sep 17 00:00:00 2001 From: patricklafrance Date: Wed, 11 Dec 2024 20:51:44 -0500 Subject: [PATCH 06/18] More stuff --- knip.ts | 72 +- package.json | 2 +- packages/eslint-plugin/package.json | 4 +- packages/postcss-configs/package.json | 2 +- packages/rsbuild-configs/package.json | 2 +- packages/stylelint-configs/package.json | 2 +- packages/webpack-configs/package.json | 2 +- pnpm-lock.yaml | 1031 +++++++++++------------ samples/rsbuild/app/package.json | 2 +- samples/storybook/package.json | 22 +- samples/webpack/app/package.json | 4 +- 11 files changed, 550 insertions(+), 595 deletions(-) diff --git a/knip.ts b/knip.ts index 47b8db6a..91589705 100644 --- a/knip.ts +++ b/knip.ts @@ -27,7 +27,8 @@ const ignoreBrowserslist: KnipTransformer = ({ ignoreDependencies, ...config }) ignoreDependencies: [ ...(ignoreDependencies as string[] ?? []), // Browserlist isn't supported by plugins. - "@workleap/browserslist-config" + "@workleap/browserslist-config", + "browserslist" ] }; }; @@ -75,32 +76,28 @@ const configureWebpack: KnipTransformer = ({ ignoreDependencies, ...config }) => }; }; -const configureTsup: KnipTransformer = config => { +const configureRsbuild: KnipTransformer = config => { return { ...config, - tsup: { - config: ["tsup.*.ts"] + rsbuild: { + config: ["rsbuild.*.ts"] } }; }; -const configurePackage: KnipTransformer = config => { +const configureTsup: KnipTransformer = config => { return { ...config, - eslint: true + tsup: { + config: ["tsup.*.ts"] + } }; }; -const configureWebpackSample: KnipTransformer = ({ entry, ...config }) => { +const configurePackage: KnipTransformer = config => { return { ...config, - entry: [ - ...(entry as string[] ?? []), - "src/index.ts", - "src/index.tsx" - ], - eslint: true, - stylelint: true + eslint: true }; }; @@ -142,6 +139,19 @@ const webpackConfig: KnipWorkspaceConfig = defineWorkspace({ configureTsup ]); +const configureWebpackSample: KnipTransformer = ({ entry, ...config }) => { + return { + ...config, + entry: [ + ...(entry as string[] ?? []), + "src/index.ts", + "src/index.tsx" + ], + eslint: true, + stylelint: true + }; +}; + const webpackSampleAppConfig = defineWorkspace({}, [ configureWebpackSample, ignoreBrowserslist, @@ -160,6 +170,35 @@ const webpackSampleTsupLibConfig = defineWorkspace({}, [ configureTsup ]); +const configureRsbuildSample: KnipTransformer = ({ entry, ...config }) => { + return { + ...config, + entry: [ + ...(entry as string[] ?? []), + "src/index.ts", + "src/index.tsx" + ], + eslint: true, + stylelint: true + }; +}; + +const rsbuildSampleAppConfig = defineWorkspace({}, [ + configureRsbuildSample, + ignoreBrowserslist, + configureRsbuild, + configureMsw +]); + +const rsbuildSampleComponentsConfig = defineWorkspace({}, [ + configureRsbuildSample, + configureTsup +]); + +const storybookSample = defineWorkspace({}, [ + ignoreBrowserslist +]); + const config: KnipConfig = { workspaces: { ".": rootConfig, @@ -168,7 +207,10 @@ const config: KnipConfig = { "packages/webpack-configs": webpackConfig, "samples/webpack/app": webpackSampleAppConfig, "samples/webpack/components": webpackSampleComponentsConfig, - "samples/webpack/tsup-lib": webpackSampleTsupLibConfig + "samples/webpack/tsup-lib": webpackSampleTsupLibConfig, + "samples/rsbuild/app": rsbuildSampleAppConfig, + "samples/rsbuild/components": rsbuildSampleComponentsConfig, + "samples/storybook": storybookSample }, ignoreWorkspaces: [ // Until it's migrated to ESLint 9. diff --git a/package.json b/package.json index 486e4dfb..20a09d6e 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "@workleap/eslint-plugin": "workspace:*", "@workleap/typescript-configs": "workspace:*", "eslint": "8.57.0", - "knip": "5.39.2", + "knip": "5.39.4", "pkg-pr-new": "0.0.35", "prettier": "3.4.2", "retypeapp": "3.6.0", diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index cab56bd3..b18797a8 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -49,7 +49,7 @@ } }, "dependencies": { - "@stylistic/eslint-plugin-ts": "^2.12.0", + "@stylistic/eslint-plugin-ts": "^2.12.1", "@typescript-eslint/eslint-plugin": "^8.18.0", "eslint-plugin-import": "^2.31.0", "eslint-plugin-jest": "^28.9.0", @@ -71,7 +71,7 @@ "@types/eslint": "8.56.10", "@types/estree": "1.0.6", "@types/jest": "29.5.14", - "@types/node": "22.10.1", + "@types/node": "22.10.2", "@workleap/typescript-configs": "workspace:*", "eslint": "8.57.0", "jest": "29.7.0", diff --git a/packages/postcss-configs/package.json b/packages/postcss-configs/package.json index 9a021e37..77196583 100644 --- a/packages/postcss-configs/package.json +++ b/packages/postcss-configs/package.json @@ -43,7 +43,7 @@ "@swc/core": "1.10.1", "@swc/jest": "0.2.37", "@types/jest": "29.5.14", - "@types/node": "22.10.1", + "@types/node": "22.10.2", "@typescript-eslint/parser": "8.18.0", "@workleap/eslint-plugin": "workspace:*", "@workleap/swc-configs": "workspace:*", diff --git a/packages/rsbuild-configs/package.json b/packages/rsbuild-configs/package.json index 3ee4daa5..07286aae 100644 --- a/packages/rsbuild-configs/package.json +++ b/packages/rsbuild-configs/package.json @@ -47,7 +47,7 @@ "@swc/core": "1.10.1", "@swc/jest": "0.2.37", "@types/jest": "29.5.14", - "@types/node": "22.10.1", + "@types/node": "22.10.2", "@typescript-eslint/parser": "8.18.0", "@workleap/eslint-plugin": "workspace:*", "@workleap/swc-configs": "workspace:*", diff --git a/packages/stylelint-configs/package.json b/packages/stylelint-configs/package.json index 03506fad..292f4e9b 100644 --- a/packages/stylelint-configs/package.json +++ b/packages/stylelint-configs/package.json @@ -48,7 +48,7 @@ "stylelint-prettier": "^5.0.2" }, "devDependencies": { - "@types/node": "22.10.1", + "@types/node": "22.10.2", "@typescript-eslint/parser": "8.18.0", "@workleap/eslint-plugin": "workspace:*", "@workleap/tsup-configs": "workspace:*", diff --git a/packages/webpack-configs/package.json b/packages/webpack-configs/package.json index 9c22cd89..c09b7535 100644 --- a/packages/webpack-configs/package.json +++ b/packages/webpack-configs/package.json @@ -63,7 +63,7 @@ "@swc/helpers": "0.5.15", "@swc/jest": "0.2.37", "@types/jest": "29.5.14", - "@types/node": "22.10.1", + "@types/node": "22.10.2", "@typescript-eslint/parser": "8.18.0", "@workleap/eslint-plugin": "workspace:*", "@workleap/swc-configs": "workspace:*", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c8093188..eb45056e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -27,8 +27,8 @@ importers: specifier: 8.57.0 version: 8.57.0 knip: - specifier: 5.39.2 - version: 5.39.2(@types/node@22.10.1)(typescript@5.5.4) + specifier: 5.39.4 + version: 5.39.4(@types/node@22.10.2)(typescript@5.5.4) pkg-pr-new: specifier: 0.0.35 version: 0.0.35 @@ -67,13 +67,13 @@ importers: version: 8.57.0 tsup: specifier: 8.3.5 - version: 8.3.5(@swc/core@1.10.1(@swc/helpers@0.5.15))(jiti@2.4.1)(postcss@8.4.49)(typescript@5.7.2)(yaml@2.6.1) + version: 8.3.5(@swc/core@1.10.1)(jiti@2.4.1)(postcss@8.4.49)(typescript@5.7.2)(yaml@2.6.1) packages/eslint-plugin: dependencies: '@stylistic/eslint-plugin-ts': - specifier: ^2.12.0 - version: 2.12.0(eslint@8.57.0)(typescript@5.7.2) + specifier: ^2.12.1 + version: 2.12.1(eslint@8.57.0)(typescript@5.7.2) '@typescript-eslint/eslint-plugin': specifier: ^8.18.0 version: 8.18.0(@typescript-eslint/parser@8.18.0(eslint@8.57.0)(typescript@5.7.2))(eslint@8.57.0)(typescript@5.7.2) @@ -85,7 +85,7 @@ importers: version: 2.31.0(@typescript-eslint/parser@8.18.0(eslint@8.57.0)(typescript@5.7.2))(eslint@8.57.0) eslint-plugin-jest: specifier: ^28.9.0 - version: 28.9.0(@typescript-eslint/eslint-plugin@8.18.0(@typescript-eslint/parser@8.18.0(eslint@8.57.0)(typescript@5.7.2))(eslint@8.57.0)(typescript@5.7.2))(eslint@8.57.0)(jest@29.7.0(@types/node@22.10.1)(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.1)(typescript@5.7.2)))(typescript@5.7.2) + version: 28.9.0(@typescript-eslint/eslint-plugin@8.18.0(@typescript-eslint/parser@8.18.0(eslint@8.57.0)(typescript@5.7.2))(eslint@8.57.0)(typescript@5.7.2))(eslint@8.57.0)(jest@29.7.0(@types/node@22.10.2)(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.2)(typescript@5.7.2)))(typescript@5.7.2) eslint-plugin-jsx-a11y: specifier: ^6.10.2 version: 6.10.2(eslint@8.57.0) @@ -139,8 +139,8 @@ importers: specifier: 29.5.14 version: 29.5.14 '@types/node': - specifier: 22.10.1 - version: 22.10.1 + specifier: 22.10.2 + version: 22.10.2 '@workleap/typescript-configs': specifier: workspace:* version: link:../typescript-configs @@ -149,13 +149,13 @@ importers: version: 8.57.0 jest: specifier: 29.7.0 - version: 29.7.0(@types/node@22.10.1)(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.1)(typescript@5.7.2)) + version: 29.7.0(@types/node@22.10.2)(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.2)(typescript@5.7.2)) ts-node: specifier: 10.9.2 - version: 10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.1)(typescript@5.7.2) + version: 10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.2)(typescript@5.7.2) tsup: specifier: 8.3.5 - version: 8.3.5(@swc/core@1.10.1(@swc/helpers@0.5.15))(jiti@2.4.1)(postcss@8.4.49)(typescript@5.7.2)(yaml@2.6.1) + version: 8.3.5(@swc/core@1.10.1)(jiti@2.4.1)(postcss@8.4.49)(typescript@5.7.2)(yaml@2.6.1) packages/postcss-configs: dependencies: @@ -179,8 +179,8 @@ importers: specifier: 29.5.14 version: 29.5.14 '@types/node': - specifier: 22.10.1 - version: 22.10.1 + specifier: 22.10.2 + version: 22.10.2 '@typescript-eslint/parser': specifier: 8.18.0 version: 8.18.0(eslint@8.57.0)(typescript@5.5.4) @@ -201,10 +201,10 @@ importers: version: 8.57.0 jest: specifier: 29.7.0 - version: 29.7.0(@types/node@22.10.1)(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.1)(typescript@5.5.4)) + version: 29.7.0(@types/node@22.10.2)(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.2)(typescript@5.5.4)) ts-node: specifier: 10.9.2 - version: 10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.1)(typescript@5.5.4) + version: 10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.2)(typescript@5.5.4) tsup: specifier: 8.3.5 version: 8.3.5(@swc/core@1.10.1)(jiti@2.4.1)(postcss@8.4.49)(typescript@5.5.4)(yaml@2.6.1) @@ -240,8 +240,8 @@ importers: specifier: 29.5.14 version: 29.5.14 '@types/node': - specifier: 22.10.1 - version: 22.10.1 + specifier: 22.10.2 + version: 22.10.2 '@typescript-eslint/parser': specifier: 8.18.0 version: 8.18.0(eslint@8.57.0)(typescript@5.5.4) @@ -262,10 +262,10 @@ importers: version: 8.57.0 jest: specifier: 29.7.0 - version: 29.7.0(@types/node@22.10.1)(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.1)(typescript@5.5.4)) + version: 29.7.0(@types/node@22.10.2)(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.2)(typescript@5.5.4)) ts-node: specifier: 10.9.2 - version: 10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.1)(typescript@5.5.4) + version: 10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.2)(typescript@5.5.4) tsup: specifier: 8.3.5 version: 8.3.5(@swc/core@1.10.1)(jiti@2.4.1)(postcss@8.4.49)(typescript@5.5.4)(yaml@2.6.1) @@ -289,8 +289,8 @@ importers: version: 5.0.2(prettier@3.4.2)(stylelint@16.11.0(typescript@5.5.4)) devDependencies: '@types/node': - specifier: 22.10.1 - version: 22.10.1 + specifier: 22.10.2 + version: 22.10.2 '@typescript-eslint/parser': specifier: 8.18.0 version: 8.18.0(eslint@8.57.0)(typescript@5.5.4) @@ -348,10 +348,10 @@ importers: version: 8.57.0 jest: specifier: 29.7.0 - version: 29.7.0(@types/node@22.10.1)(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.1)(typescript@5.5.4)) + version: 29.7.0(@types/node@22.10.2)(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.2)(typescript@5.5.4)) ts-node: specifier: 10.9.2 - version: 10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.1)(typescript@5.5.4) + version: 10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.2)(typescript@5.5.4) tsup: specifier: 8.3.5 version: 8.3.5(@swc/core@1.10.1)(jiti@2.4.1)(postcss@8.4.49)(typescript@5.5.4)(yaml@2.6.1) @@ -384,10 +384,10 @@ importers: version: 8.57.0 jest: specifier: 29.7.0 - version: 29.7.0(@types/node@22.10.1)(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.1)(typescript@5.5.4)) + version: 29.7.0(@types/node@22.10.2)(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.2)(typescript@5.5.4)) ts-node: specifier: 10.9.2 - version: 10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.1)(typescript@5.5.4) + version: 10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.2)(typescript@5.5.4) tsup: specifier: 8.3.5 version: 8.3.5(@swc/core@1.10.1)(jiti@2.4.1)(postcss@8.4.49)(typescript@5.5.4)(yaml@2.6.1) @@ -405,7 +405,7 @@ importers: dependencies: '@pmmmwh/react-refresh-webpack-plugin': specifier: ^0.5.15 - version: 0.5.15(react-refresh@0.16.0)(type-fest@4.30.0)(webpack-dev-server@5.1.0(webpack@5.97.1(@swc/core@1.10.1(@swc/helpers@0.5.15))))(webpack@5.97.1(@swc/core@1.10.1(@swc/helpers@0.5.15))) + version: 0.5.15(react-refresh@0.16.0)(type-fest@4.30.0)(webpack-dev-server@5.2.0(webpack@5.97.1(@swc/core@1.10.1(@swc/helpers@0.5.15))))(webpack@5.97.1(@swc/core@1.10.1(@swc/helpers@0.5.15))) '@svgr/webpack': specifier: ^8.1.0 version: 8.1.0(typescript@5.5.4) @@ -444,7 +444,7 @@ importers: version: 5.97.1(@swc/core@1.10.1(@swc/helpers@0.5.15)) webpack-dev-server: specifier: '>=5.0.0' - version: 5.1.0(webpack@5.97.1(@swc/core@1.10.1(@swc/helpers@0.5.15))) + version: 5.2.0(webpack@5.97.1(@swc/core@1.10.1(@swc/helpers@0.5.15))) devDependencies: '@svgr/core': specifier: 8.1.0 @@ -462,8 +462,8 @@ importers: specifier: 29.5.14 version: 29.5.14 '@types/node': - specifier: 22.10.1 - version: 22.10.1 + specifier: 22.10.2 + version: 22.10.2 '@typescript-eslint/parser': specifier: 8.18.0 version: 8.18.0(eslint@8.57.0)(typescript@5.5.4) @@ -484,10 +484,10 @@ importers: version: 8.57.0 jest: specifier: 29.7.0 - version: 29.7.0(@types/node@22.10.1)(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.1)(typescript@5.5.4)) + version: 29.7.0(@types/node@22.10.2)(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.2)(typescript@5.5.4)) ts-node: specifier: 10.9.2 - version: 10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.1)(typescript@5.5.4) + version: 10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.2)(typescript@5.5.4) tsup: specifier: 8.3.5 version: 8.3.5(@swc/core@1.10.1)(jiti@2.4.1)(postcss@8.4.49)(typescript@5.5.4)(yaml@2.6.1) @@ -529,8 +529,8 @@ importers: specifier: 29.5.14 version: 29.5.14 '@types/node': - specifier: 22.10.1 - version: 22.10.1 + specifier: 22.10.2 + version: 22.10.2 '@types/react': specifier: 19.0.1 version: 19.0.1 @@ -575,13 +575,13 @@ importers: version: 3.0.0 jest: specifier: 29.7.0 - version: 29.7.0(@types/node@22.10.1)(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.1)(typescript@5.5.4)) + version: 29.7.0(@types/node@22.10.2)(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.2)(typescript@5.5.4)) jest-environment-jsdom: specifier: 29.7.0 version: 29.7.0 msw: specifier: 2.6.8 - version: 2.6.8(@types/node@22.10.1)(typescript@5.5.4) + version: 2.6.8(@types/node@22.10.2)(typescript@5.5.4) nodemon: specifier: 3.1.7 version: 3.1.7 @@ -590,7 +590,7 @@ importers: version: 16.11.0(typescript@5.5.4) ts-node: specifier: 10.9.2 - version: 10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.1)(typescript@5.5.4) + version: 10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.2)(typescript@5.5.4) typescript: specifier: 5.5.4 version: 5.5.4 @@ -599,7 +599,7 @@ importers: devDependencies: '@storybook/react': specifier: 8.4.7 - version: 8.4.7(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(storybook@8.4.5(prettier@3.4.2))(typescript@5.5.4) + version: 8.4.7(@storybook/test@8.4.7(storybook@8.4.7(prettier@3.4.2)))(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(storybook@8.4.7(prettier@3.4.2))(typescript@5.5.4) '@swc/core': specifier: 1.10.1 version: 1.10.1(@swc/helpers@0.5.15) @@ -641,7 +641,7 @@ importers: version: 3.0.0 jest: specifier: 29.7.0 - version: 29.7.0(@types/node@22.10.1)(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.1)(typescript@5.5.4)) + version: 29.7.0(@types/node@22.10.2)(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.2)(typescript@5.5.4)) jest-environment-jsdom: specifier: 29.7.0 version: 29.7.0 @@ -653,7 +653,7 @@ importers: version: 19.0.0(react@19.0.0) ts-node: specifier: 10.9.2 - version: 10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.1)(typescript@5.5.4) + version: 10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.2)(typescript@5.5.4) typescript: specifier: 5.5.4 version: 5.5.4 @@ -661,11 +661,11 @@ importers: samples/storybook: dependencies: react: - specifier: 18.3.1 - version: 18.3.1 + specifier: 19.0.0 + version: 19.0.0 react-dom: - specifier: 18.3.1 - version: 18.3.1(react@18.3.1) + specifier: 19.0.0 + version: 19.0.0(react@19.0.0) devDependencies: '@rsbuild/core': specifier: 1.1.9 @@ -674,26 +674,26 @@ importers: specifier: 1.1.6 version: 1.1.6(@swc/helpers@0.5.15) '@storybook/addon-a11y': - specifier: 8.4.5 - version: 8.4.5(storybook@8.4.5(prettier@3.4.2)) + specifier: 8.4.7 + version: 8.4.7(storybook@8.4.7(prettier@3.4.2)) '@storybook/addon-essentials': - specifier: 8.4.5 - version: 8.4.5(@types/react@18.3.12)(storybook@8.4.5(prettier@3.4.2)) + specifier: 8.4.7 + version: 8.4.7(@types/react@19.0.1)(storybook@8.4.7(prettier@3.4.2)) '@storybook/addon-interactions': - specifier: 8.4.5 - version: 8.4.5(storybook@8.4.5(prettier@3.4.2)) + specifier: 8.4.7 + version: 8.4.7(storybook@8.4.7(prettier@3.4.2)) '@storybook/addon-links': - specifier: 8.4.5 - version: 8.4.5(react@18.3.1)(storybook@8.4.5(prettier@3.4.2)) + specifier: 8.4.7 + version: 8.4.7(react@19.0.0)(storybook@8.4.7(prettier@3.4.2)) '@storybook/react': - specifier: 8.4.5 - version: 8.4.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(storybook@8.4.5(prettier@3.4.2))(typescript@5.5.4) + specifier: 8.4.7 + version: 8.4.7(@storybook/test@8.4.7(storybook@8.4.7(prettier@3.4.2)))(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(storybook@8.4.7(prettier@3.4.2))(typescript@5.5.4) '@types/react': - specifier: 18.3.12 - version: 18.3.12 + specifier: 19.0.1 + version: 19.0.1 '@types/react-dom': - specifier: 18.3.1 - version: 18.3.1 + specifier: 19.0.2 + version: 19.0.2(@types/react@19.0.1) '@workleap/browserslist-config': specifier: workspace:* version: link:../../packages/browserslist-config @@ -716,11 +716,11 @@ importers: specifier: 14.1.1 version: 14.1.1 storybook: - specifier: 8.4.5 - version: 8.4.5(prettier@3.4.2) + specifier: 8.4.7 + version: 8.4.7(prettier@3.4.2) storybook-react-rsbuild: - specifier: 0.1.5 - version: 0.1.5(@rsbuild/core@1.1.9)(@rspack/core@1.1.6(@swc/helpers@0.5.15))(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(rollup@4.28.1)(storybook@8.4.5(prettier@3.4.2))(typescript@5.5.4)(webpack@5.97.1(esbuild@0.24.0)) + specifier: 0.1.6 + version: 0.1.6(@rsbuild/core@1.1.9)(@rspack/core@1.1.6(@swc/helpers@0.5.15))(@storybook/test@8.4.7(storybook@8.4.7(prettier@3.4.2)))(@types/react@19.0.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(rollup@4.28.1)(storybook@8.4.7(prettier@3.4.2))(typescript@5.5.4)(webpack@5.97.1(esbuild@0.24.0)) typescript: specifier: 5.5.4 version: 5.5.4 @@ -759,8 +759,8 @@ importers: specifier: 29.5.14 version: 29.5.14 '@types/node': - specifier: 22.10.1 - version: 22.10.1 + specifier: 22.10.2 + version: 22.10.2 '@types/react': specifier: 19.0.1 version: 19.0.1 @@ -808,13 +808,13 @@ importers: version: 3.0.0 jest: specifier: 29.7.0 - version: 29.7.0(@types/node@22.10.1)(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.1)(typescript@5.5.4)) + version: 29.7.0(@types/node@22.10.2)(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.2)(typescript@5.5.4)) jest-environment-jsdom: specifier: 29.7.0 version: 29.7.0 msw: specifier: 2.6.8 - version: 2.6.8(@types/node@22.10.1)(typescript@5.5.4) + version: 2.6.8(@types/node@22.10.2)(typescript@5.5.4) nodemon: specifier: 3.1.7 version: 3.1.7 @@ -826,7 +826,7 @@ importers: version: 16.11.0(typescript@5.5.4) ts-node: specifier: 10.9.2 - version: 10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.1)(typescript@5.5.4) + version: 10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.2)(typescript@5.5.4) typescript: specifier: 5.5.4 version: 5.5.4 @@ -835,10 +835,10 @@ importers: version: 5.97.1(@swc/core@1.10.1(@swc/helpers@0.5.15))(webpack-cli@5.1.4) webpack-cli: specifier: 5.1.4 - version: 5.1.4(webpack-dev-server@5.1.0)(webpack@5.97.1) + version: 5.1.4(webpack-dev-server@5.2.0)(webpack@5.97.1) webpack-dev-server: - specifier: 5.1.0 - version: 5.1.0(webpack-cli@5.1.4)(webpack@5.97.1) + specifier: 5.2.0 + version: 5.2.0(webpack-cli@5.1.4)(webpack@5.97.1) samples/webpack/components: devDependencies: @@ -883,7 +883,7 @@ importers: version: 3.0.0 jest: specifier: 29.7.0 - version: 29.7.0(@types/node@22.10.1)(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.1)(typescript@5.5.4)) + version: 29.7.0(@types/node@22.10.2)(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.2)(typescript@5.5.4)) jest-environment-jsdom: specifier: 29.7.0 version: 29.7.0 @@ -895,7 +895,7 @@ importers: version: 19.0.0(react@19.0.0) ts-node: specifier: 10.9.2 - version: 10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.1)(typescript@5.5.4) + version: 10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.2)(typescript@5.5.4) typescript: specifier: 5.5.4 version: 5.5.4 @@ -2176,8 +2176,8 @@ packages: resolution: {integrity: sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - '@jridgewell/gen-mapping@0.3.5': - resolution: {integrity: sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==} + '@jridgewell/gen-mapping@0.3.8': + resolution: {integrity: sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==} engines: {node: '>=6.0.0'} '@jridgewell/resolve-uri@3.1.2': @@ -2616,91 +2616,74 @@ packages: engines: {node: '>=8.10'} hasBin: true - '@storybook/addon-a11y@8.4.5': - resolution: {integrity: sha512-lqIOpWJZNR0Ur+2zUcnFAMvdOe7kYEDeXPv1TM7fwEGyzKPYoM/k5xPA2cJCrYwtydxOqqrmn1jUIw0Qdkhuhg==} - peerDependencies: - storybook: ^8.4.5 - - '@storybook/addon-actions@8.4.5': - resolution: {integrity: sha512-rbB19uiGJ61XHbKIbS1a9bUS6re5L8rT5NMNeEJhCxXRpFUPrlTXMSoD/Pgcn3ENeEMVZsm8/eCzxAVgAP3Mgg==} + '@storybook/addon-a11y@8.4.7': + resolution: {integrity: sha512-GpUvXp6n25U1ZSv+hmDC+05BEqxWdlWjQTb/GaboRXZQeMBlze6zckpVb66spjmmtQAIISo0eZxX1+mGcVR7lA==} peerDependencies: - storybook: ^8.4.5 + storybook: ^8.4.7 - '@storybook/addon-backgrounds@8.4.5': - resolution: {integrity: sha512-FeMt4qHCMYDQiLGGDKiRuSPXFup2WXOaZSdL137v1W36wEL/vGkK1A5iQt1qJ8MZzL5WZQuedox8rSybFy7eow==} + '@storybook/addon-actions@8.4.7': + resolution: {integrity: sha512-mjtD5JxcPuW74T6h7nqMxWTvDneFtokg88p6kQ5OnC1M259iAXb//yiSZgu/quunMHPCXSiqn4FNOSgASTSbsA==} peerDependencies: - storybook: ^8.4.5 + storybook: ^8.4.7 - '@storybook/addon-controls@8.4.5': - resolution: {integrity: sha512-RVTtDDuESLYc1+SJQv2kI7wzBddzAS9uoEe8P75quN6S4pC0GxAB6xirWZ2+WOcba4eHosY+PxMwuBXQfH78Ew==} + '@storybook/addon-backgrounds@8.4.7': + resolution: {integrity: sha512-I4/aErqtFiazcoWyKafOAm3bLpxTj6eQuH/woSbk1Yx+EzN+Dbrgx1Updy8//bsNtKkcrXETITreqHC+a57DHQ==} peerDependencies: - storybook: ^8.4.5 + storybook: ^8.4.7 - '@storybook/addon-docs@8.4.5': - resolution: {integrity: sha512-zPELIl7wXormOylVaaSpkUIuuCCxrO+OFPMKZnlENt6zSReyy0dJu4V0tzfV8FCw+V4D6Y4wrLRk/TIG951Ojw==} + '@storybook/addon-controls@8.4.7': + resolution: {integrity: sha512-377uo5IsJgXLnQLJixa47+11V+7Wn9KcDEw+96aGCBCfLbWNH8S08tJHHnSu+jXg9zoqCAC23MetntVp6LetHA==} peerDependencies: - storybook: ^8.4.5 + storybook: ^8.4.7 '@storybook/addon-docs@8.4.7': resolution: {integrity: sha512-NwWaiTDT5puCBSUOVuf6ME7Zsbwz7Y79WF5tMZBx/sLQ60vpmJVQsap6NSjvK1Ravhc21EsIXqemAcBjAWu80w==} peerDependencies: storybook: ^8.4.7 - '@storybook/addon-essentials@8.4.5': - resolution: {integrity: sha512-AxetQo/zSPIu3RZqWG2opwAz22Bb+jpf1nWbHp0kEpCrBemcWd8X2gonVmXNOC1PDKNl3jcWyc3lmg/+3mxjYg==} + '@storybook/addon-essentials@8.4.7': + resolution: {integrity: sha512-+BtZHCBrYtQKILtejKxh0CDRGIgTl9PumfBOKRaihYb4FX1IjSAxoV/oo/IfEjlkF5f87vouShWsRa8EUauFDw==} peerDependencies: - storybook: ^8.4.5 + storybook: ^8.4.7 - '@storybook/addon-highlight@8.4.5': - resolution: {integrity: sha512-sMA7v+4unaKY+5RDhow6lLncJqNX9ZLUnBIt3vzY1ntUsOYVwykAY1Hq4Ysj0luCBXjJJdJ6223ylrycnb7Ilw==} + '@storybook/addon-highlight@8.4.7': + resolution: {integrity: sha512-whQIDBd3PfVwcUCrRXvCUHWClXe9mQ7XkTPCdPo4B/tZ6Z9c6zD8JUHT76ddyHivixFLowMnA8PxMU6kCMAiNw==} peerDependencies: - storybook: ^8.4.5 + storybook: ^8.4.7 - '@storybook/addon-interactions@8.4.5': - resolution: {integrity: sha512-s6R8XVD8LTp+LQTDbhtDjDLE6S44I7FtMLxPdMNwN9VEJjBk01NONLDuGDpNq5o/0bnybA3rMHk9+3afsgzidQ==} + '@storybook/addon-interactions@8.4.7': + resolution: {integrity: sha512-fnufT3ym8ht3HHUIRVXAH47iOJW/QOb0VSM+j269gDuvyDcY03D1civCu1v+eZLGaXPKJ8vtjr0L8zKQ/4P0JQ==} peerDependencies: - storybook: ^8.4.5 + storybook: ^8.4.7 - '@storybook/addon-links@8.4.5': - resolution: {integrity: sha512-ac3OtplFdrPw/2jtLnteuVllwu2yCe3sgKJS9AbdYMT/65OW47M7oDnzcpRPsDGufrKlDMBJXXEv4SfTtlT+rg==} + '@storybook/addon-links@8.4.7': + resolution: {integrity: sha512-L/1h4dMeMKF+MM0DanN24v5p3faNYbbtOApMgg7SlcBT/tgo3+cAjkgmNpYA8XtKnDezm+T2mTDhB8mmIRZpIQ==} peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta - storybook: ^8.4.5 + storybook: ^8.4.7 peerDependenciesMeta: react: optional: true - '@storybook/addon-measure@8.4.5': - resolution: {integrity: sha512-+sNjew991YaoXQyWWloFybjEGrDO40Jk6w8BgZs2X7oc3D5t/6oFzvyC862U++LGqKFA3quXDeBjEb92CI9cRA==} - peerDependencies: - storybook: ^8.4.5 - - '@storybook/addon-outline@8.4.5': - resolution: {integrity: sha512-XlpN98AUDnWQWNFSFVm+HkRUzm3xIUMjBGTkv6HsL6zt6XoJ+LsQMca+PPtYqlBJA+5CU41xMDaG8HC/p+sd3A==} + '@storybook/addon-measure@8.4.7': + resolution: {integrity: sha512-QfvqYWDSI5F68mKvafEmZic3SMiK7zZM8VA0kTXx55hF/+vx61Mm0HccApUT96xCXIgmwQwDvn9gS4TkX81Dmw==} peerDependencies: - storybook: ^8.4.5 + storybook: ^8.4.7 - '@storybook/addon-toolbars@8.4.5': - resolution: {integrity: sha512-hOq5560ONOU/qrslrwosWzxnC4nrF8HZWD43ciKwtethm8HuptU2M+Jrui1CRsMScEZLopWWVE9o0vJMdKpIFQ==} + '@storybook/addon-outline@8.4.7': + resolution: {integrity: sha512-6LYRqUZxSodmAIl8icr585Oi8pmzbZ90aloZJIpve+dBAzo7ydYrSQxxoQEVltXbKf3VeVcrs64ouAYqjisMYA==} peerDependencies: - storybook: ^8.4.5 + storybook: ^8.4.7 - '@storybook/addon-viewport@8.4.5': - resolution: {integrity: sha512-l7Y41gIbJAsIN/QCg1QJ9sr61FLz1C/imUotcDej41tOHxUTSQOlXpNtVnfhUM1vGQc0yNpP3pVxj8BpXi0cAw==} + '@storybook/addon-toolbars@8.4.7': + resolution: {integrity: sha512-OSfdv5UZs+NdGB+nZmbafGUWimiweJ/56gShlw8Neo/4jOJl1R3rnRqqY7MYx8E4GwoX+i3GF5C3iWFNQqlDcw==} peerDependencies: - storybook: ^8.4.5 + storybook: ^8.4.7 - '@storybook/blocks@8.4.5': - resolution: {integrity: sha512-Z+LHauSqm3A4HBR9pUEf9KQhD3/3xYMt0FXgA+GHCAyDa6lFeD1C6r9Y2nlT+9dt8gv9B9oygTZvV6GqFVyRSQ==} + '@storybook/addon-viewport@8.4.7': + resolution: {integrity: sha512-hvczh/jjuXXcOogih09a663sRDDSATXwbE866al1DXgbDFraYD/LxX/QDb38W9hdjU9+Qhx8VFIcNWoMQns5HQ==} peerDependencies: - react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta - react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta - storybook: ^8.4.5 - peerDependenciesMeta: - react: - optional: true - react-dom: - optional: true + storybook: ^8.4.7 '@storybook/blocks@8.4.7': resolution: {integrity: sha512-+QH7+JwXXXIyP3fRCxz/7E2VZepAanXJM7G8nbR3wWsqWgrRp4Wra6MvybxAYCxU7aNfJX5c+RW84SNikFpcIA==} @@ -2714,11 +2697,6 @@ packages: react-dom: optional: true - '@storybook/components@8.4.5': - resolution: {integrity: sha512-2PdnKfqNNv3sO7qILgWXiNvmLOi503oN9OMemNCQjTIvdvySc5JpS9/eClwcl/JfmE4qHdSHZr8dLLkBM9S7+Q==} - peerDependencies: - storybook: ^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0 - '@storybook/components@8.4.7': resolution: {integrity: sha512-uyJIcoyeMWKAvjrG9tJBUCKxr2WZk+PomgrgrUwejkIfXMO76i6jw9BwLa0NZjYdlthDv30r9FfbYZyeNPmF0g==} peerDependencies: @@ -2729,19 +2707,14 @@ packages: peerDependencies: storybook: ^8.4.7 - '@storybook/core@8.4.5': - resolution: {integrity: sha512-aB1sQNX5nRoUAqg5u1py0MuR/VPd6c6PhECa4rW6pmr7kZcfyP4PP6UFpXuN71ypTQlkRE3Vc5PQZ3gLhE9o3g==} + '@storybook/core@8.4.7': + resolution: {integrity: sha512-7Z8Z0A+1YnhrrSXoKKwFFI4gnsLbWzr8fnDCU6+6HlDukFYh8GHRcZ9zKfqmy6U3hw2h8H5DrHsxWfyaYUUOoA==} peerDependencies: prettier: ^2 || ^3 peerDependenciesMeta: prettier: optional: true - '@storybook/csf-plugin@8.4.5': - resolution: {integrity: sha512-qd2rQTglOTS+phQmTbNTXNjNyxdGvolaqHqDNMw3Vf6h9o3U+mLkwnDWNVnQ9oqvOoUEAqpBthgwzU9FhkIk+A==} - peerDependencies: - storybook: ^8.4.5 - '@storybook/csf-plugin@8.4.7': resolution: {integrity: sha512-Fgogplu4HImgC+AYDcdGm1rmL6OR1rVdNX1Be9C/NEXwOCpbbBwi0BxTf/2ZxHRk9fCeaPEcOdP5S8QHfltc1g==} peerDependencies: @@ -2760,26 +2733,16 @@ packages: react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta - '@storybook/instrumenter@8.4.5': - resolution: {integrity: sha512-8qM35FkueuRpJr0zA6ENvhQICbo+iKL1ln450DwV1kKJtc41KdbA3CuCvtZ/FnoPsFnwdtPjhhICFtRt8LRTSg==} - peerDependencies: - storybook: ^8.4.5 - - '@storybook/manager-api@8.4.5': - resolution: {integrity: sha512-t39JaMy3UX4StbUH/tIDcaflBDxTcyIq853wQtBMhVL3e1+Dw3MIiiG/5bw79HU4R7kSmPVLXIIbV3FmXkq7KQ==} + '@storybook/instrumenter@8.4.7': + resolution: {integrity: sha512-k6NSD3jaRCCHAFtqXZ7tw8jAzD/yTEWXGya+REgZqq5RCkmJ+9S4Ytp/6OhQMPtPFX23gAuJJzTQVLcCr+gjRg==} peerDependencies: - storybook: ^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0 + storybook: ^8.4.7 '@storybook/manager-api@8.4.7': resolution: {integrity: sha512-ELqemTviCxAsZ5tqUz39sDmQkvhVAvAgiplYy9Uf15kO0SP2+HKsCMzlrm2ue2FfkUNyqbDayCPPCB0Cdn/mpQ==} peerDependencies: storybook: ^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0 - '@storybook/preview-api@8.4.5': - resolution: {integrity: sha512-MKIZ2jQO/3cUdsT57eq8jRgB6inALo9BxrQ88f7mqzltOkMvADvTAY6y8JZqTUoDzWTH/ny/8SGGdtpqlxRuiQ==} - peerDependencies: - storybook: ^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0 - '@storybook/preview-api@8.4.7': resolution: {integrity: sha512-0QVQwHw+OyZGHAJEXo6Knx+6/4er7n2rTDE5RYJ9F2E2Lg42E19pfdLlq2Jhoods2Xrclo3wj6GWR//Ahi39Eg==} peerDependencies: @@ -2791,13 +2754,6 @@ packages: typescript: '>= 3.x' webpack: '>= 4' - '@storybook/react-dom-shim@8.4.5': - resolution: {integrity: sha512-YTWTfPagptEYXJsnxAl3zP97Ev0zebtaEV0WgjGaEeumr+zsfgKKwzzHxgrtumBmDzwkuKlzFwlQB5A8keOIGA==} - peerDependencies: - react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta - react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta - storybook: ^8.4.5 - '@storybook/react-dom-shim@8.4.7': resolution: {integrity: sha512-6bkG2jvKTmWrmVzCgwpTxwIugd7Lu+2btsLAqhQSzDyIj2/uhMNp8xIMr/NBDtLgq3nomt9gefNa9xxLwk/OMg==} peerDependencies: @@ -2805,21 +2761,6 @@ packages: react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta storybook: ^8.4.7 - '@storybook/react@8.4.5': - resolution: {integrity: sha512-2+p4aGEdGOnu2XNhnMi1B8GPeszm34P905HgqGD1cuz9gMt7x/bgZQaVxs6kpHZ3Hb6V9qp62La2dbAYatHdSw==} - engines: {node: '>=18.0.0'} - peerDependencies: - '@storybook/test': 8.4.5 - react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta - react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta - storybook: ^8.4.5 - typescript: '>= 4.2.x' - peerDependenciesMeta: - '@storybook/test': - optional: true - typescript: - optional: true - '@storybook/react@8.4.7': resolution: {integrity: sha512-nQ0/7i2DkaCb7dy0NaT95llRVNYWQiPIVuhNfjr1mVhEP7XD090p0g7eqUmsx8vfdHh2BzWEo6CoBFRd3+EXxw==} engines: {node: '>=18.0.0'} @@ -2835,23 +2776,18 @@ packages: typescript: optional: true - '@storybook/test@8.4.5': - resolution: {integrity: sha512-mHsRc6m60nfcEBsjvUkKz+Jnz0or4WH5jmJ1VL2pGKO4VzESCPqAwDnwDqP2YyeSQ0b/MAKUT5kdoLE2RE2eVw==} + '@storybook/test@8.4.7': + resolution: {integrity: sha512-AhvJsu5zl3uG40itSQVuSy5WByp3UVhS6xAnme4FWRwgSxhvZjATJ3AZkkHWOYjnnk+P2/sbz/XuPli1FVCWoQ==} peerDependencies: - storybook: ^8.4.5 - - '@storybook/theming@8.4.5': - resolution: {integrity: sha512-45e/jeG4iuqdZcHg3PbB6dwXQTwlnnEB7r/QcVExyC7ibrkTnjUfvxzyUw4mmU3CXETFGD5EcUobFkgK+/aPxQ==} - peerDependencies: - storybook: ^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0 + storybook: ^8.4.7 '@storybook/theming@8.4.7': resolution: {integrity: sha512-99rgLEjf7iwfSEmdqlHkSG3AyLcK0sfExcr0jnc6rLiAkBhzuIsvcHjjUwkR210SOCgXqBPW0ZA6uhnuyppHLw==} peerDependencies: storybook: ^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0 - '@stylistic/eslint-plugin-ts@2.12.0': - resolution: {integrity: sha512-JqoHGQCeW0dC3LN/7+ZRwTOCs3kBum2b4k7ovx+0RXeaDIINs5F+/Mp/NvTCPqDzUlBkd1HOaviKyaEWpKA7Yw==} + '@stylistic/eslint-plugin-ts@2.12.1': + resolution: {integrity: sha512-Xx1NIioeW6LLlOfq5L/dLSrUXvi6q80UXDNbn/rXjKCzFT4a8wKwtp1q25kssdr1JEXI9a6tOHwFsh4Em+MoGg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: '>=8.40.0' @@ -3115,6 +3051,9 @@ packages: '@types/eslint@8.56.10': resolution: {integrity: sha512-Shavhk87gCtY2fhXDctcfS3e6FdxWkCx1iUZ9eEUbh7rTqlZT0/IzOkCOVt0fCjcFuZ9FPYfuezTBImfHCDBGQ==} + '@types/eslint@9.6.1': + resolution: {integrity: sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag==} + '@types/estree-jsx@1.0.5': resolution: {integrity: sha512-52CcUVNFyfb1A2ALocQw/Dd1BQFNmSdkuC3BkZ6iqhdMfQz7JWOFRuJFloOzjk+6WijU56m9oKXFAXc7o3Towg==} @@ -3196,11 +3135,8 @@ packages: '@types/node@18.19.68': resolution: {integrity: sha512-QGtpFH1vB99ZmTa63K4/FU8twThj4fuVSBkGddTp7uIL/cuoLWIUSL2RcOaigBhfR+hg5pgGkBnkoOxrTVBMKw==} - '@types/node@22.10.1': - resolution: {integrity: sha512-qKgsUwfHZV2WCWLAnVP1JqnpE6Im6h3Y0+fYgMTasNQ7V++CBX5OT1as0g0f+OyubbFqhf6XVNIsmN4IIhEgGQ==} - - '@types/prop-types@15.7.14': - resolution: {integrity: sha512-gNMvNH49DJ7OJYv+KAKn0Xp45p8PLl6zo2YnvDIbTd4J6MER2BmWN49TG7n9LvkyihINxeKW8+3bfS2yDC9dzQ==} + '@types/node@22.10.2': + resolution: {integrity: sha512-Xxr6BBRCAOQixvonOye19wnzyDiUtTeqldOOmj3CkeblonbccA12PFwlufvRdrpjXxqnmUaeiU5EOA+7s5diUQ==} '@types/qs@6.9.17': resolution: {integrity: sha512-rX4/bPcfmvxHDv0XjfJELTTr+iB+tn032nPILqHm5wbthUUUuVtNGGqzhya9XUxjTP8Fpr0qYgSZZKxGY++svQ==} @@ -3208,17 +3144,11 @@ packages: '@types/range-parser@1.2.7': resolution: {integrity: sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==} - '@types/react-dom@18.3.1': - resolution: {integrity: sha512-qW1Mfv8taImTthu4KoXgDfLuk4bydU6Q/TkADnDWWHwi4NX4BR+LWfTp2sVmTqRrsHvyDDTelgelxJ+SsejKKQ==} - '@types/react-dom@19.0.2': resolution: {integrity: sha512-c1s+7TKFaDRRxr1TxccIX2u7sfCnc3RxkVyBIUA2lCpyqCF+QoAwQ/CBg7bsMdVwP120HEH143VQezKtef5nCg==} peerDependencies: '@types/react': ^19.0.0 - '@types/react@18.3.12': - resolution: {integrity: sha512-D2wOSq/d6Agt28q7rSI3jhU7G6aiuzljDGZ2hTZHIkrTLUI+AF3WMeKkEZ9nN2fkBAlcktT6vcZjDFiIhMYEQw==} - '@types/react@19.0.1': resolution: {integrity: sha512-YW6614BDhqbpR5KtUYzTA+zlA7nayzJRA9ljz9CQoxthR0sDisYZLuvSMsil36t4EH/uAt8T52Xb4sVw17G+SQ==} @@ -3754,6 +3684,10 @@ packages: resolution: {integrity: sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==} engines: {node: '>= 0.4'} + call-bound@1.0.2: + resolution: {integrity: sha512-0lk0PHFe/uz0vl527fG9CgdE9WdafjDbCXvBbs+LUv000TVt2Jjhqbs4Jwm8gz070w8xXyEAxrPOMullsxXeGg==} + engines: {node: '>= 0.4'} + call-me-maybe@1.0.2: resolution: {integrity: sha512-HpX65o1Hnr9HH25ojC1YGs7HCQLq0GCOibSaWER0eNpgJ/Z1MZv2mTc7+xh6WOPxbRVcmgbv4hGU+uSQ/2xFZQ==} @@ -4368,8 +4302,8 @@ packages: effect@3.6.5: resolution: {integrity: sha512-NhopZTAKljaAlR0CEroOAJJngdqg7bzlnWcDrCwh4d2WNVohVbBtUS4SGqLt8tUy7IFsTWATYiUtmhDG+YELjA==} - electron-to-chromium@1.5.72: - resolution: {integrity: sha512-ZpSAUOZ2Izby7qnZluSrAlGgGQzucmFbN0n64dYzocYxnxV5ufurpj3VgEe4cUp7ir9LmeLxNYo8bVnlM8bQHw==} + electron-to-chromium@1.5.73: + resolution: {integrity: sha512-8wGNxG9tAG5KhGd3eeA0o6ixhiNdgr0DcHWm85XPCphwZgD1lIEoi6t3VERayWao7SF7AAZTw6oARGJeVjH8Kg==} emittery@0.13.1: resolution: {integrity: sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==} @@ -4882,8 +4816,8 @@ packages: resolution: {integrity: sha512-vpeMIQKxczTD/0s2CdEWHcb0eeJe6TFjxb+J5xgX7hScxqrGuyjmv4c1D4A/gelKfyox0gJJwIHF+fLjeaM8kQ==} engines: {node: '>=18'} - get-intrinsic@1.2.5: - resolution: {integrity: sha512-Y4+pKa7XeRUPWFNvOOYHkRYrfzW07oraURSvjDmRVOJ748OrVmeXtpE4+GCEHncjCjkTxPNRt8kEbxDhsn6VTg==} + get-intrinsic@1.2.6: + resolution: {integrity: sha512-qxsEs+9A+u85HhllWJJFicJfPDhRmjzoYdl64aMWW9yRIJmSyxdn8IEkuIM530/7T+lv0TIHd8L6Q/ra0tEoeA==} engines: {node: '>= 0.4'} get-package-type@0.1.0: @@ -5648,6 +5582,11 @@ packages: engines: {node: '>=6'} hasBin: true + jsesc@3.1.0: + resolution: {integrity: sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==} + engines: {node: '>=6'} + hasBin: true + json-buffer@3.0.1: resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} @@ -5708,8 +5647,8 @@ packages: resolution: {integrity: sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==} engines: {node: '>=6'} - knip@5.39.2: - resolution: {integrity: sha512-BuvuWRllLWV/r2G4m9ggNH+DZ6gouP/dhtJPXVlMbWNF++w9/EfrF6k2g7YBKCwjzCC+PXmYtpH8S2t8RjnY4Q==} + knip@5.39.4: + resolution: {integrity: sha512-IiNFwfe8xDFwuGzBY8lKvrY3hhR1I81iCaJ8nd85cxT7LxB7cDd73WP3MrzZylE9Vec1HhC0YLFiAL7jh5OYEQ==} engines: {node: '>=18.6.0'} hasBin: true peerDependencies: @@ -5836,6 +5775,10 @@ packages: map-or-similar@1.5.0: resolution: {integrity: sha512-0aF7ZmVon1igznGI4VS30yugpduQW3y3GkcgGJOp7d8x8QrizhigUxjI/m2UojsXXto+jLAH3KSz+xOJTiORjg==} + math-intrinsics@1.0.0: + resolution: {integrity: sha512-4MqMiKP90ybymYvsut0CH2g4XWbfLtmlCkXmtmdcDCxNB+mQcu1w/1+L/VD7vi/PSv7X2JYV7SCcR+jiPXnQtA==} + engines: {node: '>= 0.4'} + mathml-tag-names@2.1.3: resolution: {integrity: sha512-APMBEanjybaPzUrfqU0IMU5I0AswKMH7k8OTLs0vvV4KZpExkTkY87nR/zpbuTPj+gARop7aGUbl11pnDfW6xg==} @@ -6564,8 +6507,8 @@ packages: peerDependencies: postcss: ^8.1.0 - postcss-modules-local-by-default@4.1.0: - resolution: {integrity: sha512-rm0bdSv4jC3BDma3s9H19ZddW0aHX6EoqwDYU2IfZhRN+53QrufTRo2IdkAbRqLx4R2IYbZnbjKKxg4VN5oU9Q==} + postcss-modules-local-by-default@4.2.0: + resolution: {integrity: sha512-5kcJm/zk+GJDSfw+V/42fJ5fhjL5YbFDl8nVdXkJPLLW+Vf9mTD5Xe0wqIaDnLuL2U6cDNpTr+UQ+v2HWIBhzw==} engines: {node: ^10 || ^12 || >= 14} peerDependencies: postcss: ^8.1.0 @@ -7029,9 +6972,9 @@ packages: resolution: {integrity: sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==} engines: {node: '>= 10.13.0'} - schema-utils@4.2.0: - resolution: {integrity: sha512-L0jRsrPpjdckP3oPug3/VxNKt2trR8TcabrM6FOAAlvC/9Phcmm+cuAgTlxBqdBR1WJx7Naj9WHw+aOmheSVbw==} - engines: {node: '>= 12.13.0'} + schema-utils@4.3.0: + resolution: {integrity: sha512-Gf9qqc58SpCA/xdziiHz35F4GNIWYWZrEshUc/G/r5BnLph6xpKuLeoJoQuj5WfBIx/eQLf+hmVPYHaxJu7V2g==} + engines: {node: '>= 10.13.0'} secure-compare@3.0.1: resolution: {integrity: sha512-AckIIV90rPDcBcglUwXPF3kg0P0qmPsPXAj6BBEENQE1p5yA1xfmDJzfi1Tappj37Pv2mVbKpL3Z1T+Nn7k1Qw==} @@ -7100,8 +7043,20 @@ packages: resolution: {integrity: sha512-AzqKpGKjrj7EM6rKVQEPpB288oCfnrEIuyoT9cyF4nmGa7V8Zk6f7RRqYisX8X9m+Q7bd632aZW4ky7EhbQztA==} engines: {node: '>= 0.4'} - side-channel@1.0.6: - resolution: {integrity: sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==} + side-channel-list@1.0.0: + resolution: {integrity: sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==} + engines: {node: '>= 0.4'} + + side-channel-map@1.0.1: + resolution: {integrity: sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==} + engines: {node: '>= 0.4'} + + side-channel-weakmap@1.0.2: + resolution: {integrity: sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==} + engines: {node: '>= 0.4'} + + side-channel@1.1.0: + resolution: {integrity: sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==} engines: {node: '>= 0.4'} signal-exit@3.0.7: @@ -7221,8 +7176,8 @@ packages: resolution: {integrity: sha512-UhDfHmA92YAlNnCfhmq0VeNL5bDbiZGg7sZ2IvPsXubGkiNa9EC+tUTsjBRsYUAz87btI6/1wf4XoVvQ3uRnmQ==} engines: {node: '>=18'} - storybook-builder-rsbuild@0.1.5: - resolution: {integrity: sha512-g8/pVX+2YixHpWt/Q8dQWtkuKpWKxm1i9h+ihTFPO5LQWc3HvlF6PAXccPvedicLizGR2xTaI/RcJkE+2bYXqA==} + storybook-builder-rsbuild@0.1.6: + resolution: {integrity: sha512-q1ecTYBDPmtycZYQhGO+z24RlblTZo6hS0jz6ISkKpOTfb35bX09XaNtT5JVAOzjwi9YYZUNAjKwJzvpmRcWOA==} peerDependencies: '@rsbuild/core': ^1.0.1 storybook: ^8.2.1 @@ -7231,8 +7186,8 @@ packages: typescript: optional: true - storybook-react-rsbuild@0.1.5: - resolution: {integrity: sha512-Cy7Ms5COLR1FTelGRxS5pE9LVlDSvaJeBsTH2MVi/29ZK8UEE0VH+Mnve2MboB93GbC3fhZFtIcNSF2dy9pjTw==} + storybook-react-rsbuild@0.1.6: + resolution: {integrity: sha512-IqY4rtAbe+qll5PG4v0MiO58xmxcjrpX1UhVmknFWDd/+3Xca6N6pLoW7Pl8+jHekKRhvgMiRw+Hp1ejnn2yIQ==} engines: {node: '>=18.0.0'} peerDependencies: '@rsbuild/core': ^1.0.1 @@ -7244,8 +7199,8 @@ packages: typescript: optional: true - storybook@8.4.5: - resolution: {integrity: sha512-9tfgabXnMibYp3SvoaJXXMD63Pw0SA9Hnf5v6TxysCYZs4DZ/04fAkK+9RW+K4C5JkV83qXMMlrsPj766R47fg==} + storybook@8.4.7: + resolution: {integrity: sha512-RP/nMJxiWyFc8EVMH5gp20ID032Wvk+Yr3lmKidoegto5Iy+2dVQnUoElZb2zpbVXNHWakGuAkfI0dY1Hfp/vw==} hasBin: true peerDependencies: prettier: ^2 || ^3 @@ -7291,12 +7246,13 @@ packages: string.prototype.repeat@1.0.0: resolution: {integrity: sha512-0u/TldDbKD8bFCQ/4f5+mNRrXwZ8hg2w7ZR8wa16e8z9XpePWl3eGEcUD0OXpEH/VJH/2G3gjUtR3ZOiBe2S/w==} - string.prototype.trim@1.2.9: - resolution: {integrity: sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==} + string.prototype.trim@1.2.10: + resolution: {integrity: sha512-Rs66F0P/1kedk5lyYyH9uBzuiI/kNRmwJAR9quK6VOtIpZ2G+hMZd+HQbbv25MgCA6gEffoMZYxlTod4WcdrKA==} engines: {node: '>= 0.4'} - string.prototype.trimend@1.0.8: - resolution: {integrity: sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==} + string.prototype.trimend@1.0.9: + resolution: {integrity: sha512-G7Ok5C6E/j4SGfyLCloXTrngQIQU3PWtXGst3yM7Bea9FRURf1S42ZHlZZtsNque2FN2PoUhfZXYLNWwEr4dLQ==} + engines: {node: '>= 0.4'} string.prototype.trimstart@1.0.8: resolution: {integrity: sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==} @@ -7680,6 +7636,10 @@ packages: resolution: {integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==} engines: {node: '>=4'} + type-detect@4.1.0: + resolution: {integrity: sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==} + engines: {node: '>=4'} + type-fest@0.20.2: resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} engines: {node: '>=10'} @@ -7973,8 +7933,8 @@ packages: webpack: optional: true - webpack-dev-server@5.1.0: - resolution: {integrity: sha512-aQpaN81X6tXie1FoOB7xlMfCsN19pSvRAeYUHOdFWOlhpQ/LlbfTqYwwmEDFV0h8GGuqmCmKmT+pxcUV/Nt2gQ==} + webpack-dev-server@5.2.0: + resolution: {integrity: sha512-90SqqYXA2SK36KcT6o1bvwvZfJFcmoamqeJY7+boioffX9g9C0wjjJRGUrQIuh43pb0ttX7+ssavmj/WN2RHtA==} engines: {node: '>= 18.12.0'} hasBin: true peerDependencies: @@ -8154,8 +8114,8 @@ packages: peerDependencies: zod: ^3.18.0 - zod@3.24.0: - resolution: {integrity: sha512-Hz+wiY8yD0VLA2k/+nsg2Abez674dDGTai33SwNvMPuf9uIrBC9eFgIMQxBBbHFxVXi8W+5nX9DcAh9YNSQm/w==} + zod@3.24.1: + resolution: {integrity: sha512-muH7gBL9sI1nciMZV67X5fTKKBLtwpZ5VBp1vsOQzj1MhrBZ4wlVCm3gedKZWLp0Oyel8sIGfeiz54Su+OVT+A==} zwitch@2.0.4: resolution: {integrity: sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==} @@ -8170,7 +8130,7 @@ snapshots: '@ampproject/remapping@2.3.0': dependencies: - '@jridgewell/gen-mapping': 0.3.5 + '@jridgewell/gen-mapping': 0.3.8 '@jridgewell/trace-mapping': 0.3.25 '@babel/code-frame@7.26.2': @@ -8205,9 +8165,9 @@ snapshots: dependencies: '@babel/parser': 7.26.3 '@babel/types': 7.26.3 - '@jridgewell/gen-mapping': 0.3.5 + '@jridgewell/gen-mapping': 0.3.8 '@jridgewell/trace-mapping': 0.3.25 - jsesc: 3.0.2 + jsesc: 3.1.0 '@babel/helper-annotate-as-pure@7.25.9': dependencies: @@ -9504,16 +9464,16 @@ snapshots: '@humanwhocodes/object-schema@2.0.2': {} - '@inquirer/confirm@5.1.0(@types/node@22.10.1)': + '@inquirer/confirm@5.1.0(@types/node@22.10.2)': dependencies: - '@inquirer/core': 10.1.1(@types/node@22.10.1) - '@inquirer/type': 3.0.1(@types/node@22.10.1) - '@types/node': 22.10.1 + '@inquirer/core': 10.1.1(@types/node@22.10.2) + '@inquirer/type': 3.0.1(@types/node@22.10.2) + '@types/node': 22.10.2 - '@inquirer/core@10.1.1(@types/node@22.10.1)': + '@inquirer/core@10.1.1(@types/node@22.10.2)': dependencies: '@inquirer/figures': 1.0.8 - '@inquirer/type': 3.0.1(@types/node@22.10.1) + '@inquirer/type': 3.0.1(@types/node@22.10.2) ansi-escapes: 4.3.2 cli-width: 4.1.0 mute-stream: 2.0.0 @@ -9526,9 +9486,9 @@ snapshots: '@inquirer/figures@1.0.8': {} - '@inquirer/type@3.0.1(@types/node@22.10.1)': + '@inquirer/type@3.0.1(@types/node@22.10.2)': dependencies: - '@types/node': 22.10.1 + '@types/node': 22.10.2 '@isaacs/cliui@8.0.2': dependencies: @@ -9552,27 +9512,27 @@ snapshots: '@jest/console@29.7.0': dependencies: '@jest/types': 29.6.3 - '@types/node': 22.10.1 + '@types/node': 22.10.2 chalk: 4.1.2 jest-message-util: 29.7.0 jest-util: 29.7.0 slash: 3.0.0 - '@jest/core@29.7.0(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.1)(typescript@5.5.4))': + '@jest/core@29.7.0(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.2)(typescript@5.5.4))': dependencies: '@jest/console': 29.7.0 '@jest/reporters': 29.7.0 '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.10.1 + '@types/node': 22.10.2 ansi-escapes: 4.3.2 chalk: 4.1.2 ci-info: 3.9.0 exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@22.10.1)(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.1)(typescript@5.5.4)) + jest-config: 29.7.0(@types/node@22.10.2)(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.2)(typescript@5.5.4)) jest-haste-map: 29.7.0 jest-message-util: 29.7.0 jest-regex-util: 29.6.3 @@ -9593,21 +9553,21 @@ snapshots: - supports-color - ts-node - '@jest/core@29.7.0(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.1)(typescript@5.7.2))': + '@jest/core@29.7.0(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.2)(typescript@5.7.2))': dependencies: '@jest/console': 29.7.0 '@jest/reporters': 29.7.0 '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.10.1 + '@types/node': 22.10.2 ansi-escapes: 4.3.2 chalk: 4.1.2 ci-info: 3.9.0 exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@22.10.1)(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.1)(typescript@5.7.2)) + jest-config: 29.7.0(@types/node@22.10.2)(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.2)(typescript@5.7.2)) jest-haste-map: 29.7.0 jest-message-util: 29.7.0 jest-regex-util: 29.6.3 @@ -9636,7 +9596,7 @@ snapshots: dependencies: '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.10.1 + '@types/node': 22.10.2 jest-mock: 29.7.0 '@jest/expect-utils@29.7.0': @@ -9654,7 +9614,7 @@ snapshots: dependencies: '@jest/types': 29.6.3 '@sinonjs/fake-timers': 10.3.0 - '@types/node': 22.10.1 + '@types/node': 22.10.2 jest-message-util: 29.7.0 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -9676,7 +9636,7 @@ snapshots: '@jest/transform': 29.7.0 '@jest/types': 29.6.3 '@jridgewell/trace-mapping': 0.3.25 - '@types/node': 22.10.1 + '@types/node': 22.10.2 chalk: 4.1.2 collect-v8-coverage: 1.0.2 exit: 0.1.2 @@ -9746,11 +9706,11 @@ snapshots: '@jest/schemas': 29.6.3 '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 - '@types/node': 22.10.1 + '@types/node': 22.10.2 '@types/yargs': 17.0.33 chalk: 4.1.2 - '@jridgewell/gen-mapping@0.3.5': + '@jridgewell/gen-mapping@0.3.8': dependencies: '@jridgewell/set-array': 1.2.1 '@jridgewell/sourcemap-codec': 1.5.0 @@ -9762,7 +9722,7 @@ snapshots: '@jridgewell/source-map@0.3.6': dependencies: - '@jridgewell/gen-mapping': 0.3.5 + '@jridgewell/gen-mapping': 0.3.8 '@jridgewell/trace-mapping': 0.3.25 '@jridgewell/sourcemap-codec@1.5.0': {} @@ -9782,7 +9742,7 @@ snapshots: call-me-maybe: 1.0.2 cross-spawn: 7.0.6 string-argv: 0.3.2 - type-detect: 4.0.8 + type-detect: 4.1.0 '@jsonjoy.com/base64@1.1.2(tslib@2.8.1)': dependencies: @@ -9818,10 +9778,10 @@ snapshots: globby: 11.1.0 read-yaml-file: 1.1.0 - '@mdx-js/react@3.1.0(@types/react@18.3.12)(react@18.3.1)': + '@mdx-js/react@3.1.0(@types/react@19.0.1)(react@18.3.1)': dependencies: '@types/mdx': 2.0.13 - '@types/react': 18.3.12 + '@types/react': 19.0.1 react: 18.3.1 '@module-federation/runtime-tools@0.5.1': @@ -9999,7 +9959,7 @@ snapshots: '@pkgr/core@0.1.1': {} - '@pmmmwh/react-refresh-webpack-plugin@0.5.15(react-refresh@0.16.0)(type-fest@4.30.0)(webpack-dev-server@5.1.0(webpack@5.97.1(@swc/core@1.10.1(@swc/helpers@0.5.15))))(webpack@5.97.1(@swc/core@1.10.1(@swc/helpers@0.5.15)))': + '@pmmmwh/react-refresh-webpack-plugin@0.5.15(react-refresh@0.16.0)(type-fest@4.30.0)(webpack-dev-server@5.2.0(webpack@5.97.1(@swc/core@1.10.1(@swc/helpers@0.5.15))))(webpack@5.97.1(@swc/core@1.10.1(@swc/helpers@0.5.15)))': dependencies: ansi-html: 0.0.9 core-js-pure: 3.39.0 @@ -10007,12 +9967,12 @@ snapshots: html-entities: 2.5.2 loader-utils: 2.0.4 react-refresh: 0.16.0 - schema-utils: 4.2.0 + schema-utils: 4.3.0 source-map: 0.7.4 webpack: 5.97.1(@swc/core@1.10.1(@swc/helpers@0.5.15)) optionalDependencies: type-fest: 4.30.0 - webpack-dev-server: 5.1.0(webpack@5.97.1(@swc/core@1.10.1(@swc/helpers@0.5.15))) + webpack-dev-server: 5.2.0(webpack@5.97.1(@swc/core@1.10.1(@swc/helpers@0.5.15))) '@polka/url@1.0.0-next.28': {} @@ -10202,156 +10162,129 @@ snapshots: ignore: 5.3.2 p-map: 4.0.0 - '@storybook/addon-a11y@8.4.5(storybook@8.4.5(prettier@3.4.2))': + '@storybook/addon-a11y@8.4.7(storybook@8.4.7(prettier@3.4.2))': dependencies: - '@storybook/addon-highlight': 8.4.5(storybook@8.4.5(prettier@3.4.2)) + '@storybook/addon-highlight': 8.4.7(storybook@8.4.7(prettier@3.4.2)) axe-core: 4.10.2 - storybook: 8.4.5(prettier@3.4.2) + storybook: 8.4.7(prettier@3.4.2) - '@storybook/addon-actions@8.4.5(storybook@8.4.5(prettier@3.4.2))': + '@storybook/addon-actions@8.4.7(storybook@8.4.7(prettier@3.4.2))': dependencies: '@storybook/global': 5.0.0 '@types/uuid': 9.0.8 dequal: 2.0.3 polished: 4.3.1 - storybook: 8.4.5(prettier@3.4.2) + storybook: 8.4.7(prettier@3.4.2) uuid: 9.0.1 - '@storybook/addon-backgrounds@8.4.5(storybook@8.4.5(prettier@3.4.2))': + '@storybook/addon-backgrounds@8.4.7(storybook@8.4.7(prettier@3.4.2))': dependencies: '@storybook/global': 5.0.0 memoizerific: 1.11.3 - storybook: 8.4.5(prettier@3.4.2) + storybook: 8.4.7(prettier@3.4.2) ts-dedent: 2.2.0 - '@storybook/addon-controls@8.4.5(storybook@8.4.5(prettier@3.4.2))': + '@storybook/addon-controls@8.4.7(storybook@8.4.7(prettier@3.4.2))': dependencies: '@storybook/global': 5.0.0 dequal: 2.0.3 - storybook: 8.4.5(prettier@3.4.2) - ts-dedent: 2.2.0 - - '@storybook/addon-docs@8.4.5(@types/react@18.3.12)(storybook@8.4.5(prettier@3.4.2))': - dependencies: - '@mdx-js/react': 3.1.0(@types/react@18.3.12)(react@18.3.1) - '@storybook/blocks': 8.4.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(storybook@8.4.5(prettier@3.4.2)) - '@storybook/csf-plugin': 8.4.5(storybook@8.4.5(prettier@3.4.2)) - '@storybook/react-dom-shim': 8.4.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(storybook@8.4.5(prettier@3.4.2)) - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) - storybook: 8.4.5(prettier@3.4.2) + storybook: 8.4.7(prettier@3.4.2) ts-dedent: 2.2.0 - transitivePeerDependencies: - - '@types/react' - '@storybook/addon-docs@8.4.7(@types/react@18.3.12)(storybook@8.4.5(prettier@3.4.2))': + '@storybook/addon-docs@8.4.7(@types/react@19.0.1)(storybook@8.4.7(prettier@3.4.2))': dependencies: - '@mdx-js/react': 3.1.0(@types/react@18.3.12)(react@18.3.1) - '@storybook/blocks': 8.4.7(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(storybook@8.4.5(prettier@3.4.2)) - '@storybook/csf-plugin': 8.4.7(storybook@8.4.5(prettier@3.4.2)) - '@storybook/react-dom-shim': 8.4.7(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(storybook@8.4.5(prettier@3.4.2)) + '@mdx-js/react': 3.1.0(@types/react@19.0.1)(react@18.3.1) + '@storybook/blocks': 8.4.7(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(storybook@8.4.7(prettier@3.4.2)) + '@storybook/csf-plugin': 8.4.7(storybook@8.4.7(prettier@3.4.2)) + '@storybook/react-dom-shim': 8.4.7(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(storybook@8.4.7(prettier@3.4.2)) react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - storybook: 8.4.5(prettier@3.4.2) + storybook: 8.4.7(prettier@3.4.2) ts-dedent: 2.2.0 transitivePeerDependencies: - '@types/react' - '@storybook/addon-essentials@8.4.5(@types/react@18.3.12)(storybook@8.4.5(prettier@3.4.2))': - dependencies: - '@storybook/addon-actions': 8.4.5(storybook@8.4.5(prettier@3.4.2)) - '@storybook/addon-backgrounds': 8.4.5(storybook@8.4.5(prettier@3.4.2)) - '@storybook/addon-controls': 8.4.5(storybook@8.4.5(prettier@3.4.2)) - '@storybook/addon-docs': 8.4.5(@types/react@18.3.12)(storybook@8.4.5(prettier@3.4.2)) - '@storybook/addon-highlight': 8.4.5(storybook@8.4.5(prettier@3.4.2)) - '@storybook/addon-measure': 8.4.5(storybook@8.4.5(prettier@3.4.2)) - '@storybook/addon-outline': 8.4.5(storybook@8.4.5(prettier@3.4.2)) - '@storybook/addon-toolbars': 8.4.5(storybook@8.4.5(prettier@3.4.2)) - '@storybook/addon-viewport': 8.4.5(storybook@8.4.5(prettier@3.4.2)) - storybook: 8.4.5(prettier@3.4.2) + '@storybook/addon-essentials@8.4.7(@types/react@19.0.1)(storybook@8.4.7(prettier@3.4.2))': + dependencies: + '@storybook/addon-actions': 8.4.7(storybook@8.4.7(prettier@3.4.2)) + '@storybook/addon-backgrounds': 8.4.7(storybook@8.4.7(prettier@3.4.2)) + '@storybook/addon-controls': 8.4.7(storybook@8.4.7(prettier@3.4.2)) + '@storybook/addon-docs': 8.4.7(@types/react@19.0.1)(storybook@8.4.7(prettier@3.4.2)) + '@storybook/addon-highlight': 8.4.7(storybook@8.4.7(prettier@3.4.2)) + '@storybook/addon-measure': 8.4.7(storybook@8.4.7(prettier@3.4.2)) + '@storybook/addon-outline': 8.4.7(storybook@8.4.7(prettier@3.4.2)) + '@storybook/addon-toolbars': 8.4.7(storybook@8.4.7(prettier@3.4.2)) + '@storybook/addon-viewport': 8.4.7(storybook@8.4.7(prettier@3.4.2)) + storybook: 8.4.7(prettier@3.4.2) ts-dedent: 2.2.0 transitivePeerDependencies: - '@types/react' - '@storybook/addon-highlight@8.4.5(storybook@8.4.5(prettier@3.4.2))': + '@storybook/addon-highlight@8.4.7(storybook@8.4.7(prettier@3.4.2))': dependencies: '@storybook/global': 5.0.0 - storybook: 8.4.5(prettier@3.4.2) + storybook: 8.4.7(prettier@3.4.2) - '@storybook/addon-interactions@8.4.5(storybook@8.4.5(prettier@3.4.2))': + '@storybook/addon-interactions@8.4.7(storybook@8.4.7(prettier@3.4.2))': dependencies: '@storybook/global': 5.0.0 - '@storybook/instrumenter': 8.4.5(storybook@8.4.5(prettier@3.4.2)) - '@storybook/test': 8.4.5(storybook@8.4.5(prettier@3.4.2)) + '@storybook/instrumenter': 8.4.7(storybook@8.4.7(prettier@3.4.2)) + '@storybook/test': 8.4.7(storybook@8.4.7(prettier@3.4.2)) polished: 4.3.1 - storybook: 8.4.5(prettier@3.4.2) + storybook: 8.4.7(prettier@3.4.2) ts-dedent: 2.2.0 - '@storybook/addon-links@8.4.5(react@18.3.1)(storybook@8.4.5(prettier@3.4.2))': + '@storybook/addon-links@8.4.7(react@19.0.0)(storybook@8.4.7(prettier@3.4.2))': dependencies: '@storybook/csf': 0.1.12 '@storybook/global': 5.0.0 - storybook: 8.4.5(prettier@3.4.2) + storybook: 8.4.7(prettier@3.4.2) ts-dedent: 2.2.0 optionalDependencies: - react: 18.3.1 + react: 19.0.0 - '@storybook/addon-measure@8.4.5(storybook@8.4.5(prettier@3.4.2))': + '@storybook/addon-measure@8.4.7(storybook@8.4.7(prettier@3.4.2))': dependencies: '@storybook/global': 5.0.0 - storybook: 8.4.5(prettier@3.4.2) + storybook: 8.4.7(prettier@3.4.2) tiny-invariant: 1.3.3 - '@storybook/addon-outline@8.4.5(storybook@8.4.5(prettier@3.4.2))': + '@storybook/addon-outline@8.4.7(storybook@8.4.7(prettier@3.4.2))': dependencies: '@storybook/global': 5.0.0 - storybook: 8.4.5(prettier@3.4.2) + storybook: 8.4.7(prettier@3.4.2) ts-dedent: 2.2.0 - '@storybook/addon-toolbars@8.4.5(storybook@8.4.5(prettier@3.4.2))': + '@storybook/addon-toolbars@8.4.7(storybook@8.4.7(prettier@3.4.2))': dependencies: - storybook: 8.4.5(prettier@3.4.2) + storybook: 8.4.7(prettier@3.4.2) - '@storybook/addon-viewport@8.4.5(storybook@8.4.5(prettier@3.4.2))': + '@storybook/addon-viewport@8.4.7(storybook@8.4.7(prettier@3.4.2))': dependencies: memoizerific: 1.11.3 - storybook: 8.4.5(prettier@3.4.2) + storybook: 8.4.7(prettier@3.4.2) - '@storybook/blocks@8.4.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(storybook@8.4.5(prettier@3.4.2))': + '@storybook/blocks@8.4.7(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(storybook@8.4.7(prettier@3.4.2))': dependencies: '@storybook/csf': 0.1.12 '@storybook/icons': 1.3.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - storybook: 8.4.5(prettier@3.4.2) + storybook: 8.4.7(prettier@3.4.2) ts-dedent: 2.2.0 optionalDependencies: react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - '@storybook/blocks@8.4.7(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(storybook@8.4.5(prettier@3.4.2))': + '@storybook/components@8.4.7(storybook@8.4.7(prettier@3.4.2))': dependencies: - '@storybook/csf': 0.1.12 - '@storybook/icons': 1.3.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - storybook: 8.4.5(prettier@3.4.2) - ts-dedent: 2.2.0 - optionalDependencies: - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) - - '@storybook/components@8.4.5(storybook@8.4.5(prettier@3.4.2))': - dependencies: - storybook: 8.4.5(prettier@3.4.2) + storybook: 8.4.7(prettier@3.4.2) - '@storybook/components@8.4.7(storybook@8.4.5(prettier@3.4.2))': + '@storybook/core-webpack@8.4.7(storybook@8.4.7(prettier@3.4.2))': dependencies: - storybook: 8.4.5(prettier@3.4.2) - - '@storybook/core-webpack@8.4.7(storybook@8.4.5(prettier@3.4.2))': - dependencies: - '@types/node': 22.10.1 - storybook: 8.4.5(prettier@3.4.2) + '@types/node': 22.10.2 + storybook: 8.4.7(prettier@3.4.2) ts-dedent: 2.2.0 - '@storybook/core@8.4.5(prettier@3.4.2)': + '@storybook/core@8.4.7(prettier@3.4.2)': dependencies: '@storybook/csf': 0.1.12 better-opn: 3.0.2 @@ -10371,14 +10304,9 @@ snapshots: - supports-color - utf-8-validate - '@storybook/csf-plugin@8.4.5(storybook@8.4.5(prettier@3.4.2))': - dependencies: - storybook: 8.4.5(prettier@3.4.2) - unplugin: 1.16.0 - - '@storybook/csf-plugin@8.4.7(storybook@8.4.5(prettier@3.4.2))': + '@storybook/csf-plugin@8.4.7(storybook@8.4.7(prettier@3.4.2))': dependencies: - storybook: 8.4.5(prettier@3.4.2) + storybook: 8.4.7(prettier@3.4.2) unplugin: 1.16.0 '@storybook/csf@0.1.12': @@ -10392,27 +10320,19 @@ snapshots: react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - '@storybook/instrumenter@8.4.5(storybook@8.4.5(prettier@3.4.2))': + '@storybook/instrumenter@8.4.7(storybook@8.4.7(prettier@3.4.2))': dependencies: '@storybook/global': 5.0.0 '@vitest/utils': 2.1.8 - storybook: 8.4.5(prettier@3.4.2) + storybook: 8.4.7(prettier@3.4.2) - '@storybook/manager-api@8.4.5(storybook@8.4.5(prettier@3.4.2))': + '@storybook/manager-api@8.4.7(storybook@8.4.7(prettier@3.4.2))': dependencies: - storybook: 8.4.5(prettier@3.4.2) + storybook: 8.4.7(prettier@3.4.2) - '@storybook/manager-api@8.4.7(storybook@8.4.5(prettier@3.4.2))': + '@storybook/preview-api@8.4.7(storybook@8.4.7(prettier@3.4.2))': dependencies: - storybook: 8.4.5(prettier@3.4.2) - - '@storybook/preview-api@8.4.5(storybook@8.4.5(prettier@3.4.2))': - dependencies: - storybook: 8.4.5(prettier@3.4.2) - - '@storybook/preview-api@8.4.7(storybook@8.4.5(prettier@3.4.2))': - dependencies: - storybook: 8.4.5(prettier@3.4.2) + storybook: 8.4.7(prettier@3.4.2) '@storybook/react-docgen-typescript-plugin@1.0.1(typescript@5.5.4)(webpack@5.97.1(esbuild@0.24.0))': dependencies: @@ -10428,87 +10348,50 @@ snapshots: transitivePeerDependencies: - supports-color - '@storybook/react-dom-shim@8.4.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(storybook@8.4.5(prettier@3.4.2))': - dependencies: - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) - storybook: 8.4.5(prettier@3.4.2) - - '@storybook/react-dom-shim@8.4.7(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(storybook@8.4.5(prettier@3.4.2))': + '@storybook/react-dom-shim@8.4.7(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(storybook@8.4.7(prettier@3.4.2))': dependencies: react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - storybook: 8.4.5(prettier@3.4.2) + storybook: 8.4.7(prettier@3.4.2) - '@storybook/react-dom-shim@8.4.7(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(storybook@8.4.5(prettier@3.4.2))': + '@storybook/react-dom-shim@8.4.7(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(storybook@8.4.7(prettier@3.4.2))': dependencies: react: 19.0.0 react-dom: 19.0.0(react@19.0.0) - storybook: 8.4.5(prettier@3.4.2) + storybook: 8.4.7(prettier@3.4.2) - '@storybook/react@8.4.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(storybook@8.4.5(prettier@3.4.2))(typescript@5.5.4)': + '@storybook/react@8.4.7(@storybook/test@8.4.7(storybook@8.4.7(prettier@3.4.2)))(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(storybook@8.4.7(prettier@3.4.2))(typescript@5.5.4)': dependencies: - '@storybook/components': 8.4.5(storybook@8.4.5(prettier@3.4.2)) + '@storybook/components': 8.4.7(storybook@8.4.7(prettier@3.4.2)) '@storybook/global': 5.0.0 - '@storybook/manager-api': 8.4.5(storybook@8.4.5(prettier@3.4.2)) - '@storybook/preview-api': 8.4.5(storybook@8.4.5(prettier@3.4.2)) - '@storybook/react-dom-shim': 8.4.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(storybook@8.4.5(prettier@3.4.2)) - '@storybook/theming': 8.4.5(storybook@8.4.5(prettier@3.4.2)) - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) - storybook: 8.4.5(prettier@3.4.2) - optionalDependencies: - typescript: 5.5.4 - - '@storybook/react@8.4.7(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(storybook@8.4.5(prettier@3.4.2))(typescript@5.5.4)': - dependencies: - '@storybook/components': 8.4.7(storybook@8.4.5(prettier@3.4.2)) - '@storybook/global': 5.0.0 - '@storybook/manager-api': 8.4.7(storybook@8.4.5(prettier@3.4.2)) - '@storybook/preview-api': 8.4.7(storybook@8.4.5(prettier@3.4.2)) - '@storybook/react-dom-shim': 8.4.7(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(storybook@8.4.5(prettier@3.4.2)) - '@storybook/theming': 8.4.7(storybook@8.4.5(prettier@3.4.2)) - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) - storybook: 8.4.5(prettier@3.4.2) - optionalDependencies: - typescript: 5.5.4 - - '@storybook/react@8.4.7(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(storybook@8.4.5(prettier@3.4.2))(typescript@5.5.4)': - dependencies: - '@storybook/components': 8.4.7(storybook@8.4.5(prettier@3.4.2)) - '@storybook/global': 5.0.0 - '@storybook/manager-api': 8.4.7(storybook@8.4.5(prettier@3.4.2)) - '@storybook/preview-api': 8.4.7(storybook@8.4.5(prettier@3.4.2)) - '@storybook/react-dom-shim': 8.4.7(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(storybook@8.4.5(prettier@3.4.2)) - '@storybook/theming': 8.4.7(storybook@8.4.5(prettier@3.4.2)) + '@storybook/manager-api': 8.4.7(storybook@8.4.7(prettier@3.4.2)) + '@storybook/preview-api': 8.4.7(storybook@8.4.7(prettier@3.4.2)) + '@storybook/react-dom-shim': 8.4.7(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(storybook@8.4.7(prettier@3.4.2)) + '@storybook/theming': 8.4.7(storybook@8.4.7(prettier@3.4.2)) react: 19.0.0 react-dom: 19.0.0(react@19.0.0) - storybook: 8.4.5(prettier@3.4.2) + storybook: 8.4.7(prettier@3.4.2) optionalDependencies: + '@storybook/test': 8.4.7(storybook@8.4.7(prettier@3.4.2)) typescript: 5.5.4 - '@storybook/test@8.4.5(storybook@8.4.5(prettier@3.4.2))': + '@storybook/test@8.4.7(storybook@8.4.7(prettier@3.4.2))': dependencies: '@storybook/csf': 0.1.12 '@storybook/global': 5.0.0 - '@storybook/instrumenter': 8.4.5(storybook@8.4.5(prettier@3.4.2)) + '@storybook/instrumenter': 8.4.7(storybook@8.4.7(prettier@3.4.2)) '@testing-library/dom': 10.4.0 '@testing-library/jest-dom': 6.5.0 '@testing-library/user-event': 14.5.2(@testing-library/dom@10.4.0) '@vitest/expect': 2.0.5 '@vitest/spy': 2.0.5 - storybook: 8.4.5(prettier@3.4.2) - - '@storybook/theming@8.4.5(storybook@8.4.5(prettier@3.4.2))': - dependencies: - storybook: 8.4.5(prettier@3.4.2) + storybook: 8.4.7(prettier@3.4.2) - '@storybook/theming@8.4.7(storybook@8.4.5(prettier@3.4.2))': + '@storybook/theming@8.4.7(storybook@8.4.7(prettier@3.4.2))': dependencies: - storybook: 8.4.5(prettier@3.4.2) + storybook: 8.4.7(prettier@3.4.2) - '@stylistic/eslint-plugin-ts@2.12.0(eslint@8.57.0)(typescript@5.7.2)': + '@stylistic/eslint-plugin-ts@2.12.1(eslint@8.57.0)(typescript@5.7.2)': dependencies: '@typescript-eslint/utils': 8.18.0(eslint@8.57.0)(typescript@5.7.2) eslint: 8.57.0 @@ -10752,24 +10635,24 @@ snapshots: '@types/body-parser@1.19.5': dependencies: '@types/connect': 3.4.38 - '@types/node': 22.10.1 + '@types/node': 22.10.2 '@types/bonjour@3.5.13': dependencies: - '@types/node': 22.10.1 + '@types/node': 22.10.2 '@types/concat-stream@2.0.3': dependencies: - '@types/node': 22.10.1 + '@types/node': 22.10.2 '@types/connect-history-api-fallback@1.5.4': dependencies: '@types/express-serve-static-core': 5.0.2 - '@types/node': 22.10.1 + '@types/node': 22.10.2 '@types/connect@3.4.38': dependencies: - '@types/node': 22.10.1 + '@types/node': 22.10.2 '@types/cookie@0.6.0': {} @@ -10781,7 +10664,7 @@ snapshots: '@types/eslint-scope@3.7.7': dependencies: - '@types/eslint': 8.56.10 + '@types/eslint': 9.6.1 '@types/estree': 1.0.6 '@types/eslint@8.56.10': @@ -10789,6 +10672,11 @@ snapshots: '@types/estree': 1.0.6 '@types/json-schema': 7.0.15 + '@types/eslint@9.6.1': + dependencies: + '@types/estree': 1.0.6 + '@types/json-schema': 7.0.15 + '@types/estree-jsx@1.0.5': dependencies: '@types/estree': 1.0.6 @@ -10797,14 +10685,14 @@ snapshots: '@types/express-serve-static-core@4.19.6': dependencies: - '@types/node': 22.10.1 + '@types/node': 22.10.2 '@types/qs': 6.9.17 '@types/range-parser': 1.2.7 '@types/send': 0.17.4 '@types/express-serve-static-core@5.0.2': dependencies: - '@types/node': 22.10.1 + '@types/node': 22.10.2 '@types/qs': 6.9.17 '@types/range-parser': 1.2.7 '@types/send': 0.17.4 @@ -10818,7 +10706,7 @@ snapshots: '@types/graceful-fs@4.1.9': dependencies: - '@types/node': 22.10.1 + '@types/node': 22.10.2 '@types/hast@3.0.4': dependencies: @@ -10832,7 +10720,7 @@ snapshots: '@types/http-proxy@1.17.15': dependencies: - '@types/node': 22.10.1 + '@types/node': 22.10.2 '@types/is-empty@1.2.3': {} @@ -10853,7 +10741,7 @@ snapshots: '@types/jsdom@20.0.1': dependencies: - '@types/node': 22.10.1 + '@types/node': 22.10.2 '@types/tough-cookie': 4.0.5 parse5: 7.2.1 @@ -10877,7 +10765,7 @@ snapshots: '@types/node-forge@1.3.11': dependencies: - '@types/node': 22.10.1 + '@types/node': 22.10.2 '@types/node@12.20.55': {} @@ -10885,29 +10773,18 @@ snapshots: dependencies: undici-types: 5.26.5 - '@types/node@22.10.1': + '@types/node@22.10.2': dependencies: undici-types: 6.20.0 - '@types/prop-types@15.7.14': {} - '@types/qs@6.9.17': {} '@types/range-parser@1.2.7': {} - '@types/react-dom@18.3.1': - dependencies: - '@types/react': 19.0.1 - '@types/react-dom@19.0.2(@types/react@19.0.1)': dependencies: '@types/react': 19.0.1 - '@types/react@18.3.12': - dependencies: - '@types/prop-types': 15.7.14 - csstype: 3.1.3 - '@types/react@19.0.1': dependencies: csstype: 3.1.3 @@ -10919,7 +10796,7 @@ snapshots: '@types/send@0.17.4': dependencies: '@types/mime': 1.3.5 - '@types/node': 22.10.1 + '@types/node': 22.10.2 '@types/serve-index@1.9.4': dependencies: @@ -10928,12 +10805,12 @@ snapshots: '@types/serve-static@1.15.7': dependencies: '@types/http-errors': 2.0.4 - '@types/node': 22.10.1 + '@types/node': 22.10.2 '@types/send': 0.17.4 '@types/sockjs@0.3.36': dependencies: - '@types/node': 22.10.1 + '@types/node': 22.10.2 '@types/stack-utils@2.0.3': {} @@ -10951,7 +10828,7 @@ snapshots: '@types/ws@8.5.13': dependencies: - '@types/node': 22.10.1 + '@types/node': 22.10.2 '@types/yargs-parser@21.0.3': {} @@ -11172,22 +11049,22 @@ snapshots: '@webassemblyjs/ast': 1.14.1 '@xtuc/long': 4.2.2 - '@webpack-cli/configtest@2.1.1(webpack-cli@5.1.4(webpack-dev-server@5.1.0)(webpack@5.97.1))(webpack@5.97.1(@swc/core@1.10.1(@swc/helpers@0.5.15))(webpack-cli@5.1.4))': + '@webpack-cli/configtest@2.1.1(webpack-cli@5.1.4(webpack-dev-server@5.2.0)(webpack@5.97.1))(webpack@5.97.1(@swc/core@1.10.1(@swc/helpers@0.5.15))(webpack-cli@5.1.4))': dependencies: webpack: 5.97.1(@swc/core@1.10.1(@swc/helpers@0.5.15))(webpack-cli@5.1.4) - webpack-cli: 5.1.4(webpack-dev-server@5.1.0)(webpack@5.97.1) + webpack-cli: 5.1.4(webpack-dev-server@5.2.0)(webpack@5.97.1) - '@webpack-cli/info@2.0.2(webpack-cli@5.1.4(webpack-dev-server@5.1.0)(webpack@5.97.1))(webpack@5.97.1(@swc/core@1.10.1(@swc/helpers@0.5.15))(webpack-cli@5.1.4))': + '@webpack-cli/info@2.0.2(webpack-cli@5.1.4(webpack-dev-server@5.2.0)(webpack@5.97.1))(webpack@5.97.1(@swc/core@1.10.1(@swc/helpers@0.5.15))(webpack-cli@5.1.4))': dependencies: webpack: 5.97.1(@swc/core@1.10.1(@swc/helpers@0.5.15))(webpack-cli@5.1.4) - webpack-cli: 5.1.4(webpack-dev-server@5.1.0)(webpack@5.97.1) + webpack-cli: 5.1.4(webpack-dev-server@5.2.0)(webpack@5.97.1) - '@webpack-cli/serve@2.0.5(webpack-cli@5.1.4(webpack-dev-server@5.1.0)(webpack@5.97.1))(webpack-dev-server@5.1.0(webpack-cli@5.1.4)(webpack@5.97.1))(webpack@5.97.1(@swc/core@1.10.1(@swc/helpers@0.5.15))(webpack-cli@5.1.4))': + '@webpack-cli/serve@2.0.5(webpack-cli@5.1.4(webpack-dev-server@5.2.0)(webpack@5.97.1))(webpack-dev-server@5.2.0(webpack-cli@5.1.4)(webpack@5.97.1))(webpack@5.97.1(@swc/core@1.10.1(@swc/helpers@0.5.15))(webpack-cli@5.1.4))': dependencies: webpack: 5.97.1(@swc/core@1.10.1(@swc/helpers@0.5.15))(webpack-cli@5.1.4) - webpack-cli: 5.1.4(webpack-dev-server@5.1.0)(webpack@5.97.1) + webpack-cli: 5.1.4(webpack-dev-server@5.2.0)(webpack@5.97.1) optionalDependencies: - webpack-dev-server: 5.1.0(webpack-cli@5.1.4)(webpack@5.97.1) + webpack-dev-server: 5.2.0(webpack-cli@5.1.4)(webpack@5.97.1) '@xtuc/ieee754@1.2.0': {} @@ -11317,7 +11194,7 @@ snapshots: define-properties: 1.2.1 es-abstract: 1.23.5 es-object-atoms: 1.0.0 - get-intrinsic: 1.2.5 + get-intrinsic: 1.2.6 is-string: 1.1.0 array-union@2.1.0: {} @@ -11369,7 +11246,7 @@ snapshots: define-properties: 1.2.1 es-abstract: 1.23.5 es-errors: 1.3.0 - get-intrinsic: 1.2.5 + get-intrinsic: 1.2.6 is-array-buffer: 3.0.4 is-shared-array-buffer: 1.0.3 @@ -11554,7 +11431,7 @@ snapshots: browserslist@4.24.2: dependencies: caniuse-lite: 1.0.30001687 - electron-to-chromium: 1.5.72 + electron-to-chromium: 1.5.73 node-releases: 2.0.19 update-browserslist-db: 1.1.1(browserslist@4.24.2) @@ -11586,9 +11463,14 @@ snapshots: dependencies: call-bind-apply-helpers: 1.0.1 es-define-property: 1.0.1 - get-intrinsic: 1.2.5 + get-intrinsic: 1.2.6 set-function-length: 1.2.2 + call-bound@1.0.2: + dependencies: + call-bind: 1.0.8 + get-intrinsic: 1.2.6 + call-me-maybe@1.0.2: {} callsites@3.1.0: {} @@ -11816,13 +11698,13 @@ snapshots: optionalDependencies: typescript: 5.5.4 - create-jest@29.7.0(@types/node@22.10.1)(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.1)(typescript@5.5.4)): + create-jest@29.7.0(@types/node@22.10.2)(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.2)(typescript@5.5.4)): dependencies: '@jest/types': 29.6.3 chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 - jest-config: 29.7.0(@types/node@22.10.1)(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.1)(typescript@5.5.4)) + jest-config: 29.7.0(@types/node@22.10.2)(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.2)(typescript@5.5.4)) jest-util: 29.7.0 prompts: 2.4.2 transitivePeerDependencies: @@ -11831,13 +11713,13 @@ snapshots: - supports-color - ts-node - create-jest@29.7.0(@types/node@22.10.1)(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.1)(typescript@5.7.2)): + create-jest@29.7.0(@types/node@22.10.2)(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.2)(typescript@5.7.2)): dependencies: '@jest/types': 29.6.3 chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 - jest-config: 29.7.0(@types/node@22.10.1)(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.1)(typescript@5.7.2)) + jest-config: 29.7.0(@types/node@22.10.2)(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.2)(typescript@5.7.2)) jest-util: 29.7.0 prompts: 2.4.2 transitivePeerDependencies: @@ -11877,7 +11759,7 @@ snapshots: icss-utils: 5.1.0(postcss@8.4.49) postcss: 8.4.49 postcss-modules-extract-imports: 3.1.0(postcss@8.4.49) - postcss-modules-local-by-default: 4.1.0(postcss@8.4.49) + postcss-modules-local-by-default: 4.2.0(postcss@8.4.49) postcss-modules-scope: 3.2.1(postcss@8.4.49) postcss-modules-values: 4.0.0(postcss@8.4.49) postcss-value-parser: 4.2.0 @@ -12150,7 +12032,7 @@ snapshots: effect@3.6.5: {} - electron-to-chromium@1.5.72: {} + electron-to-chromium@1.5.73: {} emittery@0.13.1: {} @@ -12215,7 +12097,7 @@ snapshots: es-set-tostringtag: 2.0.3 es-to-primitive: 1.3.0 function.prototype.name: 1.1.6 - get-intrinsic: 1.2.5 + get-intrinsic: 1.2.6 get-symbol-description: 1.0.2 globalthis: 1.0.4 gopd: 1.2.0 @@ -12239,8 +12121,8 @@ snapshots: regexp.prototype.flags: 1.5.3 safe-array-concat: 1.1.2 safe-regex-test: 1.0.3 - string.prototype.trim: 1.2.9 - string.prototype.trimend: 1.0.8 + string.prototype.trim: 1.2.10 + string.prototype.trimend: 1.0.9 string.prototype.trimstart: 1.0.8 typed-array-buffer: 1.0.2 typed-array-byte-length: 1.0.1 @@ -12261,7 +12143,7 @@ snapshots: es-errors: 1.3.0 es-set-tostringtag: 2.0.3 function-bind: 1.1.2 - get-intrinsic: 1.2.5 + get-intrinsic: 1.2.6 globalthis: 1.0.4 gopd: 1.2.0 has-property-descriptors: 1.0.2 @@ -12279,7 +12161,7 @@ snapshots: es-set-tostringtag@2.0.3: dependencies: - get-intrinsic: 1.2.5 + get-intrinsic: 1.2.6 has-tostringtag: 1.0.2 hasown: 2.0.2 @@ -12407,7 +12289,7 @@ snapshots: object.groupby: 1.0.3 object.values: 1.2.0 semver: 6.3.1 - string.prototype.trimend: 1.0.8 + string.prototype.trimend: 1.0.9 tsconfig-paths: 3.15.0 optionalDependencies: '@typescript-eslint/parser': 8.18.0(eslint@8.57.0)(typescript@5.7.2) @@ -12416,13 +12298,13 @@ snapshots: - eslint-import-resolver-webpack - supports-color - eslint-plugin-jest@28.9.0(@typescript-eslint/eslint-plugin@8.18.0(@typescript-eslint/parser@8.18.0(eslint@8.57.0)(typescript@5.7.2))(eslint@8.57.0)(typescript@5.7.2))(eslint@8.57.0)(jest@29.7.0(@types/node@22.10.1)(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.1)(typescript@5.7.2)))(typescript@5.7.2): + eslint-plugin-jest@28.9.0(@typescript-eslint/eslint-plugin@8.18.0(@typescript-eslint/parser@8.18.0(eslint@8.57.0)(typescript@5.7.2))(eslint@8.57.0)(typescript@5.7.2))(eslint@8.57.0)(jest@29.7.0(@types/node@22.10.2)(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.2)(typescript@5.7.2)))(typescript@5.7.2): dependencies: '@typescript-eslint/utils': 8.18.0(eslint@8.57.0)(typescript@5.7.2) eslint: 8.57.0 optionalDependencies: '@typescript-eslint/eslint-plugin': 8.18.0(@typescript-eslint/parser@8.18.0(eslint@8.57.0)(typescript@5.7.2))(eslint@8.57.0)(typescript@5.7.2) - jest: 29.7.0(@types/node@22.10.1)(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.1)(typescript@5.7.2)) + jest: 29.7.0(@types/node@22.10.2)(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.2)(typescript@5.7.2)) transitivePeerDependencies: - supports-color - typescript @@ -12871,16 +12753,18 @@ snapshots: get-east-asian-width@1.3.0: {} - get-intrinsic@1.2.5: + get-intrinsic@1.2.6: dependencies: call-bind-apply-helpers: 1.0.1 dunder-proto: 1.0.0 es-define-property: 1.0.1 es-errors: 1.3.0 + es-object-atoms: 1.0.0 function-bind: 1.1.2 gopd: 1.2.0 has-symbols: 1.1.0 hasown: 2.0.2 + math-intrinsics: 1.0.0 get-package-type@0.1.0: {} @@ -12892,7 +12776,7 @@ snapshots: dependencies: call-bind: 1.0.8 es-errors: 1.3.0 - get-intrinsic: 1.2.5 + get-intrinsic: 1.2.6 git-hooks-list@3.1.0: {} @@ -13198,7 +13082,7 @@ snapshots: dependencies: es-errors: 1.3.0 hasown: 2.0.2 - side-channel: 1.0.6 + side-channel: 1.1.0 interpret@3.1.1: {} @@ -13228,7 +13112,7 @@ snapshots: is-array-buffer@3.0.4: dependencies: call-bind: 1.0.8 - get-intrinsic: 1.2.5 + get-intrinsic: 1.2.6 is-arrayish@0.2.1: {} @@ -13377,7 +13261,7 @@ snapshots: is-weakset@2.0.3: dependencies: call-bind: 1.0.8 - get-intrinsic: 1.2.5 + get-intrinsic: 1.2.6 is-windows@1.0.2: {} @@ -13445,7 +13329,7 @@ snapshots: iterator.prototype@1.1.3: dependencies: define-properties: 1.2.1 - get-intrinsic: 1.2.5 + get-intrinsic: 1.2.6 has-symbols: 1.1.0 reflect.getprototypeof: 1.0.8 set-function-name: 2.0.2 @@ -13468,7 +13352,7 @@ snapshots: '@jest/expect': 29.7.0 '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.10.1 + '@types/node': 22.10.2 chalk: 4.1.2 co: 4.6.0 dedent: 1.5.3 @@ -13488,16 +13372,16 @@ snapshots: - babel-plugin-macros - supports-color - jest-cli@29.7.0(@types/node@22.10.1)(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.1)(typescript@5.5.4)): + jest-cli@29.7.0(@types/node@22.10.2)(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.2)(typescript@5.5.4)): dependencies: - '@jest/core': 29.7.0(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.1)(typescript@5.5.4)) + '@jest/core': 29.7.0(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.2)(typescript@5.5.4)) '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 chalk: 4.1.2 - create-jest: 29.7.0(@types/node@22.10.1)(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.1)(typescript@5.5.4)) + create-jest: 29.7.0(@types/node@22.10.2)(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.2)(typescript@5.5.4)) exit: 0.1.2 import-local: 3.2.0 - jest-config: 29.7.0(@types/node@22.10.1)(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.1)(typescript@5.5.4)) + jest-config: 29.7.0(@types/node@22.10.2)(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.2)(typescript@5.5.4)) jest-util: 29.7.0 jest-validate: 29.7.0 yargs: 17.7.2 @@ -13507,16 +13391,16 @@ snapshots: - supports-color - ts-node - jest-cli@29.7.0(@types/node@22.10.1)(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.1)(typescript@5.7.2)): + jest-cli@29.7.0(@types/node@22.10.2)(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.2)(typescript@5.7.2)): dependencies: - '@jest/core': 29.7.0(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.1)(typescript@5.7.2)) + '@jest/core': 29.7.0(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.2)(typescript@5.7.2)) '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 chalk: 4.1.2 - create-jest: 29.7.0(@types/node@22.10.1)(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.1)(typescript@5.7.2)) + create-jest: 29.7.0(@types/node@22.10.2)(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.2)(typescript@5.7.2)) exit: 0.1.2 import-local: 3.2.0 - jest-config: 29.7.0(@types/node@22.10.1)(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.1)(typescript@5.7.2)) + jest-config: 29.7.0(@types/node@22.10.2)(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.2)(typescript@5.7.2)) jest-util: 29.7.0 jest-validate: 29.7.0 yargs: 17.7.2 @@ -13526,7 +13410,7 @@ snapshots: - supports-color - ts-node - jest-config@29.7.0(@types/node@22.10.1)(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.1)(typescript@5.5.4)): + jest-config@29.7.0(@types/node@22.10.2)(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.2)(typescript@5.5.4)): dependencies: '@babel/core': 7.26.0 '@jest/test-sequencer': 29.7.0 @@ -13551,13 +13435,13 @@ snapshots: slash: 3.0.0 strip-json-comments: 3.1.1 optionalDependencies: - '@types/node': 22.10.1 - ts-node: 10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.1)(typescript@5.5.4) + '@types/node': 22.10.2 + ts-node: 10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.2)(typescript@5.5.4) transitivePeerDependencies: - babel-plugin-macros - supports-color - jest-config@29.7.0(@types/node@22.10.1)(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.1)(typescript@5.7.2)): + jest-config@29.7.0(@types/node@22.10.2)(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.2)(typescript@5.7.2)): dependencies: '@babel/core': 7.26.0 '@jest/test-sequencer': 29.7.0 @@ -13582,8 +13466,8 @@ snapshots: slash: 3.0.0 strip-json-comments: 3.1.1 optionalDependencies: - '@types/node': 22.10.1 - ts-node: 10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.1)(typescript@5.7.2) + '@types/node': 22.10.2 + ts-node: 10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.2)(typescript@5.7.2) transitivePeerDependencies: - babel-plugin-macros - supports-color @@ -13613,7 +13497,7 @@ snapshots: '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 '@types/jsdom': 20.0.1 - '@types/node': 22.10.1 + '@types/node': 22.10.2 jest-mock: 29.7.0 jest-util: 29.7.0 jsdom: 20.0.3 @@ -13627,7 +13511,7 @@ snapshots: '@jest/environment': 29.7.0 '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.10.1 + '@types/node': 22.10.2 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -13637,7 +13521,7 @@ snapshots: dependencies: '@jest/types': 29.6.3 '@types/graceful-fs': 4.1.9 - '@types/node': 22.10.1 + '@types/node': 22.10.2 anymatch: 3.1.3 fb-watchman: 2.0.2 graceful-fs: 4.2.11 @@ -13676,7 +13560,7 @@ snapshots: jest-mock@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 22.10.1 + '@types/node': 22.10.2 jest-util: 29.7.0 jest-pnp-resolver@1.2.3(jest-resolve@29.7.0): @@ -13711,7 +13595,7 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.10.1 + '@types/node': 22.10.2 chalk: 4.1.2 emittery: 0.13.1 graceful-fs: 4.2.11 @@ -13739,7 +13623,7 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.10.1 + '@types/node': 22.10.2 chalk: 4.1.2 cjs-module-lexer: 1.4.1 collect-v8-coverage: 1.0.2 @@ -13785,7 +13669,7 @@ snapshots: jest-util@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 22.10.1 + '@types/node': 22.10.2 chalk: 4.1.2 ci-info: 3.9.0 graceful-fs: 4.2.11 @@ -13804,7 +13688,7 @@ snapshots: dependencies: '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.10.1 + '@types/node': 22.10.2 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.13.1 @@ -13813,35 +13697,35 @@ snapshots: jest-worker@27.5.1: dependencies: - '@types/node': 22.10.1 + '@types/node': 22.10.2 merge-stream: 2.0.0 supports-color: 8.1.1 jest-worker@29.7.0: dependencies: - '@types/node': 22.10.1 + '@types/node': 22.10.2 jest-util: 29.7.0 merge-stream: 2.0.0 supports-color: 8.1.1 - jest@29.7.0(@types/node@22.10.1)(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.1)(typescript@5.5.4)): + jest@29.7.0(@types/node@22.10.2)(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.2)(typescript@5.5.4)): dependencies: - '@jest/core': 29.7.0(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.1)(typescript@5.5.4)) + '@jest/core': 29.7.0(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.2)(typescript@5.5.4)) '@jest/types': 29.6.3 import-local: 3.2.0 - jest-cli: 29.7.0(@types/node@22.10.1)(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.1)(typescript@5.5.4)) + jest-cli: 29.7.0(@types/node@22.10.2)(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.2)(typescript@5.5.4)) transitivePeerDependencies: - '@types/node' - babel-plugin-macros - supports-color - ts-node - jest@29.7.0(@types/node@22.10.1)(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.1)(typescript@5.7.2)): + jest@29.7.0(@types/node@22.10.2)(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.2)(typescript@5.7.2)): dependencies: - '@jest/core': 29.7.0(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.1)(typescript@5.7.2)) + '@jest/core': 29.7.0(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.2)(typescript@5.7.2)) '@jest/types': 29.6.3 import-local: 3.2.0 - jest-cli: 29.7.0(@types/node@22.10.1)(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.1)(typescript@5.7.2)) + jest-cli: 29.7.0(@types/node@22.10.2)(ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.2)(typescript@5.7.2)) transitivePeerDependencies: - '@types/node' - babel-plugin-macros @@ -13902,6 +13786,8 @@ snapshots: jsesc@3.0.2: {} + jsesc@3.1.0: {} + json-buffer@3.0.1: {} json-parse-even-better-errors@2.3.1: {} @@ -13956,11 +13842,11 @@ snapshots: kleur@4.1.5: {} - knip@5.39.2(@types/node@22.10.1)(typescript@5.5.4): + knip@5.39.4(@types/node@22.10.2)(typescript@5.5.4): dependencies: '@nodelib/fs.walk': 1.2.8 '@snyk/github-codeowners': 1.1.0 - '@types/node': 22.10.1 + '@types/node': 22.10.2 easy-table: 1.2.0 enhanced-resolve: 5.17.1 fast-glob: 3.3.2 @@ -13974,8 +13860,8 @@ snapshots: strip-json-comments: 5.0.1 summary: 2.1.0 typescript: 5.5.4 - zod: 3.24.0 - zod-validation-error: 3.4.0(zod@3.24.0) + zod: 3.24.1 + zod-validation-error: 3.4.0(zod@3.24.1) known-css-properties@0.35.0: {} @@ -14085,6 +13971,8 @@ snapshots: map-or-similar@1.5.0: {} + math-intrinsics@1.0.0: {} + mathml-tag-names@2.1.3: {} mdast-util-from-markdown@0.8.5: @@ -14451,7 +14339,7 @@ snapshots: mini-css-extract-plugin@2.9.2(webpack@5.97.1(@swc/core@1.10.1(@swc/helpers@0.5.15))): dependencies: - schema-utils: 4.2.0 + schema-utils: 4.3.0 tapable: 2.2.1 webpack: 5.97.1(@swc/core@1.10.1(@swc/helpers@0.5.15)) @@ -14488,12 +14376,12 @@ snapshots: ms@2.1.3: {} - msw@2.6.8(@types/node@22.10.1)(typescript@5.5.4): + msw@2.6.8(@types/node@22.10.2)(typescript@5.5.4): dependencies: '@bundled-es-modules/cookie': 2.0.1 '@bundled-es-modules/statuses': 1.0.1 '@bundled-es-modules/tough-cookie': 0.1.6 - '@inquirer/confirm': 5.1.0(@types/node@22.10.1) + '@inquirer/confirm': 5.1.0(@types/node@22.10.2) '@mswjs/interceptors': 0.37.3 '@open-draft/deferred-promise': 2.2.0 '@open-draft/until': 2.1.0 @@ -15006,7 +14894,7 @@ snapshots: dependencies: postcss: 8.4.49 - postcss-modules-local-by-default@4.1.0(postcss@8.4.49): + postcss-modules-local-by-default@4.2.0(postcss@8.4.49): dependencies: icss-utils: 5.1.0(postcss@8.4.49) postcss: 8.4.49 @@ -15222,11 +15110,11 @@ snapshots: qs@6.13.0: dependencies: - side-channel: 1.0.6 + side-channel: 1.1.0 qs@6.13.1: dependencies: - side-channel: 1.0.6 + side-channel: 1.1.0 query-registry@3.0.1: dependencies: @@ -15234,7 +15122,7 @@ snapshots: quick-lru: 7.0.0 url-join: 5.0.0 validate-npm-package-name: 5.0.1 - zod: 3.24.0 + zod: 3.24.1 zod-package-json: 1.0.3 query-string@9.1.1: @@ -15381,7 +15269,7 @@ snapshots: dunder-proto: 1.0.0 es-abstract: 1.23.5 es-errors: 1.3.0 - get-intrinsic: 1.2.5 + get-intrinsic: 1.2.6 gopd: 1.2.0 which-builtin-type: 1.2.0 @@ -15541,7 +15429,7 @@ snapshots: safe-array-concat@1.1.2: dependencies: call-bind: 1.0.8 - get-intrinsic: 1.2.5 + get-intrinsic: 1.2.6 has-symbols: 1.1.0 isarray: 2.0.5 @@ -15573,7 +15461,7 @@ snapshots: ajv: 6.12.6 ajv-keywords: 3.5.2(ajv@6.12.6) - schema-utils@4.2.0: + schema-utils@4.3.0: dependencies: '@types/json-schema': 7.0.15 ajv: 8.17.1 @@ -15643,7 +15531,7 @@ snapshots: define-data-property: 1.1.4 es-errors: 1.3.0 function-bind: 1.1.2 - get-intrinsic: 1.2.5 + get-intrinsic: 1.2.6 gopd: 1.2.0 has-property-descriptors: 1.0.2 @@ -15670,13 +15558,34 @@ snapshots: shell-quote@1.8.2: {} - side-channel@1.0.6: + side-channel-list@1.0.0: dependencies: - call-bind: 1.0.8 es-errors: 1.3.0 - get-intrinsic: 1.2.5 object-inspect: 1.13.3 + side-channel-map@1.0.1: + dependencies: + call-bound: 1.0.2 + es-errors: 1.3.0 + get-intrinsic: 1.2.6 + object-inspect: 1.13.3 + + side-channel-weakmap@1.0.2: + dependencies: + call-bound: 1.0.2 + es-errors: 1.3.0 + get-intrinsic: 1.2.6 + object-inspect: 1.13.3 + side-channel-map: 1.0.1 + + side-channel@1.1.0: + dependencies: + es-errors: 1.3.0 + object-inspect: 1.13.3 + side-channel-list: 1.0.0 + side-channel-map: 1.0.1 + side-channel-weakmap: 1.0.2 + signal-exit@3.0.7: {} signal-exit@4.1.0: {} @@ -15805,12 +15714,12 @@ snapshots: stdin-discarder@0.2.2: {} - storybook-builder-rsbuild@0.1.5(@rsbuild/core@1.1.9)(@rspack/core@1.1.6(@swc/helpers@0.5.15))(@types/react@18.3.12)(storybook@8.4.5(prettier@3.4.2))(typescript@5.5.4): + storybook-builder-rsbuild@0.1.6(@rsbuild/core@1.1.9)(@rspack/core@1.1.6(@swc/helpers@0.5.15))(@types/react@19.0.1)(storybook@8.4.7(prettier@3.4.2))(typescript@5.5.4): dependencies: '@rsbuild/core': 1.1.9 '@rsbuild/plugin-type-check': 1.1.0(@rsbuild/core@1.1.9)(@rspack/core@1.1.6(@swc/helpers@0.5.15))(typescript@5.5.4) - '@storybook/addon-docs': 8.4.7(@types/react@18.3.12)(storybook@8.4.5(prettier@3.4.2)) - '@storybook/core-webpack': 8.4.7(storybook@8.4.5(prettier@3.4.2)) + '@storybook/addon-docs': 8.4.7(@types/react@19.0.1)(storybook@8.4.7(prettier@3.4.2)) + '@storybook/core-webpack': 8.4.7(storybook@8.4.7(prettier@3.4.2)) browser-assert: 1.2.1 case-sensitive-paths-webpack-plugin: 2.4.0 cjs-module-lexer: 1.4.1 @@ -15822,7 +15731,7 @@ snapshots: process: 0.11.10 rsbuild-plugin-html-minifier-terser: 1.1.1(@rsbuild/core@1.1.9) sirv: 2.0.4 - storybook: 8.4.5(prettier@3.4.2) + storybook: 8.4.7(prettier@3.4.2) ts-dedent: 2.2.0 url: 0.11.4 util: 0.12.5 @@ -15833,21 +15742,21 @@ snapshots: - '@rspack/core' - '@types/react' - storybook-react-rsbuild@0.1.5(@rsbuild/core@1.1.9)(@rspack/core@1.1.6(@swc/helpers@0.5.15))(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(rollup@4.28.1)(storybook@8.4.5(prettier@3.4.2))(typescript@5.5.4)(webpack@5.97.1(esbuild@0.24.0)): + storybook-react-rsbuild@0.1.6(@rsbuild/core@1.1.9)(@rspack/core@1.1.6(@swc/helpers@0.5.15))(@storybook/test@8.4.7(storybook@8.4.7(prettier@3.4.2)))(@types/react@19.0.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(rollup@4.28.1)(storybook@8.4.7(prettier@3.4.2))(typescript@5.5.4)(webpack@5.97.1(esbuild@0.24.0)): dependencies: '@rollup/pluginutils': 5.1.3(rollup@4.28.1) '@rsbuild/core': 1.1.9 - '@storybook/react': 8.4.7(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(storybook@8.4.5(prettier@3.4.2))(typescript@5.5.4) + '@storybook/react': 8.4.7(@storybook/test@8.4.7(storybook@8.4.7(prettier@3.4.2)))(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(storybook@8.4.7(prettier@3.4.2))(typescript@5.5.4) '@storybook/react-docgen-typescript-plugin': 1.0.1(typescript@5.5.4)(webpack@5.97.1(esbuild@0.24.0)) '@types/node': 18.19.68 find-up: 5.0.0 magic-string: 0.30.15 - react: 18.3.1 + react: 19.0.0 react-docgen: 7.1.0 - react-dom: 18.3.1(react@18.3.1) + react-dom: 19.0.0(react@19.0.0) resolve: 1.22.8 - storybook: 8.4.5(prettier@3.4.2) - storybook-builder-rsbuild: 0.1.5(@rsbuild/core@1.1.9)(@rspack/core@1.1.6(@swc/helpers@0.5.15))(@types/react@18.3.12)(storybook@8.4.5(prettier@3.4.2))(typescript@5.5.4) + storybook: 8.4.7(prettier@3.4.2) + storybook-builder-rsbuild: 0.1.6(@rsbuild/core@1.1.9)(@rspack/core@1.1.6(@swc/helpers@0.5.15))(@types/react@19.0.1)(storybook@8.4.7(prettier@3.4.2))(typescript@5.5.4) tsconfig-paths: 4.2.0 optionalDependencies: typescript: 5.5.4 @@ -15859,9 +15768,9 @@ snapshots: - supports-color - webpack - storybook@8.4.5(prettier@3.4.2): + storybook@8.4.7(prettier@3.4.2): dependencies: - '@storybook/core': 8.4.5(prettier@3.4.2) + '@storybook/core': 8.4.7(prettier@3.4.2) optionalDependencies: prettier: 3.4.2 transitivePeerDependencies: @@ -15915,29 +15824,33 @@ snapshots: es-abstract: 1.23.5 es-errors: 1.3.0 es-object-atoms: 1.0.0 - get-intrinsic: 1.2.5 + get-intrinsic: 1.2.6 gopd: 1.2.0 has-symbols: 1.1.0 internal-slot: 1.0.7 regexp.prototype.flags: 1.5.3 set-function-name: 2.0.2 - side-channel: 1.0.6 + side-channel: 1.1.0 string.prototype.repeat@1.0.0: dependencies: define-properties: 1.2.1 es-abstract: 1.23.5 - string.prototype.trim@1.2.9: + string.prototype.trim@1.2.10: dependencies: call-bind: 1.0.8 + call-bound: 1.0.2 + define-data-property: 1.1.4 define-properties: 1.2.1 es-abstract: 1.23.5 es-object-atoms: 1.0.0 + has-property-descriptors: 1.0.2 - string.prototype.trimend@1.0.8: + string.prototype.trimend@1.0.9: dependencies: call-bind: 1.0.8 + call-bound: 1.0.2 define-properties: 1.2.1 es-object-atoms: 1.0.0 @@ -16051,7 +15964,7 @@ snapshots: sucrase@3.35.0: dependencies: - '@jridgewell/gen-mapping': 0.3.5 + '@jridgewell/gen-mapping': 0.3.8 commander: 4.1.1 glob: 10.4.5 lines-and-columns: 1.2.4 @@ -16286,14 +16199,14 @@ snapshots: ts-interface-checker@0.1.13: {} - ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.1)(typescript@5.5.4): + ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.2)(typescript@5.5.4): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.11 '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 - '@types/node': 22.10.1 + '@types/node': 22.10.2 acorn: 8.14.0 acorn-walk: 8.3.4 arg: 4.1.3 @@ -16306,14 +16219,14 @@ snapshots: optionalDependencies: '@swc/core': 1.10.1(@swc/helpers@0.5.15) - ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.1)(typescript@5.7.2): + ts-node@10.9.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(@types/node@22.10.2)(typescript@5.7.2): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.11 '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 - '@types/node': 22.10.1 + '@types/node': 22.10.2 acorn: 8.14.0 acorn-walk: 8.3.4 arg: 4.1.3 @@ -16343,7 +16256,7 @@ snapshots: tslib@2.8.1: {} - tsup@8.3.5(@swc/core@1.10.1(@swc/helpers@0.5.15))(jiti@2.4.1)(postcss@8.4.49)(typescript@5.7.2)(yaml@2.6.1): + tsup@8.3.5(@swc/core@1.10.1)(jiti@2.4.1)(postcss@8.4.49)(typescript@5.5.4)(yaml@2.6.1): dependencies: bundle-require: 5.0.0(esbuild@0.24.0) cac: 6.7.14 @@ -16364,14 +16277,14 @@ snapshots: optionalDependencies: '@swc/core': 1.10.1(@swc/helpers@0.5.15) postcss: 8.4.49 - typescript: 5.7.2 + typescript: 5.5.4 transitivePeerDependencies: - jiti - supports-color - tsx - yaml - tsup@8.3.5(@swc/core@1.10.1)(jiti@2.4.1)(postcss@8.4.49)(typescript@5.5.4)(yaml@2.6.1): + tsup@8.3.5(@swc/core@1.10.1)(jiti@2.4.1)(postcss@8.4.49)(typescript@5.7.2)(yaml@2.6.1): dependencies: bundle-require: 5.0.0(esbuild@0.24.0) cac: 6.7.14 @@ -16392,7 +16305,7 @@ snapshots: optionalDependencies: '@swc/core': 1.10.1(@swc/helpers@0.5.15) postcss: 8.4.49 - typescript: 5.5.4 + typescript: 5.7.2 transitivePeerDependencies: - jiti - supports-color @@ -16434,6 +16347,8 @@ snapshots: type-detect@4.0.8: {} + type-detect@4.1.0: {} + type-fest@0.20.2: {} type-fest@0.21.3: {} @@ -16525,7 +16440,7 @@ snapshots: '@types/concat-stream': 2.0.3 '@types/debug': 4.1.12 '@types/is-empty': 1.2.3 - '@types/node': 22.10.1 + '@types/node': 22.10.2 '@types/unist': 3.0.3 concat-stream: 2.0.0 debug: 4.4.0(supports-color@5.5.0) @@ -16736,12 +16651,12 @@ snapshots: webidl-conversions@7.0.0: {} - webpack-cli@5.1.4(webpack-dev-server@5.1.0)(webpack@5.97.1): + webpack-cli@5.1.4(webpack-dev-server@5.2.0)(webpack@5.97.1): dependencies: '@discoveryjs/json-ext': 0.5.7 - '@webpack-cli/configtest': 2.1.1(webpack-cli@5.1.4(webpack-dev-server@5.1.0)(webpack@5.97.1))(webpack@5.97.1(@swc/core@1.10.1(@swc/helpers@0.5.15))(webpack-cli@5.1.4)) - '@webpack-cli/info': 2.0.2(webpack-cli@5.1.4(webpack-dev-server@5.1.0)(webpack@5.97.1))(webpack@5.97.1(@swc/core@1.10.1(@swc/helpers@0.5.15))(webpack-cli@5.1.4)) - '@webpack-cli/serve': 2.0.5(webpack-cli@5.1.4(webpack-dev-server@5.1.0)(webpack@5.97.1))(webpack-dev-server@5.1.0(webpack-cli@5.1.4)(webpack@5.97.1))(webpack@5.97.1(@swc/core@1.10.1(@swc/helpers@0.5.15))(webpack-cli@5.1.4)) + '@webpack-cli/configtest': 2.1.1(webpack-cli@5.1.4(webpack-dev-server@5.2.0)(webpack@5.97.1))(webpack@5.97.1(@swc/core@1.10.1(@swc/helpers@0.5.15))(webpack-cli@5.1.4)) + '@webpack-cli/info': 2.0.2(webpack-cli@5.1.4(webpack-dev-server@5.2.0)(webpack@5.97.1))(webpack@5.97.1(@swc/core@1.10.1(@swc/helpers@0.5.15))(webpack-cli@5.1.4)) + '@webpack-cli/serve': 2.0.5(webpack-cli@5.1.4(webpack-dev-server@5.2.0)(webpack@5.97.1))(webpack-dev-server@5.2.0(webpack-cli@5.1.4)(webpack@5.97.1))(webpack@5.97.1(@swc/core@1.10.1(@swc/helpers@0.5.15))(webpack-cli@5.1.4)) colorette: 2.0.20 commander: 10.0.1 cross-spawn: 7.0.6 @@ -16753,7 +16668,7 @@ snapshots: webpack: 5.97.1(@swc/core@1.10.1(@swc/helpers@0.5.15))(webpack-cli@5.1.4) webpack-merge: 5.10.0 optionalDependencies: - webpack-dev-server: 5.1.0(webpack-cli@5.1.4)(webpack@5.97.1) + webpack-dev-server: 5.2.0(webpack-cli@5.1.4)(webpack@5.97.1) webpack-dev-middleware@7.4.2(webpack@5.97.1(@swc/core@1.10.1(@swc/helpers@0.5.15))(webpack-cli@5.1.4)): dependencies: @@ -16762,7 +16677,7 @@ snapshots: mime-types: 2.1.35 on-finished: 2.4.1 range-parser: 1.2.1 - schema-utils: 4.2.0 + schema-utils: 4.3.0 optionalDependencies: webpack: 5.97.1(@swc/core@1.10.1(@swc/helpers@0.5.15))(webpack-cli@5.1.4) @@ -16773,11 +16688,11 @@ snapshots: mime-types: 2.1.35 on-finished: 2.4.1 range-parser: 1.2.1 - schema-utils: 4.2.0 + schema-utils: 4.3.0 optionalDependencies: webpack: 5.97.1(@swc/core@1.10.1(@swc/helpers@0.5.15)) - webpack-dev-server@5.1.0(webpack-cli@5.1.4)(webpack@5.97.1): + webpack-dev-server@5.2.0(webpack-cli@5.1.4)(webpack@5.97.1): dependencies: '@types/bonjour': 3.5.13 '@types/connect-history-api-fallback': 1.5.4 @@ -16794,13 +16709,12 @@ snapshots: connect-history-api-fallback: 2.0.0 express: 4.21.2 graceful-fs: 4.2.11 - html-entities: 2.5.2 http-proxy-middleware: 2.0.7(@types/express@4.17.21) ipaddr.js: 2.2.0 launch-editor: 2.9.1 open: 10.1.0 p-retry: 6.2.1 - schema-utils: 4.2.0 + schema-utils: 4.3.0 selfsigned: 2.4.1 serve-index: 1.9.1 sockjs: 0.3.24 @@ -16809,14 +16723,14 @@ snapshots: ws: 8.18.0 optionalDependencies: webpack: 5.97.1(@swc/core@1.10.1(@swc/helpers@0.5.15))(webpack-cli@5.1.4) - webpack-cli: 5.1.4(webpack-dev-server@5.1.0)(webpack@5.97.1) + webpack-cli: 5.1.4(webpack-dev-server@5.2.0)(webpack@5.97.1) transitivePeerDependencies: - bufferutil - debug - supports-color - utf-8-validate - webpack-dev-server@5.1.0(webpack@5.97.1(@swc/core@1.10.1(@swc/helpers@0.5.15))): + webpack-dev-server@5.2.0(webpack@5.97.1(@swc/core@1.10.1(@swc/helpers@0.5.15))): dependencies: '@types/bonjour': 3.5.13 '@types/connect-history-api-fallback': 1.5.4 @@ -16833,13 +16747,12 @@ snapshots: connect-history-api-fallback: 2.0.0 express: 4.21.2 graceful-fs: 4.2.11 - html-entities: 2.5.2 http-proxy-middleware: 2.0.7(@types/express@4.17.21) ipaddr.js: 2.2.0 launch-editor: 2.9.1 open: 10.1.0 p-retry: 6.2.1 - schema-utils: 4.2.0 + schema-utils: 4.3.0 selfsigned: 2.4.1 serve-index: 1.9.1 sockjs: 0.3.24 @@ -16920,7 +16833,7 @@ snapshots: watchpack: 2.4.2 webpack-sources: 3.2.3 optionalDependencies: - webpack-cli: 5.1.4(webpack-dev-server@5.1.0)(webpack@5.97.1) + webpack-cli: 5.1.4(webpack-dev-server@5.2.0)(webpack@5.97.1) transitivePeerDependencies: - '@swc/core' - esbuild @@ -17107,12 +17020,12 @@ snapshots: zod-package-json@1.0.3: dependencies: - zod: 3.24.0 + zod: 3.24.1 - zod-validation-error@3.4.0(zod@3.24.0): + zod-validation-error@3.4.0(zod@3.24.1): dependencies: - zod: 3.24.0 + zod: 3.24.1 - zod@3.24.0: {} + zod@3.24.1: {} zwitch@2.0.4: {} diff --git a/samples/rsbuild/app/package.json b/samples/rsbuild/app/package.json index 2f24ef82..008d380a 100644 --- a/samples/rsbuild/app/package.json +++ b/samples/rsbuild/app/package.json @@ -30,7 +30,7 @@ "@swc/jest": "0.2.37", "@testing-library/react": "16.1.0", "@types/jest": "29.5.14", - "@types/node": "22.10.1", + "@types/node": "22.10.2", "@types/react": "19.0.1", "@types/react-dom": "19.0.2", "@typescript-eslint/parser": "8.18.0", diff --git a/samples/storybook/package.json b/samples/storybook/package.json index 959a19ee..0c9103d4 100644 --- a/samples/storybook/package.json +++ b/samples/storybook/package.json @@ -11,19 +11,19 @@ "typecheck": "tsc" }, "dependencies": { - "react": "18.3.1", - "react-dom": "18.3.1" + "react": "19.0.0", + "react-dom": "19.0.0" }, "devDependencies": { "@rsbuild/core": "1.1.9", "@rspack/core": "1.1.6", - "@storybook/addon-a11y": "8.4.5", - "@storybook/addon-essentials": "8.4.5", - "@storybook/addon-interactions": "8.4.5", - "@storybook/addon-links": "8.4.5", - "@storybook/react": "8.4.5", - "@types/react": "18.3.12", - "@types/react-dom": "18.3.1", + "@storybook/addon-a11y": "8.4.7", + "@storybook/addon-essentials": "8.4.7", + "@storybook/addon-interactions": "8.4.7", + "@storybook/addon-links": "8.4.7", + "@storybook/react": "8.4.7", + "@types/react": "19.0.1", + "@types/react-dom": "19.0.2", "@workleap/browserslist-config": "workspace:*", "@workleap/eslint-plugin": "workspace:*", "@workleap/rsbuild-configs": "workspace:*", @@ -31,8 +31,8 @@ "browserslist": "4.24.2", "eslint": "8.57.0", "http-server": "14.1.1", - "storybook": "8.4.5", - "storybook-react-rsbuild": "0.1.5", + "storybook": "8.4.7", + "storybook-react-rsbuild": "0.1.6", "typescript": "5.5.4" } } diff --git a/samples/webpack/app/package.json b/samples/webpack/app/package.json index 18428d00..f33aab20 100644 --- a/samples/webpack/app/package.json +++ b/samples/webpack/app/package.json @@ -30,7 +30,7 @@ "@swc/jest": "0.2.37", "@testing-library/react": "16.1.0", "@types/jest": "29.5.14", - "@types/node": "22.10.1", + "@types/node": "22.10.2", "@types/react": "19.0.1", "@types/react-dom": "19.0.2", "@typescript-eslint/parser": "8.18.0", @@ -56,7 +56,7 @@ "typescript": "5.5.4", "webpack": "5.97.1", "webpack-cli": "5.1.4", - "webpack-dev-server": "5.1.0" + "webpack-dev-server": "5.2.0" }, "msw": { "workerDirectory": "public" From 42817bcca97a81efa68779d9b2513687fcdf0d87 Mon Sep 17 00:00:00 2001 From: patricklafrance Date: Thu, 12 Dec 2024 13:21:00 -0500 Subject: [PATCH 07/18] More stuff --- docs/rsbuild/configure-dev.md | 683 ++++++++++++++++++ docs/rsbuild/default.md | 20 +- docs/rsbuild/migrate-from-webpack.md | 2 + docs/webpack/configure-build.md | 4 + docs/webpack/configure-dev.md | 12 +- docs/webpack/default.md | 10 +- .../rsbuild-configs/src/applyTransformers.ts | 2 +- packages/rsbuild-configs/src/build.ts | 5 +- packages/rsbuild-configs/src/dev.ts | 9 +- packages/rsbuild-configs/src/storybook.ts | 2 +- pnpm-lock.yaml | 3 + samples/rsbuild/app/public/index.html | 2 +- samples/rsbuild/app/src/env.d.ts | 9 + samples/rsbuild/app/tsconfig.json | 1 - samples/rsbuild/app/types/images.d.ts | 8 - samples/rsbuild/components/package.json | 1 + samples/rsbuild/components/src/Button.css | 3 +- .../rsbuild/components/src/Button.module.css | 3 + samples/rsbuild/components/src/Button.tsx | 3 +- samples/rsbuild/components/src/env.d.ts | 1 + 20 files changed, 737 insertions(+), 46 deletions(-) create mode 100644 docs/rsbuild/configure-dev.md create mode 100644 docs/rsbuild/migrate-from-webpack.md create mode 100644 samples/rsbuild/app/src/env.d.ts delete mode 100644 samples/rsbuild/app/types/images.d.ts create mode 100644 samples/rsbuild/components/src/Button.module.css create mode 100644 samples/rsbuild/components/src/env.d.ts diff --git a/docs/rsbuild/configure-dev.md b/docs/rsbuild/configure-dev.md new file mode 100644 index 00000000..3b5a8569 --- /dev/null +++ b/docs/rsbuild/configure-dev.md @@ -0,0 +1,683 @@ +--- +order: 100 +label: Configure for development +meta: + title: Configure for development - Rsbuild +toc: + depth: 2-3 +--- + +# Configure for development + +To configure [Rsbuild](https://rsbuild.dev/) for a development environment, execute the following steps. + +## Install the packages + +Open a terminal at the root of the project and install the following packages: + ++++ pnpm +```bash +pnpm add -D @workleap/rsbuild-configs @workleap/browserslist-config @rsbuild/core @rspack/core browserslist nodemon +``` ++++ yarn +```bash +yarn add -D @workleap/rsbuild-configs @workleap/browserslist-config @rsbuild/core @rspack/core browserslist nodemon +``` ++++ npm +```bash +npm install -D @workleap/rsbuild-configs @workleap/browserslist-config @rsbuild/core @rspack/core browserslist nodemon +``` ++++ + +## Configure Rsbuild + +### HTML template + +First, create a `public` folder with an `index.html` file at the root of the project: + +``` !#2-3 +web-project +β”œβ”€β”€ public +β”œβ”€β”€β”€β”€ index.html +β”œβ”€β”€ src +β”œβ”€β”€β”€β”€ ... +β”œβ”€β”€ package.json +``` + +Then, open the newly created `index.html` file and copy/paste the following content: + +```html public/index.html + + + + + +
+ + +``` + +The content of the `public/index.html` file will be the template used by Rsbuild [HTML template](https://rsbuild.dev/guide/basic/html-template) feature. + +#### Reference local assets + +To reference local assets such as a `favicon.png` in the default HTML template, it is recommended to preprend the **relative** path of every asset with the `assetPrefix` option of the Rsbuild config. + +First, add the asset to the `public` folder at the root of the project: + +``` !#4 +web-project +β”œβ”€β”€ public +β”œβ”€β”€β”€β”€ index.html +β”œβ”€β”€β”€β”€ favicon.png +β”œβ”€β”€ src +β”œβ”€β”€β”€β”€ ... +β”œβ”€β”€ package.json +``` + +Then, add the assets to the `index.html` file: + +```html !#4 public/index.html + + + + + + +
+ + +``` + +!!!info +If `assetPrefix` is set to `auto`, use `href="favicon.png"` instead. +!!! + +## Browserslist + +Next, let's set up [Browserlist](https://github.com/browserslist/browserslist) to define the minimum browser versions supported by the application. Rsbuild will automatically detect and load the browser versions from the nearest `.browserslistrc` configuration file. + +First, create a `browserslistrc` file at the root of the project: + +``` !#7 +web-project +β”œβ”€β”€ public +β”œβ”€β”€β”€β”€ index.html +β”œβ”€β”€β”€β”€ favicon.png +β”œβ”€β”€ src +β”œβ”€β”€β”€β”€ ... +β”œβ”€β”€ .browserslistrc +β”œβ”€β”€ package.json +``` + +Then, open the newly created file and extend the default configuration with the shared configuration provided by `@workleap/browserslist-config`: + +``` .browserslistrc +extends @workleap/browserslist-config +``` + +### `defineDevConfig` + +Next, create a configuration file named `rsbuild.dev.ts` at the root of the project: + +``` !#8 +web-project +β”œβ”€β”€ public +β”œβ”€β”€β”€β”€ index.html +β”œβ”€β”€ src +β”œβ”€β”€β”€β”€ ... +β”œβ”€β”€ .browserslistrc +β”œβ”€β”€ package.json +β”œβ”€β”€ rsbuild.dev.ts +``` + +Then, open the newly created file and `export` the Rsbuild configuration by using the `defineDevConfig(options)` function: + +```ts rsbuild.dev.ts +import { defineDevConfig } from "@workleap/rsbuild-configs"; + +export default defineDevConfig(swcConfig); +``` + +## Use predefined options + +The `defineDevConfig(options)` function can be used as shown in the previous example, however, if you wish to customize the default configuration, the function also accept a few predefined options to help with that πŸ‘‡ + +### `entry` + +- **Type**: `RsbuildEntry` +- **Default**: `{ index: "./src/index.tsx" }` + +Set Rsbuild [source.entry](https://rsbuild.dev/config/source/entry) option. + +```ts !#5 rsbuild.dev.ts +import { defineDevConfig } from "@workleap/rsbuild-configs"; + +export default defineDevConfig({ + entry: { + index: "./src/another-entry.tsx" + } +}); +``` + +### `https` + +- **Type**: `boolean` | `ServerOptions` | `SecureServerSessionOptions` +- **Default**: `false` + +Set Rsbuild [server.https](https://rsbuild.dev/config/server/https) option and format Rsbuild [dev.assetPrefix](https://rsbuild.dev/config/dev/asset-prefix) option accordingly. + +```ts !#4 rsbuild.dev.ts +import { defineDevConfig } from "@workleap/webpack-configs"; + +export default defineDevConfig({ + https: true +}); +``` + +When `true`, a self-signed certificate will be generated with [rsbuild-plugin-basic-ssl](https://github.com/rspack-contrib/rsbuild-plugin-basic-ssl). + +### `host` + +- **Type**: `string` +- **Default**: `localhost` + +Set Rsbuild [server.host](https://rsbuild.dev/config/server/host) option and format Rsbuild [dev.assetPrefix](https://rsbuild.dev/config/dev/asset-prefix) option accordingly. + +```ts !#4 rsbuild.dev.ts +import { defineDevConfig } from "@workleap/rsbuild-configs"; + +export default defineDevConfig({ + host: "my-custom-host" +}); +``` + +### `port` + +- **Type**: `number` +- **Default**: `8080` + +Set Rsbuild [server.port](https://rsbuild.dev/config/server/port) option and format Rsbuild [dev.assetPrefix](https://rsbuild.dev/config/dev/asset-prefix) option accordingly. + +```ts !#4 rsbuild.dev.ts +import { defineDevConfig } from "@workleap/rsbuild-configs"; + +export default defineDevConfig({ + port: 1234 +}); +``` + +### `assetPrefix` + +> This option is the Rsbuild equivalent of webpack [publicPath](../webpack/configure-dev.md#publicpath) option. + +- **Type**: `string` +- **Default**: `${https ? "https" : "http"}://${host}:${port}` + +Set Rsbuild [dev.assetPrefix](https://rsbuild.dev/config/dev/asset-prefix) option. + +```ts !#4 rsbuild.dev.ts +import { defineDevConfig } from "@workleap/rsbuild-configs"; + +export default defineDevConfig({ + assetPrefix: "http://dev-host:8080" +}); +``` + +If you're unsure of the asset prefix in advance, set the option to `auto`. Rsbuild will automatically determine the asset prefix using [import.meta.url](https://webpack.js.org/api/module-variables/#importmetaurl) or [document.currentScript](https://developer.mozilla.org/en-US/docs/Web/API/Document/currentScript). + +```ts !#4 rsbuild.build.ts +import { defineDevConfig } from "@workleap/rsbuild-configs"; + +export default defineDevConfig({ + assetPrefix: "auto" +}); +``` + +### `plugins` + +- **Type**: An array of Rsbuild [plugin instances](https://rsbuild.dev/plugins/list/index) +- **Default**: `[]` + +Append the provided Rsbuild plugins to the configuration. + +```ts !#5 rsbuild.dev.ts +import { defineDevConfig } from "@workleap/rsbuild-configs"; +import { pluginAssetsRetry } from "@rsbuild/plugin-assets-retry"; + +export default defineDevConfig(swcConfig, { + plugins: [pluginAssetsRetry()] +}); +``` + +### `html` + +- **Type**: `false` or `(defaultOptions: HtmlConfig) => HtmlConfig` +- **Default**: `defaultOptions => defaultOptions` + +By default, Rsbuild will attempt to load an HTML template from the `public/index.html` file. To use Rsbuild's built-in HTML template instead, set the option to `false`. + +```ts !#4 rsbuild.dev.ts +import { defineDevConfig } from "@workleap/rsbuild-configs"; + +export default defineDevConfig({ + html: false +}); +``` + +To customize the default [HTML template](https://rsbuild.dev/guide/basic/html-template) configuration, provide a function. + +```ts !#5-10 rsbuild.dev.ts +import { defineDevConfig } from "@workleap/rsbuild-configs"; +import path from "path"; + +export default defineDevConfig({ + html: defaultOptions => { + return { + ...defaultOptions, + template: path.resolve("./my-custom-index.html"), + }; + } +}); +``` + +### `lazyCompilation` + +- **Type**: `boolean` +- **Default**: `true` + +Whether or not to use [lazy compilation](https://rsbuild.dev/config/dev/lazy-compilation). To disable lazy compilation, set the option to `false`. + +```ts !#4 rsbuild.dev.ts +import { defineDevConfig } from "@workleap/rsbuild-configs"; + +export default defineDevConfig({ + lazyCompilation: false +}); +``` + +### `hmr` + +- **Type**: `boolean` +- **Default**: `true` + +Whether or not to use [HMR](https://rsbuild.dev/guide/advanced/hmr). To disable HMR set the option to `false`. + +```ts !#4 rsbuild.dev.ts +import { defineDevConfig } from "@workleap/rsbuild-configs"; + +export default defineDevConfig({ + hmr: false +}); +``` + +### `fastRefresh` + +- **Type**: `boolean` +- **Default**: `true` + +Whether or not to use [Fast Refresh](https://rsbuild.dev/guide/framework/react#react-fast-refresh) instead of use [HMR](https://rsbuild.dev/guide/advanced/hmr). To disable fast refresh set the option to `false`. + +```ts !#4 rsbuild.dev.ts +import { defineDevConfig } from "@workleap/rsbuild-configs"; + +export default defineDevConfig({ + fastRefresh: false +}); +``` + +To customize the Fast Refresh [configuration](https://rsbuild.dev/plugins/list/plugin-react#reactrefreshoptions), provide a [react](#react) function. + +```ts !#4-11 rsbuild.dev.ts +import { defineDevConfig } from "@workleap/rsbuild-configs"; + +export default defineDevConfig({ + react: defaultOptions => { + return { + ...defaultOptions, + reactRefreshOptions: { + overlay: false + } + }; + } +}); +``` + +### `sourceMap` + +- **Type**: `false` | `SourceMap` +- **Default**: `{ js: "cheap-module-source-map", css: true }` + +Whether or not to generate [source map](https://rsbuild.dev/config/output/source-map). To disable source map, set the option to `false`. + +```ts !#4 rsbuild.dev.ts +import { defineDevConfig } from "@workleap/rsbuild-configs"; + +export default defineDevConfig({ + sourceMap: false +}); +``` + +To customize the source map [configuration](https://rsbuild.dev/config/output/source-map), provide an object literal. + +```ts !#4-6 rsbuild.dev.ts +import { defineDevConfig } from "@workleap/rsbuild-configs"; + +export default defineDevConfig({ + sourceMap: { + css: false + } +}); +``` + +### `overlay` + +- **Type**: `false` +- **Default**: `undefined` + +Whether or not a full-screen overlay should be in the browser when there are compiler errors or warnings. + +```ts !#4 rsbuild.dev.ts +import { defineDevConfig } from "@workleap/rsbuild-configs"; + +export default defineDevConfig({ + overlay: false +}); +``` + +### `react` + +- **Type**: `false` or `(defaultOptions: PluginReactOptions) => PluginReactOptions` +- **Default**: `defaultOptions => defaultOptions` + +Whether or not to transform React code. To disable React code transformation, set the option to `false`. + +```ts !#4 rsbuild.dev.ts +import { defineDevConfig } from "@workleap/rsbuild-configs"; + +export default defineDevConfig({ + react: false +}); +``` + +To customize `@rsbuild/plugin-react` [configuration](https://rsbuild.dev/plugins/list/plugin-react), provide a function. + +```ts !#4-12 rsbuild.dev.ts +import { defineDevConfig } from "@workleap/rsbuild-configs"; + +export default defineDevConfig({ + react: defaultOptions => { + return { + ...defaultOptions, + swcReactOptions: { + ...(defaultOptions.swcReactOptions ?? {}), + runtime: "classic" + } + }; + } +}); +``` + +### `svgr` + +- **Type**: `false` or `(defaultOptions: PluginSvgrOptions) => PluginSvgrOptions` +- **Default**: `defaultOptions => defaultOptions` + +Whether or not to handle `.svg` files with [plugin-svgr](https://rsbuild.dev/plugins/list/plugin-svgr). When the option is set to `false`, the `.svg` files will be handled by the `asset/resource` rule. + +```ts !#4 rsbuild.dev.ts +import { defineDevConfig } from "@workleap/rsbuild-configs"; + +export default defineDevConfig(swcConfig, { + svgr: false +}); +``` + +To customize the `plugin-svgr` [configuration](https://rsbuild.dev/plugins/list/plugin-svgr), provide a function. + +```ts !#4-13 rsbuild.dev.ts +import { defineDevConfig } from "@workleap/rsbuild-configs"; + +export default defineDevConfig(swcConfig, { + svgr: defaultOptions => { + return { + svgrOptions: { + ...(defaultOptions.svgrOptions ?? {}), + ref: true + } + ...defaultOptions, + + } + } +}); +``` + +When you reference an SVG asset in TypeScript code, TypeScript may prompt that the module is missing a type definition: + +```bash +TS2307: Cannot find module './logo.svg' or its corresponding type declarations. +``` + +To fix this, you need to add type declaration for the SVG assets, create a `src/env.d.ts` file, and add the type declaration. + +```ts src/env.d.ts +declare module '*.svg' { + export const ReactComponent: React.FunctionComponent< + React.SVGProps + >; +} +declare module '*.svg?react' { + const ReactComponent: React.FunctionComponent>; + export default ReactComponent; +} +``` + +For additional information, refer to the plugin [documentation](https://rsbuild.dev/plugins/list/plugin-svgr#type-declaration). + +### `verbose` + +- **Type**: `boolean` +- **Default**: `false` + +Start the Rsbuild process with verbose logging turned on. + +```ts !#4 rsbuild.dev.ts +import { defineDevConfig } from "@workleap/rsbuild-configs"; + +export default defineDevConfig({ + verbose: true +}); +``` + +## Configuration transformers + +!!!warning +We do not guarantee that your configuration transformers won't break after an update. It's your responsibility to keep them up to date with new releases. +!!! + +The [predefined options](#use-predefined-options) are useful to quickly customize the [default development configuration](https://github.com/gsoft-inc/wl-web-configs/blob/main/packages/rsbuild-configs/src/dev.ts) of `@workleap/rsbuild-configs`, but only covers a subset of an [Rsbuild configuration](https://rsbuild.dev/config/index). If you need full control over the configuration, you can provide configuration transformer functions through the `transformers` option of the `defineDevConfig` function. Remember, **no locked in** :heart::v:. + +To view the default development configuration of `@workleap/rsbuild-configs`, have a look at the [dev.ts configuration file](https://github.com/gsoft-inc/wl-web-configs/blob/main/packages/rsbuild-configs/src/dev.ts) on GitHub. + +### `transformers` + +- **Type**: `((config: RsbuildConfig, context: RsbuildConfigTransformerContext) => RsbuildConfig)[]` +- **Default**: `[]` + +```ts +transformer(config: RsbuildConfig, context: RsbuildConfigTransformerContext) => RsbuildConfig +``` + +```ts !#3-13,16 rsbuild.dev.ts +import { defineDevConfig, type RsbuildConfig, type RsbuildConfigTransformer } from "@workleap/rsbuild-configs"; + +const forceNamedChunkIdsTransformer: RsbuildConfigTransformer = (config: RsbuildConfig) => { + config.tools = config.tools ?? {}; + config.tools.rspack = config.tools.rspack ?? {}; + + config.tools.rspack.optimization = { + ...(config.tools.rspack.optimization ?? {}), + chunkIds: "named" + }; + + return config; +}; + +export default defineDevConfig({ + transformers: [forceNamedChunkIdsTransformer] +}); +``` + +### Execution context + +Generic transformers can use the `context` parameter to gather additional information about their execution context, like the `environment` they are operating in. + +```ts !#2 transformer.ts +export const transformer: RsbuildConfigTransformer = (config: RsbuildConfig) => { + if (context.environment === "dev") { + config.tools = config.tools ?? {}; + config.tools.rspack = config.tools.rspack ?? {}; + + config.tools.rspack.optimization = { + ...(config.tools.rspack.optimization ?? {}), + chunkIds: "named" + }; + + return config; + } + + return config; +} +``` + +- `environment`: `"dev" | "build" | "storybook"` +- `verbose`: `boolean` + +## Setup nodemon + +[Nodemon](https://nodemon.io/) is a utility that will monitor for any changes in the `rsbuild.dev.dev.ts` file and restart the Rsbuild development server whenever a change occurs. + +First, add a `nodemon.json` file at the root of the project: + +``` !#8 +web-project +β”œβ”€β”€ public +β”œβ”€β”€β”€β”€ index.html +β”œβ”€β”€ src +β”œβ”€β”€β”€β”€ ... +β”œβ”€β”€ package.json +β”œβ”€β”€ rsbuild.dev.ts +β”œβ”€β”€ nodemon.json +``` + +Then, open the `nodemon.json` file and copy/paste the following content: + +```json nodemon.json +{ + "watch": ["rsbuild.dev.ts"], + "exec": "rsbuild dev --config rsbuild.dev.ts" +} +``` + +Finally, add a CLI script at the [next step](#add-a-cli-script) of this guide. + +## Add a CLI script + +To initiate the development server, add the following script to your project `package.json` file: + +```json package.json +{ + "dev": "nodemon" +} +``` + +## Define environment variables + +### cross-env + +We recommend to define environment variables using [cross-env](https://github.com/kentcdodds/cross-env). With `cross-env`, the environment variables will be made available to any Node.js files that are executed by the script process (`dev` in the example below :point_down:): + +```json package.json +{ + "dev": "cross-env DEBUG=true nodemon" +} +``` + +```ts !#4 tsbuild.dev.ts +import { defineDevConfig } from "@workleap/rsbuild-configs"; + +if (process.env.DEBUG) { + console.log("Configuring Rsbuild in debug mode!"); +} + +export default defineDevConfig(); +``` + +However, there's a catch. When using `cross-env`, the variables will not be available in the application files because `cross-env` only makes them available to files that are executed by the process at **build time** while the application files are executed at **runtime** by a browser. + +To make them accessible to the application files, Rsbuild must be aware of those environment variables and **render** them into the **compiled application files**. This is the purpose of the `environmentVariables` option. + +### `environmentVariables` + +- **Type**: `Record` +- **Default**: `{}` + +First, define the variables with `environmentVariables`: + +```ts !#4-6 rsbuild.dev.ts +import { defineDevConfig } from "@workleap/rsbuild-configs"; + +export default defineDevConfig({ + environmentVariables: { + "DEBUG": process.env.DEBUG === "true" + } +}); +``` + +Then, use the variables in any application files: + +```tsx !#2 src/app.tsx +export function App() { + if (process.env.DEBUG) { + console.log("The application has been bootstrapped in debug!"); + } + + return null; +} +``` + +!!!info +The `=== "true"` part of `"DEBUG": process.env.DEBUG === "true"` is very important, otherwise the environment variable value would be `"true"` instead of `true`. +!!! + +!!!info +By default, Rsbuild injects a few environment variables into the code using the [source.define](https://rsbuild.dev/guide/advanced/env-vars#using-define) option. For additional information about these default environment variables, refer to the Rsbuild [documentation](https://rsbuild.dev/guide/advanced/env-vars#default-variables). +!!! + +## CSS modules typings + +When you import CSS Modules in TypeScript code, TypeScript may prompt that the module is missing a type definition: + +```bash +TS2307: Cannot find module './index.module.css' or its corresponding type declarations. +``` + +To fix this, you need to add a type declaration file for the CSS Modules, please create a `src/env.d.ts` file, and add the corresponding type declaration. + +```ts env.d.ts +/// +``` + +!!!info +Make sure the project have a dependency on `@rsbuild/core`. +!!! + +!!!info +For additional information abour CSS modules type declaration, refer to the Rsbuild [documentation](https://rsbuild.dev/guide/basic/css-modules#type-declaration). +!!! + +## Try it :rocket: + +To test your new Rsbuild configuration, open a terminal at the root of the project and execute the [CLI script added earlier](#add-a-cli-script). A development server should start without outputting any error in the terminal. + + diff --git a/docs/rsbuild/default.md b/docs/rsbuild/default.md index dcfb204c..23867728 100644 --- a/docs/rsbuild/default.md +++ b/docs/rsbuild/default.md @@ -7,7 +7,7 @@ toc: depth: 2-3 --- -# Webpack +# Rsbuild -## A word about Rspack - -[Rspack](https://www.rspack.dev/) is a partial rewrite of [webpack](https://webpack.js.org/) in Rust and will most likely be its successor once it's features complete and stable. Our goal is to migrate to Rspack somewhere in 2024 or 2025 when a `1.0` version is released and [Module Federation](https://module-federation.io/) support is available. - -Meanwhile, you can **confidently start a new project with webpack** as the **migration** process to Rspack is expected to be **seamless**; Rspack is committed to support the full webpack API and its massive plugin ecosystem. +[Rsbuild](https://lib.rsbuild.dev/index) is a high-performance build tool powered by [Rspack](https://rspack.dev/), a Rust-based port of [webpack](https://webpack.js.org/) designed for efficiency and speed. Those new Rsbuild shared configurations are a modern replacement for previous Workleap's shared [webpack configurations](../webpack//default.md). ## Main features -The shared configurations offered by `@workleap/webpack-configs` includes the following features :point_down: +The shared configurations offered by `@workleap/rsbuild-configs` includes the following features :point_down: ### Language support - JavaScript - TypeScript -- CSS (with CSS modules and PostCSS) +- CSS (with CSS modules and LightningCSS) ### Framework support @@ -58,20 +54,20 @@ The shared configurations offered by `@workleap/webpack-configs` includes the fo ### Development features - Development server -- File system caching - Fast Refresh or Hot Module Reload - Sourcemap ### Production features -- File system caching - Minification - Output to `/dist` ### Target environment -As per the [PostCSS](../postcss/default.md) and [SWC](../swc/default.md) configurations. +As per the [Browserlist](../browserslist/default.md) configuration. ## Getting started -To get started, follow the quick start guide to configure webpack for either a [development environment](configure-dev.md) or a [production environment](configure-build.md). +To get started, follow the quick start guide to configure Rsbuild for either a [development environment](configure-dev.md), a [production environment](configure-build.md) or [storybook](). + +If your project is already using `@workleap/webpack-configs`, follow the [migration guide](). diff --git a/docs/rsbuild/migrate-from-webpack.md b/docs/rsbuild/migrate-from-webpack.md new file mode 100644 index 00000000..de2d889f --- /dev/null +++ b/docs/rsbuild/migrate-from-webpack.md @@ -0,0 +1,2 @@ +-> Don't forget the changes to the HTML template for the assets like the favicon. + -> L'ajouter aussi au guide de migration de Squide diff --git a/docs/webpack/configure-build.md b/docs/webpack/configure-build.md index 5ae719ea..08fd7f77 100644 --- a/docs/webpack/configure-build.md +++ b/docs/webpack/configure-build.md @@ -9,6 +9,10 @@ toc: # Configure for build +!!!warning +If you're starting a new project, consider using [Rsbuild](../rsbuild/default.md) instead of webpack for better performance and modern tooling. +!!! + To configure [webpack](https://webpack.js.org/) for a production environment, execute the following steps. ## Install the packages diff --git a/docs/webpack/configure-dev.md b/docs/webpack/configure-dev.md index 7d91a40c..5d1792f5 100644 --- a/docs/webpack/configure-dev.md +++ b/docs/webpack/configure-dev.md @@ -9,6 +9,10 @@ toc: # Configure for development +!!!warning +If you're starting a new project, consider using [Rsbuild](../rsbuild/default.md) instead of webpack for better performance and modern tooling. +!!! + To configure [webpack](https://webpack.js.org/) for a development environment, execute the following steps. ## Install the packages @@ -61,7 +65,7 @@ The content of the `public/index.html` file is the default template that will be #### Reference local assets -To reference local assets such as a `favicon.png` in the default HTML template, it is recommended to preprend the **relative** path of every asset with the `publicPath` of the webpack config. +To reference local assets such as a `favicon.png` in the default HTML template, it is recommended to preprend the **relative** path of every asset with the `publicPath` option of the webpack config. First, add the asset to the `public` folder at the root of the project: @@ -204,7 +208,7 @@ export default defineDevConfig(swcConfig, { ### `publicPath` -- **Type**: `boolean` +- **Type**: `string` - **Default**: `${https ? "https" : "http"}://${host}:${port}/` Set webpack [public path](https://webpack.js.org/configuration/output/#outputpublicpath). @@ -413,7 +417,7 @@ export default defineDevConfig(swcConfig, { - **Type**: `boolean` or an object literal accepting any `@svgr/webpack` [option](https://react-svgr.com/docs/options/) - **Default**: `true` -Whether or not to handle `.svg` files with `@svgr/webpack`. If `@svgr/webpack` is desactived, the `.svg` files will are handled by the `asset/resource` rule. +Whether or not to handle `.svg` files with `@svgr/webpack`. If `@svgr/webpack` is desactived, the `.svg` files will be handled by the `asset/resource` rule. ```js !#7 webpack.dev.js // @ts-check @@ -503,7 +507,7 @@ export default defineDevConfig(swcConfig, { ### Execution context -Generic transformers can use the `context` parameter to gather additional information about their execution context, like the `environment` they are operating in: +Generic transformers can use the `context` parameter to gather additional information about their execution context, like the `environment` they are operating in. ```ts !#7 transformer.js // @ts-check diff --git a/docs/webpack/default.md b/docs/webpack/default.md index dd4656f9..3f2d2e76 100644 --- a/docs/webpack/default.md +++ b/docs/webpack/default.md @@ -9,6 +9,10 @@ toc: # Webpack +!!!warning +If you're starting a new project, consider using [Rsbuild](../rsbuild/default.md) instead of webpack for better performance and modern tooling. +!!! + -## A word about Rspack - -[Rspack](https://www.rspack.dev/) is a partial rewrite of [webpack](https://webpack.js.org/) in Rust and will most likely be its successor once it's features complete and stable. Our goal is to migrate to Rspack somewhere in 2024 or 2025 when a `1.0` version is released and [Module Federation](https://module-federation.io/) support is available. - -Meanwhile, you can **confidently start a new project with webpack** as the **migration** process to Rspack is expected to be **seamless**; Rspack is committed to support the full webpack API and its massive plugin ecosystem. - ## Main features The shared configurations offered by `@workleap/webpack-configs` includes the following features :point_down: diff --git a/packages/rsbuild-configs/src/applyTransformers.ts b/packages/rsbuild-configs/src/applyTransformers.ts index a6c36d40..26cf980c 100644 --- a/packages/rsbuild-configs/src/applyTransformers.ts +++ b/packages/rsbuild-configs/src/applyTransformers.ts @@ -1,7 +1,7 @@ import type { RsbuildConfig } from "@rsbuild/core"; export interface RsbuildConfigTransformerContext { - environment: "dev" | "build"; + environment: "dev" | "build" | "storybook"; verbose: boolean; } diff --git a/packages/rsbuild-configs/src/build.ts b/packages/rsbuild-configs/src/build.ts index fa86357e..bc754cb5 100644 --- a/packages/rsbuild-configs/src/build.ts +++ b/packages/rsbuild-configs/src/build.ts @@ -16,7 +16,7 @@ export interface DefineBuildConfigOptions { // Similar to webpack.output.path. distPath?: DistPathConfig; // Similar to webpack.publicPath. - assetPrefix?: `${string}/` | "auto"; + assetPrefix?: string; plugins?: RsbuildPlugins; html?: false | DefineBuildHtmlPluginConfigFunction; minify?: Minify; @@ -86,8 +86,7 @@ export function defineBuildConfig(options: DefineBuildConfigOptions = {}) { distPath = { root: path.resolve("./dist") }, - // The trailing / is very important, otherwise paths will not be resolved correctly. - assetPrefix = "http://localhost:8080/", + assetPrefix = "http://localhost:8080", plugins = [], html = defaultDefineHtmlPluginConfig, minify = true, diff --git a/packages/rsbuild-configs/src/dev.ts b/packages/rsbuild-configs/src/dev.ts index 854658a5..ce4637a5 100644 --- a/packages/rsbuild-configs/src/dev.ts +++ b/packages/rsbuild-configs/src/dev.ts @@ -15,13 +15,13 @@ export interface DefineDevConfigOptions { host?: string; port?: number; // Similar to webpack.publicPath. - assetPrefix?: `${string}/` | "auto"; + assetPrefix?: string; plugins?: RsbuildPlugins; html?: false | DefineDevHtmlPluginConfigFunction; lazyCompilation?: boolean; hmr?: boolean; fastRefresh?: boolean; - sourceMap?: boolean | SourceMap; + sourceMap?: false | SourceMap; overlay?: false; react?: false | DefineDevDefineReactPluginConfigFunction; svgr? : false | DefineDevSvgrPluginConfigFunction; @@ -73,8 +73,7 @@ export function defineDevConfig(options: DefineDevConfigOptions = {}) { const config: RsbuildConfig = { mode: "development", dev: { - // The trailing / is very important, otherwise paths will not be resolved correctly. - assetPrefix: assetPrefix ?? `${https ? "https" : "http"}://${host}:${port}/`, + assetPrefix: assetPrefix ?? `${https ? "https" : "http"}://${host}:${port}`, lazyCompilation, hmr, client: (overlay === false || fastRefresh) ? { @@ -102,8 +101,6 @@ export function defineDevConfig(options: DefineDevConfigOptions = {}) { }, output: { target: "web", - // // The trailing / is very important, otherwise paths will not be resolved correctly. - // assetPrefix: assetPrefix ?? `${https ? "https" : "http"}://${host}:${port}/`, minify: false, sourceMap }, diff --git a/packages/rsbuild-configs/src/storybook.ts b/packages/rsbuild-configs/src/storybook.ts index b6936f89..e5935cf6 100644 --- a/packages/rsbuild-configs/src/storybook.ts +++ b/packages/rsbuild-configs/src/storybook.ts @@ -78,7 +78,7 @@ export function defineStorybookConfig(options: DefineStorybookConfigOptions = {} }; const transformedConfig = applyTransformers(config, transformers, { - environment: "dev", + environment: "storybook", verbose }); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index eb45056e..e46560b6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -597,6 +597,9 @@ importers: samples/rsbuild/components: devDependencies: + '@rsbuild/core': + specifier: 1.1.9 + version: 1.1.9 '@storybook/react': specifier: 8.4.7 version: 8.4.7(@storybook/test@8.4.7(storybook@8.4.7(prettier@3.4.2)))(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(storybook@8.4.7(prettier@3.4.2))(typescript@5.5.4) diff --git a/samples/rsbuild/app/public/index.html b/samples/rsbuild/app/public/index.html index 74bd0a31..d2c7c175 100644 --- a/samples/rsbuild/app/public/index.html +++ b/samples/rsbuild/app/public/index.html @@ -1,7 +1,7 @@ - +
diff --git a/samples/rsbuild/app/src/env.d.ts b/samples/rsbuild/app/src/env.d.ts new file mode 100644 index 00000000..5f21dc7f --- /dev/null +++ b/samples/rsbuild/app/src/env.d.ts @@ -0,0 +1,9 @@ +declare module "*.svg" { + export const ReactComponent: React.FunctionComponent< + React.SVGProps + >; +} +declare module "*.svg?react" { + const ReactComponent: React.FunctionComponent>; + export default ReactComponent; +} diff --git a/samples/rsbuild/app/tsconfig.json b/samples/rsbuild/app/tsconfig.json index b5db0fd9..5122233d 100644 --- a/samples/rsbuild/app/tsconfig.json +++ b/samples/rsbuild/app/tsconfig.json @@ -7,6 +7,5 @@ // "@rsbuild-sample/tsup-lib": ["../tsup-lib/src/index.ts"] // } }, - "include": ["."], "exclude": ["public", "dist", "node_modules"] } diff --git a/samples/rsbuild/app/types/images.d.ts b/samples/rsbuild/app/types/images.d.ts deleted file mode 100644 index 5d266c81..00000000 --- a/samples/rsbuild/app/types/images.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -declare module "*.svg" { - import type * as React from "react"; - - export const ReactComponent: React.FunctionComponent & { title?: string }>; - - const src: string; - export default src; -} diff --git a/samples/rsbuild/components/package.json b/samples/rsbuild/components/package.json index e54c33a8..56e6120b 100644 --- a/samples/rsbuild/components/package.json +++ b/samples/rsbuild/components/package.json @@ -20,6 +20,7 @@ "react-dom": "*" }, "devDependencies": { + "@rsbuild/core": "1.1.9", "@storybook/react": "8.4.7", "@swc/core": "1.10.1", "@swc/jest": "0.2.37", diff --git a/samples/rsbuild/components/src/Button.css b/samples/rsbuild/components/src/Button.css index 30068539..2594a636 100644 --- a/samples/rsbuild/components/src/Button.css +++ b/samples/rsbuild/components/src/Button.css @@ -1,4 +1,3 @@ -.sample-button { +.sample-button-bg { background-color: blue; - color: white; } diff --git a/samples/rsbuild/components/src/Button.module.css b/samples/rsbuild/components/src/Button.module.css new file mode 100644 index 00000000..cea75dd0 --- /dev/null +++ b/samples/rsbuild/components/src/Button.module.css @@ -0,0 +1,3 @@ +.sample-button-color { + color: white; +} diff --git a/samples/rsbuild/components/src/Button.tsx b/samples/rsbuild/components/src/Button.tsx index 97bf0d3e..d3ab9f40 100644 --- a/samples/rsbuild/components/src/Button.tsx +++ b/samples/rsbuild/components/src/Button.tsx @@ -1,5 +1,6 @@ import type { HTMLProps, ReactNode } from "react"; import "./Button.css"; +import styles from "./Button.module.css"; export interface ButtonProps extends Omit, "type" | "className"> { children: ReactNode; @@ -7,6 +8,6 @@ export interface ButtonProps extends Omit, "type" | export function Button({ children, ...props }: ButtonProps) { return ( - + ); } diff --git a/samples/rsbuild/components/src/env.d.ts b/samples/rsbuild/components/src/env.d.ts new file mode 100644 index 00000000..b0ac762b --- /dev/null +++ b/samples/rsbuild/components/src/env.d.ts @@ -0,0 +1 @@ +/// From 9ac38cc85e0963f70329ebd4ace21a4d7bc0ad41 Mon Sep 17 00:00:00 2001 From: patricklafrance Date: Thu, 12 Dec 2024 20:41:53 -0500 Subject: [PATCH 08/18] More stuff --- docs/rsbuild/configure-build.md | 598 ++++++++++++++++++++++++++ docs/rsbuild/configure-dev.md | 25 +- docs/webpack/configure-build.md | 2 +- packages/rsbuild-configs/package.json | 3 +- packages/rsbuild-configs/src/build.ts | 23 +- pnpm-lock.yaml | 189 ++++++++ 6 files changed, 817 insertions(+), 23 deletions(-) create mode 100644 docs/rsbuild/configure-build.md diff --git a/docs/rsbuild/configure-build.md b/docs/rsbuild/configure-build.md new file mode 100644 index 00000000..e936d014 --- /dev/null +++ b/docs/rsbuild/configure-build.md @@ -0,0 +1,598 @@ +--- +order: 90 +label: Configure for build +meta: + title: Configure for build - Rsbuild +toc: + depth: 2-3 +--- + +# Configure for build + +To configure [Rsbuild](https://rsbuild.dev/) for a production environment, execute the following steps. + +## Install the packages + ++++ pnpm +```bash +pnpm add -D @workleap/rsbuild-configs @workleap/browserslist-config @rsbuild/core @rspack/core browserslist nodemon +``` ++++ yarn +```bash +yarn add -D @workleap/rsbuild-configs @workleap/browserslist-config @rsbuild/core @rspack/core browserslist nodemon +``` ++++ npm +```bash +npm install -D @workleap/rsbuild-configs @workleap/browserslist-config @rsbuild/core @rspack/core browserslist nodemon +``` ++++ + +## Configure Rsbuild + +### HTML template + +First, create a `public` folder with an `index.html` file at the root of the project: + +``` !#2-3 +web-project +β”œβ”€β”€ public +β”œβ”€β”€β”€β”€ index.html +β”œβ”€β”€ src +β”œβ”€β”€β”€β”€ ... +β”œβ”€β”€ package.json +``` + +Then, open the newly created `index.html` file and copy/paste the following content: + +```html public/index.html + + + + + +
+ + +``` + +The content of the `public/index.html` file will be the template used by Rsbuild [HTML template](https://rsbuild.dev/guide/basic/html-template) feature. + +#### Reference local assets + +To reference local assets such as a `favicon.png` in the default HTML template, it is recommended to preprend the **relative** path of every asset with the `assetPrefix` option of the Rsbuild config. + +First, add the asset to the `public` folder at the root of the project: + +``` !#4 +web-project +β”œβ”€β”€ public +β”œβ”€β”€β”€β”€ index.html +β”œβ”€β”€β”€β”€ favicon.png +β”œβ”€β”€ src +β”œβ”€β”€β”€β”€ ... +β”œβ”€β”€ package.json +``` + +Then, add the assets to the `index.html` file: + +```html !#4 public/index.html + + + + + + +
+ + +``` + +!!!info +If `assetPrefix` is set to `auto`, use `href="favicon.png"` instead. +!!! + +## Browserslist + +Next, let's set up [Browserlist](https://github.com/browserslist/browserslist) to define the minimum browser versions supported by the application. Rsbuild will automatically detect and load the browser versions from the nearest `.browserslistrc` configuration file. + +First, create a `browserslistrc` file at the root of the project: + +``` !#6 +web-project +β”œβ”€β”€ public +β”œβ”€β”€β”€β”€ index.html +β”œβ”€β”€ src +β”œβ”€β”€β”€β”€ ... +β”œβ”€β”€ .browserslistrc +β”œβ”€β”€ package.json +``` + +Then, open the newly created file and extend the default configuration with the shared configuration provided by `@workleap/browserslist-config`: + +``` .browserslistrc +extends @workleap/browserslist-config +``` + +### `defineBuildConfig` + +Next, create a configuration file named `rsbuild.build.ts` at the root of the project: + +``` !#8 +web-project +β”œβ”€β”€ public +β”œβ”€β”€β”€β”€ index.html +β”œβ”€β”€ src +β”œβ”€β”€β”€β”€ ... +β”œβ”€β”€ .browserslistrc +β”œβ”€β”€ package.json +β”œβ”€β”€ rsbuild.build.ts +``` + +Then, open the newly created file and `export` the Rsbuild configuration by using the `defineBuildConfig(options)` function: + +```ts rsbuild.build.ts +import { defineBuildConfig } from "@workleap/rsbuild-configs"; + +export default defineBuildConfig(); +``` + +## Use predefined options + +The `defineBuildConfig(options)` function can be used as shown in the previous example, however, if you wish to customize the default configuration, the function also accept a few predefined options to help with that πŸ‘‡ + +### `entry` + +- **Type**: `RsbuildEntry` +- **Default**: `{ index: "./src/index.tsx" }` + +Set Rsbuild [source.entry](https://rsbuild.dev/config/source/entry) option. + +```ts !#5 rsbuild.build.ts +import { defineBuildConfig } from "@workleap/rsbuild-configs"; + +export default defineBuildConfig({ + entry: { + index: "./src/another-entry.tsx" + } +}); +``` + +### `distPath` + +> This option is the Rsbuild equivalent of webpack [outputPath](../webpack/configure-build.md#outputpath) option. + +- **Type**: `string` +- **Default**: `dist` + +Set Rsbuild [output.distPath](https://rsbuild.dev/config/output/dist-path) option. + +```ts !#8 rsbuild.build.ts +import { defineBuildConfig } from "@workleap/rsbuild-configs"; +import path from "path"; + +export default defineBuildConfig({ + distPath: path.resolve("./a-custom-folder") +}); +``` + +### `assetPrefix` + +> This option is the Rsbuild equivalent of webpack [publicPath](../webpack/configure-dev.md#publicpath) option. + +- **Type**: `string` +- **Default**: `${https ? "https" : "http"}://${host}:${port}` + +Set Rsbuild [output.assetPrefix](https://rsbuild.dev/config/output/asset-prefix) option. + +```ts !#4 rsbuild.build.ts +import { defineBuildConfig } from "@workleap/rsbuild-configs"; + +export default defineBuildConfig({ + assetPrefix: "http://dev-host:8080" +}); +``` + +If you're unsure of the asset prefix in advance, set the option to `auto`. Rsbuild will automatically determine the asset prefix using [import.meta.url](https://webpack.js.org/api/module-variables/#importmetaurl) or [document.currentScript](https://developer.mozilla.org/en-US/docs/Web/API/Document/currentScript). + +```ts !#4 rsbuild.build.ts +import { defineBuildConfig } from "@workleap/rsbuild-configs"; + +export default defineBuildConfig({ + assetPrefix: "auto" +}); +``` + +### `plugins` + +- **Type**: An array of Rsbuild [plugin instances](https://rsbuild.dev/plugins/list/index) +- **Default**: `[]` + +Append the provided Rsbuild plugins to the configuration. + +```ts !#5 rsbuild.build.ts +import { defineBuildConfig } from "@workleap/rsbuild-configs"; +import { pluginAssetsRetry } from "@rsbuild/plugin-assets-retry"; + +export default defineBuildConfig(swcConfig, { + plugins: [pluginAssetsRetry()] +}); +``` + +### `html` + +- **Type**: `false` or `(defaultOptions: HtmlConfig) => HtmlConfig` +- **Default**: `defaultOptions => defaultOptions` + +By default, Rsbuild will attempt to load an HTML template from the `public/index.html` file. To use Rsbuild's built-in HTML template instead, set the option to `false`. + +```ts !#4 rsbuild.build.ts +import { defineBuildConfig } from "@workleap/rsbuild-configs"; + +export default defineBuildConfig({ + html: false +}); +``` + +To customize the default [HTML template](https://rsbuild.dev/guide/basic/html-template) configuration, provide a function extending the default options. + +```ts !#5-10 rsbuild.build.ts +import { defineBuildConfig } from "@workleap/rsbuild-configs"; +import path from "path"; + +export default defineBuildConfig({ + html: defaultOptions => { + return { + ...defaultOptions, + template: path.resolve("./my-custom-index.html"), + }; + } +}); +``` + +### `minify` + +- **Type**: `false` or an object literal accepting any [minify options](https://rsbuild.dev/config/output/minify). +- **Default**: `true` + +Whether or not to minify the code. To disable code minification, set the option to `false`. + +```ts !#4 rsbuild.build.ts +import { defineBuildConfig } from "@workleap/rsbuild-configs"; + +export default defineBuildConfig({ + minify: false +}); +``` + +To customize the minimizer [configuration](https://rsbuild.dev/config/output/minify), provide an object literal. + +```ts !#4-6 rsbuild.build.ts +import { defineBuildConfig } from "@workleap/rsbuild-configs"; + +export default defineBuildConfig({ + minify: { + css: false + } +}); +``` + +### `optimize` + +- **Type**: `boolean` | `"readable"` +- **Default**: `true` + +Whether or not to enable Rsbuild production code [optimization](https://rspack.dev/config/optimization). This option can be quite useful when debugging an issue with Rsbuild bundling. + +When `false` is provided, most of the optimizations, including minification will be turned off: + +```ts !#4 rsbuild.build.ts +import { defineBuildConfig } from "@workleap/rsbuild-configs"; + +export default defineBuildConfig({ + optimize: false +}); +``` + +When `readable` is provided, most of the optimizations will still be applied but the outputed bundles will be easier to read: + +```ts !#4 rsbuild.build.ts +import { defineBuildConfig } from "@workleap/rsbuild-configs"; + +export default defineBuildConfig({ + optimize: "readable" +}); +``` + +### `sourceMap` + +- **Type**: `false` or an object literal accepting any [output.sourceMap](https://rsbuild.dev/config/output/source-map) options. +- **Default**: `{ js: "source-map", css: true }` + +Whether or not to generate [source map](https://rsbuild.dev/config/output/source-map). To disable source map, set the option to `false`. + +```ts !#4 rsbuild.build.ts +import { defineBuildConfig } from "@workleap/rsbuild-configs"; + +export default defineBuildConfig({ + sourceMap: false +}); +``` + +To customize the source map [configuration](https://rsbuild.dev/config/output/source-map), provide an object literal. + +```ts !#4-6 rsbuild.build.ts +import { defineBuildConfig } from "@workleap/rsbuild-configs"; + +export default defineBuildConfig({ + sourceMap: { + css: false + } +}); +``` + +### `react` + +- **Type**: `false` or `(defaultOptions: PluginReactOptions) => PluginReactOptions` +- **Default**: `defaultOptions => defaultOptions` + +Whether or not to transform React code. To disable React code transformation, set the option to `false`. + +```ts !#4 rsbuild.build.ts +import { defineBuildConfig } from "@workleap/rsbuild-configs"; + +export default defineBuildConfig({ + react: false +}); +``` + +To customize [plugin-react](https://rsbuild.dev/plugins/list/plugin-react), provide a function to extend the default options. + +```ts !#4-12 rsbuild.build.ts +import { defineBuildConfig } from "@workleap/rsbuild-configs"; + +export default defineBuildConfig({ + react: defaultOptions => { + return { + ...defaultOptions, + swcReactOptions: { + ...(defaultOptions.swcReactOptions ?? {}), + runtime: "classic" + } + }; + } +}); +``` + +### `svgr` + +- **Type**: `false` or `(defaultOptions: PluginSvgrOptions) => PluginSvgrOptions` +- **Default**: `defaultOptions => defaultOptions` + +Whether or not to handle `.svg` files with [plugin-svgr](https://rsbuild.dev/plugins/list/plugin-svgr). When the option is set to `false`, the `.svg` files will be handled by the `asset/resource` rule. + +```ts !#4 rsbuild.build.ts +import { defineBuildConfig } from "@workleap/rsbuild-configs"; + +export default defineBuildConfig(swcConfig, { + svgr: false +}); +``` + +To customize [plugin-svgr](https://rsbuild.dev/plugins/list/plugin-svgr), provide a function extending the default options. + +```ts !#4-13 rsbuild.build.ts +import { defineBuildConfig } from "@workleap/rsbuild-configs"; + +export default defineBuildConfig(swcConfig, { + svgr: defaultOptions => { + return { + svgrOptions: { + ...(defaultOptions.svgrOptions ?? {}), + ref: true + } + ...defaultOptions, + + } + } +}); +``` + +When you reference an SVG asset in TypeScript code, TypeScript may prompt that the module is missing a type definition: + +```bash +TS2307: Cannot find module './logo.svg' or its corresponding type declarations. +``` + +To fix this, you need to add type declaration for the SVG assets, create a `src/env.d.ts` file, and add the type declaration. + +```ts src/env.d.ts +declare module '*.svg' { + export const ReactComponent: React.FunctionComponent< + React.SVGProps + >; +} +declare module '*.svg?react' { + const ReactComponent: React.FunctionComponent>; + export default ReactComponent; +} +``` + +For additional information, refer to the plugin [documentation](https://rsbuild.dev/plugins/list/plugin-svgr#type-declaration). + +### `compressImage` + +- **Type**: `false` or `(defaultOptions: PluginImageCompressOptions) => PluginImageCompressOptions` +- **Default**: `defaultOptions => defaultOptions` + +Whether or not to compress images with [plugin-image-compress](https://github.com/rspack-contrib/rsbuild-plugin-image-compress). To disable image compression, set the option to `false`. + +```ts !#4 rsbuild.build.ts +import { defineBuildConfig } from "@workleap/rsbuild-configs"; + +export default defineBuildConfig(swcConfig, { + compressImage: false +}); +``` + +To customize [plugin-image-compress](https://github.com/rspack-contrib/rsbuild-plugin-image-compress), provide a function extending the default options. + +```ts !#4-9 rsbuild.build.ts +import { defineBuildConfig } from "@workleap/rsbuild-configs"; + +export default defineBuildConfig(swcConfig, { + compressImage: defaultOptions => { + return [ + ...defaultOptions, + "pngLossless" + ]; + } +}); +``` + +### `verbose` + +- **Type**: `boolean` +- **Default**: `false` + +Start the webpack process with verbose logging turned on. + +```ts !#4 rsbuild.build.ts +import { defineBuildConfig } from "@workleap/rsbuild-configs"; + +export default defineBuildConfig({ + verbose: true +}); +``` + +## Configuration transformers + +!!!warning +We do not guarantee that your configuration transformers won't break after an update. It's your responsibility to keep them up to date with new releases. +!!! + +The [predefined options](#use-predefined-options) are useful to quickly customize the [default build configuration](https://github.com/gsoft-inc/wl-web-configs/blob/main/packages/rsbuild-configs/src/build.ts) of `@workleap/rsbuild-configs`, but only covers a subset of an [Rsbuild configuration](https://rsbuild.dev/config/index). If you need full control over the configuration, you can provide configuration transformer functions through the `transformers` option of the `defineBuildConfig` function. Remember, **no locked in** :heart::v:. + +To view the default build configuration of `@workleap/rsbuild-configs`, have a look at the [build.ts configuration file](https://github.com/gsoft-inc/wl-web-configs/blob/main/packages/rsbuild-configs/src/build.ts) on GitHub. + +### `transformers` + +- **Type**: `((config: RsbuildConfig, context: RsbuildConfigTransformerContext) => RsbuildConfig)[]` +- **Default**: `[]` + +```ts +transformer(config: RsbuildConfig, context: RsbuildConfigTransformerContext) => RsbuildConfig +``` + +```ts !#3-13,16 rsbuild.build.ts +import { defineBuildConfig, type RsbuildConfig, type RsbuildConfigTransformer } from "@workleap/rsbuild-configs"; + +const forceNamedChunkIdsTransformer: RsbuildConfigTransformer = (config: RsbuildConfig) => { + config.tools = config.tools ?? {}; + config.tools.rspack = config.tools.rspack ?? {}; + + config.tools.rspack.optimization = { + ...(config.tools.rspack.optimization ?? {}), + chunkIds: "named" + }; + + return config; +}; + +export default defineBuildConfig({ + transformers: [forceNamedChunkIdsTransformer] +}); +``` + +### Execution context + +Generic transformers can use the `context` parameter to gather additional information about their execution context, like the `environment` they are operating in. + +```ts !#2 transformer.ts +export const transformer: RsbuildConfigTransformer = (config: RsbuildConfig) => { + if (context.environment === "build") { + config.output.filename = "[name].[contenthash].bundle.js"; + } + + return config; +} +``` + +- `environment`: `"dev" | "build" | "storybook"` +- `verbose`: `boolean` + +## Add a CLI script + +To create the bundle files for production, add the following script to your project `package.json` file: + +```json package.json +{ + "build": "rsbuild build --config rsbuild.build.ts" +} +``` + +## Use environment variables + +### cross-env + +We recommend instead to define environment variables using [cross-env](https://github.com/kentcdodds/cross-env). With `cross-env`, the environment variables will be made available to any Node.js files that are executed by the script process (`build` in the example below :point_down:): + +```json package.json +{ + "build": "cross-env DEBUG=true rsbuild build --config rsbuild.build.ts" +} +``` + +```ts !#3 rsbuild.build.ts +import { defineBuildConfig } from "@workleap/rsbuild-configs"; + +if (process.env.DEBUG) { + console.log("Configuring Rsbuild in debug mode!"); +} + +export default defineBuildConfig(); +``` + +However, there's a catch. When using `cross-env`, the variables will not be available in the application files because `cross-env` only makes them available to files that are executed by the process at **build time** while the application files are executed at **runtime** by a browser. + +To make them accessible to the application files, Rsbuild must be aware of those environment variables and **render** them into the **compiled application files**. This is the purpose of the `environmentVariables` option. + +### `environmentVariables` + +- **Type**: `Record` +- **Default**: `{}` + +First, define the variables with `environmentVariables`: + +```ts !#4-6 rsbuild.build.ts +import { defineBuildConfig } from "@workleap/rsbuild-configs"; + +export default defineBuildConfig({ + environmentVariables: { + "DEBUG": process.env.DEBUG === "true" + } +}); +``` + +Then, use the variables in any application files: + +```tsx !#2 src/app.tsx +export function App() { + if (process.env.DEBUG) { + console.log("The application has been bootstrapped in debug!"); + } + + return null; +} +``` + +!!! +The `=== "true"` part of `"DEBUG": process.env.DEBUG === "true"` is very important, otherwise the environment variable value would be `"true"` instead of `true`. +!!! + +!!!info +By default, Rsbuild injects a few environment variables into the code using the [source.define](https://rsbuild.dev/guide/advanced/env-vars#using-define) option. For additional information about these default environment variables, refer to the Rsbuild [documentation](https://rsbuild.dev/guide/advanced/env-vars#default-variables). +!!! + +## Try it :rocket: + +To test your new Rsbuild configuration, open a terminal at the root of the project and execute the [CLI script added earlier](#add-a-cli-script). The build process should complete without outputting any error in the terminal and the bundle files should be available in the `/dist` folder (or any other `distPath` you configured). diff --git a/docs/rsbuild/configure-dev.md b/docs/rsbuild/configure-dev.md index 3b5a8569..6d9d2b8e 100644 --- a/docs/rsbuild/configure-dev.md +++ b/docs/rsbuild/configure-dev.md @@ -25,7 +25,7 @@ yarn add -D @workleap/rsbuild-configs @workleap/browserslist-config @rsbuild/cor ``` +++ npm ```bash -npm install -D @workleap/rsbuild-configs @workleap/browserslist-config @rsbuild/core @rspack/core browserslist nodemon +npm install -D @workleap/rsbuild-configs @workleap/browserslist-config @rsbuild/core @rspack/core browserslist nodemon ``` +++ @@ -99,11 +99,10 @@ Next, let's set up [Browserlist](https://github.com/browserslist/browserslist) t First, create a `browserslistrc` file at the root of the project: -``` !#7 +``` !#6 web-project β”œβ”€β”€ public β”œβ”€β”€β”€β”€ index.html -β”œβ”€β”€β”€β”€ favicon.png β”œβ”€β”€ src β”œβ”€β”€β”€β”€ ... β”œβ”€β”€ .browserslistrc @@ -145,7 +144,7 @@ The `defineDevConfig(options)` function can be used as shown in the previous exa ### `entry` -- **Type**: `RsbuildEntry` +- **Type**: An object literal accepting any [source.entry](https://rsbuild.dev/config/source/entry) options. - **Default**: `{ index: "./src/index.tsx" }` Set Rsbuild [source.entry](https://rsbuild.dev/config/source/entry) option. @@ -162,20 +161,20 @@ export default defineDevConfig({ ### `https` -- **Type**: `boolean` | `ServerOptions` | `SecureServerSessionOptions` +- **Type**: `boolean` or an object literal accepting any [server.https](https://rsbuild.dev/config/server/https) options. - **Default**: `false` Set Rsbuild [server.https](https://rsbuild.dev/config/server/https) option and format Rsbuild [dev.assetPrefix](https://rsbuild.dev/config/dev/asset-prefix) option accordingly. ```ts !#4 rsbuild.dev.ts -import { defineDevConfig } from "@workleap/webpack-configs"; +import { defineDevConfig } from "@workleap/rsbuild-configs"; export default defineDevConfig({ https: true }); ``` -When `true`, a self-signed certificate will be generated with [rsbuild-plugin-basic-ssl](https://github.com/rspack-contrib/rsbuild-plugin-basic-ssl). +When `true`, a self-signed certificate will be generated with [rsbuild-plugin-basic-ssl](https://github.com/rspack-contrib/rsbuild-plugin-basic-ssl). To manually set a certificate, follow Rsbuild [instructions](https://rsbuild.dev/config/server/https#set-certificate). ### `host` @@ -265,7 +264,7 @@ export default defineDevConfig({ }); ``` -To customize the default [HTML template](https://rsbuild.dev/guide/basic/html-template) configuration, provide a function. +To customize the default [HTML template](https://rsbuild.dev/guide/basic/html-template) configuration, provide a function extending the default options. ```ts !#5-10 rsbuild.dev.ts import { defineDevConfig } from "@workleap/rsbuild-configs"; @@ -326,7 +325,7 @@ export default defineDevConfig({ }); ``` -To customize the Fast Refresh [configuration](https://rsbuild.dev/plugins/list/plugin-react#reactrefreshoptions), provide a [react](#react) function. +To customize the Fast Refresh [configuration](https://rsbuild.dev/plugins/list/plugin-react#reactrefreshoptions), provide a [react](#react) function extending the default options. ```ts !#4-11 rsbuild.dev.ts import { defineDevConfig } from "@workleap/rsbuild-configs"; @@ -345,7 +344,7 @@ export default defineDevConfig({ ### `sourceMap` -- **Type**: `false` | `SourceMap` +- **Type**: `false` or an object literal accepting any [output.sourceMap](https://rsbuild.dev/config/output/source-map) options. - **Default**: `{ js: "cheap-module-source-map", css: true }` Whether or not to generate [source map](https://rsbuild.dev/config/output/source-map). To disable source map, set the option to `false`. @@ -400,7 +399,7 @@ export default defineDevConfig({ }); ``` -To customize `@rsbuild/plugin-react` [configuration](https://rsbuild.dev/plugins/list/plugin-react), provide a function. +To customize [plugin-react](https://rsbuild.dev/plugins/list/plugin-react), provide a function to extend the default options. ```ts !#4-12 rsbuild.dev.ts import { defineDevConfig } from "@workleap/rsbuild-configs"; @@ -433,7 +432,7 @@ export default defineDevConfig(swcConfig, { }); ``` -To customize the `plugin-svgr` [configuration](https://rsbuild.dev/plugins/list/plugin-svgr), provide a function. +To customize the [plugin-svgr](https://rsbuild.dev/plugins/list/plugin-svgr), provide a function extending the default options. ```ts !#4-13 rsbuild.dev.ts import { defineDevConfig } from "@workleap/rsbuild-configs"; @@ -542,8 +541,6 @@ export const transformer: RsbuildConfigTransformer = (config: RsbuildConfig) => ...(config.tools.rspack.optimization ?? {}), chunkIds: "named" }; - - return config; } return config; diff --git a/docs/webpack/configure-build.md b/docs/webpack/configure-build.md index 08fd7f77..4b98f7a1 100644 --- a/docs/webpack/configure-build.md +++ b/docs/webpack/configure-build.md @@ -495,7 +495,7 @@ To deal with environment variables, the webpack documentation suggests using the ### cross-env -We recommend instead to define environment variables using [cross-env](https://github.com/kentcdodds/cross-env). With `cross-env`, the environment variables will be made available to any Node.js files that are executed by the script process (`dev` in the example below :point_down:): +We recommend instead to define environment variables using [cross-env](https://github.com/kentcdodds/cross-env). With `cross-env`, the environment variables will be made available to any Node.js files that are executed by the script process (`build` in the example below :point_down:): ```json package.json { diff --git a/packages/rsbuild-configs/package.json b/packages/rsbuild-configs/package.json index 07286aae..72a976b6 100644 --- a/packages/rsbuild-configs/package.json +++ b/packages/rsbuild-configs/package.json @@ -39,7 +39,8 @@ "dependencies": { "@rsbuild/plugin-basic-ssl": "^1.1.1", "@rsbuild/plugin-react": "^1.1.0", - "@rsbuild/plugin-svgr": "^1.0.6" + "@rsbuild/plugin-svgr": "^1.0.6", + "@rsbuild/plugin-image-compress": "^1.1.0" }, "devDependencies": { "@rsbuild/core": "1.1.9", diff --git a/packages/rsbuild-configs/src/build.ts b/packages/rsbuild-configs/src/build.ts index bc754cb5..969fea21 100644 --- a/packages/rsbuild-configs/src/build.ts +++ b/packages/rsbuild-configs/src/build.ts @@ -1,4 +1,5 @@ import { defineConfig, type DistPathConfig, type HtmlConfig, type Minify, type RsbuildConfig, type RsbuildEntry, type RsbuildPlugins, type SourceMap } from "@rsbuild/core"; +import { pluginImageCompress, type PluginImageCompressOptions } from "@rsbuild/plugin-image-compress"; import { pluginReact, type PluginReactOptions } from "@rsbuild/plugin-react"; import { pluginSvgr, type PluginSvgrOptions } from "@rsbuild/plugin-svgr"; import { SwcJsMinimizerRspackPlugin, type Optimization } from "@rspack/core"; @@ -10,6 +11,7 @@ export type OptimizeOption = boolean | "readable"; export type DefineBuildHtmlPluginConfigFunction = (defaultOptions: HtmlConfig) => HtmlConfig; export type DefineBuildDefineReactPluginConfigFunction = (defaultOptions: PluginReactOptions) => PluginReactOptions; export type DefineBuildSvgrPluginConfigFunction = (defaultOptions: PluginSvgrOptions) => PluginSvgrOptions; +export type DefineBuildImageCompressPluginConfigFunction = (defaultOptions: PluginImageCompressOptions) => PluginImageCompressOptions; export interface DefineBuildConfigOptions { entry?: RsbuildEntry; @@ -20,10 +22,11 @@ export interface DefineBuildConfigOptions { plugins?: RsbuildPlugins; html?: false | DefineBuildHtmlPluginConfigFunction; minify?: Minify; - sourceMap?: boolean | SourceMap; optimize?: OptimizeOption; + sourceMap?: boolean | SourceMap; react?: false | DefineBuildDefineReactPluginConfigFunction; svgr? : false | DefineBuildSvgrPluginConfigFunction; + compressImage?: false | DefineBuildImageCompressPluginConfigFunction; environmentVariables?: Record; transformers?: RsbuildConfigTransformer[]; verbose?: boolean; @@ -41,8 +44,16 @@ function defineSvgrPluginConfig(options: PluginSvgrOptions) { return options; } +function defineImageCompressPluginConfig(options: PluginImageCompressOptions) { + return options; +} + export function getOptimizationConfig(optimize: OptimizeOption): Optimization { - if (optimize === "readable") { + if (optimize === true) { + return { + minimize: true + }; + } else if (optimize === "readable") { return { minimize: true, minimizer: [ @@ -60,10 +71,6 @@ export function getOptimizationConfig(optimize: OptimizeOption): Optimization { moduleIds: "named", mangleExports: false }; - } else if (optimize) { - return { - minimize: true - }; } // Doesn't turnoff everything but is good enough to help with debugging scenarios. @@ -90,13 +97,14 @@ export function defineBuildConfig(options: DefineBuildConfigOptions = {}) { plugins = [], html = defaultDefineHtmlPluginConfig, minify = true, + optimize = true, sourceMap = { js: "source-map", css: true }, react = defaultDefineReactPluginConfig, - optimize = true, svgr = defineSvgrPluginConfig, + compressImage = defineImageCompressPluginConfig, // Using an empty object literal as the default value to ensure // "process.env" is always available. environmentVariables = {}, @@ -149,6 +157,7 @@ export function defineBuildConfig(options: DefineBuildConfigOptions = {}) { exportType: "named" } })), + compressImage && pluginImageCompress(compressImage(["jpeg", "png", "ico", "svg"])), ...plugins ].filter(Boolean), tools: { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e46560b6..31532235 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -217,6 +217,9 @@ importers: '@rsbuild/plugin-basic-ssl': specifier: ^1.1.1 version: 1.1.1(@rsbuild/core@1.1.9) + '@rsbuild/plugin-image-compress': + specifier: ^1.1.0 + version: 1.1.0(@rsbuild/core@1.1.9) '@rsbuild/plugin-react': specifier: ^1.1.0 version: 1.1.0(@rsbuild/core@1.1.9) @@ -1902,6 +1905,15 @@ packages: peerDependencies: effect: ^3.6.5 + '@emnapi/core@1.3.1': + resolution: {integrity: sha512-pVGjBIt1Y6gg3EJN8jTcfpP/+uuRksIo055oE/OBkDNcjZqVbfkWCksG1Jp4yZnj3iKWyWX8fdG/j6UDYPbFog==} + + '@emnapi/runtime@1.3.1': + resolution: {integrity: sha512-kEBmG8KyqtxJZv+ygbEim+KCGtIq1fC22Ms3S4ziXmYKm8uyoLX0MHONVKwp+9opg390VaKRNt4a7A9NwmpNhw==} + + '@emnapi/wasi-threads@1.0.1': + resolution: {integrity: sha512-iIBu7mwkq4UQGeMEM8bLwNK962nXdhodeScX4slfQnRhEMMzvYivHhutCIk8uojvmASXXPC2WNEjwxFWk72Oqw==} + '@esbuild/aix-ppc64@0.24.0': resolution: {integrity: sha512-WtKdFM7ls47zkKHFVzMz8opM7LkcsIp9amDUBIAWirg70RM71WRSjdILPsY5Uv1D42ZpUfaPILDlfactHgsRkw==} engines: {node: '>=18'} @@ -2256,6 +2268,84 @@ packages: resolution: {integrity: sha512-USvgCL/uOGFtVa6SVyRrC8kIAedzRohxIXN5LISlg5C5vLZCn7dgMFVSNhSF9cuBEFrm/O2spDWEZeMnw4ZXYg==} engines: {node: '>=18'} + '@napi-rs/image-android-arm64@1.9.2': + resolution: {integrity: sha512-DQNI06ukKqpF4eogz9zyxfU+GYp11TfDqSNWKmk/IRU2oiB0DEgskuj7ZzaKMPJWFRZjI86V233UrrNRh76h2Q==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [android] + + '@napi-rs/image-darwin-arm64@1.9.2': + resolution: {integrity: sha512-w+0X87sORbC2uDpH7NAdELOnvzhu3dB19h2oMaD+YIv/+CVXV5eK2PS3zkRgMLCinVtFOZFZK3dFbHU3kncCRw==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [darwin] + + '@napi-rs/image-darwin-x64@1.9.2': + resolution: {integrity: sha512-8SnFDcgUSoL6Y38lstXi5FYECD1f4dJqQe2UCTwciED8gZnpC8Pju7JYJWcYgHHXn1JnKP9T1lPlSaX+L56EgA==} + engines: {node: '>= 10'} + cpu: [x64] + os: [darwin] + + '@napi-rs/image-freebsd-x64@1.9.2': + resolution: {integrity: sha512-oS0+iSb8AekjaHgTZdARKceqTPxSokByLzNQ9vGf2lZlTwlRFmXGq4XYutyzqzRuLT3BATLwtGMXiguMEYMuUw==} + engines: {node: '>= 10'} + cpu: [x64] + os: [freebsd] + + '@napi-rs/image-linux-arm-gnueabihf@1.9.2': + resolution: {integrity: sha512-bsbZSvw3wa7yaLVvz4M5VhJaB9LmgjAL3W7rnmXaX5BgpaQImNDm9MrxPG8ennr9Pbn6qDtCSioOz53ZgWUtgg==} + engines: {node: '>= 10'} + cpu: [arm] + os: [linux] + + '@napi-rs/image-linux-arm64-gnu@1.9.2': + resolution: {integrity: sha512-tiN9RMwEIcA8TodvmxdeJqsRdUGKAmxQ2aa0FkYjshdkmChG/sqUtUoL9LdmDf1tw1IACrSuT2Wj4LevxBdIJA==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [linux] + + '@napi-rs/image-linux-arm64-musl@1.9.2': + resolution: {integrity: sha512-w6Sx1j9PtqO2bP3Jl6nuMryzxA3zsoc1U8u1H7AZketyhxXIxqVm0oGomZGs5Bgshzau45bcWinp6GWrlSwt6A==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [linux] + + '@napi-rs/image-linux-x64-gnu@1.9.2': + resolution: {integrity: sha512-yB/s9wNB/9YHpQ4TwN8NWMA1tEK1gPLQwtysa68yMdHczb+7BTCKCIYIHD9rUulyT1Q/VgLIJCUMoxve0pIoeg==} + engines: {node: '>= 10'} + cpu: [x64] + os: [linux] + + '@napi-rs/image-linux-x64-musl@1.9.2': + resolution: {integrity: sha512-x9dRlo27xYXonh+gZZTqQL4lAfi/lhi8K8LE2hczbZffqmXvWU7NuHSgPVVeU/nvcMMqw1Cjzn81h7ny44SLbQ==} + engines: {node: '>= 10'} + cpu: [x64] + os: [linux] + + '@napi-rs/image-wasm32-wasi@1.9.2': + resolution: {integrity: sha512-BeA1wzzIG4+tdAwXWaAjObBOC6SzIbq0IhykSQ1xCGvYwd8stsn7ktPRz5b55PDo+Doj65PCT4H/xUgFcSiLCw==} + engines: {node: '>=14.0.0'} + cpu: [wasm32] + + '@napi-rs/image-win32-ia32-msvc@1.9.2': + resolution: {integrity: sha512-JDJP04Hg9Qru5Pth4gfBkXz9hZd/otx6ymi2VTuSKDFjpJIjk4tyUr9+BIE1ghFCHDzeJGVe7CDGdF/NTA1xrg==} + engines: {node: '>= 10'} + cpu: [ia32] + os: [win32] + + '@napi-rs/image-win32-x64-msvc@1.9.2': + resolution: {integrity: sha512-baRyTED6FkTsPliSOH7x8TV/cyAST9y6L1ClSgSCVEx7+W8MKKig90fF302kEa2PwMAyrXM3Ytq9KuIC7xJ+eA==} + engines: {node: '>= 10'} + cpu: [x64] + os: [win32] + + '@napi-rs/image@1.9.2': + resolution: {integrity: sha512-CvTC3XL5/BzHaVkJOZy31xOJLNSY3rBuUIQixaE/LwEQNSUdaxWa9gUyUkC9lUekkUp26CzaLLj2w7l7bxB1ag==} + engines: {node: '>= 10'} + + '@napi-rs/wasm-runtime@0.2.5': + resolution: {integrity: sha512-kwUxR7J9WLutBbulqg1dfOrMTwhMdXLdcGUhcbCcGwnPLt3gz19uHVdwH1syKVDbE022ZS2vZxOWflFLS0YTjw==} + '@nodelib/fs.scandir@2.1.5': resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} @@ -2511,6 +2601,14 @@ packages: '@rsbuild/core': optional: true + '@rsbuild/plugin-image-compress@1.1.0': + resolution: {integrity: sha512-ZyK3QlcuQmqd8h3vGCX0+iEo1lBCDJEbJjcbZkRR6bs4IR2YNPP/rRo8eCPWwRS5/GBkTkwZhznfyjraDRtJpw==} + peerDependencies: + '@rsbuild/core': 1.x + peerDependenciesMeta: + '@rsbuild/core': + optional: true + '@rsbuild/plugin-react@1.1.0': resolution: {integrity: sha512-uqdRoV2V91G1XIA14dAmxqYTlTDVf0ktpE7TgwG29oQ2j+DerF1kh29WPHK9HvGE34JTfaBrsme2Zmb6bGD0cw==} peerDependencies: @@ -3006,6 +3104,9 @@ packages: '@tsconfig/node16@1.0.4': resolution: {integrity: sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==} + '@tybys/wasm-util@0.9.0': + resolution: {integrity: sha512-6+7nlbMVX/PVDCwaIQ8nTOPveOcFLSt8GcXdx8hD0bt39uWxYT88uXzqTd4fTvqta7oeUJqudepapKNt2DYJFw==} + '@types/acorn@4.0.6': resolution: {integrity: sha512-veQTnWP+1D/xbxVrPC3zHnCZRjSrKfhbMUlEA43iMZLu7EsnTtkJklIuwrCPbOi8YkvDQAiW05VQQFvvz9oieQ==} @@ -9360,6 +9461,22 @@ snapshots: effect: 3.6.5 fast-check: 3.21.0 + '@emnapi/core@1.3.1': + dependencies: + '@emnapi/wasi-threads': 1.0.1 + tslib: 2.8.1 + optional: true + + '@emnapi/runtime@1.3.1': + dependencies: + tslib: 2.8.1 + optional: true + + '@emnapi/wasi-threads@1.0.1': + dependencies: + tslib: 2.8.1 + optional: true + '@esbuild/aix-ppc64@0.24.0': optional: true @@ -9812,6 +9929,66 @@ snapshots: outvariant: 1.4.3 strict-event-emitter: 0.5.1 + '@napi-rs/image-android-arm64@1.9.2': + optional: true + + '@napi-rs/image-darwin-arm64@1.9.2': + optional: true + + '@napi-rs/image-darwin-x64@1.9.2': + optional: true + + '@napi-rs/image-freebsd-x64@1.9.2': + optional: true + + '@napi-rs/image-linux-arm-gnueabihf@1.9.2': + optional: true + + '@napi-rs/image-linux-arm64-gnu@1.9.2': + optional: true + + '@napi-rs/image-linux-arm64-musl@1.9.2': + optional: true + + '@napi-rs/image-linux-x64-gnu@1.9.2': + optional: true + + '@napi-rs/image-linux-x64-musl@1.9.2': + optional: true + + '@napi-rs/image-wasm32-wasi@1.9.2': + dependencies: + '@napi-rs/wasm-runtime': 0.2.5 + optional: true + + '@napi-rs/image-win32-ia32-msvc@1.9.2': + optional: true + + '@napi-rs/image-win32-x64-msvc@1.9.2': + optional: true + + '@napi-rs/image@1.9.2': + optionalDependencies: + '@napi-rs/image-android-arm64': 1.9.2 + '@napi-rs/image-darwin-arm64': 1.9.2 + '@napi-rs/image-darwin-x64': 1.9.2 + '@napi-rs/image-freebsd-x64': 1.9.2 + '@napi-rs/image-linux-arm-gnueabihf': 1.9.2 + '@napi-rs/image-linux-arm64-gnu': 1.9.2 + '@napi-rs/image-linux-arm64-musl': 1.9.2 + '@napi-rs/image-linux-x64-gnu': 1.9.2 + '@napi-rs/image-linux-x64-musl': 1.9.2 + '@napi-rs/image-wasm32-wasi': 1.9.2 + '@napi-rs/image-win32-ia32-msvc': 1.9.2 + '@napi-rs/image-win32-x64-msvc': 1.9.2 + + '@napi-rs/wasm-runtime@0.2.5': + dependencies: + '@emnapi/core': 1.3.1 + '@emnapi/runtime': 1.3.1 + '@tybys/wasm-util': 0.9.0 + optional: true + '@nodelib/fs.scandir@2.1.5': dependencies: '@nodelib/fs.stat': 2.0.5 @@ -10057,6 +10234,13 @@ snapshots: optionalDependencies: '@rsbuild/core': 1.1.9 + '@rsbuild/plugin-image-compress@1.1.0(@rsbuild/core@1.1.9)': + dependencies: + '@napi-rs/image': 1.9.2 + svgo: 3.3.2 + optionalDependencies: + '@rsbuild/core': 1.1.9 + '@rsbuild/plugin-react@1.1.0(@rsbuild/core@1.1.9)': dependencies: '@rsbuild/core': 1.1.9 @@ -10608,6 +10792,11 @@ snapshots: '@tsconfig/node16@1.0.4': {} + '@tybys/wasm-util@0.9.0': + dependencies: + tslib: 2.8.1 + optional: true + '@types/acorn@4.0.6': dependencies: '@types/estree': 1.0.6 From 6ae8c3fd59f73cbf86f5e7e75c75a859bfed2434 Mon Sep 17 00:00:00 2001 From: patricklafrance Date: Thu, 12 Dec 2024 22:49:23 -0500 Subject: [PATCH 09/18] More stuff --- docs/postcss/configure-project.md | 2 +- docs/rsbuild/configure-build.md | 50 ++-- docs/rsbuild/configure-dev.md | 24 +- docs/rsbuild/configure-storybook.md | 386 ++++++++++++++++++++++++++++ docs/rsbuild/default.md | 2 +- docs/samples.md | 18 +- docs/webpack/configure-build.md | 6 +- docs/webpack/configure-dev.md | 6 +- 8 files changed, 454 insertions(+), 40 deletions(-) create mode 100644 docs/rsbuild/configure-storybook.md diff --git a/docs/postcss/configure-project.md b/docs/postcss/configure-project.md index bb8b4177..edf7f3cf 100644 --- a/docs/postcss/configure-project.md +++ b/docs/postcss/configure-project.md @@ -158,7 +158,7 @@ export default defineConfig({ ## Configure webpack !!!info -If your project is using `@workleap/wepack-config`, you don't have to configure `postcss-loader` as the [defineDevConfig](../webpack/configure-dev.md#definedevconfig) and [defineBuildConfig](../webpack/configure-build.md#definebuildconfig) functions already takes care of configuring PostCSS. +If your project is using `@workleap/wepack-config`, you don't have to configure `postcss-loader` as the [defineDevConfig](../webpack/configure-dev.md#webpackdevjs) and [defineBuildConfig](../webpack/configure-build.md#webpackbuildjs) functions already takes care of configuring PostCSS. !!! To integrate with webpack, update your configuration file to include a [postcss-loader](https://www.npmjs.com/package/postcss-loader): diff --git a/docs/rsbuild/configure-build.md b/docs/rsbuild/configure-build.md index e936d014..d38e32b2 100644 --- a/docs/rsbuild/configure-build.md +++ b/docs/rsbuild/configure-build.md @@ -15,15 +15,15 @@ To configure [Rsbuild](https://rsbuild.dev/) for a production environment, execu +++ pnpm ```bash -pnpm add -D @workleap/rsbuild-configs @workleap/browserslist-config @rsbuild/core @rspack/core browserslist nodemon +pnpm add -D @workleap/rsbuild-configs @workleap/browserslist-config @rsbuild/core @rspack/core browserslist ``` +++ yarn ```bash -yarn add -D @workleap/rsbuild-configs @workleap/browserslist-config @rsbuild/core @rspack/core browserslist nodemon +yarn add -D @workleap/rsbuild-configs @workleap/browserslist-config @rsbuild/core @rspack/core browserslist ``` +++ npm ```bash -npm install -D @workleap/rsbuild-configs @workleap/browserslist-config @rsbuild/core @rspack/core browserslist nodemon +npm install -D @workleap/rsbuild-configs @workleap/browserslist-config @rsbuild/core @rspack/core browserslist ``` +++ @@ -91,7 +91,7 @@ Then, add the assets to the `index.html` file: If `assetPrefix` is set to `auto`, use `href="favicon.png"` instead. !!! -## Browserslist +### Browserslist Next, let's set up [Browserlist](https://github.com/browserslist/browserslist) to define the minimum browser versions supported by the application. Rsbuild will automatically detect and load the browser versions from the nearest `.browserslistrc` configuration file. @@ -113,7 +113,7 @@ Then, open the newly created file and extend the default configuration with the extends @workleap/browserslist-config ``` -### `defineBuildConfig` +### `rsbuild.build.ts` Next, create a configuration file named `rsbuild.build.ts` at the root of the project: @@ -213,7 +213,7 @@ Append the provided Rsbuild plugins to the configuration. import { defineBuildConfig } from "@workleap/rsbuild-configs"; import { pluginAssetsRetry } from "@rsbuild/plugin-assets-retry"; -export default defineBuildConfig(swcConfig, { +export default defineBuildConfig({ plugins: [pluginAssetsRetry()] }); ``` @@ -373,7 +373,7 @@ Whether or not to handle `.svg` files with [plugin-svgr](https://rsbuild.dev/plu ```ts !#4 rsbuild.build.ts import { defineBuildConfig } from "@workleap/rsbuild-configs"; -export default defineBuildConfig(swcConfig, { +export default defineBuildConfig({ svgr: false }); ``` @@ -383,7 +383,7 @@ To customize [plugin-svgr](https://rsbuild.dev/plugins/list/plugin-svgr), provid ```ts !#4-13 rsbuild.build.ts import { defineBuildConfig } from "@workleap/rsbuild-configs"; -export default defineBuildConfig(swcConfig, { +export default defineBuildConfig({ svgr: defaultOptions => { return { svgrOptions: { @@ -419,6 +419,16 @@ declare module '*.svg?react' { For additional information, refer to the plugin [documentation](https://rsbuild.dev/plugins/list/plugin-svgr#type-declaration). +#### Import images + +By default, `plugin-svgr` is configured to support [named import](https://rsbuild.dev/plugins/list/plugin-svgr#named-import) for `ReactComponent`: + +```tsx +import { ReactComponent as Logo } from "./logo.svg"; + +export const App = () => ; +``` + ### `compressImage` - **Type**: `false` or `(defaultOptions: PluginImageCompressOptions) => PluginImageCompressOptions` @@ -429,7 +439,7 @@ Whether or not to compress images with [plugin-image-compress](https://github.co ```ts !#4 rsbuild.build.ts import { defineBuildConfig } from "@workleap/rsbuild-configs"; -export default defineBuildConfig(swcConfig, { +export default defineBuildConfig({ compressImage: false }); ``` @@ -439,7 +449,7 @@ To customize [plugin-image-compress](https://github.com/rspack-contrib/rsbuild-p ```ts !#4-9 rsbuild.build.ts import { defineBuildConfig } from "@workleap/rsbuild-configs"; -export default defineBuildConfig(swcConfig, { +export default defineBuildConfig({ compressImage: defaultOptions => { return [ ...defaultOptions, @@ -454,7 +464,7 @@ export default defineBuildConfig(swcConfig, { - **Type**: `boolean` - **Default**: `false` -Start the webpack process with verbose logging turned on. +Start the Rsbuild process with verbose logging turned on. ```ts !#4 rsbuild.build.ts import { defineBuildConfig } from "@workleap/rsbuild-configs"; @@ -483,16 +493,13 @@ To view the default build configuration of `@workleap/rsbuild-configs`, have a l transformer(config: RsbuildConfig, context: RsbuildConfigTransformerContext) => RsbuildConfig ``` -```ts !#3-13,16 rsbuild.build.ts +```ts !#3-10,16 rsbuild.build.ts import { defineBuildConfig, type RsbuildConfig, type RsbuildConfigTransformer } from "@workleap/rsbuild-configs"; const forceNamedChunkIdsTransformer: RsbuildConfigTransformer = (config: RsbuildConfig) => { - config.tools = config.tools ?? {}; - config.tools.rspack = config.tools.rspack ?? {}; - - config.tools.rspack.optimization = { - ...(config.tools.rspack.optimization ?? {}), - chunkIds: "named" + config.output = { + ...(config.output ?? {}), + filename: "[name].[contenthash].bundle.js" }; return config; @@ -510,7 +517,10 @@ Generic transformers can use the `context` parameter to gather additional inform ```ts !#2 transformer.ts export const transformer: RsbuildConfigTransformer = (config: RsbuildConfig) => { if (context.environment === "build") { - config.output.filename = "[name].[contenthash].bundle.js"; + config.output = { + ...(config.output ?? {}), + filename: "[name].[contenthash].bundle.js" + }; } return config; @@ -575,7 +585,7 @@ export default defineBuildConfig({ Then, use the variables in any application files: -```tsx !#2 src/app.tsx +```tsx !#2 src/App.tsx export function App() { if (process.env.DEBUG) { console.log("The application has been bootstrapped in debug!"); diff --git a/docs/rsbuild/configure-dev.md b/docs/rsbuild/configure-dev.md index 6d9d2b8e..a3393484 100644 --- a/docs/rsbuild/configure-dev.md +++ b/docs/rsbuild/configure-dev.md @@ -93,7 +93,7 @@ Then, add the assets to the `index.html` file: If `assetPrefix` is set to `auto`, use `href="favicon.png"` instead. !!! -## Browserslist +### Browserslist Next, let's set up [Browserlist](https://github.com/browserslist/browserslist) to define the minimum browser versions supported by the application. Rsbuild will automatically detect and load the browser versions from the nearest `.browserslistrc` configuration file. @@ -115,7 +115,7 @@ Then, open the newly created file and extend the default configuration with the extends @workleap/browserslist-config ``` -### `defineDevConfig` +### `rsbuild.dev.ts` Next, create a configuration file named `rsbuild.dev.ts` at the root of the project: @@ -135,7 +135,7 @@ Then, open the newly created file and `export` the Rsbuild configuration by usin ```ts rsbuild.dev.ts import { defineDevConfig } from "@workleap/rsbuild-configs"; -export default defineDevConfig(swcConfig); +export default defineDevConfig(); ``` ## Use predefined options @@ -244,7 +244,7 @@ Append the provided Rsbuild plugins to the configuration. import { defineDevConfig } from "@workleap/rsbuild-configs"; import { pluginAssetsRetry } from "@rsbuild/plugin-assets-retry"; -export default defineDevConfig(swcConfig, { +export default defineDevConfig({ plugins: [pluginAssetsRetry()] }); ``` @@ -427,7 +427,7 @@ Whether or not to handle `.svg` files with [plugin-svgr](https://rsbuild.dev/plu ```ts !#4 rsbuild.dev.ts import { defineDevConfig } from "@workleap/rsbuild-configs"; -export default defineDevConfig(swcConfig, { +export default defineDevConfig({ svgr: false }); ``` @@ -437,7 +437,7 @@ To customize the [plugin-svgr](https://rsbuild.dev/plugins/list/plugin-svgr), pr ```ts !#4-13 rsbuild.dev.ts import { defineDevConfig } from "@workleap/rsbuild-configs"; -export default defineDevConfig(swcConfig, { +export default defineDevConfig({ svgr: defaultOptions => { return { svgrOptions: { @@ -473,6 +473,16 @@ declare module '*.svg?react' { For additional information, refer to the plugin [documentation](https://rsbuild.dev/plugins/list/plugin-svgr#type-declaration). +#### Import images + +By default, `plugin-svgr` is configured to support [named import](https://rsbuild.dev/plugins/list/plugin-svgr#named-import) for `ReactComponent`: + +```tsx +import { ReactComponent as Logo } from "./logo.svg"; + +export const App = () => ; +``` + ### `verbose` - **Type**: `boolean` @@ -633,7 +643,7 @@ export default defineDevConfig({ Then, use the variables in any application files: -```tsx !#2 src/app.tsx +```tsx !#2 src/App.tsx export function App() { if (process.env.DEBUG) { console.log("The application has been bootstrapped in debug!"); diff --git a/docs/rsbuild/configure-storybook.md b/docs/rsbuild/configure-storybook.md new file mode 100644 index 00000000..930cc852 --- /dev/null +++ b/docs/rsbuild/configure-storybook.md @@ -0,0 +1,386 @@ +--- +order: 80 +label: Configure for Storybook +meta: + title: Configure for Storybook - Rsbuild +toc: + depth: 2-3 +--- + +# Configure for Storybook + +To configure [Rsbuild](https://rsbuild.dev/) for Storybook, execute the following steps. + +## Install the packages + ++++ pnpm +```bash +pnpm add -D @workleap/rsbuild-configs @workleap/browserslist-config @rsbuild/core @rspack/core browserslist storybook-react-rsbuild +``` ++++ yarn +```bash +yarn add -D @workleap/rsbuild-configs @workleap/browserslist-config @rsbuild/core @rspack/core browserslist storybook-react-rsbuild +``` ++++ npm +```bash +npm install -D @workleap/rsbuild-configs @workleap/browserslist-config @rsbuild/core @rspack/core browserslist storybook-react-rsbuild +``` ++++ + +## Configure Rsbuild + +### Browserslist + +First, let's set up [Browserlist](https://github.com/browserslist/browserslist) to define the minimum browser versions supported by the application. Rsbuild will automatically detect and load the browser versions from the nearest `.browserslistrc` configuration file. + +First, create a `browserslistrc` file at the root of the project: + +``` !#5 +storybook +β”œβ”€β”€ .storybook +β”œβ”€β”€β”€β”€ main.ts +β”œβ”€β”€β”€β”€ preview.tsx +β”œβ”€β”€ .browserslistrc +β”œβ”€β”€ package.json +``` + +Then, open the newly created file and extend the default configuration with the shared configuration provided by `@workleap/browserslist-config`: + +``` .browserslistrc +extends @workleap/browserslist-config +``` + +### `rsbuild.config.ts` + +Next, create a configuration file named `rsbuild.config.ts` under the `storybook` folder: + +``` !#5 +storybook +β”œβ”€β”€ .storybook +β”œβ”€β”€β”€β”€ main.ts +β”œβ”€β”€β”€β”€ preview.tsx +β”œβ”€β”€β”€β”€ rsbuild.configts +β”œβ”€β”€ .browserslistrc +β”œβ”€β”€ package.json +``` + +Then, open the newly created file and `export` the Rsbuild configuration by using the `defineStorybookConfig(options)` function: + +```ts rsbuild.config.ts +import { defineStorybookConfig } from "@workleap/rsbuild-configs"; + +export default defineStorybookConfig(); +``` + +### `main.ts` + +Finally, open the `.storybook/main.ts` file and set `storybook-react-rsbuild` as the framework to use: + +```ts !#4 main.ts +import type { StorybookConfig } from "storybook-react-rsbuild"; + +const storybookConfig: StorybookConfig = { + framework: "storybook-react-rsbuild", + stories: [ + "../../src/**/*.stories.(tsx|mdx)" + ] +}; + +export default storybookConfig; +``` + +## Use predefined options + +The `defineStorybookConfig(options)` function can be used as shown in the previous example, however, if you wish to customize the default configuration, the function also accept a few predefined options to help with that πŸ‘‡ + +### `plugins` + +- **Type**: An array of Rsbuild [plugin instances](https://rsbuild.dev/plugins/list/index) +- **Default**: `[]` + +Append the provided Rsbuild plugins to the configuration. + +```ts !#5 rsbuild.config.ts +import { defineStorybookConfig } from "@workleap/rsbuild-configs"; +import { pluginAssetsRetry } from "@rsbuild/plugin-assets-retry"; + +export default defineStorybookConfig({ + plugins: [pluginAssetsRetry()] +}); +``` + +### `sourceMap` + +- **Type**: `false` or an object literal accepting any [output.sourceMap](https://rsbuild.dev/config/output/source-map) options. +- **Default**: `{ js: "cheap-module-source-map", css: true }` + +Whether or not to generate [source map](https://rsbuild.dev/config/output/source-map). To disable source map, set the option to `false`. + +```ts !#4 rsbuild.config.ts +import { defineStorybookConfig } from "@workleap/rsbuild-configs"; + +export default defineStorybookConfig({ + sourceMap: false +}); +``` + +To customize the source map [configuration](https://rsbuild.dev/config/output/source-map), provide an object literal. + +```ts !#4-6 rsbuild.config.ts +import { defineStorybookConfig } from "@workleap/rsbuild-configs"; + +export default defineStorybookConfig({ + sourceMap: { + css: false + } +}); +``` + +### `react` + +- **Type**: `false` or `(defaultOptions: PluginReactOptions) => PluginReactOptions` +- **Default**: `defaultOptions => defaultOptions` + +Whether or not to transform React code. To disable React code transformation, set the option to `false`. + +```ts !#4 rsbuild.config.ts +import { defineStorybookConfig } from "@workleap/rsbuild-configs"; + +export default defineStorybookConfig({ + react: false +}); +``` + +To customize [plugin-react](https://rsbuild.dev/plugins/list/plugin-react), provide a function to extend the default options. + +```ts !#4-12 rsbuild.config.ts +import { defineStorybookConfig } from "@workleap/rsbuild-configs"; + +export default defineStorybookConfig({ + react: defaultOptions => { + return { + ...defaultOptions, + swcReactOptions: { + ...(defaultOptions.swcReactOptions ?? {}), + runtime: "classic" + } + }; + } +}); +``` + +### `svgr` + +- **Type**: `false` or `(defaultOptions: PluginSvgrOptions) => PluginSvgrOptions` +- **Default**: `defaultOptions => defaultOptions` + +Whether or not to handle `.svg` files with [plugin-svgr](https://rsbuild.dev/plugins/list/plugin-svgr). When the option is set to `false`, the `.svg` files will be handled by the `asset/resource` rule. + +```ts !#4 rsbuild.config.ts +import { defineStorybookConfig } from "@workleap/rsbuild-configs"; + +export default defineStorybookConfig({ + svgr: false +}); +``` + +To customize [plugin-svgr](https://rsbuild.dev/plugins/list/plugin-svgr), provide a function extending the default options. + +```ts !#4-13 rsbuild.config.ts +import { defineStorybookConfig } from "@workleap/rsbuild-configs"; + +export default defineStorybookConfig({ + svgr: defaultOptions => { + return { + svgrOptions: { + ...(defaultOptions.svgrOptions ?? {}), + ref: true + } + ...defaultOptions, + + } + } +}); +``` + +When you reference an SVG asset in TypeScript code, TypeScript may prompt that the module is missing a type definition: + +```bash +TS2307: Cannot find module './logo.svg' or its corresponding type declarations. +``` + +To fix this, you need to add type declaration for the SVG assets, create a `src/env.d.ts` file, and add the type declaration. + +```ts src/env.d.ts +declare module '*.svg' { + export const ReactComponent: React.FunctionComponent< + React.SVGProps + >; +} +declare module '*.svg?react' { + const ReactComponent: React.FunctionComponent>; + export default ReactComponent; +} +``` + +For additional information, refer to the plugin [documentation](https://rsbuild.dev/plugins/list/plugin-svgr#type-declaration). + +#### Import images + +By default, `plugin-svgr` is configured to support [named import](https://rsbuild.dev/plugins/list/plugin-svgr#named-import) for `ReactComponent`: + +```tsx +import { ReactComponent as Logo } from "./logo.svg"; + +export const App = () => ; +``` + +### `verbose` + +- **Type**: `boolean` +- **Default**: `false` + +Start the Rsbuild process with verbose logging turned on. + +```ts !#4 rsbuild.build.ts +import { defineBuildConfig } from "@workleap/rsbuild-configs"; + +export default defineBuildConfig({ + verbose: true +}); +``` + +## Configuration transformers + +!!!warning +We do not guarantee that your configuration transformers won't break after an update. It's your responsibility to keep them up to date with new releases. +!!! + +The [predefined options](#use-predefined-options) are useful to quickly customize the [default Storybook configuration](https://github.com/gsoft-inc/wl-web-configs/blob/main/packages/rsbuild-configs/src/storybook.ts) of `@workleap/rsbuild-configs`, but only covers a subset of an [Rsbuild configuration](https://rsbuild.dev/config/index). If you need full control over the configuration, you can provide configuration transformer functions through the `transformers` option of the `defineBuildConfig` function. Remember, **no locked in** :heart::v:. + +To view the default build configuration of `@workleap/rsbuild-configs`, have a look at the [storybook.ts configuration file](https://github.com/gsoft-inc/wl-web-configs/blob/main/packages/rsbuild-configs/src/storybook.ts) on GitHub. + +### `transformers` + +- **Type**: `((config: RsbuildConfig, context: RsbuildConfigTransformerContext) => RsbuildConfig)[]` +- **Default**: `[]` + +```ts +transformer(config: RsbuildConfig, context: RsbuildConfigTransformerContext) => RsbuildConfig +``` + +```ts !#3-10,13 rsbuild.build.ts +import { defineBuildConfig, type RsbuildConfig, type RsbuildConfigTransformer } from "@workleap/rsbuild-configs"; + +const useInlineStylesTransformer: RsbuildConfigTransformer = (config: RsbuildConfig) => { + config.output = { + ...(config.ouput ?? {}), + inlineStyles: true + }; + + return config; +}; + +export default defineBuildConfig({ + transformers: [useInlineStylesTransformer] +}); +``` + +### Execution context + +Generic transformers can use the `context` parameter to gather additional information about their execution context, like the `environment` they are operating in. + +```ts !#2 transformer.ts +export const transformer: RsbuildConfigTransformer = (config: RsbuildConfig) => { + if (context.environment === "storybook") { + config.output = { + ...(config.ouput ?? {}), + inlineStyles: true + }; + } + + return config; +} +``` + +- `environment`: `"dev" | "build" | "storybook"` +- `verbose`: `boolean` + +## Add CLI scripts + +To create the bundle files for production, add the following scripts to your project `package.json` file: + +```json package.json +{ + "dev": "storybook dev -p 6006", + "build": "storybook build" +} +``` + +## Use environment variables + +### cross-env + +We recommend instead to define environment variables using [cross-env](https://github.com/kentcdodds/cross-env). With `cross-env`, the environment variables will be made available to any Node.js files that are executed by the script process (`dev` and `build` in the example below :point_down:): + +```json package.json +{ + "dev": "cross-env DEBUG=true storybook dev -p 6006", + "build": "cross-env DEBUG=true storybook build" +} +``` + +```ts !#3 rsbuild.config.ts +import { defineStorybookConfig } from "@workleap/rsbuild-configs"; + +if (process.env.DEBUG) { + console.log("Configuring Rsbuild in debug mode!"); +} + +export default defineStorybookConfig(); +``` + +However, there's a catch. When using `cross-env`, the variables will not be available in the application files because `cross-env` only makes them available to files that are executed by the process at **build time** while the application files are executed at **runtime** by a browser. + +To make them accessible to the application files, Rsbuild must be aware of those environment variables and **render** them into the **compiled application files**. This is the purpose of the `environmentVariables` option. + +### `environmentVariables` + +- **Type**: `Record` +- **Default**: `{}` + +First, define the variables with `environmentVariables`: + +```ts !#4-6 rsbuild.build.ts +import { defineStorybookConfig } from "@workleap/rsbuild-configs"; + +export default defineStorybookConfig({ + environmentVariables: { + "DEBUG": process.env.DEBUG === "true" + } +}); +``` + +Then, use the variables in any file: + +```tsx !#2 src/Button.tsx +export function Button() { + if (process.env.DEBUG) { + console.log("The Button component is in debug mode!"); + } + + return null; +} +``` + +!!! +The `=== "true"` part of `"DEBUG": process.env.DEBUG === "true"` is very important, otherwise the environment variable value would be `"true"` instead of `true`. +!!! + +!!!info +By default, Rsbuild injects a few environment variables into the code using the [source.define](https://rsbuild.dev/guide/advanced/env-vars#using-define) option. For additional information about these default environment variables, refer to the Rsbuild [documentation](https://rsbuild.dev/guide/advanced/env-vars#default-variables). +!!! + +## Try it :rocket: + +To test your new Rsbuild configuration, open a terminal at the root of the project and execute the [CLI scripts added earlier](#add-cli-scripts). Either the Storybook development server should start without outputting any error in the terminal or the Storybook application bundle files should be available in the `/storybook-static` folder (or any other folder you configured). diff --git a/docs/rsbuild/default.md b/docs/rsbuild/default.md index 23867728..b77834c8 100644 --- a/docs/rsbuild/default.md +++ b/docs/rsbuild/default.md @@ -68,6 +68,6 @@ As per the [Browserlist](../browserslist/default.md) configuration. ## Getting started -To get started, follow the quick start guide to configure Rsbuild for either a [development environment](configure-dev.md), a [production environment](configure-build.md) or [storybook](). +To get started, follow the quick start guide to configure Rsbuild for either a [development environment](./configure-dev.md), a [production environment](./configure-build.md) or [storybook](./configure-storybook.md). If your project is already using `@workleap/webpack-configs`, follow the [migration guide](). diff --git a/docs/samples.md b/docs/samples.md index 562b01d0..726998f2 100644 --- a/docs/samples.md +++ b/docs/samples.md @@ -5,9 +5,17 @@ icon: command-palette # Samples -## Web configs sample +## Rsbuild sample -- :icon-mark-github: [Web application](https://github.com/gsoft-inc/wl-web-configs/tree/main/sample/app) -- :icon-mark-github: [Components library](https://github.com/gsoft-inc/wl-web-configs/tree/main/sample/components) -- :icon-mark-github: [TypeScript library](https://github.com/gsoft-inc/wl-web-configs/tree/main/sample/utils) -- :icon-mark-github: [Monorepo workspace](https://github.com/gsoft-inc/wl-web-configs/blob/main/tsconfig.json) +- :icon-mark-github: [Web application](https://github.com/gsoft-inc/wl-web-configs/tree/main/samples/rsbuild/app) +- :icon-mark-github: [Components library](https://github.com/gsoft-inc/wl-web-configs/tree/main/samples/rsbuild/components) + +## Webpack sample + +- :icon-mark-github: [Web application](https://github.com/gsoft-inc/wl-web-configs/tree/main/samples/webpack/app) +- :icon-mark-github: [Components library](https://github.com/gsoft-inc/wl-web-configs/tree/main/samples/webpack/components) +- :icon-mark-github: [TypeScript library](https://github.com/gsoft-inc/wl-web-configs/tree/main/samples//webpack/tsup-lib) + +## Storybook sample + +- :icon-mark-github: [Storybook](https://github.com/gsoft-inc/wl-web-configs/tree/main/samples/storybook) diff --git a/docs/webpack/configure-build.md b/docs/webpack/configure-build.md index 4b98f7a1..8f60af81 100644 --- a/docs/webpack/configure-build.md +++ b/docs/webpack/configure-build.md @@ -98,7 +98,7 @@ Then, add the assets to the `index.html` file: If `output.publicPath` is set to `auto`, use `href="favicon.png"` instead. !!! -### `defineBuildConfig` +### `webpack.build.js` Next, create a configuration file named `webpack.build.js` at the root of the project: @@ -121,7 +121,7 @@ import { swcConfig } from "./swc.build.js"; export default defineBuildConfig(swcConfig); ``` -### `swcConfig` +### `swc.build.js` In the previous code sample, the `defineBuildConfig(swcConfig, options)` function receive an SWC [configuration object](https://swc.rs/docs/configuration/swcrc) through the `swcConfig` parameter. @@ -542,7 +542,7 @@ export default defineBuildConfig(swcConfig, { Then, use the variables in any application files: -```tsx !#2 src/app.tsx +```tsx !#2 src/App.tsx export function App() { if (process.env.DEBUG) { console.log("The application has been bootstrapped in debug!"); diff --git a/docs/webpack/configure-dev.md b/docs/webpack/configure-dev.md index 5d1792f5..06ec8b0b 100644 --- a/docs/webpack/configure-dev.md +++ b/docs/webpack/configure-dev.md @@ -97,7 +97,7 @@ Then, add the assets to the `index.html` file: If `output.publicPath` is set to `auto`, use `href="favicon.png"` instead. !!! -### `defineDevConfig` +### `webpack.dev.js` Next, create a configuration file named `webpack.dev.js` at the root of the project: @@ -122,7 +122,7 @@ import { swcConfig } from "./swc.dev.js"; export default defineDevConfig(swcConfig); ``` -### `swcConfig` +### `swc.dev.js` In the previous code sample, the `defineDevConfig(swcConfig, options)` function receive an SWC [configuration object](https://swc.rs/docs/configuration/swcrc) through the `swcConfig` parameter. @@ -626,7 +626,7 @@ export default defineDevConfig(swcConfig, { Then, use the variables in any application files: -```tsx !#2 src/app.tsx +```tsx !#2 src/App.tsx export function App() { if (process.env.DEBUG) { console.log("The application has been bootstrapped in debug!"); From fc1d7a3d6b75c5f5ab26f307e76fdeb10acd8391 Mon Sep 17 00:00:00 2001 From: patricklafrance Date: Fri, 13 Dec 2024 10:09:08 -0500 Subject: [PATCH 10/18] More stuff --- docs/default.md | 8 ++++---- docs/postcss/configure-project.md | 4 ++++ docs/postcss/default.md | 6 +++++- docs/rsbuild/configure-storybook.md | 10 +++++----- docs/rsbuild/default.md | 4 ++-- docs/stylelint/default.md | 2 +- docs/tsup/default.md | 2 +- docs/typescript/default.md | 2 +- docs/webpack/configure-build.md | 2 +- docs/webpack/configure-dev.md | 2 +- docs/webpack/default.md | 4 ++-- docs/webpack/transformer-utilities.md | 4 ++++ 12 files changed, 31 insertions(+), 19 deletions(-) diff --git a/docs/default.md b/docs/default.md index 009a7a3b..bc3297a9 100644 --- a/docs/default.md +++ b/docs/default.md @@ -61,13 +61,13 @@ The majority of the shared tooling configurations targets [ESM](https://develope | --- | --- | --- | | ![](./static/browserslist.svg){ class="h-5 w-5 mr-2 -mt-1" }[Browserslist](https://browsersl.ist/) | [![npm version](https://img.shields.io/npm/v/@workleap/browserslist-config)](https://www.npmjs.com/package/@workleap/browserslist-config) | [Getting started](browserslist/default.md) | | ![](./static/eslint.svg){ class="h-5 w-5 mr-2 -mt-1" }[ESLint](https://eslint.org/) | [![npm version](https://img.shields.io/npm/v/@workleap/eslint-plugin)](https://www.npmjs.com/package/@workleap/eslint-plugin) | [Getting started](eslint/default.md) | -| ![](./static/postcss.svg){ class="h-5 w-5 mr-2 -mt-1" }[PostCSS](https://postcss.org/) | [![npm version](https://img.shields.io/npm/v/@workleap/postcss-configs)](https://www.npmjs.com/package/@workleap/postcss-configs) | [Getting started](postcss/default.md) | | ![](./static/stylelint.svg){ class="h-5 w-5 mr-2 -mt-1" }[Stylelint](https://stylelint.io/) | [![npm version](https://img.shields.io/npm/v/@workleap/stylelint-configs)](https://www.npmjs.com/package/@workleap/stylelint-configs) | [Getting started](stylelint/default.md) | -| ![](./static/swc.svg){ class="h-5 w-5 mr-2 -mt-1" }[SWC](https://swc.rs/) | [![npm version](https://img.shields.io/npm/v/@workleap/swc-configs)](https://www.npmjs.com/package/@workleap/swc-configs) | [Getting started](swc/default.md) | -| ![](./static/tsup.svg){ class="h-5 w-5 mr-2 -mt-1" }[tsup](https://tsup.egoist.dev/) | [![npm version](https://img.shields.io/npm/v/@workleap/tsup-configs)](https://www.npmjs.com/package/@workleap/tsup-configs) | [Getting started](tsup/default.md) | | ![](./static/typescript.svg){ class="h-5 w-5 mr-2 -mt-1" }[Typescript](https://www.typescriptlang.org/) | [![npm version](https://img.shields.io/npm/v/@workleap/typescript-configs)](https://www.npmjs.com/package/@workleap/typescript-configs) | [Getting started](typescript/default.md) | -| ![](./static/webpack.svg){ class="h-5 w-5 mr-2 -mt-1" }[webpack](https://webpack.js.org/) | [![npm version](https://img.shields.io/npm/v/@workleap/webpack-configs)](https://www.npmjs.com/package/@workleap/webpack-configs) | [Getting started](webpack/default.md) | +| ![](./static/swc.svg){ class="h-5 w-5 mr-2 -mt-1" }[SWC](https://swc.rs/) | [![npm version](https://img.shields.io/npm/v/@workleap/swc-configs)](https://www.npmjs.com/package/@workleap/swc-configs) | [Getting started](swc/default.md) | | ![](./static/rsbuild.svg){ class="h-5 w-5 mr-2 -mt-1" }[Rsbuild](https://rsbuild.dev/) | [![npm version](https://img.shields.io/npm/v/@workleap/rsbuild-configs)](https://www.npmjs.com/package/@workleap/rsbuild-configs) | [Getting started](rsbuild/default.md) | +| ![](./static/tsup.svg){ class="h-5 w-5 mr-2 -mt-1" }[tsup](https://tsup.egoist.dev/) | [![npm version](https://img.shields.io/npm/v/@workleap/tsup-configs)](https://www.npmjs.com/package/@workleap/tsup-configs) | [Getting started](tsup/default.md) | +| ![](./static/postcss.svg){ class="h-5 w-5 mr-2 -mt-1" }[PostCSS](https://postcss.org/) [!badge variant="secondary" size="s" text="in maintenance"] | [![npm version](https://img.shields.io/npm/v/@workleap/postcss-configs)](https://www.npmjs.com/package/@workleap/postcss-configs) | [Getting started](postcss/default.md) | +| ![](./static/webpack.svg){ class="h-5 w-5 mr-2 -mt-1" }[webpack](https://webpack.js.org/) [!badge variant="secondary" size="s" text="in maintenance"] | [![npm version](https://img.shields.io/npm/v/@workleap/webpack-configs)](https://www.npmjs.com/package/@workleap/webpack-configs) | [Getting started](webpack/default.md) | diff --git a/docs/postcss/configure-project.md b/docs/postcss/configure-project.md index edf7f3cf..51959fd9 100644 --- a/docs/postcss/configure-project.md +++ b/docs/postcss/configure-project.md @@ -8,6 +8,10 @@ toc: # Configure a project +!!!warning +`@workleap/postcss-configs` is now in maintenance mode. If you're starting a new project, consider using [@workleap/rsbuild-configs](../rsbuild/default.md) instead of [@workleap/webpack-configs](../webpack/default.md), which eliminates the need for PostCSS. +!!! + Execute the following steps to setup [PostCSS](https://postcss.org/) for a single project. ## Install the packages diff --git a/docs/postcss/default.md b/docs/postcss/default.md index 26f1b3d2..2b87cb33 100644 --- a/docs/postcss/default.md +++ b/docs/postcss/default.md @@ -1,5 +1,5 @@ --- -order: 160 +order: 100 icon: /static/postcss.svg label: PostCSS expanded: true @@ -9,6 +9,10 @@ toc: # PostCSS +!!!warning +`@workleap/postcss-configs` is now in maintenance mode. If you're starting a new project, consider using [@workleap/rsbuild-configs](../rsbuild/default.md) instead of [@workleap/webpack-configs](../webpack/default.md), which eliminates the need for PostCSS. +!!! + U +β”œβ”€β”€ webpack.dev.js --> rsbuild.dev.ts +β”œβ”€β”€ webpack.build.js --> rsbuild.build.ts +β”œβ”€β”€ swc.build.js --> X +β”œβ”€β”€ swc.dev.js --> X +β”œβ”€β”€ package.json +``` + +### `webpack.build.js` + +Rename the file from `webpack.build.js` to `rsbuild.build.ts`. + +Then, open the `rsbuild.build.ts` file and apply the following changes: + +- Replace `"@workleap/webpack-configs"` for `"@workleap/rsbuild-configs"`. +- Remove `import { swcConfig } from "./swc.build.js"`. +- Remove the first argument of the `defineBuildHostConfig` function. +- Remove `// @ts-check`. + +Before: + +```js webpack.build.js +// @ts-check + +import { defineBuildHostConfig } from "@workleap/webpack-configs"; +import { swcConfig } from "./swc.build.js"; + +export default defineBuildHostConfig(swcConfig, []); +``` + +After: + +```ts rsbuild.build.ts +import { defineBuildHostConfig } from "@workleap/rsbuild-configs"; + +export default defineBuildHostConfig([]); +``` + +### `webpack.dev.js` + +Rename the file from `webpack.dev.js` to `rsbuild.dev.ts`. + +Then, open the `rsbuild.build.ts` file and and apply the following changes: + +- Replace `"@workleap/webpack-configs"` for `"@workleap/rsbuild-configs"`. +- Remove `import { swcConfig } from "./swc.build.js"`. +- Remove the first argument of the `defineDevHostConfig` function. +- Remove `// @ts-check`. + +Before: + +```js webpack.dev.js +// @ts-check + +import { defineDevHostConfig } from "@workleap/webpack-configs"; +import { swcConfig } from "./swc.dev.js"; + +export default defineDevHostConfig(swcConfig, 8080, Remotes); +``` + +After: + +```ts rsbuild.dev.ts +import { defineDevHostConfig } from "@workleap/rsbuild-configs"; + +export default defineDevHostConfig(8080, Remotes); +``` + +### `swc.build.js` + +Delete the `swc.build.js` file. + +### `swc.dev.js` + +Delete the `swc.dev.js` file. + +### `index.html` + +Replace `<%=webpackConfig.output.publicPath%>` by `<%=assetPrefix%>/` (the `/` is important). + +Before: + +```html public/index.html + + + + + + +
+ + +``` + +After: + +```html public/index.html + + + + + + +
+ + +``` + +## Update scripts + +### `build` + +Update the `build` script to run Rsbuild instead of webpack. + +Before: + +```json package.json +"scripts": { + "build": "webpack --config webpack.build.js" +} +``` + +After: + +```json package.json +"scripts": { + "build": "rsbuild build --config rsbuild.build.ts" +} +``` + +### `dev` + +Update the `dev` script to run Rsbuild instead of webpack. + +Before: + +```json package.json +"scripts": { + "dev": "webpack serve --config webpack.dev.js" +} +``` + +After: + +```json package.json +"scripts": { + "dev": "rsbuild dev --config rsbuild.dev.ts" +} +``` + +### Try it :rocket: + +Start the application in a development environment using the `dev` and `build` script. Everything should run smoothly without any warnings or errors outputted in the terminal. + + -> Don't forget the changes to the HTML template for the assets like the favicon. -> L'ajouter aussi au guide de migration de Squide diff --git a/docs/stylelint/setup-polyrepo.md b/docs/stylelint/setup-polyrepo.md index 126c3f44..1bca19c9 100644 --- a/docs/stylelint/setup-polyrepo.md +++ b/docs/stylelint/setup-polyrepo.md @@ -9,7 +9,7 @@ toc: # Setup a polyrepo -Execute the following steps to setup [Stylelint](https://stylelint.io/) for a polyrepo solution (**single project** per repository). +Execute the following steps to setup [Stylelint](https://stylelint.io/) for a polyrepo solution (**single project** per repository) :point_down: ## Install the packages diff --git a/docs/swc/configure-build.md b/docs/swc/configure-build.md index db8521ac..e23a3d30 100644 --- a/docs/swc/configure-build.md +++ b/docs/swc/configure-build.md @@ -9,7 +9,7 @@ toc: # Configure for build -To configure [SWC](https://swc.rs/) for a production environment, execute the following steps. +To configure [SWC](https://swc.rs/) for a production environment, execute the following steps :point_down: ## Install the packages diff --git a/docs/swc/configure-dev.md b/docs/swc/configure-dev.md index 77a17ee5..ee4f4d32 100644 --- a/docs/swc/configure-dev.md +++ b/docs/swc/configure-dev.md @@ -9,7 +9,7 @@ toc: # Configure for development -To configure [SWC](https://swc.rs/) for a development environment, execute the following steps. +To configure [SWC](https://swc.rs/) for a development environment, execute the following steps :point_down: ## Install the packages diff --git a/docs/swc/configure-jest.md b/docs/swc/configure-jest.md index 8797105f..d446ec4d 100644 --- a/docs/swc/configure-jest.md +++ b/docs/swc/configure-jest.md @@ -9,7 +9,7 @@ toc: # Configure for Jest -To configure [SWC](https://swc.rs/) for a [Jest](https://jestjs.io/) environment, execute the following steps. +To configure [SWC](https://swc.rs/) for a [Jest](https://jestjs.io/) environment, execute the following steps :point_down: ## Install the packages diff --git a/docs/tsup/configure-build.md b/docs/tsup/configure-build.md index 187006bf..2b629caa 100644 --- a/docs/tsup/configure-build.md +++ b/docs/tsup/configure-build.md @@ -9,7 +9,7 @@ toc: # Configure for build -To configure [tsup](https://tsup.egoist.dev/) for a build environment, execute the following steps. +To configure [tsup](https://tsup.egoist.dev/) for a build environment, execute the following steps :point_down: ## Install the packages diff --git a/docs/tsup/configure-dev.md b/docs/tsup/configure-dev.md index 21851f79..0af3ff62 100644 --- a/docs/tsup/configure-dev.md +++ b/docs/tsup/configure-dev.md @@ -9,7 +9,7 @@ toc: # Configure for development -To configure [tsup](https://tsup.egoist.dev/) for a development environment, execute the following steps. +To configure [tsup](https://tsup.egoist.dev/) for a development environment, execute the following steps :point_down: ## Install the packages diff --git a/docs/typescript/setup-polyrepo.md b/docs/typescript/setup-polyrepo.md index 9f47d9c8..f2fd5fc5 100644 --- a/docs/typescript/setup-polyrepo.md +++ b/docs/typescript/setup-polyrepo.md @@ -9,7 +9,7 @@ toc: # Setup a polyrepo -Execute the following steps to setup [TypeScript](https://www.typescriptlang.org/) for a polyrepo solution (**single project** per repository). +Execute the following steps to setup [TypeScript](https://www.typescriptlang.org/) for a polyrepo solution (**single project** per repository) :point_down: ## Install the packages diff --git a/docs/webpack/configure-build.md b/docs/webpack/configure-build.md index 5892d93f..9a2835ea 100644 --- a/docs/webpack/configure-build.md +++ b/docs/webpack/configure-build.md @@ -13,7 +13,7 @@ toc: `@workleap/webpack-configs` is now in maintenance mode. If you're starting a new project, consider using [@workleap/rsbuild-configs](../rsbuild/default.md) instead for better performance and modern tooling. !!! -To configure [webpack](https://webpack.js.org/) for a production environment, execute the following steps. +To configure [webpack](https://webpack.js.org/) for a production environment, execute the following steps :point_down: ## Install the packages diff --git a/docs/webpack/configure-dev.md b/docs/webpack/configure-dev.md index f9e0823e..4ebec050 100644 --- a/docs/webpack/configure-dev.md +++ b/docs/webpack/configure-dev.md @@ -13,7 +13,7 @@ toc: `@workleap/webpack-configs` is now in maintenance mode. If you're starting a new project, consider using [@workleap/rsbuild-configs](../rsbuild/default.md) instead for better performance and modern tooling. !!! -To configure [webpack](https://webpack.js.org/) for a development environment, execute the following steps. +To configure [webpack](https://webpack.js.org/) for a development environment, execute the following steps :point_down: ## Install the packages From bf30479a2f5f7bb3f6118a98e0aabbdf19e76403 Mon Sep 17 00:00:00 2001 From: patricklafrance Date: Fri, 13 Dec 2024 10:55:11 -0500 Subject: [PATCH 12/18] More stuff --- docs/rsbuild/migrate-from-webpack.md | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/docs/rsbuild/migrate-from-webpack.md b/docs/rsbuild/migrate-from-webpack.md index 91a51a4d..811c1b5a 100644 --- a/docs/rsbuild/migrate-from-webpack.md +++ b/docs/rsbuild/migrate-from-webpack.md @@ -81,7 +81,7 @@ Before: import { defineBuildHostConfig } from "@workleap/webpack-configs"; import { swcConfig } from "./swc.build.js"; -export default defineBuildHostConfig(swcConfig, []); +export default defineBuildHostConfig(swcConfig); ``` After: @@ -89,7 +89,7 @@ After: ```ts rsbuild.build.ts import { defineBuildHostConfig } from "@workleap/rsbuild-configs"; -export default defineBuildHostConfig([]); +export default defineBuildHostConfig(); ``` ### `webpack.dev.js` @@ -111,7 +111,7 @@ Before: import { defineDevHostConfig } from "@workleap/webpack-configs"; import { swcConfig } from "./swc.dev.js"; -export default defineDevHostConfig(swcConfig, 8080, Remotes); +export default defineDevHostConfig(swcConfig); ``` After: @@ -119,7 +119,7 @@ After: ```ts rsbuild.dev.ts import { defineDevHostConfig } from "@workleap/rsbuild-configs"; -export default defineDevHostConfig(8080, Remotes); +export default defineDevHostConfig(8080); ``` ### `swc.build.js` @@ -164,15 +164,15 @@ After: ## Update scripts -### `build` +### `dev` -Update the `build` script to run Rsbuild instead of webpack. +Update the `dev` script to run Rsbuild instead of webpack. Before: ```json package.json "scripts": { - "build": "webpack --config webpack.build.js" + "dev": "webpack serve --config webpack.dev.js" } ``` @@ -180,19 +180,19 @@ After: ```json package.json "scripts": { - "build": "rsbuild build --config rsbuild.build.ts" + "dev": "rsbuild dev --config rsbuild.dev.ts" } ``` -### `dev` +### `build` -Update the `dev` script to run Rsbuild instead of webpack. +Update the `build` script to run Rsbuild instead of webpack. Before: ```json package.json "scripts": { - "dev": "webpack serve --config webpack.dev.js" + "build": "webpack --config webpack.build.js" } ``` @@ -200,14 +200,10 @@ After: ```json package.json "scripts": { - "dev": "rsbuild dev --config rsbuild.dev.ts" + "build": "rsbuild build --config rsbuild.build.ts" } ``` ### Try it :rocket: Start the application in a development environment using the `dev` and `build` script. Everything should run smoothly without any warnings or errors outputted in the terminal. - - --> Don't forget the changes to the HTML template for the assets like the favicon. - -> L'ajouter aussi au guide de migration de Squide From 4c9f421bdcd6902fa3dd4f3e873afd8ed33fef6a Mon Sep 17 00:00:00 2001 From: patricklafrance Date: Fri, 13 Dec 2024 11:19:49 -0500 Subject: [PATCH 13/18] More stuff --- packages/rsbuild-configs/package.json | 4 ++-- samples/rsbuild/app/tsconfig.json | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/rsbuild-configs/package.json b/packages/rsbuild-configs/package.json index 72a976b6..f757d330 100644 --- a/packages/rsbuild-configs/package.json +++ b/packages/rsbuild-configs/package.json @@ -38,9 +38,9 @@ }, "dependencies": { "@rsbuild/plugin-basic-ssl": "^1.1.1", + "@rsbuild/plugin-image-compress": "^1.1.0", "@rsbuild/plugin-react": "^1.1.0", - "@rsbuild/plugin-svgr": "^1.0.6", - "@rsbuild/plugin-image-compress": "^1.1.0" + "@rsbuild/plugin-svgr": "^1.0.6" }, "devDependencies": { "@rsbuild/core": "1.1.9", diff --git a/samples/rsbuild/app/tsconfig.json b/samples/rsbuild/app/tsconfig.json index 5122233d..b52f3b8d 100644 --- a/samples/rsbuild/app/tsconfig.json +++ b/samples/rsbuild/app/tsconfig.json @@ -7,5 +7,9 @@ // "@rsbuild-sample/tsup-lib": ["../tsup-lib/src/index.ts"] // } }, + "include": [ + ".", + "../**/src/env.d.ts" + ], "exclude": ["public", "dist", "node_modules"] } From 27b54145da122d58b3057b7766b7fe7a11e601bf Mon Sep 17 00:00:00 2001 From: patricklafrance Date: Fri, 13 Dec 2024 11:51:53 -0500 Subject: [PATCH 14/18] More stuff --- docs/rsbuild/configure-build.md | 55 ++++++++++++++++++++++++++++ docs/rsbuild/configure-dev.md | 33 +++++++++++++++++ docs/rsbuild/migrate-from-webpack.md | 11 ++++-- 3 files changed, 96 insertions(+), 3 deletions(-) diff --git a/docs/rsbuild/configure-build.md b/docs/rsbuild/configure-build.md index f1ae16cf..fd2eec30 100644 --- a/docs/rsbuild/configure-build.md +++ b/docs/rsbuild/configure-build.md @@ -603,6 +603,61 @@ The `=== "true"` part of `"DEBUG": process.env.DEBUG === "true"` is very importa By default, Rsbuild injects a few environment variables into the code using the [source.define](https://rsbuild.dev/guide/advanced/env-vars#using-define) option. For additional information about these default environment variables, refer to the Rsbuild [documentation](https://rsbuild.dev/guide/advanced/env-vars#default-variables). !!! +## CSS modules typings + +When you import CSS Modules in TypeScript code, TypeScript may prompt that the module is missing a type definition: + +```bash +TS2307: Cannot find module './index.module.css' or its corresponding type declarations. +``` + +To fix this, you need to add a type declaration file for the CSS Modules, please create a `src/env.d.ts` file, and add the corresponding type declaration. + +```ts env.d.ts +/// +``` + +!!!info +Make sure the project have a dependency on `@rsbuild/core`. +!!! + +### Monorepo + +If your solution is a monorepo, ensure that projects referencing your packages that include CSS Modules, also include the necessary type definitions + +For example, given the following structure: + +``` !#3,7 +workspace +β”œβ”€β”€ app +β”œβ”€β”€β”€β”€ tsconfig.ts +β”œβ”€β”€ packages +β”œβ”€β”€β”€β”€ components +β”œβ”€β”€β”€β”€β”€β”€ src +β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€ Button.tsx +β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€ Button.module.css +β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€ env.d.ts +β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€ tsconfig.ts +β”œβ”€β”€ package.json +``` + +Copy the CSS Modules typings into the `app` web application own `env.d.ts` file, or include the `components` package's typings into the `apps` web application `tsconfig.ts` configuration file: + +```json !#5 app/tsconfig.ts +{ + "extends": "@workleap/typescript-configs/web-application.json", + "include": [ + ".", + "../**/src/env.d.ts" + ], + "exclude": ["public", "dist", "node_modules"] +} +``` + +!!!info +For additional information abour CSS modules type declaration, refer to the Rsbuild [documentation](https://rsbuild.dev/guide/basic/css-modules#type-declaration). +!!! + ## Try it :rocket: To test your new Rsbuild configuration, open a terminal at the root of the project and execute the [CLI script added earlier](#add-a-cli-script). The build process should complete without outputting any error in the terminal and the bundle files should be available in the `/dist` folder (or any other `distPath` you configured). diff --git a/docs/rsbuild/configure-dev.md b/docs/rsbuild/configure-dev.md index 8a8e9701..c298587e 100644 --- a/docs/rsbuild/configure-dev.md +++ b/docs/rsbuild/configure-dev.md @@ -679,6 +679,39 @@ To fix this, you need to add a type declaration file for the CSS Modules, please Make sure the project have a dependency on `@rsbuild/core`. !!! +### Monorepo + +If your solution is a monorepo, ensure that projects referencing your packages that include CSS Modules, also include the necessary type definitions + +For example, given the following structure: + +``` !#3,7 +workspace +β”œβ”€β”€ app +β”œβ”€β”€β”€β”€ tsconfig.ts +β”œβ”€β”€ packages +β”œβ”€β”€β”€β”€ components +β”œβ”€β”€β”€β”€β”€β”€ src +β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€ Button.tsx +β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€ Button.module.css +β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€ env.d.ts +β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€ tsconfig.ts +β”œβ”€β”€ package.json +``` + +Copy the CSS Modules typings into the `app` web application own `env.d.ts` file, or include the `components` package's typings into the `apps` web application `tsconfig.ts` configuration file: + +```json !#5 app/tsconfig.ts +{ + "extends": "@workleap/typescript-configs/web-application.json", + "include": [ + ".", + "../**/src/env.d.ts" + ], + "exclude": ["public", "dist", "node_modules"] +} +``` + !!!info For additional information abour CSS modules type declaration, refer to the Rsbuild [documentation](https://rsbuild.dev/guide/basic/css-modules#type-declaration). !!! diff --git a/docs/rsbuild/migrate-from-webpack.md b/docs/rsbuild/migrate-from-webpack.md index 811c1b5a..c0aaae92 100644 --- a/docs/rsbuild/migrate-from-webpack.md +++ b/docs/rsbuild/migrate-from-webpack.md @@ -33,15 +33,15 @@ Then, in the same terminal, remove the following packages: +++ pnpm ```bash -pnpm remove @workleap/webpack-configs @swc/core @swc/helpers @workleap/swc-configs webpack webpack-cli webpack-dev-server +pnpm remove @workleap/webpack-configs @swc/core @swc/helpers @workleap/swc-configs webpack webpack-cli webpack-dev-server @workleap/postcss-configs postcss ``` +++ yarn ```bash -yarn remove @workleap/webpack-configs @swc/core @swc/helpers @workleap/swc-configs webpack webpack-cli webpack-dev-server +yarn remove @workleap/webpack-configs @swc/core @swc/helpers @workleap/swc-configs webpack webpack-cli webpack-dev-server @workleap/postcss-configs postcss ``` +++ npm ```bash -npm uninstall @workleap/webpack-configs @swc/core @swc/helpers @workleap/swc-configs webpack webpack-cli webpack-dev-server +npm uninstall @workleap/webpack-configs @swc/core @swc/helpers @workleap/swc-configs webpack webpack-cli webpack-dev-server @workleap/postcss-configs postcss ``` +++ @@ -57,6 +57,7 @@ web-app β”œβ”€β”€β”€β”€ index.html --> U β”œβ”€β”€ webpack.dev.js --> rsbuild.dev.ts β”œβ”€β”€ webpack.build.js --> rsbuild.build.ts +β”œβ”€β”€ postcss.config.ts --> X β”œβ”€β”€ swc.build.js --> X β”œβ”€β”€ swc.dev.js --> X β”œβ”€β”€ package.json @@ -122,6 +123,10 @@ import { defineDevHostConfig } from "@workleap/rsbuild-configs"; export default defineDevHostConfig(8080); ``` +### `postcss.config.ts` + +Delete the `postcss.config.ts` file. + ### `swc.build.js` Delete the `swc.build.js` file. From 656960827846637bb66a33b9a0379d7c1e8e9218 Mon Sep 17 00:00:00 2001 From: patricklafrance Date: Fri, 13 Dec 2024 16:32:16 -0500 Subject: [PATCH 15/18] More stuff --- packages/rsbuild-configs/src/dev.ts | 2 +- packages/rsbuild-configs/tests/dev.test.ts | 401 +++++++++++++++++++ packages/webpack-configs/tests/build.test.ts | 58 +-- packages/webpack-configs/tests/dev.test.ts | 70 ++-- 4 files changed, 466 insertions(+), 65 deletions(-) create mode 100644 packages/rsbuild-configs/tests/dev.test.ts diff --git a/packages/rsbuild-configs/src/dev.ts b/packages/rsbuild-configs/src/dev.ts index ce4637a5..b6ab9fd4 100644 --- a/packages/rsbuild-configs/src/dev.ts +++ b/packages/rsbuild-configs/src/dev.ts @@ -75,7 +75,7 @@ export function defineDevConfig(options: DefineDevConfigOptions = {}) { dev: { assetPrefix: assetPrefix ?? `${https ? "https" : "http"}://${host}:${port}`, lazyCompilation, - hmr, + hmr: hmr || fastRefresh, client: (overlay === false || fastRefresh) ? { overlay: false } : undefined diff --git a/packages/rsbuild-configs/tests/dev.test.ts b/packages/rsbuild-configs/tests/dev.test.ts new file mode 100644 index 00000000..9b9e3707 --- /dev/null +++ b/packages/rsbuild-configs/tests/dev.test.ts @@ -0,0 +1,401 @@ +import { RsbuildConfig, RsbuildPlugin, SourceMap } from "@rsbuild/core"; +import exp from "constants"; +import { RsbuildConfigTransformer } from "../src/applyTransformers.ts"; +import { defineDevConfig } from "../src/dev.ts"; + +test("when an entry prop is provided, the source.entry option is the provided value", () => { + const result = defineDevConfig({ + entry: { + index: "./a-new-entry.ts" + } + }); + + expect(result.source?.entry!.index).toBe("./a-new-entry.ts"); +}); + +test("when https is true, the server option is configured with a self signed certificate", () => { + const result = defineDevConfig({ + https: true + }); + + expect(result.server?.https).toBeUndefined(); + expect(result.plugins?.find(x => (x as RsbuildPlugin).name === "rsbuild:basic-ssl")).toBeDefined(); +}); + +test("when https is true, the asset prefix option include \"https\"", () => { + const result = defineDevConfig({ + https: true + }); + + expect(result.dev?.assetPrefix).toMatch(/(https)/i) +}); + +test("when https is a certificate, the server option is configured with the provided certificate", () => { + const cert = { + key: "foo", + cert: "bar" + }; + + const result = defineDevConfig({ + https: cert + }); + + expect(result.server?.https).toBe(cert); +}); + +test("when https is a certificate, the dev.assetPrefix option include \"https\"", () => { + const result = defineDevConfig({ + https: { + key: "foo", + cert: "bar" + } + }); + + expect(result.dev?.assetPrefix).toMatch(/(https)/i) +}); + +test("when https is false, the dev.assetPrefix option doesn't include \"https\"", () => { + const result = defineDevConfig({ + https: false + }); + + expect(result.dev?.assetPrefix).not.toMatch(/(https)/i) +}); + +test("when https is false, the basic-ssl plugin is not included", () => { + const result = defineDevConfig({ + https: false + }); + + expect(result.plugins?.find(x => (x as RsbuildPlugin).name === "rsbuild:basic-ssl")).toBeUndefined(); +}); + +test("when https is false, the server.https option is undefined", () => { + const result = defineDevConfig({ + https: true + }); + + expect(result.server?.https).toBeUndefined(); +}); + +test("when an host is provided, the server.host option is the provided host value", () => { + const result = defineDevConfig({ + host: "a-custom-host" + }); + + expect(result.server!.host).toBe("a-custom-host"); +}); + +test("when an host is provided, the dev.assetPrefix option include the provided host value", () => { + const result = defineDevConfig({ + host: "a-custom-host" + }); + + expect(result.dev?.assetPrefix).toMatch(/a-custom-host/); +}); + +test("when a port is provided, the server.port option is the provided port value", () => { + const result = defineDevConfig({ + port: 1234 + }); + + expect(result.server?.port).toBe(1234); +}); + +test("when a port is provided, the dev.assetPrefix option include the provided port", () => { + const result = defineDevConfig({ + port: 1234 + }); + + expect(result.dev?.assetPrefix).toMatch(/1234/); +}); + +test("when an asset prefix is provided, the dev.assetPrefix option is the provided value", () => { + const result = defineDevConfig({ + assetPrefix: "http://my-dev-host.com/" + }); + + expect(result.dev?.assetPrefix).toBe("http://my-dev-host.com/"); +}); + +test("when additional plugins are provided, append the provided plugins at the end of the plugins array", () => { + const plugin1: RsbuildPlugin = { + name: "plugin-1", + setup: () => {} + } + + const plugin2: RsbuildPlugin = { + name: "plugin-2", + setup: () => {} + }; + + const result = defineDevConfig({ + plugins: [ + plugin1, + plugin2 + ] + }); + + const pluginsCount = result.plugins!.length; + + expect(result.plugins![pluginsCount - 2]).toBe(plugin1); + expect(result.plugins![pluginsCount - 1]).toBe(plugin2); +}); + +test("when html is false, the html option is undefined", () => { + const result = defineDevConfig({ + html: false + }); + + expect(result.html).toBeUndefined(); +}); + +test("when html is a function, the html option match the function return value", () => { + const html = { + title: "foo" + }; + + const result = defineDevConfig({ + html: () => { + return html; + } + }); + + expect(result.html).toBe(html); +}); + +test("when lazyCompilation is true, the dev.lazyCompilation option is true", () => { + const result = defineDevConfig({ + lazyCompilation: true + }); + + expect(result.dev?.lazyCompilation).toBeTruthy(); +}); + +test("when lazyCompilation is false, the dev.lazyCompilation option is false", () => { + const result = defineDevConfig({ + lazyCompilation: false + }); + + expect(result.dev?.lazyCompilation).toBeFalsy(); +}); + +test("when hmr is true, the dev.hmr option is true", () => { + const result = defineDevConfig({ + hmr: true + }); + + expect(result.dev?.hmr).toBeTruthy(); +}); + +test("when hmr amd fastRefresh are false, the dev.hmr option is false", () => { + const result = defineDevConfig({ + hmr: false, + fastRefresh: false + }); + + expect(result.dev?.hmr).toBeFalsy(); +}); + +test("when hmr is false and fastRefresh is true, the dev.hmr option is true", () => { + const result = defineDevConfig({ + hmr: false, + fastRefresh: true + }); + + expect(result.dev?.hmr).toBeTruthy(); +}); + +test("when fastRefresh is true, the react plugin enable fast refresh", () => { + let isEnabled = false; + + const result = defineDevConfig({ + fastRefresh: true, + react: defaultOptions => { + isEnabled = defaultOptions.fastRefresh === true + + return defaultOptions; + } + }); + + const plugin = result.plugins?.find(x => (x as RsbuildPlugin).name === "rsbuild:react") + + expect(plugin).toBeDefined(); + expect(isEnabled).toBeTruthy(); +}); + +test("when fastRefresh is true and the overlay is disable, disable the fast refresh overlay", () => { + let isOverlayDisabled = false; + + const result = defineDevConfig({ + fastRefresh: true, + overlay: false, + react: defaultOptions => { + isOverlayDisabled = defaultOptions.reactRefreshOptions?.overlay === false; + + return defaultOptions; + } + }); + + const plugin = result.plugins?.find(x => (x as RsbuildPlugin).name === "rsbuild:react") + + expect(plugin).toBeDefined(); + expect(isOverlayDisabled).toBeTruthy(); +}); + +test("when fastRefresh is true, disable the client overlay", () => { + const result = defineDevConfig({ + fastRefresh: true + }); + + expect(result.dev?.client?.overlay).toBeFalsy(); +}); + +test("when sourceMap is false, the output.sourceMap option is false", () => { + const result = defineDevConfig({ + sourceMap: false + }); + + expect(result.output?.sourceMap).toBeFalsy(); +}); + +test("when sourceMap is an object, the output.sourceMap option is the object", () => { + const sourceMap: SourceMap = { + js: false, + css: false + } + + const result = defineDevConfig({ + sourceMap + }); + + expect(result.output?.sourceMap).toBe(sourceMap); +}); + +test("when overlay is false, the dev.client.overlay option is false", () => { + const result = defineDevConfig({ + overlay: false + }); + + expect(result.dev?.client?.overlay).toBeFalsy(); +}); + +test("when overlay is false, react plugin fast refresh overlay is disabled", () => { + let isOverlayDisabled = false; + + const result = defineDevConfig({ + overlay: false, + react: defaultOptions => { + isOverlayDisabled = defaultOptions.reactRefreshOptions?.overlay === false; + + return defaultOptions; + } + }); + + expect(isOverlayDisabled).toBeTruthy(); +}); + +test("when react is false, the react plugin is not included", () => { + const result = defineDevConfig({ + react: false + }); + + const plugin = result.plugins?.find(x => (x as RsbuildPlugin).name === "rsbuild:react") + + expect(plugin).toBeUndefined(); +}); + +test("when svgr is false, the svgr plugin is not included", () => { + const result = defineDevConfig({ + svgr: false + }); + + const plugin = result.plugins?.find(x => (x as RsbuildPlugin).name === "rsbuild:svgr") + + expect(plugin).toBeUndefined(); +}); + +///////////////////////// + +test("when a transformer is provided, and the transformer update the existing configuration object, the transformer is applied on the Rsbuild config", () => { + const entryTransformer: RsbuildConfigTransformer = (config: RsbuildConfig) => { + config.source = config.source ?? {}; + config.source.entry = { + index: "a-custom-value-in-a-transformer" + } + + return config; + }; + + const result = defineDevConfig({ + transformers: [entryTransformer] + }); + + expect(result.source!.entry!.index).toBe("a-custom-value-in-a-transformer"); +}); + +test("when a transformer is provided, and the transformer returns a new configuration object, the transformer is applied on the Rsbuild config", () => { + const entryTransformer: RsbuildConfigTransformer = () => { + return { + source: { + entry: { + index: "a-custom-value-in-a-transformer" + } + } + }; + }; + + const result = defineDevConfig({ + transformers: [entryTransformer] + }); + + expect(result.source!.entry!.index).toBe("a-custom-value-in-a-transformer"); +}); + +test("when multiple transformers are provided, all the transformers are applied on the webpack config", () => { + const entryTransformer: RsbuildConfigTransformer = (config: RsbuildConfig) => { + config.source = config.source ?? {}; + config.source.entry = { + index: "a-custom-value-in-a-transformer" + } + + return config; + }; + + const distPathTransformer: RsbuildConfigTransformer = (config: RsbuildConfig) => { + config.output = config.output ?? {}; + config.output.distPath = config.output.distPath ?? {}; + config.output.distPath.js = "a-custom-dist-path-in-a-tranformer" + + return config; + }; + + const result = defineDevConfig({ + transformers: [entryTransformer, distPathTransformer] + }); + + expect(result.source!.entry!.index).toBe("a-custom-value-in-a-transformer"); + expect(result.output!.distPath!.js).toBe("a-custom-dist-path-in-a-tranformer"); +}); + +test("transformers context environment is \"dev\"", () => { + const mockTransformer = jest.fn(); + + defineDevConfig({ + transformers: [mockTransformer] + }); + + expect(mockTransformer).toHaveBeenCalledWith(expect.anything(), { environment: "dev", verbose: false }); +}); + +test("when the verbose option is true, the transformers context verbose value is \"true\"", () => { + const mockTransformer = jest.fn(); + + defineDevConfig({ + verbose: true, + transformers: [mockTransformer] + }); + + expect(mockTransformer).toHaveBeenCalledWith(expect.anything(), { environment: "dev", verbose: true }); +}); + diff --git a/packages/webpack-configs/tests/build.test.ts b/packages/webpack-configs/tests/build.test.ts index 4928f72c..71ce8976 100644 --- a/packages/webpack-configs/tests/build.test.ts +++ b/packages/webpack-configs/tests/build.test.ts @@ -6,12 +6,12 @@ import type { WebpackConfigTransformer } from "../src/transformers/applyTransfor import { findModuleRule, matchAssetModuleType, matchLoaderName } from "../src/transformers/moduleRules.ts"; import { findPlugin, matchConstructorName } from "../src/transformers/plugins.ts"; -const SwcConfig = defineSwcConfig({ +const DefaultSwcConfig = defineSwcConfig({ chrome: "116" }); test("when an entry prop is provided, use the provided entry value", () => { - const result = defineBuildConfig(SwcConfig, { + const result = defineBuildConfig(DefaultSwcConfig, { entry: "./a-new-entry.ts" }); @@ -19,7 +19,7 @@ test("when an entry prop is provided, use the provided entry value", () => { }); test("when an output path is provided, use the provided ouput path value", () => { - const result = defineBuildConfig(SwcConfig, { + const result = defineBuildConfig(DefaultSwcConfig, { outputPath: "./a-new-output-path" }); @@ -27,11 +27,11 @@ test("when an output path is provided, use the provided ouput path value", () => }); test("when a public path is set to \"auto\", should not throw an error", () => { - expect(() => defineBuildConfig(SwcConfig, { publicPath: "auto" })).not.toThrow(); + expect(() => defineBuildConfig(DefaultSwcConfig, { publicPath: "auto" })).not.toThrow(); }); test("when a valid public path is provided, use the provided public path value", () => { - const result = defineBuildConfig(SwcConfig, { + const result = defineBuildConfig(DefaultSwcConfig, { publicPath: "a-valid-public-path-ending-with-a-trailing-slash/" }); @@ -49,7 +49,7 @@ test("when additional module rules are provided, append the provided rules at th type: "asset/inline" }; - const result = defineBuildConfig(SwcConfig, { + const result = defineBuildConfig(DefaultSwcConfig, { moduleRules: [ newModuleRule1, newModuleRule2 @@ -78,7 +78,7 @@ test("when additional plugins are provided, append the provided plugins at the e const newPlugin1 = new Plugin1(); const newPlugin2 = new Plugin2(); - const result = defineBuildConfig(SwcConfig, { + const result = defineBuildConfig(DefaultSwcConfig, { plugins: [ newPlugin1, newPlugin2 @@ -92,7 +92,7 @@ test("when additional plugins are provided, append the provided plugins at the e }); test("when optimize is true, minimize is set to true", () => { - const result = defineBuildConfig(SwcConfig, { + const result = defineBuildConfig(DefaultSwcConfig, { optimize: true }); @@ -100,7 +100,7 @@ test("when optimize is true, minimize is set to true", () => { }); test("when optimize is false, minimize is set to false", () => { - const result = defineBuildConfig(SwcConfig, { + const result = defineBuildConfig(DefaultSwcConfig, { optimize: false }); @@ -108,7 +108,7 @@ test("when optimize is false, minimize is set to false", () => { }); test("when optimize is \"readable\", minimize is set to true", () => { - const result = defineBuildConfig(SwcConfig, { + const result = defineBuildConfig(DefaultSwcConfig, { optimize: "readable" }); @@ -116,7 +116,7 @@ test("when optimize is \"readable\", minimize is set to true", () => { }); test("when optimize is false, chunkIds is set to \"named\"", () => { - const result = defineBuildConfig(SwcConfig, { + const result = defineBuildConfig(DefaultSwcConfig, { optimize: false }); @@ -124,7 +124,7 @@ test("when optimize is false, chunkIds is set to \"named\"", () => { }); test("when optimize is false, moduleIds is set to \"named\"", () => { - const result = defineBuildConfig(SwcConfig, { + const result = defineBuildConfig(DefaultSwcConfig, { optimize: false }); @@ -132,7 +132,7 @@ test("when optimize is false, moduleIds is set to \"named\"", () => { }); test("when optimize is \"readable\", chunkIds is set to \"named\"", () => { - const result = defineBuildConfig(SwcConfig, { + const result = defineBuildConfig(DefaultSwcConfig, { optimize: "readable" }); @@ -140,7 +140,7 @@ test("when optimize is \"readable\", chunkIds is set to \"named\"", () => { }); test("when optimize is \"readable\", moduleIds is set to \"named\"", () => { - const result = defineBuildConfig(SwcConfig, { + const result = defineBuildConfig(DefaultSwcConfig, { optimize: "readable" }); @@ -148,7 +148,7 @@ test("when optimize is \"readable\", moduleIds is set to \"named\"", () => { }); test("when optimize is true, include minify configuration", () => { - const result = defineBuildConfig(SwcConfig, { + const result = defineBuildConfig(DefaultSwcConfig, { optimize: true }); @@ -156,7 +156,7 @@ test("when optimize is true, include minify configuration", () => { }); test("when optimize is false, do not include minify configuration", () => { - const result = defineBuildConfig(SwcConfig, { + const result = defineBuildConfig(DefaultSwcConfig, { optimize: false }); @@ -164,7 +164,7 @@ test("when optimize is false, do not include minify configuration", () => { }); test("when optimize is \"readable\", include minify configuration", () => { - const result = defineBuildConfig(SwcConfig, { + const result = defineBuildConfig(DefaultSwcConfig, { optimize: "readable" }); @@ -172,7 +172,7 @@ test("when optimize is \"readable\", include minify configuration", () => { }); test("when htmlWebpackPlugin is \"false\", no html-webpack-plugin instance is added to the plugin array", () => { - const config = defineBuildConfig(SwcConfig, { + const config = defineBuildConfig(DefaultSwcConfig, { htmlWebpackPlugin: false }); @@ -182,7 +182,7 @@ test("when htmlWebpackPlugin is \"false\", no html-webpack-plugin instance is ad }); test("when htmlWebpackPlugin is \"true\", an html-webpack-plugin instance is added to the plugin array", () => { - const config = defineBuildConfig(SwcConfig, { + const config = defineBuildConfig(DefaultSwcConfig, { htmlWebpackPlugin: true }); @@ -192,7 +192,7 @@ test("when htmlWebpackPlugin is \"true\", an html-webpack-plugin instance is add }); test("when css modules is enabled, include css modules configuration", () => { - const result = defineBuildConfig(SwcConfig, { + const result = defineBuildConfig(DefaultSwcConfig, { cssModules: true }); @@ -207,7 +207,7 @@ test("when css modules is enabled, include css modules configuration", () => { }); test("when css modules is disabled, do not include css modules configuration", () => { - const result = defineBuildConfig(SwcConfig, { + const result = defineBuildConfig(DefaultSwcConfig, { cssModules: false }); @@ -217,7 +217,7 @@ test("when css modules is disabled, do not include css modules configuration", ( }); test("the provided swc config object is set as the swc-loader options", () => { - const swcConfig = SwcConfig; + const swcConfig = DefaultSwcConfig; const result = defineBuildConfig(swcConfig); @@ -233,7 +233,7 @@ test("when a transformer is provided, and the transformer update the existing co return config; }; - const result = defineBuildConfig(SwcConfig, { + const result = defineBuildConfig(DefaultSwcConfig, { transformers: [entryTransformer] }); @@ -247,7 +247,7 @@ test("when a transformer is provided, and the transformer returns a new configur }; }; - const result = defineBuildConfig(SwcConfig, { + const result = defineBuildConfig(DefaultSwcConfig, { transformers: [entryTransformer] }); @@ -267,7 +267,7 @@ test("when multiple transformers are provided, all the transformers are applied return config; }; - const result = defineBuildConfig(SwcConfig, { + const result = defineBuildConfig(DefaultSwcConfig, { transformers: [entryTransformer, devToolTransformer] }); @@ -278,7 +278,7 @@ test("when multiple transformers are provided, all the transformers are applied test("transformers context environment is \"build\"", () => { const mockTransformer = jest.fn(); - defineBuildConfig(SwcConfig, { + defineBuildConfig(DefaultSwcConfig, { transformers: [mockTransformer] }); @@ -288,7 +288,7 @@ test("transformers context environment is \"build\"", () => { test("when the verbose option is true, the transformers context verbose value is \"true\"", () => { const mockTransformer = jest.fn(); - defineBuildConfig(SwcConfig, { + defineBuildConfig(DefaultSwcConfig, { verbose: true, transformers: [mockTransformer] }); @@ -309,7 +309,7 @@ test("when the verbose option is true, the transformers context verbose value is // }); test("when the svgr option is false, do not add the svgr rule", () => { - const result = defineBuildConfig(SwcConfig, { + const result = defineBuildConfig(DefaultSwcConfig, { svgr: false }); @@ -319,7 +319,7 @@ test("when the svgr option is false, do not add the svgr rule", () => { }); test("when the svgr option is false, add .svg to the default assets rule", () => { - const result = defineBuildConfig(SwcConfig, { + const result = defineBuildConfig(DefaultSwcConfig, { svgr: false }); diff --git a/packages/webpack-configs/tests/dev.test.ts b/packages/webpack-configs/tests/dev.test.ts index 4ec23b9a..f9d7fdf4 100644 --- a/packages/webpack-configs/tests/dev.test.ts +++ b/packages/webpack-configs/tests/dev.test.ts @@ -9,12 +9,12 @@ import type { WebpackConfigTransformer } from "../src/transformers/applyTransfor import { findModuleRule, matchAssetModuleType, matchLoaderName } from "../src/transformers/moduleRules.ts"; import { findPlugin, matchConstructorName } from "../src/transformers/plugins.ts"; -const DefaultConfig = defineSwcConfig({ +const DefaultSwcConfig = defineSwcConfig({ chrome: "116" }); test("when an entry prop is provided, use the provided entry value", () => { - const result = defineDevConfig(DefaultConfig, { + const result = defineDevConfig(DefaultSwcConfig, { entry: "./a-new-entry.ts" }); @@ -22,7 +22,7 @@ test("when an entry prop is provided, use the provided entry value", () => { }); test("when https is enabled, the dev server is configured for https", () => { - const result = defineDevConfig(DefaultConfig, { + const result = defineDevConfig(DefaultSwcConfig, { https: true }); @@ -30,7 +30,7 @@ test("when https is enabled, the dev server is configured for https", () => { }); test("when https is disabled, the dev server is not configured for https", () => { - const result = defineDevConfig(DefaultConfig, { + const result = defineDevConfig(DefaultSwcConfig, { https: false }); @@ -38,7 +38,7 @@ test("when https is disabled, the dev server is not configured for https", () => }); test("when https is enabled, the public path starts with https", () => { - const result = defineDevConfig(DefaultConfig, { + const result = defineDevConfig(DefaultSwcConfig, { https: true }); @@ -46,7 +46,7 @@ test("when https is enabled, the public path starts with https", () => { }); test("when https is disabled, the public path starts with http", () => { - const result = defineDevConfig(DefaultConfig, { + const result = defineDevConfig(DefaultSwcConfig, { https: false }); @@ -54,7 +54,7 @@ test("when https is disabled, the public path starts with http", () => { }); test("when an host is provided, the dev server host is the provided host value", () => { - const result = defineDevConfig(DefaultConfig, { + const result = defineDevConfig(DefaultSwcConfig, { host: "a-custom-host" }); @@ -62,7 +62,7 @@ test("when an host is provided, the dev server host is the provided host value", }); test("when an host is provided, the public path include the provided host value", () => { - const result = defineDevConfig(DefaultConfig, { + const result = defineDevConfig(DefaultSwcConfig, { host: "a-custom-host" }); @@ -70,7 +70,7 @@ test("when an host is provided, the public path include the provided host value" }); test("when a port is provided, the dev server port is the provided port value", () => { - const result = defineDevConfig(DefaultConfig, { + const result = defineDevConfig(DefaultSwcConfig, { port: 1234 }); @@ -78,7 +78,7 @@ test("when a port is provided, the dev server port is the provided port value", }); test("when a port is provided, the public path include the provided port", () => { - const result = defineDevConfig(DefaultConfig, { + const result = defineDevConfig(DefaultSwcConfig, { port: 1234 }); @@ -86,7 +86,7 @@ test("when a port is provided, the public path include the provided port", () => }); test("when a public path is provided, use the provided public path", () => { - const result = defineDevConfig(DefaultConfig, { + const result = defineDevConfig(DefaultSwcConfig, { publicPath: "http://my-dev-host.com/" }); @@ -94,7 +94,7 @@ test("when a public path is provided, use the provided public path", () => { }); test("when cache is enabled, the cache configuration is included", () => { - const result = defineDevConfig(DefaultConfig, { + const result = defineDevConfig(DefaultSwcConfig, { cache: true }); @@ -102,7 +102,7 @@ test("when cache is enabled, the cache configuration is included", () => { }); test("when cache is disabled, the cache prop is false", () => { - const result = defineDevConfig(DefaultConfig, { + const result = defineDevConfig(DefaultSwcConfig, { cache: false }); @@ -120,7 +120,7 @@ test("when additional module rules are provided, append the provided rules at th type: "asset/inline" }; - const result = defineDevConfig(DefaultConfig, { + const result = defineDevConfig(DefaultSwcConfig, { moduleRules: [ newModuleRule1, newModuleRule2 @@ -149,7 +149,7 @@ test("when additional plugins are provided, append the provided plugins at the e const newPlugin1 = new Plugin1(); const newPlugin2 = new Plugin2(); - const result = defineDevConfig(DefaultConfig, { + const result = defineDevConfig(DefaultSwcConfig, { plugins: [ newPlugin1, newPlugin2 @@ -163,7 +163,7 @@ test("when additional plugins are provided, append the provided plugins at the e }); test("when htmlWebpackPlugin is \"false\", no html-webpack-plugin instance is added to the plugin array", () => { - const config = defineDevConfig(DefaultConfig, { + const config = defineDevConfig(DefaultSwcConfig, { htmlWebpackPlugin: false }); @@ -173,7 +173,7 @@ test("when htmlWebpackPlugin is \"false\", no html-webpack-plugin instance is ad }); test("when htmlWebpackPlugin is \"true\", an html-webpack-plugin instance is added to the plugin array", () => { - const config = defineDevConfig(DefaultConfig, { + const config = defineDevConfig(DefaultSwcConfig, { htmlWebpackPlugin: true }); @@ -183,7 +183,7 @@ test("when htmlWebpackPlugin is \"true\", an html-webpack-plugin instance is add }); test("when fast refresh is disabled, dev server hot module reload is enabled", () => { - const result = defineDevConfig(DefaultConfig, { + const result = defineDevConfig(DefaultSwcConfig, { fastRefresh: false }); @@ -191,7 +191,7 @@ test("when fast refresh is disabled, dev server hot module reload is enabled", ( }); test("when fast refresh is enabled, add the fast refresh plugin", () => { - const result = defineDevConfig(DefaultConfig, { + const result = defineDevConfig(DefaultSwcConfig, { fastRefresh: true }); @@ -199,7 +199,7 @@ test("when fast refresh is enabled, add the fast refresh plugin", () => { }); test("when fast refresh is disabled, do not add the fast refresh plugin", () => { - const result = defineDevConfig(DefaultConfig, { + const result = defineDevConfig(DefaultSwcConfig, { fastRefresh: false }); @@ -207,7 +207,7 @@ test("when fast refresh is disabled, do not add the fast refresh plugin", () => }); test("when fast refresh is enabled, enable swc fast refresh", () => { - const result = defineDevConfig(DefaultConfig, { + const result = defineDevConfig(DefaultSwcConfig, { fastRefresh: true }); @@ -217,7 +217,7 @@ test("when fast refresh is enabled, enable swc fast refresh", () => { }); test("when fast refresh is disabled, disable swc fast refresh", () => { - const result = defineDevConfig(DefaultConfig, { + const result = defineDevConfig(DefaultSwcConfig, { fastRefresh: false }); @@ -227,7 +227,7 @@ test("when fast refresh is disabled, disable swc fast refresh", () => { }); test("when css modules is enabled, include css modules configuration", () => { - const result = defineDevConfig(DefaultConfig, { + const result = defineDevConfig(DefaultSwcConfig, { cssModules: true }); @@ -242,7 +242,7 @@ test("when css modules is enabled, include css modules configuration", () => { }); test("when css modules is disabled, do not include css modules configuration", () => { - const result = defineDevConfig(DefaultConfig, { + const result = defineDevConfig(DefaultSwcConfig, { cssModules: false }); @@ -252,7 +252,7 @@ test("when css modules is disabled, do not include css modules configuration", ( }); test("when the overlay option is not provided and fast refresh is disabled, the devserver overlay option is undefined", () => { - const result = defineDevConfig(DefaultConfig, { + const result = defineDevConfig(DefaultSwcConfig, { fastRefresh: false }); @@ -260,7 +260,7 @@ test("when the overlay option is not provided and fast refresh is disabled, the }); test("when fast refresh is enabled, the devserver overlay option is false", () => { - const result = defineDevConfig(DefaultConfig, { + const result = defineDevConfig(DefaultSwcConfig, { fastRefresh: true }); @@ -268,7 +268,7 @@ test("when fast refresh is enabled, the devserver overlay option is false", () = }); test("when the overlay is disabled, the devserver overlay option is false", () => { - const result = defineDevConfig(DefaultConfig, { + const result = defineDevConfig(DefaultSwcConfig, { overlay: false }); @@ -276,7 +276,7 @@ test("when the overlay is disabled, the devserver overlay option is false", () = }); test("the provided swc config object is set as the swc-loader options", () => { - const config = DefaultConfig; + const config = DefaultSwcConfig; const result = defineDevConfig(config); @@ -292,7 +292,7 @@ test("when a transformer is provided, and the transformer update the existing co return config; }; - const result = defineDevConfig(DefaultConfig, { + const result = defineDevConfig(DefaultSwcConfig, { transformers: [entryTransformer] }); @@ -306,7 +306,7 @@ test("when a transformer is provided, and the transformer returns a new configur }; }; - const result = defineDevConfig(DefaultConfig, { + const result = defineDevConfig(DefaultSwcConfig, { transformers: [entryTransformer] }); @@ -326,7 +326,7 @@ test("when multiple transformers are provided, all the transformers are applied return config; }; - const result = defineDevConfig(DefaultConfig, { + const result = defineDevConfig(DefaultSwcConfig, { transformers: [entryTransformer, devToolTransformer] }); @@ -337,7 +337,7 @@ test("when multiple transformers are provided, all the transformers are applied test("transformers context environment is \"dev\"", () => { const mockTransformer = jest.fn(); - defineDevConfig(DefaultConfig, { + defineDevConfig(DefaultSwcConfig, { transformers: [mockTransformer] }); @@ -347,7 +347,7 @@ test("transformers context environment is \"dev\"", () => { test("when the verbose option is true, the transformers context verbose value is \"true\"", () => { const mockTransformer = jest.fn(); - defineDevConfig(DefaultConfig, { + defineDevConfig(DefaultSwcConfig, { verbose: true, transformers: [mockTransformer] }); @@ -368,7 +368,7 @@ test("when the verbose option is true, the transformers context verbose value is // }); test("when the svgr option is false, do not add the svgr rule", () => { - const result = defineDevConfig(DefaultConfig, { + const result = defineDevConfig(DefaultSwcConfig, { svgr: false }); @@ -378,7 +378,7 @@ test("when the svgr option is false, do not add the svgr rule", () => { }); test("when the svgr option is false, add .svg to the default assets rule", () => { - const result = defineDevConfig(DefaultConfig, { + const result = defineDevConfig(DefaultSwcConfig, { svgr: false }); From 5b23c4367e80152528ec52e6be34b991601a72d3 Mon Sep 17 00:00:00 2001 From: patricklafrance Date: Fri, 13 Dec 2024 16:35:36 -0500 Subject: [PATCH 16/18] More stuff --- packages/rsbuild-configs/tests/build.test.ts | 0 packages/rsbuild-configs/tests/dev.test.ts | 33 ++++++++++---------- 2 files changed, 16 insertions(+), 17 deletions(-) create mode 100644 packages/rsbuild-configs/tests/build.test.ts diff --git a/packages/rsbuild-configs/tests/build.test.ts b/packages/rsbuild-configs/tests/build.test.ts new file mode 100644 index 00000000..e69de29b diff --git a/packages/rsbuild-configs/tests/dev.test.ts b/packages/rsbuild-configs/tests/dev.test.ts index 9b9e3707..7d0b988f 100644 --- a/packages/rsbuild-configs/tests/dev.test.ts +++ b/packages/rsbuild-configs/tests/dev.test.ts @@ -1,6 +1,5 @@ -import { RsbuildConfig, RsbuildPlugin, SourceMap } from "@rsbuild/core"; -import exp from "constants"; -import { RsbuildConfigTransformer } from "../src/applyTransformers.ts"; +import type { RsbuildConfig, RsbuildPlugin, SourceMap } from "@rsbuild/core"; +import type { RsbuildConfigTransformer } from "../src/applyTransformers.ts"; import { defineDevConfig } from "../src/dev.ts"; test("when an entry prop is provided, the source.entry option is the provided value", () => { @@ -27,7 +26,7 @@ test("when https is true, the asset prefix option include \"https\"", () => { https: true }); - expect(result.dev?.assetPrefix).toMatch(/(https)/i) + expect(result.dev?.assetPrefix).toMatch(/(https)/i); }); test("when https is a certificate, the server option is configured with the provided certificate", () => { @@ -51,7 +50,7 @@ test("when https is a certificate, the dev.assetPrefix option include \"https\"" } }); - expect(result.dev?.assetPrefix).toMatch(/(https)/i) + expect(result.dev?.assetPrefix).toMatch(/(https)/i); }); test("when https is false, the dev.assetPrefix option doesn't include \"https\"", () => { @@ -59,7 +58,7 @@ test("when https is false, the dev.assetPrefix option doesn't include \"https\"" https: false }); - expect(result.dev?.assetPrefix).not.toMatch(/(https)/i) + expect(result.dev?.assetPrefix).not.toMatch(/(https)/i); }); test("when https is false, the basic-ssl plugin is not included", () => { @@ -122,7 +121,7 @@ test("when additional plugins are provided, append the provided plugins at the e const plugin1: RsbuildPlugin = { name: "plugin-1", setup: () => {} - } + }; const plugin2: RsbuildPlugin = { name: "plugin-2", @@ -212,13 +211,13 @@ test("when fastRefresh is true, the react plugin enable fast refresh", () => { const result = defineDevConfig({ fastRefresh: true, react: defaultOptions => { - isEnabled = defaultOptions.fastRefresh === true + isEnabled = defaultOptions.fastRefresh === true; return defaultOptions; } }); - const plugin = result.plugins?.find(x => (x as RsbuildPlugin).name === "rsbuild:react") + const plugin = result.plugins?.find(x => (x as RsbuildPlugin).name === "rsbuild:react"); expect(plugin).toBeDefined(); expect(isEnabled).toBeTruthy(); @@ -237,7 +236,7 @@ test("when fastRefresh is true and the overlay is disable, disable the fast refr } }); - const plugin = result.plugins?.find(x => (x as RsbuildPlugin).name === "rsbuild:react") + const plugin = result.plugins?.find(x => (x as RsbuildPlugin).name === "rsbuild:react"); expect(plugin).toBeDefined(); expect(isOverlayDisabled).toBeTruthy(); @@ -263,7 +262,7 @@ test("when sourceMap is an object, the output.sourceMap option is the object", ( const sourceMap: SourceMap = { js: false, css: false - } + }; const result = defineDevConfig({ sourceMap @@ -283,7 +282,7 @@ test("when overlay is false, the dev.client.overlay option is false", () => { test("when overlay is false, react plugin fast refresh overlay is disabled", () => { let isOverlayDisabled = false; - const result = defineDevConfig({ + defineDevConfig({ overlay: false, react: defaultOptions => { isOverlayDisabled = defaultOptions.reactRefreshOptions?.overlay === false; @@ -300,7 +299,7 @@ test("when react is false, the react plugin is not included", () => { react: false }); - const plugin = result.plugins?.find(x => (x as RsbuildPlugin).name === "rsbuild:react") + const plugin = result.plugins?.find(x => (x as RsbuildPlugin).name === "rsbuild:react"); expect(plugin).toBeUndefined(); }); @@ -310,7 +309,7 @@ test("when svgr is false, the svgr plugin is not included", () => { svgr: false }); - const plugin = result.plugins?.find(x => (x as RsbuildPlugin).name === "rsbuild:svgr") + const plugin = result.plugins?.find(x => (x as RsbuildPlugin).name === "rsbuild:svgr"); expect(plugin).toBeUndefined(); }); @@ -322,7 +321,7 @@ test("when a transformer is provided, and the transformer update the existing co config.source = config.source ?? {}; config.source.entry = { index: "a-custom-value-in-a-transformer" - } + }; return config; }; @@ -357,7 +356,7 @@ test("when multiple transformers are provided, all the transformers are applied config.source = config.source ?? {}; config.source.entry = { index: "a-custom-value-in-a-transformer" - } + }; return config; }; @@ -365,7 +364,7 @@ test("when multiple transformers are provided, all the transformers are applied const distPathTransformer: RsbuildConfigTransformer = (config: RsbuildConfig) => { config.output = config.output ?? {}; config.output.distPath = config.output.distPath ?? {}; - config.output.distPath.js = "a-custom-dist-path-in-a-tranformer" + config.output.distPath.js = "a-custom-dist-path-in-a-tranformer"; return config; }; From 82a309052057165cbcbf212add4924694304195d Mon Sep 17 00:00:00 2001 From: patricklafrance Date: Sun, 15 Dec 2024 15:56:04 -0500 Subject: [PATCH 17/18] More stuff --- packages/rsbuild-configs/tests/build.test.ts | 298 +++++++++++++++++++ packages/rsbuild-configs/tests/dev.test.ts | 2 - packages/webpack-configs/tests/build.test.ts | 32 +- 3 files changed, 314 insertions(+), 18 deletions(-) diff --git a/packages/rsbuild-configs/tests/build.test.ts b/packages/rsbuild-configs/tests/build.test.ts index e69de29b..a226f8a8 100644 --- a/packages/rsbuild-configs/tests/build.test.ts +++ b/packages/rsbuild-configs/tests/build.test.ts @@ -0,0 +1,298 @@ +import type { RsbuildConfig, RsbuildPlugin, SourceMap } from "@rsbuild/core"; +import type { RsbuildConfigTransformer } from "../src/applyTransformers.ts"; +import { defineBuildConfig, getOptimizationConfig } from "../src/build.ts"; + +test("when an entry prop is provided, the source.entry option is the provided value", () => { + const result = defineBuildConfig({ + entry: { + index: "./a-new-entry.ts" + } + }); + + expect(result!.source!.entry!.index).toBe("./a-new-entry.ts"); +}); + +test("when a dist path is provided, the output.distpath option is the provided value", () => { + const result = defineBuildConfig({ + distPath: { + root: "./a-new-output-path" + } + }); + + expect(result.output!.distPath!.root).toBe("./a-new-output-path"); +}); + +test("when an asset prefix is provided, the output.assetPrefix option is the provided value", () => { + const result = defineBuildConfig({ + assetPrefix: "a-valid-public-path-ending-with-a-trailing-slash/" + }); + + expect(result.output!.assetPrefix).toBe("a-valid-public-path-ending-with-a-trailing-slash/"); +}); + +test("when additional plugins are provided, append the provided plugins at the end of the plugins array", () => { + const plugin1: RsbuildPlugin = { + name: "plugin-1", + setup: () => {} + }; + + const plugin2: RsbuildPlugin = { + name: "plugin-2", + setup: () => {} + }; + + const result = defineBuildConfig({ + plugins: [ + plugin1, + plugin2 + ] + }); + + const pluginsCount = result.plugins!.length; + + expect(result.plugins![pluginsCount - 2]).toBe(plugin1); + expect(result.plugins![pluginsCount - 1]).toBe(plugin2); +}); + +test("when html is false, the html option is undefined", () => { + const result = defineBuildConfig({ + html: false + }); + + expect(result.html).toBeUndefined(); +}); + +test("when html is a function, the html option match the function return value", () => { + const html = { + title: "foo" + }; + + const result = defineBuildConfig({ + html: () => { + return html; + } + }); + + expect(result.html).toBe(html); +}); + +test("when sourceMap is false, the output.sourceMap option is false", () => { + const result = defineBuildConfig({ + sourceMap: false + }); + + expect(result.output?.sourceMap).toBeFalsy(); +}); + +test("when sourceMap is an object, the output.sourceMap option is the object", () => { + const sourceMap: SourceMap = { + js: false, + css: false + }; + + const result = defineBuildConfig({ + sourceMap + }); + + expect(result.output?.sourceMap).toBe(sourceMap); +}); + +test("when react is false, the react plugin is not included", () => { + const result = defineBuildConfig({ + react: false + }); + + const plugin = result.plugins?.find(x => (x as RsbuildPlugin).name === "rsbuild:react"); + + expect(plugin).toBeUndefined(); +}); + +test("when react is a function, the function is executed", () => { + const fct = jest.fn(); + + defineBuildConfig({ + react: fct + }); + + expect(fct).toHaveBeenCalledTimes(1); +}); + +test("when svgr is false, the svgr plugin is not included", () => { + const result = defineBuildConfig({ + svgr: false + }); + + const plugin = result.plugins?.find(x => (x as RsbuildPlugin).name === "rsbuild:svgr"); + + expect(plugin).toBeUndefined(); +}); + +test("when svgr is a function, the function is executed", () => { + const fct = jest.fn(); + + defineBuildConfig({ + svgr: fct + }); + + expect(fct).toHaveBeenCalledTimes(1); +}); + +test("when compressImage is false, the image compress plugin is not included", () => { + const result = defineBuildConfig({ + compressImage: false + }); + + const plugin = result.plugins?.find(x => (x as RsbuildPlugin).name === "rsbuild:image-compress"); + + expect(plugin).toBeUndefined(); +}); + +test("when compressImage is a function, the function is executed", () => { + const fct = jest.fn(); + + defineBuildConfig({ + compressImage: fct + }); + + expect(fct).toHaveBeenCalledTimes(1); +}); + +test("when a transformer is provided, and the transformer update the existing configuration object, the transformer is applied on the Rsbuild config", () => { + const entryTransformer: RsbuildConfigTransformer = (config: RsbuildConfig) => { + config.source = config.source ?? {}; + config.source.entry = { + index: "a-custom-value-in-a-transformer" + }; + + return config; + }; + + const result = defineBuildConfig({ + transformers: [entryTransformer] + }); + + expect(result.source!.entry!.index).toBe("a-custom-value-in-a-transformer"); +}); + +test("when a transformer is provided, and the transformer returns a new configuration object, the transformer is applied on the Rsbuild config", () => { + const entryTransformer: RsbuildConfigTransformer = () => { + return { + source: { + entry: { + index: "a-custom-value-in-a-transformer" + } + } + }; + }; + + const result = defineBuildConfig({ + transformers: [entryTransformer] + }); + + expect(result.source!.entry!.index).toBe("a-custom-value-in-a-transformer"); +}); + +test("when multiple transformers are provided, all the transformers are applied on the webpack config", () => { + const entryTransformer: RsbuildConfigTransformer = (config: RsbuildConfig) => { + config.source = config.source ?? {}; + config.source.entry = { + index: "a-custom-value-in-a-transformer" + }; + + return config; + }; + + const distPathTransformer: RsbuildConfigTransformer = (config: RsbuildConfig) => { + config.output = config.output ?? {}; + config.output.distPath = config.output.distPath ?? {}; + config.output.distPath.js = "a-custom-dist-path-in-a-tranformer"; + + return config; + }; + + const result = defineBuildConfig({ + transformers: [entryTransformer, distPathTransformer] + }); + + expect(result.source!.entry!.index).toBe("a-custom-value-in-a-transformer"); + expect(result.output!.distPath!.js).toBe("a-custom-dist-path-in-a-tranformer"); +}); + +test("transformers context environment is \"dev\"", () => { + const mockTransformer = jest.fn(); + + defineBuildConfig({ + transformers: [mockTransformer] + }); + + expect(mockTransformer).toHaveBeenCalledWith(expect.anything(), { environment: "build", verbose: false }); +}); + +test("when the verbose option is true, the transformers context verbose value is \"true\"", () => { + const mockTransformer = jest.fn(); + + defineBuildConfig({ + verbose: true, + transformers: [mockTransformer] + }); + + expect(mockTransformer).toHaveBeenCalledWith(expect.anything(), { environment: "build", verbose: true }); +}); + +describe("getOptimizationConfig", () => { + test("when optimize is true, minimize is set to true", () => { + const result = getOptimizationConfig(true); + + expect(result.minimize).toBeTruthy(); + }); + + test("when optimize is false, minimize is set to false", () => { + const result = getOptimizationConfig(false); + + expect(result.minimize).toBeFalsy(); + }); + + test("when optimize is \"readable\", minimize is set to true", () => { + const result = getOptimizationConfig("readable"); + + expect(result.minimize).toBeTruthy(); + }); + + test("when optimize is false, chunkIds is set to \"named\"", () => { + const result = getOptimizationConfig(false); + + expect(result.chunkIds).toBe("named"); + }); + + test("when optimize is false, moduleIds is set to \"named\"", () => { + const result = getOptimizationConfig(false); + + expect(result.chunkIds).toBe("named"); + }); + + test("when optimize is \"readable\", chunkIds is set to \"named\"", () => { + const result = getOptimizationConfig("readable"); + + expect(result.chunkIds).toBe("named"); + }); + + test("when optimize is \"readable\", moduleIds is set to \"named\"", () => { + const result = getOptimizationConfig("readable"); + + expect(result.chunkIds).toBe("named"); + }); + + test("when optimize is false, do not include minimizer configuration", () => { + const result = getOptimizationConfig(false); + + expect(result.minimizer).toBeUndefined(); + }); + + test("when optimize is \"readable\", include minify configuration", () => { + const result = getOptimizationConfig("readable"); + + expect(result.minimizer).toBeDefined(); + }); +}); + + diff --git a/packages/rsbuild-configs/tests/dev.test.ts b/packages/rsbuild-configs/tests/dev.test.ts index 7d0b988f..9fb51d9c 100644 --- a/packages/rsbuild-configs/tests/dev.test.ts +++ b/packages/rsbuild-configs/tests/dev.test.ts @@ -314,8 +314,6 @@ test("when svgr is false, the svgr plugin is not included", () => { expect(plugin).toBeUndefined(); }); -///////////////////////// - test("when a transformer is provided, and the transformer update the existing configuration object, the transformer is applied on the Rsbuild config", () => { const entryTransformer: RsbuildConfigTransformer = (config: RsbuildConfig) => { config.source = config.source ?? {}; diff --git a/packages/webpack-configs/tests/build.test.ts b/packages/webpack-configs/tests/build.test.ts index 71ce8976..b6b34108 100644 --- a/packages/webpack-configs/tests/build.test.ts +++ b/packages/webpack-configs/tests/build.test.ts @@ -23,7 +23,7 @@ test("when an output path is provided, use the provided ouput path value", () => outputPath: "./a-new-output-path" }); - expect(result.output?.path).toBe("./a-new-output-path"); + expect(result.output!.path).toBe("./a-new-output-path"); }); test("when a public path is set to \"auto\", should not throw an error", () => { @@ -35,7 +35,7 @@ test("when a valid public path is provided, use the provided public path value", publicPath: "a-valid-public-path-ending-with-a-trailing-slash/" }); - expect(result.output?.publicPath).toBe("a-valid-public-path-ending-with-a-trailing-slash/"); + expect(result.output!.publicPath).toBe("a-valid-public-path-ending-with-a-trailing-slash/"); }); test("when additional module rules are provided, append the provided rules at the end of the module rules array", () => { @@ -58,8 +58,8 @@ test("when additional module rules are provided, append the provided rules at th const rulesCount = result.module!.rules!.length; - expect(result.module?.rules![rulesCount - 2]).toBe(newModuleRule1); - expect(result.module?.rules![rulesCount - 1]).toBe(newModuleRule2); + expect(result.module!.rules![rulesCount - 2]).toBe(newModuleRule1); + expect(result.module!.rules![rulesCount - 1]).toBe(newModuleRule2); }); test("when additional plugins are provided, append the provided plugins at the end of the plugins array", () => { @@ -96,7 +96,7 @@ test("when optimize is true, minimize is set to true", () => { optimize: true }); - expect(result.optimization?.minimize).toBeTruthy(); + expect(result.optimization!.minimize).toBeTruthy(); }); test("when optimize is false, minimize is set to false", () => { @@ -104,7 +104,7 @@ test("when optimize is false, minimize is set to false", () => { optimize: false }); - expect(result.optimization?.minimize).toBeFalsy(); + expect(result.optimization!.minimize).toBeFalsy(); }); test("when optimize is \"readable\", minimize is set to true", () => { @@ -128,7 +128,7 @@ test("when optimize is false, moduleIds is set to \"named\"", () => { optimize: false }); - expect(result.optimization?.chunkIds).toBe("named"); + expect(result.optimization!.chunkIds).toBe("named"); }); test("when optimize is \"readable\", chunkIds is set to \"named\"", () => { @@ -136,7 +136,7 @@ test("when optimize is \"readable\", chunkIds is set to \"named\"", () => { optimize: "readable" }); - expect(result.optimization?.chunkIds).toBe("named"); + expect(result.optimization!.chunkIds).toBe("named"); }); test("when optimize is \"readable\", moduleIds is set to \"named\"", () => { @@ -152,7 +152,7 @@ test("when optimize is true, include minify configuration", () => { optimize: true }); - expect(result.optimization?.minimizer).toBeDefined(); + expect(result.optimization!.minimizer).toBeDefined(); }); test("when optimize is false, do not include minify configuration", () => { @@ -160,7 +160,7 @@ test("when optimize is false, do not include minify configuration", () => { optimize: false }); - expect(result.optimization?.minimizer).toBeUndefined(); + expect(result.optimization!.minimizer).toBeUndefined(); }); test("when optimize is \"readable\", include minify configuration", () => { @@ -168,7 +168,7 @@ test("when optimize is \"readable\", include minify configuration", () => { optimize: "readable" }); - expect(result.optimization?.minimizer).toBeDefined(); + expect(result.optimization!.minimizer).toBeDefined(); }); test("when htmlWebpackPlugin is \"false\", no html-webpack-plugin instance is added to the plugin array", () => { @@ -200,10 +200,10 @@ test("when css modules is enabled, include css modules configuration", () => { // css-loader doesn't provide typings. // eslint-disable-next-line @typescript-eslint/no-explicit-any - expect(((cssLoader?.moduleRule as RuleSetRule).options as any).modules).toBeTruthy(); + expect(((cssLoader!.moduleRule as RuleSetRule).options as any).modules).toBeTruthy(); // css-loader doesn't provide typings. // eslint-disable-next-line @typescript-eslint/no-explicit-any - expect(((cssLoader?.moduleRule as RuleSetRule).options as any).importLoaders).toBe(1); + expect(((cssLoader!.moduleRule as RuleSetRule).options as any).importLoaders).toBe(1); }); test("when css modules is disabled, do not include css modules configuration", () => { @@ -213,7 +213,7 @@ test("when css modules is disabled, do not include css modules configuration", ( const cssLoader = findModuleRule(result, matchLoaderName("css-loader")); - expect((cssLoader?.moduleRule as RuleSetRule).options).toBeUndefined(); + expect((cssLoader!.moduleRule as RuleSetRule).options).toBeUndefined(); }); test("the provided swc config object is set as the swc-loader options", () => { @@ -223,7 +223,7 @@ test("the provided swc config object is set as the swc-loader options", () => { const swcLoader = findModuleRule(result, matchLoaderName("swc-loader")); - expect((swcLoader?.moduleRule as RuleSetRule).options).toBe(swcConfig); + expect((swcLoader!.moduleRule as RuleSetRule).options).toBe(swcConfig); }); test("when a transformer is provided, and the transformer update the existing configuration object, the transformer is applied on the webpack config", () => { @@ -325,7 +325,7 @@ test("when the svgr option is false, add .svg to the default assets rule", () => const assetsRule = findModuleRule(result, matchAssetModuleType("asset/resource")); - expect((assetsRule?.moduleRule as RuleSetRule).test).toEqual(/\.(png|jpe?g|gif|svg)$/i); + expect((assetsRule!.moduleRule as RuleSetRule).test).toEqual(/\.(png|jpe?g|gif|svg)$/i); }); describe("defineBuildHtmlWebpackPluginConfig", () => { From 1e82f5405bf17001aaf138faa974827c0ec551cd Mon Sep 17 00:00:00 2001 From: patricklafrance Date: Sun, 15 Dec 2024 16:03:38 -0500 Subject: [PATCH 18/18] More stuff --- .../rsbuild-configs/tests/storybook.test.ts | 170 ++++++++++++++++++ 1 file changed, 170 insertions(+) create mode 100644 packages/rsbuild-configs/tests/storybook.test.ts diff --git a/packages/rsbuild-configs/tests/storybook.test.ts b/packages/rsbuild-configs/tests/storybook.test.ts new file mode 100644 index 00000000..d14baa70 --- /dev/null +++ b/packages/rsbuild-configs/tests/storybook.test.ts @@ -0,0 +1,170 @@ +import type { RsbuildConfig, RsbuildPlugin, SourceMap } from "@rsbuild/core"; +import type { RsbuildConfigTransformer } from "../src/applyTransformers.ts"; +import { defineStorybookConfig } from "../src/storybook.ts"; + +test("when additional plugins are provided, append the provided plugins at the end of the plugins array", () => { + const plugin1: RsbuildPlugin = { + name: "plugin-1", + setup: () => {} + }; + + const plugin2: RsbuildPlugin = { + name: "plugin-2", + setup: () => {} + }; + + const result = defineStorybookConfig({ + plugins: [ + plugin1, + plugin2 + ] + }); + + const pluginsCount = result.plugins!.length; + + expect(result.plugins![pluginsCount - 2]).toBe(plugin1); + expect(result.plugins![pluginsCount - 1]).toBe(plugin2); +}); + +test("when sourceMap is false, the output.sourceMap option is false", () => { + const result = defineStorybookConfig({ + sourceMap: false + }); + + expect(result.output?.sourceMap).toBeFalsy(); +}); + +test("when sourceMap is an object, the output.sourceMap option is the object", () => { + const sourceMap: SourceMap = { + js: false, + css: false + }; + + const result = defineStorybookConfig({ + sourceMap + }); + + expect(result.output?.sourceMap).toBe(sourceMap); +}); + +test("when react is false, the react plugin is not included", () => { + const result = defineStorybookConfig({ + react: false + }); + + const plugin = result.plugins?.find(x => (x as RsbuildPlugin).name === "rsbuild:react"); + + expect(plugin).toBeUndefined(); +}); + +test("when react is a function, the function is executed", () => { + const fct = jest.fn(); + + defineStorybookConfig({ + react: fct + }); + + expect(fct).toHaveBeenCalledTimes(1); +}); + +test("when svgr is false, the svgr plugin is not included", () => { + const result = defineStorybookConfig({ + svgr: false + }); + + const plugin = result.plugins?.find(x => (x as RsbuildPlugin).name === "rsbuild:svgr"); + + expect(plugin).toBeUndefined(); +}); + +test("when svgr is a function, the function is executed", () => { + const fct = jest.fn(); + + defineStorybookConfig({ + svgr: fct + }); + + expect(fct).toHaveBeenCalledTimes(1); +}); + +test("when a transformer is provided, and the transformer update the existing configuration object, the transformer is applied on the Rsbuild config", () => { + const entryTransformer: RsbuildConfigTransformer = (config: RsbuildConfig) => { + config.source = config.source ?? {}; + config.source.entry = { + index: "a-custom-value-in-a-transformer" + }; + + return config; + }; + + const result = defineStorybookConfig({ + transformers: [entryTransformer] + }); + + expect(result.source!.entry!.index).toBe("a-custom-value-in-a-transformer"); +}); + +test("when a transformer is provided, and the transformer returns a new configuration object, the transformer is applied on the Rsbuild config", () => { + const entryTransformer: RsbuildConfigTransformer = () => { + return { + source: { + entry: { + index: "a-custom-value-in-a-transformer" + } + } + }; + }; + + const result = defineStorybookConfig({ + transformers: [entryTransformer] + }); + + expect(result.source!.entry!.index).toBe("a-custom-value-in-a-transformer"); +}); + +test("when multiple transformers are provided, all the transformers are applied on the webpack config", () => { + const entryTransformer: RsbuildConfigTransformer = (config: RsbuildConfig) => { + config.source = config.source ?? {}; + config.source.entry = { + index: "a-custom-value-in-a-transformer" + }; + + return config; + }; + + const distPathTransformer: RsbuildConfigTransformer = (config: RsbuildConfig) => { + config.output = config.output ?? {}; + config.output.distPath = config.output.distPath ?? {}; + config.output.distPath.js = "a-custom-dist-path-in-a-tranformer"; + + return config; + }; + + const result = defineStorybookConfig({ + transformers: [entryTransformer, distPathTransformer] + }); + + expect(result.source!.entry!.index).toBe("a-custom-value-in-a-transformer"); + expect(result.output!.distPath!.js).toBe("a-custom-dist-path-in-a-tranformer"); +}); + +test("transformers context environment is \"dev\"", () => { + const mockTransformer = jest.fn(); + + defineStorybookConfig({ + transformers: [mockTransformer] + }); + + expect(mockTransformer).toHaveBeenCalledWith(expect.anything(), { environment: "storybook", verbose: false }); +}); + +test("when the verbose option is true, the transformers context verbose value is \"true\"", () => { + const mockTransformer = jest.fn(); + + defineStorybookConfig({ + verbose: true, + transformers: [mockTransformer] + }); + + expect(mockTransformer).toHaveBeenCalledWith(expect.anything(), { environment: "storybook", verbose: true }); +});