@vitest/coverage-istanbul 0.30.1 → 0.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/provider.d.ts +1 -167
- package/dist/provider.js +1 -0
- package/package.json +4 -4
package/dist/provider.d.ts
CHANGED
@@ -3,172 +3,6 @@ import { BaseCoverageProvider } from 'vitest/coverage';
|
|
3
3
|
import { CoverageMap } from 'istanbul-lib-coverage';
|
4
4
|
import { Instrumenter } from 'istanbul-lib-instrument';
|
5
5
|
|
6
|
-
type PartialNull<T> = {
|
7
|
-
[P in keyof T]: T[P] | null;
|
8
|
-
};
|
9
|
-
|
10
|
-
interface RollupError extends RollupLog {
|
11
|
-
name?: string;
|
12
|
-
stack?: string;
|
13
|
-
watchFiles?: string[];
|
14
|
-
}
|
15
|
-
|
16
|
-
type RollupWarning = RollupLog;
|
17
|
-
|
18
|
-
interface RollupLog {
|
19
|
-
binding?: string;
|
20
|
-
cause?: unknown;
|
21
|
-
code?: string;
|
22
|
-
exporter?: string;
|
23
|
-
frame?: string;
|
24
|
-
hook?: string;
|
25
|
-
id?: string;
|
26
|
-
ids?: string[];
|
27
|
-
loc?: {
|
28
|
-
column: number;
|
29
|
-
file?: string;
|
30
|
-
line: number;
|
31
|
-
};
|
32
|
-
message: string;
|
33
|
-
names?: string[];
|
34
|
-
plugin?: string;
|
35
|
-
pluginCode?: string;
|
36
|
-
pos?: number;
|
37
|
-
reexporter?: string;
|
38
|
-
stack?: string;
|
39
|
-
url?: string;
|
40
|
-
}
|
41
|
-
|
42
|
-
interface SourceMap {
|
43
|
-
file: string;
|
44
|
-
mappings: string;
|
45
|
-
names: string[];
|
46
|
-
sources: string[];
|
47
|
-
sourcesContent: (string | null)[];
|
48
|
-
version: number;
|
49
|
-
toString(): string;
|
50
|
-
toUrl(): string;
|
51
|
-
}
|
52
|
-
|
53
|
-
interface ModuleOptions {
|
54
|
-
assertions: Record<string, string>;
|
55
|
-
meta: CustomPluginOptions;
|
56
|
-
moduleSideEffects: boolean | 'no-treeshake';
|
57
|
-
syntheticNamedExports: boolean | string;
|
58
|
-
}
|
59
|
-
|
60
|
-
interface PluginCache {
|
61
|
-
delete(id: string): boolean;
|
62
|
-
get<T = any>(id: string): T;
|
63
|
-
has(id: string): boolean;
|
64
|
-
set<T = any>(id: string, value: T): void;
|
65
|
-
}
|
66
|
-
|
67
|
-
interface MinimalPluginContext {
|
68
|
-
meta: PluginContextMeta;
|
69
|
-
}
|
70
|
-
|
71
|
-
interface EmittedAsset {
|
72
|
-
fileName?: string;
|
73
|
-
name?: string;
|
74
|
-
needsCodeReference?: boolean;
|
75
|
-
source?: string | Uint8Array;
|
76
|
-
type: 'asset';
|
77
|
-
}
|
78
|
-
|
79
|
-
interface EmittedChunk {
|
80
|
-
fileName?: string;
|
81
|
-
id: string;
|
82
|
-
implicitlyLoadedAfterOneOf?: string[];
|
83
|
-
importer?: string;
|
84
|
-
name?: string;
|
85
|
-
preserveSignature?: PreserveEntrySignaturesOption;
|
86
|
-
type: 'chunk';
|
87
|
-
}
|
88
|
-
|
89
|
-
type EmittedFile = EmittedAsset | EmittedChunk;
|
90
|
-
|
91
|
-
type EmitFile = (emittedFile: EmittedFile) => string;
|
92
|
-
|
93
|
-
interface ModuleInfo extends ModuleOptions {
|
94
|
-
ast: AcornNode | null;
|
95
|
-
code: string | null;
|
96
|
-
dynamicImporters: readonly string[];
|
97
|
-
dynamicallyImportedIdResolutions: readonly ResolvedId[];
|
98
|
-
dynamicallyImportedIds: readonly string[];
|
99
|
-
exportedBindings: Record<string, string[]> | null;
|
100
|
-
exports: string[] | null;
|
101
|
-
hasDefaultExport: boolean | null;
|
102
|
-
/** @deprecated Use `moduleSideEffects` instead */
|
103
|
-
hasModuleSideEffects: boolean | 'no-treeshake';
|
104
|
-
id: string;
|
105
|
-
implicitlyLoadedAfterOneOf: readonly string[];
|
106
|
-
implicitlyLoadedBefore: readonly string[];
|
107
|
-
importedIdResolutions: readonly ResolvedId[];
|
108
|
-
importedIds: readonly string[];
|
109
|
-
importers: readonly string[];
|
110
|
-
isEntry: boolean;
|
111
|
-
isExternal: boolean;
|
112
|
-
isIncluded: boolean | null;
|
113
|
-
}
|
114
|
-
|
115
|
-
type GetModuleInfo = (moduleId: string) => ModuleInfo | null;
|
116
|
-
|
117
|
-
interface CustomPluginOptions {
|
118
|
-
[plugin: string]: any;
|
119
|
-
}
|
120
|
-
|
121
|
-
interface PluginContext extends MinimalPluginContext {
|
122
|
-
addWatchFile: (id: string) => void;
|
123
|
-
cache: PluginCache;
|
124
|
-
emitFile: EmitFile;
|
125
|
-
error: (error: RollupError | string, pos?: number | { column: number; line: number }) => never;
|
126
|
-
getFileName: (fileReferenceId: string) => string;
|
127
|
-
getModuleIds: () => IterableIterator<string>;
|
128
|
-
getModuleInfo: GetModuleInfo;
|
129
|
-
getWatchFiles: () => string[];
|
130
|
-
load: (
|
131
|
-
options: { id: string; resolveDependencies?: boolean } & Partial<PartialNull<ModuleOptions>>
|
132
|
-
) => Promise<ModuleInfo>;
|
133
|
-
/** @deprecated Use `this.getModuleIds` instead */
|
134
|
-
moduleIds: IterableIterator<string>;
|
135
|
-
parse: (input: string, options?: any) => AcornNode;
|
136
|
-
resolve: (
|
137
|
-
source: string,
|
138
|
-
importer?: string,
|
139
|
-
options?: {
|
140
|
-
assertions?: Record<string, string>;
|
141
|
-
custom?: CustomPluginOptions;
|
142
|
-
isEntry?: boolean;
|
143
|
-
skipSelf?: boolean;
|
144
|
-
}
|
145
|
-
) => Promise<ResolvedId | null>;
|
146
|
-
setAssetSource: (assetReferenceId: string, source: string | Uint8Array) => void;
|
147
|
-
warn: (warning: RollupWarning | string, pos?: number | { column: number; line: number }) => void;
|
148
|
-
}
|
149
|
-
|
150
|
-
interface PluginContextMeta {
|
151
|
-
rollupVersion: string;
|
152
|
-
watchMode: boolean;
|
153
|
-
}
|
154
|
-
|
155
|
-
interface ResolvedId extends ModuleOptions {
|
156
|
-
external: boolean | 'absolute';
|
157
|
-
id: string;
|
158
|
-
resolvedBy: string;
|
159
|
-
}
|
160
|
-
|
161
|
-
interface TransformPluginContext extends PluginContext {
|
162
|
-
getCombinedSourcemap: () => SourceMap;
|
163
|
-
}
|
164
|
-
type PreserveEntrySignaturesOption = false | 'strict' | 'allow-extension' | 'exports-only';
|
165
|
-
|
166
|
-
interface AcornNode {
|
167
|
-
end: number;
|
168
|
-
start: number;
|
169
|
-
type: string;
|
170
|
-
}
|
171
|
-
|
172
6
|
type Options = ResolvedCoverageOptions<'istanbul'>;
|
173
7
|
type Threshold = 'lines' | 'functions' | 'statements' | 'branches';
|
174
8
|
interface TestExclude {
|
@@ -198,7 +32,7 @@ declare class IstanbulCoverageProvider extends BaseCoverageProvider implements C
|
|
198
32
|
coverages: any[];
|
199
33
|
initialize(ctx: Vitest): void;
|
200
34
|
resolveOptions(): Options;
|
201
|
-
onFileTransform(sourceCode: string, id: string, pluginCtx:
|
35
|
+
onFileTransform(sourceCode: string, id: string, pluginCtx: any): {
|
202
36
|
code: string;
|
203
37
|
map: any;
|
204
38
|
} | undefined;
|
package/dist/provider.js
CHANGED
package/package.json
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "@vitest/coverage-istanbul",
|
3
3
|
"type": "module",
|
4
|
-
"version": "0.
|
4
|
+
"version": "0.31.0",
|
5
5
|
"description": "Istanbul coverage provider for Vitest",
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
7
7
|
"license": "MIT",
|
8
|
-
"funding": "https://
|
9
|
-
"homepage": "https://github.com/vitest-dev/vitest#readme",
|
8
|
+
"funding": "https://opencollective.com/vitest",
|
9
|
+
"homepage": "https://github.com/vitest-dev/vitest/tree/main/packages/coverage-istanbul#readme",
|
10
10
|
"repository": {
|
11
11
|
"type": "git",
|
12
12
|
"url": "git+https://github.com/vitest-dev/vitest.git",
|
@@ -54,7 +54,7 @@
|
|
54
54
|
"@types/istanbul-lib-source-maps": "^4.0.1",
|
55
55
|
"@types/istanbul-reports": "^3.0.1",
|
56
56
|
"pathe": "^1.1.0",
|
57
|
-
"vitest": "0.
|
57
|
+
"vitest": "0.31.0"
|
58
58
|
},
|
59
59
|
"scripts": {
|
60
60
|
"build": "rimraf dist && rollup -c",
|