Skip to content

Commit

Permalink
build: bump vitest
Browse files Browse the repository at this point in the history
  • Loading branch information
fi3ework committed Apr 29, 2023
1 parent ebf8996 commit 30510a6
Show file tree
Hide file tree
Showing 28 changed files with 194 additions and 273 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
"typescript": "^5.0.4",
"vite": "^4.3.0",
"vite-plugin-checker": "workspace:*",
"vitest": "^0.28.5",
"vitest": "^0.30.1",
"ws": "^8.5.0",
"zx": "^1.14.2"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/vite-plugin-checker/src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { isMainThread as _isMainThread, threadId } from 'worker_threads'

// since vitest run all cases in worker thread, we should compatible with it to pass E2E tests
export const isInVitestEntryThread = threadId === 1 && process.env['VITEST']
export const isInVitestEntryThread = threadId === 0 && process.env['VITEST']
export const isMainThread = _isMainThread || isInVitestEntryThread
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`backend-integration > serve > get initial error 1`] = `"[{\\"checkerId\\":\\"TypeScript\\",\\"frame\\":\\" 4 |/n 5 | function App() {/n > 6 | const [count, setCount] = useState<string>(0)/n | ^/n 7 |/n 8 | return (/n 9 | <div className=/\\"App/\\">\\",\\"id\\":\\"<PROJECT_ROOT>/playground-temp/backend-integration/src/App.tsx\\",\\"level\\":1,\\"loc\\":{\\"column\\":46,\\"file\\":\\"<PROJECT_ROOT>/playground-temp/backend-integration/src/App.tsx\\",\\"line\\":6},\\"message\\":\\"Argument of type 'number' is not assignable to parameter of type 'string | (() => string)'.\\",\\"stack\\":\\"\\"}]"`;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`config-default > serve > get initial error 1`] = `"[{\\"checkerId\\":\\"ESLint\\",\\"frame\\":\\" 1 | import { text } from './text'/n 2 |/n > 3 | var hello = 'Hello'/n | ^^^^^^^^^^^^^^^^^^^/n 4 |/n 5 | const rootDom = document.querySelector('#root')! as HTMLElement/n 6 | rootDom.innerHTML = hello + text\\",\\"id\\":\\"<PROJECT_ROOT>/playground-temp/config-default/src/main.ts\\",\\"level\\":1,\\"loc\\":{\\"column\\":1,\\"file\\":\\"<PROJECT_ROOT>/playground-temp/config-default/src/main.ts\\",\\"line\\":3},\\"message\\":\\"Unexpected var, use let or const instead. (no-var)\\",\\"stack\\":\\"\\"},{\\"checkerId\\":\\"ESLint\\",\\"frame\\":\\" 3 | var hello = 'Hello'/n 4 |/n > 5 | const rootDom = document.querySelector('#root')! as HTMLElement/n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^/n 6 | rootDom.innerHTML = hello + text/n 7 |/n 8 | export {}\\",\\"id\\":\\"<PROJECT_ROOT>/playground-temp/config-default/src/main.ts\\",\\"level\\":0,\\"loc\\":{\\"column\\":17,\\"file\\":\\"<PROJECT_ROOT>/playground-temp/config-default/src/main.ts\\",\\"line\\":5},\\"message\\":\\"Forbidden non-null assertion. (@typescript-eslint/no-non-null-assertion)\\",\\"stack\\":\\"\\"}]"`;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`config-overlay-changes > serve > get initial error from overlay and overlay error content changes on modifying 1`] = `"Unexpected var, use let or const instead. (no-var)"`;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`config-terminal-false > serve > should not log into terminal 1`] = `"[{\\"checkerId\\":\\"ESLint\\",\\"frame\\":\\" 1 | import { text } from './text'/n 2 |/n > 3 | var hello = 'Hello'/n | ^^^^^^^^^^^^^^^^^^^/n 4 |/n 5 | const rootDom = document.querySelector('#root')! as HTMLElement/n 6 | rootDom.innerHTML = hello + text\\",\\"id\\":\\"<PROJECT_ROOT>/playground-temp/config-terminal-false/src/main.ts\\",\\"level\\":1,\\"loc\\":{\\"column\\":1,\\"file\\":\\"<PROJECT_ROOT>/playground-temp/config-terminal-false/src/main.ts\\",\\"line\\":3},\\"message\\":\\"Unexpected var, use let or const instead. (no-var)\\",\\"stack\\":\\"\\"},{\\"checkerId\\":\\"ESLint\\",\\"frame\\":\\" 3 | var hello = 'Hello'/n 4 |/n > 5 | const rootDom = document.querySelector('#root')! as HTMLElement/n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^/n 6 | rootDom.innerHTML = hello + text/n 7 |/n 8 | export {}\\",\\"id\\":\\"<PROJECT_ROOT>/playground-temp/config-terminal-false/src/main.ts\\",\\"level\\":0,\\"loc\\":{\\"column\\":17,\\"file\\":\\"<PROJECT_ROOT>/playground-temp/config-terminal-false/src/main.ts\\",\\"line\\":5},\\"message\\":\\"Forbidden non-null assertion. (@typescript-eslint/no-non-null-assertion)\\",\\"stack\\":\\"\\"}]"`;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`eslint-config-log-level > serve > should only emit warning logs 1`] = `"[{\\"checkerId\\":\\"ESLint\\",\\"frame\\":\\" 3 | var hello = 'Hello'/n 4 |/n > 5 | const rootDom = document.querySelector('#root')!/n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^/n 6 | rootDom.innerHTML = hello + text/n 7 |/n 8 | export {}\\",\\"id\\":\\"<PROJECT_ROOT>/playground-temp/eslint-config-log-level/src/main.ts\\",\\"level\\":0,\\"loc\\":{\\"column\\":17,\\"file\\":\\"<PROJECT_ROOT>/playground-temp/eslint-config-log-level/src/main.ts\\",\\"line\\":5},\\"message\\":\\"Forbidden non-null assertion. (@typescript-eslint/no-non-null-assertion)\\",\\"stack\\":\\"\\"}]"`;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`eslint > serve > get initial error and subsequent error 1`] = `"[{\\"checkerId\\":\\"ESLint\\",\\"frame\\":\\" 1 | import { text } from './text'/n 2 |/n > 3 | var hello = 'Hello'/n | ^^^^^^^^^^^^^^^^^^^/n 4 |/n 5 | const rootDom = document.querySelector('#root')!/n 6 | rootDom.innerHTML = hello + text\\",\\"id\\":\\"<PROJECT_ROOT>/playground-temp/eslint-default/src/main.ts\\",\\"level\\":1,\\"loc\\":{\\"column\\":1,\\"file\\":\\"<PROJECT_ROOT>/playground-temp/eslint-default/src/main.ts\\",\\"line\\":3},\\"message\\":\\"Unexpected var, use let or const instead. (no-var)\\",\\"stack\\":\\"\\"},{\\"checkerId\\":\\"ESLint\\",\\"frame\\":\\" 3 | var hello = 'Hello'/n 4 |/n > 5 | const rootDom = document.querySelector('#root')!/n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^/n 6 | rootDom.innerHTML = hello + text/n 7 |/n 8 | export {}\\",\\"id\\":\\"<PROJECT_ROOT>/playground-temp/eslint-default/src/main.ts\\",\\"level\\":0,\\"loc\\":{\\"column\\":17,\\"file\\":\\"<PROJECT_ROOT>/playground-temp/eslint-default/src/main.ts\\",\\"line\\":5},\\"message\\":\\"Forbidden non-null assertion. (@typescript-eslint/no-non-null-assertion)\\",\\"stack\\":\\"\\"}]"`;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`multiple-hmr > serve > get initial error and subsequent error 1`] = `"[{\\"checkerId\\":\\"TypeScript\\",\\"frame\\":\\" 4 |/n 5 | function App() {/n > 6 | var [count, setCount] = useState<string>(1)/n | ^/n 7 | return (/n 8 | <div className=/\\"App/\\">/n 9 | <header className=/\\"App-header/\\">\\",\\"id\\":\\"<PROJECT_ROOT>/playground-temp/multiple-hmr/src/App.tsx\\",\\"level\\":1,\\"loc\\":{\\"column\\":44,\\"file\\":\\"<PROJECT_ROOT>/playground-temp/multiple-hmr/src/App.tsx\\",\\"line\\":6},\\"message\\":\\"Argument of type 'number' is not assignable to parameter of type 'string | (() => string)'.\\",\\"stack\\":\\"\\"}]"`;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`multiple-reload > serve > get initial error and subsequent error 1`] = `"[{\\"checkerId\\":\\"TypeScript\\",\\"frame\\":\\" 1 | import { text } from './text'/n 2 |/n > 3 | var hello1: number = 'Hello1'/n | ^^^^^^/n 4 | var hello2: boolean = 'Hello2'/n 5 |/n 6 | const rootDom = document.querySelector('#root')!\\",\\"id\\":\\"<PROJECT_ROOT>/playground-temp/multiple-reload/src/main.ts\\",\\"level\\":1,\\"loc\\":{\\"column\\":5,\\"file\\":\\"<PROJECT_ROOT>/playground-temp/multiple-reload/src/main.ts\\",\\"line\\":3},\\"message\\":\\"Type 'string' is not assignable to type 'number'.\\",\\"stack\\":\\"\\"},{\\"checkerId\\":\\"TypeScript\\",\\"frame\\":\\" 2 |/n 3 | var hello1: number = 'Hello1'/n > 4 | var hello2: boolean = 'Hello2'/n | ^^^^^^/n 5 |/n 6 | const rootDom = document.querySelector('#root')!/n 7 | rootDom.innerHTML = hello1 + text\\",\\"id\\":\\"<PROJECT_ROOT>/playground-temp/multiple-reload/src/main.ts\\",\\"level\\":1,\\"loc\\":{\\"column\\":5,\\"file\\":\\"<PROJECT_ROOT>/playground-temp/multiple-reload/src/main.ts\\",\\"line\\":4},\\"message\\":\\"Type 'string' is not assignable to type 'boolean'.\\",\\"stack\\":\\"\\"}]"`;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`stylelint > serve > get initial error and subsequent error 1`] = `"[{\\"checkerId\\":\\"Stylelint\\",\\"frame\\":\\" > 1 | #root {/n | ^/n > 2 | }/n | ^^/n 3 |/n 4 | body {/n 5 | color: rgb(0, 0, 0);\\",\\"id\\":\\"<PROJECT_ROOT>/playground-temp/stylelint-default/src/style.css\\",\\"level\\":1,\\"loc\\":{\\"column\\":7,\\"file\\":\\"<PROJECT_ROOT>/playground-temp/stylelint-default/src/style.css\\",\\"line\\":1},\\"message\\":\\"Unexpected empty block (block-no-empty) (block-no-empty)\\",\\"stack\\":\\"\\"},{\\"checkerId\\":\\"Stylelint\\",\\"frame\\":\\" 3 |/n 4 | body {/n > 5 | color: rgb(0, 0, 0);/n | ^^^^^^^^^^^^/n 6 | }/n 7 |\\",\\"id\\":\\"<PROJECT_ROOT>/playground-temp/stylelint-default/src/style.css\\",\\"level\\":1,\\"loc\\":{\\"column\\":10,\\"file\\":\\"<PROJECT_ROOT>/playground-temp/stylelint-default/src/style.css\\",\\"line\\":5},\\"message\\":\\"Expected modern color-function notation (color-function-notation) (color-function-notation)\\",\\"stack\\":\\"\\"}]"`;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`typescript-react > serve > get initial error and subsequent error 1`] = `"[{\\"checkerId\\":\\"TypeScript\\",\\"frame\\":\\" 4 |/n 5 | function App() {/n > 6 | const [count, setCount] = useState<string>(1)/n | ^/n 7 | return (/n 8 | <div className=/\\"App/\\">/n 9 | <header className=/\\"App-header/\\">\\",\\"id\\":\\"<PROJECT_ROOT>/playground-temp/typescript-react/src/App.tsx\\",\\"level\\":1,\\"loc\\":{\\"column\\":46,\\"file\\":\\"<PROJECT_ROOT>/playground-temp/typescript-react/src/App.tsx\\",\\"line\\":6},\\"message\\":\\"Argument of type 'number' is not assignable to parameter of type 'string | (() => string)'.\\",\\"stack\\":\\"\\"}]"`;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`vue2-vls > serve > get initial error and subsequent error 1`] = `"[{\\"checkerId\\":\\"VLS\\",\\"frame\\":\\" 1 | <template>/n 2 | <div class=/\\"hello/\\">/n> 3 | <h1>{{ msg1 }}</h1>/n | ^^^^/n 4 | <p>/n 5 | For a guide and recipes on how to configure / customize this project,<br />/n 6 | check out the\\",\\"id\\":\\"<PROJECT_ROOT>/playground-temp/vls-vue2/src/components/HelloWorld.vue\\",\\"level\\":1,\\"loc\\":{\\"column\\":12,\\"file\\":\\"<PROJECT_ROOT>/playground-temp/vls-vue2/src/components/HelloWorld.vue\\",\\"line\\":3},\\"message\\":\\"Property 'msg1' does not exist on type 'CombinedVueInstance<{ msg: string; } & Vue<Record<string, any>, Record<string, any>, never, never, (event: string, ...args: any[]) => Vue<Record<string, any>, Record<string, any>, never, never, ...>> & Vue<...>, ... 4 more ..., {}>'. Did you mean 'msg'?\\",\\"stack\\":\\"\\"}]"`;

Expand Down

This file was deleted.

Loading

0 comments on commit 30510a6

Please sign in to comment.