diff --git a/.changeset/wyw-alpha-static-eval.md b/.changeset/wyw-alpha-static-eval.md new file mode 100644 index 000000000..9378e1511 --- /dev/null +++ b/.changeset/wyw-alpha-static-eval.md @@ -0,0 +1,27 @@ +--- +"@linaria/atomic": major +"@linaria/core": major +"@linaria/babel-plugin-interop": major +"linaria": major +"@linaria/postcss-linaria": major +"@linaria/react": major +"@linaria/server": major +"@linaria/stylelint-config-standard-linaria": major +"@linaria/stylelint": major +--- + +Release Linaria 8 with WyW 2.x stable dependencies and Node.js 22.12+ support. + +Linaria processors now expose WyW 2 static evaluation semantics, allowing the default `eval.strategy: "hybrid"` mode to resolve statically provable values before falling back to the evaluator. This keeps existing dynamic/runtime-only interpolation support while reducing evaluator work for values that can be resolved from static bindings and imports. + +Performance and stability: + +With the default hybrid mode, a large share of style computation now moves out of runtime-like evaluator execution and into analytical static evaluation. This reduces evaluator startup and module execution work, makes builds less sensitive to runtime-only side effects, and gives the pipeline a more stable foundation for further optimization. It also opens the path for substantially larger speedups as WyW moves more of the pipeline to Rust; see the [WyW roadmap](https://wyw-in-js.dev/stability#roadmap-high-level) for more detail. + +Migration notes: + +- Node.js 22.12 or newer is required. +- `@wyw-in-js/transform` is updated to 2.0.2 to avoid duplicate CSS emitted for same-file processor bindings referenced from another processor template inside a local scope and to keep mixed static/processor object-member interpolations statically resolvable. +- Top-level `evaluate` config should be migrated to `eval.strategy`. Use `execute` for evaluator-only compatibility, keep the default `hybrid` for static-first resolution with fallback, or use `static` to reject evaluator fallback. +- Babel config and Babel resolver plugins are no longer used as an implicit module-resolution fallback during WyW evaluation. Move build-time alias handling to WyW configuration with `eval.customResolver`, `eval.resolver`, or `staticBindings`. +- CSS rule emission order may change for cascade ties with identical specificity because WyW 2 uses the Oxc/static-first pipeline and can preserve/process imports differently. Make precedence explicit with selector specificity, composition, or source structure where order matters. diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index e408e27df..3fbff4bdb 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -18,10 +18,10 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - node-version: [20.x, 22.x] + node-version: [22.x, 24.x] include: - os: windows-latest - node-version: 20.x + node-version: 22.x steps: - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 @@ -51,10 +51,10 @@ jobs: - name: Install and prepare run: pnpm install --frozen-lockfile --strict-peer-dependencies - name: ESLint - if: matrix.os == 'ubuntu-latest' && matrix.node-version == '20.x' + if: matrix.os == 'ubuntu-latest' && matrix.node-version == '22.x' run: pnpm lint - name: TSLint - if: matrix.os == 'ubuntu-latest' && matrix.node-version == '20.x' + if: matrix.os == 'ubuntu-latest' && matrix.node-version == '22.x' run: pnpm turbo run test:dts - name: Tests run: pnpm turbo run test diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8077884e5..46a553fc0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,10 +26,10 @@ jobs: version: 9 run_install: false - - name: Setup Node.js 20.x + - name: Setup Node.js 22.x uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 with: - node-version: 20.x + node-version: 22.x registry-url: 'https://registry.npmjs.org' - name: Upgrade npm for trusted publishing (OIDC) diff --git a/.github/workflows/site-deploy.yml b/.github/workflows/site-deploy.yml index 17ab79d09..5e9802927 100644 --- a/.github/workflows/site-deploy.yml +++ b/.github/workflows/site-deploy.yml @@ -19,10 +19,10 @@ jobs: version: 9 run_install: false - - name: Use Node.js 20.x + - name: Use Node.js 22.x uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 with: - node-version: 20.x + node-version: 22.x - name: Install and prepare run: pnpm install --frozen-lockfile --strict-peer-dependencies diff --git a/README.md b/README.md index 843f4dd9b..8ac883d2a 100644 --- a/README.md +++ b/README.md @@ -65,7 +65,9 @@ See [Configuration](https://wyw-in-js.dev/configuration) to customize how Linari Linaria relies on WyW (`@wyw-in-js/*`) to evaluate your modules at build time and extract CSS. If you hit issues like slow builds, invalidation storms, or unexpected code being executed during the build, it’s usually related to the WyW evaluation model and how your modules are structured. -Linaria 7 requires Node.js `>=20` (WyW 1.x enforces this via `engines`). +Linaria 8 requires Node.js `>=22.12.0` (aligned with the WyW 2 / Oxc dependency graph). WyW 2 defaults to `eval.strategy: "hybrid"`, so statically provable values are resolved before falling back to the evaluator for dynamic values. + +If your build depends on evaluator-only side effects or exact CSS rule order ties, review the Linaria 8 migration notes in [docs/MIGRATION_GUIDE.md](./docs/MIGRATION_GUIDE.md). See https://wyw-in-js.dev/stability for practical guidance and common pitfalls. diff --git a/babel-plugins/transform-import-meta.cjs b/babel-plugins/transform-import-meta.cjs new file mode 100644 index 000000000..316059ad8 --- /dev/null +++ b/babel-plugins/transform-import-meta.cjs @@ -0,0 +1,25 @@ +module.exports = ({ types: t }) => ({ + name: 'transform-import-meta-url', + visitor: { + MemberExpression(path) { + const { object, property, computed } = path.node; + if (computed) return; + if (!t.isMetaProperty(object)) return; + if (!t.isIdentifier(object.meta, { name: 'import' })) return; + if (!t.isIdentifier(object.property, { name: 'meta' })) return; + if (!t.isIdentifier(property, { name: 'url' })) return; + const requireUrl = t.callExpression( + t.memberExpression(t.identifier('module'), t.identifier('require')), + [t.stringLiteral('url')] + ); + const pathToFileURL = t.memberExpression( + requireUrl, + t.identifier('pathToFileURL') + ); + const fileUrl = t.callExpression(pathToFileURL, [ + t.identifier('__filename'), + ]); + path.replaceWith(t.memberExpression(fileUrl, t.identifier('href'))); + }, + }, +}); diff --git a/babel.config.js b/babel.config.js index dee6c7137..882f740d4 100644 --- a/babel.config.js +++ b/babel.config.js @@ -19,6 +19,8 @@ const commonJSTargets = { node: '12', }; +const transformImportMeta = require('./babel-plugins/transform-import-meta.cjs'); + module.exports = { presets: ['@babel/preset-typescript'], plugins: ['@babel/plugin-proposal-explicit-resource-management'], @@ -47,6 +49,7 @@ module.exports = { ], '@babel/preset-typescript', ], + plugins: [transformImportMeta], }, }, overrides: [ diff --git a/docs/CONFIGURATION.md b/docs/CONFIGURATION.md index e9ee45bb7..6ee308273 100644 --- a/docs/CONFIGURATION.md +++ b/docs/CONFIGURATION.md @@ -11,16 +11,22 @@ Example `wyw-in-js.config.js`: ```js module.exports = { - evaluate: true, + eval: { + strategy: 'hybrid', + }, displayName: false, }; ``` ## Options -- `evaluate: boolean` (default: `true`): +- `eval.strategy: "hybrid" | "execute" | "static"` (default: `"hybrid"`): + + Controls how WyW resolves values used in CSS interpolations. The recommended default, `"hybrid"`, uses static-first resolution: WyW first tries to prove values from Linaria processor static semantics, `staticBindings`, and statically resolvable imports, then falls back to the evaluator for values that cannot be proven statically. - Enabling this will evaluate dynamic expressions in the CSS. You need to enable this if you want to use imported variables in the CSS or interpolate other components. Enabling this also ensures that your styled components wrapping other styled components will have the correct specificity and override styles properly. + Use `"execute"` when you need evaluator-only compatibility, for example while migrating code that relies on build-time side effects or exact import execution order. Use `"static"` as a strict validation mode when fallback to the evaluator should be rejected. The older top-level `evaluate` option should be migrated to `eval.strategy` in Linaria 8 / WyW 2. + + Evaluated values are included in the generated CSS. Since fallback evaluation runs at build time in Node.js, avoid browser-only APIs, unavailable runtime globals, Node native modules such as `fs`, and side effects in evaluated expressions. - `displayName: boolean` (default: `false`): @@ -445,7 +451,9 @@ module.exports = { [ '@linaria', { - evaluate: true, + eval: { + strategy: 'hybrid', + }, displayName: process.env.NODE_ENV !== 'production', }, ], diff --git a/docs/FEATURE_FLAGS.md b/docs/FEATURE_FLAGS.md index 3fc0019f8..ebb9f4bf3 100644 --- a/docs/FEATURE_FLAGS.md +++ b/docs/FEATURE_FLAGS.md @@ -65,6 +65,4 @@ The `softErrors` is disabled by default. It is designed to provide a more lenien # 'useBabelConfigs' Feature -The `useBabelConfigs` feature is enabled by default. If it is enabled, Linaria will try to resolve the `.babelrc` file for each processed file. Otherwise, it will use the default Babel configuration from `babelOptions` in the configuration. - -Please note that the default value of `useBabelConfigs` will be changed to `false` in the next major release. +Linaria 8 uses the WyW 2 static-first pipeline and no longer treats Babel configs or Babel resolver plugins as an implicit module-resolution fallback during evaluation. If evaluated code imports aliased specifiers, configure WyW resolution explicitly with `eval.customResolver`, `eval.resolver`, or `staticBindings`. diff --git a/docs/HOW_IT_WORKS.md b/docs/HOW_IT_WORKS.md index bfe9f9f4a..ab1b2a611 100644 --- a/docs/HOW_IT_WORKS.md +++ b/docs/HOW_IT_WORKS.md @@ -148,7 +148,7 @@ const Container = styled.h1` We support this usage because it allows you to use a library such as [polished.js](https://polished.js.org) which outputs object based styles along with Linaria. -If you've configured the plugin to evaluate expressions with `evaluate: true` (default), any dynamic expressions we encounter will be evaluated during the build-time in a sandbox, and the result will be included in the CSS. Since these expressions are evaluated at build time in Node, you cannot use any browser specific APIs or any API which is only available in runtime. Access to Node native modules such as `fs` is also not allowed inside the sandbox to prevent malicious scripts. In addition, to achieve consistent build output, you should also avoid doing any side effects in these expressions and keep them pure. +By default, Linaria uses WyW's `eval.strategy: "hybrid"` mode. WyW first tries to resolve values statically from Linaria processor metadata, `staticBindings`, and statically resolvable imports. If a value cannot be proven statically, WyW falls back to build-time evaluation and includes the result in the generated CSS. Since fallback evaluation runs in Node.js, you cannot use browser-specific APIs, runtime-only globals, or Node native modules such as `fs`. To keep build output consistent, avoid side effects in evaluated expressions and keep them pure. You might want to skip evaluating a certain interpolation if you're using a browser API, a global variable which is only available at runtime, or a module which breaks when evaluating in the sandbox for some reason. To skip evaluating an interpolation, you can always wrap it in a function, like so: @@ -162,13 +162,13 @@ But keep in mind that if you're doing SSR for your app, this won't work with SSR ### Evaluators -Linaria can use different strategies for evaluating the interpolated values. -Currently, we have two built-in strategies: +Linaria relies on WyW strategies for resolving interpolated values: -- `extractor` was the default strategy in `1.x` version. It takes an interpolated expression, finds all the referenced identifiers, gets all its declarations, repeats cycle for all identifiers in found declarations, and then constructs a new tree of statements from all found declarations. It's a pretty simple strategy, but it significantly changes an evaluated code and doesn't work for non-primitive js-constructions. -- `shaker` was introduced as an option in `1.4` and became the default in `2.0` version. In contrast to `extractor`, `shaker` tries to find all irrelevant code and cuts it out of the file. As a result, interpolated values can be defined without any restrictions. +- `hybrid` is the default in Linaria 8 / WyW 2. It resolves statically provable values without starting the evaluator, then falls back to evaluator execution for unresolved dynamic values. +- `execute` uses evaluator-only behavior and is the compatibility escape hatch for projects that depend on build-time side effects or exact import execution order. +- `static` is a strict validation mode that rejects fallback to evaluator execution. -If an interpolated value or one of its dependencies is imported from another module, that module will be also processed with an evaluator (the implementation of evaluator will be chosen by matching `rules` from [the Linaria config](./CONFIGURATION.md#options)). +If an interpolated value or one of its dependencies is imported from another module, WyW processes that module according to the configured strategy. In `hybrid` mode, the imported value may be resolved statically; otherwise WyW falls back to the evaluator selected by matching `rules` from [the Linaria config](./CONFIGURATION.md#options). Sometimes it can be useful to implement your own strategy (it can be just a mocked version of some heavy or browser-only library). You can do it by implementing `Evaluator` function: diff --git a/docs/MIGRATION_GUIDE.md b/docs/MIGRATION_GUIDE.md index df1d1d464..cad4f1e54 100644 --- a/docs/MIGRATION_GUIDE.md +++ b/docs/MIGRATION_GUIDE.md @@ -1,5 +1,33 @@ # Migration Guide +# 8.x from 7.x + +## For Users + +Linaria 8 updates the WyW toolchain (`@wyw-in-js/*`) to 2.x stable releases. This is a major release because WyW 2 changes the build-time evaluation pipeline and raises the minimum Node.js version. + +- Linaria 8 requires Node.js 22.12+ (aligned with the WyW 2 / Oxc dependency graph). +- The default evaluation mode is WyW's `eval.strategy: "hybrid"`. It resolves statically provable values first using Linaria processor static semantics, `staticBindings`, and statically resolvable imports, then falls back to the evaluator for values that cannot be proven statically. +- Top-level `evaluate` config should be migrated to `eval.strategy`. Use `execute` for evaluator-only compatibility, keep the default `hybrid` for static-first resolution with evaluator fallback, or use `static` to reject evaluator fallback. +- Babel config and Babel resolver plugins are no longer used as an implicit module-resolution fallback during WyW evaluation. If evaluated code imports aliased specifiers, move those aliases to WyW configuration with `eval.customResolver`, `eval.resolver`, or `staticBindings`. +- If your project relies on build-time side effects or on the exact order in which evaluated imports execute, compare the generated CSS/JS output after upgrading and use `eval.strategy: "execute"` where evaluator-only behavior is required. +- CSS rule emission order can change for cascade ties with identical specificity. WyW 2 uses the Oxc/static-first pipeline and can preserve or process imports differently, so make precedence explicit through selector specificity, composition, or source structure where order matters. +- Review https://wyw-in-js.dev/migration/v2 and https://wyw-in-js.dev/stability for the WyW 2 evaluation model, debugging notes, and performance guidance. + +Example evaluator-only compatibility config: + +```js +module.exports = { + eval: { + strategy: 'execute', + }, +}; +``` + +## For Custom Processor Developers + +Linaria processors now expose WyW 2 static evaluation semantics. Custom processors that integrate with WyW's static-first path should implement the optional static processor contract in `@wyw-in-js/processor-utils`; unresolved values can still fall back to the evaluator in `hybrid` mode. + # 7.x from 6.x ## For Users diff --git a/examples/astro-solid/package.json b/examples/astro-solid/package.json index fb582908a..a82e8ce12 100644 --- a/examples/astro-solid/package.json +++ b/examples/astro-solid/package.json @@ -8,7 +8,7 @@ "@astrojs/solid-js": "^1.2.3", "@babel/core": "^7.23.5", "@linaria/core": "workspace:^", - "@wyw-in-js/vite": "^1.0.6", + "@wyw-in-js/vite": "2.0.0", "astro": "^1.6.10", "solid-js": "^1.6.2", "vite": "^3", diff --git a/examples/esbuild/package.json b/examples/esbuild/package.json index 128314efa..4431f5e9d 100644 --- a/examples/esbuild/package.json +++ b/examples/esbuild/package.json @@ -7,7 +7,7 @@ "linaria-website": "workspace:^" }, "devDependencies": { - "@wyw-in-js/esbuild": "^1.0.6", + "@wyw-in-js/esbuild": "2.0.0", "esbuild": "^0.15.16" }, "scripts": { diff --git a/examples/rollup/package.json b/examples/rollup/package.json index 71637ec27..00f594943 100644 --- a/examples/rollup/package.json +++ b/examples/rollup/package.json @@ -13,7 +13,7 @@ "@rollup/plugin-commonjs": "^25.0.4", "@rollup/plugin-image": "^3.0.2", "@rollup/plugin-node-resolve": "^15.2.1", - "@wyw-in-js/rollup": "^1.0.6", + "@wyw-in-js/rollup": "2.0.0", "rollup": "^4.0.0", "rollup-plugin-css-only": "^4.3.0" }, diff --git a/examples/rollup/rollup.config.mjs b/examples/rollup/rollup.config.mjs index 814daa57f..2a23e6069 100644 --- a/examples/rollup/rollup.config.mjs +++ b/examples/rollup/rollup.config.mjs @@ -15,6 +15,14 @@ export default { image(), wyw({ sourceMap: process.env.NODE_ENV !== 'production', + eval: { + strategy: 'static', + }, + staticBindings: { + '../../assets/linaria-logomark.svg?url': { + default: '../../assets/linaria-logomark.svg', + }, + }, // Rollup can deadlock when WyW resolves imports during transform. serializeTransform: false, }), diff --git a/examples/vite/package.json b/examples/vite/package.json index 23fdfa197..d75059916 100644 --- a/examples/vite/package.json +++ b/examples/vite/package.json @@ -11,7 +11,7 @@ "devDependencies": { "@rollup/plugin-node-resolve": "^15.2.1", "@vitejs/plugin-react": "^2.1.0", - "@wyw-in-js/vite": "^1.0.6", + "@wyw-in-js/vite": "2.0.0", "vite": "^3.2.10" }, "scripts": { diff --git a/examples/vpssr-linaria-solid/package.json b/examples/vpssr-linaria-solid/package.json index 9d7a430ac..7219034d7 100644 --- a/examples/vpssr-linaria-solid/package.json +++ b/examples/vpssr-linaria-solid/package.json @@ -11,7 +11,7 @@ "license": "ISC", "dependencies": { "@linaria/core": "workspace:^", - "@wyw-in-js/vite": "^1.0.6", + "@wyw-in-js/vite": "2.0.0", "babel-preset-solid": "^1.6.2", "compression": "^1.7.4", "express": "^4.20.0", diff --git a/examples/webpack5/package.json b/examples/webpack5/package.json index 43b7fed1e..79c636220 100644 --- a/examples/webpack5/package.json +++ b/examples/webpack5/package.json @@ -9,7 +9,7 @@ }, "devDependencies": { "@babel/core": "^7.23.5", - "@wyw-in-js/webpack-loader": "^1.0.6", + "@wyw-in-js/webpack-loader": "2.0.0", "babel-loader": "^9.1.0", "cross-env": "^7.0.3", "css-hot-loader": "^1.4.4", diff --git a/jest.config.js b/jest.config.js index 1393034f5..64554dd3c 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,6 +1,12 @@ module.exports = { + cache: false, testEnvironment: 'node', collectCoverageFrom: ['src/*.ts'], - transformIgnorePatterns: ['node_modules/(?!@linaria)'], + transformIgnorePatterns: [ + 'node_modules/(?!.*(@linaria|@wyw-in-js|oxc-parser|oxc-resolver|oxc-transform|@oxc-project))', + ], + transform: { + '^.+\\.[tj]sx?$': ['babel-jest', { rootMode: 'upward' }], + }, testPathIgnorePatterns: ['/__utils__/'], }; diff --git a/package.json b/package.json index b170060ba..1f3c4202a 100644 --- a/package.json +++ b/package.json @@ -51,6 +51,8 @@ "@changesets/cli": "^2.22.0", "@commitlint/config-conventional": "^8.3.4", "@definitelytyped/dtslint": "^0.0.176", + "@emnapi/core": "^1.10.0", + "@emnapi/runtime": "^1.10.0", "@types/jest": "^28.1.0", "@types/node": "^17.0.39", "@types/resolve": "^1.20.6", @@ -82,7 +84,7 @@ "typescript": "^5.2.2" }, "engines": { - "node": ">=20.0.0", + "node": ">=22.12.0", "pnpm": "^9.0.0" }, "packageManager": "pnpm@9.15.9+sha256.cf86a7ad764406395d4286a6d09d730711720acc6d93e9dce9ac7ac4dc4a28a7" diff --git a/packages/atomic/package.json b/packages/atomic/package.json index 4afd275f6..383605a34 100644 --- a/packages/atomic/package.json +++ b/packages/atomic/package.json @@ -51,8 +51,8 @@ "dependencies": { "@linaria/core": "workspace:^", "@linaria/react": "workspace:^", - "@wyw-in-js/processor-utils": "^1.0.4", - "@wyw-in-js/shared": "^1.0.4", + "@wyw-in-js/processor-utils": "2.0.0", + "@wyw-in-js/shared": "2.0.0", "known-css-properties": "^0.24.0", "postcss": "^8.4.31", "stylis": "^4.3.0", @@ -72,7 +72,7 @@ } }, "engines": { - "node": ">=20.0.0" + "node": ">=22.12.0" }, "publishConfig": { "access": "public" diff --git a/packages/atomic/src/processors/css.ts b/packages/atomic/src/processors/css.ts index 4089a9567..881a52a4a 100644 --- a/packages/atomic/src/processors/css.ts +++ b/packages/atomic/src/processors/css.ts @@ -1,5 +1,8 @@ -import type { SourceLocation } from '@babel/types'; -import type { Rules, ValueCache } from '@wyw-in-js/processor-utils'; +import type { + Rules, + SourceLocation, + ValueCache, +} from '@wyw-in-js/processor-utils'; import { logger } from '@wyw-in-js/shared'; import CssProcessor from '@linaria/core/processors/css'; diff --git a/packages/atomic/src/processors/styled.ts b/packages/atomic/src/processors/styled.ts index e6d1af7e3..0225f3a3b 100644 --- a/packages/atomic/src/processors/styled.ts +++ b/packages/atomic/src/processors/styled.ts @@ -1,5 +1,8 @@ -import type { SourceLocation } from '@babel/types'; -import type { Rules, ValueCache } from '@wyw-in-js/processor-utils'; +import type { + Rules, + SourceLocation, + ValueCache, +} from '@wyw-in-js/processor-utils'; import { logger, hasEvalMeta } from '@wyw-in-js/shared'; import type { IProps } from '@linaria/react/processors/styled'; diff --git a/packages/core/package.json b/packages/core/package.json index a18e839e3..1638ab058 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -58,7 +58,7 @@ "watch": "pnpm build:dist --watch & pnpm build:declarations --watch" }, "dependencies": { - "@wyw-in-js/processor-utils": "^1.0.4" + "@wyw-in-js/processor-utils": "2.0.0" }, "devDependencies": { "@babel/traverse": "^7.23.5", @@ -68,7 +68,7 @@ "@types/node": "^17.0.39" }, "engines": { - "node": ">=20.0.0" + "node": ">=22.12.0" }, "publishConfig": { "access": "public" diff --git a/packages/core/src/processors/css.ts b/packages/core/src/processors/css.ts index 05b7ceae3..76c18ccef 100644 --- a/packages/core/src/processors/css.ts +++ b/packages/core/src/processors/css.ts @@ -1,7 +1,17 @@ -import type { SourceLocation, StringLiteral } from '@babel/types'; -import type { Rules, ValueCache } from '@wyw-in-js/processor-utils'; +import type { + Rules, + SourceLocation, + StringLiteral, + ValueCache, +} from '@wyw-in-js/processor-utils'; import { TaggedTemplateProcessor } from '@wyw-in-js/processor-utils'; +type StaticClassNameValue = { + className: string; + kind: 'class-name'; + value: string; +}; + export default class CssProcessor extends TaggedTemplateProcessor { public override get asSelector(): string { return this.className; @@ -48,4 +58,12 @@ export default class CssProcessor extends TaggedTemplateProcessor { return rules; } + + public getStaticValue(): StaticClassNameValue { + return { + className: this.className, + kind: 'class-name', + value: this.className, + }; + } } diff --git a/packages/interop/package.json b/packages/interop/package.json index d9c6340f9..8dbce9fa1 100644 --- a/packages/interop/package.json +++ b/packages/interop/package.json @@ -34,7 +34,7 @@ "dedent": "^1.5.1" }, "engines": { - "node": ">=20.0.0" + "node": ">=22.12.0" }, "publishConfig": { "access": "public" diff --git a/packages/linaria/package.json b/packages/linaria/package.json index 72881d9cc..aedae6b4e 100644 --- a/packages/linaria/package.json +++ b/packages/linaria/package.json @@ -50,7 +50,7 @@ "@linaria/server": "workspace:^" }, "engines": { - "node": ">=20.0.0" + "node": ">=22.12.0" }, "publishConfig": { "access": "public" diff --git a/packages/postcss-linaria/package.json b/packages/postcss-linaria/package.json index f2f8080d7..e790ad256 100644 --- a/packages/postcss-linaria/package.json +++ b/packages/postcss-linaria/package.json @@ -48,7 +48,7 @@ "postcss": "^8.4.31" }, "engines": { - "node": ">=20.0.0" + "node": ">=22.12.0" }, "publishConfig": { "access": "public" diff --git a/packages/react/package.json b/packages/react/package.json index b6cecd5f3..df983a2e8 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -60,8 +60,8 @@ "dependencies": { "@emotion/is-prop-valid": "^1.2.0", "@linaria/core": "workspace:^", - "@wyw-in-js/processor-utils": "^1.0.4", - "@wyw-in-js/shared": "^1.0.4", + "@wyw-in-js/processor-utils": "2.0.0", + "@wyw-in-js/shared": "2.0.0", "minimatch": "^9.0.3", "react-html-attributes": "^1.4.6", "resolve": "^1.22.8", @@ -79,7 +79,7 @@ "react": ">=16" }, "engines": { - "node": ">=20.0.0" + "node": ">=22.12.0" }, "publishConfig": { "access": "public" diff --git a/packages/react/src/processors/styled.ts b/packages/react/src/processors/styled.ts index bbe64de84..9c02f9d80 100644 --- a/packages/react/src/processors/styled.ts +++ b/packages/react/src/processors/styled.ts @@ -1,14 +1,6 @@ import { readFileSync } from 'fs'; import { dirname, join, posix } from 'path'; -import type { - CallExpression, - Expression, - ObjectExpression, - SourceLocation, - StringLiteral, - Identifier, -} from '@babel/types'; import { buildSlug, TaggedTemplateProcessor, @@ -16,8 +8,14 @@ import { toValidCSSIdentifier, } from '@wyw-in-js/processor-utils'; import type { + CallExpression, + Expression, + Identifier, + ObjectExpression, Params, Rules, + SourceLocation, + StringLiteral, TailProcessorParams, ValueCache, } from '@wyw-in-js/processor-utils'; @@ -48,7 +46,105 @@ export interface IProps { vars?: Record; } -const singleQuotedStringLiteral = (value: string): StringLiteral => ({ +type StaticSerializableValue = { + kind: 'serializable'; + value: unknown; +}; + +type StaticClassNameValue = { + className: string; + kind: 'class-name'; + value?: unknown; +}; + +type StaticSelectorChainValue = { + className: string; + kind: 'selector-chain'; + selectors: string[]; + value: StaticStyledValue; +}; + +type StaticOpaqueComponentValue = { + className?: string; + kind: 'opaque-component'; + value?: unknown; +}; + +type StaticRuntimeCallbackValue = { + kind: 'runtime-callback'; + value?: unknown; +}; + +type StaticUnresolvedValue = { + details?: Readonly>; + kind: 'unresolved'; + reason: string; +}; + +type StaticProcessorValue = + | StaticClassNameValue + | StaticOpaqueComponentValue + | StaticRuntimeCallbackValue + | StaticSelectorChainValue + | StaticSerializableValue + | StaticUnresolvedValue; + +type StaticStyledValue = { + __wyw_meta: { + className: string; + extends: StaticStyledValue | null; + }; + displayName: string; +}; + +type RawStringLiteral = StringLiteral & { + extra: { + raw: string; + rawValue: string; + }; +}; + +const staticClassSelector = (className: string): string => `.${className}`; + +const isStaticStyledValue = (value: unknown): value is StaticStyledValue => { + if (typeof value !== 'object' || value === null) { + return false; + } + + const meta = (value as { __wyw_meta?: unknown }).__wyw_meta; + return ( + typeof meta === 'object' && + meta !== null && + typeof (meta as { className?: unknown }).className === 'string' && + ('extends' in meta + ? (meta as { extends?: unknown }).extends === null || + isStaticStyledValue((meta as { extends?: unknown }).extends) + : false) + ); +}; + +const staticStyledValueFromProcessorValue = ( + value: StaticProcessorValue +): StaticStyledValue | null => + value.kind === 'selector-chain' && isStaticStyledValue(value.value) + ? value.value + : null; + +const staticSelectorsFromProcessorValue = ( + value: StaticProcessorValue +): string[] => { + if (value.kind === 'selector-chain') { + return value.selectors; + } + + if (value.kind === 'class-name') { + return [staticClassSelector(value.className)]; + } + + return []; +}; + +const singleQuotedStringLiteral = (value: string): RawStringLiteral => ({ type: 'StringLiteral', value, extra: { @@ -290,6 +386,54 @@ export default class StyledProcessor extends TaggedTemplateProcessor { return rules; } + public getStaticValue(): StaticProcessorValue { + if (typeof this.component !== 'string' && !this.component.nonLinaria) { + return { + details: { + component: this.component.source, + }, + kind: 'unresolved', + reason: 'styled-target-static-value-required', + }; + } + + return this.createStaticSelectorValue(null); + } + + // eslint-disable-next-line class-methods-use-this + public resolveStaticInterpolation( + _interpolation: unknown, + value: StaticProcessorValue + ): StaticProcessorValue | null { + const selectors = staticSelectorsFromProcessorValue(value); + if (selectors.length === 0) { + return null; + } + + return { + kind: 'serializable', + value: selectors.join(''), + }; + } + + public resolveStaticTagTarget( + target: StaticProcessorValue + ): StaticProcessorValue | null { + if ( + target.kind === 'opaque-component' || + target.kind === 'runtime-callback' + ) { + return this.createStaticSelectorValue(null); + } + + const extendsValue = staticStyledValueFromProcessorValue(target); + if (!extendsValue && target.kind !== 'class-name') { + return null; + } + + return this.createStaticSelectorValue(extendsValue); + } + public override toString(): string { const res = (arg: string) => `${this.tagSourceCode()}(${arg})\`…\``; @@ -304,6 +448,32 @@ export default class StyledProcessor extends TaggedTemplateProcessor { return res(this.component.source); } + protected createStaticSelectorValue( + extendsValue: StaticStyledValue | null + ): StaticSelectorChainValue { + const ownSelector = staticClassSelector(this.className); + const selectors = [ownSelector]; + let current = extendsValue; + + while (current) { + selectors.push(staticClassSelector(current.__wyw_meta.className)); + current = current.__wyw_meta.extends; + } + + return { + className: this.className, + kind: 'selector-chain', + selectors, + value: { + displayName: this.displayName, + __wyw_meta: { + className: this.className, + extends: extendsValue, + }, + }, + }; + } + protected getCustomVariableId( source: string, unit: string, diff --git a/packages/server/package.json b/packages/server/package.json index c3aaf145c..052907d57 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -37,7 +37,7 @@ "prettier": "^3.0.3" }, "engines": { - "node": ">=20.0.0" + "node": ">=22.12.0" }, "publishConfig": { "access": "public" diff --git a/packages/stylelint-config-standard-linaria/package.json b/packages/stylelint-config-standard-linaria/package.json index 30c1fed78..fac1d0f98 100644 --- a/packages/stylelint-config-standard-linaria/package.json +++ b/packages/stylelint-config-standard-linaria/package.json @@ -37,7 +37,7 @@ "stylelint-config-standard": "^28.0.0" }, "engines": { - "node": ">=20.0.0" + "node": ">=22.12.0" }, "publishConfig": { "access": "public" diff --git a/packages/stylelint/package.json b/packages/stylelint/package.json index 6a091cc33..c673e0c61 100644 --- a/packages/stylelint/package.json +++ b/packages/stylelint/package.json @@ -30,14 +30,14 @@ "watch": "pnpm build:lib --watch & pnpm build:esm --watch & pnpm build:declarations --watch" }, "dependencies": { - "@wyw-in-js/shared": "^1.0.4", - "@wyw-in-js/transform": "^1.0.6" + "@wyw-in-js/shared": "2.0.0", + "@wyw-in-js/transform": "2.0.2" }, "devDependencies": { "@types/node": "^17.0.39" }, "engines": { - "node": ">=20.0.0" + "node": ">=22.12.0" }, "publishConfig": { "access": "public" diff --git a/packages/testkit/jest.config.js b/packages/testkit/jest.config.js deleted file mode 100644 index e86e13bab..000000000 --- a/packages/testkit/jest.config.js +++ /dev/null @@ -1,5 +0,0 @@ -/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */ -module.exports = { - preset: 'ts-jest', - testEnvironment: 'node', -}; diff --git a/packages/testkit/package.json b/packages/testkit/package.json index 3ed1fc33c..ebb9daebe 100644 --- a/packages/testkit/package.json +++ b/packages/testkit/package.json @@ -17,7 +17,7 @@ "repository": "git@github.com:callstack/linaria.git", "license": "MIT", "scripts": { - "test": "jest --config ./jest.config.js --rootDir .", + "test": "jest --config ../../jest.config.js --rootDir .", "typecheck": "tsc --noEmit --composite false" }, "dependencies": { @@ -26,9 +26,9 @@ "@babel/traverse": "^7.23.5", "@linaria/react": "workspace:^", "@swc/core": "^1.3.20", - "@wyw-in-js/processor-utils": "^1.0.4", - "@wyw-in-js/shared": "^1.0.4", - "@wyw-in-js/transform": "^1.0.6", + "@wyw-in-js/processor-utils": "2.0.0", + "@wyw-in-js/shared": "2.0.0", + "@wyw-in-js/transform": "2.0.2", "debug": "^4.3.4", "dedent": "^1.5.1", "esbuild": "^0.15.16", @@ -56,7 +56,7 @@ "ts-jest": "^29.1.1" }, "engines": { - "node": ">=20.0.0" + "node": ">=22.12.0" }, "publishConfig": { "access": "public" diff --git a/packages/testkit/src/__fixtures__/assignToExport.js b/packages/testkit/src/__fixtures__/assignToExport.js index 8843e09e9..99de2e484 100644 --- a/packages/testkit/src/__fixtures__/assignToExport.js +++ b/packages/testkit/src/__fixtures__/assignToExport.js @@ -1 +1 @@ -var Padding = (exports.Padding = 4); +export const Padding = 4; diff --git a/packages/testkit/src/__fixtures__/foo-static.js b/packages/testkit/src/__fixtures__/foo-static.js new file mode 100644 index 000000000..145504ab4 --- /dev/null +++ b/packages/testkit/src/__fixtures__/foo-static.js @@ -0,0 +1,2 @@ +export const foo1 = 'foo1'; +export const foo2 = 'foo2'; diff --git a/packages/testkit/src/__fixtures__/objectExport.js b/packages/testkit/src/__fixtures__/objectExport.js index d1070862d..054ff4df2 100644 --- a/packages/testkit/src/__fixtures__/objectExport.js +++ b/packages/testkit/src/__fixtures__/objectExport.js @@ -1,3 +1,3 @@ -module.exports = { +export default { margin: 5, }; diff --git a/packages/testkit/src/__fixtures__/re-exports/empty.js b/packages/testkit/src/__fixtures__/re-exports/empty.js index cb0ff5c3b..1ad7fb5ca 100644 --- a/packages/testkit/src/__fixtures__/re-exports/empty.js +++ b/packages/testkit/src/__fixtures__/re-exports/empty.js @@ -1 +1 @@ -export {}; +export const unused = 'unused'; diff --git a/packages/testkit/src/__fixtures__/sample-script.js b/packages/testkit/src/__fixtures__/sample-script.js index 888cae37a..7a4e8a723 100644 --- a/packages/testkit/src/__fixtures__/sample-script.js +++ b/packages/testkit/src/__fixtures__/sample-script.js @@ -1 +1 @@ -module.exports = 42; +export default 42; diff --git a/packages/testkit/src/__fixtures__/with-babelrc/.babelrc.js b/packages/testkit/src/__fixtures__/with-babelrc/.babelrc.js deleted file mode 100644 index a4531949f..000000000 --- a/packages/testkit/src/__fixtures__/with-babelrc/.babelrc.js +++ /dev/null @@ -1,14 +0,0 @@ -const path = require('path'); - -module.exports = { - "plugins": [ - [ - "module-resolver", - { - "alias": { - "_": "./src/__fixtures__" - } - } - ] - ] -} diff --git a/packages/testkit/src/__fixtures__/with-babelrc/wyw-in-js.config.cjs b/packages/testkit/src/__fixtures__/with-babelrc/wyw-in-js.config.cjs new file mode 100644 index 000000000..d7877ca5e --- /dev/null +++ b/packages/testkit/src/__fixtures__/with-babelrc/wyw-in-js.config.cjs @@ -0,0 +1,16 @@ +const path = require('path'); + +module.exports = { + eval: { + resolver: 'hybrid', + customResolver(specifier) { + if (!specifier.startsWith('_/')) { + return Promise.resolve(null); + } + + return Promise.resolve({ + id: require.resolve(path.resolve(__dirname, '..', specifier.slice(2))), + }); + }, + }, +}; diff --git a/packages/testkit/src/__snapshots__/babel.test.ts.snap b/packages/testkit/src/__snapshots__/babel.test.ts.snap index f8126e167..bc7c0e32d 100644 --- a/packages/testkit/src/__snapshots__/babel.test.ts.snap +++ b/packages/testkit/src/__snapshots__/babel.test.ts.snap @@ -49,7 +49,7 @@ exports[`strategy shaker cache should use cached value 2`] = ` CSS: -.text_t13jq05 {font-size: cached-foo1} +.text_t13jq05 {font-size: foo1} Dependencies: ./__fixtures__/foo-nonstatic @@ -61,7 +61,7 @@ exports[`strategy shaker cache should use cached value even if only part is requ CSS: -.text_t13jq05 {font-size: cached-foo1} +.text_t13jq05 {font-size: foo1} Dependencies: ./__fixtures__/foo-nonstatic @@ -195,8 +195,8 @@ exports[`strategy shaker compiles atomic styled with dynamic interpolations as u "/* @flow */ import { styled } from '@linaria/atomic'; -const _exp2 = () => props => props.color; -const _exp3 = () => props => props.backgroundColor; +const _exp2 = () => (props => props.color); +const _exp3 = () => (props => props.backgroundColor); const Component = /*#__PURE__*/styled('div')({ name: "Component", class: "atm_7l_15g95l5 atm_4b_15g95l5 atm_2d_1en4k16 Component_c13jq05", @@ -207,8 +207,8 @@ const Component = /*#__PURE__*/styled('div')({ }, atomic: true }); -const _exp4 = () => props => props.color; -const _exp5 = () => props => props.color || "black"; +const _exp4 = () => (props => props.color); +const _exp5 = () => (props => props.color || "black"); const Component2 = /*#__PURE__*/styled('div')({ name: "Component2", class: "atm_7l_15g95l5 atm_4b_1kgl01d Component2_c1vhermz", @@ -239,7 +239,7 @@ exports[`strategy shaker compiles atomic styled with plain css, static and dynam "/* @flow */ import { styled } from '@linaria/atomic'; -const _exp2 = () => props => props.color; +const _exp2 = () => (props => props.color); const Component = /*#__PURE__*/styled('div')({ name: "Component", class: "atm_7l_13q2bts atm_e2_12xxubj atm_gi_12am3vd atm_2d_15g95l5 Component_c13jq05", @@ -329,7 +329,7 @@ const Component = /*#__PURE__*/styled('div')({ propsAsIs: false, atomic: true }); -const _exp = () => Component; +const _exp = () => (Component); const ComponentCompositing = /*#__PURE__*/styled(_exp())({ name: "ComponentCompositing", class: "atm_26_5scuol atm_e2_1nzxncv ComponentCompositing_c1vhermz", @@ -357,7 +357,7 @@ exports[`strategy shaker compiles atoms that are shared between css and styled t import { styled } from '@linaria/atomic'; const x = "atm_26_5scuol atm_e2_12xxubj"; -const _exp2 = () => props => props.color; +const _exp2 = () => (props => props.color); const Component = /*#__PURE__*/styled('div')({ name: "Component", class: "atm_26_5scuol atm_e2_12xxubj atm_gi_19bvopo atm_7l_15g95l5 Component_c1vhermz", @@ -583,8 +583,8 @@ exports[`strategy shaker do not include in dependencies expressions from interpo "import { styled } from '@linaria/react'; import constant from './broken-dependency-1'; import modifier from './broken-dependency-2'; -const _exp = () => props => props.size + constant; -const _exp2 = () => props => modifier(props.size); +const _exp = () => (props => props.size + constant); +const _exp2 = () => (props => modifier(props.size)); export const Box = /*#__PURE__*/styled('div')({ name: "Box", class: "Box_b13jq05", @@ -799,7 +799,7 @@ Dependencies: ./__fixtures__/re-exports exports[`strategy shaker evaluates complex styles with functions and nested selectors 1`] = ` "export const bareIconClass = "bareIconClass_b13jq05"; export const SIZES = { - XS: "XS_x1vhermz" + XS: "XS_x1vhermz", };" `; @@ -815,9 +815,7 @@ Dependencies: NA `; exports[`strategy shaker evaluates component interpolations 1`] = ` -"const { - styled -} = require('@linaria/react'); +"const { styled } = require('@linaria/react'); export const Title = /*#__PURE__*/styled('h1')({ name: "Title", class: "Title_t13jq05", @@ -851,7 +849,7 @@ exports[`strategy shaker evaluates dependencies with sequence expression 1`] = ` "import { styled } from '@linaria/react'; let external = 0; const color = (external, () => 'blue'); -const _exp = () => color; +const _exp = () => (color); export const Title = /*#__PURE__*/styled('h1')({ name: "Title", class: "Title_t13jq05", @@ -987,7 +985,7 @@ Dependencies: ./__fixtures__/enums exports[`strategy shaker evaluates interpolations with sequence expression 1`] = ` "import { styled } from '@linaria/react'; -const _exp = () => (0, () => "blue"); +const _exp = () => ((0, () => "blue")); export const Title = /*#__PURE__*/styled('h1')({ name: "Title", class: "Title_t13jq05", @@ -1078,7 +1076,7 @@ Dependencies: NA exports[`strategy shaker evaluates typescript enums 1`] = ` "import { styled } from '@linaria/react'; enum Colors { - BLUE = '#27509A', + BLUE = '#27509A' } export const Title = /*#__PURE__*/styled('h1')({ name: "Title", @@ -1263,7 +1261,7 @@ Dependencies: NA exports[`strategy shaker handles dashes in variableNameConfig 1`] = ` "import { styled as atomicStyled } from '@linaria/atomic'; import { styled } from '@linaria/react'; -const _exp = () => props => props.size; +const _exp = () => (props => props.size); export const Title = /*#__PURE__*/styled('h1')({ name: "Title", class: "Title_t13jq05", @@ -1272,7 +1270,7 @@ export const Title = /*#__PURE__*/styled('h1')({ "t13jq05-0": [_exp(), "px"] } }); -const _exp2 = () => props => props.size; +const _exp2 = () => (props => props.size); export const Body = /*#__PURE__*/atomicStyled('h1')({ name: "Body", class: "atm_c8_trva6l Body_b1vhermz", @@ -1342,7 +1340,7 @@ Dependencies: NA exports[`strategy shaker handles fn passed in variableNameSlug 1`] = ` "import { styled as atomicStyled } from '@linaria/atomic'; import { styled } from '@linaria/react'; -const _exp = () => props => props.size; +const _exp = () => (props => props.size); export const Title = /*#__PURE__*/styled('h1')({ name: "Title", class: "Title_t13jq05", @@ -1351,7 +1349,7 @@ export const Title = /*#__PURE__*/styled('h1')({ "_qqvhyq__Title__font-size": [_exp(), "px"] } }); -const _exp2 = () => props => props.size; +const _exp2 = () => (props => props.size); export const Body = /*#__PURE__*/atomicStyled('h1')({ name: "Body", class: "atm_c8_f3y1j4 Body_b1vhermz", @@ -1377,16 +1375,14 @@ Dependencies: NA `; exports[`strategy shaker handles indirect wrapping another styled component 1`] = ` -"const { - styled -} = require('@linaria/react'); +"const { styled } = require('@linaria/react'); const Title = /*#__PURE__*/styled('h1')({ name: "Title", class: "Title_t13jq05", propsAsIs: false }); const hoc = Cmp => Cmp; -const _exp = () => hoc(Title); +const _exp = () => (hoc(Title)); export const CustomTitle = /*#__PURE__*/styled(_exp())({ name: "CustomTitle", class: "CustomTitle_c1vhermz", @@ -1415,21 +1411,13 @@ exports[`strategy shaker handles interpolation followed by unit 1`] = ` const size = () => 100; const shadow = () => 5; const unit = () => 1; -const _exp = () => size; -const _exp2 = () => shadow; -const _exp3 = () => size; -const _exp4 = () => props => props.width; -const _exp5 = () => props => { - if (true) { - return props.height; - } else { - return 200; - } -}; -const _exp7 = () => unit; -const _exp8 = () => function (props) { - return 200; -}; +const _exp = () => (size); +const _exp2 = () => (shadow); +const _exp3 = () => (size); +const _exp4 = () => (props => props.width); +const _exp5 = () => (props => { if (true) { return props.height; } else { return 200; } }); +const _exp7 = () => (unit); +const _exp8 = () => (function(props) { return 200; }); export const Title = /*#__PURE__*/styled('h1')({ name: "Title", class: "Title_t13jq05", @@ -1467,7 +1455,7 @@ Dependencies: NA exports[`strategy shaker handles interpolation in css function followed by unit 1`] = ` "import { styled } from '@linaria/atomic'; -const _exp = () => props => props.$rotateDeg; +const _exp = () => (props => props.$rotateDeg); export const Container = /*#__PURE__*/styled('div')({ name: "Container", class: "atm_tr_18309cv atm_vy_uuw12j Container_c13jq05", @@ -1493,7 +1481,7 @@ Dependencies: NA exports[`strategy shaker handles nested blocks 1`] = ` "import { styled } from '@linaria/react'; const regular = () => "arial"; -const _exp = () => regular; +const _exp = () => (regular); export const Button = /*#__PURE__*/styled('button')({ name: "Button", class: "Button_b13jq05", @@ -1528,7 +1516,7 @@ exports[`strategy shaker handles objects with enums as keys 1`] = ` "import { TestEnum } from './__fixtures__/ts-data.ts'; export const object = { [TestEnum.FirstValue]: "TestEnum_FirstValue_t9vkbjs", - [TestEnum.SecondValue]: "TestEnum_SecondValue_t17e3x2d" + [TestEnum.SecondValue]: "TestEnum_SecondValue_t17e3x2d", };" `; @@ -1546,7 +1534,7 @@ Dependencies: NA exports[`strategy shaker handles objects with numeric keys 1`] = ` "export const object = { stringKey: "stringKey_s13jq05", - 42: "_2__1vhermz" + 42: "_2__1vhermz", };" `; @@ -1564,7 +1552,7 @@ Dependencies: NA exports[`strategy shaker handles raw in variableNameConfig 1`] = ` "import { styled as atomicStyled } from '@linaria/atomic'; import { styled } from '@linaria/react'; -const _exp = () => props => props.size; +const _exp = () => (props => props.size); export const Title = /*#__PURE__*/styled('h1')({ name: "Title", class: "Title_t13jq05", @@ -1573,7 +1561,7 @@ export const Title = /*#__PURE__*/styled('h1')({ "t13jq05-0": [_exp(), "px"] } }); -const _exp2 = () => props => props.size; +const _exp2 = () => (props => props.size); export const Body = /*#__PURE__*/atomicStyled('h1')({ name: "Body", class: "atm_c8_1s69o7d Body_b1vhermz", @@ -1601,7 +1589,7 @@ Dependencies: NA exports[`strategy shaker handles val in variableNameConfig 1`] = ` "import { styled as atomicStyled } from '@linaria/atomic'; import { styled } from '@linaria/react'; -const _exp = () => props => props.size; +const _exp = () => (props => props.size); export const Title = /*#__PURE__*/styled('h1')({ name: "Title", class: "Title_t13jq05", @@ -1610,7 +1598,7 @@ export const Title = /*#__PURE__*/styled('h1')({ "t13jq05-0": [_exp(), "px"] } }); -const _exp2 = () => props => props.size; +const _exp2 = () => (props => props.size); export const Body = /*#__PURE__*/atomicStyled('h1')({ name: "Body", class: "atm_c8_1g7eom2 Body_b1vhermz", @@ -1636,21 +1624,19 @@ Dependencies: NA `; exports[`strategy shaker handles wrapping another styled component 1`] = ` -"const { - styled -} = require('@linaria/react'); +"const { styled } = require('@linaria/react'); const Title = /*#__PURE__*/styled('h1')({ name: "Title", class: "Title_t13jq05", propsAsIs: false }); -const _exp = () => Title; +const _exp = () => (Title); export const BlueTitle = /*#__PURE__*/styled(_exp())({ name: "BlueTitle", class: "BlueTitle_b1vhermz", propsAsIs: true }); -const _exp2 = () => BlueTitle; +const _exp2 = () => (BlueTitle); export const GreenTitle = /*#__PURE__*/styled(_exp2())({ name: "GreenTitle", class: "GreenTitle_g1egpet8", @@ -1703,7 +1689,7 @@ Dependencies: NA exports[`strategy shaker ignores external expressions 1`] = ` "import { styled } from '@linaria/react'; const generate = props => props.content; -const _exp = () => generate; +const _exp = () => (generate); export const Title = /*#__PURE__*/styled('h1')({ name: "Title", class: "Title_t13jq05", @@ -1730,7 +1716,7 @@ Dependencies: NA exports[`strategy shaker ignores inline arrow function expressions 1`] = ` "import { styled } from '@linaria/react'; -const _exp = () => props => props.content; +const _exp = () => (props => props.content); export const Title = /*#__PURE__*/styled('h1')({ name: "Title", class: "Title_t13jq05", @@ -1757,9 +1743,7 @@ Dependencies: NA exports[`strategy shaker ignores inline vanilla function expressions 1`] = ` "import { styled } from '@linaria/react'; -const _exp = () => function (props) { - return props.content; -}; +const _exp = () => (function(props) { return props.content; }); export const Title = /*#__PURE__*/styled('h1')({ name: "Title", class: "Title_t13jq05", @@ -1960,8 +1944,8 @@ exports[`strategy shaker non-hoistable identifiers 1`] = ` exports[`strategy shaker outputs valid CSS classname 1`] = ` "import { styled } from '@linaria/react'; export const ΩPage$Title = /*#__PURE__*/styled('h1')({ - name: "\\u03A9Page$Title", - class: "\\u03A9Page_Title_\\u03C913jq05", + name: "ΩPage$Title", + class: "ΩPage_Title_ω13jq05", propsAsIs: false });" `; @@ -1982,8 +1966,8 @@ exports[`strategy shaker prevents class name collision 1`] = ` "import { styled } from '@linaria/react'; const size = () => 100; const regular = () => "arial"; -const _exp = () => size; -const _exp2 = () => props => props.color; +const _exp = () => (size); +const _exp2 = () => (props => props.color); export const Title = /*#__PURE__*/styled('h1')({ name: "Title", class: "Title_twgemqq", @@ -1993,7 +1977,7 @@ export const Title = /*#__PURE__*/styled('h1')({ "twgemqq-1": [_exp2()] } }); -const _exp3 = () => regular; +const _exp3 = () => (regular); export function Something() { const Title = /*#__PURE__*/styled('h1')({ name: "Title", @@ -2044,7 +2028,7 @@ Dependencies: NA `; -exports[`strategy shaker respects module-resolver plugin and don't show waring 1`] = ` +exports[`strategy shaker respects explicit wyw config file custom resolver 1`] = ` "import { styled } from '@linaria/react'; export const H1 = /*#__PURE__*/styled('h1')({ name: "H1", @@ -2053,7 +2037,7 @@ export const H1 = /*#__PURE__*/styled('h1')({ });" `; -exports[`strategy shaker respects module-resolver plugin and don't show waring 2`] = ` +exports[`strategy shaker respects explicit wyw config file custom resolver 2`] = ` CSS: @@ -2061,11 +2045,11 @@ CSS: color: foo; } -Dependencies: ../re-exports +Dependencies: _/re-exports `; -exports[`strategy shaker respects module-resolver plugin and show waring 1`] = ` +exports[`strategy shaker respects inline hybrid custom resolver without config file fallback 1`] = ` "import { styled } from '@linaria/react'; export const H1 = /*#__PURE__*/styled('h1')({ name: "H1", @@ -2074,7 +2058,7 @@ export const H1 = /*#__PURE__*/styled('h1')({ });" `; -exports[`strategy shaker respects module-resolver plugin and show waring 2`] = ` +exports[`strategy shaker respects inline hybrid custom resolver without config file fallback 2`] = ` CSS: @@ -2082,7 +2066,7 @@ CSS: color: foo; } -Dependencies: ../re-exports +Dependencies: _/re-exports `; @@ -2117,7 +2101,7 @@ Dependencies: NA exports[`strategy shaker should eval component from a linaria library 1`] = ` "import { styled } from "@linaria/react"; import { Title } from "./__fixtures__/linaria-ui-library/components/index"; -const _exp = () => Title; +const _exp = () => (Title); export const StyledTitle = /*#__PURE__*/styled(_exp())({ name: "StyledTitle", class: "StyledTitle_s13jq05", @@ -2139,7 +2123,7 @@ exports[`strategy shaker should eval wrapped component from a linaria library 1` "import { styled } from "@linaria/react"; import { connect } from "./__fixtures__/linaria-ui-library/hocs"; import { Title } from "./__fixtures__/linaria-ui-library/components/index"; -const _exp = () => connect(Title); +const _exp = () => (connect(Title)); export const StyledTitle = /*#__PURE__*/styled(_exp())({ name: "StyledTitle", class: "StyledTitle_s13jq05", @@ -2195,7 +2179,7 @@ exports[`strategy shaker should import react as namespace 1`] = ` "import { styled } from "@linaria/react"; import * as React from "react"; const Cmp = React.memo(() => null); -const _exp = () => Cmp; +const _exp = () => (Cmp); export const StyledTitle = /*#__PURE__*/styled(_exp())({ name: "StyledTitle", class: "StyledTitle_s13jq05", @@ -2209,7 +2193,7 @@ CSS: .StyledTitle_s13jq05 {} -Dependencies: react +Dependencies: NA `; @@ -2264,7 +2248,7 @@ Dependencies: ./__fixtures__/reexports exports[`strategy shaker should not eval components from a non-linaria library 1`] = ` "import { styled } from "@linaria/react"; import { Title } from "./__fixtures__/non-linaria-ui-library/index"; -const _exp = () => Title; +const _exp = () => (Title); export const StyledTitle = /*#__PURE__*/styled(_exp())({ name: "StyledTitle", class: "StyledTitle_s13jq05", @@ -2285,7 +2269,7 @@ Dependencies: NA exports[`strategy shaker should not eval non-linaria component from a linaria library 1`] = ` "import { styled } from "@linaria/react"; import { Title } from "./__fixtures__/linaria-ui-library/non-linaria-components"; -const _exp = () => Title; +const _exp = () => (Title); export const StyledTitle = /*#__PURE__*/styled(_exp())({ name: "StyledTitle", class: "StyledTitle_s13jq05", @@ -2307,7 +2291,7 @@ exports[`strategy shaker should not eval wrapped component from a non-linaria li "import { styled } from "@linaria/react"; import { connect } from "./__fixtures__/linaria-ui-library/hocs"; import { Title } from "./__fixtures__/non-linaria-ui-library/index"; -const _exp = () => connect(Title); +const _exp = () => (connect(Title)); export const StyledTitle = /*#__PURE__*/styled(_exp())({ name: "StyledTitle", class: "StyledTitle_s13jq05", @@ -2329,19 +2313,14 @@ exports[`strategy shaker should not import types 1`] = ` "import { styled } from "@linaria/react"; import { Title } from "./__fixtures__/linaria-ui-library/components/index"; import { ComponentType } from "./__fixtures__/linaria-ui-library/types"; -const map = new Map().set('Title', Title); -const Gate = (props: { - type: ComponentType; - className: string; -}) => { - const { - className, - type - } = props; +const map = new Map() + .set('Title', Title); +const Gate = (props: { type: ComponentType, className: string }) => { + const { className, type } = props; const Component = map.get(type); - return ; + return ; }; -const _exp = () => Gate; +const _exp = () => (Gate); export const StyledTitle = /*#__PURE__*/styled(_exp())({ name: "StyledTitle", class: "StyledTitle_s18alru3", @@ -2364,7 +2343,7 @@ exports[`strategy shaker should process \`css\` calls inside components 1`] = ` export function Component() { const className = "className_c13jq05"; return React.createElement("div", { - className + className: className }); }" `; @@ -2388,9 +2367,14 @@ export function Component() { const inner = "inner_i1vhermz"; return React.createElement("div", { className: outer - }, "outer", React.createElement("div", { - className: inner - }, "inner")); + }, + "outer", + React.createElement("div", { + className: inner + }, + "inner" + ) + ); }" `; @@ -2415,9 +2399,9 @@ Dependencies: NA exports[`strategy shaker should process \`css\` calls with complex interpolation inside components 1`] = ` "import React from 'react'; export function Component() { - const className = "className_c1vhermz"; + const className = "className_c1egpet8"; return React.createElement("div", { - className + className: className }); }" `; @@ -2429,7 +2413,10 @@ CSS: .cell_c13jq05 { opacity: 0; } -.className_c1vhermz { +.cell_c1vhermz { + opacity: 0; + } +.className_c1egpet8 { opacity: 0.5; font-size: 42 font-size: 42 @@ -2470,11 +2457,11 @@ Dependencies: NA exports[`strategy shaker should process \`styled\` calls with complex interpolation inside components 1`] = ` "import React from 'react'; -import { styled } from '@linaria/react'; +import {styled} from '@linaria/react'; export function Component() { const MyComponent = /*#__PURE__*/styled('h1')({ name: "MyComponent", - class: "MyComponent_m1egpet8", + class: "MyComponent_mvc9xb3", propsAsIs: false }); return React.createElement(MyComponent); @@ -2491,7 +2478,10 @@ CSS: .cell_c1vhermz { opacity: 0; } -.MyComponent_m1egpet8 { +.cell_c1egpet8 { + opacity: 0; + } +.MyComponent_mvc9xb3 { opacity: 0.5; &:hover .cell_c1vhermz { @@ -2560,7 +2550,9 @@ Dependencies: ./__fixtures__/module-reexport `; exports[`strategy shaker should process unary expressions in interpolation 1`] = ` -"export const class1 = "class1_c13jq05"; +"let size = 1337; +size += 0; +export const class1 = "class1_c13jq05"; export const class2 = "class2_c1vhermz";" `; @@ -2585,7 +2577,7 @@ const Editor = () => { const initial: IModel = {}; return
; }; -const _exp = () => Editor; +const _exp = () => (Editor); export const StyledEditor = /*#__PURE__*/styled(_exp())({ name: "StyledEditor", class: "StyledEditor_s18alru3", @@ -2678,7 +2670,7 @@ CSS: } } -Dependencies: ./__fixtures__/complex-component +Dependencies: ./__fixtures__/complex-component, ./__fixtures__/complex-component `; @@ -2700,12 +2692,12 @@ exports[`strategy shaker should wrap memoized components 1`] = ` "import React from 'react'; import { styled } from '@linaria/react'; const MyComponent = React.memo(() =>
); -const _exp = () => MyComponent; +const _exp = () => (MyComponent); export default /*#__PURE__*/styled(_exp())({ name: "source0", class: "source0_swgemqq", propsAsIs: true -});" +})" `; exports[`strategy shaker should wrap memoized components 2`] = ` @@ -2716,7 +2708,7 @@ CSS: color: red; } -Dependencies: react +Dependencies: NA `; @@ -2724,28 +2716,28 @@ exports[`strategy shaker simplifies react components 1`] = ` "import React from 'react'; import { styled } from '@linaria/react'; import constant from './broken-dependency'; -const FuncComponent = props =>
{props.children + constant}
; +const FuncComponent = (props) =>
{props.children + constant}
; class ClassComponent extends React.PureComponent { method() { - return constant; + return constant; } render() { - return
{props.children + constant}
; + return
{props.children + constant}
; } } -const ComplexFunctionComponent = props => { +const ComplexFunctionComponent = (props) => { if (import.meta.env.PROD) { return
{props.children + constant}
; } return null; }; -const _exp = () => FuncComponent; +const _exp = () => (FuncComponent); export const StyledFunc = /*#__PURE__*/styled(_exp())({ name: "StyledFunc", class: "StyledFunc_swgemqq", propsAsIs: true }); -const _exp2 = () => ClassComponent; +const _exp2 = () => (ClassComponent); export const StyledClass = /*#__PURE__*/styled(_exp2())({ name: "StyledClass", class: "StyledClass_sjtmpns", @@ -2777,7 +2769,7 @@ import constant from './broken-dependency'; const A = () => ReactNS.createElement('div', {}, constant); const B = () => createElement(A, {}, constant); const C = () => React.createElement(FuncComponent, {}, constant); -const _exp = () => C; +const _exp = () => (C); export const D = /*#__PURE__*/styled(_exp())({ name: "D", class: "D_dwgemqq", @@ -2805,7 +2797,7 @@ var constant = require('./broken-dependency').default; const A = () => React.createElement('div', {}, constant); const B = () => React.createElement(A, {}, constant); const C = () => React.createElement(FuncComponent, {}, constant); -const _exp = () => C; +const _exp = () => (C); exports.D = /*#__PURE__*/styled(_exp())({ name: "source0", class: "source0_swgemqq", @@ -2984,7 +2976,7 @@ const StyledComponent = /*#__PURE__*/reactStyled('div')({ class: "StyledComponent_s13jq05", propsAsIs: false }); -const _exp = () => StyledComponent; +const _exp = () => (StyledComponent); const StyledComponent2 = /*#__PURE__*/reactStyled(_exp())({ name: "StyledComponent2", class: "StyledComponent2_s1vhermz", @@ -2996,7 +2988,7 @@ const AtomicComponent = /*#__PURE__*/atomicStyled('div')({ propsAsIs: false, atomic: true }); -const _exp2 = () => AtomicComponent; +const _exp2 = () => (AtomicComponent); const AtomicComponent2 = /*#__PURE__*/atomicStyled(_exp2())({ name: "AtomicComponent2", class: "atm_26_13q2bts AtomicComponent2_avc9xb3", @@ -3046,11 +3038,8 @@ Dependencies: NA exports[`strategy shaker transpiles styled template literal with TS component 1`] = ` "import { styled } from '@linaria/react'; -type Props = { - className?: string; - children?: React.ReactNode; -}; -export const Title = /*#__PURE__*/styled(() => {})({ +type Props = { className?: string; children?: React.ReactNode }; +export const Title = /*#__PURE__*/styled(() => { })({ name: "Title", class: "Title_t9vkbjs", propsAsIs: true @@ -3072,7 +3061,7 @@ Dependencies: NA exports[`strategy shaker transpiles styled template literal with function and component 1`] = ` "import { styled } from '@linaria/react'; const Heading = () => null; -const _exp = () => Heading; +const _exp = () => (Heading); export const Title = /*#__PURE__*/styled(_exp())({ name: "Title", class: "Title_t13jq05", @@ -3136,11 +3125,8 @@ Dependencies: NA exports[`strategy shaker transpiles with typed fn as interpolated value 1`] = ` "import { styled } from '@linaria/react'; -type Props = { - className?: string; - children?: React.ReactNode; -}; -const _exp = () => (props: Props) => props.className; +type Props = { className?: string; children?: React.ReactNode }; +const _exp = () => ((props: Props) => props.className); export const Title = /*#__PURE__*/styled('div')({ name: "Title", class: "Title_t9vkbjs", @@ -3166,8 +3152,8 @@ Dependencies: NA exports[`strategy shaker understands satisfies keyword 1`] = ` "interface ColorTokenMap { - primary: string; - secondary: string; + primary: string + secondary: string } export const text = "text_t9vkbjs";" `; @@ -3208,7 +3194,7 @@ Dependencies: NA exports[`strategy shaker uses string passed in variableNameSlug 1`] = ` "import { styled as atomicStyled } from '@linaria/atomic'; import { styled } from '@linaria/react'; -const _exp = () => props => props.size; +const _exp = () => (props => props.size); export const Title = /*#__PURE__*/styled('h1')({ name: "Title", class: "Title_t13jq05", @@ -3217,7 +3203,7 @@ export const Title = /*#__PURE__*/styled('h1')({ "Title_t13jq05_StyledProcessor_1qqvhyq_0": [_exp(), "px"] } }); -const _exp2 = () => props => props.size; +const _exp2 = () => (props => props.size); export const Body = /*#__PURE__*/atomicStyled('h1')({ name: "Body", class: "atm_c8_1cjuufw Body_b1vhermz", @@ -3244,7 +3230,7 @@ Dependencies: NA exports[`strategy shaker uses the same custom property for the same expression 1`] = ` "import { styled } from '@linaria/react'; -const _exp2 = () => props => props.size; +const _exp2 = () => (props => props.size); export const Box = /*#__PURE__*/styled('div')({ name: "Box", class: "Box_b13jq05", @@ -3271,7 +3257,7 @@ Dependencies: NA exports[`strategy shaker uses the same custom property for the same identifier 1`] = ` "import { styled } from '@linaria/react'; const size = () => 100; -const _exp2 = () => size; +const _exp2 = () => (size); export const Box = /*#__PURE__*/styled('div')({ name: "Box", class: "Box_b13jq05", diff --git a/packages/testkit/src/__utils__/linaria-snapshot-serializer.ts b/packages/testkit/src/__utils__/linaria-snapshot-serializer.ts index 9c4851c51..28c78c273 100644 --- a/packages/testkit/src/__utils__/linaria-snapshot-serializer.ts +++ b/packages/testkit/src/__utils__/linaria-snapshot-serializer.ts @@ -1,3 +1,5 @@ +import { extname, relative, resolve } from 'path'; + import type { WYWTransformMetadata } from '@wyw-in-js/transform'; import { withTransformMetadata } from '@wyw-in-js/transform'; @@ -6,6 +8,24 @@ type Serializer = { test: (value: unknown) => value is T; }; +const fixturesRoot = resolve(__dirname, '..'); + +const formatDependency = (dependency: string): string => { + if (!dependency.startsWith(fixturesRoot)) { + return dependency; + } + + const relativeDependency = `./${relative(fixturesRoot, dependency).replace( + /\\/g, + '/' + )}`; + const extension = extname(relativeDependency); + + return extension === '.js' + ? relativeDependency.slice(0, -extension.length) + : relativeDependency; +}; + export default { test: withTransformMetadata, serialize: ({ wywInJS }) => ` @@ -20,7 +40,9 @@ ${Object.keys(wywInJS.rules ?? {}) .join('\n')} Dependencies: ${ - wywInJS.dependencies?.length ? wywInJS.dependencies.join(', ') : 'NA' + wywInJS.dependencies?.length + ? wywInJS.dependencies.map(formatDependency).join(', ') + : 'NA' } `, } as Serializer<{ wywInJS: WYWTransformMetadata & { rules?: any } }>; diff --git a/packages/testkit/src/babel.test.ts b/packages/testkit/src/babel.test.ts index 6958e6ed4..e8992c06c 100644 --- a/packages/testkit/src/babel.test.ts +++ b/packages/testkit/src/babel.test.ts @@ -4,10 +4,10 @@ import { stripVTControlCharacters as stripAnsi } from 'node:util'; import { dirname, join, resolve, sep } from 'path'; import * as babel from '@babel/core'; -import type { PluginItem } from '@babel/core'; import { logger } from '@wyw-in-js/shared'; import type { Evaluator, FeatureFlags } from '@wyw-in-js/shared'; import { + disposeEvalBroker, Entrypoint, EventEmitter, TransformCacheCollection, @@ -17,9 +17,11 @@ import { } from '@wyw-in-js/transform'; import type { EntrypointEvent, + IEvaluatedEntrypoint, OnEvent, OnActionStartArgs, OnActionFinishArgs, + Options as WywTransformOptions, PluginOptions, Stage, } from '@wyw-in-js/transform'; @@ -35,14 +37,23 @@ type PartialOptions = Partial> & { features?: Partial; }; +type TransformInvocationOptions = { + filename?: string; + inputSourceMap?: WywTransformOptions['inputSourceMap']; + root?: string; +}; + type Options = [ evaluator: Evaluator, linariaConfig?: PartialOptions, extension?: 'js' | 'ts' | 'jsx' | 'tsx', filename?: string, - babelConfig?: babel.TransformOptions, + transformOptions?: TransformInvocationOptions, ]; +const normalizeCodeForSnapshot = (code: string) => + code.replace(/\r\n/g, '\n').replace(/[\r\n]+$/, ''); + const asyncResolve = (what: string, importer: string, stack: string[]) => { const where = [importer, ...stack].map((p) => dirname(p)); try { @@ -52,32 +63,16 @@ const asyncResolve = (what: string, importer: string, stack: string[]) => { } }; -const getPresets = (extension: 'js' | 'ts' | 'jsx' | 'tsx') => { - const presets: PluginItem[] = []; - if (extension === 'ts' || extension === 'tsx') { - presets.push(require.resolve('@babel/preset-typescript')); - } - - if (extension === 'jsx' || extension === 'tsx') { - presets.push(require.resolve('@babel/preset-react')); - } - - return presets; -}; +const cachesForCleanup = new Set(); const getLinariaConfig = ( evaluator: Evaluator, linariaConfig: PartialOptions, - presets: PluginItem[], stage?: Stage ): PluginOptions => { const { features: customFeatures, ...restConfig } = linariaConfig; return loadWywOptions({ - babelOptions: { - presets, - plugins: [], - }, extensions: [ '.cjs', '.cts', @@ -93,11 +88,6 @@ const getLinariaConfig = ( rules: [ { action: evaluator, - babelOptions: { - plugins: [ - require.resolve('@babel/plugin-transform-modules-commonjs'), - ], - }, }, { test: /[\\/]node_modules[\\/](?!@linaria)/, @@ -130,24 +120,23 @@ async function transform( linariaPartialConfig = {}, extension = 'js', fullFilename = join(dirName, `${filename}.${extension}`), - babelPartialConfig = {}, + transformOptions = {}, ] = opts; - const presets = getPresets(extension); + const cacheStore = cache ?? new TransformCacheCollection(); + cachesForCleanup.add(cacheStore); const linariaConfig = getLinariaConfig( evaluator, linariaPartialConfig, - presets, 'collect' ); const services = { - babel, - cache, + cache: cacheStore, options: { - filename: babelPartialConfig.filename ?? fullFilename, - root: babelPartialConfig.root ?? undefined, - inputSourceMap: babelPartialConfig.inputSourceMap ?? undefined, + filename: transformOptions.filename ?? fullFilename, + root: transformOptions.root ?? undefined, + inputSourceMap: transformOptions.inputSourceMap ?? undefined, pluginOptions: linariaConfig, }, eventEmitter, @@ -156,7 +145,7 @@ async function transform( return { cssText: result.cssText, - code: result.code, + code: normalizeCodeForSnapshot(result.code), metadata: { wywInJS: { rules: result.rules, @@ -167,6 +156,13 @@ async function transform( }; } +afterEach(() => { + cachesForCleanup.forEach((cacheStore) => { + disposeEvalBroker(cacheStore); + }); + cachesForCleanup.clear(); +}); + async function transformFile(filename: string, opts: Options) { const [evaluator, linariaPartialConfig = {}, extension = 'js'] = opts; const code = readFileSync(filename, 'utf8'); @@ -607,7 +603,7 @@ describe('strategy shaker', () => { [ evaluator, { - evaluate: false, + eval: { strategy: 'static' }, }, 'ts', ] @@ -632,7 +628,7 @@ describe('strategy shaker', () => { [ evaluator, { - evaluate: false, + eval: { strategy: 'static' }, }, 'ts', ] @@ -2904,42 +2900,39 @@ describe('strategy shaker', () => { ); }); - it('should fail because babelrc options is disabled', async () => { + it('requires explicit resolver config for aliased specifiers', async () => { const fn = () => transformFile( resolve(__dirname, './__fixtures__/with-babelrc/index.js'), - [ - evaluator, - { - features: { - useBabelConfigs: false, - }, - }, - ] + [evaluator] ); expect(fn).rejects.toThrowError(`Cannot find module '_/re-exports'`); }); - it('respects module-resolver plugin and show waring', async () => { + it('respects explicit wyw config file custom resolver', async () => { const warn = jest.spyOn(console, 'warn').mockImplementation(() => {}); const { code, metadata } = await transformFile( resolve(__dirname, './__fixtures__/with-babelrc/index.js'), - [evaluator] + [ + evaluator, + { + configFile: resolve( + __dirname, + './__fixtures__/with-babelrc/wyw-in-js.config.cjs' + ), + }, + ] ); - expect(warn).toHaveBeenCalledWith( - expect.stringContaining( - 'This works for now but will be an error in the future' - ) - ); + expect(warn).toHaveBeenCalledTimes(0); warn.mockRestore(); expect(code).toMatchSnapshot(); expect(metadata).toMatchSnapshot(); }); - it("respects module-resolver plugin and don't show waring", async () => { + it('respects inline hybrid custom resolver without config file fallback', async () => { const warn = jest.spyOn(console, 'warn').mockImplementation(() => {}); const { code, metadata } = await transformFile( @@ -2947,17 +2940,19 @@ describe('strategy shaker', () => { [ evaluator, { - babelOptions: { - plugins: [ - [ - 'module-resolver', - { - alias: { - _: './src/__fixtures__', - }, - }, - ], - ], + eval: { + resolver: 'hybrid', + customResolver: async (specifier) => { + if (!specifier.startsWith('_/')) { + return null; + } + + return { + id: require.resolve( + resolve(__dirname, `./__fixtures__/${specifier.slice(2)}`) + ), + }; + }, }, }, ] @@ -3260,14 +3255,16 @@ describe('strategy shaker', () => { expect(exports.foo2).toBe(undefined); }); - it('promotes statically evaluatable modules to "*"', async () => { - const filename = require.resolve(join(dirName, './__fixtures__/foo')); + it('resolves fully serializable static modules without eval cache materialization', async () => { + const filename = require.resolve( + join(dirName, './__fixtures__/foo-static') + ); const cache = new TransformCacheCollection(); await transform( dedent` import { css } from "@linaria/core"; - import { foo1 } from "./__fixtures__/foo"; + import { foo1 } from "./__fixtures__/foo-static"; export const text = css\`font-size: ${'${foo1}'}\`; `, @@ -3276,10 +3273,7 @@ describe('strategy shaker', () => { ); const cachedFoo = cache.get('entrypoints', filename); - expect(cachedFoo?.evaluatedOnly).toContain('*'); - - const exports = getCachedExports(cache, filename); - expect(exports.foo2).toBe('foo2'); + expect(cachedFoo).toBeUndefined(); }); const createCacheFor = async ( @@ -3296,16 +3290,27 @@ describe('strategy shaker', () => { exportsProxy[key] = exports[key]; }); - cache.add('entrypoints', filename, { + const cachedEntrypoint: IEvaluatedEntrypoint = { dependencies: new Map(), evaluated: true, evaluatedOnly: only, generation: 1, exports: exportsProxy, + hasTransformResult: false, + hasWywMetadata: false, ignored: false, + invalidationDependencies: new Map(), + invalidateOnDependencyChange: new Set(), log: logger, + name: filename, only, - }); + parents: [], + preevalResult: null, + seqId: -1, + transformResultCode: null, + }; + + cache.add('entrypoints', filename, cachedEntrypoint); return cache; }; @@ -3474,7 +3479,7 @@ describe('strategy shaker', () => { ) ) ) - ).rejects.toThrowError(/reading 'toLowerCase'/); + ).rejects.toThrowError(/does not provide an export named/); }); }); }); diff --git a/packages/testkit/src/transform.test.ts b/packages/testkit/src/transform.test.ts index a7550c2b9..4024b764d 100644 --- a/packages/testkit/src/transform.test.ts +++ b/packages/testkit/src/transform.test.ts @@ -141,10 +141,10 @@ it("doesn't rewrite an absolute path in url() declarations", async () => { expect(cssText).toMatchSnapshot(); }); -it('respects passed babel options', async () => { +it('parses JSX according to Oxc filename semantics', async () => { expect.assertions(2); - await expect(() => + await expect( transform( { options: { @@ -152,11 +152,6 @@ it('respects passed babel options', async () => { outputFilename, pluginOptions: { ...basePluginOptions, - babelOptions: { - babelrc: false, - configFile: false, - presets: [['@babel/preset-env', { loose: true }]], - }, }, }, }, @@ -167,26 +162,16 @@ it('respects passed babel options', async () => { `, asyncResolveFallback ) - ).rejects.toThrow( - /Support for the experimental syntax 'jsx' isn't currently enabled/ - ); + ).rejects.toThrow(/Unexpected (JSX expression|token)/); - await expect(() => + await expect( transform( { options: { - filename: './test.js', + filename: './test.jsx', outputFilename, pluginOptions: { ...basePluginOptions, - babelOptions: { - babelrc: false, - configFile: false, - presets: [ - ['@babel/preset-env', { loose: true }], - '@babel/preset-react', - ], - }, }, }, }, @@ -200,45 +185,11 @@ it('respects passed babel options', async () => { `, asyncResolveFallback ) - ).not.toThrow('Unexpected token'); -}); - -it("doesn't throw due to duplicate preset", async () => { - expect.assertions(1); - - expect(() => - transform( - { - options: { - filename: './test.js', - outputFilename, - pluginOptions: { - ...basePluginOptions, - babelOptions: { - babelrc: false, - configFile: false, - presets: [require.resolve('@linaria/babel-preset')], - plugins: [ - require.resolve('@babel/plugin-transform-modules-commonjs'), - ], - }, - }, - }, - }, - dedent` - import { styled } from '@linaria/react'; - - const Title = styled.h1\` color: blue; \`; - - const Article = styled.article\` - ${'${Title}'} { - font-size: 16px; - } - \`; - `, - asyncResolveFallback - ) - ).not.toThrow('Duplicate plugin/preset detected'); + ).resolves.toEqual( + expect.objectContaining({ + cssText: expect.stringContaining('background-image'), + }) + ); }); it('should return transformed code even when file only contains unused linaria code', async () => { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 28209a9f1..2d6dca5f4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -45,6 +45,12 @@ importers: '@definitelytyped/dtslint': specifier: ^0.0.176 version: 0.0.176(typescript@5.2.2) + '@emnapi/core': + specifier: ^1.10.0 + version: 1.10.0 + '@emnapi/runtime': + specifier: ^1.10.0 + version: 1.10.0 '@types/jest': specifier: ^28.1.0 version: 28.1.0 @@ -137,7 +143,7 @@ importers: devDependencies: '@astrojs/solid-js': specifier: ^1.2.3 - version: 1.2.3(@babel/core@7.23.5)(solid-js@1.6.2)(vite@3.2.7(@types/node@25.0.10)(terser@5.39.0)) + version: 1.2.3(@babel/core@7.23.5)(solid-js@1.6.2)(vite@3.2.7(@types/node@25.9.3)(terser@5.39.0)) '@babel/core': specifier: ^7.23.5 version: 7.23.5 @@ -145,20 +151,20 @@ importers: specifier: workspace:^ version: link:../../packages/core '@wyw-in-js/vite': - specifier: ^1.0.6 - version: 1.0.6(vite@3.2.7(@types/node@25.0.10)(terser@5.39.0)) + specifier: 2.0.0 + version: 2.0.0(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)(vite@3.2.7(@types/node@25.9.3)(terser@5.39.0)) astro: specifier: ^1.6.10 - version: 1.6.10(@types/node@25.0.10)(terser@5.39.0) + version: 1.6.10(@types/node@25.9.3)(terser@5.39.0) solid-js: specifier: ^1.6.2 version: 1.6.2 vite: specifier: ^3 - version: 3.2.7(@types/node@25.0.10)(terser@5.39.0) + version: 3.2.7(@types/node@25.9.3)(terser@5.39.0) vite-plugin-inspect: specifier: ^0.7.33 - version: 0.7.33(rollup@3.29.5)(vite@3.2.7(@types/node@25.0.10)(terser@5.39.0)) + version: 0.7.33(rollup@3.29.5)(vite@3.2.7(@types/node@25.9.3)(terser@5.39.0)) examples/esbuild: dependencies: @@ -167,8 +173,8 @@ importers: version: link:../../website devDependencies: '@wyw-in-js/esbuild': - specifier: ^1.0.6 - version: 1.0.6(esbuild@0.15.16) + specifier: 2.0.0 + version: 2.0.0(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)(esbuild@0.15.16) esbuild: specifier: ^0.15.16 version: 0.15.16 @@ -198,8 +204,8 @@ importers: specifier: ^15.2.1 version: 15.2.1(rollup@4.56.0) '@wyw-in-js/rollup': - specifier: ^1.0.6 - version: 1.0.6(rollup@4.56.0) + specifier: 2.0.0 + version: 2.0.0(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)(rollup@4.56.0) rollup: specifier: ^4.0.0 version: 4.56.0 @@ -218,13 +224,13 @@ importers: version: 15.2.1(rollup@3.29.5) '@vitejs/plugin-react': specifier: ^2.1.0 - version: 2.1.0(vite@3.2.10(@types/node@25.0.10)(terser@5.39.0)) + version: 2.1.0(vite@3.2.10(@types/node@25.9.3)(terser@5.39.0)) '@wyw-in-js/vite': - specifier: ^1.0.6 - version: 1.0.6(vite@3.2.10(@types/node@25.0.10)(terser@5.39.0)) + specifier: 2.0.0 + version: 2.0.0(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)(vite@3.2.10(@types/node@25.9.3)(terser@5.39.0)) vite: specifier: ^3.2.10 - version: 3.2.10(@types/node@25.0.10)(terser@5.39.0) + version: 3.2.10(@types/node@25.9.3)(terser@5.39.0) examples/vpssr-linaria-solid: dependencies: @@ -232,8 +238,8 @@ importers: specifier: workspace:^ version: link:../../packages/core '@wyw-in-js/vite': - specifier: ^1.0.6 - version: 1.0.6(vite@3.2.10(@types/node@25.0.10)(terser@5.39.0)) + specifier: 2.0.0 + version: 2.0.0(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)(vite@3.2.10(@types/node@25.9.3)(terser@5.39.0)) babel-preset-solid: specifier: ^1.6.2 version: 1.6.3(@babel/core@7.23.5) @@ -251,13 +257,13 @@ importers: version: 1.6.2 vite: specifier: ^3.2.10 - version: 3.2.10(@types/node@25.0.10)(terser@5.39.0) + version: 3.2.10(@types/node@25.9.3)(terser@5.39.0) vite-plugin-solid: specifier: ^2.4.0 - version: 2.4.0(solid-js@1.6.2)(vite@3.2.10(@types/node@25.0.10)(terser@5.39.0)) + version: 2.4.0(solid-js@1.6.2)(vite@3.2.10(@types/node@25.9.3)(terser@5.39.0)) vite-plugin-ssr: specifier: ^0.4.54 - version: 0.4.54(vite@3.2.10(@types/node@25.0.10)(terser@5.39.0)) + version: 0.4.54(vite@3.2.10(@types/node@25.9.3)(terser@5.39.0)) examples/vpssr-linaria-solid/dist/server: {} @@ -271,8 +277,8 @@ importers: specifier: ^7.23.5 version: 7.23.5 '@wyw-in-js/webpack-loader': - specifier: ^1.0.6 - version: 1.0.6(webpack@5.98.0) + specifier: 2.0.0 + version: 2.0.0(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)(webpack@5.98.0) babel-loader: specifier: ^9.1.0 version: 9.1.0(@babel/core@7.23.5)(webpack@5.98.0) @@ -307,11 +313,11 @@ importers: specifier: workspace:^ version: link:../react '@wyw-in-js/processor-utils': - specifier: ^1.0.4 - version: 1.0.4 + specifier: 2.0.0 + version: 2.0.0 '@wyw-in-js/shared': - specifier: ^1.0.4 - version: 1.0.4 + specifier: 2.0.0 + version: 2.0.0 known-css-properties: specifier: ^0.24.0 version: 0.24.0 @@ -341,8 +347,8 @@ importers: packages/core: dependencies: '@wyw-in-js/processor-utils': - specifier: ^1.0.4 - version: 1.0.4 + specifier: 2.0.0 + version: 2.0.0 devDependencies: '@babel/traverse': specifier: ^7.23.5 @@ -430,11 +436,11 @@ importers: specifier: workspace:^ version: link:../core '@wyw-in-js/processor-utils': - specifier: ^1.0.4 - version: 1.0.4 + specifier: 2.0.0 + version: 2.0.0 '@wyw-in-js/shared': - specifier: ^1.0.4 - version: 1.0.4 + specifier: 2.0.0 + version: 2.0.0 minimatch: specifier: ^9.0.3 version: 9.0.3 @@ -483,11 +489,11 @@ importers: packages/stylelint: dependencies: '@wyw-in-js/shared': - specifier: ^1.0.4 - version: 1.0.4 + specifier: 2.0.0 + version: 2.0.0 '@wyw-in-js/transform': - specifier: ^1.0.6 - version: 1.0.6 + specifier: 2.0.2 + version: 2.0.2(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)(typescript@5.2.2) devDependencies: '@types/node': specifier: ^17.0.39 @@ -523,14 +529,14 @@ importers: specifier: ^1.3.20 version: 1.3.20 '@wyw-in-js/processor-utils': - specifier: ^1.0.4 - version: 1.0.4 + specifier: 2.0.0 + version: 2.0.0 '@wyw-in-js/shared': - specifier: ^1.0.4 - version: 1.0.4 + specifier: 2.0.0 + version: 2.0.0 '@wyw-in-js/transform': - specifier: ^1.0.6 - version: 1.0.6 + specifier: 2.0.2 + version: 2.0.2(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)(typescript@5.2.2) debug: specifier: ^4.3.4 version: 4.3.4 @@ -660,11 +666,11 @@ importers: specifier: workspace:^ version: link:../packages/stylelint '@wyw-in-js/babel-preset': - specifier: ^1.0.6 - version: 1.0.6 + specifier: 2.0.0 + version: 2.0.0(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0) '@wyw-in-js/webpack-loader': - specifier: ^1.0.6 - version: 1.0.6(webpack@5.98.0) + specifier: 2.0.0 + version: 2.0.0(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)(webpack@5.98.0) babel-loader: specifier: ^8.2.5 version: 8.2.5(@babel/core@7.23.5)(webpack@5.98.0) @@ -922,6 +928,7 @@ packages: '@babel/plugin-proposal-explicit-resource-management@7.23.3': resolution: {integrity: sha512-f1FebOc7H/JZ4CBbj6dtdpJ0mj23HuEK0UnYJ6Jv+vqAVfHIj8Nxq/rCdyIL+52TKlQGDuh2cCoTIaV/4nYEmQ==} engines: {node: '>=6.9.0'} + deprecated: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-explicit-resource-management instead. peerDependencies: '@babel/core': ^7.0.0-0 @@ -1581,20 +1588,24 @@ packages: '@effect/data@0.17.1': resolution: {integrity: sha512-QCYkLE5Y5Dm5Yax5R3GmW4ZIgTx7W+kSZ7yq5eqQ/mFWa8i4yxbLuu8cudqzdeZtRtTGZKlhDxfFfgVtMywXJg==} + deprecated: this package has been merged into the main effect package '@effect/io@0.38.0': resolution: {integrity: sha512-qlVC9ASxNC+L2NKX5qOV9672CE5wWizfwBSFaX2XLI7CC118WRvohCTIPQ52n50Bj5TmR20+na+U9C7e4VkqzA==} + deprecated: this package has been merged into the main effect package peerDependencies: '@effect/data': ^0.17.1 '@effect/match@0.32.0': resolution: {integrity: sha512-04QfnIgCcMnnNbGxTv2xa9/7q1c5kgpsBodqTUZ8eX86A/EdE8Czz+JkVarG00/xE+nYhQLXOXCN9Zj+dtqVkQ==} + deprecated: this package has been merged into the main effect package peerDependencies: '@effect/data': ^0.17.1 '@effect/schema': ^0.33.0 '@effect/schema@0.33.1': resolution: {integrity: sha512-h+fQInui4q3we8fegAygL0Cs5B2DD/+oC3JWthOh8eLcbKkbYM9smCD/PsHuyQ+BaeWiSP5JdvREGlP4Sg+Ysw==} + deprecated: this package has been merged into the main effect package peerDependencies: '@effect/data': ^0.17.1 '@effect/io': ^0.38.0 @@ -1608,6 +1619,15 @@ packages: '@emmetio/scanner@1.0.0': resolution: {integrity: sha512-8HqW8EVqjnCmWXVpqAOZf+EGESdkR27odcMMMGefgKXtar00SoYNSryGv//TELI4T3QFsECo78p+0lmalk/CFA==} + '@emnapi/core@1.10.0': + resolution: {integrity: sha512-yq6OkJ4p82CAfPl0u9mQebQHKPJkY7WrIuk205cTYnYe+k2Z8YBh11FrbRG/H6ihirqcacOgl2BIO8oyMQLeXw==} + + '@emnapi/runtime@1.10.0': + resolution: {integrity: sha512-ewvYlk86xUoGI0zQRNq/mC+16R1QeDlKQy21Ki3oSYXNgLb45GV1P6A0M+/s6nyCuNDqe5VpaY84BzXGwVbwFA==} + + '@emnapi/wasi-threads@1.2.1': + resolution: {integrity: sha512-uTII7OYF+/Mes/MrcIOYp5yOtSMLBWSIoLPpcgwipoiKbli6k322tcoFsxoIIxPDqW01SQGAgko4EzZi2BNv2w==} + '@emotion/is-prop-valid@1.2.0': resolution: {integrity: sha512-3aDpDprjM0AwaxGE09bOPkNxHpBd+kA6jty3RnaEXdweX1DF1U3VQpPYb0g1IStAuK7SVQ1cy+bNBBKp4W3Fjg==} @@ -1779,6 +1799,7 @@ packages: '@humanwhocodes/config-array@0.11.13': resolution: {integrity: sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==} engines: {node: '>=10.10.0'} + deprecated: Use @eslint/config-array instead '@humanwhocodes/module-importer@1.0.1': resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} @@ -1786,6 +1807,7 @@ packages: '@humanwhocodes/object-schema@2.0.1': resolution: {integrity: sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==} + deprecated: Use @eslint/object-schema instead '@istanbuljs/load-nyc-config@1.1.0': resolution: {integrity: sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==} @@ -1861,6 +1883,9 @@ packages: resolution: {integrity: sha512-tPKQNMPuXgvdOn2/Lg9HNfUvjYVGolt04Hp03f5hAk878uwOLikN+JzeLY0HcVgKgFl9Hs3EIqpu3WX27XNhnw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + '@jridgewell/gen-mapping@0.3.13': + resolution: {integrity: sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==} + '@jridgewell/gen-mapping@0.3.3': resolution: {integrity: sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==} engines: {node: '>=6.0.0'} @@ -1869,10 +1894,17 @@ packages: resolution: {integrity: sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==} engines: {node: '>=6.0.0'} + '@jridgewell/remapping@2.3.5': + resolution: {integrity: sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==} + '@jridgewell/resolve-uri@3.1.1': resolution: {integrity: sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==} engines: {node: '>=6.0.0'} + '@jridgewell/resolve-uri@3.1.2': + resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} + engines: {node: '>=6.0.0'} + '@jridgewell/set-array@1.1.2': resolution: {integrity: sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==} engines: {node: '>=6.0.0'} @@ -1890,12 +1922,18 @@ packages: '@jridgewell/sourcemap-codec@1.4.15': resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} + '@jridgewell/sourcemap-codec@1.5.5': + resolution: {integrity: sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==} + '@jridgewell/trace-mapping@0.3.20': resolution: {integrity: sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==} '@jridgewell/trace-mapping@0.3.25': resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==} + '@jridgewell/trace-mapping@0.3.31': + resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==} + '@leichtgewicht/ip-codec@2.0.4': resolution: {integrity: sha512-Hcv+nVC0kZnQ3tD9GVu5xSMR4VVYOteQIr/hwFPVEvPdlXqgGEuRjiheChHgdM+JyqdgNcmzZOX/tnl0JOiI7A==} @@ -1911,6 +1949,12 @@ packages: '@marionebl/sander@0.6.1': resolution: {integrity: sha512-7f3zZddAk92G1opoX/glbDO6YbrzmMAJAw0RJAcvunnV7sR4L9llyBUAABptKoF1Jf37UQ1QTJy5p2H4J4rBNA==} + '@napi-rs/wasm-runtime@1.1.5': + resolution: {integrity: sha512-AWPoBRJ9tsnVhor4sjO7rkni+7p+2IAEFj6cx06UgP10jkQHqay/36uRV/bFkgrh18D9vb4cr8Q0Pthskgzy+Q==} + peerDependencies: + '@emnapi/core': ^1.7.1 + '@emnapi/runtime': ^1.7.1 + '@nicolo-ribaudo/chokidar-2@2.1.8-no-fsevents.3': resolution: {integrity: sha512-s88O1aVtXftvp5bCPB7WnmXc5IwOZZ7YPuwNPt+GtOOXpPvad1LfbmjYv+qII7zP6RU2QGnqve27dnLycEnyEQ==} @@ -1929,6 +1973,347 @@ packages: resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} engines: {node: '>= 8'} + '@oxc-parser/binding-android-arm-eabi@0.131.0': + resolution: {integrity: sha512-t2xicr9pfzkSRYx5aPqZqlLaayIwJTqgQ81Jor31Xep2nGyL2Aq3d0K5wOfeR7VevaSdxaS9dzSQP9xDwn8fDg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [android] + + '@oxc-parser/binding-android-arm64@0.131.0': + resolution: {integrity: sha512-nlGIod6gw75x1aEDgLS+srj+JRGY0HHm9MI9YgzE/B64l6d6+H3MSP9NOgp0+HTg8tp4vV9rVfgQGgd+TfVZcA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [android] + + '@oxc-parser/binding-darwin-arm64@0.131.0': + resolution: {integrity: sha512-jukuV6xe5RbQKFo7QD34NDCLDZp4PSOm8rmckhNdH/60ymG5zXbDzGBEyc+nTkuLQNama2aSGCt+CPfpjNTqyw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [darwin] + + '@oxc-parser/binding-darwin-x64@0.131.0': + resolution: {integrity: sha512-g3JOo4khe9rslHm5WYaVDWb0HS/M1MLR3I9S8560MkKIcC96VQY00QjOlsuRyfSj/JDXj8i9T7ryPO2RidiXVg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [darwin] + + '@oxc-parser/binding-freebsd-x64@0.131.0': + resolution: {integrity: sha512-1hziITDTxjMePnX+dR9ocVT+EuZkQ8wm4FPAbmbEiKG+Phbo73J1ZnPAA6Y/aGsWF3McOFnQuZIktAFwalkfJQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [freebsd] + + '@oxc-parser/binding-linux-arm-gnueabihf@0.131.0': + resolution: {integrity: sha512-9uRxfXwyKG9+MwmGQBo2ncPNwZH5HTmCETFM2WiuDBNDCW4NC5ttSQkwCAMrTAWgwMzVBH1CP8pM0v7nebCWXQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + + '@oxc-parser/binding-linux-arm-musleabihf@0.131.0': + resolution: {integrity: sha512-mgbLvzRShXOLBdWGInf08Af4q+pfj1xD8hSgLClDZ9of/BXkB6+LIhTH7fihiDUipqB3yoSkKBWaZ3Ejlf5Yag==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + + '@oxc-parser/binding-linux-arm64-gnu@0.131.0': + resolution: {integrity: sha512-OPT8++4aN6j2GJ8+3IZHS/byXoZP4aSBn+FoG6rgBJ2fKwPKXWF3MqrFMNW7NKHM28FLY579xYLxJSfgobEqPA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + + '@oxc-parser/binding-linux-arm64-musl@0.131.0': + resolution: {integrity: sha512-vtPiwmfVTAXzaxDKsOXG+LwgRAA7WEnaeHzhS5z0GE89gAK18KSXnly7Z6saXXq6L3dVMyK44uoTI03zKxrpmw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + + '@oxc-parser/binding-linux-ppc64-gnu@0.131.0': + resolution: {integrity: sha512-8AW8L7w5cGHSdZPcyZX2yR0+GUODsT15rbRjfdD54rv6DMbtuEB19ysLOpKJlRGfH6UNYNpCHaU1uJWgTWf1/w==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ppc64] + os: [linux] + + '@oxc-parser/binding-linux-riscv64-gnu@0.131.0': + resolution: {integrity: sha512-vvpjkjEOUsPcsYf8evE4MO3aGx9+3wodXEBOicGNnOwTuAik8eBONNkgSdhkGsAblQmfVHJyanRnpxglddTXIA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [riscv64] + os: [linux] + + '@oxc-parser/binding-linux-riscv64-musl@0.131.0': + resolution: {integrity: sha512-AqmcNC3fClXX+fxQ6VGEN1667xVFiRBkY0CZmDMSiaeFUsv1+UkBPYYi48IUKcA9/ivvoKNRzQl2I4//kT9F/w==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [riscv64] + os: [linux] + + '@oxc-parser/binding-linux-s390x-gnu@0.131.0': + resolution: {integrity: sha512-7d3jOMKy7RSQCcDLIci+ySll2FgsOMl/GiRux4q2JNv0zg4EdhFISa9idvrdN/HEUIQQJNg6dmveUeJl2YErGA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [s390x] + os: [linux] + + '@oxc-parser/binding-linux-x64-gnu@0.131.0': + resolution: {integrity: sha512-JHK/h95qVqVQ+ITER837kcTdwBDFpFaNnOTYGCP0zdUSX/mLKC7tXOoyrTb6vG7iRPwGlcgBil3v2IjYw1FqJA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + + '@oxc-parser/binding-linux-x64-musl@0.131.0': + resolution: {integrity: sha512-b2BO82O8azXAyf7EUgOPKu145nWypbNyk07HbU09fkzhm9lEA5oPvaN/M8Nlo7tOErVTa2WOgS4QbOnxAPXdDQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + + '@oxc-parser/binding-openharmony-arm64@0.131.0': + resolution: {integrity: sha512-GHO9glZaX7LkX/OGfluEPf1yjg+ehiFbUdowbX6uNWOQhmwKWU4m4+nZ9FJkrHNKuxyI1KKertMdGjVKCApKWA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [openharmony] + + '@oxc-parser/binding-wasm32-wasi@0.131.0': + resolution: {integrity: sha512-3SkikPaEFoih1N83qLVEDLRLeY4nYsf6JT9SnWiMCQ5lGQdKup6bEuKCqkRiG9dD1IIaFeYz9RjlciPmYoFIWA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [wasm32] + + '@oxc-parser/binding-win32-arm64-msvc@0.131.0': + resolution: {integrity: sha512-Os5bEhryeA2jkH+ZrnZyAC1EP5gs+X4YB1Fjqml7UPD5kU7ecsK1MPEVMfCrdt/GDNpDbavYXiOXOdyJ5b3OPw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [win32] + + '@oxc-parser/binding-win32-ia32-msvc@0.131.0': + resolution: {integrity: sha512-m+jNz9EuF0NXoiptc6B9h5yompZQVW/a5MJeOu5zojfH5yWk82tvF2ccrHkfhgtrS9h9DD5l1Qv8dWlfY7Nz8g==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ia32] + os: [win32] + + '@oxc-parser/binding-win32-x64-msvc@0.131.0': + resolution: {integrity: sha512-o14Hk8dAyiEUMFEWEgmAwFZvBt1RzAYLM3xeQ+5315JXgVYhoemivgYcbYVRbsFkS71ShMGlAFE0kPnr460rww==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [win32] + + '@oxc-project/types@0.131.0': + resolution: {integrity: sha512-PgnWDfV0h+b16XNKbXU7Daib/BFSt/J2mEzfYIBu6JB/wNdlU+kVYXCkGA1A9fWkTbOgbjh4e6NhPeQOYvFhEA==} + + '@oxc-resolver/binding-android-arm-eabi@11.19.1': + resolution: {integrity: sha512-aUs47y+xyXHUKlbhqHUjBABjvycq6YSD7bpxSW7vplUmdzAlJ93yXY6ZR0c1o1x5A/QKbENCvs3+NlY8IpIVzg==} + cpu: [arm] + os: [android] + + '@oxc-resolver/binding-android-arm64@11.19.1': + resolution: {integrity: sha512-oolbkRX+m7Pq2LNjr/kKgYeC7bRDMVTWPgxBGMjSpZi/+UskVo4jsMU3MLheZV55jL6c3rNelPl4oD60ggYmqA==} + cpu: [arm64] + os: [android] + + '@oxc-resolver/binding-darwin-arm64@11.19.1': + resolution: {integrity: sha512-nUC6d2i3R5B12sUW4O646qD5cnMXf2oBGPLIIeaRfU9doJRORAbE2SGv4eW6rMqhD+G7nf2Y8TTJTLiiO3Q/dQ==} + cpu: [arm64] + os: [darwin] + + '@oxc-resolver/binding-darwin-x64@11.19.1': + resolution: {integrity: sha512-cV50vE5+uAgNcFa3QY1JOeKDSkM/9ReIcc/9wn4TavhW/itkDGrXhw9jaKnkQnGbjJ198Yh5nbX/Gr2mr4Z5jQ==} + cpu: [x64] + os: [darwin] + + '@oxc-resolver/binding-freebsd-x64@11.19.1': + resolution: {integrity: sha512-xZOQiYGFxtk48PBKff+Zwoym7ScPAIVp4c14lfLxizO2LTTTJe5sx9vQNGrBymrf/vatSPNMD4FgsaaRigPkqw==} + cpu: [x64] + os: [freebsd] + + '@oxc-resolver/binding-linux-arm-gnueabihf@11.19.1': + resolution: {integrity: sha512-lXZYWAC6kaGe/ky2su94e9jN9t6M0/6c+GrSlCqL//XO1cxi5lpAhnJYdyrKfm0ZEr/c7RNyAx3P7FSBcBd5+A==} + cpu: [arm] + os: [linux] + + '@oxc-resolver/binding-linux-arm-musleabihf@11.19.1': + resolution: {integrity: sha512-veG1kKsuK5+t2IsO9q0DErYVSw2azvCVvWHnfTOS73WE0STdLLB7Q1bB9WR+yHPQM76ASkFyRbogWo1GR1+WbQ==} + cpu: [arm] + os: [linux] + + '@oxc-resolver/binding-linux-arm64-gnu@11.19.1': + resolution: {integrity: sha512-heV2+jmXyYnUrpUXSPugqWDRpnsQcDm2AX4wzTuvgdlZfoNYO0O3W2AVpJYaDn9AG4JdM6Kxom8+foE7/BcSig==} + cpu: [arm64] + os: [linux] + + '@oxc-resolver/binding-linux-arm64-musl@11.19.1': + resolution: {integrity: sha512-jvo2Pjs1c9KPxMuMPIeQsgu0mOJF9rEb3y3TdpsrqwxRM+AN6/nDDwv45n5ZrUnQMsdBy5gIabioMKnQfWo9ew==} + cpu: [arm64] + os: [linux] + + '@oxc-resolver/binding-linux-ppc64-gnu@11.19.1': + resolution: {integrity: sha512-vLmdNxWCdN7Uo5suays6A/+ywBby2PWBBPXctWPg5V0+eVuzsJxgAn6MMB4mPlshskYbppjpN2Zg83ArHze9gQ==} + cpu: [ppc64] + os: [linux] + + '@oxc-resolver/binding-linux-riscv64-gnu@11.19.1': + resolution: {integrity: sha512-/b+WgR+VTSBxzgOhDO7TlMXC1ufPIMR6Vj1zN+/x+MnyXGW7prTLzU9eW85Aj7Th7CCEG9ArCbTeqxCzFWdg2w==} + cpu: [riscv64] + os: [linux] + + '@oxc-resolver/binding-linux-riscv64-musl@11.19.1': + resolution: {integrity: sha512-YlRdeWb9j42p29ROh+h4eg/OQ3dTJlpHSa+84pUM9+p6i3djtPz1q55yLJhgW9XfDch7FN1pQ/Vd6YP+xfRIuw==} + cpu: [riscv64] + os: [linux] + + '@oxc-resolver/binding-linux-s390x-gnu@11.19.1': + resolution: {integrity: sha512-EDpafVOQWF8/MJynsjOGFThcqhRHy417sRyLfQmeiamJ8qVhSKAn2Dn2VVKUGCjVB9C46VGjhNo7nOPUi1x6uA==} + cpu: [s390x] + os: [linux] + + '@oxc-resolver/binding-linux-x64-gnu@11.19.1': + resolution: {integrity: sha512-NxjZe+rqWhr+RT8/Ik+5ptA3oz7tUw361Wa5RWQXKnfqwSSHdHyrw6IdcTfYuml9dM856AlKWZIUXDmA9kkiBQ==} + cpu: [x64] + os: [linux] + + '@oxc-resolver/binding-linux-x64-musl@11.19.1': + resolution: {integrity: sha512-cM/hQwsO3ReJg5kR+SpI69DMfvNCp+A/eVR4b4YClE5bVZwz8rh2Nh05InhwI5HR/9cArbEkzMjcKgTHS6UaNw==} + cpu: [x64] + os: [linux] + + '@oxc-resolver/binding-openharmony-arm64@11.19.1': + resolution: {integrity: sha512-QF080IowFB0+9Rh6RcD19bdgh49BpQHUW5TajG1qvWHvmrQznTZZjYlgE2ltLXyKY+qs4F/v5xuX1XS7Is+3qA==} + cpu: [arm64] + os: [openharmony] + + '@oxc-resolver/binding-wasm32-wasi@11.19.1': + resolution: {integrity: sha512-w8UCKhX826cP/ZLokXDS6+milN8y4X7zidsAttEdWlVoamTNf6lhBJldaWr3ukTDiye7s4HRcuPEPOXNC432Vg==} + engines: {node: '>=14.0.0'} + cpu: [wasm32] + + '@oxc-resolver/binding-win32-arm64-msvc@11.19.1': + resolution: {integrity: sha512-nJ4AsUVZrVKwnU/QRdzPCCrO0TrabBqgJ8pJhXITdZGYOV28TIYystV1VFLbQ7DtAcaBHpocT5/ZJnF78YJPtQ==} + cpu: [arm64] + os: [win32] + + '@oxc-resolver/binding-win32-ia32-msvc@11.19.1': + resolution: {integrity: sha512-EW+ND5q2Tl+a3pH81l1QbfgbF3HmqgwLfDfVithRFheac8OTcnbXt/JxqD2GbDkb7xYEqy1zNaVFRr3oeG8npA==} + cpu: [ia32] + os: [win32] + + '@oxc-resolver/binding-win32-x64-msvc@11.19.1': + resolution: {integrity: sha512-6hIU3RQu45B+VNTY4Ru8ppFwjVS/S5qwYyGhBotmjxfEKk41I2DlGtRfGJndZ5+6lneE2pwloqunlOyZuX/XAw==} + cpu: [x64] + os: [win32] + + '@oxc-transform/binding-android-arm-eabi@0.131.0': + resolution: {integrity: sha512-rcNvLlbNnxTfYVlZVF+Rev2AyCpJDpwVPphG4HOJxauaT1+w5VxL+kRdxCReof4A8ZsszbvIYlvkqvaJKO4Mog==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [android] + + '@oxc-transform/binding-android-arm64@0.131.0': + resolution: {integrity: sha512-/y+EH6QYQB2ZDQNvMlzItc36mw16GZwCDlvGYbQ4GCTE+7ZtSmx9E/rJOYzYyzMghz0c5dhJquRKScXdOZHpnQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [android] + + '@oxc-transform/binding-darwin-arm64@0.131.0': + resolution: {integrity: sha512-x1Va8zFomdYghAI0Zkt7kUmG50S65XH1u0EbIDr80M9idfXrQgd08ZGl3ejwRGLBrkbA8tkkmeOu1rWVFf7BXg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [darwin] + + '@oxc-transform/binding-darwin-x64@0.131.0': + resolution: {integrity: sha512-EwacackWpYYXGZsl0Aj4NKvDdLuxWZg7LQDneFyMwuftpAxPQLRkHFwZib7r6wpIJm4NELhHW261A4vZ8OQqXQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [darwin] + + '@oxc-transform/binding-freebsd-x64@0.131.0': + resolution: {integrity: sha512-EhXqWOtL1PWcJ3ktdplV4Wrez2PRuTBSDdB7KF6CN4zuZhohUjxC1bxqDNRbNSX46yaZ27IzJLafah1J6mSA8Q==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [freebsd] + + '@oxc-transform/binding-linux-arm-gnueabihf@0.131.0': + resolution: {integrity: sha512-NfNACr3aqBKeeUh6HCoGGPSjdMkLvyXUZQywCg/DwRkEpqZo55KX65saW1sQdgBcu0SKXrAReTjIm/HDO/OI0Q==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + + '@oxc-transform/binding-linux-arm-musleabihf@0.131.0': + resolution: {integrity: sha512-ABp6KGhbYFGDaAdB4gGZW12DYa55OF/Cu+6Rw6/Di0skuwpiDwnBOLHWz9VBq0QTcREy/qIUOnKW+vZHQLOT8A==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + + '@oxc-transform/binding-linux-arm64-gnu@0.131.0': + resolution: {integrity: sha512-4nKYkHHjRela+jpt+VO4++jxgHoJQFxAeAGtfQ4x11dQMJllzqo3Yu8gfcfLEMsAfflwN/gY+KBbMD/y0exitg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + + '@oxc-transform/binding-linux-arm64-musl@0.131.0': + resolution: {integrity: sha512-cW0Ab1s0sxfiyP1+gdd94f0vUjwGzJF4F3DepF3VnR9nFTGMmFLugwtrBS3DYjTnbugiUH3Fp+16yys1FhNzIA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + + '@oxc-transform/binding-linux-ppc64-gnu@0.131.0': + resolution: {integrity: sha512-wunAU/lzE1nPGKL47uI0g+4Nsv/12xveOXNu4M70xe85kNBm7mQdMpZIeoVYCxtXew0iHxFKJDT6qK5mYFSA3w==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ppc64] + os: [linux] + + '@oxc-transform/binding-linux-riscv64-gnu@0.131.0': + resolution: {integrity: sha512-r4sMt4OB4TryDcVWW9KnsXOf/ea7tIGX2QASNrpetzPocsBZqhHIFDbZ8EkBDjmlmWGHg6BgjVx6lLcMXX4Dcw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [riscv64] + os: [linux] + + '@oxc-transform/binding-linux-riscv64-musl@0.131.0': + resolution: {integrity: sha512-/rLVLItsBjKrnZFLiGrwRB3fs0dAjXZLqY7F42omvacFJjZsceQ3481oQX1bBs3RwoDDyDy/9ZkIN7kYIkv5Gw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [riscv64] + os: [linux] + + '@oxc-transform/binding-linux-s390x-gnu@0.131.0': + resolution: {integrity: sha512-fUprJgJauI1A7e7cDgY/Z3mwLVtE3aswB4lvS96KpRNDHrwOh8bnCJOWf+0CYveDQzghDVFiZWVDo56pO4Wr9Q==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [s390x] + os: [linux] + + '@oxc-transform/binding-linux-x64-gnu@0.131.0': + resolution: {integrity: sha512-XdbvDT1GPNxrTLXSRt4RU2uCH112q3nINTT05DZqTYYcAxaCPImnMoZe2TlBv5j2376Gk+2pcVnJs6xut47aSw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + + '@oxc-transform/binding-linux-x64-musl@0.131.0': + resolution: {integrity: sha512-Du2CxlBfC98EV3hOAmLVSUgP0JgqM9F47lRv9v43T4sGPcQVOjs9wffUybGUUraG9unmBZ4dgpMAqlCq0k3dGw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + + '@oxc-transform/binding-openharmony-arm64@0.131.0': + resolution: {integrity: sha512-wTj2FkOgNhgdisnA0a15QQksyj6AH2snmpgYgAtj098i477x5LpHHdqfuk60jsA/QHSjmUc6dm4P88yI5GY4xA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [openharmony] + + '@oxc-transform/binding-wasm32-wasi@0.131.0': + resolution: {integrity: sha512-lE9UaZL0KomAlbATiB6FKoJ9no6W49yXs/MujJqY75AkHHMeOCsHSN9HvriyWz2FOIQgV7C5cmNj0jf+IaBtQg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [wasm32] + + '@oxc-transform/binding-win32-arm64-msvc@0.131.0': + resolution: {integrity: sha512-8KUfPnuxbEfa9H+OQ5XNPFq9JIEWVCg8kczJaD8PvTprr515mz1lmSLSUoOW8mrLaN0mZaGg6pemuvTawOLoPg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [win32] + + '@oxc-transform/binding-win32-ia32-msvc@0.131.0': + resolution: {integrity: sha512-pXSu2A7L6H//1Uvsg5RJHb91BDZpCTho0r9oAwxPqKJM2LWV7Zph/ikWEIXt/YLbKF3WpkHrKQ5hbQGP9gWmHg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ia32] + os: [win32] + + '@oxc-transform/binding-win32-x64-msvc@0.131.0': + resolution: {integrity: sha512-VXgk106WLl3NpBO/6G2gxkWBHguCJm01mGqAq2Q0l2o7hnbglsND0UWSCtM3a9MlsDimfJkLWFQveZu4UtnRvA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [win32] + '@pkgr/utils@2.4.2': resolution: {integrity: sha512-POgTXhjrTfbTV63DiFXav4lBHiICLKKwDeaKn9Nphwj7WH6m0hMMCaJkMyRWjgtPFyRKRVoMXXjczsTQRDEhYw==} engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} @@ -2208,6 +2593,9 @@ packages: resolution: {integrity: sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==} engines: {node: '>= 6'} + '@tybys/wasm-util@0.10.2': + resolution: {integrity: sha512-RoBvJ2X0wuKlWFIjrwffGw1IqZHKQqzIchKaadZZfnNpsAYp2mM0h36JtPCjNDAHGgYez/15uMBpfGwchhiMgg==} + '@types/acorn@4.0.6': resolution: {integrity: sha512-veQTnWP+1D/xbxVrPC3zHnCZRjSrKfhbMUlEA43iMZLu7EsnTtkJklIuwrCPbOi8YkvDQAiW05VQQFvvz9oieQ==} @@ -2334,6 +2722,9 @@ packages: '@types/node@25.0.10': resolution: {integrity: sha512-zWW5KPngR/yvakJgGOmZ5vTBemDoSqF3AcV/LrO5u5wTWyEAVVh+IT39G4gtyAkh3CtTZs8aX/yRM82OfzHJRg==} + '@types/node@25.9.3': + resolution: {integrity: sha512-603BddQMv3pUcr4U2dhujk83N2tTDVr/34wII2B6bJy6g+8WD6yUb11jszNs0gdi4PesVWl7ABt8nYMVpnLUcg==} + '@types/normalize-package-data@2.4.1': resolution: {integrity: sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==} @@ -2630,43 +3021,47 @@ packages: webpack-dev-server: optional: true - '@wyw-in-js/babel-preset@1.0.6': - resolution: {integrity: sha512-XPb8rnl/9mqsoeRuclHR4J2pUu8RNZFmsxR13BW2UgXXG4Iy+ymnpvJ8p1CGpvHq8wxGBhCMIocxNM1+1ytAjw==} - engines: {node: '>=20.0.0'} + '@wyw-in-js/babel-preset@2.0.0': + resolution: {integrity: sha512-JIwvAerEqgBHkfHMCGr+d7MPZBjVUU6cPCR3Kh9rw8+aoxiTsnjHlRCRryqlpjF4NX+evVN0x4h7YS4HRbCBEQ==} + engines: {node: '>=22.0.0'} - '@wyw-in-js/esbuild@1.0.6': - resolution: {integrity: sha512-Y4bhaBtJalppGicO5w77Mf7IMnS3Pn8WpIKZhCmX6VUF8ufAJVOAS3zg5Kqxpcp0N7dlwri2gjSTA/JSvSKyiw==} - engines: {node: '>=20.0.0'} + '@wyw-in-js/esbuild@2.0.0': + resolution: {integrity: sha512-bdR6ersIIUoy0gXCgJsIgVhu/jaallUng7HYOCTn2Uuur0s0ebXOHzcT8g6vLdCQnIH1hNOj47AuVhIcNKfimA==} + engines: {node: '>=22.0.0'} peerDependencies: esbuild: '>=0.12.0' - '@wyw-in-js/processor-utils@1.0.4': - resolution: {integrity: sha512-g9hfcK9qNRd+3aJfvMS0b/ek/SH9mio1zeQrPciOBNpDtXkJxUEzBHLDCrTgPzV7GYu7MljKRv/CfPlHrP3t/w==} - engines: {node: '>=20.0.0'} + '@wyw-in-js/processor-utils@2.0.0': + resolution: {integrity: sha512-eiDxPVT7bSmfpoActpAsAZstWfRxO/7kqAz84M+/GKZg6j/7/FREGOGOBTq6PSOiUe+LH087iH8EZR1T/tExtA==} + engines: {node: '>=22.0.0'} - '@wyw-in-js/rollup@1.0.6': - resolution: {integrity: sha512-XzsCLEoSLg1OszTr02cx1weYzEh+JI1o6eVQPbUSmEDFifpqz0J1tWePb4V4HnGBrRII3bsllL2ywB2e+VnQhQ==} - engines: {node: '>=20.0.0'} + '@wyw-in-js/rollup@2.0.0': + resolution: {integrity: sha512-PELJ+rN2MrXS4wWJ/sQpTfbvRSbulbUAZQaGGVly0fcVRFpFSZfsM5IWRDnVfSU1B1uw7AVw1fLmVXexCh/LHQ==} + engines: {node: '>=22.0.0'} peerDependencies: rollup: 1.20.0||^2.0.0||^3.0.0||^4.0.0 - '@wyw-in-js/shared@1.0.4': - resolution: {integrity: sha512-lH29Vy1HVo+os8slxTP/E1qZ8Mo48WhzyYR8dDyplyI2qXwOGHqwkkFmuFI4q1/J3vf1i8v8k/+gkP1T5fNTZA==} - engines: {node: '>=20.0.0'} + '@wyw-in-js/shared@2.0.0': + resolution: {integrity: sha512-07hla0EXdcxxA88TNkqcydYbQHRS/0uXzOQv/9SOIVmpFIAzRh3H1q6X1VWzq6TratoAJ7hLnAntfFgunZzqCA==} + engines: {node: '>=22.0.0'} - '@wyw-in-js/transform@1.0.6': - resolution: {integrity: sha512-fObTiuRgcOgl4K+cK1LuT+knCjbAWCoM/nrpHuFfwQqYLcUfM2WPFVvlXoTFxhI4svJrPBysmW7VryjwDYxEzw==} - engines: {node: '>=20.0.0'} + '@wyw-in-js/transform@2.0.0': + resolution: {integrity: sha512-SGO2e3DnKfqh/82qtoaP/Vhm0/zvtV7XKsvrjZHmJK7NOIZdNx4y7hCXWi3KTWT7BlbOTRbtjcyoQuVthdDkCw==} + engines: {node: '>=22.0.0'} - '@wyw-in-js/vite@1.0.6': - resolution: {integrity: sha512-Q0u3UeIy/kluLTayGED6hDqJG8E1rU5KfJITRaOP6T1jTM02i0SOg5lD+T/j5b+lZ5kni9xaScTbx0vWruDClQ==} - engines: {node: '>=20.0.0'} + '@wyw-in-js/transform@2.0.2': + resolution: {integrity: sha512-OGC5ymd+N7k/eXwxX3nYbPo7v7CJ0+NAv48dcr7xoD4EUhYELDzdFPIoQQNSFmCdzJ720ch1eeBMmR/47HlHLw==} + engines: {node: '>=22.0.0'} + + '@wyw-in-js/vite@2.0.0': + resolution: {integrity: sha512-olItlLGeCuZaLsky3ZOYV4LMjszFH/Z17qvNzj0oQo0+zWb1sIekNjT8ivp3pTTWAplV4nHjoCKGJXnja4DCZw==} + engines: {node: '>=22.0.0'} peerDependencies: vite: '>=3.2.7' - '@wyw-in-js/webpack-loader@1.0.6': - resolution: {integrity: sha512-/EdKmzVYdN3ZD0W9kdT35ConT5fBSe/X0/C4gDrLrRL7TtnbxrxpcBWl0Of4158Yhplxm91hGkl+HRiYD9GJHQ==} - engines: {node: '>=20.0.0'} + '@wyw-in-js/webpack-loader@2.0.0': + resolution: {integrity: sha512-o+cR8Tym0lPV71YlAU4bIbqkL5aTgpS4iYF6/nAX/41gT7y1LVlWMaPH7eRpQZkwEOAbrjpsGa5DUL8bOAnfpQ==} + engines: {node: '>=22.0.0'} peerDependencies: webpack: ^5.76.0 @@ -2803,6 +3198,7 @@ packages: are-we-there-yet@1.1.7: resolution: {integrity: sha512-nxwy40TuMiUGqMyRHgCSWZ9FM4VAoRP4xUYSTv5ImRog+h9yISPbVH7H8fASCIzYn9wlEv4zvFL7uKDMCFQm3g==} + deprecated: This package is no longer supported. argparse@1.0.10: resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} @@ -3056,6 +3452,7 @@ packages: boolean@3.2.0: resolution: {integrity: sha512-d0II/GO9uf9lfUHH2BQsjxzRJZBdsjgsBiW4BvhWk/3qoKwQFjIDVN19PfX8F2D/r9PCMTtLWjYVCFrpeYUzsw==} + deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. boxen@1.3.0: resolution: {integrity: sha512-TNPjfTr432qx7yOjQyaXm3dSR0MH9vXp7eT1BFSl/C51g+EFnOR9hTg1IreahGBmDNCehscshe45f+C1TBZbLw==} @@ -3072,9 +3469,15 @@ packages: brace-expansion@1.1.11: resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} + brace-expansion@1.1.15: + resolution: {integrity: sha512-EwOCDEex4quD37XhqM3omwtMoJjr//isUZz1JopUNWms+4Z2ViyM/k1YIRePpoVNnQhENnxtFjLaxNHrT7xIUg==} + brace-expansion@2.0.1: resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} + brace-expansion@2.1.1: + resolution: {integrity: sha512-WR1cURNjuvBLMZBMbqM0UoE+WAfdUcEV1ccD8PVBVOI+Z3ND4+SZbN8RsfT2bMuG1qwz5RFvPukSZm5fF2D5eA==} + braces@3.0.2: resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} engines: {node: '>=8'} @@ -3102,6 +3505,10 @@ packages: buffer-from@1.1.2: resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} + buffer-image-size@0.6.4: + resolution: {integrity: sha512-nEh+kZOPY1w+gcCMobZ6ETUp9WfibndnosbpwB1iJk/8Gt5ZF2bhS6+B6bPYz424KtwsR6Rflc3tCz1/ghX2dQ==} + engines: {node: '>=4.0'} + buffer@5.7.1: resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==} @@ -3514,6 +3921,15 @@ packages: resolution: {integrity: sha512-3rTMnFJA1tCOPwRxtgF4wd7Ab2qvDbL8jX+3smjIbS4HlZBagTlpERbdN7iAbWlrfxE3M8c27kTwTawQ7st+OQ==} engines: {node: '>=14'} + cosmiconfig@8.3.6: + resolution: {integrity: sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA==} + engines: {node: '>=14'} + peerDependencies: + typescript: '>=4.9.5' + peerDependenciesMeta: + typescript: + optional: true + create-error-class@3.0.2: resolution: {integrity: sha512-gYTKKexFO3kh200H1Nit76sRwRtOY32vQd3jpAQKpLtZqyNsSQNfI4N7o3eP2wUjV35pTWKRYqFUDBvUha/Pkw==} engines: {node: '>=0.10.0'} @@ -3867,6 +4283,10 @@ packages: resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} engines: {node: '>=0.12'} + entities@7.0.1: + resolution: {integrity: sha512-TWrgLOFUQTH994YUyl1yT4uyavY5nNB5muff+RtWaqNVCAK408b5ZnnbNAUEWLTCpum9w6arT70i1XdQ4UeOPA==} + engines: {node: '>=0.12'} + envinfo@7.8.1: resolution: {integrity: sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw==} engines: {node: '>=4'} @@ -4312,6 +4732,7 @@ packages: eslint@8.54.0: resolution: {integrity: sha512-NY0DfAkM8BIZDVl6PgSa1ttZbx3xHgJzSNJKYcQglem6CppHyMhRIQkBVSSMaSRnLhig3jsDbEzOjwCVt4AmmA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + deprecated: This version is no longer supported. Please see https://eslint.org/version-support for other options. hasBin: true espree@9.6.1: @@ -4591,6 +5012,7 @@ packages: fstream@1.0.12: resolution: {integrity: sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg==} engines: {node: '>=0.6'} + deprecated: This package is no longer supported. function-bind@1.1.2: resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} @@ -4604,6 +5026,7 @@ packages: gauge@2.7.4: resolution: {integrity: sha512-14x4kjc6lkD3ltw589k0NrPD6cCNTD6CWoVUNpB85+DrtONoZn+Rug6xZU5RvSC4+TZPxA5AnBibQYAvZn41Hg==} + deprecated: This package is no longer supported. gensync@1.0.0-beta.2: resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} @@ -4680,13 +5103,16 @@ packages: glob@7.1.6: resolution: {integrity: sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==} + deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me glob@7.2.3: resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} + deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me glob@8.1.0: resolution: {integrity: sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==} engines: {node: '>=12'} + deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me global-agent@3.0.0: resolution: {integrity: sha512-PT6XReJ+D07JvGoxQMkT6qji/jVNfX/h364XHZOWeRzy64sSFr+xJ5OX7LI3b4MPQzdL4H8Y8M0xzPpsVMwA8Q==} @@ -4754,6 +5180,10 @@ packages: handle-thing@2.0.1: resolution: {integrity: sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg==} + happy-dom@20.10.3: + resolution: {integrity: sha512-Hjdiy8RziuCcn5z04QI/rlsNuQoG8P0xxjgvsSMpi89cvIXIOcucQtiHS1yHSShxoBcSCeYqAskINmTiy/mlfw==} + engines: {node: '>=20.0.0'} + happy-dom@20.3.7: resolution: {integrity: sha512-sb5IzoRl1WJKsUSRe+IloJf3z1iDq5PQ7Yk/ULMsZ5IAQEs9ZL7RsFfiKBXU7nK9QmO+iz0e59EH8r8jexTZ/g==} engines: {node: '>=20.0.0'} @@ -5002,6 +5432,10 @@ packages: resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} engines: {node: '>=6'} + import-fresh@3.3.1: + resolution: {integrity: sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==} + engines: {node: '>=6'} + import-lazy@2.1.0: resolution: {integrity: sha512-m7ZEHgtw69qOGw+jwxXkHlrlIPdTGkyh66zXZ1ajZbxkDBNjSY/LGbmjc7h0s2ELsUDTAhFr55TrPSSqJGPG0A==} engines: {node: '>=4'} @@ -5036,6 +5470,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==} @@ -5562,6 +5997,10 @@ packages: resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} hasBin: true + js-yaml@4.2.0: + resolution: {integrity: sha512-ePWsvanv0DWuDRsW8dnt+R4jQ31SCRCQ7hhNcPXZPsoBZiemuZNYGf7adZdqX2D86j6rvKp3RpCxVTSb8WQlOw==} + hasBin: true + jsbn@0.1.1: resolution: {integrity: sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==} @@ -5648,6 +6087,7 @@ packages: keygrip@1.1.0: resolution: {integrity: sha512-iYSchDJ+liQ8iwbSI2QqsQOvqv58eJCEanyJPJi+Khyu8smkcKSFUCbPwzFcL7YVtZ6eONjqRX/38caJ7QjRAQ==} engines: {node: '>= 0.6'} + deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. keyv@4.5.3: resolution: {integrity: sha512-QCiSav9WaX1PgETJ+SpNnx2PRRapJ/oRSXM4VO5OGYGSjrxbKPVFVhB3l2OCbLCk329N8qyAtsJjSjvVBWzEug==} @@ -5690,7 +6130,7 @@ packages: koa-router@7.4.0: resolution: {integrity: sha512-IWhaDXeAnfDBEpWS6hkGdZ1ablgr6Q6pGdXCyK38RbzuH4LkUOpPqPw+3f8l8aTDrQmBQ7xJc0bs2yV4dzcO+g==} engines: {node: '>= 4'} - deprecated: '**IMPORTANT 10x+ PERFORMANCE UPGRADE**: Please upgrade to v12.0.1+ as we have fixed an issue with debuglog causing 10x slower router benchmark performance, see https://github.com/koajs/router/pull/173' + deprecated: 'Please use @koa/router instead, starting from v9! ' koa-send@5.0.1: resolution: {integrity: sha512-tmcyQ/wXXuxpDxyNXv5yNNkdAMdFRqwtegBXUaowiQzUKqJehttS0x2j0eOZDQAyloAth5w6wwBImnFzkUz3pQ==} @@ -6128,6 +6568,9 @@ packages: minimatch@3.1.2: resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} + minimatch@3.1.5: + resolution: {integrity: sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==} + minimatch@5.1.6: resolution: {integrity: sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==} engines: {node: '>=10'} @@ -6140,6 +6583,10 @@ packages: resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} engines: {node: '>=16 || 14 >=14.17'} + minimatch@9.0.9: + resolution: {integrity: sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==} + engines: {node: '>=16 || 14 >=14.17'} + minimist-options@3.0.2: resolution: {integrity: sha512-FyBrT/d0d4+uiZRbqznPXqw3IpZZG3gl3wKWiX784FycUKVwBt0uLBFkQrtE4tZOrgo78nZp2jnKz3L65T5LdQ==} engines: {node: '>= 4'} @@ -6233,6 +6680,7 @@ packages: node-domexception@1.0.0: resolution: {integrity: sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==} engines: {node: '>=10.5.0'} + deprecated: Use your platform's native DOMException instead node-fetch@2.6.7: resolution: {integrity: sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==} @@ -6398,6 +6846,17 @@ packages: outdent@0.5.0: resolution: {integrity: sha512-/jHxFIzoMXdqPzTaCpFzAAWhpkSjZPF4Vsn6jAfNpmbH/ymsmd7Qc6VE9BGn0L6YMj6uwpQLxCECpus4ukKS9Q==} + oxc-parser@0.131.0: + resolution: {integrity: sha512-SJ3/7ZPbgie8dr5Z9BI/M51zZbpXba+hRSG0MDzVwMW5CRQg2fjYE0jHGlLX4eeiibGgC/mzoDFKSDHwVZEHRQ==} + engines: {node: ^20.19.0 || >=22.12.0} + + oxc-resolver@11.19.1: + resolution: {integrity: sha512-qE/CIg/spwrTBFt5aKmwe3ifeDdLfA2NESN30E42X/lII5ClF8V7Wt6WIJhcGZjp0/Q+nQ+9vgxGk//xZNX2hg==} + + oxc-transform@0.131.0: + resolution: {integrity: sha512-ml0/elXPNnDnuHo3VHmEMN2fnybmKx7YL+0E+gMQ0fuHRZHXYJzF6YJ01KsCWg6FXY6pbZcjm7DC3xwGHnB/BA==} + engines: {node: ^20.19.0 || >=22.12.0} + p-filter@2.1.0: resolution: {integrity: sha512-ZBxxZ5sL2HghephhpGAQdoskxplTwr7ICaehZwLIlfL6acuVgZPm8yBNuRAFBGEqtD/hmUeq9eqLg2ys9Xr/yw==} engines: {node: '>=8'} @@ -6786,6 +7245,10 @@ packages: q@1.5.1: resolution: {integrity: sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw==} engines: {node: '>=0.6.0', teleport: '>=0.2.0'} + deprecated: |- + You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now. Thank you literally everyone for joining me in this bet against the odds. Be excellent to each other. + + (For a CapTP with native promises, see @endo/eventual-send and @endo/captp) qs@6.13.0: resolution: {integrity: sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==} @@ -7109,10 +7572,12 @@ packages: rimraf@2.7.1: resolution: {integrity: sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==} + deprecated: Rimraf versions prior to v4 are no longer supported hasBin: true rimraf@3.0.2: resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} + deprecated: Rimraf versions prior to v4 are no longer supported hasBin: true roarr@2.15.4: @@ -7377,9 +7842,14 @@ packages: resolution: {integrity: sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==} engines: {node: '>= 8'} + source-map@0.7.6: + resolution: {integrity: sha512-i5uvt8C3ikiWeNZSVZNWcfZPItFQOsYTUAOkcUPGd8DqDy1uOUikjt5dG+uRlwyvR108Fb9DOd4GvXfT0N2/uQ==} + engines: {node: '>= 12'} + source-map@0.8.0-beta.0: resolution: {integrity: sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA==} engines: {node: '>= 8'} + deprecated: The work that was done in this beta branch won't be included in future versions sourcemap-codec@1.4.8: resolution: {integrity: sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==} @@ -7589,6 +8059,9 @@ packages: stylis@4.3.0: resolution: {integrity: sha512-E87pIogpwUsUwXw7dNyU4QDjdgVMy52m+XEOPEKUn161cCzWjjhPSQhByfd1CcNvrOLnXQ6OnnZDwnJrz/Z4YQ==} + stylis@4.4.0: + resolution: {integrity: sha512-5Z9ZpRzfuH6l/UAvCPAPUo3665Nk2wLaZU3x+TLHKVzIz33+sbJqbtrYoC3KD4/uVOr2Zp+L0LySezP9OHV9yA==} + sucrase@3.34.0: resolution: {integrity: sha512-70/LQEZ07TEcxiU2dz51FKaE6hCTWC6vr7FOk3Gr0U60C3shtAN+H+BFr9XlYe5xqf3RA8nrc+VIwzCfnxuXJw==} engines: {node: '>=8'} @@ -7656,6 +8129,7 @@ packages: tar@6.2.0: resolution: {integrity: sha512-/Wo7DcT0u5HUV486xg675HtjNd3BXZ6xDbzsCUZPt5iw8bTQ63bP0Raut3mvro9u+CUyq7YQd8Cx55fsZXxqLQ==} engines: {node: '>=10'} + deprecated: Old versions of tar are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me teeny-request@7.1.1: resolution: {integrity: sha512-iwY6rkW5DDGq8hE2YgNQlKbptYpY5Nn2xecjQiNjOXWbKzPGUfmeUBCSQbbr306d7Z7U2N0TPl+/SwYRfua1Dg==} @@ -7842,6 +8316,9 @@ packages: tslib@2.6.2: resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} + tslib@2.8.1: + resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} + tslint@5.14.0: resolution: {integrity: sha512-IUla/ieHVnB8Le7LdQFRGlVJid2T/gaJe5VkjzRVSRR6pA2ODYrnfR1hmxi+5+au9l50jBwpbBL34txgv4NnTQ==} engines: {node: '>=4.8.0'} @@ -7999,6 +8476,9 @@ packages: undici-types@7.16.0: resolution: {integrity: sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==} + undici-types@7.24.6: + resolution: {integrity: sha512-WRNW+sJgj5OBN4/0JpHFqtqzhpbnV0GuB+OozA9gCL7a993SmU+1JBZCzLNxYsbMfIeDL+lTsphD5jN5N+n0zg==} + unherit@3.0.1: resolution: {integrity: sha512-akOOQ/Yln8a2sgcLj4U0Jmx0R5jpIg2IUyRrWOzmEbjBtGzBdHtSeFKgoEcoH4KYIG/Pb8GQ/BwtYm0GCq1Sqg==} @@ -8496,6 +8976,18 @@ packages: utf-8-validate: optional: true + ws@8.21.0: + resolution: {integrity: sha512-Vsp28b7DRcimFQvrqu2Wek3z1iYxDCWqHYB8Qsnk/S4RfaCQzPGPyBNuVjJV3cd6UiKtUtp6sNM77gWvzcCH+g==} + engines: {node: '>=10.0.0'} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: '>=5.0.2' + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + ws@8.7.0: resolution: {integrity: sha512-c2gsP0PRwcLFzUiA8Mkr37/MI7ilIlHQxaEAtd0uNMbVMoy8puJyafRlm0bV9MbGSabUPeLrRRaqIBcFcA2Pqg==} engines: {node: '>=10.0.0'} @@ -8646,11 +9138,11 @@ snapshots: dependencies: prismjs: 1.29.0 - '@astrojs/solid-js@1.2.3(@babel/core@7.23.5)(solid-js@1.6.2)(vite@3.2.7(@types/node@25.0.10)(terser@5.39.0))': + '@astrojs/solid-js@1.2.3(@babel/core@7.23.5)(solid-js@1.6.2)(vite@3.2.7(@types/node@25.9.3)(terser@5.39.0))': dependencies: babel-preset-solid: 1.6.3(@babel/core@7.23.5) solid-js: 1.6.2 - vitefu: 0.2.3(vite@3.2.7(@types/node@25.0.10)(terser@5.39.0)) + vitefu: 0.2.3(vite@3.2.7(@types/node@25.9.3)(terser@5.39.0)) transitivePeerDependencies: - '@babel/core' - vite @@ -9813,6 +10305,19 @@ snapshots: '@emmetio/scanner@1.0.0': {} + '@emnapi/core@1.10.0': + dependencies: + '@emnapi/wasi-threads': 1.2.1 + tslib: 2.6.2 + + '@emnapi/runtime@1.10.0': + dependencies: + tslib: 2.6.2 + + '@emnapi/wasi-threads@1.2.1': + dependencies: + tslib: 2.6.2 + '@emotion/is-prop-valid@1.2.0': dependencies: '@emotion/memoize': 0.8.0 @@ -10023,7 +10528,7 @@ snapshots: '@jest/test-result': 29.6.2 '@jest/transform': 29.6.2 '@jest/types': 29.6.1 - '@jridgewell/trace-mapping': 0.3.20 + '@jridgewell/trace-mapping': 0.3.25 '@types/node': 17.0.39 chalk: 4.1.2 collect-v8-coverage: 1.0.2 @@ -10051,7 +10556,7 @@ snapshots: '@jest/source-map@29.6.0': dependencies: - '@jridgewell/trace-mapping': 0.3.20 + '@jridgewell/trace-mapping': 0.3.25 callsites: 3.1.0 graceful-fs: 4.2.11 @@ -10098,6 +10603,11 @@ snapshots: '@types/yargs': 17.0.24 chalk: 4.1.2 + '@jridgewell/gen-mapping@0.3.13': + dependencies: + '@jridgewell/sourcemap-codec': 1.5.5 + '@jridgewell/trace-mapping': 0.3.31 + '@jridgewell/gen-mapping@0.3.3': dependencies: '@jridgewell/set-array': 1.1.2 @@ -10110,16 +10620,23 @@ snapshots: '@jridgewell/sourcemap-codec': 1.4.15 '@jridgewell/trace-mapping': 0.3.25 + '@jridgewell/remapping@2.3.5': + dependencies: + '@jridgewell/gen-mapping': 0.3.13 + '@jridgewell/trace-mapping': 0.3.31 + '@jridgewell/resolve-uri@3.1.1': {} + '@jridgewell/resolve-uri@3.1.2': {} + '@jridgewell/set-array@1.1.2': {} '@jridgewell/set-array@1.2.1': {} '@jridgewell/source-map@0.3.2': dependencies: - '@jridgewell/gen-mapping': 0.3.3 - '@jridgewell/trace-mapping': 0.3.20 + '@jridgewell/gen-mapping': 0.3.8 + '@jridgewell/trace-mapping': 0.3.25 '@jridgewell/source-map@0.3.6': dependencies: @@ -10128,6 +10645,8 @@ snapshots: '@jridgewell/sourcemap-codec@1.4.15': {} + '@jridgewell/sourcemap-codec@1.5.5': {} + '@jridgewell/trace-mapping@0.3.20': dependencies: '@jridgewell/resolve-uri': 3.1.1 @@ -10138,6 +10657,11 @@ snapshots: '@jridgewell/resolve-uri': 3.1.1 '@jridgewell/sourcemap-codec': 1.4.15 + '@jridgewell/trace-mapping@0.3.31': + dependencies: + '@jridgewell/resolve-uri': 3.1.2 + '@jridgewell/sourcemap-codec': 1.5.5 + '@leichtgewicht/ip-codec@2.0.4': {} '@ljharb/has-package-exports-patterns@0.0.2': {} @@ -10164,6 +10688,13 @@ snapshots: mkdirp: 0.5.6 rimraf: 2.7.1 + '@napi-rs/wasm-runtime@1.1.5(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)': + dependencies: + '@emnapi/core': 1.10.0 + '@emnapi/runtime': 1.10.0 + '@tybys/wasm-util': 0.10.2 + optional: true + '@nicolo-ribaudo/chokidar-2@2.1.8-no-fsevents.3': optional: true @@ -10183,6 +10714,201 @@ snapshots: '@nodelib/fs.scandir': 2.1.5 fastq: 1.15.0 + '@oxc-parser/binding-android-arm-eabi@0.131.0': + optional: true + + '@oxc-parser/binding-android-arm64@0.131.0': + optional: true + + '@oxc-parser/binding-darwin-arm64@0.131.0': + optional: true + + '@oxc-parser/binding-darwin-x64@0.131.0': + optional: true + + '@oxc-parser/binding-freebsd-x64@0.131.0': + optional: true + + '@oxc-parser/binding-linux-arm-gnueabihf@0.131.0': + optional: true + + '@oxc-parser/binding-linux-arm-musleabihf@0.131.0': + optional: true + + '@oxc-parser/binding-linux-arm64-gnu@0.131.0': + optional: true + + '@oxc-parser/binding-linux-arm64-musl@0.131.0': + optional: true + + '@oxc-parser/binding-linux-ppc64-gnu@0.131.0': + optional: true + + '@oxc-parser/binding-linux-riscv64-gnu@0.131.0': + optional: true + + '@oxc-parser/binding-linux-riscv64-musl@0.131.0': + optional: true + + '@oxc-parser/binding-linux-s390x-gnu@0.131.0': + optional: true + + '@oxc-parser/binding-linux-x64-gnu@0.131.0': + optional: true + + '@oxc-parser/binding-linux-x64-musl@0.131.0': + optional: true + + '@oxc-parser/binding-openharmony-arm64@0.131.0': + optional: true + + '@oxc-parser/binding-wasm32-wasi@0.131.0': + dependencies: + '@emnapi/core': 1.10.0 + '@emnapi/runtime': 1.10.0 + '@napi-rs/wasm-runtime': 1.1.5(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0) + optional: true + + '@oxc-parser/binding-win32-arm64-msvc@0.131.0': + optional: true + + '@oxc-parser/binding-win32-ia32-msvc@0.131.0': + optional: true + + '@oxc-parser/binding-win32-x64-msvc@0.131.0': + optional: true + + '@oxc-project/types@0.131.0': {} + + '@oxc-resolver/binding-android-arm-eabi@11.19.1': + optional: true + + '@oxc-resolver/binding-android-arm64@11.19.1': + optional: true + + '@oxc-resolver/binding-darwin-arm64@11.19.1': + optional: true + + '@oxc-resolver/binding-darwin-x64@11.19.1': + optional: true + + '@oxc-resolver/binding-freebsd-x64@11.19.1': + optional: true + + '@oxc-resolver/binding-linux-arm-gnueabihf@11.19.1': + optional: true + + '@oxc-resolver/binding-linux-arm-musleabihf@11.19.1': + optional: true + + '@oxc-resolver/binding-linux-arm64-gnu@11.19.1': + optional: true + + '@oxc-resolver/binding-linux-arm64-musl@11.19.1': + optional: true + + '@oxc-resolver/binding-linux-ppc64-gnu@11.19.1': + optional: true + + '@oxc-resolver/binding-linux-riscv64-gnu@11.19.1': + optional: true + + '@oxc-resolver/binding-linux-riscv64-musl@11.19.1': + optional: true + + '@oxc-resolver/binding-linux-s390x-gnu@11.19.1': + optional: true + + '@oxc-resolver/binding-linux-x64-gnu@11.19.1': + optional: true + + '@oxc-resolver/binding-linux-x64-musl@11.19.1': + optional: true + + '@oxc-resolver/binding-openharmony-arm64@11.19.1': + optional: true + + '@oxc-resolver/binding-wasm32-wasi@11.19.1(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)': + dependencies: + '@napi-rs/wasm-runtime': 1.1.5(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0) + transitivePeerDependencies: + - '@emnapi/core' + - '@emnapi/runtime' + optional: true + + '@oxc-resolver/binding-win32-arm64-msvc@11.19.1': + optional: true + + '@oxc-resolver/binding-win32-ia32-msvc@11.19.1': + optional: true + + '@oxc-resolver/binding-win32-x64-msvc@11.19.1': + optional: true + + '@oxc-transform/binding-android-arm-eabi@0.131.0': + optional: true + + '@oxc-transform/binding-android-arm64@0.131.0': + optional: true + + '@oxc-transform/binding-darwin-arm64@0.131.0': + optional: true + + '@oxc-transform/binding-darwin-x64@0.131.0': + optional: true + + '@oxc-transform/binding-freebsd-x64@0.131.0': + optional: true + + '@oxc-transform/binding-linux-arm-gnueabihf@0.131.0': + optional: true + + '@oxc-transform/binding-linux-arm-musleabihf@0.131.0': + optional: true + + '@oxc-transform/binding-linux-arm64-gnu@0.131.0': + optional: true + + '@oxc-transform/binding-linux-arm64-musl@0.131.0': + optional: true + + '@oxc-transform/binding-linux-ppc64-gnu@0.131.0': + optional: true + + '@oxc-transform/binding-linux-riscv64-gnu@0.131.0': + optional: true + + '@oxc-transform/binding-linux-riscv64-musl@0.131.0': + optional: true + + '@oxc-transform/binding-linux-s390x-gnu@0.131.0': + optional: true + + '@oxc-transform/binding-linux-x64-gnu@0.131.0': + optional: true + + '@oxc-transform/binding-linux-x64-musl@0.131.0': + optional: true + + '@oxc-transform/binding-openharmony-arm64@0.131.0': + optional: true + + '@oxc-transform/binding-wasm32-wasi@0.131.0': + dependencies: + '@emnapi/core': 1.10.0 + '@emnapi/runtime': 1.10.0 + '@napi-rs/wasm-runtime': 1.1.5(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0) + optional: true + + '@oxc-transform/binding-win32-arm64-msvc@0.131.0': + optional: true + + '@oxc-transform/binding-win32-ia32-msvc@0.131.0': + optional: true + + '@oxc-transform/binding-win32-x64-msvc@0.131.0': + optional: true + '@pkgr/utils@2.4.2': dependencies: cross-spawn: 7.0.3 @@ -10287,7 +11013,7 @@ snapshots: '@rollup/pluginutils@5.3.0(rollup@4.56.0)': dependencies: - '@types/estree': 1.0.6 + '@types/estree': 1.0.8 estree-walker: 2.0.2 picomatch: 4.0.3 optionalDependencies: @@ -10423,9 +11149,14 @@ snapshots: '@tootallnate/once@1.1.2': {} + '@tybys/wasm-util@0.10.2': + dependencies: + tslib: 2.8.1 + optional: true + '@types/acorn@4.0.6': dependencies: - '@types/estree': 1.0.1 + '@types/estree': 1.0.8 '@types/babel__core@7.20.5': dependencies: @@ -10482,11 +11213,11 @@ snapshots: '@types/estree-jsx@0.0.1': dependencies: - '@types/estree': 1.0.1 + '@types/estree': 1.0.8 '@types/estree-jsx@1.0.0': dependencies: - '@types/estree': 1.0.1 + '@types/estree': 1.0.8 '@types/estree@1.0.1': {} @@ -10576,6 +11307,10 @@ snapshots: dependencies: undici-types: 7.16.0 + '@types/node@25.9.3': + dependencies: + undici-types: 7.24.6 + '@types/normalize-package-data@2.4.1': {} '@types/parse-json@4.0.0': {} @@ -10818,7 +11553,7 @@ snapshots: '@ungap/structured-clone@1.2.0': {} - '@vitejs/plugin-react@2.1.0(vite@3.2.10(@types/node@25.0.10)(terser@5.39.0))': + '@vitejs/plugin-react@2.1.0(vite@3.2.10(@types/node@25.9.3)(terser@5.39.0))': dependencies: '@babel/core': 7.23.5 '@babel/plugin-transform-react-jsx': 7.23.4(@babel/core@7.23.5) @@ -10827,7 +11562,7 @@ snapshots: '@babel/plugin-transform-react-jsx-source': 7.18.6(@babel/core@7.23.5) magic-string: 0.26.7 react-refresh: 0.14.0 - vite: 3.2.10(@types/node@25.0.10)(terser@5.39.0) + vite: 3.2.10(@types/node@25.9.3)(terser@5.39.0) transitivePeerDependencies: - supports-color @@ -10947,99 +11682,133 @@ snapshots: webpack: 5.98.0(@swc/core@1.3.20)(esbuild@0.18.20)(webpack-cli@5.0.0) webpack-cli: 5.0.0(webpack@5.98.0) - '@wyw-in-js/babel-preset@1.0.6': + '@wyw-in-js/babel-preset@2.0.0(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)': dependencies: '@babel/core': 7.23.5 - '@wyw-in-js/transform': 1.0.6 + '@wyw-in-js/shared': 2.0.0 + '@wyw-in-js/transform': 2.0.0(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0) transitivePeerDependencies: + - '@emnapi/core' + - '@emnapi/runtime' - bufferutil - supports-color - utf-8-validate - '@wyw-in-js/esbuild@1.0.6(esbuild@0.15.16)': + '@wyw-in-js/esbuild@2.0.0(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)(esbuild@0.15.16)': dependencies: - '@wyw-in-js/shared': 1.0.4 - '@wyw-in-js/transform': 1.0.6 + '@wyw-in-js/shared': 2.0.0 + '@wyw-in-js/transform': 2.0.0(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0) esbuild: 0.15.16 + oxc-transform: 0.131.0 transitivePeerDependencies: + - '@emnapi/core' + - '@emnapi/runtime' - bufferutil - supports-color - utf-8-validate - '@wyw-in-js/processor-utils@1.0.4': + '@wyw-in-js/processor-utils@2.0.0': dependencies: - '@babel/generator': 7.23.5 - '@wyw-in-js/shared': 1.0.4 + '@wyw-in-js/shared': 2.0.0 transitivePeerDependencies: - supports-color - '@wyw-in-js/rollup@1.0.6(rollup@4.56.0)': + '@wyw-in-js/rollup@2.0.0(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)(rollup@4.56.0)': dependencies: '@rollup/pluginutils': 5.3.0(rollup@4.56.0) - '@wyw-in-js/shared': 1.0.4 - '@wyw-in-js/transform': 1.0.6 + '@wyw-in-js/shared': 2.0.0 + '@wyw-in-js/transform': 2.0.0(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0) rollup: 4.56.0 transitivePeerDependencies: + - '@emnapi/core' + - '@emnapi/runtime' - bufferutil - supports-color - utf-8-validate - '@wyw-in-js/shared@1.0.4': + '@wyw-in-js/shared@2.0.0': dependencies: debug: 4.3.4 find-up: 5.0.0 - minimatch: 9.0.3 + minimatch: 9.0.5 transitivePeerDependencies: - supports-color - '@wyw-in-js/transform@1.0.6': + '@wyw-in-js/transform@2.0.0(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)': dependencies: - '@babel/core': 7.23.5 - '@babel/generator': 7.23.5 - '@babel/helper-module-imports': 7.22.15 - '@babel/plugin-transform-modules-commonjs': 7.23.3(@babel/core@7.23.5) - '@babel/template': 7.22.15 - '@babel/traverse': 7.23.5 - '@babel/types': 7.23.5 - '@wyw-in-js/processor-utils': 1.0.4 - '@wyw-in-js/shared': 1.0.4 + '@jridgewell/remapping': 2.3.5 + '@wyw-in-js/processor-utils': 2.0.0 + '@wyw-in-js/shared': 2.0.0 cosmiconfig: 8.2.0 happy-dom: 20.3.7 minimatch: 9.0.5 + oxc-parser: 0.131.0 + oxc-resolver: 11.19.1(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0) + oxc-transform: 0.131.0 source-map: 0.7.4 stylis: 4.3.0 ts-invariant: 0.10.3 transitivePeerDependencies: + - '@emnapi/core' + - '@emnapi/runtime' - bufferutil - supports-color - utf-8-validate - '@wyw-in-js/vite@1.0.6(vite@3.2.10(@types/node@25.0.10)(terser@5.39.0))': + '@wyw-in-js/transform@2.0.2(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)(typescript@5.2.2)': + dependencies: + '@jridgewell/remapping': 2.3.5 + '@wyw-in-js/processor-utils': 2.0.0 + '@wyw-in-js/shared': 2.0.0 + cosmiconfig: 8.3.6(typescript@5.2.2) + happy-dom: 20.10.3 + minimatch: 9.0.9 + oxc-parser: 0.131.0 + oxc-resolver: 11.19.1(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0) + oxc-transform: 0.131.0 + source-map: 0.7.6 + stylis: 4.4.0 + ts-invariant: 0.10.3 + transitivePeerDependencies: + - '@emnapi/core' + - '@emnapi/runtime' + - bufferutil + - supports-color + - typescript + - utf-8-validate + + '@wyw-in-js/vite@2.0.0(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)(vite@3.2.10(@types/node@25.9.3)(terser@5.39.0))': dependencies: - '@wyw-in-js/shared': 1.0.4 - '@wyw-in-js/transform': 1.0.6 - vite: 3.2.10(@types/node@25.0.10)(terser@5.39.0) + '@wyw-in-js/shared': 2.0.0 + '@wyw-in-js/transform': 2.0.0(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0) + vite: 3.2.10(@types/node@25.9.3)(terser@5.39.0) transitivePeerDependencies: + - '@emnapi/core' + - '@emnapi/runtime' - bufferutil - supports-color - utf-8-validate - '@wyw-in-js/vite@1.0.6(vite@3.2.7(@types/node@25.0.10)(terser@5.39.0))': + '@wyw-in-js/vite@2.0.0(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)(vite@3.2.7(@types/node@25.9.3)(terser@5.39.0))': dependencies: - '@wyw-in-js/shared': 1.0.4 - '@wyw-in-js/transform': 1.0.6 - vite: 3.2.7(@types/node@25.0.10)(terser@5.39.0) + '@wyw-in-js/shared': 2.0.0 + '@wyw-in-js/transform': 2.0.0(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0) + vite: 3.2.7(@types/node@25.9.3)(terser@5.39.0) transitivePeerDependencies: + - '@emnapi/core' + - '@emnapi/runtime' - bufferutil - supports-color - utf-8-validate - '@wyw-in-js/webpack-loader@1.0.6(webpack@5.98.0)': + '@wyw-in-js/webpack-loader@2.0.0(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)(webpack@5.98.0)': dependencies: - '@wyw-in-js/shared': 1.0.4 - '@wyw-in-js/transform': 1.0.6 - webpack: 5.98.0(@swc/core@1.3.20)(esbuild@0.18.20)(webpack-cli@5.0.0) + '@wyw-in-js/shared': 2.0.0 + '@wyw-in-js/transform': 2.0.0(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0) + webpack: 5.98.0(@swc/core@1.3.20)(esbuild@0.18.20)(webpack-cli@4.9.2) transitivePeerDependencies: + - '@emnapi/core' + - '@emnapi/runtime' - bufferutil - supports-color - utf-8-validate @@ -11270,7 +12039,7 @@ snapshots: astral-regex@2.0.0: {} - astro@1.6.10(@types/node@25.0.10)(terser@5.39.0): + astro@1.6.10(@types/node@25.9.3)(terser@5.39.0): dependencies: '@astrojs/compiler': 0.29.17 '@astrojs/language-server': 0.28.3 @@ -11329,8 +12098,8 @@ snapshots: typescript: 5.2.2 unist-util-visit: 4.1.1 vfile: 5.3.6 - vite: 3.2.7(@types/node@25.0.10)(terser@5.39.0) - vitefu: 0.2.3(vite@3.2.7(@types/node@25.0.10)(terser@5.39.0)) + vite: 3.2.7(@types/node@25.9.3)(terser@5.39.0) + vitefu: 0.2.3(vite@3.2.7(@types/node@25.9.3)(terser@5.39.0)) yargs-parser: 21.1.1 zod: 3.19.1 transitivePeerDependencies: @@ -11593,10 +12362,19 @@ snapshots: balanced-match: 1.0.2 concat-map: 0.0.1 + brace-expansion@1.1.15: + dependencies: + balanced-match: 1.0.2 + concat-map: 0.0.1 + brace-expansion@2.0.1: dependencies: balanced-match: 1.0.2 + brace-expansion@2.1.1: + dependencies: + balanced-match: 1.0.2 + braces@3.0.2: dependencies: fill-range: 7.0.1 @@ -11629,6 +12407,10 @@ snapshots: buffer-from@1.1.2: {} + buffer-image-size@0.6.4: + dependencies: + '@types/node': 17.0.39 + buffer@5.7.1: dependencies: base64-js: 1.5.1 @@ -12027,6 +12809,15 @@ snapshots: parse-json: 5.2.0 path-type: 4.0.0 + cosmiconfig@8.3.6(typescript@5.2.2): + dependencies: + import-fresh: 3.3.1 + js-yaml: 4.2.0 + parse-json: 5.2.0 + path-type: 4.0.0 + optionalDependencies: + typescript: 5.2.2 + create-error-class@3.0.2: dependencies: capture-stack-trace: 1.0.1 @@ -12075,7 +12866,7 @@ snapshots: postcss-modules-values: 4.0.0(postcss@8.4.31) postcss-value-parser: 4.2.0 semver: 7.5.4 - webpack: 5.98.0(@swc/core@1.3.20)(esbuild@0.18.20)(webpack-cli@5.0.0) + webpack: 5.98.0(@swc/core@1.3.20)(esbuild@0.18.20)(webpack-cli@4.9.2) css-select@4.3.0: dependencies: @@ -12338,6 +13129,8 @@ snapshots: entities@4.5.0: {} + entities@7.0.1: {} + envinfo@7.8.1: {} error-ex@1.3.2: @@ -13286,7 +14079,7 @@ snapshots: fs.realpath: 1.0.0 inflight: 1.0.6 inherits: 2.0.4 - minimatch: 3.1.2 + minimatch: 3.1.5 once: 1.4.0 path-is-absolute: 1.0.1 @@ -13396,6 +14189,19 @@ snapshots: handle-thing@2.0.1: {} + happy-dom@20.10.3: + dependencies: + '@types/node': 25.9.3 + '@types/whatwg-mimetype': 3.0.2 + '@types/ws': 8.18.1 + buffer-image-size: 0.6.4 + entities: 7.0.1 + whatwg-mimetype: 3.0.0 + ws: 8.21.0 + transitivePeerDependencies: + - bufferutil + - utf-8-validate + happy-dom@20.3.7: dependencies: '@types/node': 25.0.10 @@ -13717,6 +14523,11 @@ snapshots: parent-module: 1.0.1 resolve-from: 4.0.0 + import-fresh@3.3.1: + dependencies: + parent-module: 1.0.1 + resolve-from: 4.0.0 + import-lazy@2.1.0: {} import-lazy@4.0.0: {} @@ -14400,6 +15211,10 @@ snapshots: dependencies: argparse: 2.0.1 + js-yaml@4.2.0: + dependencies: + argparse: 2.0.1 + jsbn@0.1.1: {} jsesc@0.5.0: {} @@ -15117,7 +15932,7 @@ snapshots: micromark-util-events-to-acorn@1.2.0: dependencies: '@types/acorn': 4.0.6 - '@types/estree': 1.0.1 + '@types/estree': 1.0.8 estree-util-visit: 1.2.0 micromark-util-types: 1.0.2 uvu: 0.5.6 @@ -15199,7 +16014,7 @@ snapshots: mini-css-extract-plugin@2.7.0(webpack@5.98.0): dependencies: schema-utils: 4.0.0 - webpack: 5.98.0(@swc/core@1.3.20)(esbuild@0.18.20)(webpack-cli@5.0.0) + webpack: 5.98.0(@swc/core@1.3.20)(esbuild@0.18.20)(webpack-cli@4.9.2) mini-svg-data-uri@1.4.4: {} @@ -15209,6 +16024,10 @@ snapshots: dependencies: brace-expansion: 1.1.11 + minimatch@3.1.5: + dependencies: + brace-expansion: 1.1.15 + minimatch@5.1.6: dependencies: brace-expansion: 2.0.1 @@ -15221,6 +16040,10 @@ snapshots: dependencies: brace-expansion: 2.0.1 + minimatch@9.0.9: + dependencies: + brace-expansion: 2.1.1 + minimist-options@3.0.2: dependencies: arrify: 1.0.1 @@ -15499,6 +16322,80 @@ snapshots: outdent@0.5.0: {} + oxc-parser@0.131.0: + dependencies: + '@oxc-project/types': 0.131.0 + optionalDependencies: + '@oxc-parser/binding-android-arm-eabi': 0.131.0 + '@oxc-parser/binding-android-arm64': 0.131.0 + '@oxc-parser/binding-darwin-arm64': 0.131.0 + '@oxc-parser/binding-darwin-x64': 0.131.0 + '@oxc-parser/binding-freebsd-x64': 0.131.0 + '@oxc-parser/binding-linux-arm-gnueabihf': 0.131.0 + '@oxc-parser/binding-linux-arm-musleabihf': 0.131.0 + '@oxc-parser/binding-linux-arm64-gnu': 0.131.0 + '@oxc-parser/binding-linux-arm64-musl': 0.131.0 + '@oxc-parser/binding-linux-ppc64-gnu': 0.131.0 + '@oxc-parser/binding-linux-riscv64-gnu': 0.131.0 + '@oxc-parser/binding-linux-riscv64-musl': 0.131.0 + '@oxc-parser/binding-linux-s390x-gnu': 0.131.0 + '@oxc-parser/binding-linux-x64-gnu': 0.131.0 + '@oxc-parser/binding-linux-x64-musl': 0.131.0 + '@oxc-parser/binding-openharmony-arm64': 0.131.0 + '@oxc-parser/binding-wasm32-wasi': 0.131.0 + '@oxc-parser/binding-win32-arm64-msvc': 0.131.0 + '@oxc-parser/binding-win32-ia32-msvc': 0.131.0 + '@oxc-parser/binding-win32-x64-msvc': 0.131.0 + + oxc-resolver@11.19.1(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0): + optionalDependencies: + '@oxc-resolver/binding-android-arm-eabi': 11.19.1 + '@oxc-resolver/binding-android-arm64': 11.19.1 + '@oxc-resolver/binding-darwin-arm64': 11.19.1 + '@oxc-resolver/binding-darwin-x64': 11.19.1 + '@oxc-resolver/binding-freebsd-x64': 11.19.1 + '@oxc-resolver/binding-linux-arm-gnueabihf': 11.19.1 + '@oxc-resolver/binding-linux-arm-musleabihf': 11.19.1 + '@oxc-resolver/binding-linux-arm64-gnu': 11.19.1 + '@oxc-resolver/binding-linux-arm64-musl': 11.19.1 + '@oxc-resolver/binding-linux-ppc64-gnu': 11.19.1 + '@oxc-resolver/binding-linux-riscv64-gnu': 11.19.1 + '@oxc-resolver/binding-linux-riscv64-musl': 11.19.1 + '@oxc-resolver/binding-linux-s390x-gnu': 11.19.1 + '@oxc-resolver/binding-linux-x64-gnu': 11.19.1 + '@oxc-resolver/binding-linux-x64-musl': 11.19.1 + '@oxc-resolver/binding-openharmony-arm64': 11.19.1 + '@oxc-resolver/binding-wasm32-wasi': 11.19.1(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0) + '@oxc-resolver/binding-win32-arm64-msvc': 11.19.1 + '@oxc-resolver/binding-win32-ia32-msvc': 11.19.1 + '@oxc-resolver/binding-win32-x64-msvc': 11.19.1 + transitivePeerDependencies: + - '@emnapi/core' + - '@emnapi/runtime' + + oxc-transform@0.131.0: + optionalDependencies: + '@oxc-transform/binding-android-arm-eabi': 0.131.0 + '@oxc-transform/binding-android-arm64': 0.131.0 + '@oxc-transform/binding-darwin-arm64': 0.131.0 + '@oxc-transform/binding-darwin-x64': 0.131.0 + '@oxc-transform/binding-freebsd-x64': 0.131.0 + '@oxc-transform/binding-linux-arm-gnueabihf': 0.131.0 + '@oxc-transform/binding-linux-arm-musleabihf': 0.131.0 + '@oxc-transform/binding-linux-arm64-gnu': 0.131.0 + '@oxc-transform/binding-linux-arm64-musl': 0.131.0 + '@oxc-transform/binding-linux-ppc64-gnu': 0.131.0 + '@oxc-transform/binding-linux-riscv64-gnu': 0.131.0 + '@oxc-transform/binding-linux-riscv64-musl': 0.131.0 + '@oxc-transform/binding-linux-s390x-gnu': 0.131.0 + '@oxc-transform/binding-linux-x64-gnu': 0.131.0 + '@oxc-transform/binding-linux-x64-musl': 0.131.0 + '@oxc-transform/binding-openharmony-arm64': 0.131.0 + '@oxc-transform/binding-wasm32-wasi': 0.131.0 + '@oxc-transform/binding-win32-arm64-msvc': 0.131.0 + '@oxc-transform/binding-win32-ia32-msvc': 0.131.0 + '@oxc-transform/binding-win32-x64-msvc': 0.131.0 + p-filter@2.1.0: dependencies: p-map: 2.1.0 @@ -16595,6 +17492,8 @@ snapshots: source-map@0.7.4: {} + source-map@0.7.6: {} + source-map@0.8.0-beta.0: dependencies: whatwg-url: 7.1.0 @@ -16868,6 +17767,8 @@ snapshots: stylis@4.3.0: {} + stylis@4.4.0: {} + sucrase@3.34.0: dependencies: '@jridgewell/gen-mapping': 0.3.3 @@ -16990,7 +17891,7 @@ snapshots: schema-utils: 4.3.0 serialize-javascript: 6.0.2 terser: 5.39.0 - webpack: 5.98.0(@swc/core@1.3.20)(esbuild@0.18.20)(webpack-cli@5.0.0) + webpack: 5.98.0(@swc/core@1.3.20)(esbuild@0.18.20)(webpack-cli@4.9.2) optionalDependencies: '@swc/core': 1.3.20 esbuild: 0.18.20 @@ -17134,6 +18035,9 @@ snapshots: tslib@2.6.2: {} + tslib@2.8.1: + optional: true + tslint@5.14.0(typescript@5.2.2): dependencies: babel-code-frame: 6.26.0 @@ -17298,6 +18202,8 @@ snapshots: undici-types@7.16.0: {} + undici-types@7.24.6: {} + unherit@3.0.1: {} unicode-canonical-property-names-ecmascript@2.0.0: {} @@ -17449,7 +18355,7 @@ snapshots: v8-to-istanbul@9.1.0: dependencies: - '@jridgewell/trace-mapping': 0.3.20 + '@jridgewell/trace-mapping': 0.3.25 '@types/istanbul-lib-coverage': 2.0.4 convert-source-map: 1.9.0 @@ -17491,7 +18397,7 @@ snapshots: unist-util-stringify-position: 3.0.2 vfile-message: 3.1.3 - vite-plugin-inspect@0.7.33(rollup@3.29.5)(vite@3.2.7(@types/node@25.0.10)(terser@5.39.0)): + vite-plugin-inspect@0.7.33(rollup@3.29.5)(vite@3.2.7(@types/node@25.9.3)(terser@5.39.0)): dependencies: '@antfu/utils': 0.7.5 '@rollup/pluginutils': 5.0.4(rollup@3.29.5) @@ -17500,12 +18406,12 @@ snapshots: open: 9.1.0 picocolors: 1.0.0 sirv: 2.0.3 - vite: 3.2.7(@types/node@25.0.10)(terser@5.39.0) + vite: 3.2.7(@types/node@25.9.3)(terser@5.39.0) transitivePeerDependencies: - rollup - supports-color - vite-plugin-solid@2.4.0(solid-js@1.6.2)(vite@3.2.10(@types/node@25.0.10)(terser@5.39.0)): + vite-plugin-solid@2.4.0(solid-js@1.6.2)(vite@3.2.10(@types/node@25.9.3)(terser@5.39.0)): dependencies: '@babel/core': 7.23.5 '@babel/preset-typescript': 7.23.3(@babel/core@7.23.5) @@ -17513,12 +18419,12 @@ snapshots: merge-anything: 5.1.4 solid-js: 1.6.2 solid-refresh: 0.4.1(solid-js@1.6.2) - vite: 3.2.10(@types/node@25.0.10)(terser@5.39.0) - vitefu: 0.1.1(vite@3.2.10(@types/node@25.0.10)(terser@5.39.0)) + vite: 3.2.10(@types/node@25.9.3)(terser@5.39.0) + vitefu: 0.1.1(vite@3.2.10(@types/node@25.9.3)(terser@5.39.0)) transitivePeerDependencies: - supports-color - vite-plugin-ssr@0.4.54(vite@3.2.10(@types/node@25.0.10)(terser@5.39.0)): + vite-plugin-ssr@0.4.54(vite@3.2.10(@types/node@25.9.3)(terser@5.39.0)): dependencies: '@brillout/import': 0.2.1 '@brillout/json-serializer': 0.5.3 @@ -17529,37 +18435,37 @@ snapshots: picocolors: 1.0.0 resolve: 1.22.8 symlink-dir: 5.1.0 - vite: 3.2.10(@types/node@25.0.10)(terser@5.39.0) + vite: 3.2.10(@types/node@25.9.3)(terser@5.39.0) - vite@3.2.10(@types/node@25.0.10)(terser@5.39.0): + vite@3.2.10(@types/node@25.9.3)(terser@5.39.0): dependencies: esbuild: 0.15.16 postcss: 8.4.31 resolve: 1.22.8 rollup: 2.79.1 optionalDependencies: - '@types/node': 25.0.10 + '@types/node': 25.9.3 fsevents: 2.3.3 terser: 5.39.0 - vite@3.2.7(@types/node@25.0.10)(terser@5.39.0): + vite@3.2.7(@types/node@25.9.3)(terser@5.39.0): dependencies: esbuild: 0.15.16 postcss: 8.4.31 resolve: 1.22.8 rollup: 2.79.1 optionalDependencies: - '@types/node': 25.0.10 + '@types/node': 25.9.3 fsevents: 2.3.3 terser: 5.39.0 - vitefu@0.1.1(vite@3.2.10(@types/node@25.0.10)(terser@5.39.0)): + vitefu@0.1.1(vite@3.2.10(@types/node@25.9.3)(terser@5.39.0)): optionalDependencies: - vite: 3.2.10(@types/node@25.0.10)(terser@5.39.0) + vite: 3.2.10(@types/node@25.9.3)(terser@5.39.0) - vitefu@0.2.3(vite@3.2.7(@types/node@25.0.10)(terser@5.39.0)): + vitefu@0.2.3(vite@3.2.7(@types/node@25.9.3)(terser@5.39.0)): optionalDependencies: - vite: 3.2.7(@types/node@25.0.10)(terser@5.39.0) + vite: 3.2.7(@types/node@25.9.3)(terser@5.39.0) vscode-css-languageservice@6.1.1: dependencies: @@ -17903,6 +18809,8 @@ snapshots: ws@8.19.0: {} + ws@8.21.0: {} + ws@8.7.0: {} xdg-basedir@3.0.0: {} diff --git a/website/babel.config.js b/website/babel.config.js index 0ed1c17ed..e8bf91978 100644 --- a/website/babel.config.js +++ b/website/babel.config.js @@ -4,7 +4,7 @@ module.exports = { server: { presets: [ require.resolve('@wyw-in-js/babel-preset'), - ['@babel/preset-env', { targets: { node: 12 } }], + ['@babel/preset-env', { targets: { node: 22 } }], ], plugins: [ [ diff --git a/website/babel.server-jsx.config.js b/website/babel.server-jsx.config.js new file mode 100644 index 000000000..463de36cb --- /dev/null +++ b/website/babel.server-jsx.config.js @@ -0,0 +1,3 @@ +module.exports = { + presets: ['@babel/preset-react'], +}; diff --git a/website/package.json b/website/package.json index 765e6c9db..c9be95ac1 100644 --- a/website/package.json +++ b/website/package.json @@ -11,10 +11,10 @@ "scripts": { "build": "pnpm build:client && pnpm build:server", "build:client": "cross-env NODE_ENV=production webpack", - "build:server": "cross-env NODE_ENV=production BABEL_ENV=server babel src --out-dir build", + "build:server": "cross-env NODE_ENV=production babel src --out-dir build-jsx --config-file ./babel.server-jsx.config.js && cross-env NODE_ENV=production BABEL_ENV=server babel build-jsx --out-dir build && del-cli build-jsx", "clean": "pnpm clean:client && pnpm clean:server", - "clean:client": "del dist", - "clean:server": "del build", + "clean:client": "del-cli dist", + "clean:server": "del-cli build build-jsx", "lint:css": "stylelint src/**/*.jsx", "prebuild": "pnpm clean", "prestart": "pnpm -w prepare", @@ -42,8 +42,8 @@ "@babel/cli": "^7.23.4", "@babel/core": "^7.23.5", "@linaria/stylelint": "workspace:^", - "@wyw-in-js/babel-preset": "^1.0.6", - "@wyw-in-js/webpack-loader": "^1.0.6", + "@wyw-in-js/babel-preset": "2.0.0", + "@wyw-in-js/webpack-loader": "2.0.0", "babel-loader": "^8.2.5", "babel-plugin-module-resolver": "^4.1.0", "cross-env": "^7.0.3", diff --git a/website/src/components/Hero.jsx b/website/src/components/Hero.jsx index bc008b120..3b5f90ebf 100644 --- a/website/src/components/Hero.jsx +++ b/website/src/components/Hero.jsx @@ -4,7 +4,7 @@ import { media } from '../styles/utils'; import Container from './Container'; import codeSample from '../../assets/code-sample-v4.png'; -import linariaLogomark from '../../assets/linaria-logomark.svg'; +import linariaLogomark from '../../assets/linaria-logomark.svg?url'; export default function Hero() { return ( diff --git a/website/src/styles/utils.js b/website/src/styles/utils.js index 51fd39d75..6f4e59798 100644 --- a/website/src/styles/utils.js +++ b/website/src/styles/utils.js @@ -3,7 +3,7 @@ export const breakpoints = { large: 1024, }; -export const media = Object.keys(breakpoints).reduce((acc, item) => { - acc[item] = `@media screen and (min-width: ${breakpoints[item]}px)`; - return acc; -}, {}); +export const media = { + medium: `@media screen and (min-width: ${breakpoints.medium}px)`, + large: `@media screen and (min-width: ${breakpoints.large}px)`, +};