diff --git a/angular/package.json b/angular/package.json index 98dd238a0..b03ff41b3 100644 --- a/angular/package.json +++ b/angular/package.json @@ -34,16 +34,16 @@ "@angular/cli": "21.2.7", "@angular/compiler-cli": "21.2.8", "@types/jest": "^30.0.0", - "@types/node": "^12.11.1", - "@vitest/browser-playwright": "^4.0.16", - "@vitest/coverage-v8": "^4.0.16", - "@vitest/ui": "4.0.16", + "@types/node": "^20.0.0", + "@vitest/browser-playwright": "4.1.5", + "@vitest/coverage-v8": "4.1.5", + "@vitest/ui": "4.1.5", "esbuild-plugin-ignore": "^1.1.1", "jsdom": "^27.4.0", "ng-packagr": "21.0.0", "playwright": "^1.57.0", "prettier": "3.7.4", "typescript": "5.9.3", - "vitest": "^4.0.16" + "vitest": "4.1.5" } } diff --git a/core/eslint.config.js b/core/eslint.config.mjs similarity index 73% rename from core/eslint.config.js rename to core/eslint.config.mjs index 2125704e7..dd645e1e2 100644 --- a/core/eslint.config.js +++ b/core/eslint.config.mjs @@ -1,11 +1,14 @@ -const { defineConfig, globalIgnores } = require('eslint/config'); +import { defineConfig, globalIgnores } from 'eslint/config'; +import globals from 'globals'; +import tsParser from '@typescript-eslint/parser'; +import typescriptEslint from '@typescript-eslint/eslint-plugin'; +import js from '@eslint/js'; +import { FlatCompat } from '@eslint/eslintrc'; +import { fileURLToPath } from 'node:url'; +import { dirname } from 'node:path'; -const globals = require('globals'); -const tsParser = require('@typescript-eslint/parser'); -const typescriptEslint = require('@typescript-eslint/eslint-plugin'); -const js = require('@eslint/js'); - -const { FlatCompat } = require('@eslint/eslintrc'); +const __filename = fileURLToPath(import.meta.url); +const __dirname = dirname(__filename); const compat = new FlatCompat({ baseDirectory: __dirname, @@ -15,7 +18,7 @@ const compat = new FlatCompat({ const WARN = 1, ERROR = 2; -module.exports = defineConfig([ +export default defineConfig([ { files: ['**/*.ts', '**/*.tsx'], languageOptions: { @@ -77,9 +80,9 @@ module.exports = defineConfig([ '**/.eslintrc.js', '**/eslint.config.js', '**/replace.js', - '**/setupTests.js', '**/stencil.config.ts', '**/playwright.config.ts', - '**/stencil.transformer.js' + '**/vitest-setup-plugin.ts', + '**/vitest.config.ts' ]) ]); diff --git a/core/package.json b/core/package.json index 1b29eef4e..39a18553f 100644 --- a/core/package.json +++ b/core/package.json @@ -30,10 +30,10 @@ "postbuild": "node replace", "postbuild:ci": "node replace", "start": "stencil build --dev --watch --serve", - "test": "stencil test --spec --runInBand", + "test": "stencil-test", "test:e2e": "playwright test", "posttest:e2e": "node replace && pnpm --filter @haiilo/catalyst-angular-workspace run prettier", - "test:watch": "stencil test --spec --watchAll", + "test:watch": "stencil-test watch", "generate": "stencil generate", "prettier": "prettier --write .", "prettier:check": "prettier --check .", @@ -49,7 +49,7 @@ "dependencies": { "@floating-ui/dom": "1.6.13", "@haiilo/catalyst-tokens": "workspace:*", - "@stencil/core": "4.38.3", + "@stencil/core": "4.43.3", "autosize": "6.0.1", "autosize-input": "1.0.2", "cleave-zen": "0.0.17", @@ -67,16 +67,14 @@ "@stencil/playwright": "0.2.3", "@stencil/react-output-target": "0.5.3", "@stencil/sass": "3.2.3", + "@stencil/vitest": "1.11.6", "@types/autosize": "^4.0.3", - "@types/jest": "^29.5.10", "@types/node": "^20.14.2", "@types/toastify-js": "^1.12.3", "@typescript-eslint/eslint-plugin": "8.52.0", "@typescript-eslint/parser": "8.52.0", "eslint": "9.39.2", "eslint-config-prettier": "9.1.2", - "jest": "29.7.0", - "jest-cli": "29.7.0", "prettier": "3.7.4", "puppeteer": "24.32.0", "replace-in-file": "8.4.0", @@ -85,6 +83,7 @@ "stylelint": "16.26.1", "stylelint-config-prettier-scss": "1.0.0", "stylelint-config-standard-scss": "14.0.0", - "typescript": "5.9.3" + "typescript": "5.9.3", + "vitest": "4.1.5" } } diff --git a/core/setupTests.js b/core/setupTests.js deleted file mode 100644 index bdf1343cd..000000000 --- a/core/setupTests.js +++ /dev/null @@ -1,11 +0,0 @@ -global.ResizeObserver = jest.fn().mockImplementation(() => ({ - observe: jest.fn(), - unobserve: jest.fn(), - disconnect: jest.fn() -})); - -global.MutationObserver = jest.fn().mockImplementation(() => ({ - observe: jest.fn(), - takeRecords: jest.fn(), - disconnect: jest.fn() -})); diff --git a/core/src/components.d.ts b/core/src/components.d.ts index 0098b8714..d8b810902 100644 --- a/core/src/components.d.ts +++ b/core/src/components.d.ts @@ -3143,6 +3143,10 @@ declare namespace LocalJSX { * @default false */ "disabled"?: boolean; + /** + * The `id` of a `