From bc733abac9b625e10f19efc76039f3e6ce0a059c Mon Sep 17 00:00:00 2001 From: Vladimir Date: Sun, 19 Mar 2023 15:35:08 +0100 Subject: [PATCH 01/15] feat: move snapshot implementation into @vitest/snapshot --- packages/browser/src/client/main.ts | 8 - packages/browser/src/client/snapshot.ts | 8 + packages/runner/src/utils/error.ts | 22 +-- packages/snapshot/package.json | 50 ++++++ packages/snapshot/rollup.config.js | 63 ++++++++ packages/snapshot/src/client.ts | 153 ++++++++++++++++++ packages/snapshot/src/env/node.ts | 40 +++++ packages/snapshot/src/environment.ts | 2 + packages/snapshot/src/index.ts | 15 ++ .../snapshot => snapshot/src}/manager.ts | 6 +- .../src}/port/inlineSnapshot.ts | 7 +- .../src}/port/mockSerializer.ts | 0 .../snapshot => snapshot/src}/port/plugins.ts | 0 .../snapshot => snapshot/src}/port/state.ts | 28 ++-- .../snapshot => snapshot/src}/port/utils.ts | 19 +-- .../src/types/environment.ts} | 14 +- packages/snapshot/src/types/index.ts | 57 +++++++ packages/utils/src/helpers.ts | 50 ++++++ packages/utils/src/index.ts | 1 + packages/utils/src/source-map.ts | 145 +++++++++++++++++ packages/utils/src/types.ts | 21 +++ packages/vitest/package.json | 4 +- packages/vitest/src/browser.ts | 1 - packages/vitest/src/index.ts | 2 +- .../vitest/src/integrations/snapshot/chai.ts | 31 ++-- .../src/integrations/snapshot/client.ts | 134 +-------------- .../snapshot/environments/node.ts | 28 +--- packages/vitest/src/node/config.ts | 2 + packages/vitest/src/node/core.ts | 4 +- packages/vitest/src/node/error.ts | 2 +- packages/vitest/src/runtime/runners/test.ts | 12 +- packages/vitest/src/runtime/setup.node.ts | 11 +- packages/vitest/src/types/global.ts | 2 +- packages/vitest/src/types/snapshot.ts | 63 ++------ packages/vitest/src/utils/base.ts | 6 +- packages/vitest/src/utils/index.ts | 42 ----- packages/vitest/src/utils/source-map.ts | 153 +----------------- pnpm-lock.yaml | 20 ++- test/core/test/inline-snap.test.ts | 2 +- test/core/test/utils.spec.ts | 2 +- test/snapshots/test/snapshot-async.test.ts | 13 ++ tsconfig.json | 2 + 42 files changed, 743 insertions(+), 502 deletions(-) create mode 100644 packages/snapshot/package.json create mode 100644 packages/snapshot/rollup.config.js create mode 100644 packages/snapshot/src/client.ts create mode 100644 packages/snapshot/src/env/node.ts create mode 100644 packages/snapshot/src/environment.ts create mode 100644 packages/snapshot/src/index.ts rename packages/{vitest/src/integrations/snapshot => snapshot/src}/manager.ts (89%) rename packages/{vitest/src/integrations/snapshot => snapshot/src}/port/inlineSnapshot.ts (94%) rename packages/{vitest/src/integrations/snapshot => snapshot/src}/port/mockSerializer.ts (100%) rename packages/{vitest/src/integrations/snapshot => snapshot/src}/port/plugins.ts (100%) rename packages/{vitest/src/integrations/snapshot => snapshot/src}/port/state.ts (90%) rename packages/{vitest/src/integrations/snapshot => snapshot/src}/port/utils.ts (91%) rename packages/{vitest/src/integrations/snapshot/env.ts => snapshot/src/types/environment.ts} (50%) create mode 100644 packages/snapshot/src/types/index.ts create mode 100644 packages/utils/src/source-map.ts create mode 100644 test/snapshots/test/snapshot-async.test.ts diff --git a/packages/browser/src/client/main.ts b/packages/browser/src/client/main.ts index 43fed3c83bc5..ecef97e6f371 100644 --- a/packages/browser/src/client/main.ts +++ b/packages/browser/src/client/main.ts @@ -3,7 +3,6 @@ import { createClient } from '@vitest/ws-client' import type { ResolvedConfig } from 'vitest' import type { VitestRunner } from '@vitest/runner' import { createBrowserRunner } from './runner' -import { BrowserSnapshotEnvironment } from './snapshot' import { importId } from './utils' import { setupConsoleLogSpy } from './logger' import { createSafeRpc, rpc, rpcDone } from './rpc' @@ -78,7 +77,6 @@ ws.addEventListener('open', async () => { await runTests(paths, config) }) -let hasSnapshot = false async function runTests(paths: string[], config: any) { // need to import it before any other import, otherwise Vite optimizer will hang const viteClientPath = '/@vite/client' @@ -87,7 +85,6 @@ async function runTests(paths: string[], config: any) { const { startTests, setupCommonEnv, - setupSnapshotEnvironment, takeCoverageInsideWorker, } = await importId('vitest/browser') as typeof import('vitest/browser') @@ -101,11 +98,6 @@ async function runTests(paths: string[], config: any) { runner = new BrowserRunner({ config, browserHashMap }) } - if (!hasSnapshot) { - setupSnapshotEnvironment(new BrowserSnapshotEnvironment()) - hasSnapshot = true - } - try { await setupCommonEnv(config) const files = paths.map((path) => { diff --git a/packages/browser/src/client/snapshot.ts b/packages/browser/src/client/snapshot.ts index ec4b810b1092..dee67a9f3423 100644 --- a/packages/browser/src/client/snapshot.ts +++ b/packages/browser/src/client/snapshot.ts @@ -2,6 +2,14 @@ import { rpc } from './rpc' import type { SnapshotEnvironment } from '#types' export class BrowserSnapshotEnvironment implements SnapshotEnvironment { + getVersion(): string { + return '1' + } + + getHeader(): string { + return `// Vitest Snapshot v${this.getVersion()}, https://vitest.dev/guide/snapshot.html` + } + readSnapshotFile(filepath: string): Promise { return rpc().readFile(filepath) } diff --git a/packages/runner/src/utils/error.ts b/packages/runner/src/utils/error.ts index 2916086e7578..5e2c64c91af8 100644 --- a/packages/runner/src/utils/error.ts +++ b/packages/runner/src/utils/error.ts @@ -2,27 +2,7 @@ import { deepClone, format, getOwnProperties, getType, stringify } from '@vitest import type { DiffOptions } from '@vitest/utils/diff' import { unifiedDiff } from '@vitest/utils/diff' -export interface ParsedStack { - method: string - file: string - line: number - column: number -} - -export interface ErrorWithDiff extends Error { - name: string - nameStr?: string - stack?: string - stackStr?: string - stacks?: ParsedStack[] - showDiff?: boolean - diff?: string - actual?: any - expected?: any - operator?: string - type?: string - frame?: string -} +export type { ParsedStack, ErrorWithDiff } from '@vitest/utils' const IS_RECORD_SYMBOL = '@@__IMMUTABLE_RECORD__@@' const IS_COLLECTION_SYMBOL = '@@__IMMUTABLE_ITERABLE__@@' diff --git a/packages/snapshot/package.json b/packages/snapshot/package.json new file mode 100644 index 000000000000..b4f733ce319f --- /dev/null +++ b/packages/snapshot/package.json @@ -0,0 +1,50 @@ +{ + "name": "@vitest/snapshot", + "type": "module", + "version": "0.29.3", + "description": "Vitest Snapshot Resolver", + "license": "MIT", + "repository": { + "type": "git", + "url": "git+https://github.com/vitest-dev/vitest.git", + "directory": "packages/snapshot" + }, + "sideEffects": false, + "exports": { + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.js" + }, + "./environment": { + "types": "./dist/environment.d.ts", + "import": "./dist/environment.js" + }, + "./manager": { + "types": "./dist/manager.d.ts", + "import": "./dist/manager.js" + }, + "./*": "./*" + }, + "main": "./dist/index.js", + "module": "./dist/index.js", + "types": "./dist/index.d.ts", + "files": [ + "dist", + "*.d.ts" + ], + "scripts": { + "build": "rimraf dist && rollup -c", + "dev": "rollup -c --watch", + "prepublishOnly": "pnpm build" + }, + "dependencies": { + "@vitest/utils": "workspace:*", + "magic-string": "^0.27.0", + "pathe": "^1.1.0", + "pretty-format": "^27.5.1" + }, + "devDependencies": { + "@types/natural-compare": "^1.4.1", + "natural-compare": "^1.4.0" + } +} diff --git a/packages/snapshot/rollup.config.js b/packages/snapshot/rollup.config.js new file mode 100644 index 000000000000..87d3be2585ae --- /dev/null +++ b/packages/snapshot/rollup.config.js @@ -0,0 +1,63 @@ +import { builtinModules } from 'module' +import esbuild from 'rollup-plugin-esbuild' +import nodeResolve from '@rollup/plugin-node-resolve' +import dts from 'rollup-plugin-dts' +import commonjs from '@rollup/plugin-commonjs' +import { defineConfig } from 'rollup' +import pkg from './package.json' + +const external = [ + ...builtinModules, + ...Object.keys(pkg.dependencies || {}), + ...Object.keys(pkg.peerDependencies || {}), +] + +const entries = { + index: 'src/index.ts', + environment: 'src/environment.ts', + manager: 'src/manager.ts', +} + +const plugins = [ + nodeResolve({ + preferBuiltins: true, + }), + commonjs(), + esbuild({ + target: 'node14', + }), +] + +export default defineConfig([ + { + input: entries, + output: { + dir: 'dist', + format: 'esm', + entryFileNames: '[name].js', + chunkFileNames: 'chunk-[name].js', + }, + external, + plugins, + onwarn, + }, + { + input: entries, + output: { + dir: 'dist', + entryFileNames: '[name].d.ts', + format: 'esm', + }, + external, + plugins: [ + dts({ respectExternal: true }), + ], + onwarn, + }, +]) + +function onwarn(message) { + if (['EMPTY_BUNDLE', 'CIRCULAR_DEPENDENCY'].includes(message.code)) + return + console.error(message) +} diff --git a/packages/snapshot/src/client.ts b/packages/snapshot/src/client.ts new file mode 100644 index 000000000000..44b031c302f7 --- /dev/null +++ b/packages/snapshot/src/client.ts @@ -0,0 +1,153 @@ +import { deepMergeSnapshot } from './port/utils' +import SnapshotState from './port/state' +import type { SnapshotStateOptions } from './types' + +const createMismatchError = (message: string, actual: unknown, expected: unknown) => { + const error = new Error(message) + Object.defineProperty(error, 'actual', { + value: actual, + enumerable: true, + configurable: true, + writable: true, + }) + Object.defineProperty(error, 'expected', { + value: expected, + enumerable: true, + configurable: true, + writable: true, + }) + return error +} + +export interface Context { + file: string + title?: string + fullTitle?: string +} + +interface AssertOptions { + received: unknown + filepath?: string + name?: string + message?: string + isInline?: boolean + properties?: object + inlineSnapshot?: string + error?: Error + errorMessage?: string +} + +export class SnapshotClient { + filepath?: string + name?: string + snapshotState: SnapshotState | undefined + snapshotStateMap = new Map() + + async setTest(filepath: string, name: string, options: SnapshotStateOptions) { + this.filepath = filepath + this.name = name + + if (this.snapshotState?.testFilePath !== filepath) { + this.resetCurrent() + + if (!this.getSnapshotState(filepath)) { + this.snapshotStateMap.set( + filepath, + await SnapshotState.create( + filepath, + options, + ), + ) + } + this.snapshotState = this.getSnapshotState(filepath) + } + } + + getSnapshotState(filepath: string) { + return this.snapshotStateMap.get(filepath)! + } + + clearTest() { + this.filepath = undefined + this.name = undefined + } + + skipTestSnapshots(name: string) { + this.snapshotState?.markSnapshotsAsCheckedForTest(name) + } + + /** + * Should be overriden by the consumer. + * + * Vitest checks equality with @vitest/expect. + */ + equalityCheck(received: unknown, expected: unknown) { + return received === expected + } + + assert(options: AssertOptions): void { + const { + filepath = this.filepath, + name = this.name, + message, + isInline = false, + properties, + inlineSnapshot, + error, + errorMessage, + } = options + let { received } = options + + if (!filepath) + throw new Error('Snapshot cannot be used outside of test') + + if (typeof properties === 'object') { + if (typeof received !== 'object' || !received) + throw new Error('Received value must be an object when the matcher has properties') + + try { + const pass = this.equalityCheck(received, properties) + // const pass = equals(received, properties, [iterableEquality, subsetEquality]) + if (!pass) + throw createMismatchError('Snapshot properties mismatched', received, properties) + else + received = deepMergeSnapshot(received, properties) + } + catch (err: any) { + err.message = errorMessage || 'Snapshot mismatched' + throw err + } + } + + const testName = [ + name, + ...(message ? [message] : []), + ].join(' > ') + + const snapshotState = this.getSnapshotState(filepath) + + const { actual, expected, key, pass } = snapshotState.match({ + testName, + received, + isInline, + error, + inlineSnapshot, + }) + + if (!pass) + throw createMismatchError(`Snapshot \`${key || 'unknown'}\` mismatched`, actual?.trim(), expected?.trim()) + } + + async resetCurrent() { + if (!this.snapshotState) + return null + const result = await this.snapshotState.pack() + + this.snapshotState = undefined + return result + } + + clear() { + this.snapshotStateMap.clear() + } +} diff --git a/packages/snapshot/src/env/node.ts b/packages/snapshot/src/env/node.ts new file mode 100644 index 000000000000..856845cde18a --- /dev/null +++ b/packages/snapshot/src/env/node.ts @@ -0,0 +1,40 @@ +import { existsSync, promises as fs } from 'node:fs' +import { basename, dirname, join } from 'pathe' +import type { SnapshotEnvironment } from '../types' + +export class NodeSnapshotEnvironment implements SnapshotEnvironment { + getVersion(): string { + return '1' + } + + getHeader(): string { + return `// Snapshot v${this.getVersion()}` + } + + async resolvePath(filepath: string): Promise { + return join( + join( + dirname(filepath), '__snapshots__'), + `${basename(filepath)}.snap`, + ) + } + + async prepareDirectory(filepath: string): Promise { + await fs.mkdir(filepath, { recursive: true }) + } + + async saveSnapshotFile(filepath: string, snapshot: string): Promise { + await fs.writeFile(filepath, snapshot, 'utf-8') + } + + async readSnapshotFile(filepath: string): Promise { + if (!existsSync(filepath)) + return null + return fs.readFile(filepath, 'utf-8') + } + + async removeSnapshotFile(filepath: string): Promise { + if (existsSync(filepath)) + await fs.unlink(filepath) + } +} diff --git a/packages/snapshot/src/environment.ts b/packages/snapshot/src/environment.ts new file mode 100644 index 000000000000..2bf6f5e14188 --- /dev/null +++ b/packages/snapshot/src/environment.ts @@ -0,0 +1,2 @@ +export { NodeSnapshotEnvironment } from './env/node' +export type { SnapshotEnvironment } from './types/environment' diff --git a/packages/snapshot/src/index.ts b/packages/snapshot/src/index.ts new file mode 100644 index 000000000000..3e37a83cf8cc --- /dev/null +++ b/packages/snapshot/src/index.ts @@ -0,0 +1,15 @@ +export { SnapshotClient } from './client' + +export { default as SnapshotState } from './port/state' +export { addSerializer, getSerializers } from './port/plugins' +export { stripSnapshotIndentation } from './port/inlineSnapshot' + +export type { + SnapshotData, + SnapshotUpdateState, + SnapshotStateOptions, + SnapshotMatchOptions, + SnapshotResult, + UncheckedSnapshot, + SnapshotSummary, +} from './types' diff --git a/packages/vitest/src/integrations/snapshot/manager.ts b/packages/snapshot/src/manager.ts similarity index 89% rename from packages/vitest/src/integrations/snapshot/manager.ts rename to packages/snapshot/src/manager.ts index 78927b35def7..dd3a98cc2d22 100644 --- a/packages/vitest/src/integrations/snapshot/manager.ts +++ b/packages/snapshot/src/manager.ts @@ -1,11 +1,11 @@ import { basename, dirname, join } from 'pathe' -import type { SnapshotResult, SnapshotStateOptions, SnapshotSummary } from '../../types' +import type { SnapshotResult, SnapshotStateOptions, SnapshotSummary } from './types' export class SnapshotManager { summary: SnapshotSummary = undefined! extension = '.snap' - constructor(public options: SnapshotStateOptions) { + constructor(public options: Omit) { this.clear() } @@ -30,7 +30,7 @@ export class SnapshotManager { } } -export function emptySummary(options: SnapshotStateOptions): SnapshotSummary { +export function emptySummary(options: Omit): SnapshotSummary { const summary = { added: 0, failure: false, diff --git a/packages/vitest/src/integrations/snapshot/port/inlineSnapshot.ts b/packages/snapshot/src/port/inlineSnapshot.ts similarity index 94% rename from packages/vitest/src/integrations/snapshot/port/inlineSnapshot.ts rename to packages/snapshot/src/port/inlineSnapshot.ts index dada3be04883..c7e9f91298e7 100644 --- a/packages/vitest/src/integrations/snapshot/port/inlineSnapshot.ts +++ b/packages/snapshot/src/port/inlineSnapshot.ts @@ -1,7 +1,6 @@ import type MagicString from 'magic-string' -import { lineSplitRE, offsetToLineNumber, positionToOffset } from '../../../utils/source-map' -import { getCallLastIndex } from '../../../utils' -import { getSnapshotEnvironment } from '../env' +import { getCallLastIndex, lineSplitRE, offsetToLineNumber, positionToOffset } from '@vitest/utils' +import type { SnapshotEnvironment } from '../types' export interface InlineSnapshot { snapshot: string @@ -11,9 +10,9 @@ export interface InlineSnapshot { } export async function saveInlineSnapshots( + environment: SnapshotEnvironment, snapshots: Array, ) { - const environment = getSnapshotEnvironment() const MagicString = (await import('magic-string')).default const files = new Set(snapshots.map(i => i.file)) await Promise.all(Array.from(files).map(async (file) => { diff --git a/packages/vitest/src/integrations/snapshot/port/mockSerializer.ts b/packages/snapshot/src/port/mockSerializer.ts similarity index 100% rename from packages/vitest/src/integrations/snapshot/port/mockSerializer.ts rename to packages/snapshot/src/port/mockSerializer.ts diff --git a/packages/vitest/src/integrations/snapshot/port/plugins.ts b/packages/snapshot/src/port/plugins.ts similarity index 100% rename from packages/vitest/src/integrations/snapshot/port/plugins.ts rename to packages/snapshot/src/port/plugins.ts diff --git a/packages/vitest/src/integrations/snapshot/port/state.ts b/packages/snapshot/src/port/state.ts similarity index 90% rename from packages/vitest/src/integrations/snapshot/port/state.ts rename to packages/snapshot/src/port/state.ts index 6ed05ac8d5a4..5f31eba79262 100644 --- a/packages/vitest/src/integrations/snapshot/port/state.ts +++ b/packages/snapshot/src/port/state.ts @@ -5,11 +5,10 @@ * LICENSE file in the root directory of this source tree. */ +import type { ParsedStack } from '@vitest/utils' +import { parseErrorStacktrace } from '@vitest/utils' import type { OptionsReceived as PrettyFormatOptions } from 'pretty-format' -import type { ParsedStack, SnapshotData, SnapshotMatchOptions, SnapshotResult, SnapshotStateOptions, SnapshotUpdateState } from '../../../types' -import { parseErrorStacktrace } from '../../../utils/source-map' -import type { SnapshotEnvironment } from '../env' -import { getSnapshotEnvironment } from '../env' +import type { SnapshotData, SnapshotEnvironment, SnapshotMatchOptions, SnapshotResult, SnapshotStateOptions, SnapshotUpdateState } from '../types' import type { InlineSnapshot } from './inlineSnapshot' import { saveInlineSnapshots } from './inlineSnapshot' @@ -82,16 +81,15 @@ export default class SnapshotState { printBasicPrototype: false, ...options.snapshotFormat, } - this._environment = getSnapshotEnvironment() + this._environment = options.snapshotEnvironment } static async create( testFilePath: string, options: SnapshotStateOptions, ) { - const environment = getSnapshotEnvironment() - const snapshotPath = await environment.resolvePath(testFilePath) - const content = await environment.readSnapshotFile(snapshotPath) + const snapshotPath = await options.snapshotEnvironment.resolvePath(testFilePath) + const content = await options.snapshotEnvironment.readSnapshotFile(snapshotPath) return new SnapshotState(testFilePath, snapshotPath, content, options) } @@ -102,15 +100,15 @@ export default class SnapshotState { }) } - private _inferInlineSnapshotStack(stacks: ParsedStack[]) { + protected _inferInlineSnapshotStack(stacks: ParsedStack[]) { // if called inside resolves/rejects, stacktrace is different const promiseIndex = stacks.findIndex(i => i.method.match(/__VITEST_(RESOLVES|REJECTS)__/)) if (promiseIndex !== -1) return stacks[promiseIndex + 3] - // inline snapshot function is called __VITEST_INLINE_SNAPSHOT__ + // inline snapshot function is called __INLINE_SNAPSHOT__ // in integrations/snapshot/chai.ts - const stackIndex = stacks.findIndex(i => i.method.includes('__VITEST_INLINE_SNAPSHOT__')) + const stackIndex = stacks.findIndex(i => i.method.includes('__INLINE_SNAPSHOT__')) return stackIndex !== -1 ? stacks[stackIndex + 2] : null } @@ -121,11 +119,11 @@ export default class SnapshotState { ): void { this._dirty = true if (options.isInline) { - const stacks = parseErrorStacktrace(options.error || new Error('snapshot'), true) + const stacks = parseErrorStacktrace(options.error || new Error('snapshot'), []) const stack = this._inferInlineSnapshotStack(stacks) if (!stack) { throw new Error( - `Vitest: Couldn't infer stack frame for inline snapshot.\n${JSON.stringify(stacks)}`, + `@vitest/snapshot: Couldn't infer stack frame for inline snapshot.\n${JSON.stringify(stacks)}`, ) } // removing 1 column, because source map points to the wrong @@ -165,11 +163,11 @@ export default class SnapshotState { if ((this._dirty || this._uncheckedKeys.size) && !isEmpty) { if (hasExternalSnapshots) { - await saveSnapshotFile(this._snapshotData, this.snapshotPath) + await saveSnapshotFile(this._environment, this._snapshotData, this.snapshotPath) this._fileExists = true } if (hasInlineSnapshots) - await saveInlineSnapshots(this._inlineSnapshots) + await saveInlineSnapshots(this._environment, this._inlineSnapshots) status.saved = true } diff --git a/packages/vitest/src/integrations/snapshot/port/utils.ts b/packages/snapshot/src/port/utils.ts similarity index 91% rename from packages/vitest/src/integrations/snapshot/port/utils.ts rename to packages/snapshot/src/port/utils.ts index b8359e79f7c0..f3e88fdb409b 100644 --- a/packages/vitest/src/integrations/snapshot/port/utils.ts +++ b/packages/snapshot/src/port/utils.ts @@ -11,17 +11,13 @@ import type { OptionsReceived as PrettyFormatOptions } from 'pretty-format' import { format as prettyFormat, } from 'pretty-format' -import type { SnapshotData, SnapshotStateOptions } from '../../../types' -import { isObject } from '../../../utils' -import { getSnapshotEnvironment } from '../env' +import { isObject } from '@vitest/utils' +import type { SnapshotData, SnapshotStateOptions } from '../types' +import type { SnapshotEnvironment } from '../types/environment' import { getSerializers } from './plugins' // TODO: rewrite and clean up -export const SNAPSHOT_VERSION = '1' - -const writeSnapshotVersion = () => `// Vitest Snapshot v${SNAPSHOT_VERSION}, https://vitest.dev/guide/snapshot.html` - export const testNameToKey = (testName: string, count: number): string => `${testName} ${count}` @@ -131,9 +127,8 @@ function printBacktickString(str: string): string { return `\`${escapeBacktickString(str)}\`` } -export async function ensureDirectoryExists(filePath: string) { +export async function ensureDirectoryExists(environment: SnapshotEnvironment, filePath: string) { try { - const environment = getSnapshotEnvironment() await environment.prepareDirectory(join(dirname(filePath))) } catch { } @@ -144,24 +139,24 @@ function normalizeNewlines(string: string) { } export async function saveSnapshotFile( + environment: SnapshotEnvironment, snapshotData: SnapshotData, snapshotPath: string, ) { - const environment = getSnapshotEnvironment() const snapshots = Object.keys(snapshotData) .sort(naturalCompare) .map( key => `exports[${printBacktickString(key)}] = ${printBacktickString(normalizeNewlines(snapshotData[key]))};`, ) - const content = `${writeSnapshotVersion()}\n\n${snapshots.join('\n\n')}\n` + const content = `${environment.getHeader()}\n\n${snapshots.join('\n\n')}\n` const oldContent = await environment.readSnapshotFile(snapshotPath) const skipWriting = oldContent && oldContent === content if (skipWriting) return - await ensureDirectoryExists(snapshotPath) + await ensureDirectoryExists(environment, snapshotPath) await environment.saveSnapshotFile( snapshotPath, content, diff --git a/packages/vitest/src/integrations/snapshot/env.ts b/packages/snapshot/src/types/environment.ts similarity index 50% rename from packages/vitest/src/integrations/snapshot/env.ts rename to packages/snapshot/src/types/environment.ts index 50d3680e2d22..f0d20c6c529f 100644 --- a/packages/vitest/src/integrations/snapshot/env.ts +++ b/packages/snapshot/src/types/environment.ts @@ -1,19 +1,9 @@ export interface SnapshotEnvironment { + getVersion(): string + getHeader(): string resolvePath(filepath: string): Promise prepareDirectory(filepath: string): Promise saveSnapshotFile(filepath: string, snapshot: string): Promise readSnapshotFile(filepath: string): Promise removeSnapshotFile(filepath: string): Promise } - -let _snapshotEnvironment: SnapshotEnvironment - -export function setupSnapshotEnvironment(environment: SnapshotEnvironment) { - _snapshotEnvironment = environment -} - -export function getSnapshotEnvironment() { - if (!_snapshotEnvironment) - throw new Error('Snapshot environment is not setup') - return _snapshotEnvironment -} diff --git a/packages/snapshot/src/types/index.ts b/packages/snapshot/src/types/index.ts new file mode 100644 index 000000000000..af2d33b814c1 --- /dev/null +++ b/packages/snapshot/src/types/index.ts @@ -0,0 +1,57 @@ +import type { OptionsReceived as PrettyFormatOptions } from 'pretty-format' +import type { SnapshotEnvironment } from './environment' + +export type { SnapshotEnvironment } +export type SnapshotData = Record + +export type SnapshotUpdateState = 'all' | 'new' | 'none' + +export interface SnapshotStateOptions { + updateSnapshot: SnapshotUpdateState + snapshotEnvironment: SnapshotEnvironment + expand?: boolean + snapshotFormat?: PrettyFormatOptions + resolveSnapshotPath?: (path: string, extension: string) => string +} + +export interface SnapshotMatchOptions { + testName: string + received: unknown + key?: string + inlineSnapshot?: string + isInline: boolean + error?: Error +} + +export interface SnapshotResult { + filepath: string + added: number + fileDeleted: boolean + matched: number + unchecked: number + uncheckedKeys: Array + unmatched: number + updated: number +} + +export interface UncheckedSnapshot { + filePath: string + keys: Array +} + +export interface SnapshotSummary { + added: number + didUpdate: boolean + failure: boolean + filesAdded: number + filesRemoved: number + filesRemovedList: Array + filesUnmatched: number + filesUpdated: number + matched: number + total: number + unchecked: number + uncheckedKeysByFile: Array + unmatched: number + updated: number +} diff --git a/packages/utils/src/helpers.ts b/packages/utils/src/helpers.ts index eaa68d03b3af..dd698bda3d92 100644 --- a/packages/utils/src/helpers.ts +++ b/packages/utils/src/helpers.ts @@ -1,5 +1,9 @@ import type { Arrayable, Nullable } from './types' +export function notNullish(v: T | null | undefined): v is NonNullable { + return v != null +} + export function assertTypes(value: unknown, name: string, types: string[]): void { const receivedType = typeof value const pass = types.includes(receivedType) @@ -7,6 +11,10 @@ export function assertTypes(value: unknown, name: string, types: string[]): void throw new TypeError(`${name} value must be ${types.join(' or ')}, received "${receivedType}"`) } +export function isPrimitive(value: unknown) { + return value === null || (typeof value !== 'function' && typeof value !== 'object') +} + export function slash(path: string) { return path.replace(/\\/g, '/') } @@ -144,3 +152,45 @@ export function createDefer(): DeferPromise { p.reject = reject! return p } + +/** + * If code starts with a function call, will return its last index, respecting arguments. + * This will return 25 - last ending character of toMatch ")" + * Also works with callbacks + * ``` + * toMatch({ test: '123' }); + * toBeAliased('123') + * ``` + */ +export function getCallLastIndex(code: string) { + let charIndex = -1 + let inString: string | null = null + let startedBracers = 0 + let endedBracers = 0 + let beforeChar: string | null = null + while (charIndex <= code.length) { + beforeChar = code[charIndex] + charIndex++ + const char = code[charIndex] + + const isCharString = char === '"' || char === '\'' || char === '`' + + if (isCharString && beforeChar !== '\\') { + if (inString === char) + inString = null + else if (!inString) + inString = char + } + + if (!inString) { + if (char === '(') + startedBracers++ + if (char === ')') + endedBracers++ + } + + if (startedBracers && endedBracers && startedBracers === endedBracers) + return charIndex + } + return null +} diff --git a/packages/utils/src/index.ts b/packages/utils/src/index.ts index 5c9bbb869bc6..47ff26fe62c7 100644 --- a/packages/utils/src/index.ts +++ b/packages/utils/src/index.ts @@ -8,3 +8,4 @@ export * from './constants' export * from './colors' export * from './error' export * from './descriptors' +export * from './source-map' diff --git a/packages/utils/src/source-map.ts b/packages/utils/src/source-map.ts new file mode 100644 index 000000000000..732d93f4a8db --- /dev/null +++ b/packages/utils/src/source-map.ts @@ -0,0 +1,145 @@ +import { resolve } from 'pathe' +import type { ErrorWithDiff, ParsedStack } from './types' +import { isPrimitive, notNullish } from './helpers' + +export const lineSplitRE = /\r?\n/ + +const stackIgnorePatterns = [ + 'node:internal', + /\/packages\/\w+\/dist\//, + /\/@vitest\/\w+\/dist\//, + '/vitest/dist/', + '/vitest/src/', + '/vite-node/dist/', + '/vite-node/src/', + '/node_modules/chai/', + '/node_modules/tinypool/', + '/node_modules/tinyspy/', +] + +function extractLocation(urlLike: string) { + // Fail-fast but return locations like "(native)" + if (!urlLike.includes(':')) + return [urlLike] + + const regExp = /(.+?)(?::(\d+))?(?::(\d+))?$/ + const parts = regExp.exec(urlLike.replace(/[()]/g, '')) + if (!parts) + return [urlLike] + return [parts[1], parts[2] || undefined, parts[3] || undefined] +} + +// Based on https://github.com/stacktracejs/error-stack-parser +// Credit to stacktracejs +export function parseSingleStack(raw: string): ParsedStack | null { + let line = raw.trim() + + if (line.includes('(eval ')) + line = line.replace(/eval code/g, 'eval').replace(/(\(eval at [^()]*)|(,.*$)/g, '') + + let sanitizedLine = line + .replace(/^\s+/, '') + .replace(/\(eval code/g, '(') + .replace(/^.*?\s+/, '') + + // capture and preserve the parenthesized location "(/foo/my bar.js:12:87)" in + // case it has spaces in it, as the string is split on \s+ later on + const location = sanitizedLine.match(/ (\(.+\)$)/) + + // remove the parenthesized location from the line, if it was matched + sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine + + // if a location was matched, pass it to extractLocation() otherwise pass all sanitizedLine + // because this line doesn't have function name + const [url, lineNumber, columnNumber] = extractLocation(location ? location[1] : sanitizedLine) + let method = (location && sanitizedLine) || '' + let file = url && ['eval', ''].includes(url) ? undefined : url + + if (!file || !lineNumber || !columnNumber) + return null + + if (method.startsWith('async ')) + method = method.slice(6) + + if (file.startsWith('file://')) + file = file.slice(7) + + // normalize Windows path (\ -> /) + file = resolve(file) + + return { + method, + file, + line: parseInt(lineNumber), + column: parseInt(columnNumber), + } +} + +export function parseStacktrace(stack: string, ignore = stackIgnorePatterns): ParsedStack[] { + const stackFrames = stack + .split('\n') + .map((raw): ParsedStack | null => { + const stack = parseSingleStack(raw) + + if (!stack || (ignore.length && ignore.some(p => stack.file.match(p)))) + return null + + return stack + }) + .filter(notNullish) + + return stackFrames +} + +export function parseErrorStacktrace(e: ErrorWithDiff, ignore = stackIgnorePatterns): ParsedStack[] { + if (!e || isPrimitive(e)) + return [] + + if (e.stacks) + return e.stacks + + const stackStr = e.stack || e.stackStr || '' + const stackFrames = parseStacktrace(stackStr, ignore) + + e.stacks = stackFrames + return stackFrames +} + +export function positionToOffset( + source: string, + lineNumber: number, + columnNumber: number, +): number { + const lines = source.split(lineSplitRE) + let start = 0 + + if (lineNumber > lines.length) + return source.length + + for (let i = 0; i < lineNumber - 1; i++) + start += lines[i].length + 1 + + return start + columnNumber +} + +export function offsetToLineNumber( + source: string, + offset: number, +): number { + if (offset > source.length) { + throw new Error( + `offset is longer than source length! offset ${offset} > length ${source.length}`, + ) + } + const lines = source.split(lineSplitRE) + let counted = 0 + let line = 0 + for (; line < lines.length; line++) { + const lineLength = lines[line].length + 1 + if (counted + lineLength >= offset) + break + + counted += lineLength + } + return line + 1 +} diff --git a/packages/utils/src/types.ts b/packages/utils/src/types.ts index 730ef610aa2e..5ba7fef74bc1 100644 --- a/packages/utils/src/types.ts +++ b/packages/utils/src/types.ts @@ -23,3 +23,24 @@ export type MutableArray = { -readonly [k in keyof T]: export interface Constructable { new (...args: any[]): any } + +export interface ParsedStack { + method: string + file: string + line: number + column: number +} + +export interface ErrorWithDiff extends Error { + name: string + nameStr?: string + stack?: string + stackStr?: string + stacks?: ParsedStack[] + showDiff?: boolean + actual?: any + expected?: any + operator?: string + type?: string + frame?: string +} diff --git a/packages/vitest/package.json b/packages/vitest/package.json index 745c2700c1c5..975c1c88cb61 100644 --- a/packages/vitest/package.json +++ b/packages/vitest/package.json @@ -139,6 +139,7 @@ "@types/node": "*", "@vitest/expect": "workspace:*", "@vitest/runner": "workspace:*", + "@vitest/snapshot": "workspace:^0.29.3", "@vitest/spy": "workspace:*", "@vitest/utils": "workspace:*", "acorn": "^8.8.1", @@ -169,7 +170,6 @@ "@types/istanbul-reports": "^3.0.1", "@types/jsdom": "^20.0.1", "@types/micromatch": "^4.0.2", - "@types/natural-compare": "^1.4.1", "@types/prompts": "^2.4.2", "@types/sinonjs__fake-timers": "^8.1.2", "birpc": "^0.2.3", @@ -185,10 +185,8 @@ "happy-dom": "^8.3.2", "jsdom": "^21.1.0", "log-update": "^5.0.1", - "magic-string": "^0.27.0", "micromatch": "^4.0.5", "mlly": "^1.1.0", - "natural-compare": "^1.4.0", "p-limit": "^4.0.0", "pkg-types": "^1.0.1", "playwright": "^1.28.0", diff --git a/packages/vitest/src/browser.ts b/packages/vitest/src/browser.ts index 954310e8d65b..3171c38ac81b 100644 --- a/packages/vitest/src/browser.ts +++ b/packages/vitest/src/browser.ts @@ -1,4 +1,3 @@ export { startTests } from '@vitest/runner' export { setupCommonEnv } from './runtime/setup.common' -export { setupSnapshotEnvironment } from './integrations/snapshot/env' export { takeCoverageInsideWorker, stopCoverageInsideWorker, getCoverageProvider, startCoverageInsideWorker } from './integrations/coverage' diff --git a/packages/vitest/src/index.ts b/packages/vitest/src/index.ts index b31ce92a990a..b7425e092cdb 100644 --- a/packages/vitest/src/index.ts +++ b/packages/vitest/src/index.ts @@ -15,7 +15,7 @@ export { runOnce, isFirstRun } from './integrations/run-once' export * from './integrations/chai' export * from './integrations/vi' export * from './integrations/utils' -export type { SnapshotEnvironment } from './integrations/snapshot/env' +export type { SnapshotEnvironment } from '@vitest/snapshot/environment' export * from './types' export * from './api/types' diff --git a/packages/vitest/src/integrations/snapshot/chai.ts b/packages/vitest/src/integrations/snapshot/chai.ts index fefbcc65a76f..fdfb5e204d62 100644 --- a/packages/vitest/src/integrations/snapshot/chai.ts +++ b/packages/vitest/src/integrations/snapshot/chai.ts @@ -1,13 +1,15 @@ import type { ChaiPlugin } from '@vitest/expect' -import { SnapshotClient } from './client' -import { stripSnapshotIndentation } from './port/inlineSnapshot' -import { addSerializer } from './port/plugins' +import type { Test } from '@vitest/runner' +import { getNames } from '@vitest/runner/utils' +import type { SnapshotClient } from '@vitest/snapshot' +import { addSerializer, stripSnapshotIndentation } from '@vitest/snapshot' +import { VitestSnapshotClient } from './client' let _client: SnapshotClient export function getSnapshotClient(): SnapshotClient { if (!_client) - _client = new SnapshotClient() + _client = new VitestSnapshotClient() return _client } @@ -38,6 +40,15 @@ const getErrorString = (expected: () => void | Error, promise: string | undefine } export const SnapshotPlugin: ChaiPlugin = (chai, utils) => { + const getTestNames = (test?: Test) => { + if (!test) + return {} + return { + filepath: test.file?.filepath, + name: getNames(test).slice(1).join(' > '), + } + } + for (const key of ['matchSnapshot', 'toMatchSnapshot']) { utils.addMethod( chai.Assertion.prototype, @@ -52,11 +63,11 @@ export const SnapshotPlugin: ChaiPlugin = (chai, utils) => { const errorMessage = utils.flag(this, 'message') getSnapshotClient().assert({ received: expected, - test, message, isInline: false, properties, errorMessage, + ...getTestNames(test), }) }, ) @@ -64,7 +75,7 @@ export const SnapshotPlugin: ChaiPlugin = (chai, utils) => { utils.addMethod( chai.Assertion.prototype, 'toMatchInlineSnapshot', - function __VITEST_INLINE_SNAPSHOT__(this: Record, properties?: object, inlineSnapshot?: string, message?: string) { + function __INLINE_SNAPSHOT__(this: Record, properties?: object, inlineSnapshot?: string, message?: string) { const expected = utils.flag(this, 'object') const error = utils.flag(this, 'error') const test = utils.flag(this, 'vitest-test') @@ -78,13 +89,13 @@ export const SnapshotPlugin: ChaiPlugin = (chai, utils) => { const errorMessage = utils.flag(this, 'message') getSnapshotClient().assert({ received: expected, - test, message, isInline: true, properties, inlineSnapshot, error, errorMessage, + ...getTestNames(test), }) }, ) @@ -98,16 +109,16 @@ export const SnapshotPlugin: ChaiPlugin = (chai, utils) => { const errorMessage = utils.flag(this, 'message') getSnapshotClient().assert({ received: getErrorString(expected, promise), - test, message, errorMessage, + ...getTestNames(test), }) }, ) utils.addMethod( chai.Assertion.prototype, 'toThrowErrorMatchingInlineSnapshot', - function __VITEST_INLINE_SNAPSHOT__(this: Record, inlineSnapshot: string, message: string) { + function __INLINE_SNAPSHOT__(this: Record, inlineSnapshot: string, message: string) { const expected = utils.flag(this, 'object') const error = utils.flag(this, 'error') const test = utils.flag(this, 'vitest-test') @@ -115,12 +126,12 @@ export const SnapshotPlugin: ChaiPlugin = (chai, utils) => { const errorMessage = utils.flag(this, 'message') getSnapshotClient().assert({ received: getErrorString(expected, promise), - test, message, inlineSnapshot, isInline: true, error, errorMessage, + ...getTestNames(test), }) }, ) diff --git a/packages/vitest/src/integrations/snapshot/client.ts b/packages/vitest/src/integrations/snapshot/client.ts index ee5d8a46bed8..05aa2d77749c 100644 --- a/packages/vitest/src/integrations/snapshot/client.ts +++ b/packages/vitest/src/integrations/snapshot/client.ts @@ -1,134 +1,8 @@ -import { expect } from 'chai' import { equals, iterableEquality, subsetEquality } from '@vitest/expect' -import type { Test } from '@vitest/runner' -import { getNames } from '@vitest/runner/utils' -import { rpc } from '../../runtime/rpc' -import { getWorkerState } from '../../utils' -import { deepMergeSnapshot } from './port/utils' -import SnapshotState from './port/state' +import { SnapshotClient } from '@vitest/snapshot' -export interface Context { - file: string - title?: string - fullTitle?: string -} - -interface AssertOptions { - received: unknown - test?: Test - message?: string - isInline?: boolean - properties?: object - inlineSnapshot?: string - error?: Error - errorMessage?: string -} - -export class SnapshotClient { - test: Test | undefined - snapshotState: SnapshotState | undefined - snapshotStateMap = new Map() - - async setTest(test: Test) { - this.test = test - - if (this.snapshotState?.testFilePath !== this.test.file!.filepath) { - this.saveCurrent() - - const filePath = this.test!.file!.filepath - if (!this.getSnapshotState(test)) { - this.snapshotStateMap.set( - filePath, - await SnapshotState.create( - filePath, - getWorkerState().config.snapshotOptions, - ), - ) - } - this.snapshotState = this.getSnapshotState(test) - } - } - - getSnapshotState(test: Test) { - return this.snapshotStateMap.get(test.file!.filepath)! - } - - clearTest() { - this.test = undefined - } - - skipTestSnapshots(test: Test) { - this.snapshotState?.markSnapshotsAsCheckedForTest(test.name) - } - - assert(options: AssertOptions): void { - const { - test = this.test, - message, - isInline = false, - properties, - inlineSnapshot, - error, - errorMessage, - } = options - let { received } = options - - if (!test) - throw new Error('Snapshot cannot be used outside of test') - - if (typeof properties === 'object') { - if (typeof received !== 'object' || !received) - throw new Error('Received value must be an object when the matcher has properties') - - try { - const pass = equals(received, properties, [iterableEquality, subsetEquality]) - if (!pass) - expect(received).equals(properties) - else - received = deepMergeSnapshot(received, properties) - } - catch (err: any) { - err.message = errorMessage || 'Snapshot mismatched' - throw err - } - } - - const testName = [ - ...getNames(test).slice(1), - ...(message ? [message] : []), - ].join(' > ') - - const snapshotState = this.getSnapshotState(test) - - const { actual, expected, key, pass } = snapshotState.match({ - testName, - received, - isInline, - error, - inlineSnapshot, - }) - - if (!pass) { - try { - expect(actual.trim()).equals(expected ? expected.trim() : '') - } - catch (error: any) { - error.message = errorMessage || `Snapshot \`${key || 'unknown'}\` mismatched` - throw error - } - } - } - - async saveCurrent() { - if (!this.snapshotState) - return - const result = await this.snapshotState.pack() - await rpc().snapshotSaved(result) - - this.snapshotState = undefined - } - - clear() { - this.snapshotStateMap.clear() +export class VitestSnapshotClient extends SnapshotClient { + equalityCheck(received: unknown, expected: unknown): boolean { + return equals(received, expected, [iterableEquality, subsetEquality]) } } diff --git a/packages/vitest/src/integrations/snapshot/environments/node.ts b/packages/vitest/src/integrations/snapshot/environments/node.ts index e0b7326cb721..59657bb79e13 100644 --- a/packages/vitest/src/integrations/snapshot/environments/node.ts +++ b/packages/vitest/src/integrations/snapshot/environments/node.ts @@ -1,28 +1,12 @@ -import { existsSync, promises as fs } from 'node:fs' +import { NodeSnapshotEnvironment } from '@vitest/snapshot/environment' import { rpc } from '../../../runtime/rpc' -import type { SnapshotEnvironment } from '../env' -export class NodeSnapshotEnvironment implements SnapshotEnvironment { - resolvePath(filepath: string): Promise { - return rpc().resolveSnapshotPath(filepath) - } - - async prepareDirectory(filepath: string): Promise { - await fs.mkdir(filepath, { recursive: true }) - } - - async saveSnapshotFile(filepath: string, snapshot: string): Promise { - await fs.writeFile(filepath, snapshot, 'utf-8') - } - - async readSnapshotFile(filepath: string): Promise { - if (!existsSync(filepath)) - return null - return fs.readFile(filepath, 'utf-8') +export class VitestSnapshotEnvironment extends NodeSnapshotEnvironment { + getHeader(): string { + return `// Vitest Snapshot v${this.getVersion()}, https://vitest.dev/guide/snapshot.html` } - async removeSnapshotFile(filepath: string): Promise { - if (existsSync(filepath)) - await fs.unlink(filepath) + resolvePath(filepath: string): Promise { + return rpc().resolveSnapshotPath(filepath) } } diff --git a/packages/vitest/src/node/config.ts b/packages/vitest/src/node/config.ts index a55806fbb24e..da0d105c2576 100644 --- a/packages/vitest/src/node/config.ts +++ b/packages/vitest/src/node/config.ts @@ -157,6 +157,8 @@ export function resolveConfig( ? 'all' : 'new', resolveSnapshotPath: options.resolveSnapshotPath, + // resolved inside the worker + snapshotEnvironment: null as any, } if (options.resolveSnapshotPath) diff --git a/packages/vitest/src/node/core.ts b/packages/vitest/src/node/core.ts index 474c1c2b1d60..091582eac76a 100644 --- a/packages/vitest/src/node/core.ts +++ b/packages/vitest/src/node/core.ts @@ -6,8 +6,8 @@ import mm from 'micromatch' import c from 'picocolors' import { normalizeRequestId } from 'vite-node/utils' import { ViteNodeRunner } from 'vite-node/client' +import { SnapshotManager } from '@vitest/snapshot/manager' import type { ArgumentsType, CoverageProvider, OnServerRestartHandler, Reporter, ResolvedConfig, UserConfig, VitestRunMode } from '../types' -import { SnapshotManager } from '../integrations/snapshot/manager' import { deepMerge, hasFailed, noop, slash, toArray } from '../utils' import { getCoverageProvider } from '../integrations/coverage' import { Typechecker } from '../typecheck/typechecker' @@ -442,6 +442,8 @@ export class Vitest { this.configOverride = { snapshotOptions: { updateSnapshot: 'all', + // environment is resolved inside a worker thread + snapshotEnvironment: null as any, }, } diff --git a/packages/vitest/src/node/error.ts b/packages/vitest/src/node/error.ts index 7d69d7c06597..2da1c1943ecf 100644 --- a/packages/vitest/src/node/error.ts +++ b/packages/vitest/src/node/error.ts @@ -42,7 +42,7 @@ export async function printError(error: unknown, ctx: Vitest, options: PrintErro if (!ctx.config) return printErrorMessage(e, ctx.logger) - const stacks = parseErrorStacktrace(e, fullStack) + const stacks = parseErrorStacktrace(e, fullStack ? [] : undefined) const nearest = error instanceof TypeCheckError ? error.stacks[0] diff --git a/packages/vitest/src/runtime/runners/test.ts b/packages/vitest/src/runtime/runners/test.ts index 628fb545ebe8..6ba9e874daa9 100644 --- a/packages/vitest/src/runtime/runners/test.ts +++ b/packages/vitest/src/runtime/runners/test.ts @@ -2,7 +2,7 @@ import type { Suite, Test, TestContext, VitestRunner, VitestRunnerImportSource } import { GLOBAL_EXPECT, getState, setState } from '@vitest/expect' import { getSnapshotClient } from '../../integrations/snapshot/chai' import { vi } from '../../integrations/vi' -import { getFullName, getWorkerState } from '../../utils' +import { getFullName, getNames, getWorkerState } from '../../utils' import { createExpect } from '../../integrations/chai/index' import type { ResolvedConfig } from '../../types/config' import type { VitestExecutor } from '../execute' @@ -25,7 +25,9 @@ export class VitestTestRunner implements VitestRunner { } async onAfterRun() { - await this.snapshotClient.saveCurrent() + const result = await this.snapshotClient.resetCurrent() + if (result) + await this.workerState.rpc.snapshotSaved(result) } onAfterRunSuite(suite: Suite) { @@ -43,13 +45,15 @@ export class VitestTestRunner implements VitestRunner { } async onBeforeRunTest(test: Test) { + const name = getNames(test).slice(1).join(' > ') + if (test.mode !== 'run') { - this.snapshotClient.skipTestSnapshots(test) + this.snapshotClient.skipTestSnapshots(name) return } clearModuleMocks(this.config) - await this.snapshotClient.setTest(test) + await this.snapshotClient.setTest(test.file!.filepath, name, this.workerState.config.snapshotOptions) this.workerState.current = test } diff --git a/packages/vitest/src/runtime/setup.node.ts b/packages/vitest/src/runtime/setup.node.ts index 9b39bf836401..ff6556fac41e 100644 --- a/packages/vitest/src/runtime/setup.node.ts +++ b/packages/vitest/src/runtime/setup.node.ts @@ -4,12 +4,11 @@ import { installSourcemapsSupport } from 'vite-node/source-map' import { createColors, setupColors } from '@vitest/utils' import { environments } from '../integrations/env' import type { Environment, ResolvedConfig } from '../types' +import { VitestSnapshotEnvironment } from '../integrations/snapshot/environments/node' import { getSafeTimers, getWorkerState } from '../utils' import * as VitestIndex from '../index' import { RealDate } from '../integrations/mock/date' import { expect } from '../integrations/chai' -import { setupSnapshotEnvironment } from '../integrations/snapshot/env' -import { NodeSnapshotEnvironment } from '../integrations/snapshot/environments/node' import { rpc } from './rpc' import { setupCommonEnv } from './setup.common' import type { VitestExecutor } from './execute' @@ -24,11 +23,15 @@ export async function setupGlobalEnv(config: ResolvedConfig) { enumerable: false, }) + const state = getWorkerState() + + if (!state.config.snapshotOptions.snapshotEnvironment) + state.config.snapshotOptions.snapshotEnvironment = new VitestSnapshotEnvironment() + if (globalSetup) return globalSetup = true - setupSnapshotEnvironment(new NodeSnapshotEnvironment()) setupColors(createColors(isatty(1))) const _require = createRequire(import.meta.url) @@ -37,8 +40,6 @@ export async function setupGlobalEnv(config: ResolvedConfig) { _require.extensions['.scss'] = () => ({}) _require.extensions['.sass'] = () => ({}) - const state = getWorkerState() - installSourcemapsSupport({ getSourceMap: source => state.moduleCache.getSourceMap(source), }) diff --git a/packages/vitest/src/types/global.ts b/packages/vitest/src/types/global.ts index 51f238aa7968..004f61ab63f9 100644 --- a/packages/vitest/src/types/global.ts +++ b/packages/vitest/src/types/global.ts @@ -1,6 +1,6 @@ import type { Plugin as PrettyFormatPlugin } from 'pretty-format' import type { MatchersObject } from '@vitest/expect' -import type SnapshotState from '../integrations/snapshot/port/state' +import type { SnapshotState } from '@vitest/snapshot' import type { MatcherState } from './chai' import type { Constructable, UserConsoleLog } from './general' import type { VitestEnvironment } from './config' diff --git a/packages/vitest/src/types/snapshot.ts b/packages/vitest/src/types/snapshot.ts index a85ed9fde82d..0aa0149af4c7 100644 --- a/packages/vitest/src/types/snapshot.ts +++ b/packages/vitest/src/types/snapshot.ts @@ -1,54 +1,9 @@ -import type { OptionsReceived as PrettyFormatOptions } from 'pretty-format' - -export type SnapshotData = Record - -export type SnapshotUpdateState = 'all' | 'new' | 'none' - -export interface SnapshotStateOptions { - updateSnapshot: SnapshotUpdateState - expand?: boolean - snapshotFormat?: PrettyFormatOptions - resolveSnapshotPath?: (path: string, extension: string) => string -} - -export interface SnapshotMatchOptions { - testName: string - received: unknown - key?: string - inlineSnapshot?: string - isInline: boolean - error?: Error -} - -export interface SnapshotResult { - filepath: string - added: number - fileDeleted: boolean - matched: number - unchecked: number - uncheckedKeys: Array - unmatched: number - updated: number -} - -export interface UncheckedSnapshot { - filePath: string - keys: Array -} - -export interface SnapshotSummary { - added: number - didUpdate: boolean - failure: boolean - filesAdded: number - filesRemoved: number - filesRemovedList: Array - filesUnmatched: number - filesUpdated: number - matched: number - total: number - unchecked: number - uncheckedKeysByFile: Array - unmatched: number - updated: number -} +export type { + SnapshotData, + SnapshotUpdateState, + SnapshotStateOptions, + SnapshotMatchOptions, + SnapshotResult, + UncheckedSnapshot, + SnapshotSummary, +} from '@vitest/snapshot' diff --git a/packages/vitest/src/utils/base.ts b/packages/vitest/src/utils/base.ts index f66ed34b82d2..3a745de028d7 100644 --- a/packages/vitest/src/utils/base.ts +++ b/packages/vitest/src/utils/base.ts @@ -1,5 +1,7 @@ import type { Arrayable, Nullable, ResolvedConfig, VitestEnvironment } from '../types' +export { notNullish, getCallLastIndex } from '@vitest/utils' + function isFinalObj(obj: any) { return obj === Object.prototype || obj === Function.prototype || obj === RegExp.prototype } @@ -47,10 +49,6 @@ export function getAllMockableProperties(obj: any, isModule: boolean) { return Array.from(allProps.values()) } -export function notNullish(v: T | null | undefined): v is NonNullable { - return v != null -} - export function slash(str: string) { return str.replace(/\\/g, '/') } diff --git a/packages/vitest/src/utils/index.ts b/packages/vitest/src/utils/index.ts index 66d5d86b28fb..c031a7249f66 100644 --- a/packages/vitest/src/utils/index.ts +++ b/packages/vitest/src/utils/index.ts @@ -46,48 +46,6 @@ export function removeUndefinedValues>(obj: T): T return obj } -/** - * If code starts with a function call, will return its last index, respecting arguments. - * This will return 25 - last ending character of toMatch ")" - * Also works with callbacks - * ``` - * toMatch({ test: '123' }); - * toBeAliased('123') - * ``` - */ -export function getCallLastIndex(code: string) { - let charIndex = -1 - let inString: string | null = null - let startedBracers = 0 - let endedBracers = 0 - let beforeChar: string | null = null - while (charIndex <= code.length) { - beforeChar = code[charIndex] - charIndex++ - const char = code[charIndex] - - const isCharString = char === '"' || char === '\'' || char === '`' - - if (isCharString && beforeChar !== '\\') { - if (inString === char) - inString = null - else if (!inString) - inString = char - } - - if (!inString) { - if (char === '(') - startedBracers++ - if (char === ')') - endedBracers++ - } - - if (startedBracers && endedBracers && startedBracers === endedBracers) - return charIndex - } - return null -} - // AggregateError is supported in Node.js 15.0.0+ class AggregateErrorPonyfill extends Error { errors: unknown[] diff --git a/packages/vitest/src/utils/source-map.ts b/packages/vitest/src/utils/source-map.ts index 1f653a9632df..626dacd66863 100644 --- a/packages/vitest/src/utils/source-map.ts +++ b/packages/vitest/src/utils/source-map.ts @@ -1,145 +1,8 @@ -import { resolve } from 'pathe' -import type { ErrorWithDiff, ParsedStack } from '../types' -import { isPrimitive, notNullish } from './base' - -export const lineSplitRE = /\r?\n/ - -const stackIgnorePatterns = [ - 'node:internal', - /\/packages\/\w+\/dist\//, - /\/@vitest\/\w+\/dist\//, - '/vitest/dist/', - '/vitest/src/', - '/vite-node/dist/', - '/vite-node/src/', - '/node_modules/chai/', - '/node_modules/tinypool/', - '/node_modules/tinyspy/', -] - -function extractLocation(urlLike: string) { - // Fail-fast but return locations like "(native)" - if (!urlLike.includes(':')) - return [urlLike] - - const regExp = /(.+?)(?::(\d+))?(?::(\d+))?$/ - const parts = regExp.exec(urlLike.replace(/[()]/g, '')) - if (!parts) - return [urlLike] - return [parts[1], parts[2] || undefined, parts[3] || undefined] -} - -// Based on https://github.com/stacktracejs/error-stack-parser -// Credit to stacktracejs -export function parseSingleStack(raw: string): ParsedStack | null { - let line = raw.trim() - - if (line.includes('(eval ')) - line = line.replace(/eval code/g, 'eval').replace(/(\(eval at [^()]*)|(,.*$)/g, '') - - let sanitizedLine = line - .replace(/^\s+/, '') - .replace(/\(eval code/g, '(') - .replace(/^.*?\s+/, '') - - // capture and preserve the parenthesized location "(/foo/my bar.js:12:87)" in - // case it has spaces in it, as the string is split on \s+ later on - const location = sanitizedLine.match(/ (\(.+\)$)/) - - // remove the parenthesized location from the line, if it was matched - sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine - - // if a location was matched, pass it to extractLocation() otherwise pass all sanitizedLine - // because this line doesn't have function name - const [url, lineNumber, columnNumber] = extractLocation(location ? location[1] : sanitizedLine) - let method = (location && sanitizedLine) || '' - let file = url && ['eval', ''].includes(url) ? undefined : url - - if (!file || !lineNumber || !columnNumber) - return null - - if (method.startsWith('async ')) - method = method.slice(6) - - if (file.startsWith('file://')) - file = file.slice(7) - - // normalize Windows path (\ -> /) - file = resolve(file) - - return { - method, - file, - line: parseInt(lineNumber), - column: parseInt(columnNumber), - } -} - -export function parseStacktrace(stack: string, full = false): ParsedStack[] { - const stackFrames = stack - .split('\n') - .map((raw): ParsedStack | null => { - const stack = parseSingleStack(raw) - - if (!stack || (!full && stackIgnorePatterns.some(p => stack.file.match(p)))) - return null - - return stack - }) - .filter(notNullish) - - return stackFrames -} - -export function parseErrorStacktrace(e: ErrorWithDiff, full = false): ParsedStack[] { - if (!e || isPrimitive(e)) - return [] - - if (e.stacks) - return e.stacks - - const stackStr = e.stack || e.stackStr || '' - const stackFrames = parseStacktrace(stackStr, full) - - e.stacks = stackFrames - return stackFrames -} - -export function positionToOffset( - source: string, - lineNumber: number, - columnNumber: number, -): number { - const lines = source.split(lineSplitRE) - let start = 0 - - if (lineNumber > lines.length) - return source.length - - for (let i = 0; i < lineNumber - 1; i++) - start += lines[i].length + 1 - - return start + columnNumber -} - -export function offsetToLineNumber( - source: string, - offset: number, -): number { - if (offset > source.length) { - throw new Error( - `offset is longer than source length! offset ${offset} > length ${source.length}`, - ) - } - const lines = source.split(lineSplitRE) - let counted = 0 - let line = 0 - for (; line < lines.length; line++) { - const lineLength = lines[line].length + 1 - if (counted + lineLength >= offset) - break - - counted += lineLength - } - return line + 1 -} +export { + lineSplitRE, + parseSingleStack, + parseStacktrace, + parseErrorStacktrace, + positionToOffset, + offsetToLineNumber, +} from '@vitest/utils' diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f12f8423ce33..589b8a693adc 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -721,6 +721,23 @@ importers: p-limit: 4.0.0 pathe: 1.1.0 + packages/snapshot: + specifiers: + '@types/natural-compare': ^1.4.1 + '@vitest/utils': workspace:* + magic-string: ^0.27.0 + natural-compare: ^1.4.0 + pathe: ^1.1.0 + pretty-format: ^27.5.1 + dependencies: + '@vitest/utils': link:../utils + magic-string: 0.27.0 + pathe: 1.1.0 + pretty-format: 27.5.1 + devDependencies: + '@types/natural-compare': 1.4.1 + natural-compare: 1.4.0 + packages/spy: specifiers: tinyspy: ^2.1.0 @@ -852,6 +869,7 @@ importers: '@types/sinonjs__fake-timers': ^8.1.2 '@vitest/expect': workspace:* '@vitest/runner': workspace:* + '@vitest/snapshot': workspace:^0.29.3 '@vitest/spy': workspace:* '@vitest/utils': workspace:* acorn: ^8.8.1 @@ -906,6 +924,7 @@ importers: '@types/node': 18.7.13 '@vitest/expect': link:../expect '@vitest/runner': link:../runner + '@vitest/snapshot': link:../snapshot '@vitest/spy': link:../spy '@vitest/utils': link:../utils acorn: 8.8.1 @@ -16436,7 +16455,6 @@ packages: engines: {node: '>=12'} dependencies: '@jridgewell/sourcemap-codec': 1.4.14 - dev: true /make-dir/2.1.0: resolution: {integrity: sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==} diff --git a/test/core/test/inline-snap.test.ts b/test/core/test/inline-snap.test.ts index d8aa13ea731e..eb41a39a2da7 100644 --- a/test/core/test/inline-snap.test.ts +++ b/test/core/test/inline-snap.test.ts @@ -1,6 +1,6 @@ import MagicString from 'magic-string' import { describe, expect, it } from 'vitest' -import { replaceInlineSnap } from '../../../packages/vitest/src/integrations/snapshot/port/inlineSnapshot' +import { replaceInlineSnap } from '../../../packages/snapshot/src/port/inlineSnapshot' describe('inline-snap utils', () => { it('replaceInlineSnap', async () => { diff --git a/test/core/test/utils.spec.ts b/test/core/test/utils.spec.ts index 49ae5b3317d4..ac62a948b762 100644 --- a/test/core/test/utils.spec.ts +++ b/test/core/test/utils.spec.ts @@ -1,7 +1,7 @@ import { beforeAll, describe, expect, test } from 'vitest' import { assertTypes, deepClone, objectAttr, toArray } from '@vitest/utils' import { deepMerge, resetModules } from '../../../packages/vitest/src/utils' -import { deepMergeSnapshot } from '../../../packages/vitest/src/integrations/snapshot/port/utils' +import { deepMergeSnapshot } from '../../../packages/snapshot/src/port/utils' import type { EncodedSourceMap } from '../../../packages/vite-node/src/types' import { ModuleCacheMap } from '../../../packages/vite-node/dist/client' diff --git a/test/snapshots/test/snapshot-async.test.ts b/test/snapshots/test/snapshot-async.test.ts new file mode 100644 index 000000000000..21fc19c0c158 --- /dev/null +++ b/test/snapshots/test/snapshot-async.test.ts @@ -0,0 +1,13 @@ +import { expect, test } from 'vitest' + +const resolve = () => Promise.resolve('foo') +const reject = () => Promise.reject(new Error('foo')) + +test('resolved inline', async () => { + await expect(resolve()).resolves.toMatchInlineSnapshot('"foo"') +}) + +test('rejected inline', async () => { + await expect(reject()).rejects.toMatchInlineSnapshot('[Error: foo]') + await expect(reject()).rejects.toThrowErrorMatchingInlineSnapshot('"foo"') +}) diff --git a/tsconfig.json b/tsconfig.json index 486a0de96473..7984b8b219ad 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -19,6 +19,8 @@ "@vitest/utils": ["./packages/utils/src/index.ts"], "@vitest/utils/*": ["./packages/utils/src/*"], "@vitest/spy": ["./packages/spy/src/index.ts"], + "@vitest/snapshot": ["./packages/snapshot/src/index.ts"], + "@vitest/snapshot/*": ["./packages/snapshot/src/*"], "@vitest/expect": ["./packages/expect/src/index.ts"], "@vitest/runner": ["./packages/runner/src/index.ts"], "@vitest/runner/*": ["./packages/runner/src/*"], From 72ffcf758aa431c883766d051d7b36ae7f056a73 Mon Sep 17 00:00:00 2001 From: Vladimir Date: Sun, 19 Mar 2023 15:37:48 +0100 Subject: [PATCH 02/15] chore: lockfile --- pnpm-lock.yaml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 589b8a693adc..60ca1404626b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -863,7 +863,6 @@ importers: '@types/istanbul-reports': ^3.0.1 '@types/jsdom': ^20.0.1 '@types/micromatch': ^4.0.2 - '@types/natural-compare': ^1.4.1 '@types/node': '*' '@types/prompts': ^2.4.2 '@types/sinonjs__fake-timers': ^8.1.2 @@ -895,7 +894,6 @@ importers: magic-string: ^0.27.0 micromatch: ^4.0.5 mlly: ^1.1.0 - natural-compare: ^1.4.0 p-limit: ^4.0.0 pathe: ^1.1.0 picocolors: ^1.0.0 @@ -934,6 +932,7 @@ importers: concordance: 5.0.4 debug: 4.3.4 local-pkg: 0.4.2 + magic-string: 0.27.0 pathe: 1.1.0 picocolors: 1.0.0 source-map: 0.6.1 @@ -954,7 +953,6 @@ importers: '@types/istanbul-reports': 3.0.1 '@types/jsdom': 20.0.1 '@types/micromatch': 4.0.2 - '@types/natural-compare': 1.4.1 '@types/prompts': 2.4.2 '@types/sinonjs__fake-timers': 8.1.2 birpc: 0.2.3 @@ -970,10 +968,8 @@ importers: happy-dom: 8.3.2 jsdom: 21.1.0 log-update: 5.0.1 - magic-string: 0.27.0 micromatch: 4.0.5 mlly: 1.1.0 - natural-compare: 1.4.0 p-limit: 4.0.0 pkg-types: 1.0.1 playwright: 1.28.0 From f70d5102a7db39ffdc58eb80d3ca8bc19ccc9db7 Mon Sep 17 00:00:00 2001 From: Vladimir Date: Sun, 19 Mar 2023 15:39:34 +0100 Subject: [PATCH 03/15] chore: cleanup --- packages/vitest/LICENSE.md | 928 ++++++++++++------------------- packages/vitest/package.json | 2 +- packages/vitest/rollup.config.js | 2 + 3 files changed, 359 insertions(+), 573 deletions(-) diff --git a/packages/vitest/LICENSE.md b/packages/vitest/LICENSE.md index c6eded7ff4e3..013f982170c5 100644 --- a/packages/vitest/LICENSE.md +++ b/packages/vitest/LICENSE.md @@ -37,17 +37,17 @@ Repository: git+https://github.com/ampproject/remapping.git > Apache License > Version 2.0, January 2004 > http://www.apache.org/licenses/ -> +> > TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION -> +> > 1. Definitions. -> +> > "License" shall mean the terms and conditions for use, reproduction, > and distribution as defined by Sections 1 through 9 of this document. -> +> > "Licensor" shall mean the copyright owner or entity authorized by > the copyright owner that is granting the License. -> +> > "Legal Entity" shall mean the union of the acting entity and all > other entities that control, are controlled by, or are under common > control with that entity. For the purposes of this definition, @@ -55,24 +55,24 @@ Repository: git+https://github.com/ampproject/remapping.git > direction or management of such entity, whether by contract or > otherwise, or (ii) ownership of fifty percent (50%) or more of the > outstanding shares, or (iii) beneficial ownership of such entity. -> +> > "You" (or "Your") shall mean an individual or Legal Entity > exercising permissions granted by this License. -> +> > "Source" form shall mean the preferred form for making modifications, > including but not limited to software source code, documentation > source, and configuration files. -> +> > "Object" form shall mean any form resulting from mechanical > transformation or translation of a Source form, including but > not limited to compiled object code, generated documentation, > and conversions to other media types. -> +> > "Work" shall mean the work of authorship, whether in Source or > Object form, made available under the License, as indicated by a > copyright notice that is included in or attached to the work > (an example is provided in the Appendix below). -> +> > "Derivative Works" shall mean any work, whether in Source or Object > form, that is based on (or derived from) the Work and for which the > editorial revisions, annotations, elaborations, or other modifications @@ -80,7 +80,7 @@ Repository: git+https://github.com/ampproject/remapping.git > of this License, Derivative Works shall not include works that remain > separable from, or merely link (or bind by name) to the interfaces of, > the Work and Derivative Works thereof. -> +> > "Contribution" shall mean any work of authorship, including > the original version of the Work and any modifications or additions > to that Work or Derivative Works thereof, that is intentionally @@ -94,18 +94,18 @@ Repository: git+https://github.com/ampproject/remapping.git > Licensor for the purpose of discussing and improving the Work, but > excluding communication that is conspicuously marked or otherwise > designated in writing by the copyright owner as "Not a Contribution." -> +> > "Contributor" shall mean Licensor and any individual or Legal Entity > on behalf of whom a Contribution has been received by Licensor and > subsequently incorporated within the Work. -> +> > 2. Grant of Copyright License. Subject to the terms and conditions of > this License, each Contributor hereby grants to You a perpetual, > worldwide, non-exclusive, no-charge, royalty-free, irrevocable > copyright license to reproduce, prepare Derivative Works of, > publicly display, publicly perform, sublicense, and distribute the > Work and such Derivative Works in Source or Object form. -> +> > 3. Grant of Patent License. Subject to the terms and conditions of > this License, each Contributor hereby grants to You a perpetual, > worldwide, non-exclusive, no-charge, royalty-free, irrevocable @@ -121,24 +121,24 @@ Repository: git+https://github.com/ampproject/remapping.git > or contributory patent infringement, then any patent licenses > granted to You under this License for that Work shall terminate > as of the date such litigation is filed. -> +> > 4. Redistribution. You may reproduce and distribute copies of the > Work or Derivative Works thereof in any medium, with or without > modifications, and in Source or Object form, provided that You > meet the following conditions: -> +> > (a) You must give any other recipients of the Work or > Derivative Works a copy of this License; and -> +> > (b) You must cause any modified files to carry prominent notices > stating that You changed the files; and -> +> > (c) You must retain, in the Source form of any Derivative Works > that You distribute, all copyright, patent, trademark, and > attribution notices from the Source form of the Work, > excluding those notices that do not pertain to any part of > the Derivative Works; and -> +> > (d) If the Work includes a "NOTICE" text file as part of its > distribution, then any Derivative Works that You distribute must > include a readable copy of the attribution notices contained @@ -155,14 +155,14 @@ Repository: git+https://github.com/ampproject/remapping.git > or as an addendum to the NOTICE text from the Work, provided > that such additional attribution notices cannot be construed > as modifying the License. -> +> > You may add Your own copyright statement to Your modifications and > may provide additional or different license terms and conditions > for use, reproduction, or distribution of Your modifications, or > for any such Derivative Works as a whole, provided Your use, > reproduction, and distribution of the Work otherwise complies with > the conditions stated in this License. -> +> > 5. Submission of Contributions. Unless You explicitly state otherwise, > any Contribution intentionally submitted for inclusion in the Work > by You to the Licensor shall be under the terms and conditions of @@ -170,12 +170,12 @@ Repository: git+https://github.com/ampproject/remapping.git > Notwithstanding the above, nothing herein shall supersede or modify > the terms of any separate license agreement you may have executed > with Licensor regarding such Contributions. -> +> > 6. Trademarks. This License does not grant permission to use the trade > names, trademarks, service marks, or product names of the Licensor, > except as required for reasonable and customary use in describing the > origin of the Work and reproducing the content of the NOTICE file. -> +> > 7. Disclaimer of Warranty. Unless required by applicable law or > agreed to in writing, Licensor provides the Work (and each > Contributor provides its Contributions) on an "AS IS" BASIS, @@ -185,7 +185,7 @@ Repository: git+https://github.com/ampproject/remapping.git > PARTICULAR PURPOSE. You are solely responsible for determining the > appropriateness of using or redistributing the Work and assume any > risks associated with Your exercise of permissions under this License. -> +> > 8. Limitation of Liability. In no event and under no legal theory, > whether in tort (including negligence), contract, or otherwise, > unless required by applicable law (such as deliberate and grossly @@ -197,7 +197,7 @@ Repository: git+https://github.com/ampproject/remapping.git > work stoppage, computer failure or malfunction, or any and all > other commercial damages or losses), even if such Contributor > has been advised of the possibility of such damages. -> +> > 9. Accepting Warranty or Additional Liability. While redistributing > the Work or Derivative Works thereof, You may choose to offer, > and charge a fee for, acceptance of support, warranty, indemnity, @@ -208,11 +208,11 @@ Repository: git+https://github.com/ampproject/remapping.git > defend, and hold each Contributor harmless for any liability > incurred by, or claims asserted against, such Contributor by reason > of your accepting any such warranty or additional liability. -> +> > END OF TERMS AND CONDITIONS -> +> > APPENDIX: How to apply the Apache License to your work. -> +> > To apply the Apache License to your work, attach the following > boilerplate notice, with the fields enclosed by brackets "[]" > replaced with your own identifying information. (Don't include @@ -221,15 +221,15 @@ Repository: git+https://github.com/ampproject/remapping.git > file or class name and description of purpose be included on the > same "printed page" as the copyright notice for easier > identification within third-party archives. -> +> > Copyright 2019 Google LLC -> +> > Licensed under the Apache License, Version 2.0 (the "License"); > you may not use this file except in compliance with the License. > You may obtain a copy of the License at -> +> > http://www.apache.org/licenses/LICENSE-2.0 -> +> > Unless required by applicable law or agreed to in writing, software > distributed under the License is distributed on an "AS IS" BASIS, > WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -244,156 +244,19 @@ By: Anthony Fu Repository: git+https://github.com/antfu/install-pkg.git > MIT License -> +> > Copyright (c) 2021 Anthony Fu -> +> > Permission is hereby granted, free of charge, to any person obtaining a copy > of this software and associated documentation files (the "Software"), to deal > in the Software without restriction, including without limitation the rights > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell > copies of the Software, and to permit persons to whom the Software is > furnished to do so, subject to the following conditions: -> +> > The above copyright notice and this permission notice shall be included in all > copies or substantial portions of the Software. -> -> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -> SOFTWARE. - ---------------------------------------- - -## @jridgewell/gen-mapping -License: MIT -By: Justin Ridgewell -Repository: https://github.com/jridgewell/gen-mapping - -> Copyright 2022 Justin Ridgewell -> -> Permission is hereby granted, free of charge, to any person obtaining a copy -> of this software and associated documentation files (the "Software"), to deal -> in the Software without restriction, including without limitation the rights -> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -> copies of the Software, and to permit persons to whom the Software is -> furnished to do so, subject to the following conditions: -> -> The above copyright notice and this permission notice shall be included in -> all copies or substantial portions of the Software. -> -> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -> SOFTWARE. - ---------------------------------------- - -## @jridgewell/resolve-uri -License: MIT -By: Justin Ridgewell -Repository: https://github.com/jridgewell/resolve-uri - -> Copyright 2019 Justin Ridgewell -> -> Permission is hereby granted, free of charge, to any person obtaining a copy -> of this software and associated documentation files (the "Software"), to deal -> in the Software without restriction, including without limitation the rights -> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -> copies of the Software, and to permit persons to whom the Software is -> furnished to do so, subject to the following conditions: -> -> The above copyright notice and this permission notice shall be included in -> all copies or substantial portions of the Software. -> -> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -> SOFTWARE. - ---------------------------------------- - -## @jridgewell/set-array -License: MIT -By: Justin Ridgewell -Repository: https://github.com/jridgewell/set-array - -> Copyright 2022 Justin Ridgewell -> -> Permission is hereby granted, free of charge, to any person obtaining a copy -> of this software and associated documentation files (the "Software"), to deal -> in the Software without restriction, including without limitation the rights -> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -> copies of the Software, and to permit persons to whom the Software is -> furnished to do so, subject to the following conditions: -> -> The above copyright notice and this permission notice shall be included in -> all copies or substantial portions of the Software. -> -> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -> SOFTWARE. - ---------------------------------------- - -## @jridgewell/sourcemap-codec -License: MIT -By: Rich Harris -Repository: git+https://github.com/jridgewell/sourcemap-codec.git - -> The MIT License -> -> Copyright (c) 2015 Rich Harris -> -> Permission is hereby granted, free of charge, to any person obtaining a copy -> of this software and associated documentation files (the "Software"), to deal -> in the Software without restriction, including without limitation the rights -> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -> copies of the Software, and to permit persons to whom the Software is -> furnished to do so, subject to the following conditions: -> -> The above copyright notice and this permission notice shall be included in -> all copies or substantial portions of the Software. -> -> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -> THE SOFTWARE. - ---------------------------------------- - -## @jridgewell/trace-mapping -License: MIT -By: Justin Ridgewell -Repository: git+https://github.com/jridgewell/trace-mapping.git - -> Copyright 2022 Justin Ridgewell -> -> Permission is hereby granted, free of charge, to any person obtaining a copy -> of this software and associated documentation files (the "Software"), to deal -> in the Software without restriction, including without limitation the rights -> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -> copies of the Software, and to permit persons to whom the Software is -> furnished to do so, subject to the following conditions: -> -> The above copyright notice and this permission notice shall be included in -> all copies or substantial portions of the Software. -> +> > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -409,19 +272,19 @@ License: MIT Repository: https://github.com/nodelib/nodelib/tree/master/packages/fs/fs.scandir > The MIT License (MIT) -> +> > Copyright (c) Denis Malinochkin -> +> > Permission is hereby granted, free of charge, to any person obtaining a copy > of this software and associated documentation files (the "Software"), to deal > in the Software without restriction, including without limitation the rights > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell > copies of the Software, and to permit persons to whom the Software is > furnished to do so, subject to the following conditions: -> +> > The above copyright notice and this permission notice shall be included in all > copies or substantial portions of the Software. -> +> > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -437,19 +300,19 @@ License: MIT Repository: https://github.com/nodelib/nodelib/tree/master/packages/fs/fs.stat > The MIT License (MIT) -> +> > Copyright (c) Denis Malinochkin -> +> > Permission is hereby granted, free of charge, to any person obtaining a copy > of this software and associated documentation files (the "Software"), to deal > in the Software without restriction, including without limitation the rights > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell > copies of the Software, and to permit persons to whom the Software is > furnished to do so, subject to the following conditions: -> +> > The above copyright notice and this permission notice shall be included in all > copies or substantial portions of the Software. -> +> > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -465,19 +328,19 @@ License: MIT Repository: https://github.com/nodelib/nodelib/tree/master/packages/fs/fs.walk > The MIT License (MIT) -> +> > Copyright (c) Denis Malinochkin -> +> > Permission is hereby granted, free of charge, to any person obtaining a copy > of this software and associated documentation files (the "Software"), to deal > in the Software without restriction, including without limitation the rights > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell > copies of the Software, and to permit persons to whom the Software is > furnished to do so, subject to the following conditions: -> +> > The above copyright notice and this permission notice shall be included in all > copies or substantial portions of the Software. -> +> > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -493,24 +356,24 @@ License: BSD-3-Clause Repository: git+https://github.com/sinonjs/commons.git > BSD 3-Clause License -> +> > Copyright (c) 2018, Sinon.JS > All rights reserved. -> +> > Redistribution and use in source and binary forms, with or without > modification, are permitted provided that the following conditions are met: -> +> > * Redistributions of source code must retain the above copyright notice, this > list of conditions and the following disclaimer. -> +> > * Redistributions in binary form must reproduce the above copyright notice, > this list of conditions and the following disclaimer in the documentation > and/or other materials provided with the distribution. -> +> > * Neither the name of the copyright holder nor the names of its > contributors may be used to endorse or promote products derived from > this software without specific prior written permission. -> +> > THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" > AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE @@ -530,15 +393,15 @@ By: Christian Johansen Repository: https://github.com/sinonjs/fake-timers.git > Copyright (c) 2010-2014, Christian Johansen, christian@cjohansen.no. All rights reserved. -> +> > Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -> +> > 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -> +> > 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -> +> > 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. -> +> > THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------- @@ -549,13 +412,13 @@ By: Sindre Sorhus Repository: sindresorhus/ansi-escapes > MIT License -> +> > Copyright (c) Sindre Sorhus (https://sindresorhus.com) -> +> > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -> +> > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -> +> > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --------------------------------------- @@ -566,13 +429,13 @@ By: Sindre Sorhus Repository: chalk/ansi-regex > MIT License -> -> Copyright (c) Sindre Sorhus (sindresorhus.com) -> +> +> Copyright (c) Sindre Sorhus (https://sindresorhus.com) +> > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -> +> > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -> +> > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --------------------------------------- @@ -583,13 +446,13 @@ By: Sindre Sorhus Repository: chalk/ansi-styles > MIT License -> -> Copyright (c) Sindre Sorhus (sindresorhus.com) -> +> +> Copyright (c) Sindre Sorhus (https://sindresorhus.com) +> > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -> +> > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -> +> > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --------------------------------------- @@ -600,19 +463,19 @@ By: Anthony Fu Repository: git+https://github.com/antfu/birpc.git > MIT License -> +> > Copyright (c) 2021 Anthony Fu -> +> > Permission is hereby granted, free of charge, to any person obtaining a copy > of this software and associated documentation files (the "Software"), to deal > in the Software without restriction, including without limitation the rights > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell > copies of the Software, and to permit persons to whom the Software is > furnished to do so, subject to the following conditions: -> +> > The above copyright notice and this permission notice shall be included in all > copies or substantial portions of the Software. -> +> > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -629,19 +492,19 @@ By: Jon Schlinkert, Brian Woodward, Elan Shanker, Eugene Sharygin, hemanth.hm Repository: micromatch/braces > The MIT License (MIT) -> +> > Copyright (c) 2014-2018, Jon Schlinkert. -> +> > Permission is hereby granted, free of charge, to any person obtaining a copy > of this software and associated documentation files (the "Software"), to deal > in the Software without restriction, including without limitation the rights > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell > copies of the Software, and to permit persons to whom the Software is > furnished to do so, subject to the following conditions: -> +> > The above copyright notice and this permission notice shall be included in > all copies or substantial portions of the Software. -> +> > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -658,19 +521,19 @@ By: Andrii Shumada, Robert Herhold Repository: https://github.com/debitoor/chai-subset.git > The MIT License (MIT) -> -> Copyright (c) 2014 -> +> +> Copyright (c) 2014 +> > Permission is hereby granted, free of charge, to any person obtaining a copy > of this software and associated documentation files (the "Software"), to deal > in the Software without restriction, including without limitation the rights > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell > copies of the Software, and to permit persons to whom the Software is > furnished to do so, subject to the following conditions: -> +> > The above copyright notice and this permission notice shall be included in all > copies or substantial portions of the Software. -> +> > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -687,13 +550,13 @@ By: Sindre Sorhus Repository: sindresorhus/cli-cursor > MIT License -> +> > Copyright (c) Sindre Sorhus (https://sindresorhus.com) -> +> > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -> +> > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -> +> > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --------------------------------------- @@ -704,13 +567,13 @@ By: Sindre Sorhus Repository: sindresorhus/cli-truncate > MIT License -> +> > Copyright (c) Sindre Sorhus (https://sindresorhus.com) -> +> > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -> +> > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -> +> > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --------------------------------------- @@ -721,19 +584,19 @@ By: André Cruz Repository: git@github.com:moxystudio/node-cross-spawn.git > The MIT License (MIT) -> +> > Copyright (c) 2018 Made With MOXY Lda -> +> > Permission is hereby granted, free of charge, to any person obtaining a copy > of this software and associated documentation files (the "Software"), to deal > in the Software without restriction, including without limitation the rights > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell > copies of the Software, and to permit persons to whom the Software is > furnished to do so, subject to the following conditions: -> +> > The above copyright notice and this permission notice shall be included in > all copies or substantial portions of the Software. -> +> > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -757,7 +620,7 @@ By: Mathias Bynens Repository: https://github.com/mathiasbynens/emoji-regex.git > Copyright Mathias Bynens -> +> > Permission is hereby granted, free of charge, to any person obtaining > a copy of this software and associated documentation files (the > "Software"), to deal in the Software without restriction, including @@ -765,10 +628,10 @@ Repository: https://github.com/mathiasbynens/emoji-regex.git > distribute, sublicense, and/or sell copies of the Software, and to > permit persons to whom the Software is furnished to do so, subject to > the following conditions: -> +> > The above copyright notice and this permission notice shall be > included in all copies or substantial portions of the Software. -> +> > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, > EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF > MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND @@ -785,19 +648,19 @@ By: Ben Lesh Repository: git+https://github.com/benlesh/event-target-polyfill.git > MIT License -> +> > Copyright (c) 2020 Ben Lesh -> +> > Permission is hereby granted, free of charge, to any person obtaining a copy > of this software and associated documentation files (the "Software"), to deal > in the Software without restriction, including without limitation the rights > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell > copies of the Software, and to permit persons to whom the Software is > furnished to do so, subject to the following conditions: -> +> > The above copyright notice and this permission notice shall be included in all > copies or substantial portions of the Software. -> +> > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -814,13 +677,13 @@ By: Sindre Sorhus Repository: sindresorhus/execa > MIT License -> +> > Copyright (c) Sindre Sorhus (https://sindresorhus.com) -> +> > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -> +> > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -> +> > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --------------------------------------- @@ -832,17 +695,17 @@ Repository: https://github.com/mmkal/expect-type.git > Apache License > Version 2.0, January 2004 > http://www.apache.org/licenses/ -> +> > TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION -> +> > 1. Definitions. -> +> > "License" shall mean the terms and conditions for use, reproduction, > and distribution as defined by Sections 1 through 9 of this document. -> +> > "Licensor" shall mean the copyright owner or entity authorized by > the copyright owner that is granting the License. -> +> > "Legal Entity" shall mean the union of the acting entity and all > other entities that control, are controlled by, or are under common > control with that entity. For the purposes of this definition, @@ -850,24 +713,24 @@ Repository: https://github.com/mmkal/expect-type.git > direction or management of such entity, whether by contract or > otherwise, or (ii) ownership of fifty percent (50%) or more of the > outstanding shares, or (iii) beneficial ownership of such entity. -> +> > "You" (or "Your") shall mean an individual or Legal Entity > exercising permissions granted by this License. -> +> > "Source" form shall mean the preferred form for making modifications, > including but not limited to software source code, documentation > source, and configuration files. -> +> > "Object" form shall mean any form resulting from mechanical > transformation or translation of a Source form, including but > not limited to compiled object code, generated documentation, > and conversions to other media types. -> +> > "Work" shall mean the work of authorship, whether in Source or > Object form, made available under the License, as indicated by a > copyright notice that is included in or attached to the work > (an example is provided in the Appendix below). -> +> > "Derivative Works" shall mean any work, whether in Source or Object > form, that is based on (or derived from) the Work and for which the > editorial revisions, annotations, elaborations, or other modifications @@ -875,7 +738,7 @@ Repository: https://github.com/mmkal/expect-type.git > of this License, Derivative Works shall not include works that remain > separable from, or merely link (or bind by name) to the interfaces of, > the Work and Derivative Works thereof. -> +> > "Contribution" shall mean any work of authorship, including > the original version of the Work and any modifications or additions > to that Work or Derivative Works thereof, that is intentionally @@ -889,18 +752,18 @@ Repository: https://github.com/mmkal/expect-type.git > Licensor for the purpose of discussing and improving the Work, but > excluding communication that is conspicuously marked or otherwise > designated in writing by the copyright owner as "Not a Contribution." -> +> > "Contributor" shall mean Licensor and any individual or Legal Entity > on behalf of whom a Contribution has been received by Licensor and > subsequently incorporated within the Work. -> +> > 2. Grant of Copyright License. Subject to the terms and conditions of > this License, each Contributor hereby grants to You a perpetual, > worldwide, non-exclusive, no-charge, royalty-free, irrevocable > copyright license to reproduce, prepare Derivative Works of, > publicly display, publicly perform, sublicense, and distribute the > Work and such Derivative Works in Source or Object form. -> +> > 3. Grant of Patent License. Subject to the terms and conditions of > this License, each Contributor hereby grants to You a perpetual, > worldwide, non-exclusive, no-charge, royalty-free, irrevocable @@ -916,24 +779,24 @@ Repository: https://github.com/mmkal/expect-type.git > or contributory patent infringement, then any patent licenses > granted to You under this License for that Work shall terminate > as of the date such litigation is filed. -> +> > 4. Redistribution. You may reproduce and distribute copies of the > Work or Derivative Works thereof in any medium, with or without > modifications, and in Source or Object form, provided that You > meet the following conditions: -> +> > (a) You must give any other recipients of the Work or > Derivative Works a copy of this License; and -> +> > (b) You must cause any modified files to carry prominent notices > stating that You changed the files; and -> +> > (c) You must retain, in the Source form of any Derivative Works > that You distribute, all copyright, patent, trademark, and > attribution notices from the Source form of the Work, > excluding those notices that do not pertain to any part of > the Derivative Works; and -> +> > (d) If the Work includes a "NOTICE" text file as part of its > distribution, then any Derivative Works that You distribute must > include a readable copy of the attribution notices contained @@ -950,14 +813,14 @@ Repository: https://github.com/mmkal/expect-type.git > or as an addendum to the NOTICE text from the Work, provided > that such additional attribution notices cannot be construed > as modifying the License. -> +> > You may add Your own copyright statement to Your modifications and > may provide additional or different license terms and conditions > for use, reproduction, or distribution of Your modifications, or > for any such Derivative Works as a whole, provided Your use, > reproduction, and distribution of the Work otherwise complies with > the conditions stated in this License. -> +> > 5. Submission of Contributions. Unless You explicitly state otherwise, > any Contribution intentionally submitted for inclusion in the Work > by You to the Licensor shall be under the terms and conditions of @@ -965,12 +828,12 @@ Repository: https://github.com/mmkal/expect-type.git > Notwithstanding the above, nothing herein shall supersede or modify > the terms of any separate license agreement you may have executed > with Licensor regarding such Contributions. -> +> > 6. Trademarks. This License does not grant permission to use the trade > names, trademarks, service marks, or product names of the Licensor, > except as required for reasonable and customary use in describing the > origin of the Work and reproducing the content of the NOTICE file. -> +> > 7. Disclaimer of Warranty. Unless required by applicable law or > agreed to in writing, Licensor provides the Work (and each > Contributor provides its Contributions) on an "AS IS" BASIS, @@ -980,7 +843,7 @@ Repository: https://github.com/mmkal/expect-type.git > PARTICULAR PURPOSE. You are solely responsible for determining the > appropriateness of using or redistributing the Work and assume any > risks associated with Your exercise of permissions under this License. -> +> > 8. Limitation of Liability. In no event and under no legal theory, > whether in tort (including negligence), contract, or otherwise, > unless required by applicable law (such as deliberate and grossly @@ -992,7 +855,7 @@ Repository: https://github.com/mmkal/expect-type.git > work stoppage, computer failure or malfunction, or any and all > other commercial damages or losses), even if such Contributor > has been advised of the possibility of such damages. -> +> > 9. Accepting Warranty or Additional Liability. While redistributing > the Work or Derivative Works thereof, You may choose to offer, > and charge a fee for, acceptance of support, warranty, indemnity, @@ -1003,11 +866,11 @@ Repository: https://github.com/mmkal/expect-type.git > defend, and hold each Contributor harmless for any liability > incurred by, or claims asserted against, such Contributor by reason > of your accepting any such warranty or additional liability. -> +> > END OF TERMS AND CONDITIONS -> +> > APPENDIX: How to apply the Apache License to your work. -> +> > To apply the Apache License to your work, attach the following > boilerplate notice, with the fields enclosed by brackets "[]" > replaced with your own identifying information. (Don't include @@ -1016,15 +879,15 @@ Repository: https://github.com/mmkal/expect-type.git > file or class name and description of purpose be included on the > same "printed page" as the copyright notice for easier > identification within third-party archives. -> +> > Copyright [yyyy] [name of copyright owner] -> +> > Licensed under the Apache License, Version 2.0 (the "License"); > you may not use this file except in compliance with the License. > You may obtain a copy of the License at -> +> > http://www.apache.org/licenses/LICENSE-2.0 -> +> > Unless required by applicable law or agreed to in writing, software > distributed under the License is distributed on an "AS IS" BASIS, > WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -1039,19 +902,19 @@ By: Denis Malinochkin Repository: mrmlnc/fast-glob > The MIT License (MIT) -> +> > Copyright (c) Denis Malinochkin -> +> > Permission is hereby granted, free of charge, to any person obtaining a copy > of this software and associated documentation files (the "Software"), to deal > in the Software without restriction, including without limitation the rights > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell > copies of the Software, and to permit persons to whom the Software is > furnished to do so, subject to the following conditions: -> +> > The above copyright notice and this permission notice shall be included in all > copies or substantial portions of the Software. -> +> > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -1068,11 +931,11 @@ By: Matteo Collina Repository: git+https://github.com/mcollina/fastq.git > Copyright (c) 2015-2020, Matteo Collina -> +> > Permission to use, copy, modify, and/or distribute this software for any > purpose with or without fee is hereby granted, provided that the above > copyright notice and this permission notice appear in all copies. -> +> > THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES > WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF > MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR @@ -1089,19 +952,19 @@ By: Jon Schlinkert, Edo Rivai, Paul Miller, Rouven Weßling Repository: jonschlinkert/fill-range > The MIT License (MIT) -> +> > Copyright (c) 2014-present, Jon Schlinkert. -> +> > Permission is hereby granted, free of charge, to any person obtaining a copy > of this software and associated documentation files (the "Software"), to deal > in the Software without restriction, including without limitation the rights > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell > copies of the Software, and to permit persons to whom the Software is > furnished to do so, subject to the following conditions: -> +> > The above copyright notice and this permission notice shall be included in > all copies or substantial portions of the Software. -> +> > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -1118,13 +981,13 @@ By: Sindre Sorhus Repository: sindresorhus/find-up > MIT License -> +> > Copyright (c) Sindre Sorhus (https://sindresorhus.com) -> +> > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -> +> > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -> +> > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --------------------------------------- @@ -1135,13 +998,13 @@ By: Andrea Giammarchi Repository: git+https://github.com/WebReflection/flatted.git > ISC License -> +> > Copyright (c) 2018-2020, Andrea Giammarchi, @WebReflection -> +> > Permission to use, copy, modify, and/or distribute this software for any > purpose with or without fee is hereby granted, provided that the above > copyright notice and this permission notice appear in all copies. -> +> > THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH > REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY > AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, @@ -1158,13 +1021,13 @@ By: Sindre Sorhus Repository: sindresorhus/get-stream > MIT License -> +> > Copyright (c) Sindre Sorhus (https://sindresorhus.com) -> +> > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -> +> > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -> +> > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --------------------------------------- @@ -1175,19 +1038,19 @@ By: Hiroki Osame Repository: privatenumber/get-tsconfig > MIT License -> +> > Copyright (c) Hiroki Osame -> +> > Permission is hereby granted, free of charge, to any person obtaining a copy > of this software and associated documentation files (the "Software"), to deal > in the Software without restriction, including without limitation the rights > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell > copies of the Software, and to permit persons to whom the Software is > furnished to do so, subject to the following conditions: -> +> > The above copyright notice and this permission notice shall be included in all > copies or substantial portions of the Software. -> +> > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -1204,13 +1067,13 @@ By: Gulp Team, Elan Shanker, Blaine Bublitz Repository: gulpjs/glob-parent > The ISC License -> +> > Copyright (c) 2015, 2019 Elan Shanker -> +> > Permission to use, copy, modify, and/or distribute this software for any > purpose with or without fee is hereby granted, provided that the above > copyright notice and this permission notice appear in all copies. -> +> > THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES > WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF > MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR @@ -1229,17 +1092,17 @@ Repository: ehmicky/human-signals > Apache License > Version 2.0, January 2004 > http://www.apache.org/licenses/ -> +> > TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION -> +> > 1. Definitions. -> +> > "License" shall mean the terms and conditions for use, reproduction, > and distribution as defined by Sections 1 through 9 of this document. -> +> > "Licensor" shall mean the copyright owner or entity authorized by > the copyright owner that is granting the License. -> +> > "Legal Entity" shall mean the union of the acting entity and all > other entities that control, are controlled by, or are under common > control with that entity. For the purposes of this definition, @@ -1247,24 +1110,24 @@ Repository: ehmicky/human-signals > direction or management of such entity, whether by contract or > otherwise, or (ii) ownership of fifty percent (50%) or more of the > outstanding shares, or (iii) beneficial ownership of such entity. -> +> > "You" (or "Your") shall mean an individual or Legal Entity > exercising permissions granted by this License. -> +> > "Source" form shall mean the preferred form for making modifications, > including but not limited to software source code, documentation > source, and configuration files. -> +> > "Object" form shall mean any form resulting from mechanical > transformation or translation of a Source form, including but > not limited to compiled object code, generated documentation, > and conversions to other media types. -> +> > "Work" shall mean the work of authorship, whether in Source or > Object form, made available under the License, as indicated by a > copyright notice that is included in or attached to the work > (an example is provided in the Appendix below). -> +> > "Derivative Works" shall mean any work, whether in Source or Object > form, that is based on (or derived from) the Work and for which the > editorial revisions, annotations, elaborations, or other modifications @@ -1272,7 +1135,7 @@ Repository: ehmicky/human-signals > of this License, Derivative Works shall not include works that remain > separable from, or merely link (or bind by name) to the interfaces of, > the Work and Derivative Works thereof. -> +> > "Contribution" shall mean any work of authorship, including > the original version of the Work and any modifications or additions > to that Work or Derivative Works thereof, that is intentionally @@ -1286,18 +1149,18 @@ Repository: ehmicky/human-signals > Licensor for the purpose of discussing and improving the Work, but > excluding communication that is conspicuously marked or otherwise > designated in writing by the copyright owner as "Not a Contribution." -> +> > "Contributor" shall mean Licensor and any individual or Legal Entity > on behalf of whom a Contribution has been received by Licensor and > subsequently incorporated within the Work. -> +> > 2. Grant of Copyright License. Subject to the terms and conditions of > this License, each Contributor hereby grants to You a perpetual, > worldwide, non-exclusive, no-charge, royalty-free, irrevocable > copyright license to reproduce, prepare Derivative Works of, > publicly display, publicly perform, sublicense, and distribute the > Work and such Derivative Works in Source or Object form. -> +> > 3. Grant of Patent License. Subject to the terms and conditions of > this License, each Contributor hereby grants to You a perpetual, > worldwide, non-exclusive, no-charge, royalty-free, irrevocable @@ -1313,24 +1176,24 @@ Repository: ehmicky/human-signals > or contributory patent infringement, then any patent licenses > granted to You under this License for that Work shall terminate > as of the date such litigation is filed. -> +> > 4. Redistribution. You may reproduce and distribute copies of the > Work or Derivative Works thereof in any medium, with or without > modifications, and in Source or Object form, provided that You > meet the following conditions: -> +> > (a) You must give any other recipients of the Work or > Derivative Works a copy of this License; and -> +> > (b) You must cause any modified files to carry prominent notices > stating that You changed the files; and -> +> > (c) You must retain, in the Source form of any Derivative Works > that You distribute, all copyright, patent, trademark, and > attribution notices from the Source form of the Work, > excluding those notices that do not pertain to any part of > the Derivative Works; and -> +> > (d) If the Work includes a "NOTICE" text file as part of its > distribution, then any Derivative Works that You distribute must > include a readable copy of the attribution notices contained @@ -1347,14 +1210,14 @@ Repository: ehmicky/human-signals > or as an addendum to the NOTICE text from the Work, provided > that such additional attribution notices cannot be construed > as modifying the License. -> +> > You may add Your own copyright statement to Your modifications and > may provide additional or different license terms and conditions > for use, reproduction, or distribution of Your modifications, or > for any such Derivative Works as a whole, provided Your use, > reproduction, and distribution of the Work otherwise complies with > the conditions stated in this License. -> +> > 5. Submission of Contributions. Unless You explicitly state otherwise, > any Contribution intentionally submitted for inclusion in the Work > by You to the Licensor shall be under the terms and conditions of @@ -1362,12 +1225,12 @@ Repository: ehmicky/human-signals > Notwithstanding the above, nothing herein shall supersede or modify > the terms of any separate license agreement you may have executed > with Licensor regarding such Contributions. -> +> > 6. Trademarks. This License does not grant permission to use the trade > names, trademarks, service marks, or product names of the Licensor, > except as required for reasonable and customary use in describing the > origin of the Work and reproducing the content of the NOTICE file. -> +> > 7. Disclaimer of Warranty. Unless required by applicable law or > agreed to in writing, Licensor provides the Work (and each > Contributor provides its Contributions) on an "AS IS" BASIS, @@ -1377,7 +1240,7 @@ Repository: ehmicky/human-signals > PARTICULAR PURPOSE. You are solely responsible for determining the > appropriateness of using or redistributing the Work and assume any > risks associated with Your exercise of permissions under this License. -> +> > 8. Limitation of Liability. In no event and under no legal theory, > whether in tort (including negligence), contract, or otherwise, > unless required by applicable law (such as deliberate and grossly @@ -1389,7 +1252,7 @@ Repository: ehmicky/human-signals > work stoppage, computer failure or malfunction, or any and all > other commercial damages or losses), even if such Contributor > has been advised of the possibility of such damages. -> +> > 9. Accepting Warranty or Additional Liability. While redistributing > the Work or Derivative Works thereof, You may choose to offer, > and charge a fee for, acceptance of support, warranty, indemnity, @@ -1400,11 +1263,11 @@ Repository: ehmicky/human-signals > defend, and hold each Contributor harmless for any liability > incurred by, or claims asserted against, such Contributor by reason > of your accepting any such warranty or additional liability. -> +> > END OF TERMS AND CONDITIONS -> +> > APPENDIX: How to apply the Apache License to your work. -> +> > To apply the Apache License to your work, attach the following > boilerplate notice, with the fields enclosed by brackets "[]" > replaced with your own identifying information. (Don't include @@ -1413,15 +1276,15 @@ Repository: ehmicky/human-signals > file or class name and description of purpose be included on the > same "printed page" as the copyright notice for easier > identification within third-party archives. -> +> > Copyright 2022 ehmicky -> +> > Licensed under the Apache License, Version 2.0 (the "License"); > you may not use this file except in compliance with the License. > You may obtain a copy of the License at -> +> > http://www.apache.org/licenses/LICENSE-2.0 -> +> > Unless required by applicable law or agreed to in writing, software > distributed under the License is distributed on an "AS IS" BASIS, > WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -1436,19 +1299,19 @@ By: Jon Schlinkert Repository: jonschlinkert/is-extglob > The MIT License (MIT) -> +> > Copyright (c) 2014-2016, Jon Schlinkert -> +> > Permission is hereby granted, free of charge, to any person obtaining a copy > of this software and associated documentation files (the "Software"), to deal > in the Software without restriction, including without limitation the rights > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell > copies of the Software, and to permit persons to whom the Software is > furnished to do so, subject to the following conditions: -> +> > The above copyright notice and this permission notice shall be included in > all copies or substantial portions of the Software. -> +> > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -1465,13 +1328,13 @@ By: Sindre Sorhus Repository: sindresorhus/is-fullwidth-code-point > MIT License -> +> > Copyright (c) Sindre Sorhus (https://sindresorhus.com) -> +> > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -> +> > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -> +> > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --------------------------------------- @@ -1482,19 +1345,19 @@ By: Jon Schlinkert, Brian Woodward, Daniel Perez Repository: micromatch/is-glob > The MIT License (MIT) -> +> > Copyright (c) 2014-2017, Jon Schlinkert. -> +> > Permission is hereby granted, free of charge, to any person obtaining a copy > of this software and associated documentation files (the "Software"), to deal > in the Software without restriction, including without limitation the rights > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell > copies of the Software, and to permit persons to whom the Software is > furnished to do so, subject to the following conditions: -> +> > The above copyright notice and this permission notice shall be included in > all copies or substantial portions of the Software. -> +> > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -1511,19 +1374,19 @@ By: Jon Schlinkert, Olsten Larck, Rouven Weßling Repository: jonschlinkert/is-number > The MIT License (MIT) -> +> > Copyright (c) 2014-present, Jon Schlinkert. -> +> > Permission is hereby granted, free of charge, to any person obtaining a copy > of this software and associated documentation files (the "Software"), to deal > in the Software without restriction, including without limitation the rights > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell > copies of the Software, and to permit persons to whom the Software is > furnished to do so, subject to the following conditions: -> +> > The above copyright notice and this permission notice shall be included in > all copies or substantial portions of the Software. -> +> > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -1540,13 +1403,13 @@ By: Sindre Sorhus Repository: sindresorhus/is-stream > MIT License -> +> > Copyright (c) Sindre Sorhus (https://sindresorhus.com) -> +> > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -> +> > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -> +> > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --------------------------------------- @@ -1557,13 +1420,13 @@ By: Isaac Z. Schlueter Repository: git+https://github.com/isaacs/isexe.git > The ISC License -> +> > Copyright (c) Isaac Z. Schlueter and Contributors -> +> > Permission to use, copy, modify, and/or distribute this software for any > purpose with or without fee is hereby granted, provided that the above > copyright notice and this permission notice appear in all copies. -> +> > THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES > WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF > MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR @@ -1580,19 +1443,19 @@ By: Luke Edwards Repository: lukeed/kleur > The MIT License (MIT) -> +> > Copyright (c) Luke Edwards (lukeed.com) -> +> > Permission is hereby granted, free of charge, to any person obtaining a copy > of this software and associated documentation files (the "Software"), to deal > in the Software without restriction, including without limitation the rights > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell > copies of the Software, and to permit persons to whom the Software is > furnished to do so, subject to the following conditions: -> +> > The above copyright notice and this permission notice shall be included in > all copies or substantial portions of the Software. -> +> > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -1609,13 +1472,13 @@ By: Sindre Sorhus Repository: sindresorhus/locate-path > MIT License -> +> > Copyright (c) Sindre Sorhus (https://sindresorhus.com) -> +> > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -> +> > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -> +> > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --------------------------------------- @@ -1626,28 +1489,13 @@ By: Sindre Sorhus Repository: sindresorhus/log-update > MIT License -> +> > Copyright (c) Sindre Sorhus (https://sindresorhus.com) -> -> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -> -> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -> -> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ---------------------------------------- - -## magic-string -License: MIT -By: Rich Harris -Repository: https://github.com/rich-harris/magic-string - -> Copyright 2018 Rich Harris -> +> > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -> +> > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -> +> > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --------------------------------------- @@ -1658,19 +1506,19 @@ By: Stephen Sugden Repository: grncdr/merge-stream > The MIT License (MIT) -> +> > Copyright (c) Stephen Sugden (stephensugden.com) -> +> > Permission is hereby granted, free of charge, to any person obtaining a copy > of this software and associated documentation files (the "Software"), to deal > in the Software without restriction, including without limitation the rights > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell > copies of the Software, and to permit persons to whom the Software is > furnished to do so, subject to the following conditions: -> +> > The above copyright notice and this permission notice shall be included in > all copies or substantial portions of the Software. -> +> > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -1686,19 +1534,19 @@ License: MIT Repository: git@github.com:teambition/merge2.git > The MIT License (MIT) -> +> > Copyright (c) 2014-2020 Teambition -> +> > Permission is hereby granted, free of charge, to any person obtaining a copy > of this software and associated documentation files (the "Software"), to deal > in the Software without restriction, including without limitation the rights > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell > copies of the Software, and to permit persons to whom the Software is > furnished to do so, subject to the following conditions: -> +> > The above copyright notice and this permission notice shall be included in all > copies or substantial portions of the Software. -> +> > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -1715,19 +1563,19 @@ By: Jon Schlinkert, Amila Welihinda, Bogdan Chadkin, Brian Woodward, Devon Govet Repository: micromatch/micromatch > The MIT License (MIT) -> +> > Copyright (c) 2014-present, Jon Schlinkert. -> +> > Permission is hereby granted, free of charge, to any person obtaining a copy > of this software and associated documentation files (the "Software"), to deal > in the Software without restriction, including without limitation the rights > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell > copies of the Software, and to permit persons to whom the Software is > furnished to do so, subject to the following conditions: -> +> > The above copyright notice and this permission notice shall be included in > all copies or substantial portions of the Software. -> +> > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -1744,13 +1592,13 @@ By: Sindre Sorhus Repository: sindresorhus/mimic-fn > MIT License -> +> > Copyright (c) Sindre Sorhus (sindresorhus.com) -> +> > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -> +> > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -> +> > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --------------------------------------- @@ -1760,19 +1608,19 @@ License: MIT Repository: unjs/mlly > MIT License -> +> > Copyright (c) Pooya Parsa -> +> > Permission is hereby granted, free of charge, to any person obtaining a copy > of this software and associated documentation files (the "Software"), to deal > in the Software without restriction, including without limitation the rights > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell > copies of the Software, and to permit persons to whom the Software is > furnished to do so, subject to the following conditions: -> +> > The above copyright notice and this permission notice shall be included in all > copies or substantial portions of the Software. -> +> > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -1783,26 +1631,19 @@ Repository: unjs/mlly --------------------------------------- -## natural-compare -License: MIT -By: Lauri Rooden -Repository: git://github.com/litejs/natural-compare-lite.git - ---------------------------------------- - ## npm-run-path License: MIT By: Sindre Sorhus Repository: sindresorhus/npm-run-path > MIT License -> +> > Copyright (c) Sindre Sorhus (https://sindresorhus.com) -> +> > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -> +> > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -> +> > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --------------------------------------- @@ -1813,13 +1654,13 @@ By: Sindre Sorhus Repository: sindresorhus/onetime > MIT License -> +> > Copyright (c) Sindre Sorhus (https://sindresorhus.com) -> +> > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -> +> > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -> +> > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --------------------------------------- @@ -1830,13 +1671,13 @@ By: Sindre Sorhus Repository: sindresorhus/p-limit > MIT License -> +> > Copyright (c) Sindre Sorhus (https://sindresorhus.com) -> +> > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -> +> > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -> +> > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --------------------------------------- @@ -1847,13 +1688,13 @@ By: Sindre Sorhus Repository: sindresorhus/p-locate > MIT License -> +> > Copyright (c) Sindre Sorhus (https://sindresorhus.com) -> +> > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -> +> > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -> +> > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --------------------------------------- @@ -1864,13 +1705,13 @@ By: Sindre Sorhus Repository: sindresorhus/path-exists > MIT License -> +> > Copyright (c) Sindre Sorhus (sindresorhus.com) -> +> > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -> +> > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -> +> > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --------------------------------------- @@ -1881,13 +1722,13 @@ By: Sindre Sorhus Repository: sindresorhus/path-key > MIT License -> +> > Copyright (c) Sindre Sorhus (sindresorhus.com) -> +> > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -> +> > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -> +> > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --------------------------------------- @@ -1898,19 +1739,19 @@ By: Jon Schlinkert Repository: micromatch/picomatch > The MIT License (MIT) -> +> > Copyright (c) 2017-present, Jon Schlinkert. -> +> > Permission is hereby granted, free of charge, to any person obtaining a copy > of this software and associated documentation files (the "Software"), to deal > in the Software without restriction, including without limitation the rights > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell > copies of the Software, and to permit persons to whom the Software is > furnished to do so, subject to the following conditions: -> +> > The above copyright notice and this permission notice shall be included in > all copies or substantial portions of the Software. -> +> > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -1921,54 +1762,25 @@ Repository: micromatch/picomatch --------------------------------------- -## pretty-format -License: MIT -By: James Kyle -Repository: https://github.com/facebook/jest.git - -> MIT License -> -> Copyright (c) Facebook, Inc. and its affiliates. -> -> Permission is hereby granted, free of charge, to any person obtaining a copy -> of this software and associated documentation files (the "Software"), to deal -> in the Software without restriction, including without limitation the rights -> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -> copies of the Software, and to permit persons to whom the Software is -> furnished to do so, subject to the following conditions: -> -> The above copyright notice and this permission notice shall be included in all -> copies or substantial portions of the Software. -> -> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -> SOFTWARE. - ---------------------------------------- - ## prompts License: MIT By: Terkel Gjervig Repository: terkelg/prompts > MIT License -> +> > Copyright (c) 2018 Terkel Gjervig Nielsen -> +> > Permission is hereby granted, free of charge, to any person obtaining a copy > of this software and associated documentation files (the "Software"), to deal > in the Software without restriction, including without limitation the rights > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell > copies of the Software, and to permit persons to whom the Software is > furnished to do so, subject to the following conditions: -> +> > The above copyright notice and this permission notice shall be included in all > copies or substantial portions of the Software. -> +> > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -1985,19 +1797,19 @@ By: Feross Aboukhadijeh Repository: git://github.com/feross/queue-microtask.git > The MIT License (MIT) -> +> > Copyright (c) Feross Aboukhadijeh -> +> > Permission is hereby granted, free of charge, to any person obtaining a copy of > this software and associated documentation files (the "Software"), to deal in > the Software without restriction, including without limitation the rights to > use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of > the Software, and to permit persons to whom the Software is furnished to do so, > subject to the following conditions: -> +> > The above copyright notice and this permission notice shall be included in all > copies or substantial portions of the Software. -> +> > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS > FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR @@ -2007,47 +1819,19 @@ Repository: git://github.com/feross/queue-microtask.git --------------------------------------- -## react-is -License: MIT -Repository: https://github.com/facebook/react.git - -> MIT License -> -> Copyright (c) Facebook, Inc. and its affiliates. -> -> Permission is hereby granted, free of charge, to any person obtaining a copy -> of this software and associated documentation files (the "Software"), to deal -> in the Software without restriction, including without limitation the rights -> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -> copies of the Software, and to permit persons to whom the Software is -> furnished to do so, subject to the following conditions: -> -> The above copyright notice and this permission notice shall be included in all -> copies or substantial portions of the Software. -> -> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -> SOFTWARE. - ---------------------------------------- - ## restore-cursor License: MIT By: Sindre Sorhus Repository: sindresorhus/restore-cursor > MIT License -> +> > Copyright (c) Sindre Sorhus (https://sindresorhus.com) -> +> > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -> +> > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -> +> > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --------------------------------------- @@ -2058,19 +1842,19 @@ By: Matteo Collina Repository: git+https://github.com/mcollina/reusify.git > The MIT License (MIT) -> +> > Copyright (c) 2015 Matteo Collina -> +> > Permission is hereby granted, free of charge, to any person obtaining a copy > of this software and associated documentation files (the "Software"), to deal > in the Software without restriction, including without limitation the rights > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell > copies of the Software, and to permit persons to whom the Software is > furnished to do so, subject to the following conditions: -> +> > The above copyright notice and this permission notice shall be included in all > copies or substantial portions of the Software. -> +> > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -2087,19 +1871,19 @@ By: Feross Aboukhadijeh Repository: git://github.com/feross/run-parallel.git > The MIT License (MIT) -> +> > Copyright (c) Feross Aboukhadijeh -> +> > Permission is hereby granted, free of charge, to any person obtaining a copy of > this software and associated documentation files (the "Software"), to deal in > the Software without restriction, including without limitation the rights to > use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of > the Software, and to permit persons to whom the Software is furnished to do so, > subject to the following conditions: -> +> > The above copyright notice and this permission notice shall be included in all > copies or substantial portions of the Software. -> +> > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS > FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR @@ -2115,13 +1899,13 @@ By: Kevin Mårtensson Repository: kevva/shebang-command > MIT License -> +> > Copyright (c) Kevin Mårtensson (github.com/kevva) -> +> > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -> +> > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -> +> > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --------------------------------------- @@ -2132,13 +1916,13 @@ By: Sindre Sorhus Repository: sindresorhus/shebang-regex > MIT License -> +> > Copyright (c) Sindre Sorhus (sindresorhus.com) -> +> > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -> +> > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -> +> > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --------------------------------------- @@ -2149,14 +1933,14 @@ By: Ben Coe Repository: https://github.com/tapjs/signal-exit.git > The ISC License -> +> > Copyright (c) 2015, Contributors -> +> > Permission to use, copy, modify, and/or distribute this software > for any purpose with or without fee is hereby granted, provided > that the above copyright notice and this permission notice > appear in all copies. -> +> > THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES > WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES > OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE @@ -2173,19 +1957,19 @@ By: Terkel Gjervig Repository: https://github.com/terkelg/sisteransi > MIT License -> +> > Copyright (c) 2018 Terkel Gjervig Nielsen -> +> > Permission is hereby granted, free of charge, to any person obtaining a copy > of this software and associated documentation files (the "Software"), to deal > in the Software without restriction, including without limitation the rights > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell > copies of the Software, and to permit persons to whom the Software is > furnished to do so, subject to the following conditions: -> +> > The above copyright notice and this permission notice shall be included in all > copies or substantial portions of the Software. -> +> > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -2201,14 +1985,14 @@ License: MIT Repository: chalk/slice-ansi > MIT License -> +> > Copyright (c) DC > Copyright (c) Sindre Sorhus (https://sindresorhus.com) -> +> > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -> +> > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -> +> > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --------------------------------------- @@ -2219,13 +2003,13 @@ By: Sindre Sorhus Repository: sindresorhus/string-width > MIT License -> +> > Copyright (c) Sindre Sorhus (https://sindresorhus.com) -> +> > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -> +> > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -> +> > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --------------------------------------- @@ -2236,13 +2020,13 @@ By: Sindre Sorhus Repository: chalk/strip-ansi > MIT License -> +> > Copyright (c) Sindre Sorhus (https://sindresorhus.com) -> +> > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -> +> > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -> +> > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --------------------------------------- @@ -2253,13 +2037,13 @@ By: Sindre Sorhus Repository: sindresorhus/strip-final-newline > MIT License -> +> > Copyright (c) Sindre Sorhus (https://sindresorhus.com) -> +> > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -> +> > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -> +> > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --------------------------------------- @@ -2270,19 +2054,19 @@ By: Jon Schlinkert, Rouven Weßling Repository: micromatch/to-regex-range > The MIT License (MIT) -> +> > Copyright (c) 2015-present, Jon Schlinkert. -> +> > Permission is hereby granted, free of charge, to any person obtaining a copy > of this software and associated documentation files (the "Software"), to deal > in the Software without restriction, including without limitation the rights > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell > copies of the Software, and to permit persons to whom the Software is > furnished to do so, subject to the following conditions: -> +> > The above copyright notice and this permission notice shall be included in > all copies or substantial portions of the Software. -> +> > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -2299,17 +2083,17 @@ By: Jake Luer, Keith Cirkel, David Losert, Aleksey Shvayka, Lucas Fernandes da C Repository: git+ssh://git@github.com/chaijs/type-detect.git > Copyright (c) 2013 Jake Luer (http://alogicalparadox.com) -> +> > Permission is hereby granted, free of charge, to any person obtaining a copy > of this software and associated documentation files (the "Software"), to deal > in the Software without restriction, including without limitation the rights > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell > copies of the Software, and to permit persons to whom the Software is > furnished to do so, subject to the following conditions: -> +> > The above copyright notice and this permission notice shall be included in > all copies or substantial portions of the Software. -> +> > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -2326,13 +2110,13 @@ By: Isaac Z. Schlueter Repository: git://github.com/isaacs/node-which.git > The ISC License -> +> > Copyright (c) Isaac Z. Schlueter and Contributors -> +> > Permission to use, copy, modify, and/or distribute this software for any > purpose with or without fee is hereby granted, provided that the above > copyright notice and this permission notice appear in all copies. -> +> > THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES > WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF > MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR @@ -2349,13 +2133,13 @@ By: Sindre Sorhus Repository: chalk/wrap-ansi > MIT License -> +> > Copyright (c) Sindre Sorhus (https://sindresorhus.com) -> +> > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -> +> > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -> +> > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --------------------------------------- @@ -2368,17 +2152,17 @@ Repository: websockets/ws > Copyright (c) 2011 Einar Otto Stangvik > Copyright (c) 2013 Arnout Kazemier and contributors > Copyright (c) 2016 Luigi Pinca and contributors -> +> > Permission is hereby granted, free of charge, to any person obtaining a copy of > this software and associated documentation files (the "Software"), to deal in > the Software without restriction, including without limitation the rights to > use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of > the Software, and to permit persons to whom the Software is furnished to do so, > subject to the following conditions: -> +> > The above copyright notice and this permission notice shall be included in all > copies or substantial portions of the Software. -> +> > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS > FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR @@ -2394,11 +2178,11 @@ By: Sindre Sorhus Repository: sindresorhus/yocto-queue > MIT License -> +> > Copyright (c) Sindre Sorhus (https://sindresorhus.com) -> +> > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -> +> > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -> +> > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/packages/vitest/package.json b/packages/vitest/package.json index 975c1c88cb61..bbe89739306d 100644 --- a/packages/vitest/package.json +++ b/packages/vitest/package.json @@ -139,7 +139,7 @@ "@types/node": "*", "@vitest/expect": "workspace:*", "@vitest/runner": "workspace:*", - "@vitest/snapshot": "workspace:^0.29.3", + "@vitest/snapshot": "workspace:*", "@vitest/spy": "workspace:*", "@vitest/utils": "workspace:*", "acorn": "^8.8.1", diff --git a/packages/vitest/rollup.config.js b/packages/vitest/rollup.config.js index 6e01a51b9bfa..565b4ca9e4bb 100644 --- a/packages/vitest/rollup.config.js +++ b/packages/vitest/rollup.config.js @@ -61,6 +61,8 @@ const external = [ '@vitest/utils/diff', '@vitest/runner/utils', '@vitest/runner/types', + '@vitest/snapshot/environment', + '@vitest/snapshot/manager', ] const plugins = [ From 790c4a2f05b9ad28391defbbf303e7c760ac3ed4 Mon Sep 17 00:00:00 2001 From: Vladimir Date: Sun, 19 Mar 2023 15:44:23 +0100 Subject: [PATCH 04/15] chore: lockfile --- pnpm-lock.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 60ca1404626b..19680345e1db 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -868,7 +868,7 @@ importers: '@types/sinonjs__fake-timers': ^8.1.2 '@vitest/expect': workspace:* '@vitest/runner': workspace:* - '@vitest/snapshot': workspace:^0.29.3 + '@vitest/snapshot': workspace:* '@vitest/spy': workspace:* '@vitest/utils': workspace:* acorn: ^8.8.1 From b7770fd2362063d81ad87c7a3ffba3fa38618732 Mon Sep 17 00:00:00 2001 From: Vladimir Date: Sun, 19 Mar 2023 16:00:07 +0100 Subject: [PATCH 05/15] docs: snapshot readme --- packages/snapshot/README.md | 69 +++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 packages/snapshot/README.md diff --git a/packages/snapshot/README.md b/packages/snapshot/README.md new file mode 100644 index 000000000000..cf66b35f1492 --- /dev/null +++ b/packages/snapshot/README.md @@ -0,0 +1,69 @@ +# @vitest/snapshot + +Lightweight implementation of Jest's snapshots. + +## Usage + +```ts +import { SnapshotClient } from '@vitest/snapshot' +import { NodeSnapshotEnvironment } from '@vitest/snapshot/environment' +import { SnapshotManager } from '@vitest/snapshot/manager' + +export class CustomSnapshotClient extends SnapshotClient { + // by default, @vitest/snapshot checks equality with `!==` + // you need to provide your own equality check implementation + // this function is called when `.toMatchSnapshot({ property: 1 })` is called + equalityCheck(received: unknown, expected: unknown): boolean { + return equals(received, expected, [iterableEquality, subsetEquality]) + } +} + +const client = new CustomSnapshotClient() +// class that implements snapshot saving and reading +// by default uses fs module, but you can provide your own implementation depending on the environment +const environment = new NodeSnapshotEnvironment() + +const getCurrentFilepath = () => '/' +const getCurrentTestName = () => 'test1' + +const wrapper = (received: unknown) => { + // the name is important. it should be inside another function, so Vitest can find the actual test file where it was called + // you can override this behaviour in SnapshotState's `_inferInlineSnapshotStack` method by providing your own SnapshotState to SnapshotClient constructor + function __INLINE_SNAPSHOT__(inlineSnapshot?: string, message?: string) { + client.assert({ + received, + message, + isInline: true, + inlineSnapshot, + // you need to implement this yourselves, + // this depends on your runner + filepath: getCurrentFilepath(), + name: getCurrentTestName(), + }) + } + return { + toMatchInlineSnapshot: __INLINE_SNAPSHOT__, + } +} + +const options = { + updateSnapshot: 'none', + snapshotEnvironment: environment, +} + +await client.setTest(getCurrentFilepath(), getCurrentTestName(), options) + +wrapper('text 1').toMatchInlineSnapshot('text 1') +wrapper('text 2').toMatchInlineSnapshot('text 2') + +const result = await client.resetCurrent() // returns SnapshotResult + +// you can use manager to manage several clients +const manager = new SnapshotManager(options) +manager.add(result) + +// do something +// and then read the summary + +manager.summary +``` \ No newline at end of file From 8cb2d1789987f39b74a313bfd157d2d83ac832f8 Mon Sep 17 00:00:00 2001 From: Vladimir Date: Sun, 19 Mar 2023 16:00:23 +0100 Subject: [PATCH 06/15] feat: add servide CI to snapshot client --- packages/snapshot/src/client.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/snapshot/src/client.ts b/packages/snapshot/src/client.ts index 44b031c302f7..713589591013 100644 --- a/packages/snapshot/src/client.ts +++ b/packages/snapshot/src/client.ts @@ -43,6 +43,8 @@ export class SnapshotClient { snapshotState: SnapshotState | undefined snapshotStateMap = new Map() + constructor(private Service = SnapshotState) {} + async setTest(filepath: string, name: string, options: SnapshotStateOptions) { this.filepath = filepath this.name = name @@ -53,7 +55,7 @@ export class SnapshotClient { if (!this.getSnapshotState(filepath)) { this.snapshotStateMap.set( filepath, - await SnapshotState.create( + await this.Service.create( filepath, options, ), From 54933bc781c5d15b36d1f3d1fd7a4432fb479914 Mon Sep 17 00:00:00 2001 From: Vladimir Date: Sun, 19 Mar 2023 16:02:53 +0100 Subject: [PATCH 07/15] chore: cleanup --- packages/snapshot/README.md | 7 ++++--- packages/vitest/package.json | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/snapshot/README.md b/packages/snapshot/README.md index cf66b35f1492..ef5f88f625ab 100644 --- a/packages/snapshot/README.md +++ b/packages/snapshot/README.md @@ -53,8 +53,9 @@ const options = { await client.setTest(getCurrentFilepath(), getCurrentTestName(), options) -wrapper('text 1').toMatchInlineSnapshot('text 1') -wrapper('text 2').toMatchInlineSnapshot('text 2') +// uses pretty-format, so it requires quotes +wrapper('text 1').toMatchInlineSnapshot('"text 1"') +wrapper('text 2').toMatchInlineSnapshot('"text 2"') const result = await client.resetCurrent() // returns SnapshotResult @@ -65,5 +66,5 @@ manager.add(result) // do something // and then read the summary -manager.summary +console.log(manager.summary) ``` \ No newline at end of file diff --git a/packages/vitest/package.json b/packages/vitest/package.json index bbe89739306d..64b78603caa9 100644 --- a/packages/vitest/package.json +++ b/packages/vitest/package.json @@ -149,6 +149,7 @@ "concordance": "^5.0.4", "debug": "^4.3.4", "local-pkg": "^0.4.2", + "magic-string": "^0.27.0", "pathe": "^1.1.0", "picocolors": "^1.0.0", "source-map": "^0.6.1", From fcc541cd2e6374406e7e629666928e4a8e912194 Mon Sep 17 00:00:00 2001 From: Vladimir Date: Sun, 19 Mar 2023 16:19:10 +0100 Subject: [PATCH 08/15] chore: cleanup --- packages/snapshot/README.md | 3 ++- packages/vitest/src/runtime/runners/test.ts | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/snapshot/README.md b/packages/snapshot/README.md index ef5f88f625ab..17f44db9d9e5 100644 --- a/packages/snapshot/README.md +++ b/packages/snapshot/README.md @@ -54,10 +54,11 @@ const options = { await client.setTest(getCurrentFilepath(), getCurrentTestName(), options) // uses pretty-format, so it requires quotes +// also naming is hard coded when parsing test files wrapper('text 1').toMatchInlineSnapshot('"text 1"') wrapper('text 2').toMatchInlineSnapshot('"text 2"') -const result = await client.resetCurrent() // returns SnapshotResult +const result = await client.resetCurrent() // this saves files and returns SnapshotResult // you can use manager to manage several clients const manager = new SnapshotManager(options) diff --git a/packages/vitest/src/runtime/runners/test.ts b/packages/vitest/src/runtime/runners/test.ts index 6ba9e874daa9..1abcfce709ce 100644 --- a/packages/vitest/src/runtime/runners/test.ts +++ b/packages/vitest/src/runtime/runners/test.ts @@ -6,6 +6,7 @@ import { getFullName, getNames, getWorkerState } from '../../utils' import { createExpect } from '../../integrations/chai/index' import type { ResolvedConfig } from '../../types/config' import type { VitestExecutor } from '../execute' +import { rpc } from '../rpc' export class VitestTestRunner implements VitestRunner { private snapshotClient = getSnapshotClient() @@ -27,7 +28,7 @@ export class VitestTestRunner implements VitestRunner { async onAfterRun() { const result = await this.snapshotClient.resetCurrent() if (result) - await this.workerState.rpc.snapshotSaved(result) + await rpc().snapshotSaved(result) } onAfterRunSuite(suite: Suite) { From 63262cd52bed713d7235a035609d5eb6a3025bf9 Mon Sep 17 00:00:00 2001 From: Vladimir Date: Sun, 19 Mar 2023 21:35:16 +0100 Subject: [PATCH 09/15] chore: cleanup --- packages/snapshot/README.md | 24 ++++++++++++------------ packages/utils/src/source-map.ts | 6 ++++-- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/packages/snapshot/README.md b/packages/snapshot/README.md index 17f44db9d9e5..76fc9bf78671 100644 --- a/packages/snapshot/README.md +++ b/packages/snapshot/README.md @@ -4,7 +4,7 @@ Lightweight implementation of Jest's snapshots. ## Usage -```ts +```js import { SnapshotClient } from '@vitest/snapshot' import { NodeSnapshotEnvironment } from '@vitest/snapshot/environment' import { SnapshotManager } from '@vitest/snapshot/manager' @@ -13,7 +13,7 @@ export class CustomSnapshotClient extends SnapshotClient { // by default, @vitest/snapshot checks equality with `!==` // you need to provide your own equality check implementation // this function is called when `.toMatchSnapshot({ property: 1 })` is called - equalityCheck(received: unknown, expected: unknown): boolean { + equalityCheck(received, expected) { return equals(received, expected, [iterableEquality, subsetEquality]) } } @@ -23,13 +23,11 @@ const client = new CustomSnapshotClient() // by default uses fs module, but you can provide your own implementation depending on the environment const environment = new NodeSnapshotEnvironment() -const getCurrentFilepath = () => '/' +const getCurrentFilepath = () => '/file.spec.ts' const getCurrentTestName = () => 'test1' -const wrapper = (received: unknown) => { - // the name is important. it should be inside another function, so Vitest can find the actual test file where it was called - // you can override this behaviour in SnapshotState's `_inferInlineSnapshotStack` method by providing your own SnapshotState to SnapshotClient constructor - function __INLINE_SNAPSHOT__(inlineSnapshot?: string, message?: string) { +const wrapper = (received) => { + function __INLINE_SNAPSHOT__(inlineSnapshot, message) { client.assert({ received, message, @@ -42,20 +40,22 @@ const wrapper = (received: unknown) => { }) } return { - toMatchInlineSnapshot: __INLINE_SNAPSHOT__, + // the name is hard-coded, it should be inside another function, so Vitest can find the actual test file where it was called (parses call stack trace + 2) + // you can override this behaviour in SnapshotState's `_inferInlineSnapshotStack` method by providing your own SnapshotState to SnapshotClient constructor + toMatchInlineSnapshot: (...args) => __INLINE_SNAPSHOT__(...args), } } const options = { - updateSnapshot: 'none', + updateSnapshot: 'new', snapshotEnvironment: environment, } await client.setTest(getCurrentFilepath(), getCurrentTestName(), options) -// uses pretty-format, so it requires quotes -// also naming is hard coded when parsing test files -wrapper('text 1').toMatchInlineSnapshot('"text 1"') +// uses "pretty-format", so it requires quotes +// also naming is hard-coded when parsing test files +wrapper('text 1').toMatchInlineSnapshot() wrapper('text 2').toMatchInlineSnapshot('"text 2"') const result = await client.resetCurrent() // this saves files and returns SnapshotResult diff --git a/packages/utils/src/source-map.ts b/packages/utils/src/source-map.ts index 732d93f4a8db..0456fba4bb1c 100644 --- a/packages/utils/src/source-map.ts +++ b/packages/utils/src/source-map.ts @@ -111,13 +111,14 @@ export function positionToOffset( columnNumber: number, ): number { const lines = source.split(lineSplitRE) + const nl = /\r\n/.test(source) ? 2 : 1 let start = 0 if (lineNumber > lines.length) return source.length for (let i = 0; i < lineNumber - 1; i++) - start += lines[i].length + 1 + start += lines[i].length + nl return start + columnNumber } @@ -132,10 +133,11 @@ export function offsetToLineNumber( ) } const lines = source.split(lineSplitRE) + const nl = /\r\n/.test(source) ? 2 : 1 let counted = 0 let line = 0 for (; line < lines.length; line++) { - const lineLength = lines[line].length + 1 + const lineLength = lines[line].length + nl if (counted + lineLength >= offset) break From 42561ca3697ab6fd43e8dbf4f9fc94970782dd56 Mon Sep 17 00:00:00 2001 From: Vladimir Date: Sun, 19 Mar 2023 21:48:48 +0100 Subject: [PATCH 10/15] chore: increase timeout in config test --- test/config/vitest.config.ts | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 test/config/vitest.config.ts diff --git a/test/config/vitest.config.ts b/test/config/vitest.config.ts new file mode 100644 index 000000000000..765b3be8a8d4 --- /dev/null +++ b/test/config/vitest.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'vitest/config' + +export default defineConfig({ + test: { + testTimeout: 60_000, + }, +}) From 35ae1446e915d9a61f83ae21a8af9538b543d7b2 Mon Sep 17 00:00:00 2001 From: Vladimir Sheremet Date: Mon, 20 Mar 2023 11:27:13 +0100 Subject: [PATCH 11/15] chore: inline vitest utils --- packages/snapshot/package.json | 2 +- packages/utils/src/colors.ts | 2 +- packages/ws-client/rollup.config.js | 2 ++ pnpm-lock.yaml | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/snapshot/package.json b/packages/snapshot/package.json index b4f733ce319f..6f1d7eefad9b 100644 --- a/packages/snapshot/package.json +++ b/packages/snapshot/package.json @@ -38,12 +38,12 @@ "prepublishOnly": "pnpm build" }, "dependencies": { - "@vitest/utils": "workspace:*", "magic-string": "^0.27.0", "pathe": "^1.1.0", "pretty-format": "^27.5.1" }, "devDependencies": { + "@vitest/utils": "workspace:*", "@types/natural-compare": "^1.4.1", "natural-compare": "^1.4.0" } diff --git a/packages/utils/src/colors.ts b/packages/utils/src/colors.ts index 17172879f052..ec860971d470 100644 --- a/packages/utils/src/colors.ts +++ b/packages/utils/src/colors.ts @@ -47,7 +47,7 @@ const string = (str: unknown) => String(str) string.open = '' string.close = '' -const defaultColors = colorsEntries.reduce((acc, [key]) => { +const defaultColors = /* #__PURE__ */ colorsEntries.reduce((acc, [key]) => { acc[key as ColorName] = string return acc }, { isColorSupported: false } as Colors) diff --git a/packages/ws-client/rollup.config.js b/packages/ws-client/rollup.config.js index 545ba5266ba5..3aa8b65d6b95 100644 --- a/packages/ws-client/rollup.config.js +++ b/packages/ws-client/rollup.config.js @@ -18,6 +18,8 @@ const external = [ 'node:fs', 'vitest', 'inspector', + '@vitest/snapshot/environment', + '@vitest/snapshot/manager', ] export default () => [ diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 19680345e1db..4f23235b479b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -730,12 +730,12 @@ importers: pathe: ^1.1.0 pretty-format: ^27.5.1 dependencies: - '@vitest/utils': link:../utils magic-string: 0.27.0 pathe: 1.1.0 pretty-format: 27.5.1 devDependencies: '@types/natural-compare': 1.4.1 + '@vitest/utils': link:../utils natural-compare: 1.4.0 packages/spy: From e4ec408a68a48fc824d2088550c28d943e770c03 Mon Sep 17 00:00:00 2001 From: Vladimir Sheremet Date: Mon, 20 Mar 2023 11:57:56 +0100 Subject: [PATCH 12/15] chore: cleanup --- packages/snapshot/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/snapshot/package.json b/packages/snapshot/package.json index 6f1d7eefad9b..8f4daf9a2448 100644 --- a/packages/snapshot/package.json +++ b/packages/snapshot/package.json @@ -43,8 +43,8 @@ "pretty-format": "^27.5.1" }, "devDependencies": { - "@vitest/utils": "workspace:*", "@types/natural-compare": "^1.4.1", + "@vitest/utils": "workspace:*", "natural-compare": "^1.4.0" } } From bb0723e1a1ab6f49316851d6d5a2067253def91b Mon Sep 17 00:00:00 2001 From: Vladimir Sheremet Date: Wed, 29 Mar 2023 14:24:23 +0200 Subject: [PATCH 13/15] chore: initialize snapshot environment --- packages/browser/src/client/main.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/browser/src/client/main.ts b/packages/browser/src/client/main.ts index ecef97e6f371..66622fcc4350 100644 --- a/packages/browser/src/client/main.ts +++ b/packages/browser/src/client/main.ts @@ -7,6 +7,7 @@ import { importId } from './utils' import { setupConsoleLogSpy } from './logger' import { createSafeRpc, rpc, rpcDone } from './rpc' import { setupDialogsSpy } from './dialog' +import { BrowserSnapshotEnvironment } from './snapshot' // @ts-expect-error mocking some node apis globalThis.process = { env: {}, argv: [], cwd: () => '/', stdout: { write: () => {} }, nextTick: cb => cb() } @@ -74,10 +75,10 @@ ws.addEventListener('open', async () => { await setupConsoleLogSpy() setupDialogsSpy() - await runTests(paths, config) + await runTests(paths, config!) }) -async function runTests(paths: string[], config: any) { +async function runTests(paths: string[], config: ResolvedConfig) { // need to import it before any other import, otherwise Vite optimizer will hang const viteClientPath = '/@vite/client' await import(viteClientPath) @@ -98,6 +99,9 @@ async function runTests(paths: string[], config: any) { runner = new BrowserRunner({ config, browserHashMap }) } + if (!config.snapshotOptions.snapshotEnvironment) + config.snapshotOptions.snapshotEnvironment = new BrowserSnapshotEnvironment() + try { await setupCommonEnv(config) const files = paths.map((path) => { From e2f2a7723a7586de88ce2ed9a1c28b7aace752fa Mon Sep 17 00:00:00 2001 From: Vladimir Sheremet Date: Wed, 29 Mar 2023 14:36:42 +0200 Subject: [PATCH 14/15] fix: export concordance theme from ./diff entry point in @vitest/util --- packages/utils/src/diff.ts | 2 ++ packages/utils/src/index.ts | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/utils/src/diff.ts b/packages/utils/src/diff.ts index 48df4e513a2e..7679ba91953a 100644 --- a/packages/utils/src/diff.ts +++ b/packages/utils/src/diff.ts @@ -1,6 +1,8 @@ import { getColors } from './colors' import { diffDescriptors, getConcordanceTheme } from './descriptors' +export * from './descriptors' + export interface DiffOptions { showLegend?: boolean outputDiffLines?: number diff --git a/packages/utils/src/index.ts b/packages/utils/src/index.ts index 47ff26fe62c7..f52bac3f9414 100644 --- a/packages/utils/src/index.ts +++ b/packages/utils/src/index.ts @@ -7,5 +7,4 @@ export * from './display' export * from './constants' export * from './colors' export * from './error' -export * from './descriptors' export * from './source-map' From 65be1df60916b9be4d8513743bb1fb9ab49f7af2 Mon Sep 17 00:00:00 2001 From: Vladimir Sheremet Date: Wed, 29 Mar 2023 14:44:22 +0200 Subject: [PATCH 15/15] chore: fix types --- packages/utils/src/types.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/utils/src/types.ts b/packages/utils/src/types.ts index 5ba7fef74bc1..828dbc7c4201 100644 --- a/packages/utils/src/types.ts +++ b/packages/utils/src/types.ts @@ -43,4 +43,5 @@ export interface ErrorWithDiff extends Error { operator?: string type?: string frame?: string + diff?: string }