[READ-ONLY] Mirror of https://github.com/vitest-dev/vitest. Next generation testing framework powered by Vite. vitest.dev
test testing-tools vite
12

Configure Feed

Select the types of activity you want to include in your feed.

fix: publish utils and snapshot .d.ts files for typescript (#3172)

authored by

Vladimir and committed by
GitHub
(Apr 11, 2023, 10:11 AM +0200) 7af64444 000bca97

+11 -15
+1
packages/snapshot/environment.d.ts
··· 1 + export * from './dist/environment.js'
+1
packages/snapshot/manager.d.ts
··· 1 + export * from './dist/manager.js'
+2 -1
packages/utils/package.json
··· 29 29 "module": "./dist/index.js", 30 30 "types": "./dist/index.d.ts", 31 31 "files": [ 32 - "dist" 32 + "dist", 33 + "*.d.ts" 33 34 ], 34 35 "scripts": { 35 36 "build": "rimraf dist && rollup -c",
+6 -5
packages/utils/src/descriptors.ts
··· 1 - import concordance, { type DisplayOptions } from 'concordance' 1 + import concordance from 'concordance' 2 2 import { getColors } from './colors' 3 + 4 + interface DisplayOptions { 5 + theme?: any 6 + maxDepth?: number 7 + } 3 8 4 9 export function getConcordanceTheme() { 5 10 const c = getColors() ··· 86 91 87 92 export function diffDescriptors(actual: unknown, expected: unknown, options: DisplayOptions) { 88 93 return concordance.diff(expected, actual, options) 89 - } 90 - 91 - export function formatDescriptor(value: unknown, options: DisplayOptions) { 92 - return concordance.formatDescriptor(value, options) 93 94 }
-2
packages/utils/src/diff.ts
··· 1 1 import { getColors } from './colors' 2 2 import { diffDescriptors, getConcordanceTheme } from './descriptors' 3 3 4 - export * from './descriptors' 5 - 6 4 export interface DiffOptions { 7 5 showLegend?: boolean 8 6 }
+1 -7
packages/utils/src/external.d.ts
··· 1 1 declare module 'concordance' { 2 - interface DisplayOptions { 3 - theme?: any 4 - maxDepth?: number 5 - } 6 - 7 - export function diff(expected: unknown, actual: unknown, options?: DisplayOptions): string 8 - export function formatDescriptor(descriptor: unknown, options?: DisplayOptions): string 2 + export function diff(expected: unknown, actual: unknown, options?: any): string 9 3 }