An open source design system that's fully customizable and agent ready
TypeScript
chore(deps-dev): bump vitest from 2 to 4 and migrate config (#3850)
Cindy Zhang5493055be549
diff --git a/apps/docsite/package.json b/apps/docsite/package.jsonindex 54a9ee97d3..4de54032a5 100644--- a/apps/docsite/package.json+++ b/apps/docsite/package.json@@ -48,7 +48,7 @@"@types/react-dom": "^19.2.3","autoprefixer": "^10.5.2","typescript": "^6.0.3",- "vitest": "^3.2.1"+ "vitest": "^4.1.9"},"browserslist": ["last 1 Chrome version"diff --git a/internal/eslint-plugin-astryx/boolean-prop-naming.test.mjs b/internal/eslint-plugin-astryx/boolean-prop-naming.test.mjsindex ae319694d9..5d3e90cb8a 100644--- a/internal/eslint-plugin-astryx/boolean-prop-naming.test.mjs+++ b/internal/eslint-plugin-astryx/boolean-prop-naming.test.mjs@@ -5,7 +5,6 @@* @description Tests for the Astryx boolean prop naming ESLint rule.*/-import {describe, it} from 'vitest';import {RuleTester} from 'eslint';import tseslint from 'typescript-eslint';import booleanPropNamingRule from './boolean-prop-naming.js';@@ -19,143 +18,144 @@ const ruleTester = new RuleTester({},});-describe('boolean-prop-naming', () => {- it('passes RuleTester valid/invalid cases', () => {- ruleTester.run('boolean-prop-naming', booleanPropNamingRule, {- valid: [- // ✅ Correct "is" prefix- {- code: `+// RuleTester registers its own describe/it blocks internally, so it+// must run at the top level. Vitest 4 forbids calling suite functions+// (describe/it) from inside another it() callback.+ruleTester.run('boolean-prop-naming', booleanPropNamingRule, {+ valid: [+ // ✅ Correct "is" prefix+ {+ code: `interface ButtonProps {isDisabled?: boolean;}`,- },- // ✅ Correct "has" prefix- {- code: `+ },+ // ✅ Correct "has" prefix+ {+ code: `interface TextInputProps {hasAutoFocus?: boolean;}`,- },- // ✅ Correct "initialIs" prefix- {- code: `+ },+ // ✅ Correct "initialIs" prefix+ {+ code: `interface DialogProps {initialIsOpen?: boolean;}`,- },- // ✅ Correct "initialHas" prefix- {- code: `+ },+ // ✅ Correct "initialHas" prefix+ {+ code: `interface SelectorProps {initialHasSelection?: boolean;}`,- },- // ✅ Correct "defaultIs" prefix- {- code: `+ },+ // ✅ Correct "defaultIs" prefix+ {+ code: `interface CollapsibleProps {defaultIsOpen?: boolean;}`,- },- // ✅ Correct "defaultHas" prefix- {- code: `+ },+ // ✅ Correct "defaultHas" prefix+ {+ code: `interface SelectorProps {defaultHasSelection?: boolean;}`,- },- // ✅ Correct "defaultIs" prefix — expanded- {- code: `+ },+ // ✅ Correct "defaultIs" prefix — expanded+ {+ code: `interface BannerProps {defaultIsExpanded?: boolean;}`,- },- // ✅ Non-boolean prop — should be ignored- {- code: `+ },+ // ✅ Non-boolean prop — should be ignored+ {+ code: `interface ButtonProps {label: string;size?: 'sm' | 'md' | 'lg';}`,- },- // ✅ Boolean in non-Props interface — should be ignored- {- code: `+ },+ // ✅ Boolean in non-Props interface — should be ignored+ {+ code: `interface TableContextValue {striped: boolean;hover: boolean;}`,- },- // ✅ Boolean in non-Props type alias — should be ignored- {- code: `+ },+ // ✅ Boolean in non-Props type alias — should be ignored+ {+ code: `type ItemData = {disabled?: boolean;};`,- },- // ✅ Union type with boolean — should be ignored (not purely boolean)- {- code: `+ },+ // ✅ Union type with boolean — should be ignored (not purely boolean)+ {+ code: `interface HeadingProps {truncateTooltip?: boolean | string;}`,- },- // ✅ aria-* props — excluded- {- code: `+ },+ // ✅ aria-* props — excluded+ {+ code: `interface ButtonProps {'aria-pressed'?: boolean;}`,- },- // ✅ data-* props — excluded- {- code: `+ },+ // ✅ data-* props — excluded+ {+ code: `interface ButtonProps {'data-active'?: boolean;}`,- },- // ✅ value prop — excluded (controlled component pattern)- {- code: `+ },+ // ✅ value prop — excluded (controlled component pattern)+ {+ code: `interface SwitchProps {value: boolean;}`,- },- // ✅ defaultValue prop — excluded- {- code: `+ },+ // ✅ defaultValue prop — excluded+ {+ code: `interface ToggleProps {defaultValue?: boolean;}`,- },- // ✅ Type alias with Props suffix — correct naming- {- code: `+ },+ // ✅ Type alias with Props suffix — correct naming+ {+ code: `type CardProps = {isFullBleed?: boolean;};`,- },- // ✅ Multiple valid props- {- code: `+ },+ // ✅ Multiple valid props+ {+ code: `interface FieldProps {isLabelHidden?: boolean;isOptional?: boolean;@@ -164,182 +164,273 @@ describe('boolean-prop-naming', () => {hasAutoFocus?: boolean;}`,- },- ],+ },+ ],- invalid: [- // ❌ Missing prefix — should suggest "isDisabled"- {- code: `+ invalid: [+ {+ code: `interface ButtonProps {disabled?: boolean;}`,- errors: [+ errors: [+ {+ messageId: 'invalidBooleanPropName',+ data: {+ name: 'disabled',+ interfaceName: 'ButtonProps',+ suggestion: 'isDisabled',+ },+ suggestions: [{- messageId: 'invalidBooleanPropName',- data: {- name: 'disabled',- interfaceName: 'ButtonProps',- suggestion: 'isDisabled',- },+ desc: 'Rename to "isDisabled"',+ output: `+ interface ButtonProps {+ isDisabled?: boolean;+ }+ `,},],},- // ❌ Missing prefix — should suggest "isLoading"- {- code: `+ ],+ },+ {+ code: `interface ButtonProps {loading?: boolean;}`,- errors: [+ errors: [+ {+ messageId: 'invalidBooleanPropName',+ data: {+ name: 'loading',+ interfaceName: 'ButtonProps',+ suggestion: 'isLoading',+ },+ suggestions: [{- messageId: 'invalidBooleanPropName',- data: {- name: 'loading',- interfaceName: 'ButtonProps',- suggestion: 'isLoading',- },+ desc: 'Rename to "isLoading"',+ output: `+ interface ButtonProps {+ isLoading?: boolean;+ }+ `,},],},- // ❌ Missing prefix — should suggest "isInline"- {- code: `+ ],+ },+ {+ code: `interface CenterProps {inline?: boolean;}`,- errors: [+ errors: [+ {+ messageId: 'invalidBooleanPropName',+ data: {+ name: 'inline',+ interfaceName: 'CenterProps',+ suggestion: 'isInline',+ },+ suggestions: [{- messageId: 'invalidBooleanPropName',- data: {- name: 'inline',- interfaceName: 'CenterProps',- suggestion: 'isInline',- },+ desc: 'Rename to "isInline"',+ output: `+ interface CenterProps {+ isInline?: boolean;+ }+ `,},],},- // ❌ Missing prefix — should suggest "isStandalone"- {- code: `+ ],+ },+ {+ code: `interface LinkProps {standalone?: boolean;}`,- errors: [+ errors: [+ {+ messageId: 'invalidBooleanPropName',+ data: {+ name: 'standalone',+ interfaceName: 'LinkProps',+ suggestion: 'isStandalone',+ },+ suggestions: [{- messageId: 'invalidBooleanPropName',- data: {- name: 'standalone',- interfaceName: 'LinkProps',- suggestion: 'isStandalone',- },+ desc: 'Rename to "isStandalone"',+ output: `+ interface LinkProps {+ isStandalone?: boolean;+ }+ `,},],},- // ❌ Missing prefix in type alias- {- code: `+ ],+ },+ {+ code: `type TableProps = {striped?: boolean;};`,- errors: [+ errors: [+ {+ messageId: 'invalidBooleanPropName',+ data: {+ name: 'striped',+ interfaceName: 'TableProps',+ suggestion: 'isStriped',+ },+ suggestions: [{- messageId: 'invalidBooleanPropName',- data: {- name: 'striped',- interfaceName: 'TableProps',- suggestion: 'isStriped',- },+ desc: 'Rename to "isStriped"',+ output: `+ type TableProps = {+ isStriped?: boolean;+ };+ `,},],},- // ❌ "required" should suggest "isRequired"- {- code: `+ ],+ },+ {+ code: `interface FieldProps {required?: boolean;}`,- errors: [+ errors: [+ {+ messageId: 'invalidBooleanPropName',+ data: {+ name: 'required',+ interfaceName: 'FieldProps',+ suggestion: 'isRequired',+ },+ suggestions: [{- messageId: 'invalidBooleanPropName',- data: {- name: 'required',- interfaceName: 'FieldProps',- suggestion: 'isRequired',- },+ desc: 'Rename to "isRequired"',+ output: `+ interface FieldProps {+ isRequired?: boolean;+ }+ `,},],},- // ❌ "checked" should suggest "isChecked"- {- code: `+ ],+ },+ {+ code: `interface CheckboxProps {checked?: boolean;}`,- errors: [+ errors: [+ {+ messageId: 'invalidBooleanPropName',+ data: {+ name: 'checked',+ interfaceName: 'CheckboxProps',+ suggestion: 'isChecked',+ },+ suggestions: [{- messageId: 'invalidBooleanPropName',- data: {- name: 'checked',- interfaceName: 'CheckboxProps',- suggestion: 'isChecked',- },+ desc: 'Rename to "isChecked"',+ output: `+ interface CheckboxProps {+ isChecked?: boolean;+ }+ `,},],},- // ❌ Multiple violations in one interface- {- code: `+ ],+ },+ {+ code: `interface TableProps {striped?: boolean;hover?: boolean;}`,- errors: [+ errors: [+ {+ messageId: 'invalidBooleanPropName',+ data: {+ name: 'striped',+ interfaceName: 'TableProps',+ suggestion: 'isStriped',+ },+ suggestions: [{- messageId: 'invalidBooleanPropName',- data: {- name: 'striped',- interfaceName: 'TableProps',- suggestion: 'isStriped',- },+ desc: 'Rename to "isStriped"',+ output: `+ interface TableProps {+ isStriped?: boolean;+ hover?: boolean;+ }+ `,},+ ],+ },+ {+ messageId: 'invalidBooleanPropName',+ data: {+ name: 'hover',+ interfaceName: 'TableProps',+ suggestion: 'hasHover',+ },+ suggestions: [{- messageId: 'invalidBooleanPropName',- data: {- name: 'hover',- interfaceName: 'TableProps',- suggestion: 'hasHover',- },+ desc: 'Rename to "hasHover"',+ output: `+ interface TableProps {+ striped?: boolean;+ hasHover?: boolean;+ }+ `,},],},- // ❌ Unknown prop gets generic "is" prefix suggestion- {- code: `+ ],+ },+ {+ code: `interface WidgetProps {active?: boolean;}`,- errors: [+ errors: [+ {+ messageId: 'invalidBooleanPropName',+ data: {+ name: 'active',+ interfaceName: 'WidgetProps',+ suggestion: 'isActive',+ },+ suggestions: [{- messageId: 'invalidBooleanPropName',- data: {- name: 'active',- interfaceName: 'WidgetProps',- suggestion: 'isActive',- },+ desc: 'Rename to "isActive"',+ output: `+ interface WidgetProps {+ isActive?: boolean;+ }+ `,},],},],- });- });+ },+ ],});diff --git a/internal/eslint-plugin-astryx/copyright-header.test.mjs b/internal/eslint-plugin-astryx/copyright-header.test.mjsindex a3b5cd1cd9..b519606358 100644--- a/internal/eslint-plugin-astryx/copyright-header.test.mjs+++ b/internal/eslint-plugin-astryx/copyright-header.test.mjs@@ -1,73 +1,71 @@// Copyright (c) Meta Platforms, Inc. and affiliates.-import {describe, it} from 'vitest';import {RuleTester} from 'eslint';import copyrightHeaderRule from './copyright-header.js';const ruleTester = new RuleTester();-describe('copyright-header', () => {- it('passes the RuleTester', () => {- ruleTester.run('copyright-header', copyrightHeaderRule, {- valid: [- {- code: '// Copyright (c) Meta Platforms, Inc. and affiliates.\n\nconst x = 1;',- },- {- code: '#!/usr/bin/env node\n// Copyright (c) Meta Platforms, Inc. and affiliates.\n\nconst x = 1;',- },- {code: '// Copyright (c) Meta Platforms, Inc. and affiliates.\n'},- ],- invalid: [- {- code: 'const x = 1;',- errors: [{messageId: 'missingHeader'}],- output:- '// Copyright (c) Meta Platforms, Inc. and affiliates.\n\nconst x = 1;',- },- {- code: "'use client';\n\nconst x = 1;",- errors: [{messageId: 'missingHeader'}],- output:- "// Copyright (c) Meta Platforms, Inc. and affiliates.\n\n'use client';\n\nconst x = 1;",- },- {- code: '#!/usr/bin/env node\n\nconst x = 1;',- errors: [{messageId: 'missingHeader'}],- output:- '#!/usr/bin/env node\n// Copyright (c) Meta Platforms, Inc. and affiliates.\n\nconst x = 1;',- },- {- code: '\n// Copyright (c) Meta Platforms, Inc. and affiliates.\n\nconst x = 1;',- errors: [{messageId: 'misplacedHeader'}],- output:- '// Copyright (c) Meta Platforms, Inc. and affiliates.\n\nconst x = 1;',- },- {- code: 'const x = 1;\n\n// Copyright (c) Meta Platforms, Inc. and affiliates.\n',- errors: [{messageId: 'misplacedHeader'}],- output:- '// Copyright (c) Meta Platforms, Inc. and affiliates.\n\nconst x = 1;\n\n',- },- {- code: '/* Copyright (c) Meta Platforms, Inc. and affiliates. */\n\nconst x = 1;',- errors: [{messageId: 'misplacedHeader'}],- output:- '// Copyright (c) Meta Platforms, Inc. and affiliates.\n\nconst x = 1;',- },- {- code: '// Copyright (c) Meta Platforms, Inc. and affiliates.\n\n// Copyright (c) Meta Platforms, Inc. and affiliates.\n\nconst x = 1;',- errors: [{messageId: 'duplicateHeader'}],- output:- '// Copyright (c) Meta Platforms, Inc. and affiliates.\n\nconst x = 1;',- },- {- code: '/* Copyright (c) Meta Platforms, Inc. and affiliates. */\n\n// Copyright (c) Meta Platforms, Inc. and affiliates.\n\nconst x = 1;',- errors: [{messageId: 'duplicateHeader'}],- output:- '// Copyright (c) Meta Platforms, Inc. and affiliates.\n\nconst x = 1;',- },- ],- });- });+// RuleTester registers its own describe/it blocks internally, so it+// must run at the top level. Vitest 4 forbids calling suite functions+// (describe/it) from inside another it() callback.+ruleTester.run('copyright-header', copyrightHeaderRule, {+ valid: [+ {+ code: '// Copyright (c) Meta Platforms, Inc. and affiliates.\n\nconst x = 1;',+ },+ {+ code: '#!/usr/bin/env node\n// Copyright (c) Meta Platforms, Inc. and affiliates.\n\nconst x = 1;',+ },+ {code: '// Copyright (c) Meta Platforms, Inc. and affiliates.\n'},+ ],+ invalid: [+ {+ code: 'const x = 1;',+ errors: [{messageId: 'missingHeader'}],+ output:+ '// Copyright (c) Meta Platforms, Inc. and affiliates.\n\nconst x = 1;',+ },+ {+ code: "'use client';\n\nconst x = 1;",+ errors: [{messageId: 'missingHeader'}],+ output:+ "// Copyright (c) Meta Platforms, Inc. and affiliates.\n\n'use client';\n\nconst x = 1;",+ },+ {+ code: '#!/usr/bin/env node\n\nconst x = 1;',+ errors: [{messageId: 'missingHeader'}],+ output:+ '#!/usr/bin/env node\n// Copyright (c) Meta Platforms, Inc. and affiliates.\n\nconst x = 1;',+ },+ {+ code: '\n// Copyright (c) Meta Platforms, Inc. and affiliates.\n\nconst x = 1;',+ errors: [{messageId: 'misplacedHeader'}],+ output:+ '// Copyright (c) Meta Platforms, Inc. and affiliates.\n\nconst x = 1;',+ },+ {+ code: 'const x = 1;\n\n// Copyright (c) Meta Platforms, Inc. and affiliates.\n',+ errors: [{messageId: 'misplacedHeader'}],+ output:+ '// Copyright (c) Meta Platforms, Inc. and affiliates.\n\nconst x = 1;\n\n',+ },+ {+ code: '/* Copyright (c) Meta Platforms, Inc. and affiliates. */\n\nconst x = 1;',+ errors: [{messageId: 'misplacedHeader'}],+ output:+ '// Copyright (c) Meta Platforms, Inc. and affiliates.\n\nconst x = 1;',+ },+ {+ code: '// Copyright (c) Meta Platforms, Inc. and affiliates.\n\n// Copyright (c) Meta Platforms, Inc. and affiliates.\n\nconst x = 1;',+ errors: [{messageId: 'duplicateHeader'}],+ output:+ '// Copyright (c) Meta Platforms, Inc. and affiliates.\n\nconst x = 1;',+ },+ {+ code: '/* Copyright (c) Meta Platforms, Inc. and affiliates. */\n\n// Copyright (c) Meta Platforms, Inc. and affiliates.\n\nconst x = 1;',+ errors: [{messageId: 'duplicateHeader'}],+ output:+ '// Copyright (c) Meta Platforms, Inc. and affiliates.\n\nconst x = 1;',+ },+ ],});diff --git a/internal/eslint-plugin-astryx/no-hardcoded-anchor.test.mjs b/internal/eslint-plugin-astryx/no-hardcoded-anchor.test.mjsindex 140005b4e6..4778db937e 100644--- a/internal/eslint-plugin-astryx/no-hardcoded-anchor.test.mjs+++ b/internal/eslint-plugin-astryx/no-hardcoded-anchor.test.mjs@@ -5,7 +5,6 @@* @description Tests for the no-hardcoded-anchor ESLint rule.*/-import {describe, it} from 'vitest';import {RuleTester} from 'eslint';import tseslint from 'typescript-eslint';import noHardcodedAnchorRule from './no-hardcoded-anchor.js';@@ -19,37 +18,36 @@ const ruleTester = new RuleTester({},});-describe('no-hardcoded-anchor', () => {- it('passes the RuleTester', () => {- ruleTester.run('no-hardcoded-anchor', noHardcodedAnchorRule, {- valid: [- // Using LinkComponent (the pattern we want)- {code: '<LinkComponent href="/foo">text</LinkComponent>'},- // In-page anchor with # href is allowed- {code: '<a href="#section">Jump</a>'},- // In-page anchor with template literal # href is allowed- {code: '<a href={`#${id}`}>Jump</a>'},- // Non-anchor elements are fine- {code: '<button onClick={fn}>click</button>'},- {code: '<div>content</div>'},- ],- invalid: [- // Hardcoded <a> with dynamic href- {- code: '<a href={href}>link</a>',- errors: [{messageId: 'hardcodedAnchor'}],- },- // Hardcoded <a> with string href- {- code: '<a href="/foo">link</a>',- errors: [{messageId: 'hardcodedAnchor'}],- },- // Hardcoded <a> with no href- {- code: '<a onClick={fn}>link</a>',- errors: [{messageId: 'hardcodedAnchor'}],- },- ],- });- });+// RuleTester registers its own describe/it blocks internally, so it+// must run at the top level. Vitest 4 forbids calling suite functions+// (describe/it) from inside another it() callback.+ruleTester.run('no-hardcoded-anchor', noHardcodedAnchorRule, {+ valid: [+ // Using LinkComponent (the pattern we want)+ {code: '<LinkComponent href="/foo">text</LinkComponent>'},+ // In-page anchor with # href is allowed+ {code: '<a href="#section">Jump</a>'},+ // In-page anchor with template literal # href is allowed+ {code: '<a href={`#${id}`}>Jump</a>'},+ // Non-anchor elements are fine+ {code: '<button onClick={fn}>click</button>'},+ {code: '<div>content</div>'},+ ],+ invalid: [+ // Hardcoded <a> with dynamic href+ {+ code: '<a href={href}>link</a>',+ errors: [{messageId: 'hardcodedAnchor'}],+ },+ // Hardcoded <a> with string href+ {+ code: '<a href="/foo">link</a>',+ errors: [{messageId: 'hardcodedAnchor'}],+ },+ // Hardcoded <a> with no href+ {+ code: '<a onClick={fn}>link</a>',+ errors: [{messageId: 'hardcodedAnchor'}],+ },+ ],});diff --git a/internal/eslint-plugin-astryx/no-raw-paragraph.js b/internal/eslint-plugin-astryx/no-raw-paragraph.jsindex b520474973..0e895bd16c 100644--- a/internal/eslint-plugin-astryx/no-raw-paragraph.js+++ b/internal/eslint-plugin-astryx/no-raw-paragraph.js@@ -97,8 +97,15 @@ const rule = {}},- // `{as = 'p'}` — shorthand destructured prop with default.+ // `{as = 'p'}` — shorthand destructured prop with default. In ESTree+ // this AssignmentPattern is the `value` of a Property, which the+ // Property visitor below already reports — skip it here so a single+ // default isn't flagged twice. This visitor still catches non-property+ // defaults such as a bare parameter default `function C(as = 'p')`.AssignmentPattern(node) {+ if (node.parent?.type === 'Property') {+ return;+ }if (isElementTypeDefaultToP(node)) {context.report({node, messageId: 'defaultParagraph'});}diff --git a/internal/eslint-plugin-astryx/no-raw-paragraph.test.mjs b/internal/eslint-plugin-astryx/no-raw-paragraph.test.mjsindex c340db5b03..075077b9d9 100644--- a/internal/eslint-plugin-astryx/no-raw-paragraph.test.mjs+++ b/internal/eslint-plugin-astryx/no-raw-paragraph.test.mjs@@ -5,7 +5,6 @@* @description Tests for the no-raw-paragraph ESLint rule.*/-import {describe, it} from 'vitest';import {RuleTester} from 'eslint';import tseslint from 'typescript-eslint';import noRawParagraphRule from './no-raw-paragraph.js';@@ -19,56 +18,55 @@ const ruleTester = new RuleTester({},});-describe('no-raw-paragraph', () => {- it('passes the RuleTester', () => {- ruleTester.run('no-raw-paragraph', noRawParagraphRule, {- valid: [- // <div> is the compositional default we want.- {code: '<div>{children}</div>'},- // Other phrasing/block elements are unaffected.- {code: '<span>{text}</span>'},- {code: '<section>{children}</section>'},- // `as` defaulting to 'div' is correct.- {code: 'function C({as: Component = "div"}) { return <Component/>; }'},- {code: 'function C({as = "div"}) { return null; }'},- // 'p' as an opt-in value (not a default) is allowed: it appears only- // in the type union, never as the default the component renders.- {code: 'const Tag = as ?? "div";'},- {code: 'const Tag = as || "div";'},- // A consumer passing as="p" is their choice — not flagged here (this- // rule guards Astryx source defaults, not prop usage call sites).- {code: '<Text as="p">{text}</Text>'},- ],- invalid: [- // Raw <p> JSX.- {- code: '<p {...props}>{children}</p>',- errors: [{messageId: 'rawParagraph'}],- },- {- code: '<p>text</p>',- errors: [{messageId: 'rawParagraph'}],- },- // `as` prop defaulting to 'p' (renamed).- {- code: 'function C({as: Component = "p"}) { return <Component/>; }',- errors: [{messageId: 'defaultParagraph'}],- },- // `as` prop defaulting to 'p' (shorthand).- {- code: 'function C({as = "p"}) { return null; }',- errors: [{messageId: 'defaultParagraph'}],- },- // Defaulting via nullish/or fallback expression.- {- code: 'const Tag = as ?? "p";',- errors: [{messageId: 'defaultParagraph'}],- },- {- code: 'const Tag = as || "p";',- errors: [{messageId: 'defaultParagraph'}],- },- ],- });- });+// RuleTester registers its own describe/it blocks internally, so it+// must run at the top level. Vitest 4 forbids calling suite functions+// (describe/it) from inside another it() callback.+ruleTester.run('no-raw-paragraph', noRawParagraphRule, {+ valid: [+ // <div> is the compositional default we want.+ {code: '<div>{children}</div>'},+ // Other phrasing/block elements are unaffected.+ {code: '<span>{text}</span>'},+ {code: '<section>{children}</section>'},+ // `as` defaulting to 'div' is correct.+ {code: 'function C({as: Component = "div"}) { return <Component/>; }'},+ {code: 'function C({as = "div"}) { return null; }'},+ // 'p' as an opt-in value (not a default) is allowed: it appears only+ // in the type union, never as the default the component renders.+ {code: 'const Tag = as ?? "div";'},+ {code: 'const Tag = as || "div";'},+ // A consumer passing as="p" is their choice — not flagged here (this+ // rule guards Astryx source defaults, not prop usage call sites).+ {code: '<Text as="p">{text}</Text>'},+ ],+ invalid: [+ // Raw <p> JSX.+ {+ code: '<p {...props}>{children}</p>',+ errors: [{messageId: 'rawParagraph'}],+ },+ {+ code: '<p>text</p>',+ errors: [{messageId: 'rawParagraph'}],+ },+ // `as` prop defaulting to 'p' (renamed).+ {+ code: 'function C({as: Component = "p"}) { return <Component/>; }',+ errors: [{messageId: 'defaultParagraph'}],+ },+ // `as` prop defaulting to 'p' (shorthand).+ {+ code: 'function C({as = "p"}) { return null; }',+ errors: [{messageId: 'defaultParagraph'}],+ },+ // Defaulting via nullish/or fallback expression.+ {+ code: 'const Tag = as ?? "p";',+ errors: [{messageId: 'defaultParagraph'}],+ },+ {+ code: 'const Tag = as || "p";',+ errors: [{messageId: 'defaultParagraph'}],+ },+ ],});diff --git a/package.json b/package.jsonindex bcfef96129..6d493cba33 100644--- a/package.json+++ b/package.json@@ -46,7 +46,7 @@"@types/react": "^19.2.17","@types/react-dom": "^19.2.3","@vitejs/plugin-react": "^4.3.0",- "@vitest/coverage-v8": "^2.1.0",+ "@vitest/coverage-v8": "^4.1.9","esbuild": "^0.28.1","eslint": "^10.6.0","eslint-plugin-react-compiler": "19.1.0-rc.2",@@ -61,7 +61,7 @@"typescript": "^6.0.3","typescript-eslint": "^8.62.1","vite-plugin-singlefile": "^2.3.3",- "vitest": "^2.1.0"+ "vitest": "^4.1.9"},"packageManager": "[email protected]","workspaces": [diff --git a/packages/core/src/utils/sharedResizeObserver.test.ts b/packages/core/src/utils/sharedResizeObserver.test.tsindex a979c3d395..907fccf1a7 100644--- a/packages/core/src/utils/sharedResizeObserver.test.ts+++ b/packages/core/src/utils/sharedResizeObserver.test.ts@@ -15,7 +15,7 @@ describe('sharedResizeObserver', () => {mockDisconnect = vi.fn();constructorCalls = 0;- global.ResizeObserver = vi.fn((cb: ResizeObserverCallback) => {+ global.ResizeObserver = vi.fn(function (cb: ResizeObserverCallback) {constructorCalls++;capturedCallback = cb;return {@@ -23,7 +23,7 @@ describe('sharedResizeObserver', () => {unobserve: mockUnobserve,disconnect: mockDisconnect,};- });+ }) as unknown as typeof ResizeObserver;});afterEach(() => {diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex 3a4dd3c954..09a8cc4234 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -56,8 +56,8 @@ importers:specifier: ^4.3.0version: 4.7.0([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected]))'@vitest/coverage-v8':- specifier: ^2.1.0- version: 2.1.9([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))+ specifier: ^4.1.9+ version: 4.1.9([email protected])esbuild:specifier: '>=0.28.1'version: 0.28.1@@ -101,8 +101,8 @@ importers:specifier: ^2.3.3version: 2.3.3([email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected]))vitest:- specifier: ^2.1.0- version: 2.1.9(@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])+ specifier: ^4.1.9+ version: 4.1.9(@types/[email protected])(@vitest/[email protected])([email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected]))apps/docsite:dependencies:@@ -207,8 +207,8 @@ importers:specifier: ^6.0.3version: 6.0.3vitest:- specifier: ^3.2.1- version: 3.2.6(@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])+ specifier: ^4.1.9+ version: 4.1.9(@types/[email protected])(@vitest/[email protected])([email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected]))apps/example-nextjs:dependencies:@@ -1018,10 +1018,6 @@ packages:resolution: {integrity: sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==}engines: {node: '>=10'}- '@ampproject/[email protected]':- resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==}- engines: {node: '>=6.0.0'}-'@asamuzakjp/[email protected]':resolution: {integrity: sha512-NfBUvBaYgKIuq6E/RBLY1m0IohzNHAYyaJGuTK79Z23uNwmz2jl1mPsC5ZxCCxylinKhT1Amn5oNTlx1wN8cQg==}@@ -1334,8 +1330,9 @@ packages:resolution: {integrity: sha512-K8ponJDxBwDHigkeFqaqT5wLGl4bTlwMafR8k7b5CPxr6Ww+UG9ls8Yx6Tcpboxu97eeGVEEyKcHmEyOwN1vSw==}engines: {node: ^22.18.0 || >=24.11.0}- '@bcoe/[email protected]':- resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==}+ '@bcoe/[email protected]':+ resolution: {integrity: sha512-6zABk/ECA/QYSCQ1NGiVwwbQerUCZ+TQbp64Q3AgmfNvurHH0j8TtXa1qbShXA6qqkpAj4V5W8pP6mLe1mcMqA==}+ engines: {node: '>=18'}'@changesets/[email protected]':resolution: {integrity: sha512-9qPCm/rLx/xoOFXIHGB229+4GOL76S4MC+7tyOuTsR6+1jYlfFDQORdvwR5hDA6y4FL2BPt3qpbcQIS+dW85LA==}@@ -1918,14 +1915,6 @@ packages:'@types/node':optional: true- '@isaacs/[email protected]':- resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==}- engines: {node: '>=12'}-- '@istanbuljs/[email protected]':- resolution: {integrity: sha512-+Sg6GCR/wy1oSmQDFq4LQDAhm3ETKnorxN+y5nbLULOR3P0c14f2Wurzj3/xqPXtasLFfHd5iRFQ7AJt4KH2cw==}- engines: {node: '>=8'}-'@joshwooding/[email protected]':resolution: {integrity: sha512-qvsTEwEFefhdirGOPnu9Wp6ChfIwy2dBCRuETU3uE+4cC+PFoxMSiiEhxk4lOluA34eARHA0OxqsEUYDqRMgeQ==}peerDependencies:@@ -2350,10 +2339,6 @@ packages:cpu: [x64]os: [win32]- '@pkgjs/[email protected]':- resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==}- engines: {node: '>=14'}-'@playwright/[email protected]':resolution: {integrity: sha512-8nKv6+0RJSL9FE4jYOEGXnPeM/Hg12qZpmqzZjRh3qM0Y7c3z1mrOTfFLids72RDQYVh9WpLEfR5WdpNX4fkig==}engines: {node: '>=18'}@@ -3580,37 +3565,23 @@ packages:peerDependencies:vite: ^6.4.3- '@vitest/[email protected]':- resolution: {integrity: sha512-Z2cOr0ksM00MpEfyVE8KXIYPEcBFxdbLSs56L8PO0QQMxt/6bDj45uQfxoc96v05KW3clk7vvgP0qfDit9DmfQ==}+ '@vitest/[email protected]':+ resolution: {integrity: sha512-G9/lgqibheLVBDRuya45EbsEXTYcWoSG+TLg7i2axuzx0Eq62eXn+aWXyaVdV5vKvFSWd6ywcX8hA7la9Pvu8g==}peerDependencies:- '@vitest/browser': 2.1.9- vitest: 2.1.9+ '@vitest/browser': 4.1.9+ vitest: 4.1.9peerDependenciesMeta:'@vitest/browser':optional: true- '@vitest/[email protected]':- resolution: {integrity: sha512-UJCIkTBenHeKT1TTlKMJWy1laZewsRIzYighyYiJKZreqtdxSos/S1t+ktRMQWu2CKqaarrkeszJx1cgC5tGZw==}-'@vitest/[email protected]':resolution: {integrity: sha512-Io0yyORnB6sikFlt8QW5K7slY4OjqNX9jmJQ02QDda8lyM6B5oNgVWoSoKPac8/kgnCUzuHQKrSLtu/uOqqrig==}- '@vitest/[email protected]':- resolution: {integrity: sha512-1+7q9BtaKzEmO+fmNT3kYvoNn5Y71XWAx2Q5HRim4tTVRQVRv4uJFAQ5FbK0OPUeNP/WmVCpxYxoJdvuHVjzBQ==}-- '@vitest/[email protected]':- resolution: {integrity: sha512-tVL6uJgoUdi6icpxmdrn5YNo3g3Dxv+IHJBr0GXHaEdTcw3F+cPKnsXFhli6nO+f/6SDKPHEK1UN+k+TQv0Ehg==}- peerDependencies:- msw: ^2.4.9- vite: ^6.4.3- peerDependenciesMeta:- msw:- optional: true- vite:- optional: true+ '@vitest/[email protected]':+ resolution: {integrity: sha512-vl/rYsUKcBr3SnQn166+XR5ZQcgMx3DQhFWdfli/cWpLnLUmbxZvyrJZotLFUryib+LtArYMSTJ5RbQ57ZqrlA==}- '@vitest/[email protected]':- resolution: {integrity: sha512-EZOrpDbkKotFAP7wPAQV1UIyoGOk4oX7ynWhBhLB7v+meMHbQhU16oPpIYGTTe4oFlhpryGpgpcZP/sin3hYuw==}+ '@vitest/[email protected]':+ resolution: {integrity: sha512-EVkXzBjrPGM+cK8/ANWgBrkUCfJfb38/EfTSO8h7pWvKkyPkpWxvR7BkD2MyItMF62C97zAEoqdpUixwR/e+Rw==}peerDependencies:msw: ^2.4.9vite: ^6.4.3@@ -3620,44 +3591,29 @@ packages:vite:optional: true- '@vitest/[email protected]':- resolution: {integrity: sha512-KhRIdGV2U9HOUzxfiHmY8IFHTdqtOhIzCpd8WRdJiE7D/HUcZVD0EgQCVjm+Q9gkUXWgBvMmTtZgIG48wq7sOQ==}-'@vitest/[email protected]':resolution: {integrity: sha512-IVNZik8IVRJRTr9fxlitMKeJeXFFFN0JaB9PHPGQ8NKQbGpfjlTx9zO4RefN8gp7eqjNy8nyK3NZmBzOPeIxtA==}- '@vitest/[email protected]':- resolution: {integrity: sha512-lb7XXXzmm2h2ASzFnRvQpDo6onT1NmMJA3tkGTWiBFtRJ9lxGY3d3mm/Apt36gej2bkkOVLL/yTOtufDaFa/jA==}-- '@vitest/[email protected]':- resolution: {integrity: sha512-ZXSSqTFIrzduD63btIfEyOmNcBmQvgOVsPNPe0jYtESiXkhd8u2erDLnMxmGrDCwHCCHE7hxwRDCT3pt0esT4g==}+ '@vitest/[email protected]':+ resolution: {integrity: sha512-s0iufns3iIFitdgm+YR7g1whCAaGtXz459VS9/PqyKDEEFgYIhsHOQmXgIgDuYCt7DeQmiZT0Qe2OA2p4ZPu5A==}- '@vitest/[email protected]':- resolution: {integrity: sha512-HYcoSj1w5tcgUnzoF0HcyaAQjpA1gj9ftUJ7iSJSuipc02jW9gKkigwZbjFldAfYHA1fa8UZVRftdMY5msWM9Q==}+ '@vitest/[email protected]':+ resolution: {integrity: sha512-KXLMDtc7oe70+3mJfGrPUWPesswH+3sTxAMAMl8DG7I8IUQT4XW718dY5ID3vPUcmlu27CcKfY4P3h3I29SLJg==}- '@vitest/[email protected]':- resolution: {integrity: sha512-oBO82rEjsxLNJincVhLhaxxZdEtV0EFHMK5Kmx5sJ6H9L183dHECjiefOAdnqpIgT5eZwT04PoggUnW88vOBNQ==}-- '@vitest/[email protected]':- resolution: {integrity: sha512-H+ZjNTWGpObenh0YnlBctAPnJSI20P81PL8BPzWpx54YXLLTm8hEsWawtcYLMrwvpK48hGxLLbCS+1KRXhsKhw==}-- '@vitest/[email protected]':- resolution: {integrity: sha512-E1B35FwzXXTs9FHNK6bDszs7mtydNi5MIfUWpceJ8Xbfb1gBMscAnwLbEu+B44ed6W3XjL9/ehLPHR1fkf1KLQ==}+ '@vitest/[email protected]':+ resolution: {integrity: sha512-Jc7RKGNBo8Z28WYIm0Niej4xdSPByRf6mU58VpHQkd6Zh05rlnA+twjbK5HyeIGHxrzsc3mJgS43uM0CZKzaIA==}'@vitest/[email protected]':resolution: {integrity: sha512-vAfasCOe6AIK70iP5UD11Ac4siNUNJ9i/9PZ3NKx07sG6sUxeag1LWdNrMWeKKYBLlzuK+Gn65Yd5nyL6ds+nw==}- '@vitest/[email protected]':- resolution: {integrity: sha512-oq6BbH68WzcWmwtBrU9nqLeaXTR4XwJF7FSLkKEZo4i6eoXcrxjcwSuTvWBIRUTC6VC72nXYunzqgZA+IKdtxg==}-- '@vitest/[email protected]':- resolution: {integrity: sha512-v0psaMSkNJ3A2NMrUEHFRzJtDPFn+/VWZ5WxImB21T9fjucJRmS7xCS3ppEnARb9y11OAzaD+P2Ps+b+BGX5iQ==}+ '@vitest/[email protected]':+ resolution: {integrity: sha512-fHpsS6mIi+PiEW+vcRVOMkX1oSaPKne3VOclSFICPcGOmfKgXPU5iAah+wcNcj2xPrCCmfq99IDGf+EojhhvhA==}'@vitest/[email protected]':resolution: {integrity: sha512-fB2V0JFrQSMsCo9HiSq3Ezpdv4iYaXRG1Sx8edX3MwxfyNn83mKiGzOcH+Fkxt4MHxr3y42fQi1oeAInqgX2QA==}- '@vitest/[email protected]':- resolution: {integrity: sha512-lI23nIs4bnT3T8NIoh+vFaz5s2/DdP0Jgt2jxwgWljvwn82cLJtyi/If+fjFyoLMGIOz0U/fKvWE0d4jsNQEfg==}+ '@vitest/[email protected]':+ resolution: {integrity: sha512-A51o8ymO5PpqlWNnBP9ZHPXDIpuMtTLlGSjN7la4US+LJzoUMyhwjA5QXlm39JexgwHKW4Xjs8Z2d3dLCXOeuA==}'@webcontainer/[email protected]':resolution: {integrity: sha512-6aN99yL695Hi9SuIk1oC88l9o0gmxL1nGWWQ/kNy81HigJ0FoaoTXpytCj6ItzgyCEwA9kF1wixsTuv5cjsgng==}@@ -3710,10 +3666,6 @@ packages:resolution: {integrity: sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==}engines: {node: '>=12'}- resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==}- engines: {node: '>=8'}-resolution: {integrity: sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==}engines: {node: '>=10'}@@ -3758,6 +3710,9 @@ packages:resolution: {integrity: sha512-6t10qk83GOG8p0vKmaCr8eiilZwO171AvbROMtvvNiwrTly62t+7XkA8RdIIVbpMhCASAsxgAzdRSwh6nw/5Dg==}engines: {node: '>=4'}+ resolution: {integrity: sha512-0bC0/4bTSrnwdhU3IsZDwEdojvuPrSg59OYZfKsLRtJZ0u8VBx9DebfqqG8bRdCC0I7vjgxmPi41P0lpkhJHtA==}+resolution: {integrity: sha512-rD5t5DwOjJdmSORcTq64j8MawTC+tbQ+HHqjR4NDumamy/ambn1UJrlKL+KdwujWxMkFjPM3pPHOEA9tl4767Q==}engines: {node: ^10 || ^12 || >=14}@@ -3843,6 +3798,10 @@ packages:resolution: {integrity: sha512-4zNhdJD/iOjSH0A05ea+Ke6MU5mmpQcbQsSOkgdaUMJ9zTlDTD/GYlwohmIE2u0gaxHYiVHEn1Fw9mZ/ktJWgw==}engines: {node: '>=18'}+ resolution: {integrity: sha512-NUPRluOfOiTKBKvWPtSD4PhFvWCqOi0BGStNWs57X9js7XGTprSmFoz5F0tWhR4WPjNeR9jXqdC7/UpSJTnlRg==}+ engines: {node: '>=18'}+resolution: {integrity: sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==}engines: {node: ^12.17.0 || ^14.13 || >=16.0.0}@@ -3898,13 +3857,6 @@ packages:react: ^18 || ^19 || ^19.0.0-rcreact-dom: ^18 || ^19 || ^19.0.0-rc- resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==}- engines: {node: '>=7.0.0'}-- resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==}-resolution: {integrity: sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==}engines: {node: '>=16'}@@ -4152,9 +4104,6 @@ packages:resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==}engines: {node: '>= 0.4'}- resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==}-resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==}@@ -4164,12 +4113,6 @@ packages:resolution: {integrity: sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==}- resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==}-- resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==}-resolution: {integrity: sha512-YGRs8knHhKHVShLkFET/rWAU8kmHbOV5LwN938RHI0pljAJ1Gf6SzXsSmRaEzcXTtOOmVqJ5+WtQPL5uigY50Q==}engines: {node: '>=14'}@@ -4202,8 +4145,8 @@ packages:resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==}engines: {node: '>= 0.4'}- resolution: {integrity: sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==}+ resolution: {integrity: sha512-KLdwQm2NvGLDkQDCGvmiQrhkd0JbMzXthwQAUgWjQuQdBLFa3eiBP5arXZyA+f8x+x7OXgud6bq2rxjGtHV2tw==}resolution: {integrity: sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==}@@ -4447,10 +4390,6 @@ packages:resolution: {integrity: sha512-9LNK2rp/NWWbwdEK6mxC54XfQRyD2lVV0iPVBYf+5o5vvqJl7ietkR1hX3/dZ39j0GAbL4PIFoeekDViOW0x/Q==}engines: {node: '>=0.4.0'}- resolution: {integrity: sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==}- engines: {node: '>=14'}-resolution: {integrity: sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==}engines: {node: '>= 0.6'}@@ -4525,11 +4464,6 @@ packages:resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==}engines: {node: '>=10.13.0'}- resolution: {integrity: sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==}- 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 [email protected]- hasBin: true-resolution: {integrity: sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw==}engines: {node: 18 || 20 || >=22}@@ -4668,10 +4602,6 @@ packages:resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==}engines: {node: '>=0.10.0'}- resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==}- engines: {node: '>=8'}-resolution: {integrity: sha512-5XHYaSyiqADb4RnZ1Bdad6cPp8Toise4TzEjcOYDHZkTCbKgiUl7WTUCpNWHuxmDt91wnsZBc9xinNzopv3JMQ==}engines: {node: '>=18'}@@ -4726,17 +4656,10 @@ packages:resolution: {integrity: sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==}engines: {node: '>=10'}- resolution: {integrity: sha512-yg2d+Em4KizZC5niWhQaIomgf5WlL4vOOjZ5xGCmF8SnPE/mDWWXgvRExdcpCgh9lLRRa1/fSYp2ymmbJ1pI+A==}- engines: {node: '>=10'}-resolution: {integrity: sha512-HGYWWS/ehqTV3xN10i23tkPkpH46MLCIMFNCaaKNavAXTF1RkqxawEPtnjnGZ6XKSInBKkiOA5BKS+aZiY3AvA==}engines: {node: '>=8'}- resolution: {integrity: sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==}-resolution: {integrity: sha512-AC/7JofJvZGrrneWNaEnJeOLUx+JlGt7tNa0wZiRPT4MY1wmfKjt2+6O2p2uz2+skll8OZZmJMNqeke7kKbNgQ==}hasBin: true@@ -4754,9 +4677,6 @@ packages:resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==}- resolution: {integrity: sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ==}-resolution: {integrity: sha512-ttBQIIQPDeLjpPOohtUdXuXUVoA2uIB6fEH9HyJ7234s5mBJ5wTx20njxplLZQgLaOfpmPQA7X2t5AX6tIPbog==}hasBin: true@@ -4946,9 +4866,6 @@ packages:resolution: {integrity: sha512-CdzqowRJCeLU72bHvWqwRBBlLcMEtIvGrlvef74kMnV2AolS9Y8xUv1I0U/MNAWMhBlKIoyuEgoJ0t/bbwHbLQ==}- resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==}-resolution: {integrity: sha512-RPimw/7aMdv2oqRrxKwvZXcPfwBrn/JZ2xYcY9Hus/6LaS3VOAKVWKWgNLCFSiOm1ESXinjsDlidVU7JlnCN2A==}engines: {node: 20 || >=22}@@ -4968,8 +4885,8 @@ packages:resolution: {integrity: sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==}- resolution: {integrity: sha512-L0WhttDl+2BOsybvEOLK7fW3UA0OQ0IQ2d6Zl2x/a6vVRs3bAY0ECOSHHeL5jD+SbOpOCUEi0y1DgHEn9Qn1AQ==}+ resolution: {integrity: sha512-pVKE4UdSQ7DvHzivsCIFx2BJn1mHG6KsyrFcaxFx6tONdneEuThrDx0Cj3AMg58KyN4pzYT+LHOotxDQDjNvkw==}resolution: {integrity: sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==}@@ -5230,10 +5147,6 @@ packages:resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==}- resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==}- engines: {node: '>=16 || 14 >=14.18'}-resolution: {integrity: sha512-3O/iVVsJAPsOnpwWIeD+d6z/7PmqApyQePUtCndjatj/9I5LylHvt5qluFaBT3I5h3r1ejfR056c+FCv+NnNXg==}engines: {node: 18 || 20 || >=22}@@ -5245,9 +5158,6 @@ packages:resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==}engines: {node: '>=8'}- resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==}-resolution: {integrity: sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==}@@ -5647,8 +5557,8 @@ packages:resolution: {integrity: sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==}engines: {node: '>= 0.8'}- resolution: {integrity: sha512-5GS12FdOZNliM5mAOxFRg7Ir0pWz8MdpYm6AY6VPkGpbA7ZzmbzNcBJQ0GPvvyWgcY7QAhCgf9Uy89I03faLkg==}+ resolution: {integrity: sha512-Rq7ybcX2RuC55r9oaPVEW7/xu3tj8u4GeBYHBWCychFtzMIr86A7e3PPEBPT37sHStKX3+TiX/Fr/ACmJLVlLQ==}resolution: {integrity: sha512-6wkA6LxfDSSilloITsrFOJfsnw0mDUP2h8Ls+lRt8oRsudtz2RWFhLv+Toiwg6NW7hUpdTDc2hzR7DztJid6+A==}@@ -5672,14 +5582,6 @@ packages:resolution: {integrity: sha512-xSJq+BS52SaFFAVxuStmx6n5aYZU571uYUnUrPXkPFCfdHyZMMlbP2v2Wx5sNBnAVzq/2+0+mcBLBa3Xa5ubYw==}- resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==}- engines: {node: '>=8'}-- resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==}- engines: {node: '>=12'}-resolution: {integrity: sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==}engines: {node: '>=18'}@@ -5708,9 +5610,6 @@ packages:resolution: {integrity: sha512-SlyRoSkdh1dYP0PzclLE7r0M9sgbFKKMFXpFRUMNuKhQSbC6VQIGzq3E0qsfvGJaUFJPGv6Ws1NZ/haTAjfbMA==}engines: {node: '>=12'}- resolution: {integrity: sha512-8r3mkIM/2+PpjHoOtiAW8Rg3jJLHaV7xPwG+YRGrv6FP0wwk/toTpATxWYOW0BKdWwl82VT2tFYi5DlROa0Mxg==}-resolution: {integrity: sha512-qSVyDTeMotdvQYoHWLNGwRFJHC+i+ZvdBRYosOFgC+Wg1vx4frN2/RG/NA7SYqqvKNLf39P2LSRA2pu6n0XYZA==}engines: {node: '>= 12.0.0'}@@ -5757,10 +5656,6 @@ packages:resolution: {integrity: sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==}engines: {node: '>=8'}- resolution: {integrity: sha512-u9E6A+ZDYdp7a4WnarkXPZOx8Ilz46+kby6p1yZ8zsGTz9gYa6FIS7lj2oezzNKmtdyyJNNmmXDppga5GB7kSw==}- engines: {node: '>=18'}-resolution: {integrity: sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==}engines: {node: '>=0.8'}@@ -5785,20 +5680,12 @@ packages:resolution: {integrity: sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==}engines: {node: '>=12.0.0'}- resolution: {integrity: sha512-Zba82s87IFq9A9XmjiX5uZA/ARWDrB03OHlq+Vw1fSdt0I+4/Kutwy8BP4Y/y/aORMo61FQ0vIb5j44vSo5Pkg==}- engines: {node: ^18.0.0 || >=20.0.0}-- resolution: {integrity: sha512-weEDEq7Z5eTHPDh4xjX789+fHfF+P8boiFB+0vbWzpbnbsEr/GRaohi/uMKxg8RZMXnl1ItAi/IUHWMsjDV7kQ==}- engines: {node: '>=14.0.0'}-resolution: {integrity: sha512-op4nsTR47R6p0vMUUoYl/a+ljLFVtlfaXkLQmqfLR1qHma1h/ysYk4hEXZ880bf2CYgTskvTa/e196Vd5dDQXw==}engines: {node: '>=14.0.0'}- resolution: {integrity: sha512-n1cw8k1k0x4pgA2+9XrOkFydTerNcJ1zWCO5Nn9scWHTD+5tp8dghT2x1uduQePZTZgd3Tupf+x9BxJjeJi77Q==}+ resolution: {integrity: sha512-Bf+ILmBgretUrdJxzXM0SgXLZ3XfiaUuOj/IKQHuTXip+05Xn+uyEYdVg0kYDipTBcLrCVyUzAPz7QmArb0mmw==}engines: {node: '>=14.0.0'}@@ -6099,16 +5986,6 @@ packages:resolution: {integrity: sha512-SbPDPdDBYp+5MJHhBCAyI7wKM3d5ivekigc2Dk2s7pgbZ9wIgIBYGVw4zGHBml/qTFbexrofXW6Gu4noGxrOwQ==}- resolution: {integrity: sha512-AM9aQ/IPrW/6ENLQg3AGY4K1N2TGZdR5e4gu/MmmR2xR3Ll1+dib+nook92g4TV3PXVyeyxdWwtaCAiUL0hMxA==}- engines: {node: ^18.0.0 || >=20.0.0}- hasBin: true-- resolution: {integrity: sha512-EbKSKh+bh1E1IFxeO0pg1n4dvoOTt0UDiXMd/qn++r98+jPO1xtJilvXldeuQ8giIB5IkpjCgMleHMNEsGH6pg==}- engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0}- hasBin: true-resolution: {integrity: sha512-XVnGH0QzbOa8fxRSsHdCarVN1BSBXNi7uLMQYlrGRN5apdHkk62XQWRJhVever0lnfuyBkwn+kvVChdm/OoOUg==}engines: {node: '>18.0.0'}@@ -6202,51 +6079,39 @@ packages:yaml:optional: true- resolution: {integrity: sha512-MSmPM9REYqDGBI8439mA4mWhV5sKmDlBKWIYbA3lRb2PTHACE0mgKwA8yQ2xq9vxDTuk4iPrECBAEW2aoFXY0Q==}- engines: {node: ^18.0.0 || >=20.0.0}+ resolution: {integrity: sha512-nE3/LEyc0z87uHYLZebqCUOaJr2hdtuPp7BQ4BosVFnfltxgAvMG08NyrSGlPpOUWvR27c5flSmYFTNr78L9GQ==}+ engines: {node: ^20.0.0 || ^22.0.0 || >=24.0.0}hasBin: truepeerDependencies:'@edge-runtime/vm': '*'- '@types/node': ^18.0.0 || >=20.0.0- '@vitest/browser': 2.1.9- '@vitest/ui': 2.1.9+ '@opentelemetry/api': ^1.9.0+ '@types/node': ^20.0.0 || ^22.0.0 || >=24.0.0+ '@vitest/browser-playwright': 4.1.9+ '@vitest/browser-preview': 4.1.9+ '@vitest/browser-webdriverio': 4.1.9+ '@vitest/coverage-istanbul': 4.1.9+ '@vitest/coverage-v8': 4.1.9+ '@vitest/ui': 4.1.9happy-dom: '*'jsdom: '*'+ vite: ^6.4.3peerDependenciesMeta:'@edge-runtime/vm':optional: true- '@types/node':- optional: true- '@vitest/browser':- optional: true- '@vitest/ui':+ '@opentelemetry/api':optional: true- happy-dom:+ '@types/node':optional: true- jsdom:+ '@vitest/browser-playwright':optional: true-- resolution: {integrity: sha512-xejya+bT/j/+R/AGa1XOfRxLmNUlLtlwjRsFUILF+xHfzElmGcmFydy2gqqIrd62ptIEfwVMofd19uNWD9L7Nw==}- engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0}- hasBin: true- peerDependencies:- '@edge-runtime/vm': '*'- '@types/debug': ^4.1.12- '@types/node': ^18.0.0 || ^20.0.0 || >=22.0.0- '@vitest/browser': 3.2.6- '@vitest/ui': 3.2.6- happy-dom: '*'- jsdom: '*'- peerDependenciesMeta:- '@edge-runtime/vm':+ '@vitest/browser-preview':optional: true- '@types/debug':+ '@vitest/browser-webdriverio':optional: true- '@types/node':+ '@vitest/coverage-istanbul':optional: true- '@vitest/browser':+ '@vitest/coverage-v8':optional: true'@vitest/ui':optional: true@@ -6296,14 +6161,6 @@ packages:resolution: {integrity: sha512-SGcvg80f0wUy2/fXES19feHMz8E0JoXv2uNgHOu4Dgi2OrCy1lqwFYEJz1BLbDI0exjPMe/ZdzZ/YpGECBG/aQ==}engines: {node: '>=20'}- resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==}- engines: {node: '>=10'}-- resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==}- engines: {node: '>=12'}-resolution: {integrity: sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww==}engines: {node: '>=18'}@@ -6390,11 +6247,6 @@ snapshots:'@alloc/[email protected]': {}- '@ampproject/[email protected]':- dependencies:- '@jridgewell/gen-mapping': 0.3.13- '@jridgewell/trace-mapping': 0.3.31-'@asamuzakjp/[email protected]':dependencies:'@csstools/css-calc': 3.2.1(@csstools/[email protected](@csstools/[email protected]))(@csstools/[email protected])@@ -6794,7 +6646,7 @@ snapshots:'@babel/helper-string-parser': 8.0.0'@babel/helper-validator-identifier': 8.0.2- '@bcoe/[email protected]': {}+ '@bcoe/[email protected]': {}'@changesets/[email protected]':dependencies:@@ -7355,17 +7207,6 @@ snapshots:optionalDependencies:'@types/node': 25.9.4- '@isaacs/[email protected]':- dependencies:- string-width: 5.1.2- string-width-cjs: [email protected]- strip-ansi: 7.2.0- strip-ansi-cjs: [email protected]- wrap-ansi: 8.1.0- wrap-ansi-cjs: [email protected]-- '@istanbuljs/[email protected]': {}-'@joshwooding/[email protected]([email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected]))':dependencies:glob: 13.0.6@@ -7658,9 +7499,6 @@ snapshots:'@oxc-resolver/[email protected]':optional: true- '@pkgjs/[email protected]':- optional: true-'@playwright/[email protected]':dependencies:playwright: 1.61.1@@ -8831,30 +8669,19 @@ snapshots:transitivePeerDependencies:- supports-color- '@vitest/[email protected]([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))':+ '@vitest/[email protected]([email protected])':dependencies:- '@ampproject/remapping': 2.3.0- '@bcoe/v8-coverage': 0.2.3- debug: 4.4.3+ '@bcoe/v8-coverage': 1.0.2+ '@vitest/utils': 4.1.9+ ast-v8-to-istanbul: 1.0.4istanbul-lib-coverage: 3.2.2istanbul-lib-report: 3.0.1- istanbul-lib-source-maps: 5.0.6istanbul-reports: 3.2.0- magic-string: 0.30.21- magicast: 0.3.5- std-env: 3.10.0- test-exclude: 7.0.2- tinyrainbow: 1.2.0- vitest: 2.1.9(@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])- transitivePeerDependencies:- - supports-color-- '@vitest/[email protected]':- dependencies:- '@vitest/spy': 2.1.9- '@vitest/utils': 2.1.9- chai: 5.3.3- tinyrainbow: 1.2.0+ magicast: 0.5.3+ obug: 2.1.3+ std-env: 4.1.0+ tinyrainbow: 3.1.0+ vitest: 4.1.9(@types/[email protected])(@vitest/[email protected])([email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected]))'@vitest/[email protected]':dependencies:@@ -8864,82 +8691,48 @@ snapshots:chai: 5.3.3tinyrainbow: 2.0.0- '@vitest/[email protected]':+ '@vitest/[email protected]':dependencies:+ '@standard-schema/spec': 1.1.0'@types/chai': 5.2.3- '@vitest/spy': 3.2.6- '@vitest/utils': 3.2.6- chai: 5.3.3- tinyrainbow: 2.0.0-- '@vitest/[email protected]([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected]))':- dependencies:- '@vitest/spy': 2.1.9- estree-walker: 3.0.3- magic-string: 0.30.21- optionalDependencies:- vite: 6.4.3(@types/[email protected])([email protected])([email protected])([email protected])([email protected])+ '@vitest/spy': 4.1.9+ '@vitest/utils': 4.1.9+ chai: 6.2.2+ tinyrainbow: 3.1.0- '@vitest/[email protected]([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected]))':+ '@vitest/[email protected]([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected]))':dependencies:- '@vitest/spy': 3.2.6+ '@vitest/spy': 4.1.9estree-walker: 3.0.3magic-string: 0.30.21optionalDependencies:- vite: 6.4.3(@types/[email protected])([email protected])([email protected])([email protected])([email protected])-- '@vitest/[email protected]':- dependencies:- tinyrainbow: 1.2.0+ vite: 8.1.3(@types/[email protected])([email protected])([email protected])([email protected])([email protected])'@vitest/[email protected]':dependencies:tinyrainbow: 2.0.0- '@vitest/[email protected]':+ '@vitest/[email protected]':dependencies:- tinyrainbow: 2.0.0-- '@vitest/[email protected]':- dependencies:- '@vitest/utils': 2.1.9- pathe: 1.1.2+ tinyrainbow: 3.1.0- '@vitest/[email protected]':+ '@vitest/[email protected]':dependencies:- '@vitest/utils': 3.2.6+ '@vitest/utils': 4.1.9pathe: 2.0.3- strip-literal: 3.1.0- '@vitest/[email protected]':+ '@vitest/[email protected]':dependencies:- '@vitest/pretty-format': 2.1.9- magic-string: 0.30.21- pathe: 1.1.2-- '@vitest/[email protected]':- dependencies:- '@vitest/pretty-format': 3.2.6+ '@vitest/pretty-format': 4.1.9+ '@vitest/utils': 4.1.9magic-string: 0.30.21pathe: 2.0.3- '@vitest/[email protected]':- dependencies:- tinyspy: 3.0.2-'@vitest/[email protected]':dependencies:tinyspy: 4.0.4- '@vitest/[email protected]':- dependencies:- tinyspy: 4.0.4-- '@vitest/[email protected]':- dependencies:- '@vitest/pretty-format': 2.1.9- loupe: 3.2.1- tinyrainbow: 1.2.0+ '@vitest/[email protected]': {}'@vitest/[email protected]':dependencies:@@ -8947,11 +8740,11 @@ snapshots:loupe: 3.2.1tinyrainbow: 2.0.0- '@vitest/[email protected]':+ '@vitest/[email protected]':dependencies:- '@vitest/pretty-format': 3.2.6- loupe: 3.2.1- tinyrainbow: 2.0.0+ '@vitest/pretty-format': 4.1.9+ convert-source-map: 2.0.0+ tinyrainbow: 3.1.0'@webcontainer/[email protected]': {}@@ -8996,10 +8789,6 @@ snapshots:- dependencies:- color-convert: 2.0.1-@@ -9036,6 +8825,12 @@ snapshots:dependencies:tslib: 2.8.1+ dependencies:+ '@jridgewell/trace-mapping': 0.3.31+ estree-walker: 3.0.3+ js-tokens: 10.0.0+dependencies:browserslist: 4.28.4@@ -9129,6 +8924,8 @@ snapshots:loupe: 3.2.1pathval: 2.0.1+ [email protected]: {}+@@ -9195,12 +8992,6 @@ snapshots:- '@types/react'- '@types/react-dom'- dependencies:- color-name: 1.1.4-- [email protected]: {}-@@ -9399,18 +9190,12 @@ snapshots:es-errors: 1.3.0gopd: 1.2.0- [email protected]: {}-- [email protected]: {}-- [email protected]: {}-@@ -9433,7 +9218,7 @@ snapshots:- [email protected]: {}+ [email protected]: {}dependencies:@@ -9802,11 +9587,6 @@ snapshots:dependencies:flow-estree: 0.321.0- dependencies:- cross-spawn: 7.0.6- signal-exit: 4.1.0-@@ -9873,15 +9653,6 @@ snapshots:dependencies:is-glob: 4.0.3- dependencies:- foreground-child: 3.3.1- jackspeak: 3.4.3- minimatch: 9.0.9- minipass: 7.1.3- package-json-from-dist: 1.0.1- path-scurry: 1.11.1-dependencies:minimatch: 9.0.9@@ -10010,8 +9781,6 @@ snapshots:- [email protected]: {}-dependencies:get-east-asian-width: 1.6.0@@ -10056,25 +9825,11 @@ snapshots:make-dir: 4.0.0supports-color: 7.2.0- dependencies:- '@jridgewell/trace-mapping': 0.3.31- debug: 4.4.3- istanbul-lib-coverage: 3.2.2- transitivePeerDependencies:- - supports-color-dependencies:html-escaper: 2.0.2istanbul-lib-report: 3.0.1- dependencies:- '@isaacs/cliui': 8.0.2- optionalDependencies:- '@pkgjs/parseargs': 0.11.0-@@ -10085,8 +9840,6 @@ snapshots:- [email protected]: {}-dependencies:argparse: 1.0.10@@ -10279,8 +10032,6 @@ snapshots:- [email protected]: {}-@@ -10297,7 +10048,7 @@ snapshots:dependencies:'@jridgewell/sourcemap-codec': 1.5.5dependencies:'@babel/parser': 7.29.7'@babel/types': 7.29.7@@ -10573,11 +10324,6 @@ snapshots:- dependencies:- lru-cache: 10.4.3- minipass: 7.1.3-dependencies:lru-cache: 11.5.1@@ -10587,8 +10333,6 @@ snapshots:- [email protected]: {}-@@ -11057,7 +10801,7 @@ snapshots:- [email protected]: {}+ [email protected]: {}[email protected](@testing-library/[email protected])(@types/[email protected])([email protected])([email protected]):dependencies:@@ -11089,18 +10833,6 @@ snapshots:- dependencies:- emoji-regex: 8.0.0- is-fullwidth-code-point: 3.0.0- strip-ansi: 6.0.1-- dependencies:- eastasianwidth: 0.2.0- emoji-regex: 9.2.2- strip-ansi: 7.2.0-dependencies:emoji-regex: 10.6.0@@ -11128,10 +10860,6 @@ snapshots:- dependencies:- js-tokens: 9.0.1-dependencies:client-only: 0.0.1@@ -11167,12 +10895,6 @@ snapshots:- dependencies:- '@istanbuljs/schema': 0.1.6- glob: 10.5.0- minimatch: 9.0.9-dependencies:thenify: 3.3.1@@ -11194,13 +10916,9 @@ snapshots:fdir: 6.5.0([email protected])picomatch: 4.0.4- [email protected]: {}-- [email protected]: {}-- [email protected]: {}+ [email protected]: {}@@ -11632,48 +11350,6 @@ snapshots:d3-time: 3.1.0d3-timer: 3.0.1- [email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected]):- dependencies:- cac: 6.7.14- debug: 4.4.3- es-module-lexer: 1.7.0- pathe: 1.1.2- vite: 6.4.3(@types/[email protected])([email protected])([email protected])([email protected])([email protected])- transitivePeerDependencies:- - '@types/node'- - jiti- - less- - lightningcss- - sass- - sass-embedded- - stylus- - sugarss- - supports-color- - terser- - tsx- - yaml-- [email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected]):- dependencies:- cac: 6.7.14- debug: 4.4.3- es-module-lexer: 1.7.0- pathe: 2.0.3- vite: 6.4.3(@types/[email protected])([email protected])([email protected])([email protected])([email protected])- transitivePeerDependencies:- - '@types/node'- - jiti- - less- - lightningcss- - sass- - sass-embedded- - stylus- - sugarss- - supports-color- - terser- - tsx- - yaml-[email protected]([email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])):dependencies:micromatch: 4.0.8@@ -11712,86 +11388,34 @@ snapshots:tsx: 4.23.0yaml: 2.9.0- [email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]):+ [email protected](@types/[email protected])(@vitest/[email protected])([email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])):dependencies:- '@vitest/expect': 2.1.9- '@vitest/mocker': 2.1.9([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected]))- '@vitest/pretty-format': 2.1.9- '@vitest/runner': 2.1.9- '@vitest/snapshot': 2.1.9- '@vitest/spy': 2.1.9- '@vitest/utils': 2.1.9- chai: 5.3.3- debug: 4.4.3- expect-type: 1.4.0- magic-string: 0.30.21- pathe: 1.1.2- std-env: 3.10.0- tinybench: 2.9.0- tinyexec: 0.3.2- tinypool: 1.1.1- tinyrainbow: 1.2.0- vite: 6.4.3(@types/[email protected])([email protected])([email protected])([email protected])([email protected])- vite-node: 2.1.9(@types/[email protected])([email protected])([email protected])([email protected])([email protected])- why-is-node-running: 2.3.0- optionalDependencies:- '@types/node': 25.9.4- jsdom: 27.4.0- transitivePeerDependencies:- - jiti- - less- - lightningcss- - msw- - sass- - sass-embedded- - stylus- - sugarss- - supports-color- - terser- - tsx- - yaml-- [email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]):- dependencies:- '@types/chai': 5.2.3- '@vitest/expect': 3.2.6- '@vitest/mocker': 3.2.6([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected]))- '@vitest/pretty-format': 3.2.6- '@vitest/runner': 3.2.6- '@vitest/snapshot': 3.2.6- '@vitest/spy': 3.2.6- '@vitest/utils': 3.2.6- chai: 5.3.3- debug: 4.4.3+ '@vitest/expect': 4.1.9+ '@vitest/mocker': 4.1.9([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected]))+ '@vitest/pretty-format': 4.1.9+ '@vitest/runner': 4.1.9+ '@vitest/snapshot': 4.1.9+ '@vitest/spy': 4.1.9+ '@vitest/utils': 4.1.9+ es-module-lexer: 2.3.0expect-type: 1.4.0magic-string: 0.30.21+ obug: 2.1.3pathe: 2.0.3picomatch: 4.0.4- std-env: 3.10.0+ std-env: 4.1.0tinybench: 2.9.0- tinyexec: 0.3.2+ tinyexec: 1.2.4tinyglobby: 0.2.17- tinypool: 1.1.1- tinyrainbow: 2.0.0- vite: 6.4.3(@types/[email protected])([email protected])([email protected])([email protected])([email protected])- vite-node: 3.2.4(@types/[email protected])([email protected])([email protected])([email protected])([email protected])+ tinyrainbow: 3.1.0+ vite: 8.1.3(@types/[email protected])([email protected])([email protected])([email protected])([email protected])why-is-node-running: 2.3.0optionalDependencies:'@types/node': 25.9.4+ '@vitest/coverage-v8': 4.1.9([email protected])jsdom: 27.4.0transitivePeerDependencies:- - jiti- - less- - lightningcss- msw- - sass- - sass-embedded- - stylus- - sugarss- - supports-color- - terser- - tsx- - yamldependencies:@@ -11827,18 +11451,6 @@ snapshots:string-width: 8.2.1strip-ansi: 7.2.0- dependencies:- ansi-styles: 4.3.0- string-width: 4.2.3- strip-ansi: 6.0.1-- dependencies:- ansi-styles: 6.2.3- string-width: 5.1.2- strip-ansi: 7.2.0-dependencies:ansi-styles: 6.2.3diff --git a/tsconfig.json b/tsconfig.jsonindex 8fe9c1304f..8f97009909 100644--- a/tsconfig.json+++ b/tsconfig.json@@ -21,6 +21,7 @@"noEmit": true,"resolveJsonModule": true,"types": [+ "node","@testing-library/jest-dom"]},diff --git a/vitest.config.ts b/vitest.config.tsindex 31ea0abdf6..c8d5b292a5 100644--- a/vitest.config.ts+++ b/vitest.config.ts@@ -3,19 +3,23 @@/*** @file vitest.config.ts* @input Uses vitest/config, @vitejs/plugin-react- * @output Vitest configuration with jsdom, coverage, and test setup- * @position Root test config; extended by the `ui` project in- * vitest.workspace.ts, which is the actual test entry point. Which files- * run where is decided by the per-project include lists in the workspace- * file — deliberately NOT here: workspace `extends` MERGES arrays, so an- * include list in this file would leak into every extending project and- * double-run files.+ * @output Vitest configuration with jsdom, coverage, test setup, and the two+ * test projects (`ui`, `node`)+ * @position Root test config and the actual test entry point. The two projects+ * under `test.projects` decide which files run where via their per-project+ * include lists. The root-level `test` options (globals, environment,+ * coverage, setupFiles, pool sizing) are inherited by projects that set+ * `extends: true`; the `node` project deliberately does NOT extend, so it+ * runs in a plain node environment without the jsdom/StyleX overhead.+ *+ * (Migrated from the removed `vitest.workspace.ts` for Vitest 4, which+ * dropped the standalone workspace file in favor of inline `test.projects`.)** SYNC: When modified, update this header and root README.md*/import path from 'node:path';-import {defineConfig} from 'vitest/config';+import {configDefaults, defineConfig} from 'vitest/config';import react from '@vitejs/plugin-react';const rootDir = path.resolve(__dirname, '.');@@ -72,11 +76,56 @@ export default defineConfig({},setupFiles: ['./internal/test-utils/src/setup.ts'],// Increase worker heap to prevent OOM crashes on memory-heavy test files- // (e.g. Chat composer tests with contentEditable + popover portals in jsdom).- poolOptions: {- forks: {- execArgv: ['--max-old-space-size=4096'],+ // (e.g. Chat composer tests with contentEditable + popover portals in+ // jsdom). Vitest 4 removed `poolOptions`; per-worker argv is now top-level.+ execArgv: ['--max-old-space-size=4096'],+ // Test projects (migrated from vitest.workspace.ts). Partitioning rule+ // (nothing can fall through):+ // - `ui` = packages/core + packages/lab — need jsdom, the StyleX babel+ // transform, and the jest-dom setup; inherit all of that from+ // the root config via `extends: true`.+ // - `node` = everything else (CLI, build tooling, scripts, internal+ // utils) — no DOM, no StyleX/babel transform, no jest-dom+ // matchers. Deliberately does NOT extend the root config so it+ // runs in a plain node environment and skips the per-file jsdom+ // instantiation that dominated these files' runtime. A new+ // package lands in `node` by default; if its tests need the DOM+ // they fail loudly there — move it into the `ui` include list.+ projects: [+ {+ extends: true,+ test: {+ name: 'ui',+ include: [+ 'packages/core/src/**/*.test.{ts,tsx,mjs}',+ 'packages/lab/src/**/*.test.{ts,tsx,mjs}',+ ],+ },},- },+ {+ // forks pool (vitest default) is required here: several CLI tests call+ // process.chdir(), which worker threads do not support.+ test: {+ name: 'node',+ globals: true,+ environment: 'node',+ // Build @astryxdesign/core once before workers fork. The build-theme+ // suites need a compiled core; doing it here (not per-suite in+ // parallel workers) avoids concurrent `rimraf dist && build`+ // collisions that flake under Vitest 4's reworked pool.+ globalSetup: ['./vitest.global-setup.node.mjs'],+ include: [+ 'packages/**/src/**/*.test.{ts,tsx,mjs}',+ 'internal/**/*.test.{ts,tsx,mjs}',+ 'scripts/**/*.test.{ts,tsx,mjs}',+ ],+ exclude: [+ ...configDefaults.exclude,+ 'packages/core/**',+ 'packages/lab/**',+ ],+ },+ },+ ],},});diff --git a/vitest.global-setup.node.mjs b/vitest.global-setup.node.mjsnew file mode 100644index 0000000000..6e9d4b087d--- /dev/null+++ b/vitest.global-setup.node.mjs@@ -0,0 +1,23 @@+// Copyright (c) Meta Platforms, Inc. and affiliates.++/**+ * @file globalSetup for the `node` test project.+ * @input Uses the shared ensureCoreBuilt helper.+ * @output Builds @astryxdesign/core once, before any test worker forks.+ * @position Referenced by vitest.config.ts's `node` project. The build-theme+ * suites need a compiled @astryxdesign/core (`astryx theme build` imports its+ * compiled theme entry). Building here — once, in the main process, before+ * Vitest spawns parallel workers — means every suite's beforeAll sees dist+ * already present and short-circuits, so no two workers ever run core's+ * `rimraf dist && build` concurrently. That concurrent-build collision is+ * what nondeterministically broke a build-theme suite under Vitest 4's+ * reworked pool scheduling ("Could not resolve dist/index.js").+ *+ * SYNC: When modified, update this header.+ */++import {ensureCoreBuilt} from './packages/cli/src/commands/ensure-core-built.mjs';++export default function setup() {+ ensureCoreBuilt();+}diff --git a/vitest.workspace.ts b/vitest.workspace.tsdeleted file mode 100644index fe3168e700..0000000000--- a/vitest.workspace.ts+++ /dev/null@@ -1,65 +0,0 @@-// Copyright (c) Meta Platforms, Inc. and affiliates.--/**- * @file vitest.workspace.ts- * @input Uses vitest/config defineWorkspace, extends ./vitest.config.ts- * @output Two test projects: `ui` (jsdom + StyleX babel) and `node` (plain node)- * @position Test entry point; when this file exists, `vitest run` executes the- * projects below instead of the root config's include list.- *- * Why two projects: ~105 of the ~316 test files (packages/cli, scripts,- * internal tooling) never touch the DOM, but the single root config gave every- * file a fresh jsdom environment plus the React/StyleX babel transform —- * pure per-file overhead for node code. Splitting lets the node project skip- * both.- *- * Partitioning rule (nothing can fall through):- * - `ui` = packages/core + packages/lab (explicit list)- * - `node`= everything else the root include matches (same globs, with- * core/lab excluded)- * A new package lands in `node` by default; if its tests need the DOM they- * fail loudly there — move the package into the `ui` include list.- *- * SYNC: When modified, update this header. Keep the `ui` include list and the- * `node` exclude list in lockstep.- */--import {configDefaults, defineWorkspace} from 'vitest/config';--export default defineWorkspace([- // UI packages — need jsdom, the StyleX babel transform, and the jest-dom- // setup file. Inherits all of that from the root config.- {- extends: './vitest.config.ts',- test: {- name: 'ui',- include: [- 'packages/core/src/**/*.test.{ts,tsx,mjs}',- 'packages/lab/src/**/*.test.{ts,tsx,mjs}',- ],- },- },- // Node-only code (CLI, build tooling, scripts, internal utils) — no DOM, no- // StyleX/babel transform, no jest-dom matchers. Deliberately does NOT extend- // the root config: a plain node environment skips the per-file jsdom- // instantiation that dominated these files' runtime.- // forks pool (vitest default) is required here: several CLI tests call- // process.chdir(), which worker threads do not support.- {- test: {- name: 'node',- globals: true,- environment: 'node',- include: [- 'packages/**/src/**/*.test.{ts,tsx,mjs}',- 'internal/**/*.test.{ts,tsx,mjs}',- 'scripts/**/*.test.{ts,tsx,mjs}',- ],- exclude: [- ...configDefaults.exclude,- 'packages/core/**',- 'packages/lab/**',- ],- },- },-]);