From d63b490a87137da7f71eacd53e7a223cdd1845cd Mon Sep 17 00:00:00 2001 From: Vladimir Sheremet Date: Mon, 20 Mar 2023 11:27:13 +0100 Subject: [PATCH] chore: inline vitest utils --- packages/snapshot/package.json | 2 +- packages/utils/src/colors.ts | 2 +- packages/ws-client/rollup.config.js | 2 ++ pnpm-lock.yaml | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/snapshot/package.json b/packages/snapshot/package.json index b4f733ce319f..6f1d7eefad9b 100644 --- a/packages/snapshot/package.json +++ b/packages/snapshot/package.json @@ -38,12 +38,12 @@ "prepublishOnly": "pnpm build" }, "dependencies": { - "@vitest/utils": "workspace:*", "magic-string": "^0.27.0", "pathe": "^1.1.0", "pretty-format": "^27.5.1" }, "devDependencies": { + "@vitest/utils": "workspace:*", "@types/natural-compare": "^1.4.1", "natural-compare": "^1.4.0" } diff --git a/packages/utils/src/colors.ts b/packages/utils/src/colors.ts index 94047a0e92e8..297198108123 100644 --- a/packages/utils/src/colors.ts +++ b/packages/utils/src/colors.ts @@ -43,7 +43,7 @@ const string = (str: unknown) => String(str) string.open = '' string.close = '' -const defaultColors = colorsEntries.reduce((acc, [key]) => { +const defaultColors = /* #__PURE__ */ colorsEntries.reduce((acc, [key]) => { acc[key as ColorName] = string return acc }, { isColorSupported: false } as Colors) diff --git a/packages/ws-client/rollup.config.js b/packages/ws-client/rollup.config.js index 545ba5266ba5..3aa8b65d6b95 100644 --- a/packages/ws-client/rollup.config.js +++ b/packages/ws-client/rollup.config.js @@ -18,6 +18,8 @@ const external = [ 'node:fs', 'vitest', 'inspector', + '@vitest/snapshot/environment', + '@vitest/snapshot/manager', ] export default () => [ diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8366e755c3c6..9bba92de3bfc 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -726,12 +726,12 @@ importers: pathe: ^1.1.0 pretty-format: ^27.5.1 dependencies: - '@vitest/utils': link:../utils magic-string: 0.27.0 pathe: 1.1.0 pretty-format: 27.5.1 devDependencies: '@types/natural-compare': 1.4.1 + '@vitest/utils': link:../utils natural-compare: 1.4.0 packages/spy: