Skip to content

Commit 20a17f5

Browse files
committed
release: vite-plugin-checker@0.3.5
1 parent 5391a46 commit 20a17f5

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

packages/vite-plugin-checker/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## [0.3.5](https://github.com/fi3ework/vite-plugin-checker/compare/vite-plugin-checker@0.3.4...vite-plugin-checker@0.3.5) (2021-08-27)
2+
3+
4+
15
## [0.3.4](https://github.com/fi3ework/vite-plugin-checker/compare/vite-plugin-checker@0.3.3...vite-plugin-checker@0.3.4) (2021-07-31)
26

37

packages/vite-plugin-checker/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vite-plugin-checker",
3-
"version": "0.3.4",
3+
"version": "0.3.5",
44
"description": "Vite plugin that runs TypeScript type checker on a separate process.",
55
"main": "lib/main.js",
66
"bin": {

packages/vite-plugin-checker/src/checkers/svelte/main.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@ import type { CreateDiagnostic } from '../../types'
2020
class DiagnosticsWatcher {
2121
private updateDiagnostics: any
2222
private svelteCheck: SvelteCheck
23+
private overlay: boolean
2324

24-
constructor(root: string, private overlay: boolean) {
25+
public constructor(root: string, overlay: boolean) {
26+
this.overlay = overlay
2527
this.svelteCheck = new SvelteCheck(root, {
2628
compilerWarnings: {},
2729
diagnosticSources: ['js', 'svelte', 'css'],
@@ -64,7 +66,7 @@ class DiagnosticsWatcher {
6466
checker: 'svelte',
6567
})
6668

67-
if (currErr == null) {
69+
if (currErr === null) {
6870
currErr = diagnosticToViteError(formattedDiagnostic)
6971
}
7072
logChunk += os.EOL + diagnosticToTerminalLog(formattedDiagnostic, 'svelte')
@@ -111,12 +113,13 @@ const createDiagnostic: CreateDiagnostic<'svelte'> = (pluginConfig) => {
111113
},
112114
configureServer({ root }) {
113115
invariant(pluginConfig.svelte, 'config.svelte should be `false`')
116+
let svelteRoot = root
114117

115118
if (pluginConfig.svelte !== true && pluginConfig.svelte.root) {
116-
root = pluginConfig.svelte.root
119+
svelteRoot = pluginConfig.svelte.root
117120
}
118121

119-
let watcher = new DiagnosticsWatcher(root, overlay)
122+
let watcher = new DiagnosticsWatcher(svelteRoot, overlay)
120123
return watcher
121124
},
122125
}

0 commit comments

Comments
 (0)