Showing 5 of 33 files from the diff.
Other files ignored by Codecov
package.json has changed.
CHANGELOG.md has changed.
package-lock.json has changed.

@@ -17,20 +17,20 @@
Loading
17 17
const eventsRewrites: Record<ChangeEvent, Record<ChangeEvent, ChangeEvent | 'buggy' | null>> = {
18 18
	create: {
19 19
		create: 'buggy',
20 -
		delete: null,			//delete file from map
21 -
		update: 'create',
20 +
		delete: null, //delete file from map
21 +
		update: 'create'
22 22
	},
23 23
	delete: {
24 24
		create: 'update',
25 25
		delete: 'buggy',
26 -
		update: 'buggy',
26 +
		update: 'buggy'
27 27
	},
28 28
	update: {
29 29
		create: 'buggy',
30 30
		delete: 'delete',
31 -
		update: 'update',
31 +
		update: 'update'
32 32
	}
33 -
}
33 +
};
34 34
35 35
export class Watcher {
36 36
	emitter: RollupWatcher;
@@ -66,12 +66,10 @@
Loading
66 66
		this.emitter.removeAllListeners();
67 67
	}
68 68
69 -
	invalidate(file?: {event: ChangeEvent, id: string}) {
69 +
	invalidate(file?: { event: ChangeEvent; id: string }) {
70 70
		if (file) {
71 71
			const prevEvent = this.invalidatedIds.get(file.id);
72 -
			const event = prevEvent
73 -
				? eventsRewrites[prevEvent][file.event]
74 -
				: file.event;
72 +
			const event = prevEvent ? eventsRewrites[prevEvent][file.event] : file.event;
75 73
76 74
			if (event === 'buggy') {
77 75
				//TODO: throws or warn? Currently just ignore, uses new event
@@ -92,7 +90,7 @@
Loading
92 90
		this.buildTimeout = setTimeout(() => {
93 91
			this.buildTimeout = null;
94 92
			for (const [id, event] of this.invalidatedIds.entries()) {
95 -
				this.emitter.emit('change', id, {event});
93 +
				this.emitter.emit('change', id, { event });
96 94
			}
97 95
			this.invalidatedIds.clear();
98 96
			this.emitter.emit('restart');
@@ -150,7 +148,7 @@
Loading
150 148
		this.closed = false;
151 149
		this.watched = new Set();
152 150
153 -
		this.skipWrite = config.watch && !!(config.watch as GenericConfigObject).skipWrite;
151 +
		this.skipWrite = Boolean(config.watch && (config.watch as GenericConfigObject).skipWrite);
154 152
		this.options = mergeOptions(config);
155 153
		this.outputs = this.options.output;
156 154
		this.outputFiles = this.outputs.map(output => {
@@ -172,7 +170,7 @@
Loading
172 170
		this.fileWatcher.close();
173 171
	}
174 172
175 -
	invalidate(id: string, details: {event: ChangeEvent, isTransformDependency?: boolean}) {
173 +
	invalidate(id: string, details: { event: ChangeEvent; isTransformDependency?: boolean }) {
176 174
		this.invalidated = true;
177 175
		if (details.isTransformDependency) {
178 176
			for (const module of this.cache.modules) {
@@ -181,7 +179,7 @@
Loading
181 179
				module.originalCode = null as any;
182 180
			}
183 181
		}
184 -
		this.watcher.invalidate({id, event: details.event});
182 +
		this.watcher.invalidate({ id, event: details.event });
185 183
	}
186 184
187 185
	async run() {

@@ -53,7 +53,7 @@
Loading
53 53
				}
54 54
			}
55 55
			if (outputs.length > 1) process.stdout.write(`\n${cyan(bold(`//→ ${file.fileName}:`))}\n`);
56 -
			process.stdout.write(source);
56 +
			process.stdout.write(source as Buffer);
57 57
		}
58 58
		if (!silent) {
59 59
			warnings.flush();

@@ -3,7 +3,10 @@
Loading
3 3
4 4
const CLEAR_SCREEN = '\u001Bc';
5 5
6 -
export function getResetScreen(configs: MergedRollupOptions[], allowClearScreen: boolean) {
6 +
export function getResetScreen(
7 +
	configs: MergedRollupOptions[],
8 +
	allowClearScreen: boolean | undefined
9 +
) {
7 10
	let clearScreen = allowClearScreen;
8 11
	for (const config of configs) {
9 12
		if (config.watch && config.watch.clearScreen === false) {

@@ -103,10 +103,10 @@
Loading
103 103
function hasValidType(
104 104
	emittedFile: unknown
105 105
): emittedFile is { type: 'asset' | 'chunk'; [key: string]: unknown } {
106 -
	return (
106 +
	return Boolean(
107 107
		emittedFile &&
108 -
		((emittedFile as { [key: string]: unknown }).type === 'asset' ||
109 -
			(emittedFile as { [key: string]: unknown }).type === 'chunk')
108 +
			((emittedFile as { [key: string]: unknown }).type === 'asset' ||
109 +
				(emittedFile as { [key: string]: unknown }).type === 'chunk')
110 110
	);
111 111
}
112 112

@@ -85,7 +85,7 @@
Loading
85 85
async function loadConfigFromBundledFile(fileName: string, bundledCode: string) {
86 86
	const resolvedFileName = fs.realpathSync(fileName);
87 87
	const extension = path.extname(resolvedFileName);
88 -
	const defaultLoader = require.extensions[extension]!;
88 +
	const defaultLoader = require.extensions[extension];
89 89
	require.extensions[extension] = (module: NodeModule, requiredFileName: string) => {
90 90
		if (requiredFileName === resolvedFileName) {
91 91
			(module as NodeModuleWithCompile)._compile(bundledCode, requiredFileName);
Files Coverage
cli 94.28%
src 97.34%
browser/path.ts 76.92%
Project Totals (187 files) 97.08%

No yaml found.

Create your codecov.yml to customize your Codecov experience

Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading