From dcf0d6afe974487a53f7e7c90c0f79d29fa885d2 Mon Sep 17 00:00:00 2001 From: Vladimir Date: Tue, 6 Feb 2024 22:00:31 +0100 Subject: [PATCH] chore(deps): update antfu stylelint config (#5127) --- eslint.config.js | 2 + examples/react-storybook/src/App.tsx | 12 +- package.json | 2 +- packages/browser/src/node/esmInjector.ts | 4 +- .../expect/src/jest-asymmetric-matchers.ts | 8 +- packages/expect/src/jest-utils.ts | 6 +- packages/snapshot/src/port/state.ts | 4 +- packages/spy/src/index.ts | 4 +- packages/ui/client/composables/summary.ts | 4 +- packages/utils/src/ast/esmWalker.ts | 6 +- packages/utils/src/ast/index.ts | 10 +- packages/utils/src/diff/cleanupSemantic.ts | 57 ++-- packages/utils/src/diff/diffLines.ts | 6 +- .../utils/src/diff/normalizeDiffOptions.ts | 8 +- packages/vite-node/src/cli.ts | 16 +- packages/vite-node/src/hmr/emitter.ts | 2 +- packages/vite-node/src/hmr/hmr.ts | 4 +- .../vitest/src/integrations/env/loader.ts | 4 +- packages/vitest/src/node/config.ts | 2 +- packages/vitest/src/node/error.ts | 18 +- packages/vitest/src/node/hoistMocks.ts | 2 +- packages/vitest/src/node/reporters/index.ts | 16 +- packages/vitest/src/node/reporters/junit.ts | 14 +- .../vitest/src/runtime/external-executor.ts | 2 - packages/vitest/src/runtime/mocker.ts | 8 +- .../src/runtime/vm/commonjs-executor.ts | 2 - .../vitest/src/runtime/vm/esm-executor.ts | 2 - packages/vitest/src/runtime/workers/vm.ts | 2 +- pnpm-lock.yaml | 308 ++++++++++++------ test/core/src/cjs/module-cjs.ts | 2 - test/core/test/injector-esm.test.ts | 20 +- test/core/test/injector-mock.test.ts | 20 +- test/esm/test/prototype.spec.ts | 2 +- test/reporters/src/data-for-junit.ts | 6 +- test/reporters/src/data.ts | 20 +- 35 files changed, 361 insertions(+), 244 deletions(-) diff --git a/eslint.config.js b/eslint.config.js index 624d9673c..493c5cfd2 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -23,6 +23,8 @@ export default antfu( 'node/prefer-global/buffer': 'off', 'node/prefer-global/process': 'off', 'no-empty-pattern': 'off', + 'antfu/indent-binary-ops': 'off', + 'style/member-delimiter-style': ['error', { multiline: { delimiter: 'none' }, singleline: { delimiter: 'semi' } }], 'ts/no-invalid-this': 'off', diff --git a/examples/react-storybook/src/App.tsx b/examples/react-storybook/src/App.tsx index 4010627fa..21d8fb428 100644 --- a/examples/react-storybook/src/App.tsx +++ b/examples/react-storybook/src/App.tsx @@ -19,12 +19,12 @@ export function App() {

Storybook Testing Example

{isLoading && Loading...} {isSuccess - && data!.map(post => ( -
-

{post.title}

-

{post.body}

-
- ))} + && data!.map(post => ( +
+

{post.title}

+

{post.body}

+
+ ))} {isError && Error loading posts} ) diff --git a/package.json b/package.json index 969efa046..a652707cc 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "test:browser:playwright": "pnpm -C test/browser run test:playwright" }, "devDependencies": { - "@antfu/eslint-config": "^1.1.1", + "@antfu/eslint-config": "^1.2.1", "@antfu/ni": "^0.21.12", "@rollup/plugin-commonjs": "^25.0.7", "@rollup/plugin-json": "^6.0.1", diff --git a/packages/browser/src/node/esmInjector.ts b/packages/browser/src/node/esmInjector.ts index 0edc80480..50a5de7ab 100644 --- a/packages/browser/src/node/esmInjector.ts +++ b/packages/browser/src/node/esmInjector.ts @@ -77,7 +77,7 @@ export function injectVitestModule(code: string, id: string, parse: PluginContex s.appendLeft( position, `\nObject.defineProperty(${viInjectedKey}, "${name}", ` - + `{ enumerable: true, configurable: true, get(){ return ${local} }});`, + + `{ enumerable: true, configurable: true, get(){ return ${local} }});`, ) } @@ -171,7 +171,7 @@ export function injectVitestModule(code: string, id: string, parse: PluginContex s.remove(node.start, node.start + 15 /* 'export default '.length */) s.append( `\nObject.defineProperty(${viInjectedKey}, "default", ` - + `{ enumerable: true, configurable: true, value: ${name} });`, + + `{ enumerable: true, configurable: true, value: ${name} });`, ) } else { diff --git a/packages/expect/src/jest-asymmetric-matchers.ts b/packages/expect/src/jest-asymmetric-matchers.ts index c4df97ff5..424311d01 100644 --- a/packages/expect/src/jest-asymmetric-matchers.ts +++ b/packages/expect/src/jest-asymmetric-matchers.ts @@ -164,9 +164,9 @@ export class ArrayContaining extends AsymmetricMatcher> { const result = this.sample.length === 0 || (Array.isArray(other) - && this.sample.every(item => - other.some(another => equals(item, another, matcherContext.customTesters)), - )) + && this.sample.every(item => + other.some(another => equals(item, another, matcherContext.customTesters)), + )) return this.inverse ? !result : result } @@ -185,7 +185,7 @@ export class Any extends AsymmetricMatcher { if (typeof sample === 'undefined') { throw new TypeError( 'any() expects to be passed a constructor function. ' - + 'Please pass one or use anything() to match any object.', + + 'Please pass one or use anything() to match any object.', ) } super(sample) diff --git a/packages/expect/src/jest-utils.ts b/packages/expect/src/jest-utils.ts index a71cee767..60322d019 100644 --- a/packages/expect/src/jest-utils.ts +++ b/packages/expect/src/jest-utils.ts @@ -435,9 +435,9 @@ function hasPropertyInObject(object: object, key: string): boolean { function isObjectWithKeys(a: any) { return isObject(a) - && !(a instanceof Error) - && !(Array.isArray(a)) - && !(a instanceof Date) + && !(a instanceof Error) + && !(Array.isArray(a)) + && !(a instanceof Date) } export function subsetEquality(object: unknown, subset: unknown, customTesters: Array = []): boolean | undefined { diff --git a/packages/snapshot/src/port/state.ts b/packages/snapshot/src/port/state.ts index dbaf25269..b54139b53 100644 --- a/packages/snapshot/src/port/state.ts +++ b/packages/snapshot/src/port/state.ts @@ -281,8 +281,8 @@ export default class SnapshotState { // * There's no snapshot file or a file without this snapshot on a CI environment. if ( (hasSnapshot && this._updateSnapshot === 'all') - || ((!hasSnapshot || !snapshotIsPersisted) - && (this._updateSnapshot === 'new' || this._updateSnapshot === 'all')) + || ((!hasSnapshot || !snapshotIsPersisted) + && (this._updateSnapshot === 'new' || this._updateSnapshot === 'all')) ) { if (this._updateSnapshot === 'all') { if (!pass) { diff --git a/packages/spy/src/index.ts b/packages/spy/src/index.ts index 5ee596bec..023b70957 100644 --- a/packages/spy/src/index.ts +++ b/packages/spy/src/index.ts @@ -320,8 +320,8 @@ export const mocks = new Set() export function isMockFunction(fn: any): fn is MockInstance { return typeof fn === 'function' - && '_isMockFunction' in fn - && fn._isMockFunction + && '_isMockFunction' in fn + && fn._isMockFunction } export function spyOn>>( diff --git a/packages/ui/client/composables/summary.ts b/packages/ui/client/composables/summary.ts index 7193cb729..94d2318b5 100644 --- a/packages/ui/client/composables/summary.ts +++ b/packages/ui/client/composables/summary.ts @@ -11,8 +11,8 @@ export const filesSuccess = computed(() => files.value.filter(f => f.result?.sta export const filesIgnore = computed(() => files.value.filter(f => f.mode === 'skip' || f.mode === 'todo')) export const filesRunning = computed(() => files.value.filter(f => !filesFailed.value.includes(f) - && !filesSuccess.value.includes(f) - && !filesIgnore.value.includes(f), + && !filesSuccess.value.includes(f) + && !filesIgnore.value.includes(f), )) export const filesSkipped = computed(() => filesIgnore.value.filter(f => f.mode === 'skip')) export const filesSnapshotFailed = computed(() => files.value.filter(hasFailedSnapshot)) diff --git a/packages/utils/src/ast/esmWalker.ts b/packages/utils/src/ast/esmWalker.ts index 01e54ad1e..fdd3e4513 100644 --- a/packages/utils/src/ast/esmWalker.ts +++ b/packages/utils/src/ast/esmWalker.ts @@ -157,7 +157,7 @@ export function esmWalker( // assignment of a destructuring variable if ( (parent?.type === 'TemplateLiteral' - && parent?.expressions.includes(child)) + && parent?.expressions.includes(child)) || (parent?.type === 'CallExpression' && parent?.callee === child) ) return @@ -210,8 +210,8 @@ function isRefIdentifier(id: Identifier, parent: _Node, parentStack: _Node[]) { if ( parent.type === 'CatchClause' || ((parent.type === 'VariableDeclarator' - || parent.type === 'ClassDeclaration') - && parent.id === id) + || parent.type === 'ClassDeclaration') + && parent.id === id) ) return false diff --git a/packages/utils/src/ast/index.ts b/packages/utils/src/ast/index.ts index 7c2af7b11..47e223c4f 100644 --- a/packages/utils/src/ast/index.ts +++ b/packages/utils/src/ast/index.ts @@ -180,7 +180,7 @@ export function esmWalker( // assignment of a destructuring variable if ( (parent?.type === 'TemplateLiteral' - && parent?.expressions.includes(child)) + && parent?.expressions.includes(child)) || (parent?.type === 'CallExpression' && parent?.callee === child) ) return @@ -227,10 +227,10 @@ export function esmWalker( const parent = stack[0] const grandparent = stack[1] const hasBindingShortcut = isStaticProperty(parent) && parent.shorthand - && (!isNodeInPattern(parent) || isInDestructuringAssignment(parent, parentStack)) + && (!isNodeInPattern(parent) || isInDestructuringAssignment(parent, parentStack)) const classDeclaration = (parent.type === 'PropertyDefinition' - && grandparent?.type === 'ClassBody') || (parent.type === 'ClassDeclaration' && node === parent.superClass) + && grandparent?.type === 'ClassBody') || (parent.type === 'ClassDeclaration' && node === parent.superClass) const classExpression = parent.type === 'ClassExpression' && node === parent.id @@ -248,8 +248,8 @@ function isRefIdentifier(id: Identifier, parent: _Node, parentStack: _Node[]) { if ( parent.type === 'CatchClause' || ((parent.type === 'VariableDeclarator' - || parent.type === 'ClassDeclaration') - && parent.id === id) + || parent.type === 'ClassDeclaration') + && parent.id === id) ) return false diff --git a/packages/utils/src/diff/cleanupSemantic.ts b/packages/utils/src/diff/cleanupSemantic.ts index 70190f207..aa417fdfb 100644 --- a/packages/utils/src/diff/cleanupSemantic.ts +++ b/packages/utils/src/diff/cleanupSemantic.ts @@ -77,8 +77,7 @@ const diff_commonPrefix = function (text1: string, text2: string): number { let pointermid = pointermax let pointerstart = 0 while (pointermin < pointermid) { - if (text1.substring(pointerstart, pointermid) - === text2.substring(pointerstart, pointermid)) { + if (text1.substring(pointerstart, pointermid) === text2.substring(pointerstart, pointermid)) { pointermin = pointermid pointerstart = pointermin } @@ -99,7 +98,7 @@ const diff_commonPrefix = function (text1: string, text2: string): number { const diff_commonSuffix = function (text1: string, text2: string): number { // Quick check for common null cases. if (!text1 || !text2 - || text1.charAt(text1.length - 1) !== text2.charAt(text2.length - 1)) + || text1.charAt(text1.length - 1) !== text2.charAt(text2.length - 1)) return 0 // Binary search. @@ -110,7 +109,7 @@ const diff_commonSuffix = function (text1: string, text2: string): number { let pointerend = 0 while (pointermin < pointermid) { if (text1.substring(text1.length - pointermid, text1.length - pointerend) - === text2.substring(text2.length - pointermid, text2.length - pointerend)) { + === text2.substring(text2.length - pointermid, text2.length - pointerend)) { pointermin = pointermid pointerend = pointermin } @@ -163,7 +162,7 @@ const diff_commonOverlap_ = function (text1: string, text2: string): number { length += found if (found === 0 || text1.substring(text_length - length) - === text2.substring(0, length)) { + === text2.substring(0, length)) { best = length length++ } @@ -207,8 +206,8 @@ const diff_cleanupSemantic = function (diffs: Array) { // Eliminate an equality that is smaller or equal to the edits on both // sides of it. if (lastEquality && (lastEquality.length - <= Math.max(length_insertions1, length_deletions1)) - && (lastEquality.length <= Math.max(length_insertions2, length_deletions2))) { + <= Math.max(length_insertions1, length_deletions1)) + && (lastEquality.length <= Math.max(length_insertions2, length_deletions2))) { // Duplicate record. diffs.splice(equalities[equalitiesLength - 1], 0, new Diff(DIFF_DELETE, lastEquality)) // Change second copy to insert. @@ -244,14 +243,14 @@ const diff_cleanupSemantic = function (diffs: Array) { pointer = 1 while (pointer < diffs.length) { if (diffs[pointer - 1][0] === DIFF_DELETE - && diffs[pointer][0] === DIFF_INSERT) { + && diffs[pointer][0] === DIFF_INSERT) { const deletion = diffs[pointer - 1][1] const insertion = diffs[pointer][1] const overlap_length1 = diff_commonOverlap_(deletion, insertion) const overlap_length2 = diff_commonOverlap_(insertion, deletion) if (overlap_length1 >= overlap_length2) { if (overlap_length1 >= deletion.length / 2 - || overlap_length1 >= insertion.length / 2) { + || overlap_length1 >= insertion.length / 2) { // Overlap found. Insert an equality and trim the surrounding edits. diffs.splice(pointer, 0, new Diff(DIFF_EQUAL, insertion.substring(0, overlap_length1))) diffs[pointer - 1][1] @@ -262,7 +261,7 @@ const diff_cleanupSemantic = function (diffs: Array) { } else { if (overlap_length2 >= deletion.length / 2 - || overlap_length2 >= insertion.length / 2) { + || overlap_length2 >= insertion.length / 2) { // Reverse overlap found. // Insert an equality and swap and trim the surrounding edits. diffs.splice(pointer, 0, new Diff(DIFF_EQUAL, deletion.substring(0, overlap_length2))) @@ -321,17 +320,17 @@ function diff_cleanupSemanticLossless(diffs: Array) { const nonAlphaNumeric1 = char1.match(nonAlphaNumericRegex_) const nonAlphaNumeric2 = char2.match(nonAlphaNumericRegex_) const whitespace1 = nonAlphaNumeric1 - && char1.match(whitespaceRegex_) + && char1.match(whitespaceRegex_) const whitespace2 = nonAlphaNumeric2 - && char2.match(whitespaceRegex_) + && char2.match(whitespaceRegex_) const lineBreak1 = whitespace1 - && char1.match(linebreakRegex_) + && char1.match(linebreakRegex_) const lineBreak2 = whitespace2 - && char2.match(linebreakRegex_) + && char2.match(linebreakRegex_) const blankLine1 = lineBreak1 - && one.match(blanklineEndRegex_) + && one.match(blanklineEndRegex_) const blankLine2 = lineBreak2 - && two.match(blanklineStartRegex_) + && two.match(blanklineStartRegex_) if (blankLine1 || blankLine2) { // Five points for blank lines. @@ -360,7 +359,7 @@ function diff_cleanupSemanticLossless(diffs: Array) { // Intentionally ignore the first and last element (don't need checking). while (pointer < diffs.length - 1) { if (diffs[pointer - 1][0] === DIFF_EQUAL - && diffs[pointer + 1][0] === DIFF_EQUAL) { + && diffs[pointer + 1][0] === DIFF_EQUAL) { // This is a single edit surrounded by equalities. let equality1 = diffs[pointer - 1][1] let edit = diffs[pointer][1] @@ -380,13 +379,13 @@ function diff_cleanupSemanticLossless(diffs: Array) { let bestEdit = edit let bestEquality2 = equality2 let bestScore = diff_cleanupSemanticScore_(equality1, edit) - + diff_cleanupSemanticScore_(edit, equality2) + + diff_cleanupSemanticScore_(edit, equality2) while (edit.charAt(0) === equality2.charAt(0)) { equality1 += edit.charAt(0) edit = edit.substring(1) + equality2.charAt(0) equality2 = equality2.substring(1) const score = diff_cleanupSemanticScore_(equality1, edit) - + diff_cleanupSemanticScore_(edit, equality2) + + diff_cleanupSemanticScore_(edit, equality2) // The >= encourages trailing rather than leading whitespace on edits. if (score >= bestScore) { bestScore = score @@ -453,8 +452,8 @@ function diff_cleanupMerge(diffs: Array) { commonlength = diff_commonPrefix(text_insert, text_delete) if (commonlength !== 0) { if ((pointer - count_delete - count_insert) > 0 - && diffs[pointer - count_delete - count_insert - 1][0] - === DIFF_EQUAL) { + && diffs[pointer - count_delete - count_insert - 1][0] + === DIFF_EQUAL) { diffs[pointer - count_delete - count_insert - 1][1] += text_insert.substring(0, commonlength) } @@ -469,11 +468,11 @@ function diff_cleanupMerge(diffs: Array) { commonlength = diff_commonSuffix(text_insert, text_delete) if (commonlength !== 0) { diffs[pointer][1] = text_insert.substring(text_insert.length - - commonlength) + diffs[pointer][1] + - commonlength) + diffs[pointer][1] text_insert = text_insert.substring(0, text_insert.length - - commonlength) + - commonlength) text_delete = text_delete.substring(0, text_delete.length - - commonlength) + - commonlength) } } // Delete the offending records and add the merged ones. @@ -515,20 +514,20 @@ function diff_cleanupMerge(diffs: Array) { // Intentionally ignore the first and last element (don't need checking). while (pointer < diffs.length - 1) { if (diffs[pointer - 1][0] === DIFF_EQUAL - && diffs[pointer + 1][0] === DIFF_EQUAL) { + && diffs[pointer + 1][0] === DIFF_EQUAL) { // This is a single edit surrounded by equalities. if (diffs[pointer][1].substring(diffs[pointer][1].length - - diffs[pointer - 1][1].length) === diffs[pointer - 1][1]) { + - diffs[pointer - 1][1].length) === diffs[pointer - 1][1]) { // Shift the edit over the previous equality. diffs[pointer][1] = diffs[pointer - 1][1] - + diffs[pointer][1].substring(0, diffs[pointer][1].length - - diffs[pointer - 1][1].length) + + diffs[pointer][1].substring(0, diffs[pointer][1].length + - diffs[pointer - 1][1].length) diffs[pointer + 1][1] = diffs[pointer - 1][1] + diffs[pointer + 1][1] diffs.splice(pointer - 1, 1) changes = true } else if (diffs[pointer][1].substring(0, diffs[pointer + 1][1].length) - === diffs[pointer + 1][1]) { + === diffs[pointer + 1][1]) { // Shift the edit over the next equality. diffs[pointer - 1][1] += diffs[pointer + 1][1] diffs[pointer][1] diff --git a/packages/utils/src/diff/diffLines.ts b/packages/utils/src/diff/diffLines.ts index 5fb8d0d9f..014b8d1d9 100644 --- a/packages/utils/src/diff/diffLines.ts +++ b/packages/utils/src/diff/diffLines.ts @@ -83,9 +83,9 @@ function printAnnotation({ export function printDiffLines(diffs: Array, options: DiffOptionsNormalized): string { return printAnnotation(options, countChanges(diffs)) - + (options.expand - ? joinAlignedDiffsExpand(diffs, options) - : joinAlignedDiffsNoExpand(diffs, options)) + + (options.expand + ? joinAlignedDiffsExpand(diffs, options) + : joinAlignedDiffsNoExpand(diffs, options)) } // Compare two arrays of strings line-by-line. Format as comparison lines. diff --git a/packages/utils/src/diff/normalizeDiffOptions.ts b/packages/utils/src/diff/normalizeDiffOptions.ts index 422dd7737..8cf6d5302 100644 --- a/packages/utils/src/diff/normalizeDiffOptions.ts +++ b/packages/utils/src/diff/normalizeDiffOptions.ts @@ -45,9 +45,11 @@ function getCompareKeys(compareKeys?: CompareKeys): CompareKeys { } function getContextLines(contextLines?: number): number { - return (typeof contextLines === 'number' - && Number.isSafeInteger(contextLines) - && contextLines >= 0) + return ( + typeof contextLines === 'number' + && Number.isSafeInteger(contextLines) + && contextLines >= 0 + ) ? contextLines : DIFF_CONTEXT_DEFAULT } diff --git a/packages/vite-node/src/cli.ts b/packages/vite-node/src/cli.ts index 37c86d368..39b16b096 100644 --- a/packages/vite-node/src/cli.ts +++ b/packages/vite-node/src/cli.ts @@ -40,14 +40,14 @@ else { } export interface CliOptions { - root?: string - script?: boolean - config?: string - mode?: string - watch?: boolean - options?: ViteNodeServerOptionsCLI - version?: boolean - help?: boolean + 'root'?: string + 'script'?: boolean + 'config'?: string + 'mode'?: string + 'watch'?: boolean + 'options'?: ViteNodeServerOptionsCLI + 'version'?: boolean + 'help'?: boolean '--'?: string[] } diff --git a/packages/vite-node/src/hmr/emitter.ts b/packages/vite-node/src/hmr/emitter.ts index 687d293c5..924a8030d 100644 --- a/packages/vite-node/src/hmr/emitter.ts +++ b/packages/vite-node/src/hmr/emitter.ts @@ -11,7 +11,7 @@ export interface Emitter> { } export type HMREmitter = Emitter<{ - 'message': HMRPayload + message: HMRPayload }> & EventEmitter declare module 'vite' { diff --git a/packages/vite-node/src/hmr/hmr.ts b/packages/vite-node/src/hmr/hmr.ts index dfc11229a..69edefb07 100644 --- a/packages/vite-node/src/hmr/hmr.ts +++ b/packages/vite-node/src/hmr/hmr.ts @@ -156,8 +156,8 @@ function warnFailedFetch(err: Error, path: string | string[]) { console.error( `[hmr] Failed to reload ${path}. ` - + 'This could be due to syntax errors or importing non-existent ' - + 'modules. (see errors above)', + + 'This could be due to syntax errors or importing non-existent ' + + 'modules. (see errors above)', ) } diff --git a/packages/vitest/src/integrations/env/loader.ts b/packages/vitest/src/integrations/env/loader.ts index 4631f68c4..c1ea6cac4 100644 --- a/packages/vitest/src/integrations/env/loader.ts +++ b/packages/vitest/src/integrations/env/loader.ts @@ -37,14 +37,14 @@ export async function loadEnvironment(ctx: ContextRPC, rpc: WorkerRPC): Promise< if (!pkg || !pkg.default || typeof pkg.default !== 'object') { throw new TypeError( `Environment "${name}" is not a valid environment. ` - + `Path "${packageId}" should export default object with a "setup" or/and "setupVM" method.`, + + `Path "${packageId}" should export default object with a "setup" or/and "setupVM" method.`, ) } const environment = pkg.default if (environment.transformMode !== 'web' && environment.transformMode !== 'ssr') { throw new TypeError( `Environment "${name}" is not a valid environment. ` - + `Path "${packageId}" should export default object with a "transformMode" method equal to "ssr" or "web".`, + + `Path "${packageId}" should export default object with a "transformMode" method equal to "ssr" or "web".`, ) } return environment diff --git a/packages/vitest/src/node/config.ts b/packages/vitest/src/node/config.ts index 4087ebba3..a5b5aba39 100644 --- a/packages/vitest/src/node/config.ts +++ b/packages/vitest/src/node/config.ts @@ -16,7 +16,7 @@ import { builtinPools } from './pool' function resolvePath(path: string, root: string) { return normalize( resolveModule(path, { paths: [root] }) - ?? resolve(root, path), + ?? resolve(root, path), ) } diff --git a/packages/vitest/src/node/error.ts b/packages/vitest/src/node/error.ts index 063e9e67b..4daa6ed96 100644 --- a/packages/vitest/src/node/error.ts +++ b/packages/vitest/src/node/error.ts @@ -180,14 +180,14 @@ function handleImportOutsideModuleError(stack: string, logger: Logger) { function printModuleWarningForPackage(logger: Logger, path: string, name: string) { logger.error(c.yellow( `Module ${path} seems to be an ES Module but shipped in a CommonJS package. ` -+ `You might want to create an issue to the package ${c.bold(`"${name}"`)} asking ` -+ 'them to ship the file in .mjs extension or add "type": "module" in their package.json.' -+ '\n\n' -+ 'As a temporary workaround you can try to inline the package by updating your config:' -+ '\n\n' -+ c.gray(c.dim('// vitest.config.js')) -+ '\n' -+ c.green(`export default { + + `You might want to create an issue to the package ${c.bold(`"${name}"`)} asking ` + + 'them to ship the file in .mjs extension or add "type": "module" in their package.json.' + + '\n\n' + + 'As a temporary workaround you can try to inline the package by updating your config:' + + '\n\n' + + c.gray(c.dim('// vitest.config.js')) + + '\n' + + c.green(`export default { test: { server: { deps: { @@ -204,7 +204,7 @@ function printModuleWarningForPackage(logger: Logger, path: string, name: string function printModuleWarningForSourceCode(logger: Logger, path: string) { logger.error(c.yellow( `Module ${path} seems to be an ES Module but shipped in a CommonJS package. ` -+ 'To fix this issue, change the file extension to .mjs or add "type": "module" in your package.json.', + + 'To fix this issue, change the file extension to .mjs or add "type": "module" in your package.json.', )) } diff --git a/packages/vitest/src/node/hoistMocks.ts b/packages/vitest/src/node/hoistMocks.ts index 687021046..bc832cee2 100644 --- a/packages/vitest/src/node/hoistMocks.ts +++ b/packages/vitest/src/node/hoistMocks.ts @@ -21,7 +21,7 @@ To fix this issue you can either: - enable the 'globals' options` const API_NOT_FOUND_CHECK = '\nif (typeof globalThis.vi === "undefined" && typeof globalThis.vitest === "undefined") ' -+ `{ throw new Error(${JSON.stringify(API_NOT_FOUND_ERROR)}) }\n` + + `{ throw new Error(${JSON.stringify(API_NOT_FOUND_ERROR)}) }\n` function isIdentifier(node: any): node is Positioned { return node.type === 'Identifier' diff --git a/packages/vitest/src/node/reporters/index.ts b/packages/vitest/src/node/reporters/index.ts index 146cfe0a0..d270e4e54 100644 --- a/packages/vitest/src/node/reporters/index.ts +++ b/packages/vitest/src/node/reporters/index.ts @@ -40,16 +40,16 @@ export const ReportersMap = { export type BuiltinReporters = keyof typeof ReportersMap export interface BuiltinReporterOptions { - default: never - basic: never - verbose: never - dot: never - json: JsonOptions - tap: never + 'default': never + 'basic': never + 'verbose': never + 'dot': never + 'json': JsonOptions + 'tap': never 'tap-flat': never - junit: JUnitOptions + 'junit': JUnitOptions 'hanging-process': never - html: { outputFile?: string } // TODO: Any better place for defining this UI package's reporter options? + 'html': { outputFile?: string } // TODO: Any better place for defining this UI package's reporter options? } export * from './benchmark' diff --git a/packages/vitest/src/node/reporters/junit.ts b/packages/vitest/src/node/reporters/junit.ts index 714c8e525..6d1c5395b 100644 --- a/packages/vitest/src/node/reporters/junit.ts +++ b/packages/vitest/src/node/reporters/junit.ts @@ -42,13 +42,13 @@ function removeInvalidXMLCharacters(value: any, removeDiscouragedChars: boolean) // remove everything discouraged by XML 1.0 specifications regex = new RegExp( '([\\x7F-\\x84]|[\\x86-\\x9F]|[\\uFDD0-\\uFDEF]|(?:\\uD83F[\\uDFFE\\uDFFF])|(?:\\uD87F[\\uDF' - + 'FE\\uDFFF])|(?:\\uD8BF[\\uDFFE\\uDFFF])|(?:\\uD8FF[\\uDFFE\\uDFFF])|(?:\\uD93F[\\uDFFE\\uD' - + 'FFF])|(?:\\uD97F[\\uDFFE\\uDFFF])|(?:\\uD9BF[\\uDFFE\\uDFFF])|(?:\\uD9FF[\\uDFFE\\uDFFF])' - + '|(?:\\uDA3F[\\uDFFE\\uDFFF])|(?:\\uDA7F[\\uDFFE\\uDFFF])|(?:\\uDABF[\\uDFFE\\uDFFF])|(?:\\' - + 'uDAFF[\\uDFFE\\uDFFF])|(?:\\uDB3F[\\uDFFE\\uDFFF])|(?:\\uDB7F[\\uDFFE\\uDFFF])|(?:\\uDBBF' - + '[\\uDFFE\\uDFFF])|(?:\\uDBFF[\\uDFFE\\uDFFF])(?:[\\0-\\t\\x0B\\f\\x0E-\\u2027\\u202A-\\uD7FF\\' - + 'uE000-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|' - + '(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]))', + + 'FE\\uDFFF])|(?:\\uD8BF[\\uDFFE\\uDFFF])|(?:\\uD8FF[\\uDFFE\\uDFFF])|(?:\\uD93F[\\uDFFE\\uD' + + 'FFF])|(?:\\uD97F[\\uDFFE\\uDFFF])|(?:\\uD9BF[\\uDFFE\\uDFFF])|(?:\\uD9FF[\\uDFFE\\uDFFF])' + + '|(?:\\uDA3F[\\uDFFE\\uDFFF])|(?:\\uDA7F[\\uDFFE\\uDFFF])|(?:\\uDABF[\\uDFFE\\uDFFF])|(?:\\' + + 'uDAFF[\\uDFFE\\uDFFF])|(?:\\uDB3F[\\uDFFE\\uDFFF])|(?:\\uDB7F[\\uDFFE\\uDFFF])|(?:\\uDBBF' + + '[\\uDFFE\\uDFFF])|(?:\\uDBFF[\\uDFFE\\uDFFF])(?:[\\0-\\t\\x0B\\f\\x0E-\\u2027\\u202A-\\uD7FF\\' + + 'uE000-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|' + + '(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]))', 'g', ) diff --git a/packages/vitest/src/runtime/external-executor.ts b/packages/vitest/src/runtime/external-executor.ts index 05a976583..b08d5e93e 100644 --- a/packages/vitest/src/runtime/external-executor.ts +++ b/packages/vitest/src/runtime/external-executor.ts @@ -1,5 +1,3 @@ -/* eslint-disable antfu/no-cjs-exports */ - import vm from 'node:vm' import { fileURLToPath, pathToFileURL } from 'node:url' import { dirname } from 'node:path' diff --git a/packages/vitest/src/runtime/mocker.ts b/packages/vitest/src/runtime/mocker.ts index 2073925d0..87b8a7f98 100644 --- a/packages/vitest/src/runtime/mocker.ts +++ b/packages/vitest/src/runtime/mocker.ts @@ -41,8 +41,8 @@ interface MockContext { function isSpecialProp(prop: Key, parentType: string) { return parentType.includes('Function') - && typeof prop === 'string' - && ['arguments', 'callee', 'caller', 'length', 'name'].includes(prop) + && typeof prop === 'string' + && ['arguments', 'callee', 'caller', 'length', 'name'].includes(prop) } export class VitestMocker { @@ -185,8 +185,8 @@ export class VitestMocker { catch (err) { const vitestError = this.createError( '[vitest] There was an error when mocking a module. ' - + 'If you are using "vi.mock" factory, make sure there are no top level variables inside, since this call is hoisted to top of the file. ' - + 'Read more: https://vitest.dev/api/vi.html#vi-mock', + + 'If you are using "vi.mock" factory, make sure there are no top level variables inside, since this call is hoisted to top of the file. ' + + 'Read more: https://vitest.dev/api/vi.html#vi-mock', ) vitestError.cause = err throw vitestError diff --git a/packages/vitest/src/runtime/vm/commonjs-executor.ts b/packages/vitest/src/runtime/vm/commonjs-executor.ts index b958b9a23..964d6b659 100644 --- a/packages/vitest/src/runtime/vm/commonjs-executor.ts +++ b/packages/vitest/src/runtime/vm/commonjs-executor.ts @@ -1,5 +1,3 @@ -/* eslint-disable antfu/no-cjs-exports */ - import vm from 'node:vm' import { Module as _Module, createRequire } from 'node:module' import { basename, dirname, extname } from 'pathe' diff --git a/packages/vitest/src/runtime/vm/esm-executor.ts b/packages/vitest/src/runtime/vm/esm-executor.ts index 4ca756164..575987962 100644 --- a/packages/vitest/src/runtime/vm/esm-executor.ts +++ b/packages/vitest/src/runtime/vm/esm-executor.ts @@ -1,5 +1,3 @@ -/* eslint-disable antfu/no-cjs-exports */ - import type vm from 'node:vm' import { fileURLToPath } from 'node:url' import { dirname } from 'node:path' diff --git a/packages/vitest/src/runtime/workers/vm.ts b/packages/vitest/src/runtime/workers/vm.ts index c275c4e61..cb9fb048b 100644 --- a/packages/vitest/src/runtime/workers/vm.ts +++ b/packages/vitest/src/runtime/workers/vm.ts @@ -23,7 +23,7 @@ export async function runVmTests(state: WorkerGlobalState) { const packageId = envName[0] === '.' ? envName : `vitest-environment-${envName}` throw new TypeError( `Environment "${ctx.environment.name}" is not a valid environment. ` - + `Path "${packageId}" doesn't support vm environment because it doesn't provide "setupVM" method.`, + + `Path "${packageId}" doesn't support vm environment because it doesn't provide "setupVM" method.`, ) } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d65039655..0fe517791 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -21,8 +21,8 @@ importers: .: devDependencies: '@antfu/eslint-config': - specifier: ^1.1.1 - version: 1.1.1(eslint@8.54.0)(typescript@5.2.2)(vitest@packages+vitest) + specifier: ^1.2.1 + version: 1.2.1(eslint@8.54.0)(typescript@5.2.2)(vitest@packages+vitest) '@antfu/ni': specifier: ^0.21.12 version: 0.21.12 @@ -2250,30 +2250,33 @@ packages: '@jridgewell/gen-mapping': 0.3.2 '@jridgewell/trace-mapping': 0.3.18 - /@antfu/eslint-config@1.1.1(eslint@8.54.0)(typescript@5.2.2)(vitest@packages+vitest): - resolution: {integrity: sha512-/0N4JSxmiTQKbHHRxUh+MoYKcmXuBEzTsSYgIN2gzI8Rc9iXCU0Q5VI0YMS2inq6bQYUwqrnzFFwZbs4ZpHtkw==} + /@antfu/eslint-config@1.2.1(eslint@8.54.0)(typescript@5.2.2)(vitest@packages+vitest): + resolution: {integrity: sha512-/B7jSc9RARxGNZUoxkB2EL7pL7v5ubt25Ah3QbQaCalcIOC3YF+60mL4/G8Oi9Rtdng7ytNGg3bi50voKfqINQ==} hasBin: true peerDependencies: eslint: '>=8.0.0' dependencies: '@antfu/eslint-define-config': 1.23.0-2 - '@stylistic/eslint-plugin': 1.1.0(eslint@8.54.0)(typescript@5.2.2) - '@typescript-eslint/eslint-plugin': 6.10.0(@typescript-eslint/parser@6.10.0)(eslint@8.54.0)(typescript@5.2.2) - '@typescript-eslint/parser': 6.10.0(eslint@8.54.0)(typescript@5.2.2) + '@eslint-types/jsdoc': 46.8.2-1 + '@eslint-types/typescript-eslint': 6.19.1 + '@eslint-types/unicorn': 49.0.0 + '@stylistic/eslint-plugin': 1.6.0(eslint@8.54.0)(typescript@5.2.2) + '@typescript-eslint/eslint-plugin': 6.21.0(@typescript-eslint/parser@6.21.0)(eslint@8.54.0)(typescript@5.2.2) + '@typescript-eslint/parser': 6.21.0(eslint@8.54.0)(typescript@5.2.2) eslint: 8.54.0 eslint-config-flat-gitignore: 0.1.1 - eslint-plugin-antfu: 1.0.2(eslint@8.54.0) + eslint-plugin-antfu: 1.0.13(eslint@8.54.0) eslint-plugin-eslint-comments: 3.2.0(eslint@8.54.0) - eslint-plugin-i: 2.29.0(@typescript-eslint/parser@6.10.0)(eslint@8.54.0) + eslint-plugin-i: 2.29.0(@typescript-eslint/parser@6.21.0)(eslint@8.54.0) eslint-plugin-jsdoc: 46.9.0(eslint@8.54.0) eslint-plugin-jsonc: 2.10.0(eslint@8.54.0) eslint-plugin-markdown: 3.0.1(eslint@8.54.0) eslint-plugin-n: 16.3.1(eslint@8.54.0) eslint-plugin-no-only-tests: 3.1.0 - eslint-plugin-perfectionist: 2.2.0(eslint@8.54.0)(typescript@5.2.2)(vue-eslint-parser@9.3.2) + eslint-plugin-perfectionist: 2.5.0(eslint@8.54.0)(typescript@5.2.2)(vue-eslint-parser@9.3.2) eslint-plugin-unicorn: 49.0.0(eslint@8.54.0) - eslint-plugin-unused-imports: 3.0.0(@typescript-eslint/eslint-plugin@6.10.0)(eslint@8.54.0) - eslint-plugin-vitest: 0.3.9(@typescript-eslint/eslint-plugin@6.10.0)(eslint@8.54.0)(typescript@5.2.2)(vitest@packages+vitest) + eslint-plugin-unused-imports: 3.0.0(@typescript-eslint/eslint-plugin@6.21.0)(eslint@8.54.0) + eslint-plugin-vitest: 0.3.9(@typescript-eslint/eslint-plugin@6.21.0)(eslint@8.54.0)(typescript@5.2.2)(vitest@packages+vitest) eslint-plugin-vue: 9.18.1(eslint@8.54.0) eslint-plugin-yml: 1.10.0(eslint@8.54.0) execa: 8.0.1 @@ -5694,6 +5697,18 @@ packages: engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} dev: true + /@eslint-types/jsdoc@46.8.2-1: + resolution: {integrity: sha512-FwD7V0xX0jyaqj8Ul5ZY+TAAPohDfVqtbuXJNHb+OIv1aTIqZi5+Zn3F2UwQ5O3BnQd2mTduyK0+HjGx3/AMFg==} + dev: true + + /@eslint-types/typescript-eslint@6.19.1: + resolution: {integrity: sha512-X0farz1+psE6Qfx6+ISQQ/J3ZetKlUeuTIN9Zt/agx4UXrgK6daH/n9ba776JxysK6YJCRaEHng/bcQQUm+BsA==} + dev: true + + /@eslint-types/unicorn@49.0.0: + resolution: {integrity: sha512-NfXSZIsPFRD2fwTDZQj8SaXqS/rXjB5foxMraLovyrYGXiQK2y0780drDKYYSVbqvco29QIYoZNmnKTUkzZMvQ==} + dev: true + /@eslint/eslintrc@1.4.1: resolution: {integrity: sha512-XXrH9Uarn0stsyldqDYq8r++mROmWRI1xKMXa640Bb//SY1+ECYX6VzT6Lcx5frD0V30XieqJ0oX9I2Xj5aoMA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -5878,7 +5893,7 @@ packages: engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: '@jest/types': 27.5.1 - '@types/node': 20.11.11 + '@types/node': 20.11.16 chalk: 4.1.2 jest-message-util: 27.5.1 jest-util: 27.5.1 @@ -5899,7 +5914,7 @@ packages: '@jest/test-result': 27.5.1 '@jest/transform': 27.5.1 '@jest/types': 27.5.1 - '@types/node': 20.11.11 + '@types/node': 20.11.16 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.8.1 @@ -5936,7 +5951,7 @@ packages: dependencies: '@jest/fake-timers': 27.5.1 '@jest/types': 27.5.1 - '@types/node': 20.11.11 + '@types/node': 20.11.16 jest-mock: 27.5.1 dev: true @@ -5953,7 +5968,7 @@ packages: dependencies: '@jest/types': 27.5.1 '@sinonjs/fake-timers': 8.1.0 - '@types/node': 20.11.11 + '@types/node': 20.11.16 jest-message-util: 27.5.1 jest-mock: 27.5.1 jest-util: 27.5.1 @@ -5982,7 +5997,7 @@ packages: '@jest/test-result': 27.5.1 '@jest/transform': 27.5.1 '@jest/types': 27.5.1 - '@types/node': 20.11.11 + '@types/node': 20.11.16 chalk: 4.1.2 collect-v8-coverage: 1.0.2 exit: 0.1.2 @@ -6113,7 +6128,7 @@ packages: dependencies: '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 - '@types/node': 20.11.11 + '@types/node': 20.11.16 '@types/yargs': 16.0.7 chalk: 4.1.2 dev: true @@ -8775,45 +8790,67 @@ packages: resolve-from: 5.0.0 dev: true - /@stylistic/eslint-plugin-js@1.1.0: - resolution: {integrity: sha512-7yDOvKQvtTXIJMVcKNGfpYSJJhwTbOrDcMDgYqWbtS9LyHmuzxvnR748bQ21pQyi6aZR2E7edwKsdKmZlXc9Rg==} + /@stylistic/eslint-plugin-js@1.6.0(eslint@8.54.0): + resolution: {integrity: sha512-qlBAu08fy4d5BEF+c31E5y0OvEOVZo3SfOOs2Qrb4/CwAaXrAch++axBWedzgR3n0XqkuXjr6dbexqrdOm92ag==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + eslint: '>=8.40.0' dependencies: - acorn: 8.11.2 + acorn: 8.11.3 escape-string-regexp: 4.0.0 + eslint: 8.54.0 eslint-visitor-keys: 3.4.3 - espree: 9.6.1 - graphemer: 1.4.0 + espree: 10.0.0 dev: true - /@stylistic/eslint-plugin-jsx@1.1.0: - resolution: {integrity: sha512-XMTAYQ9t7ZoWjqciqOy99O0sRCHh/6x/Q4Dm8sCVKzKlsnPzVlXzAD0htNqHG+Fu7qyGblDqb0/7PNJXBdQc5Q==} + /@stylistic/eslint-plugin-jsx@1.6.0(eslint@8.54.0): + resolution: {integrity: sha512-MlRpiuNpanQrszotBlar77GDf71HjemJNNQBvLnsk/MHxo6fxbIcAyLSNSVQJhP14ah6PvpPFcExRK4Hj7MGeg==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + eslint: '>=8.40.0' dependencies: - '@stylistic/eslint-plugin-js': 1.1.0 + '@stylistic/eslint-plugin-js': 1.6.0(eslint@8.54.0) + eslint: 8.54.0 estraverse: 5.3.0 + picomatch: 3.0.1 dev: true - /@stylistic/eslint-plugin-ts@1.1.0(eslint@8.54.0)(typescript@5.2.2): - resolution: {integrity: sha512-vqlinwzTNSKoFaVcVKE2iVGKX62NKIJfkhEI+5uuufYcAhfjfOK3KQY0zhdUeshEUkBVR0uRrJzH1/Cj/2Unfg==} + /@stylistic/eslint-plugin-plus@1.6.0(eslint@8.54.0)(typescript@5.2.2): + resolution: {integrity: sha512-XfLBBkKIERzMYGEX1A5RCe/gVe9pTdGuHC2xDzlEIs2npudMHxm304K7l2CqlAWGyJ/yP6wwrsSEHozQUIo/Og==} peerDependencies: eslint: '*' dependencies: - '@stylistic/eslint-plugin-js': 1.1.0 - '@typescript-eslint/utils': 6.10.0(eslint@8.54.0)(typescript@5.2.2) + '@typescript-eslint/utils': 6.21.0(eslint@8.54.0)(typescript@5.2.2) eslint: 8.54.0 - graphemer: 1.4.0 transitivePeerDependencies: - supports-color - typescript dev: true - /@stylistic/eslint-plugin@1.1.0(eslint@8.54.0)(typescript@5.2.2): - resolution: {integrity: sha512-PcJgMTNiIZ1d+aQt7OM50hRkeOIB7FyfRofNEe1PykG7NvSjjwQ7fS2XN+eN/SmoPN4ocZkacZHOv5cDNrFEqQ==} + /@stylistic/eslint-plugin-ts@1.6.0(eslint@8.54.0)(typescript@5.2.2): + resolution: {integrity: sha512-qM9Vw8TfZeGmN8oreWwUIdEdCs/py9/X88O4ksJv0V/kDmaupVKL8Uu06IlphN2crN6SPU8ljv9rcGXZoxwvmA==} + engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: - eslint: '*' + eslint: '>=8.40.0' + dependencies: + '@stylistic/eslint-plugin-js': 1.6.0(eslint@8.54.0) + '@typescript-eslint/utils': 6.21.0(eslint@8.54.0)(typescript@5.2.2) + eslint: 8.54.0 + transitivePeerDependencies: + - supports-color + - typescript + dev: true + + /@stylistic/eslint-plugin@1.6.0(eslint@8.54.0)(typescript@5.2.2): + resolution: {integrity: sha512-Bdz9mFIvOkpM03QLoTSg7rTTYj+u3kokWIQ+nI5UFE+FkRQSVgvL41cwkdCebud/L4dMcItuBPA25h6XOuHFPA==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + eslint: '>=8.40.0' dependencies: - '@stylistic/eslint-plugin-js': 1.1.0 - '@stylistic/eslint-plugin-jsx': 1.1.0 - '@stylistic/eslint-plugin-ts': 1.1.0(eslint@8.54.0)(typescript@5.2.2) + '@stylistic/eslint-plugin-js': 1.6.0(eslint@8.54.0) + '@stylistic/eslint-plugin-jsx': 1.6.0(eslint@8.54.0) + '@stylistic/eslint-plugin-plus': 1.6.0(eslint@8.54.0)(typescript@5.2.2) + '@stylistic/eslint-plugin-ts': 1.6.0(eslint@8.54.0)(typescript@5.2.2) eslint: 8.54.0 transitivePeerDependencies: - supports-color @@ -9215,7 +9252,7 @@ packages: resolution: {integrity: sha512-N7UDG0/xiPQa2D/XrVJXjkWbpqHCd2sBaB32ggRF2l83RhPfamgKGF8gwwqyksS95qUS5ZYF9aF+lLPRlwI2UA==} dependencies: '@types/connect': 3.4.37 - '@types/node': 20.11.11 + '@types/node': 20.11.16 dev: true /@types/braces@3.0.1: @@ -9236,7 +9273,7 @@ packages: /@types/connect@3.4.37: resolution: {integrity: sha512-zBUSRqkfZ59OcwXon4HVxhx5oWCJmc0OtBTK05M+p0dYjgN6iTwIL2T/WbsQZrEsdnwaF9cWQ+azOnpPvIqY3Q==} dependencies: - '@types/node': 20.11.11 + '@types/node': 20.11.16 dev: true /@types/cookie@0.4.1: @@ -9303,7 +9340,7 @@ packages: /@types/express-serve-static-core@4.17.39: resolution: {integrity: sha512-BiEUfAiGCOllomsRAZOiMFP7LAnrifHpt56pc4Z7l9K6ACyN06Ns1JLMBxwkfLOjJRlSf06NwWsT7yzfpaVpyQ==} dependencies: - '@types/node': 20.11.11 + '@types/node': 20.11.16 '@types/qs': 6.9.9 '@types/range-parser': 1.2.6 '@types/send': 0.17.3 @@ -9357,7 +9394,7 @@ packages: /@types/graceful-fs@4.1.8: resolution: {integrity: sha512-NhRH7YzWq8WiNKVavKPBmtLYZHxNY19Hh+az28O/phfp68CF45pMFud+ZzJ8ewnxnC5smIdF3dqFeiSUQ5I+pw==} dependencies: - '@types/node': 20.11.11 + '@types/node': 20.11.16 dev: true /@types/hast@2.3.4: @@ -9507,7 +9544,7 @@ packages: /@types/node-fetch@2.6.7: resolution: {integrity: sha512-lX17GZVpJ/fuCjguZ5b3TjEbSENxmEk1B2z02yoXSK9WMEWRivhdSY73wWMn6bpcCDAOh6qAdktpKHIlkDk2lg==} dependencies: - '@types/node': 20.11.11 + '@types/node': 20.11.16 form-data: 4.0.0 dev: true @@ -9522,8 +9559,8 @@ packages: undici-types: 5.26.5 dev: true - /@types/node@20.11.11: - resolution: {integrity: sha512-PlJCXfb57Jrman0H1BxO2+Q7qwih2Mwk7T6Gvixj+SK4mqs4RWOGMMoP6p/LFa3UrP2CZOO6ai6otd7J/TB6Ug==} + /@types/node@20.11.16: + resolution: {integrity: sha512-gKb0enTmRCzXSSUJDq6/sPcqrfCv2mkkG6Jt/clpn5eiCbKTY+SgZUxo+p8ZKMof5dCp9vHQUAB7wOUTod22wQ==} dependencies: undici-types: 5.26.5 dev: true @@ -9683,7 +9720,7 @@ packages: /@types/resolve@1.17.1: resolution: {integrity: sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==} dependencies: - '@types/node': 20.11.11 + '@types/node': 20.11.16 dev: true /@types/resolve@1.20.2: @@ -9701,7 +9738,7 @@ packages: resolution: {integrity: sha512-/7fKxvKUoETxjFUsuFlPB9YndePpxxRAOfGC/yJdc9kTjTeP5kRCTzfnE8kPUKCeyiyIZu0YQ76s50hCedI1ug==} dependencies: '@types/mime': 1.3.4 - '@types/node': 20.11.11 + '@types/node': 20.11.16 dev: true /@types/serve-static@1.15.4: @@ -9709,7 +9746,7 @@ packages: dependencies: '@types/http-errors': 2.0.3 '@types/mime': 3.0.3 - '@types/node': 20.11.11 + '@types/node': 20.11.16 dev: true /@types/set-cookie-parser@2.4.2: @@ -9863,8 +9900,8 @@ packages: dev: true optional: true - /@typescript-eslint/eslint-plugin@6.10.0(@typescript-eslint/parser@6.10.0)(eslint@8.54.0)(typescript@5.2.2): - resolution: {integrity: sha512-uoLj4g2OTL8rfUQVx2AFO1hp/zja1wABJq77P6IclQs6I/m9GLrm7jCdgzZkvWdDCQf1uEvoa8s8CupsgWQgVg==} + /@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0)(eslint@8.54.0)(typescript@5.2.2): + resolution: {integrity: sha512-oy9+hTPCUFpngkEZUSzbf9MxI65wbKFoQYsgPdILTfbUldp5ovUuphZVe4i30emU9M/kP+T64Di0mxl7dSw3MA==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: '@typescript-eslint/parser': ^6.0.0 || ^6.0.0-alpha @@ -9875,11 +9912,11 @@ packages: optional: true dependencies: '@eslint-community/regexpp': 4.10.0 - '@typescript-eslint/parser': 6.10.0(eslint@8.54.0)(typescript@5.2.2) - '@typescript-eslint/scope-manager': 6.10.0 - '@typescript-eslint/type-utils': 6.10.0(eslint@8.54.0)(typescript@5.2.2) - '@typescript-eslint/utils': 6.10.0(eslint@8.54.0)(typescript@5.2.2) - '@typescript-eslint/visitor-keys': 6.10.0 + '@typescript-eslint/parser': 6.21.0(eslint@8.54.0)(typescript@5.2.2) + '@typescript-eslint/scope-manager': 6.21.0 + '@typescript-eslint/type-utils': 6.21.0(eslint@8.54.0)(typescript@5.2.2) + '@typescript-eslint/utils': 6.21.0(eslint@8.54.0)(typescript@5.2.2) + '@typescript-eslint/visitor-keys': 6.21.0 debug: 4.3.4(supports-color@8.1.1) eslint: 8.54.0 graphemer: 1.4.0 @@ -9892,8 +9929,8 @@ packages: - supports-color dev: true - /@typescript-eslint/parser@6.10.0(eslint@8.54.0)(typescript@5.2.2): - resolution: {integrity: sha512-+sZwIj+s+io9ozSxIWbNB5873OSdfeBEH/FR0re14WLI6BaKuSOnnwCJ2foUiu8uXf4dRp1UqHP0vrZ1zXGrog==} + /@typescript-eslint/parser@6.21.0(eslint@8.54.0)(typescript@5.2.2): + resolution: {integrity: sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 @@ -9902,10 +9939,10 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 6.10.0 - '@typescript-eslint/types': 6.10.0 - '@typescript-eslint/typescript-estree': 6.10.0(typescript@5.2.2) - '@typescript-eslint/visitor-keys': 6.10.0 + '@typescript-eslint/scope-manager': 6.21.0 + '@typescript-eslint/types': 6.21.0 + '@typescript-eslint/typescript-estree': 6.21.0(typescript@5.2.2) + '@typescript-eslint/visitor-keys': 6.21.0 debug: 4.3.4(supports-color@8.1.1) eslint: 8.54.0 typescript: 5.2.2 @@ -9921,8 +9958,16 @@ packages: '@typescript-eslint/visitor-keys': 6.10.0 dev: true - /@typescript-eslint/type-utils@6.10.0(eslint@8.54.0)(typescript@5.2.2): - resolution: {integrity: sha512-wYpPs3hgTFblMYwbYWPT3eZtaDOjbLyIYuqpwuLBBqhLiuvJ+9sEp2gNRJEtR5N/c9G1uTtQQL5AhV0fEPJYcg==} + /@typescript-eslint/scope-manager@6.21.0: + resolution: {integrity: sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg==} + engines: {node: ^16.0.0 || >=18.0.0} + dependencies: + '@typescript-eslint/types': 6.21.0 + '@typescript-eslint/visitor-keys': 6.21.0 + dev: true + + /@typescript-eslint/type-utils@6.21.0(eslint@8.54.0)(typescript@5.2.2): + resolution: {integrity: sha512-rZQI7wHfao8qMX3Rd3xqeYSMCL3SoiSQLBATSiVKARdFGCYSRvmViieZjqc58jKgs8Y8i9YvVVhRbHSTA4VBag==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 @@ -9931,8 +9976,8 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 6.10.0(typescript@5.2.2) - '@typescript-eslint/utils': 6.10.0(eslint@8.54.0)(typescript@5.2.2) + '@typescript-eslint/typescript-estree': 6.21.0(typescript@5.2.2) + '@typescript-eslint/utils': 6.21.0(eslint@8.54.0)(typescript@5.2.2) debug: 4.3.4(supports-color@8.1.1) eslint: 8.54.0 ts-api-utils: 1.0.3(typescript@5.2.2) @@ -9946,6 +9991,11 @@ packages: engines: {node: ^16.0.0 || >=18.0.0} dev: true + /@typescript-eslint/types@6.21.0: + resolution: {integrity: sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg==} + engines: {node: ^16.0.0 || >=18.0.0} + dev: true + /@typescript-eslint/typescript-estree@6.10.0(typescript@5.2.2): resolution: {integrity: sha512-ek0Eyuy6P15LJVeghbWhSrBCj/vJpPXXR+EpaRZqou7achUWL8IdYnMSC5WHAeTWswYQuP2hAZgij/bC9fanBg==} engines: {node: ^16.0.0 || >=18.0.0} @@ -9967,6 +10017,28 @@ packages: - supports-color dev: true + /@typescript-eslint/typescript-estree@6.21.0(typescript@5.2.2): + resolution: {integrity: sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/types': 6.21.0 + '@typescript-eslint/visitor-keys': 6.21.0 + debug: 4.3.4(supports-color@8.1.1) + globby: 11.1.0 + is-glob: 4.0.3 + minimatch: 9.0.3 + semver: 7.5.4 + ts-api-utils: 1.0.3(typescript@5.2.2) + typescript: 5.2.2 + transitivePeerDependencies: + - supports-color + dev: true + /@typescript-eslint/utils@6.10.0(eslint@8.54.0)(typescript@5.2.2): resolution: {integrity: sha512-v+pJ1/RcVyRc0o4wAGux9x42RHmAjIGzPRo538Z8M1tVx6HOnoQBCX/NoadHQlZeC+QO2yr4nNSFWOoraZCAyg==} engines: {node: ^16.0.0 || >=18.0.0} @@ -9986,6 +10058,25 @@ packages: - typescript dev: true + /@typescript-eslint/utils@6.21.0(eslint@8.54.0)(typescript@5.2.2): + resolution: {integrity: sha512-NfWVaC8HP9T8cbKQxHcsJBY5YE1O33+jpMwN45qzWWaPDZgLIbo12toGMWnmhvCpd3sIxkpDw3Wv1B3dYrbDQQ==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@8.54.0) + '@types/json-schema': 7.0.14 + '@types/semver': 7.5.5 + '@typescript-eslint/scope-manager': 6.21.0 + '@typescript-eslint/types': 6.21.0 + '@typescript-eslint/typescript-estree': 6.21.0(typescript@5.2.2) + eslint: 8.54.0 + semver: 7.5.4 + transitivePeerDependencies: + - supports-color + - typescript + dev: true + /@typescript-eslint/visitor-keys@6.10.0: resolution: {integrity: sha512-xMGluxQIEtOM7bqFCo+rCMh5fqI+ZxV5RUUOa29iVPz1OgCZrtc7rFnz5cLUazlkPKYqX+75iuDq7m0HQ48nCg==} engines: {node: ^16.0.0 || >=18.0.0} @@ -9994,6 +10085,14 @@ packages: eslint-visitor-keys: 3.4.3 dev: true + /@typescript-eslint/visitor-keys@6.21.0: + resolution: {integrity: sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==} + engines: {node: ^16.0.0 || >=18.0.0} + dependencies: + '@typescript-eslint/types': 6.21.0 + eslint-visitor-keys: 3.4.3 + dev: true + /@ungap/structured-clone@1.2.0: resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} dev: true @@ -11411,6 +11510,14 @@ packages: acorn: 8.11.2 dev: true + /acorn-jsx@5.3.2(acorn@8.11.3): + resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} + peerDependencies: + acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 + dependencies: + acorn: 8.11.3 + dev: true + /acorn-walk@7.2.0: resolution: {integrity: sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==} engines: {node: '>=0.4.0'} @@ -11443,6 +11550,12 @@ packages: hasBin: true dev: true + /acorn@8.11.3: + resolution: {integrity: sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==} + engines: {node: '>=0.4.0'} + hasBin: true + dev: true + /acorn@8.9.0: resolution: {integrity: sha512-jaVNAFBHNLXspO543WnNNPZFRtavh3skAkITqD0/2aeMkKZTN+254PyhwxFYrk3vQ1xfY+2wbesJMs/JC8/PwQ==} engines: {node: '>=0.4.0'} @@ -15309,7 +15422,7 @@ packages: - supports-color dev: true - /eslint-module-utils@2.8.0(@typescript-eslint/parser@6.10.0)(eslint-import-resolver-node@0.3.9)(eslint@8.54.0): + /eslint-module-utils@2.8.0(@typescript-eslint/parser@6.21.0)(eslint-import-resolver-node@0.3.9)(eslint@8.54.0): resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==} engines: {node: '>=4'} peerDependencies: @@ -15330,7 +15443,7 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 6.10.0(eslint@8.54.0)(typescript@5.2.2) + '@typescript-eslint/parser': 6.21.0(eslint@8.54.0)(typescript@5.2.2) debug: 3.2.7(supports-color@8.1.1) eslint: 8.54.0 eslint-import-resolver-node: 0.3.9 @@ -15338,8 +15451,8 @@ packages: - supports-color dev: true - /eslint-plugin-antfu@1.0.2(eslint@8.54.0): - resolution: {integrity: sha512-elv/LVq+4h9oi7xza9EK93akujmTAGnL3e7aMVVWELjvIJuHcKj0GT6HjdgPDtuBdMnyyKN7fVKIpSNSqZnaIA==} + /eslint-plugin-antfu@1.0.13(eslint@8.54.0): + resolution: {integrity: sha512-JzWEzNWZcNK4Q4Tz4VaNELhu3VgCv3obSYxUbK1UhbDBmr2v0a7H9n9xGv5GTS4LkEo905/2Gq6y0dcoBq5FZA==} peerDependencies: eslint: '*' dependencies: @@ -15368,7 +15481,7 @@ packages: ignore: 5.2.4 dev: true - /eslint-plugin-i@2.29.0(@typescript-eslint/parser@6.10.0)(eslint@8.54.0): + /eslint-plugin-i@2.29.0(@typescript-eslint/parser@6.21.0)(eslint@8.54.0): resolution: {integrity: sha512-slGeTS3GQzx9267wLJnNYNO8X9EHGsc75AKIAFvnvMYEcTJKotPKL1Ru5PIGVHIVet+2DsugePWp8Oxpx8G22w==} engines: {node: '>=12'} peerDependencies: @@ -15378,7 +15491,7 @@ packages: doctrine: 2.1.0 eslint: 8.54.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.10.0)(eslint-import-resolver-node@0.3.9)(eslint@8.54.0) + eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.21.0)(eslint-import-resolver-node@0.3.9)(eslint@8.54.0) get-tsconfig: 4.7.2 is-glob: 4.0.3 minimatch: 3.1.2 @@ -15460,8 +15573,8 @@ packages: engines: {node: '>=5.0.0'} dev: true - /eslint-plugin-perfectionist@2.2.0(eslint@8.54.0)(typescript@5.2.2)(vue-eslint-parser@9.3.2): - resolution: {integrity: sha512-/nG2Uurd6AY7CI6zlgjHPOoiPY8B7EYMUWdNb5w+EzyauYiQjjD5lQwAI1FlkBbCCFFZw/CdZIPQhXumYoiyaw==} + /eslint-plugin-perfectionist@2.5.0(eslint@8.54.0)(typescript@5.2.2)(vue-eslint-parser@9.3.2): + resolution: {integrity: sha512-F6XXcq4mKKUe/SREoMGQqzgw6cgCgf3pFzkFfQVIGtqD1yXVpQjnhTepzhBeZfxZwgMzR9HO4yH4CUhIQ2WBcQ==} peerDependencies: astro-eslint-parser: ^0.16.0 eslint: '>=8.0.0' @@ -15478,7 +15591,7 @@ packages: vue-eslint-parser: optional: true dependencies: - '@typescript-eslint/utils': 6.10.0(eslint@8.54.0)(typescript@5.2.2) + '@typescript-eslint/utils': 6.21.0(eslint@8.54.0)(typescript@5.2.2) eslint: 8.54.0 minimatch: 9.0.3 natural-compare-lite: 1.4.0 @@ -15511,7 +15624,7 @@ packages: strip-indent: 3.0.0 dev: true - /eslint-plugin-unused-imports@3.0.0(@typescript-eslint/eslint-plugin@6.10.0)(eslint@8.54.0): + /eslint-plugin-unused-imports@3.0.0(@typescript-eslint/eslint-plugin@6.21.0)(eslint@8.54.0): resolution: {integrity: sha512-sduiswLJfZHeeBJ+MQaG+xYzSWdRXoSw61DpU13mzWumCkR0ufD0HmO4kdNokjrkluMHpj/7PJeN35pgbhW3kw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -15521,12 +15634,12 @@ packages: '@typescript-eslint/eslint-plugin': optional: true dependencies: - '@typescript-eslint/eslint-plugin': 6.10.0(@typescript-eslint/parser@6.10.0)(eslint@8.54.0)(typescript@5.2.2) + '@typescript-eslint/eslint-plugin': 6.21.0(@typescript-eslint/parser@6.21.0)(eslint@8.54.0)(typescript@5.2.2) eslint: 8.54.0 eslint-rule-composer: 0.3.0 dev: true - /eslint-plugin-vitest@0.3.9(@typescript-eslint/eslint-plugin@6.10.0)(eslint@8.54.0)(typescript@5.2.2)(vitest@packages+vitest): + /eslint-plugin-vitest@0.3.9(@typescript-eslint/eslint-plugin@6.21.0)(eslint@8.54.0)(typescript@5.2.2)(vitest@packages+vitest): resolution: {integrity: sha512-ZGrz8dWFlotM5dwrsMLP4VcY5MizwKNV4JTnY0VKdnuCZ+qeEUMHf1qd8kRGQA3tqLvXcV929wt2ANkduq2Pgw==} engines: {node: 14.x || >= 16} peerDependencies: @@ -15539,7 +15652,7 @@ packages: vitest: optional: true dependencies: - '@typescript-eslint/eslint-plugin': 6.10.0(@typescript-eslint/parser@6.10.0)(eslint@8.54.0)(typescript@5.2.2) + '@typescript-eslint/eslint-plugin': 6.21.0(@typescript-eslint/parser@6.21.0)(eslint@8.54.0)(typescript@5.2.2) '@typescript-eslint/utils': 6.10.0(eslint@8.54.0)(typescript@5.2.2) eslint: 8.54.0 vitest: link:packages/vitest @@ -15729,6 +15842,15 @@ packages: resolution: {integrity: sha512-Cf6VksWPsTuW01vU9Mk/3vRue91Zevka5SjyNf3nEpokFRuqt/KjUQoGAwq9qMmhpLTHmXzSIrFRw8zxWzmFBA==} dev: true + /espree@10.0.0: + resolution: {integrity: sha512-gdlKrfXQWv/3vubKqeQIiBUoWeknNQVEDpKD7OD3bC53g5EKISTuhcIoA1H1e+zqIuosdKrKuTDMmj8eFfhOnA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + dependencies: + acorn: 8.11.3 + acorn-jsx: 5.3.2(acorn@8.11.3) + eslint-visitor-keys: 3.4.3 + dev: true + /espree@9.2.0: resolution: {integrity: sha512-oP3utRkynpZWF/F2x/HZJ+AGtnIclaR7z1pYPxy7NYM2fSO6LgK/Rkny8anRSPK/VwEA1eqm2squui0T7ZMOBg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -18598,7 +18720,7 @@ packages: '@jest/environment': 27.5.1 '@jest/test-result': 27.5.1 '@jest/types': 27.5.1 - '@types/node': 20.11.11 + '@types/node': 20.11.16 chalk: 4.1.2 co: 4.6.0 dedent: 0.7.0 @@ -18733,7 +18855,7 @@ packages: '@jest/environment': 27.5.1 '@jest/fake-timers': 27.5.1 '@jest/types': 27.5.1 - '@types/node': 20.11.11 + '@types/node': 20.11.16 jest-mock: 27.5.1 jest-util: 27.5.1 jsdom: 16.7.0 @@ -18751,7 +18873,7 @@ packages: '@jest/environment': 27.5.1 '@jest/fake-timers': 27.5.1 '@jest/types': 27.5.1 - '@types/node': 20.11.11 + '@types/node': 20.11.16 jest-mock: 27.5.1 jest-util: 27.5.1 dev: true @@ -18795,7 +18917,7 @@ packages: dependencies: '@jest/types': 27.5.1 '@types/graceful-fs': 4.1.8 - '@types/node': 20.11.11 + '@types/node': 20.11.16 anymatch: 3.1.3 fb-watchman: 2.0.2 graceful-fs: 4.2.11 @@ -18835,7 +18957,7 @@ packages: '@jest/source-map': 27.5.1 '@jest/test-result': 27.5.1 '@jest/types': 27.5.1 - '@types/node': 20.11.11 + '@types/node': 20.11.16 chalk: 4.1.2 co: 4.6.0 expect: 27.5.1 @@ -18915,7 +19037,7 @@ packages: engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: '@jest/types': 27.5.1 - '@types/node': 20.11.11 + '@types/node': 20.11.16 dev: true /jest-pnp-resolver@1.2.3(jest-resolve@27.5.1): @@ -18976,7 +19098,7 @@ packages: '@jest/test-result': 27.5.1 '@jest/transform': 27.5.1 '@jest/types': 27.5.1 - '@types/node': 20.11.11 + '@types/node': 20.11.16 chalk: 4.1.2 emittery: 0.8.1 graceful-fs: 4.2.11 @@ -19041,7 +19163,7 @@ packages: resolution: {integrity: sha512-jZCyo6iIxO1aqUxpuBlwTDMkzOAJS4a3eYz3YzgxxVQFwLeSA7Jfq5cbqCY+JLvTDrWirgusI/0KwxKMgrdf7w==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: - '@types/node': 20.11.11 + '@types/node': 20.11.16 graceful-fs: 4.2.11 dev: true @@ -19092,7 +19214,7 @@ packages: engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: '@jest/types': 27.5.1 - '@types/node': 20.11.11 + '@types/node': 20.11.16 chalk: 4.1.2 ci-info: 3.9.0 graceful-fs: 4.2.11 @@ -19129,7 +19251,7 @@ packages: dependencies: '@jest/test-result': 27.5.1 '@jest/types': 27.5.1 - '@types/node': 20.11.11 + '@types/node': 20.11.16 ansi-escapes: 4.3.2 chalk: 4.1.2 jest-util: 27.5.1 @@ -21706,6 +21828,11 @@ packages: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} engines: {node: '>=8.6'} + /picomatch@3.0.1: + resolution: {integrity: sha512-I3EurrIQMlRc9IaAZnqRR044Phh2DXY+55o7uJ0V+hYZAcQYSuFWsc9q5PvyDHUSCe1Qxn/iBz+78s86zWnGag==} + engines: {node: '>=10'} + dev: true + /pidtree@0.5.0: resolution: {integrity: sha512-9nxspIM7OpZuhBxPg73Zvyq7j1QMPMPsGKTqRc2XOaFQauDvoNz9fM1Wdkjmeo7l9GXOZiRs97sPkuayl39wjA==} engines: {node: '>=0.10'} @@ -27411,7 +27538,7 @@ packages: dependencies: eslint-visitor-keys: 3.4.3 lodash: 4.17.21 - yaml: 2.3.3 + yaml: 2.3.4 dev: true /yaml@1.10.2: @@ -27423,11 +27550,6 @@ packages: engines: {node: '>= 14'} dev: true - /yaml@2.3.3: - resolution: {integrity: sha512-zw0VAJxgeZ6+++/su5AFoqBbZbrEakwu+X0M5HmcwUiBL7AzcuPKjj5we4xfQLp78LkEMpD0cOnUhmgOVy3KdQ==} - engines: {node: '>= 14'} - dev: true - /yaml@2.3.4: resolution: {integrity: sha512-8aAvwVUSHpfEqTQ4w/KMlf3HcRdt50E5ODIQJBw1fQ5RL34xabzxtUlzTXVqc4rkZsPbvrXKWnABCD7kWSmocA==} engines: {node: '>= 14'} diff --git a/test/core/src/cjs/module-cjs.ts b/test/core/src/cjs/module-cjs.ts index 0cf0ac2f4..33f691900 100644 --- a/test/core/src/cjs/module-cjs.ts +++ b/test/core/src/cjs/module-cjs.ts @@ -1,4 +1,2 @@ -/* eslint-disable antfu/no-cjs-exports */ - module.exports.a = 1 module.exports.b = 2 diff --git a/test/core/test/injector-esm.test.ts b/test/core/test/injector-esm.test.ts index 22eabedb7..9a06ab428 100644 --- a/test/core/test/injector-esm.test.ts +++ b/test/core/test/injector-esm.test.ts @@ -323,8 +323,8 @@ test('should declare variable for imported super class', async () => { expect( injectSimpleCode( 'import { Foo } from \'./dependency\';' - + 'export default class A extends Foo {}\n' - + 'export class B extends Foo {}', + + 'export default class A extends Foo {}\n' + + 'export class B extends Foo {}', ), ).toMatchInlineSnapshot(` "const __vi_inject__ = { [Symbol.toStringTag]: "Module" }; @@ -364,7 +364,7 @@ test('should handle default export variants', async () => { expect( injectSimpleCode( 'export default function foo() {}\n' - + 'foo.prototype = Object.prototype;', + + 'foo.prototype = Object.prototype;', ), ).toMatchInlineSnapshot(` "const __vi_inject__ = { [Symbol.toStringTag]: "Module" }; @@ -392,13 +392,13 @@ test('overwrite bindings', async () => { expect( injectSimpleCode( 'import { inject } from \'vue\';' - + 'const a = { inject }\n' - + 'const b = { test: inject }\n' - + 'function c() { const { test: inject } = { test: true }; console.log(inject) }\n' - + 'const d = inject\n' - + 'function f() { console.log(inject) }\n' - + 'function e() { const { inject } = { inject: true } }\n' - + 'function g() { const f = () => { const inject = true }; console.log(inject) }\n', + + 'const a = { inject }\n' + + 'const b = { test: inject }\n' + + 'function c() { const { test: inject } = { test: true }; console.log(inject) }\n' + + 'const d = inject\n' + + 'function f() { console.log(inject) }\n' + + 'function e() { const { inject } = { inject: true } }\n' + + 'function g() { const f = () => { const inject = true }; console.log(inject) }\n', ), ).toMatchInlineSnapshot(` "const __vi_inject__ = { [Symbol.toStringTag]: "Module" }; diff --git a/test/core/test/injector-mock.test.ts b/test/core/test/injector-mock.test.ts index 1cffa79f1..047718175 100644 --- a/test/core/test/injector-mock.test.ts +++ b/test/core/test/injector-mock.test.ts @@ -476,8 +476,8 @@ vi.mock('./mock.js', () => { expect( await hoistSimpleCodeWithoutMocks( `import { Foo } from './dependency';` - + `export default class A extends Foo {}\n` - + `export class B extends Foo {}`, + + `export default class A extends Foo {}\n` + + `export class B extends Foo {}`, ), ).toMatchInlineSnapshot(` "const { vi } = await import('vitest') @@ -512,7 +512,7 @@ vi.mock('./mock.js', () => { expect( await hoistSimpleCodeWithoutMocks( `export default function foo() {}\n` - + `foo.prototype = Object.prototype;`, + + `foo.prototype = Object.prototype;`, ), ).toMatchInlineSnapshot(` "const { vi } = await import('vitest') @@ -550,13 +550,13 @@ vi.mock('./mock.js', () => { expect( await hoistSimpleCodeWithoutMocks( `import { inject } from 'vue';` - + `const a = { inject }\n` - + `const b = { test: inject }\n` - + `function c() { const { test: inject } = { test: true }; console.log(inject) }\n` - + `const d = inject\n` - + `function f() { console.log(inject) }\n` - + `function e() { const { inject } = { inject: true } }\n` - + `function g() { const f = () => { const inject = true }; console.log(inject) }\n`, + + `const a = { inject }\n` + + `const b = { test: inject }\n` + + `function c() { const { test: inject } = { test: true }; console.log(inject) }\n` + + `const d = inject\n` + + `function f() { console.log(inject) }\n` + + `function e() { const { inject } = { inject: true } }\n` + + `function g() { const f = () => { const inject = true }; console.log(inject) }\n`, ), ).toMatchInlineSnapshot(` "const { vi } = await import('vitest') diff --git a/test/esm/test/prototype.spec.ts b/test/esm/test/prototype.spec.ts index fa34c820a..021a52715 100644 --- a/test/esm/test/prototype.spec.ts +++ b/test/esm/test/prototype.spec.ts @@ -4,6 +4,6 @@ import * as exports from '../src/prototype.mjs' it('prototype is null', () => { expect(Object.getPrototypeOf(exports)).toBe(null) expect({}.hasOwnProperty).toBeTypeOf('function') - // eslint-disable-next-line antfu/no-cjs-exports + expect(exports.hasOwnProperty).toBeTypeOf('undefined') }) diff --git a/test/reporters/src/data-for-junit.ts b/test/reporters/src/data-for-junit.ts index 8d2e8ecc0..f443155fe 100644 --- a/test/reporters/src/data-for-junit.ts +++ b/test/reporters/src/data-for-junit.ts @@ -31,9 +31,9 @@ function createSuiteHavingFailedTestWithXmlInError(): File[] { }) errorWithXml.stack = 'Error: error message that has XML in it \n' - + ' at /vitest/test/core/test/basic.test.ts:8:32\n' - + ' at /vitest/test/core/test/.ts:3:11\n' - + ' at etc....' + + ' at /vitest/test/core/test/basic.test.ts:8:32\n' + + ' at /vitest/test/core/test/.ts:3:11\n' + + ' at etc....' const tasks: Task[] = [ { diff --git a/test/reporters/src/data.ts b/test/reporters/src/data.ts index 3e26931a9..4eef9c028 100644 --- a/test/reporters/src/data.ts +++ b/test/reporters/src/data.ts @@ -46,16 +46,16 @@ const error: ErrorWithDiff = new AssertionError({ }) error.showDiff = true error.stack = 'AssertionError: expected 2.23606797749979 to equal 2\n' - + ' at /vitest/test/core/test/basic.test.ts:8:32\n' - + ' at /vitest/packages/vitest/dist/vi-ac0504aa.js:73:26\n' - + ' at runTest (/vitest/packages/vitest/dist/entry.js:1689:40)\n' - + ' at async runSuite (/vitest/packages/vitest/dist/entry.js:1741:13)\n' - + ' at async runSuites (/vitest/packages/vitest/dist/entry.js:1769:5)\n' - + ' at async startTests (/vitest/packages/vitest/dist/entry.js:1774:3)\n' - + ' at async /vitest/packages/vitest/dist/entry.js:1798:7\n' - + ' at async withEnv (/vitest/packages/vitest/dist/entry.js:1481:5)\n' - + ' at async run (/vitest/packages/vitest/dist/entry.js:1797:5)\n' - + ' at async file:///vitest/node_modules/.pnpm/tinypool@0.1.1/node_modules/tinypool/dist/esm/worker.js:96:20' ++ ' at /vitest/test/core/test/basic.test.ts:8:32\n' ++ ' at /vitest/packages/vitest/dist/vi-ac0504aa.js:73:26\n' ++ ' at runTest (/vitest/packages/vitest/dist/entry.js:1689:40)\n' ++ ' at async runSuite (/vitest/packages/vitest/dist/entry.js:1741:13)\n' ++ ' at async runSuites (/vitest/packages/vitest/dist/entry.js:1769:5)\n' ++ ' at async startTests (/vitest/packages/vitest/dist/entry.js:1774:3)\n' ++ ' at async /vitest/packages/vitest/dist/entry.js:1798:7\n' ++ ' at async withEnv (/vitest/packages/vitest/dist/entry.js:1481:5)\n' ++ ' at async run (/vitest/packages/vitest/dist/entry.js:1797:5)\n' ++ ' at async file:///vitest/node_modules/.pnpm/tinypool@0.1.1/node_modules/tinypool/dist/esm/worker.js:96:20' const innerTasks: Task[] = [ { -- 2.51.2