diff --git a/package.json b/package.json index 02cfb3421..9e5483225 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,6 @@ ] }, "patchedDependencies": { - "@types/chai@5.0.1": "patches/@types__chai@5.0.1.patch", "@sinonjs/fake-timers@14.0.0": "patches/@sinonjs__fake-timers@14.0.0.patch", "cac@6.7.14": "patches/cac@6.7.14.patch", "@types/sinonjs__fake-timers@8.1.5": "patches/@types__sinonjs__fake-timers@8.1.5.patch", diff --git a/packages/expect/package.json b/packages/expect/package.json index 008e8b498..eaaccf07e 100644 --- a/packages/expect/package.json +++ b/packages/expect/package.json @@ -34,13 +34,13 @@ "dev": "rollup -c --watch" }, "dependencies": { + "@types/chai": "catalog:", "@vitest/spy": "workspace:*", "@vitest/utils": "workspace:*", "chai": "catalog:", "tinyrainbow": "catalog:" }, "devDependencies": { - "@types/chai": "5.0.1", "@vitest/runner": "workspace:*", "rollup-plugin-copy": "^3.5.0" } diff --git a/packages/expect/rollup.config.js b/packages/expect/rollup.config.js index f133b39a9..e36713a37 100644 --- a/packages/expect/rollup.config.js +++ b/packages/expect/rollup.config.js @@ -1,6 +1,5 @@ import { builtinModules, createRequire } from 'node:module' import { defineConfig } from 'rollup' -import copy from 'rollup-plugin-copy' import oxc from 'unplugin-oxc/rollup' import { createDtsUtils } from '../../scripts/build-utils.js' @@ -21,15 +20,6 @@ const plugins = [ oxc({ transform: { target: 'node14' }, }), - copy({ - targets: [ - { - src: 'node_modules/@types/chai/index.d.ts', - dest: 'dist', - rename: 'chai.d.cts', - }, - ], - }), ] export default defineConfig([ diff --git a/packages/vitest/package.json b/packages/vitest/package.json index 95a000e74..7a5d66d88 100644 --- a/packages/vitest/package.json +++ b/packages/vitest/package.json @@ -154,6 +154,7 @@ } }, "dependencies": { + "@types/chai": "catalog:", "@vitest/expect": "workspace:*", "@vitest/mocker": "workspace:*", "@vitest/pretty-format": "workspace:^", diff --git a/patches/@types__chai@5.0.1.patch b/patches/@types__chai@5.0.1.patch deleted file mode 100644 index 942ea6266..000000000 --- a/patches/@types__chai@5.0.1.patch +++ /dev/null @@ -1,51 +0,0 @@ -diff --git a/index.d.ts b/index.d.ts -index 986e0d507d88bc033f0a0f0b4dcc40be0635df94..beab8eae28220a457950cdbf5c7f043424f4fa14 100644 ---- a/index.d.ts -+++ b/index.d.ts -@@ -1,7 +1,7 @@ --import deepEqual = require("deep-eql"); -+// import deepEqual = require("deep-eql"); - --declare global { -- namespace Chai { -+// declare global { -+ declare namespace Chai { - type Message = string | (() => string); - type ObjectProperty = string | symbol | number; - -@@ -73,7 +73,7 @@ declare global { - getPathInfo(obj: object, path: string): PathInfo; - getPathValue(obj: object, path: string): object | undefined; - -- eql: typeof deepEqual; -+ // eql: typeof deepEqual; - } - - type ChaiPlugin = (chai: ChaiStatic, utils: ChaiUtils) => void; -@@ -2104,8 +2104,9 @@ declare global { - stack: string; - } - } --} -+// } - -+declare module "chai" { - export function use(fn: Chai.ChaiPlugin): Chai.ChaiStatic; - - export const util: Chai.ChaiUtils; -@@ -2115,9 +2116,10 @@ export function should(): Chai.Should; - export function Should(): Chai.Should; - export const assert: Chai.AssertStatic; - export const expect: Chai.ExpectStatic; -- --declare global { -- interface Object { -- should: Chai.Assertion; -- } - } -+ -+// declare global { -+// interface Object { -+// should: Chai.Assertion; -+// } -+// } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f7e219641..484244f63 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -18,6 +18,9 @@ catalogs: '@jridgewell/trace-mapping': specifier: ^0.3.25 version: 0.3.25 + '@types/chai': + specifier: ^5.2.2 + version: 5.2.2 '@types/debug': specifier: ^4.1.12 version: 4.1.12 @@ -134,9 +137,6 @@ patchedDependencies: '@sinonjs/fake-timers@14.0.0': hash: 6f7091fcf11165157b4bfb8dde6b5b6b7697e3efd6e9b53bb4bdef442f60a278 path: patches/@sinonjs__fake-timers@14.0.0.patch - '@types/chai@5.0.1': - hash: d8a67f88e932ba6fd5a5cd04e3ed6474636e1b2a33a589695c5ae18676e23aaf - path: patches/@types__chai@5.0.1.patch '@types/sinonjs__fake-timers@8.1.5': hash: 0218b33f433e26861380c2b90c757bde6fea871cb988083c0bd4a9a1f6c00252 path: patches/@types__sinonjs__fake-timers@8.1.5.patch @@ -660,6 +660,9 @@ importers: packages/expect: dependencies: + '@types/chai': + specifier: 'catalog:' + version: 5.2.2 '@vitest/spy': specifier: workspace:* version: link:../spy @@ -673,9 +676,6 @@ importers: specifier: 'catalog:' version: 2.0.0 devDependencies: - '@types/chai': - specifier: 5.0.1 - version: 5.0.1(patch_hash=d8a67f88e932ba6fd5a5cd04e3ed6474636e1b2a33a589695c5ae18676e23aaf) '@vitest/runner': specifier: workspace:* version: link:../runner @@ -940,6 +940,9 @@ importers: packages/vitest: dependencies: + '@types/chai': + specifier: 'catalog:' + version: 5.2.2 '@vitest/browser': specifier: workspace:* version: link:../browser @@ -3961,8 +3964,8 @@ packages: '@types/braces@3.0.1': resolution: {integrity: sha512-+euflG6ygo4bn0JHtn4pYqcXwRtLvElQ7/nnjDu7iYG56H0+OhCd7d6Ug0IE3WcFpZozBKW2+80FUbv5QGk5AQ==} - '@types/chai@5.0.1': - resolution: {integrity: sha512-5T8ajsg3M/FOncpLYW7sdOcD6yf4+722sze/tc4KQV0P8Z2rAr3SAuHCIkYmYpt8VbcQlnz8SxlOlPQYefe4cA==} + '@types/chai@5.2.2': + resolution: {integrity: sha512-8kB30R7Hwqf40JPiKhVzodJs2Qc1ZJ5zuT3uzw5Hq/dhNCl3G3l83jfpdI1e20BP348+fV7VIL/+FxaXkqBmWg==} '@types/codemirror@5.60.15': resolution: {integrity: sha512-dTOvwEQ+ouKJ/rE9LT1Ue2hmP6H1mZv5+CCnNWu2qtiOe2LQa9lCprEY20HxiDmV/Bxh+dXjywmy5aKvoGjULA==} @@ -11889,7 +11892,7 @@ snapshots: '@types/braces@3.0.1': {} - '@types/chai@5.0.1(patch_hash=d8a67f88e932ba6fd5a5cd04e3ed6474636e1b2a33a589695c5ae18676e23aaf)': + '@types/chai@5.2.2': dependencies: '@types/deep-eql': 4.0.2 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 49b67b8bf..154a85659 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -9,6 +9,7 @@ catalog: '@iconify-json/carbon': ^1.2.8 '@iconify-json/logos': ^1.2.4 '@jridgewell/trace-mapping': ^0.3.25 + '@types/chai': ^5.2.2 '@types/debug': ^4.1.12 '@types/estree': ^1.0.7 '@types/istanbul-lib-coverage': ^2.0.6