diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index a3d223a559a7..ba9ebc533fee 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -1,5 +1,6 @@ import { defineConfig } from 'vitepress' import { withPwa } from '@vite-pwa/vitepress' +import { transformerTwoslash } from '@shikijs/vitepress-twoslash' import { version } from '../../package.json' import { contributing, @@ -58,6 +59,7 @@ export default withPwa(defineConfig({ light: 'github-light', dark: 'github-dark', }, + codeTransformers: [transformerTwoslash()], }, themeConfig: { logo: '/logo.svg', diff --git a/docs/.vitepress/theme/index.ts b/docs/.vitepress/theme/index.ts index b3a6de257967..cbfc1b777dc2 100644 --- a/docs/.vitepress/theme/index.ts +++ b/docs/.vitepress/theme/index.ts @@ -4,7 +4,9 @@ import { inBrowser } from 'vitepress' import '../style/main.css' import '../style/vars.css' import 'uno.css' +import TwoslashFloatingVue from '@shikijs/vitepress-twoslash/client' import HomePage from '../components/HomePage.vue' +import '@shikijs/vitepress-twoslash/style.css' if (inBrowser) import('./pwa') @@ -16,4 +18,8 @@ export default { 'home-features-after': () => h(HomePage), }) }, + // @ts-expect-error - I'm not sure if it's a problem with my local environment. The imported module failed to automatically load the type. + enhanceApp({ app }) { + app.use(TwoslashFloatingVue) + }, } diff --git a/docs/advanced/api.md b/docs/advanced/api.md index d523123efdfd..f83b690f7b5d 100644 --- a/docs/advanced/api.md +++ b/docs/advanced/api.md @@ -8,7 +8,7 @@ Vitest exposes experimental private API. Breaking changes might not follow SemVe You can start running Vitest tests using its Node API: -```js +```js twoslash import { startVitest } from 'vitest/node' const vitest = await startVitest('test') @@ -38,7 +38,7 @@ Alternatively, you can pass in the complete Vite config as the fourth argument, You can create Vitest instance yourself using `createVitest` function. It returns the same `Vitest` instance as `startVitest`, but it doesn't start tests and doesn't validate installed packages. -```js +```js twoslash import { createVitest } from 'vitest/node' const vitest = await createVitest('test', { @@ -50,7 +50,7 @@ const vitest = await createVitest('test', { You can use this method to parse CLI arguments. It accepts a string (where arguments are split by a single space) or a strings array of CLI arguments in the same format that Vitest CLI uses. It returns a filter and `options` that you can later pass down to `createVitest` or `startVitest` methods. -```ts +```ts twoslash import { parseCLI } from 'vitest/node' parseCLI('vitest ./files.ts --coverage --browser=chrome') diff --git a/docs/advanced/pool.md b/docs/advanced/pool.md index f465adf0f9f5..d4f8d9c56c88 100644 --- a/docs/advanced/pool.md +++ b/docs/advanced/pool.md @@ -14,7 +14,9 @@ Vitest runs tests in pools. By default, there are several pools: You can provide your own pool by specifying a file path: -```ts +```ts twoslash +import { defineConfig } from 'vitest/config' +// ---cut--- export default defineConfig({ test: { // will run every file with a custom pool by default diff --git a/docs/advanced/reporters.md b/docs/advanced/reporters.md index 208ca767d369..c316447c5301 100644 --- a/docs/advanced/reporters.md +++ b/docs/advanced/reporters.md @@ -6,7 +6,7 @@ You can import reporters from `vitest/reporters` and extend them to create your In general, you don't need to create your reporter from scratch. `vitest` comes with several default reporting programs that you can extend. -```ts +```ts twoslash import { DefaultReporter } from 'vitest/reporters' export default class MyDefaultReporter extends DefaultReporter { diff --git a/docs/advanced/runner.md b/docs/advanced/runner.md index da8bf1a99d1e..7b724b2173b1 100644 --- a/docs/advanced/runner.md +++ b/docs/advanced/runner.md @@ -110,7 +110,7 @@ Snapshot support and some other features depend on the runner. If you don't want You can extend Vitest task system with your tasks. A task is an object that is part of a suite. It is automatically added to the current suite with a `suite.task` method: -```js +```js twoslash // ./utils/custom.js import { createTaskCollector, getCurrentSuite, setFn } from 'vitest/suite' @@ -134,7 +134,7 @@ export const myCustomTask = createTaskCollector( ) ``` -```js +```js twoslash // ./garden/tasks.test.js import { afterAll, beforeAll, describe, myCustomTask } from '../custom.js' import { gardener } from './gardener.js' diff --git a/docs/api/expect-typeof.md b/docs/api/expect-typeof.md index fab8f40c8ef0..febf5072f1f5 100644 --- a/docs/api/expect-typeof.md +++ b/docs/api/expect-typeof.md @@ -18,7 +18,7 @@ You can negate all assertions, using `.not` property. This matcher will check if the types are fully equal to each other. This matcher will not fail if two objects have different values, but the same type. It will fail however if an object is missing a property. -```ts +```ts twoslash import { expectTypeOf } from 'vitest' expectTypeOf({ a: 1 }).toEqualTypeOf<{ a: number }>() @@ -33,7 +33,7 @@ expectTypeOf({ a: 1, b: 1 }).not.toEqualTypeOf<{ a: number }>() This matcher checks if expect type extends provided type. It is different from `toEqual` and is more similar to [expect's](/api/expect) `toMatchObject()`. With this matcher, you can check if an object “matches” a type. -```ts +```ts twoslash import { expectTypeOf } from 'vitest' expectTypeOf({ a: 1, b: 1 }).toMatchTypeOf({ a: 1 }) @@ -47,7 +47,7 @@ expectTypeOf().not.toMatchTypeOf() You can use `.extract` to narrow down types for further testing. -```ts +```ts twoslash import { expectTypeOf } from 'vitest' type ResponsiveProp = T | T[] | { xs?: T; sm?: T; md?: T } @@ -79,7 +79,7 @@ If no type is found in the union, `.extract` will return `never`. You can use `.exclude` to remove types from a union for further testing. -```ts +```ts twoslash import { expectTypeOf } from 'vitest' type ResponsiveProp = T | T[] | { xs?: T; sm?: T; md?: T } @@ -108,7 +108,7 @@ If no type is found in the union, `.exclude` will return `never`. You can use `.returns` to extract return value of a function type. -```ts +```ts twoslash import { expectTypeOf } from 'vitest' expectTypeOf(() => {}).returns.toBeVoid() @@ -125,7 +125,7 @@ If used on a non-function type, it will return `never`, so you won't be able to You can extract function arguments with `.parameters` to perform assertions on its value. Parameters are returned as an array. -```ts +```ts twoslash import { expectTypeOf } from 'vitest' type NoParam = () => void @@ -149,7 +149,7 @@ You can also use [`.toBeCallableWith`](#tobecallablewith) matcher as a more expr You can extract a certain function argument with `.parameter(number)` call to perform other assertions on it. -```ts +```ts twoslash import { expectTypeOf } from 'vitest' function foo(a: number, b: string) { @@ -170,7 +170,7 @@ If used on a non-function type, it will return `never`, so you won't be able to You can extract constructor parameters as an array of values and perform assertions on them with this method. -```ts +```ts twoslash import { expectTypeOf } from 'vitest' expectTypeOf(Date).constructorParameters.toEqualTypeOf<[] | [string | number | Date]>() @@ -190,7 +190,7 @@ You can also use [`.toBeConstructibleWith`](#tobeconstructiblewith) matcher as a This property gives access to matchers that can be performed on an instance of the provided class. -```ts +```ts twoslash import { expectTypeOf } from 'vitest' expectTypeOf(Date).instance.toHaveProperty('toISOString') @@ -206,7 +206,7 @@ If used on a non-function type, it will return `never`, so you won't be able to You can get array item type with `.items` to perform further assertions. -```ts +```ts twoslash import { expectTypeOf } from 'vitest' expectTypeOf([1, 2, 3]).items.toEqualTypeOf() @@ -219,7 +219,7 @@ expectTypeOf([1, 2, 3]).items.not.toEqualTypeOf() This matcher extracts resolved value of a `Promise`, so you can perform other assertions on it. -```ts +```ts twoslash import { expectTypeOf } from 'vitest' async function asyncFunc() { @@ -240,7 +240,7 @@ If used on a non-promise type, it will return `never`, so you won't be able to c This matcher extracts guard value (e.g., `v is number`), so you can perform assertions on it. -```ts +```ts twoslash import { expectTypeOf } from 'vitest' function isString(v: any): v is string { @@ -259,7 +259,7 @@ Returns `never`, if the value is not a guard function, so you won't be able to c This matcher extracts assert value (e.g., `assert v is number`), so you can perform assertions on it. -```ts +```ts twoslash import { expectTypeOf } from 'vitest' function assertNumber(v: any): asserts v is number { @@ -280,7 +280,7 @@ Returns `never`, if the value is not an assert function, so you won't be able to With this matcher you can check, if provided type is `any` type. If the type is too specific, the test will fail. -```ts +```ts twoslash import { expectTypeOf } from 'vitest' expectTypeOf().toBeAny() @@ -294,7 +294,7 @@ expectTypeOf('string').not.toBeAny() This matcher checks, if provided type is `unknown` type. -```ts +```ts twoslash import { expectTypeOf } from 'vitest' expectTypeOf().toBeUnknown() @@ -334,7 +334,7 @@ expectTypeOf((): never => {}).toBeFunction() This matcher checks, if provided type is an `object`. -```ts +```ts twoslash import { expectTypeOf } from 'vitest' expectTypeOf(42).not.toBeObject() @@ -347,7 +347,7 @@ expectTypeOf({}).toBeObject() This matcher checks, if provided type is `Array`. -```ts +```ts twoslash import { expectTypeOf } from 'vitest' expectTypeOf(42).not.toBeArray() @@ -362,7 +362,7 @@ expectTypeOf([{}, 42]).toBeArray() This matcher checks, if provided type is a `string`. -```ts +```ts twoslash import { expectTypeOf } from 'vitest' expectTypeOf(42).not.toBeString() @@ -376,7 +376,7 @@ expectTypeOf('a').toBeString() This matcher checks, if provided type is `boolean`. -```ts +```ts twoslash import { expectTypeOf } from 'vitest' expectTypeOf(42).not.toBeBoolean() @@ -390,7 +390,7 @@ expectTypeOf().toBeBoolean() This matcher checks, if provided type is `void`. -```ts +```ts twoslash import { expectTypeOf } from 'vitest' expectTypeOf(() => {}).returns.toBeVoid() @@ -403,7 +403,7 @@ expectTypeOf().toBeVoid() This matcher checks, if provided type is a `symbol`. -```ts +```ts twoslash import { expectTypeOf } from 'vitest' expectTypeOf(Symbol(1)).toBeSymbol() @@ -416,7 +416,7 @@ expectTypeOf().toBeSymbol() This matcher checks, if provided type is `null`. -```ts +```ts twoslash import { expectTypeOf } from 'vitest' expectTypeOf(null).toBeNull() @@ -430,7 +430,7 @@ expectTypeOf(undefined).not.toBeNull() This matcher checks, if provided type is `undefined`. -```ts +```ts twoslash import { expectTypeOf } from 'vitest' expectTypeOf(undefined).toBeUndefined() @@ -444,7 +444,7 @@ expectTypeOf(null).not.toBeUndefined() This matcher checks, if you can use `null` or `undefined` with provided type. -```ts +```ts twoslash import { expectTypeOf } from 'vitest' expectTypeOf<1 | undefined>().toBeNullable() @@ -458,7 +458,7 @@ expectTypeOf<1 | undefined | null>().toBeNullable() This matcher ensures you can call provided function with a set of parameters. -```ts +```ts twoslash import { expectTypeOf } from 'vitest' type NoParam = () => void @@ -478,7 +478,7 @@ If used on a non-function type, it will return `never`, so you won't be able to This matcher ensures you can create a new instance with a set of constructor parameters. -```ts +```ts twoslash import { expectTypeOf } from 'vitest' expectTypeOf(Date).toBeConstructibleWith(new Date()) @@ -495,7 +495,7 @@ If used on a non-function type, it will return `never`, so you won't be able to This matcher checks if a property exists on the provided object. If it exists, it also returns the same set of matchers for the type of this property, so you can chain assertions one after another. -```ts +```ts twoslash import { expectTypeOf } from 'vitest' const obj = { a: 1, b: '' } diff --git a/docs/api/expect.md b/docs/api/expect.md index 7b74129f6d53..04c947dcadbb 100644 --- a/docs/api/expect.md +++ b/docs/api/expect.md @@ -10,7 +10,7 @@ type Awaitable = T | PromiseLike For example, this code asserts that an `input` value is equal to `2`. If it's not, the assertion will throw an error, and the test will fail. -```ts +```ts twoslash import { expect } from 'vitest' const input = Math.sqrt(4) @@ -33,7 +33,7 @@ Also, `expect` can be used statically to access matcher functions, described lat `expect.soft` functions similarly to `expect`, but instead of terminating the test execution upon a failed assertion, it continues running and marks the failure as a test failure. All errors encountered during the test will be displayed until the test is completed. -```ts +```ts twoslash import { expect, test } from 'vitest' test('expect.soft test', () => { @@ -45,7 +45,7 @@ test('expect.soft test', () => { It can also be used with `expect`. if `expect` assertion fails, the test will be terminated and all errors will be displayed. -```ts +```ts twoslash import { expect, test } from 'vitest' test('expect.soft test', () => { @@ -63,7 +63,7 @@ test('expect.soft test', () => { Using `not` will negate the assertion. For example, this code asserts that an `input` value is not equal to `2`. If it's equal, the assertion will throw an error, and the test will fail. -```ts +```ts twoslash import { expect, test } from 'vitest' const input = Math.sqrt(16) @@ -80,7 +80,7 @@ expect(input).not.toBe(2) // jest API For example, the code below checks if the trader has 13 apples. -```ts +```ts twoslash import { expect, test } from 'vitest' const stock = { @@ -108,7 +108,7 @@ Try not to use `toBe` with floating-point numbers. Since JavaScript rounds them, Use `toBeCloseTo` to compare floating-point numbers. The optional `numDigits` argument limits the number of digits to check _after_ the decimal point. For example: -```ts +```ts twoslash import { expect, test } from 'vitest' test.fails('decimals are not equal in javascript', () => { @@ -129,7 +129,7 @@ test('decimals are rounded to 5 after the point', () => { `toBeDefined` asserts that the value is not equal to `undefined`. Useful use case would be to check if function _returned_ anything. -```ts +```ts twoslash import { expect, test } from 'vitest' function getApples() { @@ -147,10 +147,10 @@ test('function returned something', () => { Opposite of `toBeDefined`, `toBeUndefined` asserts that the value _is_ equal to `undefined`. Useful use case would be to check if function hasn't _returned_ anything. -```ts +```ts twoslash import { expect, test } from 'vitest' -function getApplesFromStock(stock) { +function getApplesFromStock(stock: string) { if (stock === 'Bill') return 13 } @@ -232,7 +232,7 @@ Everything in JavaScript is truthy, except `false`, `null`, `undefined`, `NaN`, `toBeNull` simply asserts if something is `null`. Alias for `.toBe(null)`. -```ts +```ts twoslash import { expect, test } from 'vitest' function apples() { @@ -250,7 +250,7 @@ test('we don\'t have apples', () => { `toBeNaN` simply asserts if something is `NaN`. Alias for `.toBe(NaN)`. -```ts +```ts twoslash import { expect, test } from 'vitest' let i = 0 @@ -272,7 +272,7 @@ test('getApplesCount has some unusual side effects...', () => { `toBeTypeOf` asserts if an actual value is of type of received type. -```ts +```ts twoslash import { expect, test } from 'vitest' const actual = 'stock' @@ -365,7 +365,7 @@ test('have 11 apples or less', () => { `toEqual` asserts if actual value is equal to received one or has the same structure, if it is an object (compares them recursively). You can see the difference between `toEqual` and [`toBe`](#tobe) in this example: -```ts +```ts twoslash import { expect, test } from 'vitest' const stockBill = { @@ -461,7 +461,7 @@ test('apple available', () => { `toHaveLength` asserts if an object has a `.length` property and it is set to a certain numeric value. -```ts +```ts twoslash import { expect, test } from 'vitest' test('toHaveLength', () => { @@ -481,7 +481,7 @@ test('toHaveLength', () => { You can provide an optional value argument also known as deep equality, like the `toEqual` matcher to compare the received property value. -```ts +```ts twoslash import { expect, test } from 'vitest' const invoice = { @@ -535,7 +535,7 @@ test('John Doe Invoice', () => { `toMatch` asserts if a string matches a regular expression or a string. -```ts +```ts twoslash import { expect, test } from 'vitest' test('top fruits', () => { @@ -552,7 +552,7 @@ test('top fruits', () => { You can also pass an array of objects. This is useful if you want to check that two arrays match in their number of elements, as opposed to `arrayContaining`, which allows for extra elements in the received array. -```ts +```ts twoslash import { expect, test } from 'vitest' const johnInvoice = { @@ -615,10 +615,10 @@ You must wrap the code in a function, otherwise the error will not be caught, an For example, if we want to test that `getFruitStock('pineapples')` throws, we could write: -```ts +```ts twoslash import { expect, test } from 'vitest' -function getFruitStock(type) { +function getFruitStock(type: string) { if (type === 'pineapples') throw new Error('Pineapples are not in stock') @@ -640,7 +640,7 @@ test('throws on pineapples', () => { :::tip To test async functions, use in combination with [rejects](#rejects). -```js +```js twoslash function getAsyncFruitStock() { return Promise.reject(new Error('empty')) } @@ -663,7 +663,7 @@ You can provide an optional `hint` string argument that is appended to the test When snapshot mismatch and causing the test failing, if the mismatch is expected, you can press `u` key to update the snapshot for once. Or you can pass `-u` or `--update` CLI options to make Vitest always update the tests. ::: -```ts +```ts twoslash import { expect, test } from 'vitest' test('matches snapshot', () => { @@ -674,7 +674,7 @@ test('matches snapshot', () => { You can also provide a shape of an object, if you are testing just a shape of an object, and don't need it to be 100% compatible: -```ts +```ts twoslash import { expect, test } from 'vitest' test('matches snapshot', () => { @@ -691,7 +691,7 @@ This ensures that a value matches the most recent snapshot. Vitest adds and updates the inlineSnapshot string argument to the matcher in the test file (instead of an external `.snap` file). -```ts +```ts twoslash import { expect, test } from 'vitest' test('matches inline snapshot', () => { @@ -710,7 +710,7 @@ test('matches inline snapshot', () => { You can also provide a shape of an object, if you are testing just a shape of an object, and don't need it to be 100% compatible: -```ts +```ts twoslash import { expect, test } from 'vitest' test('matches snapshot', () => { @@ -761,7 +761,7 @@ The same as [`toMatchInlineSnapshot`](#tomatchinlinesnapshot), but expects the s This assertion is useful for testing that a function has been called. Requires a spy function to be passed to `expect`. -```ts +```ts twoslash import { expect, test, vi } from 'vitest' const market = { @@ -787,7 +787,7 @@ test('spy function', () => { This assertion checks if a function was called a certain amount of times. Requires a spy function to be passed to `expect`. -```ts +```ts twoslash import { expect, test, vi } from 'vitest' const market = { @@ -812,7 +812,7 @@ test('spy function called two times', () => { This assertion checks if a function was called at least once with certain parameters. Requires a spy function to be passed to `expect`. -```ts +```ts twoslash import { expect, test, vi } from 'vitest' const market = { @@ -838,7 +838,7 @@ test('spy function', () => { This assertion checks if a function was called with certain parameters at its last invocation. Requires a spy function to be passed to `expect`. -```ts +```ts twoslash import { expect, test, vi } from 'vitest' const market = { @@ -866,7 +866,7 @@ This assertion checks if a function was called with certain parameters at the ce Requires a spy function to be passed to `expect`. -```ts +```ts twoslash import { expect, test, vi } from 'vitest' const market = { @@ -891,7 +891,7 @@ test('first call of spy function called with right params', () => { This assertion checks if a function has successfully returned a value at least once (i.e., did not throw an error). Requires a spy function to be passed to `expect`. -```ts +```ts twoslash import { expect, test, vi } from 'vitest' function getApplesPrice(amount: number) { @@ -915,7 +915,7 @@ test('spy function returned a value', () => { This assertion checks if a function has successfully returned a value exact amount of times (i.e., did not throw an error). Requires a spy function to be passed to `expect`. -```ts +```ts twoslash import { expect, test, vi } from 'vitest' test('spy function returns a value two times', () => { @@ -934,7 +934,7 @@ test('spy function returns a value two times', () => { You can call this assertion to check if a function has successfully returned a value with certain parameters at least once. Requires a spy function to be passed to `expect`. -```ts +```ts twoslash import { expect, test, vi } from 'vitest' test('spy function returns a product', () => { @@ -952,7 +952,7 @@ test('spy function returns a product', () => { You can call this assertion to check if a function has successfully returned a value with certain parameters on its last invoking. Requires a spy function to be passed to `expect`. -```ts +```ts twoslash import { expect, test, vi } from 'vitest' test('spy function returns bananas on a last call', () => { @@ -971,7 +971,7 @@ test('spy function returns bananas on a last call', () => { You can call this assertion to check if a function has successfully returned a value with certain parameters on a certain call. Requires a spy function to be passed to `expect`. -```ts +```ts twoslash import { expect, test, vi } from 'vitest' test('spy function returns bananas on second call', () => { @@ -990,7 +990,8 @@ test('spy function returns bananas on second call', () => { This assertion checks if a value satisfies a certain predicate. -```ts +```ts twoslash +import { describe, expect, it } from 'vitest' describe('toSatisfy()', () => { const isOdd = (value: number) => value % 2 !== 0 @@ -1232,7 +1233,7 @@ test('compare float in object properties', () => { When used with an equality check, this asymmetric matcher will return `true` if the value is an array and contains specified items. -```ts +```ts twoslash import { expect, test } from 'vitest' test('basket includes fuji', () => { @@ -1261,7 +1262,7 @@ You can use `expect.not` with this matcher to negate the expected value. When used with an equality check, this asymmetric matcher will return `true` if the value has a similar shape. -```ts +```ts twoslash import { expect, test } from 'vitest' test('basket has empire apples', () => { @@ -1291,7 +1292,7 @@ You can use `expect.not` with this matcher to negate the expected value. When used with an equality check, this asymmetric matcher will return `true` if the value is a string and contains a specified substring. -```ts +```ts twoslash import { expect, test } from 'vitest' test('variety has "Emp" in its name', () => { @@ -1316,7 +1317,7 @@ You can use `expect.not` with this matcher to negate the expected value. When used with an equality check, this asymmetric matcher will return `true` if the value is a string and contains a specified substring or if the string matches a regular expression. -```ts +```ts twoslash import { expect, test } from 'vitest' test('variety ends with "re"', () => { @@ -1408,7 +1409,7 @@ If you want to know more, checkout [guide on extending matchers](/guide/extendin You can use this method to define custom testers, which are methods used by matchers, to test if two objects are equal. It is compatible with Jest's `expect.addEqualityTesters`. -```ts +```ts twoslash import { expect, test } from 'vitest' class AnagramComparator { diff --git a/docs/api/index.md b/docs/api/index.md index ee69e878d9ce..29d60c94b2dc 100644 --- a/docs/api/index.md +++ b/docs/api/index.md @@ -50,14 +50,14 @@ In Jest, `TestFunction` can also be of type `(done: DoneCallback) => void`. If t Since Vitest 1.3.0 most options support both dot-syntax and object-syntax allowing you to use whatever style you prefer. :::code-group -```ts [dot-syntax] +```ts [dot-syntax] twoslash import { test } from 'vitest' test.skip('skipped test', () => { // some logic that fails right now }) ``` -```ts [object-syntax 1.3.0+] +```ts [object-syntax 1.3.0+] twoslash import { test } from 'vitest' test('skipped test', { skip: true }, () => { @@ -74,7 +74,7 @@ test('skipped test', { skip: true }, () => { Optionally, you can provide a timeout (in milliseconds) for specifying how long to wait before terminating. The default is 5 seconds, and can be configured globally with [testTimeout](/config/#testtimeout) -```ts +```ts twoslash import { expect, test } from 'vitest' test('should work as expected', () => { @@ -117,7 +117,7 @@ myTest('add item', ({ todos }) => { If you want to skip running certain tests, but you don't want to delete the code due to any reason, you can use `test.skip` to avoid running them. -```ts +```ts twoslash import { assert, test } from 'vitest' test.skip('skipped test', () => { @@ -128,7 +128,7 @@ test.skip('skipped test', () => { You can also skip test by calling `skip` on its [context](/guide/test-context) dynamically: -```ts +```ts twoslash import { assert, test } from 'vitest' test('skipped test', (context) => { @@ -144,7 +144,7 @@ test('skipped test', (context) => { In some cases you might run tests multiple times with different environments, and some of the tests might be environment-specific. Instead of wrapping the test code with `if`, you can use `test.skipIf` to skip the test whenever the condition is truthy. -```ts +```ts twoslash import { assert, test } from 'vitest' const isDev = process.env.NODE_ENV === 'development' @@ -164,7 +164,7 @@ You cannot use this syntax, when using Vitest as [type checker](/guide/testing-t Opposite of [test.skipIf](#test-skipif). -```ts +```ts twoslash import { assert, test } from 'vitest' const isDev = process.env.NODE_ENV === 'development' @@ -186,7 +186,7 @@ Use `test.only` to only run certain tests in a given suite. This is useful when Optionally, you can provide a timeout (in milliseconds) for specifying how long to wait before terminating. The default is 5 seconds, and can be configured globally with [testTimeout](/config/#testtimeout). -```ts +```ts twoslash import { assert, test } from 'vitest' test.only('test', () => { @@ -208,7 +208,7 @@ In order to do that run `vitest` with specific file containing the tests in ques `test.concurrent` marks consecutive tests to be run in parallel. It receives the test name, an async function with the tests to collect, and an optional timeout (in milliseconds). -```ts +```ts twoslash import { describe, test } from 'vitest' // The two tests marked with concurrent will be run in parallel @@ -249,7 +249,10 @@ You cannot use this syntax, when using Vitest as [type checker](/guide/testing-t `test.sequential` marks a test as sequential. This is useful if you want to run tests in sequence within `describe.concurrent` or with the `--sequence.concurrent` command option. -```ts +```ts twoslash +import { describe, test } from 'vitest' + +// ---cut--- // with config option { sequence: { concurrent: true } } test('concurrent test 1', async () => { /* ... */ }) test('concurrent test 2', async () => { /* ... */ }) @@ -284,7 +287,7 @@ test.todo('unimplemented test') Use `test.fails` to indicate that an assertion will fail explicitly. -```ts +```ts twoslash import { expect, test } from 'vitest' function myAsyncFunc() { @@ -315,7 +318,10 @@ You can inject parameters with [printf formatting](https://nodejs.org/api/util.h - `%#`: index of the test case - `%%`: single percent sign ('%') -```ts +```ts twoslash +import { expect, test } from 'vitest' + +// ---cut--- test.each([ [1, 1, 2], [1, 2, 3], @@ -370,7 +376,10 @@ Starting from Vitest 0.25.3, you can also use template string table. * First row should be column names, separated by `|`; * One or more subsequent rows of data supplied as template literal expressions using `${value}` syntax. -```ts +```ts twoslash +import { expect, test } from 'vitest' + +// ---cut--- test.each` a | b | expected ${1} | ${1} | ${2} @@ -401,7 +410,7 @@ You cannot use this syntax, when using Vitest as [type checker](/guide/testing-t Vitest uses [`tinybench`](https://github.com/tinylibs/tinybench) library under the hood, inheriting all its options that can be used as a third argument. -```ts +```ts twoslash import { bench } from 'vitest' bench('normal sorting', () => { @@ -466,7 +475,7 @@ export interface Options { You can use `bench.skip` syntax to skip running certain benchmarks. -```ts +```ts twoslash import { bench } from 'vitest' bench.skip('normal sorting', () => { @@ -483,7 +492,7 @@ bench.skip('normal sorting', () => { Use `bench.only` to only run certain benchmarks in a given suite. This is useful when debugging. -```ts +```ts twoslash import { bench } from 'vitest' bench.only('normal sorting', () => { @@ -500,7 +509,7 @@ bench.only('normal sorting', () => { Use `bench.todo` to stub benchmarks to be implemented later. -```ts +```ts twoslash import { bench } from 'vitest' bench.todo('unimplemented test') @@ -510,7 +519,7 @@ bench.todo('unimplemented test') When you use `test` or `bench` in the top level of file, they are collected as part of the implicit suite for it. Using `describe` you can define a new suite in the current context, as a set of related tests or benchmarks and other nested suites. A suite lets you organize your tests and benchmarks so reports are more clear. -```ts +```ts twoslash // basic.spec.ts // organizing tests @@ -536,7 +545,7 @@ describe('person', () => { }) ``` -```ts +```ts twoslash // basic.bench.ts // organizing benchmarks @@ -561,10 +570,10 @@ describe('sort', () => { You can also nest describe blocks if you have a hierarchy of tests or benchmarks: -```ts +```ts twoslash import { describe, expect, test } from 'vitest' -function numberToCurrency(value) { +function numberToCurrency(value: number | string) { if (typeof value !== 'number') throw new Error('Value must be a number') @@ -592,7 +601,7 @@ describe('numberToCurrency', () => { Use `describe.skip` in a suite to avoid running a particular describe block. -```ts +```ts twoslash import { assert, describe, test } from 'vitest' describe.skip('skipped suite', () => { @@ -609,7 +618,7 @@ describe.skip('skipped suite', () => { In some cases, you might run suites multiple times with different environments, and some of the suites might be environment-specific. Instead of wrapping the suite with `if`, you can use `describe.skipIf` to skip the suite whenever the condition is truthy. -```ts +```ts twoslash import { describe, test } from 'vitest' const isDev = process.env.NODE_ENV === 'development' @@ -629,8 +638,8 @@ You cannot use this syntax when using Vitest as [type checker](/guide/testing-ty Opposite of [describe.skipIf](#describe-skipif). -```ts -import { assert, test } from 'vitest' +```ts twoslash +import { assert, describe, test } from 'vitest' const isDev = process.env.NODE_ENV === 'development' @@ -649,7 +658,9 @@ You cannot use this syntax, when using Vitest as [type checker](/guide/testing-t Use `describe.only` to only run certain suites -```ts +```ts twoslash +import { assert, describe, test } from 'vitest' +// ---cut--- // Only this suite (and others marked with only) are run describe.only('suite', () => { test('sqrt', () => { @@ -675,7 +686,9 @@ In order to do that run `vitest` with specific file containing the tests in ques `describe.concurrent` in a suite marks every tests as concurrent -```ts +```ts twoslash +import { describe, test } from 'vitest' +// ---cut--- // All tests within this suite will be run in parallel describe.concurrent('suite', () => { test('concurrent test 1', async () => { /* ... */ }) @@ -716,7 +729,9 @@ You cannot use this syntax, when using Vitest as [type checker](/guide/testing-t `describe.sequential` in a suite marks every test as sequential. This is useful if you want to run tests in sequence within `describe.concurrent` or with the `--sequence.concurrent` command option. -```ts +```ts twoslash +import { describe, test } from 'vitest' +// ---cut--- describe.concurrent('suite', () => { test('concurrent test 1', async () => { /* ... */ }) test('concurrent test 2', async () => { /* ... */ }) @@ -734,7 +749,9 @@ describe.concurrent('suite', () => { Vitest provides a way to run all tests in random order via CLI flag [`--sequence.shuffle`](/guide/cli) or config option [`sequence.shuffle`](/config/#sequence-shuffle), but if you want to have only part of your test suite to run tests in random order, you can mark it with this flag. -```ts +```ts twoslash +import { describe, test } from 'vitest' +// ---cut--- describe.shuffle('suite', () => { test('random test 1', async () => { /* ... */ }) test('random test 2', async () => { /* ... */ }) @@ -766,7 +783,9 @@ describe.todo('unimplemented suite') Use `describe.each` if you have more than one test that depends on the same data. -```ts +```ts twoslash +import { describe, expect, test } from 'vitest' +// ---cut--- describe.each([ { a: 1, b: 1, expected: 2 }, { a: 1, b: 2, expected: 3 }, @@ -791,7 +810,9 @@ Starting from Vitest 0.25.3, you can also use template string table. * First row should be column names, separated by `|`; * One or more subsequent rows of data supplied as template literal expressions using `${value}` syntax. -```ts +```ts twoslash +import { describe, expect, test } from 'vitest' +// ---cut--- describe.each` a | b | expected ${1} | ${1} | ${2} diff --git a/docs/api/mock.md b/docs/api/mock.md index 39a31738a112..18015f4c8706 100644 --- a/docs/api/mock.md +++ b/docs/api/mock.md @@ -56,7 +56,9 @@ Sets internal mock name. Useful to see the name of the mock if assertion fails. Accepts a function that will be used as an implementation of the mock. -```ts +```ts twoslash +import { vi } from 'vitest' +// ---cut--- const mockFn = vi.fn().mockImplementation(apples => apples + 1) // or: vi.fn(apples => apples + 1); @@ -76,7 +78,9 @@ mockFn.mock.calls[1][0] === 1 // true Accepts a function that will be used as mock's implementation during the next call. Can be chained so that multiple function calls produce different results. -```ts +```ts twoslash +import { vi } from 'vitest' +// ---cut--- const myMockFn = vi .fn() .mockImplementationOnce(() => true) @@ -88,7 +92,9 @@ myMockFn() // false When the mocked function runs out of implementations, it will invoke the default implementation that was set with `vi.fn(() => defaultValue)` or `.mockImplementation(() => defaultValue)` if they were called: -```ts +```ts twoslash +import { vi } from 'vitest' +// ---cut--- const myMockFn = vi .fn(() => 'default') .mockImplementationOnce(() => 'first call') @@ -105,7 +111,9 @@ console.log(myMockFn(), myMockFn(), myMockFn(), myMockFn()) Overrides the original mock implementation temporarily while the callback is being executed. -```js +```js twoslash +import { vi } from 'vitest' +// ---cut--- const myMockFn = vi.fn(() => 'original') myMockFn.withImplementation(() => 'temp', () => { @@ -141,7 +149,9 @@ Note that this method takes precedence over the [`mockImplementationOnce`](#mock Accepts an error that will be rejected when async function is called. -```ts +```ts twoslash +import { vi } from 'vitest' +// ---cut--- const asyncMock = vi.fn().mockRejectedValue(new Error('Async error')) await asyncMock() // throws "Async error" @@ -153,7 +163,9 @@ await asyncMock() // throws "Async error" Accepts a value that will be rejected during the next function call. If chained, every consecutive call will reject specified value. -```ts +```ts twoslash +import { vi } from 'vitest' +// ---cut--- const asyncMock = vi .fn() .mockResolvedValueOnce('first call') @@ -187,7 +199,9 @@ If you want this method to be called before each test automatically, you can ena Accepts a value that will be resolved when async function is called. -```ts +```ts twoslash +import { vi } from 'vitest' +// ---cut--- const asyncMock = vi.fn().mockResolvedValue(42) await asyncMock() // 42 @@ -199,7 +213,9 @@ await asyncMock() // 42 Accepts a value that will be resolved during the next function call. If chained, every consecutive call will resolve specified value. -```ts +```ts twoslash +import { vi } from 'vitest' +// ---cut--- const asyncMock = vi .fn() .mockResolvedValue('default') @@ -230,7 +246,9 @@ spy.mockImplementation(function () { Accepts a value that will be returned whenever the mock function is called. -```ts +```ts twoslash +import { vi } from 'vitest' +// ---cut--- const mock = vi.fn() mock.mockReturnValue(42) mock() // 42 @@ -246,7 +264,9 @@ Accepts a value that will be returned during the next function call. If chained, When there are no more `mockReturnValueOnce` values to use, mock will fallback to previously defined implementation if there is one. -```ts +```ts twoslash +import { vi } from 'vitest' +// ---cut--- const myMockFn = vi .fn() .mockReturnValue('default') diff --git a/docs/api/vi.md b/docs/api/vi.md index 9dde6e535555..9118ce845df2 100644 --- a/docs/api/vi.md +++ b/docs/api/vi.md @@ -36,7 +36,9 @@ If `factory` is defined, all imports will return its result. Vitest calls factor Unlike in `jest`, the factory can be asynchronous. You can use [`vi.importActual`](#vi-importactual) or a helper with the factory passed in as the first argument, and get the original module inside. -```js +```js twoslash +import { vi } from 'vitest' +// ---cut--- // when using JavaScript vi.mock('./path/to/module.js', async (importOriginal) => { @@ -349,7 +351,9 @@ This section describes how to work with [method mocks](/api/mock) and replace en Creates a spy on a function, though can be initiated without one. Every time a function is invoked, it stores its call arguments, returns, and instances. Also, you can manipulate its behavior with [methods](/api/mock). If no function is given, mock will return `undefined`, when invoked. -```ts +```ts twoslash +import { expect, vi } from 'vitest' +// ---cut--- const getApples = vi.fn(() => 0) getApples() @@ -388,7 +392,9 @@ Will call [`.mockRestore()`](/api/mock#mockrestore) on all spies. This will clea Creates a spy on a method or getter/setter of an object similar to [`vi.fn()`](#vi-fn). It returns a [mock function](/api/mock). -```ts +```ts twoslash +import { expect, vi } from 'vitest' +// ---cut--- let apples = 0 const cart = { getApples: () => 42, @@ -484,7 +490,7 @@ import.meta.env.NODE_ENV === 'development' Changes the value of global variable. You can restore its original value by calling `vi.unstubAllGlobals`. -```ts +```ts twoslash import { vi } from 'vitest' // `innerWidth` is "0" before calling stubGlobal @@ -546,7 +552,9 @@ This sections descibes how to work with [fake timers](/guide/mocking#timers). This method will invoke every initiated timer until the specified number of milliseconds is passed or the queue is empty - whatever comes first. -```ts +```ts twoslash +import { vi } from 'vitest' +// ---cut--- let i = 0 setInterval(() => console.log(++i), 50) @@ -563,7 +571,9 @@ vi.advanceTimersByTime(150) This method will invoke every initiated timer until the specified number of milliseconds is passed or the queue is empty - whatever comes first. This will include asynchronously set timers. -```ts +```ts twoslash +import { vi } from 'vitest' +// ---cut--- let i = 0 setInterval(() => Promise.resolve().then(() => console.log(++i)), 50) @@ -580,7 +590,9 @@ await vi.advanceTimersByTimeAsync(150) Will call next available timer. Useful to make assertions between each timer call. You can chain call it to manage timers by yourself. -```ts +```ts twoslash +import { vi } from 'vitest' +// ---cut--- let i = 0 setInterval(() => console.log(++i), 50) @@ -595,7 +607,9 @@ vi.advanceTimersToNextTimer() // log: 1 Will call next available timer and wait until it's resolved if it was set asynchronously. Useful to make assertions between each timer call. -```ts +```ts twoslash +import { expect, vi } from 'vitest' +// ---cut--- let i = 0 setInterval(() => Promise.resolve().then(() => console.log(++i)), 50) @@ -640,7 +654,9 @@ Calls every microtask that was queued by `process.nextTick`. This will also run This method will invoke every initiated timer until the timer queue is empty. It means that every timer called during `runAllTimers` will be fired. If you have an infinite interval, it will throw after 10 000 tries (can be configured with [`fakeTimers.loopLimit`](/config/#faketimers-looplimit)). -```ts +```ts twoslash +import { vi } from 'vitest' +// ---cut--- let i = 0 setTimeout(() => console.log(++i)) const interval = setInterval(() => { @@ -663,7 +679,9 @@ vi.runAllTimers() This method will asynchronously invoke every initiated timer until the timer queue is empty. It means that every timer called during `runAllTimersAsync` will be fired even asynchronous timers. If you have an infinite interval, it will throw after 10 000 tries (can be configured with [`fakeTimers.loopLimit`](/config/#faketimers-looplimit)). -```ts +```ts twoslash +import { vi } from 'vitest' +// ---cut--- setTimeout(async () => { console.log(await Promise.resolve('result')) }, 100) @@ -679,7 +697,9 @@ await vi.runAllTimersAsync() This method will call every timer that was initiated after [`vi.useFakeTimers`](#vi-usefaketimers) call. It will not fire any timer that was initiated during its call. -```ts +```ts twoslash +import { vi } from 'vitest' +// ---cut--- let i = 0 setInterval(() => console.log(++i), 50) @@ -694,7 +714,9 @@ vi.runOnlyPendingTimers() This method will asynchronously call every timer that was initiated after [`vi.useFakeTimers`](#vi-usefaketimers) call, even asynchronous ones. It will not fire any timer that was initiated during its call. -```ts +```ts twoslash +import { vi } from 'vitest' +// ---cut--- setTimeout(() => { console.log(1) }, 100) @@ -723,7 +745,9 @@ If fake timers are enabled, this method simulates a user changing the system clo Useful if you need to test anything that depends on the current date - for example [Luxon](https://github.com/moment/luxon/) calls inside your code. -```ts +```ts twoslash +import { expect, vi } from 'vitest' +// ---cut--- const date = new Date(1998, 11, 19) vi.useFakeTimers() @@ -832,7 +856,7 @@ This is similar to `vi.waitFor`, but if the callback throws any errors, executio Look at the example below. We can use `vi.waitUntil` to wait for the element to appear on the page, and then we can do something with the element. -```ts +```ts twoslash import { expect, test, vi } from 'vitest' test('Element render correctly', async () => { diff --git a/docs/config/file.md b/docs/config/file.md index c92899ce0629..7fdfc47a665a 100644 --- a/docs/config/file.md +++ b/docs/config/file.md @@ -14,7 +14,7 @@ To configure `vitest` itself, add `test` property in your Vite config. You'll al Using `defineConfig` from `vite` you should follow this: -```ts +```ts twoslash /// import { defineConfig } from 'vite' @@ -27,7 +27,7 @@ export default defineConfig({ Using `defineConfig` from `vitest/config` you should follow this: -```ts +```ts twoslash import { defineConfig } from 'vitest/config' export default defineConfig({ diff --git a/docs/guide/coverage.md b/docs/guide/coverage.md index 9e5c12fba91f..09f1c59d3cab 100644 --- a/docs/guide/coverage.md +++ b/docs/guide/coverage.md @@ -16,7 +16,7 @@ Both `v8` and `istanbul` support are optional. By default, `v8` will be used. You can select the coverage tool by setting `test.coverage.provider` to `v8` or `istanbul`: -```ts +```ts twoslash // vitest.config.ts import { defineConfig } from 'vitest/config' @@ -62,7 +62,7 @@ By default, reporter `['text', 'html', 'clover', 'json']` will be used. To configure it, set `test.coverage` options in your config file: -```ts +```ts twoslash // vitest.config.ts import { defineConfig } from 'vitest/config' @@ -80,7 +80,6 @@ export default defineConfig({ You can use custom coverage reporters by passing either the name of the package or absolute path in `test.coverage.reporter`: ```ts -// vitest.config.ts import { defineConfig } from 'vitest/config' export default defineConfig({ @@ -100,7 +99,7 @@ export default defineConfig({ Custom reporters are loaded by Istanbul and must match its reporter interface. See [built-in reporters' implementation](https://github.com/istanbuljs/istanbuljs/tree/master/packages/istanbul-reports/lib) for reference. -```js +```js twoslash // custom-reporter.cjs const { ReportBase } = require('istanbul-lib-report') @@ -128,7 +127,7 @@ module.exports = class CustomReporter extends ReportBase { It's also possible to provide your custom coverage provider by passing `'custom'` in `test.coverage.provider`: -```ts +```ts twoslash // vitest.config.ts import { defineConfig } from 'vitest/config' @@ -176,7 +175,7 @@ Please refer to the type definition for more details. When running a coverage report, a `coverage` folder is created in the root directory of your project. If you want to move it to a different directory, use the `test.coverage.reportsDirectory` property in the `vite.config.js` file. -```js +```js twoslash import { defineConfig } from 'vite' export default defineConfig({ diff --git a/docs/guide/environment.md b/docs/guide/environment.md index 51c077a9d419..c324913c9cbb 100644 --- a/docs/guide/environment.md +++ b/docs/guide/environment.md @@ -17,7 +17,7 @@ By default, you can use these environments: When setting `environment` option in your config, it will apply to all the test files in your project. To have more fine-grained control, you can use control comments to specify environment for specific files. Control comments are comments that start with `@vitest-environment` and are followed by the environment name: -```ts +```ts twoslash // @vitest-environment jsdom import { expect, test } from 'vitest' @@ -33,7 +33,7 @@ Or you can also set [`environmentMatchGlobs`](https://vitest.dev/config/#environ Starting from 0.23.0, you can create your own package to extend Vitest environment. To do so, create package with the name `vitest-environment-${name}` or specify a path to a valid JS/TS file (supported since 0.34.0). That package should export an object with the shape of `Environment`: -```ts +```ts twoslash import type { Environment } from 'vitest' export default { @@ -69,7 +69,7 @@ Since 0.34.0 Vitest requires `transformMode` option on environment object. It sh You also have access to default Vitest environments through `vitest/environments` entry: -```ts +```ts twoslash import { builtinEnvironments, populateGlobal } from 'vitest/environments' console.log(builtinEnvironments) // { jsdom, happy-dom, node, edge-runtime } diff --git a/docs/guide/features.md b/docs/guide/features.md index d44a9c381d67..39c1bee5abdd 100644 --- a/docs/guide/features.md +++ b/docs/guide/features.md @@ -48,7 +48,7 @@ Learn more about [Test Filtering](/guide/filtering). Use `.concurrent` in consecutive tests to run them in parallel. -```ts +```ts twoslash import { describe, it } from 'vitest' // The two tests marked with concurrent will be run in parallel @@ -61,7 +61,7 @@ describe('suite', () => { If you use `.concurrent` on a suite, every test in it will be run in parallel. -```ts +```ts twoslash import { describe, it } from 'vitest' // All tests within this suite will be run in parallel @@ -103,7 +103,7 @@ Notice that if you are using third-party libraries that add matchers, setting `t [Tinyspy](https://github.com/tinylibs/tinyspy) is built-in for mocking with `jest`-compatible APIs on `vi` object. -```ts +```ts twoslash import { expect, vi } from 'vitest' const fn = vi.fn() @@ -130,7 +130,7 @@ $ npm i -D jsdom After that, change the `environment` option in your config file: -```ts +```ts twoslash // vitest.config.ts import { defineConfig } from 'vitest/config' @@ -190,7 +190,7 @@ Learn more at [In-source testing](/guide/in-source). Since Vitest 0.23.0, you can run benchmark tests with [`bench`](/api/#bench) function via [Tinybench](https://github.com/tinylibs/tinybench) to compare performance results. -```ts +```ts twoslash import { bench, describe } from 'vitest' describe('sort', () => { diff --git a/docs/guide/filtering.md b/docs/guide/filtering.md index 462d3cf95674..bc11d553aa66 100644 --- a/docs/guide/filtering.md +++ b/docs/guide/filtering.md @@ -28,7 +28,7 @@ You can also use the `-t, --testNamePattern ` option to filter tests by You can optionally pass a timeout in milliseconds as third argument to tests. The default is 5 seconds. -```ts +```ts twoslash import { test } from 'vitest' test('name', async () => { /* ... */ }, 1000) @@ -36,7 +36,7 @@ test('name', async () => { /* ... */ }, 1000) Hooks also can receive a timeout, with the same 5 seconds default. -```ts +```ts twoslash import { beforeAll } from 'vitest' beforeAll(async () => { /* ... */ }, 1000) @@ -46,7 +46,7 @@ beforeAll(async () => { /* ... */ }, 1000) Use `.skip` to avoid running certain suites or tests -```ts +```ts twoslash import { assert, describe, it } from 'vitest' describe.skip('skipped suite', () => { @@ -68,7 +68,7 @@ describe('suite', () => { Use `.only` to only run certain suites or tests -```ts +```ts twoslash import { assert, describe, it } from 'vitest' // Only this suite (and others marked with only) are run @@ -95,7 +95,7 @@ describe('another suite', () => { Use `.todo` to stub suites and tests that should be implemented -```ts +```ts twoslash import { describe, it } from 'vitest' // An entry will be shown in the report for this suite diff --git a/docs/guide/index.md b/docs/guide/index.md index 119d4400ec0f..36530fd8a5b6 100644 --- a/docs/guide/index.md +++ b/docs/guide/index.md @@ -102,7 +102,7 @@ Vitest supports the same extensions for your configuration file as Vite does: `. If you are not using Vite as your build tool, you can configure Vitest using the `test` property in your config file: -```ts +```ts twoslash import { defineConfig } from 'vitest/config' export default defineConfig({ @@ -162,7 +162,7 @@ But we recommend to use the same file for both Vite and Vitest instead of creati Run different project configurations inside the same project with [Vitest Workspaces](/guide/workspace). You can define a list of files and folders that define your workspace in `vitest.workspace` file. The file supports `js`/`ts`/`json` extensions. This feature works great with monorepo setups. -```ts +```ts twoslash import { defineWorkspace } from 'vitest/config' export default defineWorkspace([ diff --git a/docs/guide/migration.md b/docs/guide/migration.md index 8f9173906dec..07c6eee553e9 100644 --- a/docs/guide/migration.md +++ b/docs/guide/migration.md @@ -269,7 +269,7 @@ This is not a Jest-specific feature, but if you previously were using Jest with `vite.config.js` -```js +```js twoslash import { defineConfig } from 'vite' export default defineConfig({ diff --git a/docs/guide/mocking.md b/docs/guide/mocking.md index 60d4dce64920..7dae1a349ae4 100644 --- a/docs/guide/mocking.md +++ b/docs/guide/mocking.md @@ -18,7 +18,7 @@ Sometimes you need to be in control of the date to ensure consistency when testi ### Example -```js +```js twoslash import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' const businessHours = [9, 17] @@ -76,7 +76,7 @@ We use [Tinyspy](https://github.com/tinylibs/tinyspy) as a base for mocking func ### Example -```js +```js twoslash import { afterEach, describe, expect, it, vi } from 'vitest' function getLatest(index = messages.items.length - 1) { @@ -137,7 +137,7 @@ describe('reading messages', () => { You can mock global variables that are not present with `jsdom` or `node` by using [`vi.stubGlobal`](/api/vi#vi-stubglobal) helper. It will put the value of the global variable into a `globalThis` object. -```ts +```ts twoslash import { vi } from 'vitest' const IntersectionObserverMock = vi.fn(() => ({ @@ -365,7 +365,7 @@ Mock Service Worker (MSW) works by intercepting the requests your tests make, al ### Configuration You can use it like below in your [setup file](/config/#setupfiles) -```js +```js twoslash import { afterAll, afterEach, beforeAll } from 'vitest' import { setupServer } from 'msw/node' import { HttpResponse, graphql, http } from 'msw' @@ -425,7 +425,7 @@ See the [`vi.useFakeTimers` API section](/api/vi#vi-usefaketimers) for a more in ### Example -```js +```js twoslash import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' function executeAfterTwoHours(func) { diff --git a/docs/guide/reporters.md b/docs/guide/reporters.md index ca4e19ec8fa2..617bd791fadc 100644 --- a/docs/guide/reporters.md +++ b/docs/guide/reporters.md @@ -15,7 +15,7 @@ npx vitest --reporter=verbose Using reporters via [`vitest.config.ts`](/config/): -```ts +```ts twoslash /// import { defineConfig } from 'vite' diff --git a/docs/guide/snapshot.md b/docs/guide/snapshot.md index b470636a8adf..97528f99cd3b 100644 --- a/docs/guide/snapshot.md +++ b/docs/guide/snapshot.md @@ -14,7 +14,11 @@ When using snapshot, Vitest will take a snapshot of the given value, then compar To snapshot a value, you can use the [`toMatchSnapshot()`](/api/expect#tomatchsnapshot) from `expect()` API: -```ts +```ts twoslash +function toUpperCase(str: string) { + return str +} +// ---cut--- import { expect, it } from 'vitest' it('toUpperCase', () => { @@ -41,7 +45,11 @@ When using Snapshots with async concurrent tests, `expect` from the local [Test Similarly, you can use the [`toMatchInlineSnapshot()`](/api/expect#tomatchinlinesnapshot) to store the snapshot inline within the test file. -```ts +```ts twoslash +function toUpperCase(str: string) { + return str +} +// ---cut--- import { expect, it } from 'vitest' it('toUpperCase', () => { @@ -52,7 +60,11 @@ it('toUpperCase', () => { Instead of creating a snapshot file, Vitest will modify the test file directly to update the snapshot as a string: -```ts +```ts twoslash +function toUpperCase(str: string) { + return str +} +// ---cut--- import { expect, it } from 'vitest' it('toUpperCase', () => { @@ -212,7 +224,7 @@ This does not really affect the functionality but might affect your commit diff Both Jest and Vitest's snapshots are powered by [`pretty-format`](https://github.com/facebook/jest/blob/main/packages/pretty-format). In Vitest we set `printBasicPrototype` default to `false` to provide a cleaner snapshot output, while in Jest <29.0.0 it's `true` by default. -```ts +```ts twoslash import { expect, test } from 'vitest' test('snapshot', () => { @@ -280,7 +292,9 @@ exports[`toThrowErrorMatchingSnapshot > hint 1`] = `[Error: error]`; #### 4. default `Error` snapshot is different for `toThrowErrorMatchingSnapshot` and `toThrowErrorMatchingInlineSnapshot` -```js +```js twoslash +import { expect, test } from 'vitest' +// ---cut--- test('snapshot', () => { // // in Jest diff --git a/docs/guide/test-context.md b/docs/guide/test-context.md index 9887baf282c0..2172f698ab0d 100644 --- a/docs/guide/test-context.md +++ b/docs/guide/test-context.md @@ -10,7 +10,7 @@ Inspired by [Playwright Fixtures](https://playwright.dev/docs/test-fixtures), Vi The first argument for each test callback is a test context. -```ts +```ts twoslash import { it } from 'vitest' it('should work', (ctx) => { @@ -29,7 +29,7 @@ A readonly object containing metadata about the test. The `expect` API bound to the current test: -```ts +```ts twoslash import { it } from 'vitest' it('math is easy', ({ expect }) => { @@ -39,7 +39,7 @@ it('math is easy', ({ expect }) => { This API is useful for running snapshot tests concurrently because global expect cannot track them: -```ts +```ts twoslash import { it } from 'vitest' it.concurrent('math is easy', ({ expect }) => { diff --git a/docs/guide/workspace.md b/docs/guide/workspace.md index 885353ad40cd..70818b605ca1 100644 --- a/docs/guide/workspace.md +++ b/docs/guide/workspace.md @@ -51,7 +51,7 @@ If you are referencing filenames with glob pattern, make sure your config file s You can also define projects with inline config. Workspace file supports using both syntaxes at the same time. :::code-group -```ts [vitest.workspace.ts] +```ts [vitest.workspace.ts] twoslash import { defineWorkspace } from 'vitest/config' // defineWorkspace provides a nice type hinting DX @@ -95,7 +95,7 @@ If you don't rely on inline configs, you can just create a small json file in yo Workspace projects don't support all configuration properties. For better type safety, use `defineProject` instead of `defineConfig` method inside project configuration files: :::code-group -```ts [packages/a/vitest.config.ts] +```ts [packages/a/vitest.config.ts] twoslash import { defineProject } from 'vitest/config' export default defineProject({ diff --git a/docs/package.json b/docs/package.json index 968018df12d3..1a4dca76a20f 100644 --- a/docs/package.json +++ b/docs/package.json @@ -19,6 +19,7 @@ "devDependencies": { "@iconify-json/carbon": "^1.1.28", "@iconify-json/logos": "^1.1.42", + "@shikijs/vitepress-twoslash": "^1.2.4", "@unocss/reset": "^0.57.4", "@vite-pwa/assets-generator": "^0.0.11", "@vite-pwa/vitepress": "^0.2.3", @@ -29,7 +30,7 @@ "unplugin-vue-components": "^0.25.2", "vite": "^5.0.0", "vite-plugin-pwa": "^0.16.7", - "vitepress": "^1.0.0-rc.35", + "vitepress": "1.0.0", "workbox-window": "^7.0.0" } } diff --git a/netlify.toml b/netlify.toml index 7b5bdab9f5f1..e7848797fbad 100755 --- a/netlify.toml +++ b/netlify.toml @@ -1,6 +1,6 @@ [build] publish = "docs/.vitepress/dist" -command = "pnpm docs:build" +command = "pnpm ci:docs" ignore = "git diff --quiet $COMMIT_REF $CACHED_COMMIT_REF -- docs/ package.json pnpm-lock.yaml" [build.environment] diff --git a/package.json b/package.json index c39a0a83005b..52f2f8488265 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ }, "scripts": { "ci": "ni && nr typecheck && nr lint && nr build && nr test:all", + "ci:docs": "pnpm run build && pnpm run docs:build", "build": "pnpm -r --filter='./packages/**' run build", "dev": "NODE_OPTIONS=\"--max-old-space-size=8192\" pnpm -r --parallel --filter='./packages/**' run dev", "docs": "pnpm -C docs run dev", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4cf2d36dc0d0..17933f7eb969 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -32,7 +32,7 @@ importers: devDependencies: '@antfu/eslint-config': specifier: ^2.6.4 - version: 2.6.4(@vue/compiler-sfc@3.4.5)(eslint@8.54.0)(typescript@5.2.2)(vitest@packages+vitest) + version: 2.6.4(@vue/compiler-sfc@3.4.21)(eslint@8.54.0)(typescript@5.2.2)(vitest@packages+vitest) '@antfu/ni': specifier: ^0.21.12 version: 0.21.12 @@ -136,6 +136,9 @@ importers: '@iconify-json/logos': specifier: ^1.1.42 version: 1.1.42 + '@shikijs/vitepress-twoslash': + specifier: ^1.2.4 + version: 1.2.4(typescript@5.2.2) '@unocss/reset': specifier: ^0.57.4 version: 0.57.4 @@ -167,8 +170,8 @@ importers: specifier: ^0.16.7 version: 0.16.7(vite@5.2.6)(workbox-build@7.0.0)(workbox-window@7.0.0) vitepress: - specifier: ^1.0.0-rc.35 - version: 1.0.0-rc.35(@types/node@20.11.5)(postcss@8.4.38)(search-insights@2.9.0)(typescript@5.2.2) + specifier: 1.0.0 + version: 1.0.0(@types/node@20.11.5)(postcss@8.4.38)(search-insights@2.9.0)(typescript@5.2.2) workbox-window: specifier: ^7.0.0 version: 7.0.0 @@ -1264,7 +1267,7 @@ importers: version: 5.2.6(@types/node@20.11.5)(less@4.1.3) vite-plugin-pages: specifier: ^0.31.0 - version: 0.31.0(@vue/compiler-sfc@3.4.5)(vite@5.2.6) + version: 0.31.0(@vue/compiler-sfc@3.4.21)(vite@5.2.6) vue: specifier: ^3.3.8 version: 3.3.8(typescript@5.2.2) @@ -2329,7 +2332,7 @@ packages: '@jridgewell/gen-mapping': 0.3.2 '@jridgewell/trace-mapping': 0.3.18 - /@antfu/eslint-config@2.6.4(@vue/compiler-sfc@3.4.5)(eslint@8.54.0)(typescript@5.2.2)(vitest@packages+vitest): + /@antfu/eslint-config@2.6.4(@vue/compiler-sfc@3.4.21)(eslint@8.54.0)(typescript@5.2.2)(vitest@packages+vitest): resolution: {integrity: sha512-dMD/QC5KWS1OltdpKLhfZM7W7y7zils85opk8d4lyNr7yn0OFjZs7eMYtcC6DrrN2kQ1JrFvBM7uB0QdWn5PUQ==} hasBin: true peerDependencies: @@ -2383,7 +2386,7 @@ packages: eslint-plugin-vitest: 0.3.22(@typescript-eslint/eslint-plugin@6.21.0)(eslint@8.54.0)(typescript@5.2.2)(vitest@packages+vitest) eslint-plugin-vue: 9.21.1(eslint@8.54.0) eslint-plugin-yml: 1.12.2(eslint@8.54.0) - eslint-processor-vue-blocks: 0.1.1(@vue/compiler-sfc@3.4.5)(eslint@8.54.0) + eslint-processor-vue-blocks: 0.1.1(@vue/compiler-sfc@3.4.21)(eslint@8.54.0) globals: 13.24.0 jsonc-eslint-parser: 2.4.0 local-pkg: 0.5.0 @@ -2934,6 +2937,14 @@ packages: dependencies: '@babel/types': 7.23.6 + /@babel/parser@7.24.4: + resolution: {integrity: sha512-zTvEBcghmeBma9QIGunWevvBAp4/Qu9Bdq+2k0Ot4fVMD6v3dsC9WOcRSKk7tRRyBM/53yKMJko9xOatGQAwSg==} + engines: {node: '>=6.0.0'} + hasBin: true + dependencies: + '@babel/types': 7.24.0 + dev: true + /@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.18.6(@babel/core@7.23.3): resolution: {integrity: sha512-Dgxsyg54Fx1d4Nge8UnvTrED63vrwOdPmyvPzlNN/boaliRP54pm3pGzZD1SJUwrBA+Cs/xdG8kXX6Mn/RfISQ==} engines: {node: '>=6.9.0'} @@ -4975,14 +4986,14 @@ packages: engines: {node: '>=10.0.0'} dev: true - /@docsearch/css@3.5.2: - resolution: {integrity: sha512-SPiDHaWKQZpwR2siD0KQUwlStvIAnEyK6tAE2h2Wuoq8ue9skzhlyVQ1ddzOxX6khULnAALDiR/isSF3bnuciA==} + /@docsearch/css@3.6.0: + resolution: {integrity: sha512-+sbxb71sWre+PwDK7X2T8+bhS6clcVMLwBPznX45Qu6opJcgRjAp7gYSDzVFp187J+feSj5dNBN1mJoi6ckkUQ==} dev: true - /@docsearch/js@3.5.2(search-insights@2.9.0): - resolution: {integrity: sha512-p1YFTCDflk8ieHgFJYfmyHBki1D61+U9idwrLh+GQQMrBSP3DLGKpy0XUJtPjAOPltcVbqsTjiPFfH7JImjUNg==} + /@docsearch/js@3.6.0(search-insights@2.9.0): + resolution: {integrity: sha512-QujhqINEElrkIfKwyyyTfbsfMAYCkylInLYMRqHy7PHc8xTBQCow73tlo/Kc7oIwBrCLf0P3YhjlOeV4v8hevQ==} dependencies: - '@docsearch/react': 3.5.2(search-insights@2.9.0) + '@docsearch/react': 3.6.0(search-insights@2.9.0) preact: 10.15.1 transitivePeerDependencies: - '@algolia/client-search' @@ -4992,8 +5003,8 @@ packages: - search-insights dev: true - /@docsearch/react@3.5.2(search-insights@2.9.0): - resolution: {integrity: sha512-9Ahcrs5z2jq/DcAvYtvlqEBHImbm4YJI8M9y0x6Tqg598P40HTEkX7hsMcIuThI+hTFxRGZ9hll0Wygm2yEjng==} + /@docsearch/react@3.6.0(search-insights@2.9.0): + resolution: {integrity: sha512-HUFut4ztcVNmqy9gp/wxNbC7pTOHhgVVkHVGCACTuLhUKUhKAF9KYHJtMiLUJxEqiFLQiuri1fWF8zqwM/cu1w==} peerDependencies: '@types/react': '>= 16.8.0 < 19.0.0' react: '>= 16.8.0 < 19.0.0' @@ -5011,7 +5022,7 @@ packages: dependencies: '@algolia/autocomplete-core': 1.9.3(algoliasearch@4.20.0)(search-insights@2.9.0) '@algolia/autocomplete-preset-algolia': 1.9.3(algoliasearch@4.20.0) - '@docsearch/css': 3.5.2 + '@docsearch/css': 3.6.0 algoliasearch: 4.20.0 search-insights: 2.9.0 transitivePeerDependencies: @@ -7572,6 +7583,44 @@ packages: requiresBuild: true optional: true + /@shikijs/core@1.2.4: + resolution: {integrity: sha512-ClaUWpt8oTzjcF0MM1P81AeWyzc1sNSJlAjMG80CbwqbFqXSNz+NpQVUC0icobt3sZn43Sn27M4pHD/Jmp3zHw==} + dev: true + + /@shikijs/transformers@1.2.4: + resolution: {integrity: sha512-ysGkpsHxRxLmz8nGKeFdV+gKj1NXt+88sM/34kfKVWTWIXg5gsFOJxJBbG7k+fUR5JlD6sNh65W9qPXrbVE1wQ==} + dependencies: + shiki: 1.2.4 + dev: true + + /@shikijs/twoslash@1.2.4(typescript@5.2.2): + resolution: {integrity: sha512-4F2gNlCFN9HY0jV3J/IBfqkI7w2HBwycwUBx9fLYGYxzbfu0gYRJdQYWtvJC/sG2rYTYlJrS5BpWdXYoMHwbXw==} + dependencies: + '@shikijs/core': 1.2.4 + twoslash: 0.2.5(typescript@5.2.2) + transitivePeerDependencies: + - supports-color + - typescript + dev: true + + /@shikijs/vitepress-twoslash@1.2.4(typescript@5.2.2): + resolution: {integrity: sha512-LI8Q8A08dRQpEEiespjTBGcT2i+0Uf3Z03FE+okBlObd4Wf+Sq/YNiLR6ga/7V2z/vhktRwcb/2O3+UZMRiEKg==} + dependencies: + '@shikijs/twoslash': 1.2.4(typescript@5.2.2) + floating-vue: 5.2.2(vue@3.4.21) + mdast-util-from-markdown: 2.0.0 + mdast-util-gfm: 3.0.0 + mdast-util-to-hast: 13.1.0 + shiki: 1.2.4 + twoslash: 0.2.5(typescript@5.2.2) + twoslash-vue: 0.2.5(typescript@5.2.2) + vue: 3.4.21(typescript@5.2.2) + transitivePeerDependencies: + - '@nuxt/kit' + - supports-color + - typescript + dev: true + /@sinclair/typebox@0.25.24: resolution: {integrity: sha512-XJfwUVUKDHF5ugKwIcxEgc9k8b7HbznCp6eUfWgu710hMPNIO4aw4/zB5RogDQz8nd6gyCDpU9O/m6qYEWY6yQ==} dev: true @@ -9807,6 +9856,12 @@ packages: '@types/unist': 2.0.6 dev: true + /@types/hast@3.0.4: + resolution: {integrity: sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==} + dependencies: + '@types/unist': 2.0.6 + dev: true + /@types/html-minifier-terser@5.1.2: resolution: {integrity: sha512-h4lTMgMJctJybDp8CQrxTUiiYmedihHWkjnF/8Pxseu2S6Nlfcy8kwboQ8yejh456rP2yWoEVm1sS/FVsfM48w==} dev: true @@ -9917,6 +9972,12 @@ packages: '@types/unist': 2.0.6 dev: true + /@types/mdast@4.0.3: + resolution: {integrity: sha512-LsjtqsyF+d2/yFOYaN22dHZI1Cpwkrj+g06G8+qtUKlhovPW89YhqSnfKtMbkgmEtYpH2gydRNULd6y8mciAFg==} + dependencies: + '@types/unist': 3.0.2 + dev: true + /@types/mdurl@1.0.4: resolution: {integrity: sha512-ARVxjAEX5TARFRzpDRVC6cEk0hUIXCCwaMhz8y7S1/PxU6zZS1UMjyobz7q4w/D/R552r4++EhwmXK1N2rAy0A==} dev: true @@ -10252,6 +10313,10 @@ packages: resolution: {integrity: sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ==} dev: true + /@types/unist@3.0.2: + resolution: {integrity: sha512-dqId9J8K/vGi5Zr7oo212BGii5m3q5Hxlkwy3WpYuKPklmBEvsbMYYyLxAQpSffdLl/gdW0XUpKWFvYmyoWCoQ==} + dev: true + /@types/web-bluetooth@0.0.14: resolution: {integrity: sha512-5d2RhCard1nQUC3aHcq/gHzWYO6K0WJmAbjO7mQJgCQKtZpgXxv1rOM6O/dBDhDYYVutk1sciOgNSe+5YyfM8A==} dev: false @@ -10458,6 +10523,14 @@ packages: eslint-visitor-keys: 3.4.3 dev: true + /@typescript/vfs@1.5.0: + resolution: {integrity: sha512-AJS307bPgbsZZ9ggCT3wwpg3VbTKMFNHfaY/uF0ahSkYYrPF2dSSKDNIDIQAHm9qJqbLvCsSJH7yN4Vs/CsMMg==} + dependencies: + debug: 4.3.4(supports-color@8.1.1) + transitivePeerDependencies: + - supports-color + dev: true + /@ungap/structured-clone@1.2.0: resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} dev: true @@ -10792,26 +10865,26 @@ packages: vue: 3.3.8(typescript@5.2.2) dev: true - /@vitejs/plugin-vue@5.0.2(vite@5.2.6)(vue@3.4.5): - resolution: {integrity: sha512-kEjJHrLb5ePBvjD0SPZwJlw1QTRcjjCA9sB5VyfonoXVBxTS7TMnqL6EkLt1Eu61RDeiuZ/WN9Hf6PxXhPI2uA==} + /@vitejs/plugin-vue@5.0.3(vite@5.2.6)(vue@3.3.8): + resolution: {integrity: sha512-b8S5dVS40rgHdDrw+DQi/xOM9ed+kSRZzfm1T74bMmBDCd8XO87NKlFYInzCtwvtWwXZvo1QxE2OSspTATWrbA==} engines: {node: ^18.0.0 || >=20.0.0} peerDependencies: vite: ^5.2.6 vue: ^3.2.25 dependencies: vite: 5.2.6(@types/node@20.11.5)(less@4.1.3) - vue: 3.4.5(typescript@5.2.2) + vue: 3.3.8(typescript@5.2.2) dev: true - /@vitejs/plugin-vue@5.0.3(vite@5.2.6)(vue@3.3.8): - resolution: {integrity: sha512-b8S5dVS40rgHdDrw+DQi/xOM9ed+kSRZzfm1T74bMmBDCd8XO87NKlFYInzCtwvtWwXZvo1QxE2OSspTATWrbA==} + /@vitejs/plugin-vue@5.0.4(vite@5.2.6)(vue@3.4.21): + resolution: {integrity: sha512-WS3hevEszI6CEVEx28F8RjTX97k3KsrcY6kvTg7+Whm5y3oYvcqzVeGCU3hxSAn4uY2CLCkeokkGKpoctccilQ==} engines: {node: ^18.0.0 || >=20.0.0} peerDependencies: vite: ^5.2.6 vue: ^3.2.25 dependencies: vite: 5.2.6(@types/node@20.11.5)(less@4.1.3) - vue: 3.3.8(typescript@5.2.2) + vue: 3.4.21(typescript@5.2.2) dev: true /@volar/language-core@1.10.4: @@ -10820,12 +10893,24 @@ packages: '@volar/source-map': 1.10.4 dev: true + /@volar/language-core@1.11.1: + resolution: {integrity: sha512-dOcNn3i9GgZAcJt43wuaEykSluAuOkQgzni1cuxLxTV0nJKanQztp7FxyswdRILaKH+P2XZMPRp2S4MV/pElCw==} + dependencies: + '@volar/source-map': 1.11.1 + dev: true + /@volar/source-map@1.10.4: resolution: {integrity: sha512-RxZdUEL+pV8p+SMqnhVjzy5zpb1QRZTlcwSk4bdcBO7yOu4rtEWqDGahVCEj4CcXour+0yJUMrMczfSCpP9Uxg==} dependencies: muggle-string: 0.3.1 dev: true + /@volar/source-map@1.11.1: + resolution: {integrity: sha512-hJnOnwZ4+WT5iupLRnuzbULZ42L7BWWPMmruzwtLhJfpDVoZLjNBxHDi2sY2bgZXCKlpU5XcsMFoYrsQmPhfZg==} + dependencies: + muggle-string: 0.3.1 + dev: true + /@volar/typescript@1.10.4: resolution: {integrity: sha512-BCCUEBASBEMCrz7qmNSi2hBEWYsXD0doaktRKpmmhvb6XntM2sAWYu6gbyK/MluLDgluGLFiFRpWgobgzUqolg==} dependencies: @@ -10863,6 +10948,16 @@ packages: estree-walker: 2.0.2 source-map-js: 1.0.2 + /@vue/compiler-core@3.4.21: + resolution: {integrity: sha512-MjXawxZf2SbZszLPYxaFCjxfibYrzr3eYbKxwpLR9EQN+oaziSu3qKVbwBERj1IFIB8OLUewxB5m/BFzi613og==} + dependencies: + '@babel/parser': 7.24.4 + '@vue/shared': 3.4.21 + entities: 4.5.0 + estree-walker: 2.0.2 + source-map-js: 1.2.0 + dev: true + /@vue/compiler-core@3.4.5: resolution: {integrity: sha512-Daka7P1z2AgKjzuueWXhwzIsKu0NkLB6vGbNVEV2iJ8GJTrzraZo/Sk4GWCMRtd/qVi3zwnk+Owbd/xSZbwHtQ==} dependencies: @@ -10879,6 +10974,13 @@ packages: '@vue/compiler-core': 3.3.8 '@vue/shared': 3.3.8 + /@vue/compiler-dom@3.4.21: + resolution: {integrity: sha512-IZC6FKowtT1sl0CR5DpXSiEB5ayw75oT2bma1BEhV7RRR1+cfwLrxc2Z8Zq/RGFzJ8w5r9QtCOvTjQgdn0IKmA==} + dependencies: + '@vue/compiler-core': 3.4.21 + '@vue/shared': 3.4.21 + dev: true + /@vue/compiler-dom@3.4.5: resolution: {integrity: sha512-J8YlxknJVd90SXFJ4HwGANSAXsx5I0lK30sO/zvYV7s5gXf7gZR7r/1BmZ2ju7RGH1lnc6bpBc6nL61yW+PsAQ==} dependencies: @@ -10890,7 +10992,7 @@ packages: resolution: {integrity: sha512-55Shns6WPxlYsz4WX7q9ZJBL77sKE1ZAYNYStLs6GbhIOMrNtjMvzcob6gu3cGlfpCR4bT7NXgyJ3tly2+Hx8Q==} dependencies: '@babel/parser': 7.23.6 - postcss: 8.4.32 + postcss: 8.4.38 source-map: 0.6.1 dev: true @@ -10908,18 +11010,18 @@ packages: postcss: 8.4.31 source-map-js: 1.0.2 - /@vue/compiler-sfc@3.4.5: - resolution: {integrity: sha512-jauvkDuSSUbP0ebhfNqljhShA90YEfX/0wZ+w40oZF43IjGyWYjqYaJbvMJwGOd+9+vODW6eSvnk28f0SGV7OQ==} + /@vue/compiler-sfc@3.4.21: + resolution: {integrity: sha512-me7epoTxYlY+2CUM7hy9PCDdpMPfIwrOvAXud2Upk10g4YLv9UBW7kL798TvMeDhPthkZ0CONNrK2GoeI1ODiQ==} dependencies: - '@babel/parser': 7.23.6 - '@vue/compiler-core': 3.4.5 - '@vue/compiler-dom': 3.4.5 - '@vue/compiler-ssr': 3.4.5 - '@vue/shared': 3.4.5 + '@babel/parser': 7.24.4 + '@vue/compiler-core': 3.4.21 + '@vue/compiler-dom': 3.4.21 + '@vue/compiler-ssr': 3.4.21 + '@vue/shared': 3.4.21 estree-walker: 2.0.2 - magic-string: 0.30.5 - postcss: 8.4.32 - source-map-js: 1.0.2 + magic-string: 0.30.9 + postcss: 8.4.38 + source-map-js: 1.2.0 dev: true /@vue/compiler-ssr@3.3.8: @@ -10928,17 +11030,44 @@ packages: '@vue/compiler-dom': 3.3.8 '@vue/shared': 3.3.8 - /@vue/compiler-ssr@3.4.5: - resolution: {integrity: sha512-DDdEcDzj2lWTMfUMMtEpLDhURai9LhM0zSZ219jCt7b2Vyl0/jy3keFgCPMitG0V1S1YG4Cmws3lWHWdxHQOpg==} + /@vue/compiler-ssr@3.4.21: + resolution: {integrity: sha512-M5+9nI2lPpAsgXOGQobnIueVqc9sisBFexh5yMIMRAPYLa7+5wEJs8iqOZc1WAa9WQbx9GR2twgznU8LTIiZ4Q==} dependencies: - '@vue/compiler-dom': 3.4.5 - '@vue/shared': 3.4.5 + '@vue/compiler-dom': 3.4.21 + '@vue/shared': 3.4.21 dev: true /@vue/devtools-api@6.5.1: resolution: {integrity: sha512-+KpckaAQyfbvshdDW5xQylLni1asvNSGme1JFs8I1+/H5pHEhqUKMEQD/qn3Nx5+/nycBq11qAEi8lk+LXI2dA==} dev: true + /@vue/devtools-api@7.0.25(vue@3.4.21): + resolution: {integrity: sha512-fL6DlRp4MSXCLYcqYvKU7QhQZWE3Hfu7X8pC25BS74coJi7uJeSWs4tmrITcwFihNmC9S5GPiffkMdckkeWjzg==} + dependencies: + '@vue/devtools-kit': 7.0.25(vue@3.4.21) + transitivePeerDependencies: + - vue + dev: true + + /@vue/devtools-kit@7.0.25(vue@3.4.21): + resolution: {integrity: sha512-wbLkSnOTsKHPb1mB9koFHUoSAF8Dp6Ii/ocR2+DeXFY4oKqIjCeJb/4Lihk4rgqEhCy1WwxLfTgNDo83VvDYkQ==} + peerDependencies: + vue: ^3.0.0 + dependencies: + '@vue/devtools-shared': 7.0.25 + hookable: 5.5.3 + mitt: 3.0.1 + perfect-debounce: 1.0.0 + speakingurl: 14.0.1 + vue: 3.4.21(typescript@5.2.2) + dev: true + + /@vue/devtools-shared@7.0.25: + resolution: {integrity: sha512-5+XYhcHSXuJSguYnNwL6/e6VTmXwCfryWQOkffh9ZU2zMByybqqqBrMWqvBkqTmMFCjPdzulo66xXbVbwLaElQ==} + dependencies: + rfdc: 1.3.1 + dev: true + /@vue/language-core@1.8.20(typescript@5.2.2): resolution: {integrity: sha512-vNJaqjCTSrWEr+erSq6Rq0CqDC8MOAwyxirxwK8esOxd+1LmAUJUTG2p7I84Mj1Izy5uHiHQAkRTVR2QxMBY+A==} peerDependencies: @@ -10958,6 +11087,26 @@ packages: vue-template-compiler: 2.7.15 dev: true + /@vue/language-core@1.8.27(typescript@5.2.2): + resolution: {integrity: sha512-L8Kc27VdQserNaCUNiSFdDl9LWT24ly8Hpwf1ECy3aFb9m6bDhBGQYOujDm21N7EW3moKIOKEanQwe1q5BK+mA==} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@volar/language-core': 1.11.1 + '@volar/source-map': 1.11.1 + '@vue/compiler-dom': 3.4.5 + '@vue/shared': 3.4.5 + computeds: 0.0.1 + minimatch: 9.0.3 + muggle-string: 0.3.1 + path-browserify: 1.0.1 + typescript: 5.2.2 + vue-template-compiler: 2.7.15 + dev: true + /@vue/reactivity-transform@3.3.8: resolution: {integrity: sha512-49CvBzmZNtcHua0XJ7GdGifM8GOXoUMOX4dD40Y5DxI3R8OUhMlvf2nvgUAcPxaXiV5MQQ1Nwy09ADpnLQUqRw==} dependencies: @@ -10972,10 +11121,10 @@ packages: dependencies: '@vue/shared': 3.3.8 - /@vue/reactivity@3.4.5: - resolution: {integrity: sha512-BcWkKvjdvqJwb7BhhFkXPLDCecX4d4a6GATvCduJQDLv21PkPowAE5GKuIE5p6RC07/Lp9FMkkq4AYCTVF5KlQ==} + /@vue/reactivity@3.4.21: + resolution: {integrity: sha512-UhenImdc0L0/4ahGCyEzc/pZNwVgcglGy9HVzJ1Bq2Mm9qXOpP8RyNTjookw/gOCUlXSEtuZ2fUg5nrHcoqJcw==} dependencies: - '@vue/shared': 3.4.5 + '@vue/shared': 3.4.21 dev: true /@vue/runtime-core@3.3.8: @@ -10984,11 +11133,11 @@ packages: '@vue/reactivity': 3.3.8 '@vue/shared': 3.3.8 - /@vue/runtime-core@3.4.5: - resolution: {integrity: sha512-wh9ELIOQKeWT9SaUPdLrsxRkZv14jp+SJm9aiQGWio+/MWNM3Lib0wE6CoKEqQ9+SCYyGjDBhTOTtO47kCgbkg==} + /@vue/runtime-core@3.4.21: + resolution: {integrity: sha512-pQthsuYzE1XcGZznTKn73G0s14eCJcjaLvp3/DKeYWoFacD9glJoqlNBxt3W2c5S40t6CCcpPf+jG01N3ULyrA==} dependencies: - '@vue/reactivity': 3.4.5 - '@vue/shared': 3.4.5 + '@vue/reactivity': 3.4.21 + '@vue/shared': 3.4.21 dev: true /@vue/runtime-dom@3.3.8: @@ -10998,11 +11147,11 @@ packages: '@vue/shared': 3.3.8 csstype: 3.1.2 - /@vue/runtime-dom@3.4.5: - resolution: {integrity: sha512-n5ewvOjyG3IEpqGBahdPXODFSpVlSz3H4LF76Sx0XAqpIOqyJ5bIb2PrdYuH2ogBMAQPh+o5tnoH4nJpBr8U0Q==} + /@vue/runtime-dom@3.4.21: + resolution: {integrity: sha512-gvf+C9cFpevsQxbkRBS1NpU8CqxKw0ebqMvLwcGQrNpx6gqRDodqKqA+A2VZZpQ9RpK2f9yfg8VbW/EpdFUOJw==} dependencies: - '@vue/runtime-core': 3.4.5 - '@vue/shared': 3.4.5 + '@vue/runtime-core': 3.4.21 + '@vue/shared': 3.4.21 csstype: 3.1.3 dev: true @@ -11015,19 +11164,23 @@ packages: '@vue/shared': 3.3.8 vue: 3.3.8(typescript@5.2.2) - /@vue/server-renderer@3.4.5(vue@3.4.5): - resolution: {integrity: sha512-jOFc/VE87yvifQpNju12VcqimH8pBLxdcT+t3xMeiED1K6DfH9SORyhFEoZlW5TG2Vwfn3Ul5KE+1aC99xnSBg==} + /@vue/server-renderer@3.4.21(vue@3.4.21): + resolution: {integrity: sha512-aV1gXyKSN6Rz+6kZ6kr5+Ll14YzmIbeuWe7ryJl5muJ4uwSwY/aStXTixx76TwkZFJLm1aAlA/HSWEJ4EyiMkg==} peerDependencies: - vue: 3.4.5 + vue: 3.4.21 dependencies: - '@vue/compiler-ssr': 3.4.5 - '@vue/shared': 3.4.5 - vue: 3.4.5(typescript@5.2.2) + '@vue/compiler-ssr': 3.4.21 + '@vue/shared': 3.4.21 + vue: 3.4.21(typescript@5.2.2) dev: true /@vue/shared@3.3.8: resolution: {integrity: sha512-8PGwybFwM4x8pcfgqEQFy70NaQxASvOC5DJwLQfpArw1UDfUXrJkdxD3BhVTMS+0Lef/TU7YO0Jvr0jJY8T+mw==} + /@vue/shared@3.4.21: + resolution: {integrity: sha512-PuJe7vDIi6VYSinuEbUIQgMIRZGgM8e4R+G+/dQTk0X1NEdvgvvgv7m+rfmDH1gZzyA1OjjoWskvHlfRNfQf3g==} + dev: true + /@vue/shared@3.4.5: resolution: {integrity: sha512-6XptuzlMvN4l4cDnDw36pdGEV+9njYkQ1ZE0Q6iZLwrKefKaOJyiFmcP3/KBDHbt72cJZGtllAc1GaHe6XGAyg==} dev: true @@ -11074,13 +11227,13 @@ packages: - '@vue/composition-api' - vue - /@vueuse/core@10.7.1(vue@3.4.5): - resolution: {integrity: sha512-74mWHlaesJSWGp1ihg76vAnfVq9NTv1YT0SYhAQ6zwFNdBkkP+CKKJmVOEHcdSnLXCXYiL5e7MaewblfiYLP7g==} + /@vueuse/core@10.9.0(vue@3.4.21): + resolution: {integrity: sha512-/1vjTol8SXnx6xewDEKfS0Ra//ncg4Hb0DaZiwKf7drgfMsKFExQ+FnnENcN6efPen+1kIzhLQoGSy0eDUVOMg==} dependencies: '@types/web-bluetooth': 0.0.20 - '@vueuse/metadata': 10.7.1 - '@vueuse/shared': 10.7.1(vue@3.4.5) - vue-demi: 0.14.6(vue@3.4.5) + '@vueuse/metadata': 10.9.0 + '@vueuse/shared': 10.9.0(vue@3.4.21) + vue-demi: 0.14.7(vue@3.4.21) transitivePeerDependencies: - '@vue/composition-api' - vue @@ -11104,8 +11257,8 @@ packages: vue-demi: 0.14.6(vue@3.3.8) dev: false - /@vueuse/integrations@10.7.1(focus-trap@7.5.4)(vue@3.4.5): - resolution: {integrity: sha512-cKo5LEeKVHdBRBtMTOrDPdR0YNtrmN9IBfdcnY2P3m5LHVrsD0xiHUtAH1WKjHQRIErZG6rJUa6GA4tWZt89Og==} + /@vueuse/integrations@10.9.0(focus-trap@7.5.4)(vue@3.4.21): + resolution: {integrity: sha512-acK+A01AYdWSvL4BZmCoJAcyHJ6EqhmkQEXbQLwev1MY7NBnS+hcEMx/BzVoR9zKI+UqEPMD9u6PsyAuiTRT4Q==} peerDependencies: async-validator: '*' axios: '*' @@ -11145,10 +11298,10 @@ packages: universal-cookie: optional: true dependencies: - '@vueuse/core': 10.7.1(vue@3.4.5) - '@vueuse/shared': 10.7.1(vue@3.4.5) + '@vueuse/core': 10.9.0(vue@3.4.21) + '@vueuse/shared': 10.9.0(vue@3.4.21) focus-trap: 7.5.4 - vue-demi: 0.14.6(vue@3.4.5) + vue-demi: 0.14.7(vue@3.4.21) transitivePeerDependencies: - '@vue/composition-api' - vue @@ -11201,8 +11354,8 @@ packages: /@vueuse/metadata@10.6.1: resolution: {integrity: sha512-qhdwPI65Bgcj23e5lpGfQsxcy0bMjCAsUGoXkJ7DsoeDUdasbZ2DBa4dinFCOER3lF4gwUv+UD2AlA11zdzMFw==} - /@vueuse/metadata@10.7.1: - resolution: {integrity: sha512-jX8MbX5UX067DYVsbtrmKn6eG6KMcXxLRLlurGkZku5ZYT3vxgBjui2zajvUZ18QLIjrgBkFRsu7CqTAg18QFw==} + /@vueuse/metadata@10.9.0: + resolution: {integrity: sha512-iddNbg3yZM0X7qFY2sAotomgdHK7YJ6sKUvQqbvwnf7TmaVPxS4EJydcNsVejNdS8iWCtDk+fYXr7E32nyTnGA==} dev: true /@vueuse/metadata@8.9.4: @@ -11217,10 +11370,10 @@ packages: - '@vue/composition-api' - vue - /@vueuse/shared@10.7.1(vue@3.4.5): - resolution: {integrity: sha512-v0jbRR31LSgRY/C5i5X279A/WQjD6/JsMzGa+eqt658oJ75IvQXAeONmwvEMrvJQKnRElq/frzBR7fhmWY5uLw==} + /@vueuse/shared@10.9.0(vue@3.4.21): + resolution: {integrity: sha512-Uud2IWncmAfJvRaFYzv5OHDli+FbOzxiVEQdLCKQKLyhz94PIyFC3CHcH7EDMwIn8NPtD06+PNbC/PiO0LGLtw==} dependencies: - vue-demi: 0.14.6(vue@3.4.5) + vue-demi: 0.14.7(vue@3.4.21) transitivePeerDependencies: - '@vue/composition-api' - vue @@ -13360,6 +13513,10 @@ packages: resolution: {integrity: sha512-vlNK021QdI7PNeiUh/lKkC/mNHHfV0m/Ad5JoI0TYtlBnJAslM/JIkm/tGC88bkLIwO6OQ5uV6ztS6kVAtCDlg==} dev: true + /ccount@2.0.1: + resolution: {integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==} + dev: true + /chai-subset@1.6.0: resolution: {integrity: sha512-K3d+KmqdS5XKW5DWPd5sgNffL3uxdDe+6GdnJh3AYPhwnBGRY5urfvfcbRtWIvvpz+KxkL9FeBB6MZewLUNwug==} engines: {node: '>=4'} @@ -13460,6 +13617,10 @@ packages: resolution: {integrity: sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw==} dev: true + /character-entities@2.0.2: + resolution: {integrity: sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ==} + dev: true + /character-reference-invalid@1.1.4: resolution: {integrity: sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==} dev: true @@ -14656,6 +14817,12 @@ packages: to-data-view: 1.1.0 dev: true + /decode-named-character-reference@1.0.2: + resolution: {integrity: sha512-O8x12RzrUF8xyVcY0KJowWsmaJxQbmy0/EtnNtHRpsOcT7dFk5W598coHqBVpmWo1oQQfsCqfCmkZN5DJrZVdg==} + dependencies: + character-entities: 2.0.2 + dev: true + /decode-uri-component@0.2.0: resolution: {integrity: sha512-hjf+xovcEn31w/EUYdTXQh/8smFL/dzYjohQGEIgjyNavaJfBY2p5F527Bo1VPATxv0VYTUC2bOcXvqFwk78Og==} engines: {node: '>=0.10'} @@ -14897,6 +15064,12 @@ packages: resolution: {integrity: sha512-KqFl6pOgOW+Y6wJgu80rHpo2/3H07vr8ntR9rkkFIRETewbf5GaYYcakYfiKz89K+sLsuPkQIZaXDMjUObZwWg==} dev: true + /devlop@1.1.0: + resolution: {integrity: sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==} + dependencies: + dequal: 2.0.3 + dev: true + /devtools-protocol@0.0.1147663: resolution: {integrity: sha512-hyWmRrexdhbZ1tcJUGpO95ivbRhWXz++F4Ko+n21AY5PNln2ovoJw+8ZMNDTtip+CNFQfrtLVh/w4009dXO/eQ==} dev: true @@ -16134,13 +16307,13 @@ packages: - supports-color dev: true - /eslint-processor-vue-blocks@0.1.1(@vue/compiler-sfc@3.4.5)(eslint@8.54.0): + /eslint-processor-vue-blocks@0.1.1(@vue/compiler-sfc@3.4.21)(eslint@8.54.0): resolution: {integrity: sha512-9+dU5lU881log570oBwpelaJmOfOzSniben7IWEDRYQPPWwlvaV7NhOtsTuUWDqpYT+dtKKWPsgz4OkOi+aZnA==} peerDependencies: '@vue/compiler-sfc': ^3.3.0 eslint: ^8.50.0 dependencies: - '@vue/compiler-sfc': 3.4.5 + '@vue/compiler-sfc': 3.4.21 eslint: 8.54.0 dev: true @@ -17013,6 +17186,20 @@ packages: vue-resize: 2.0.0-alpha.1(vue@3.3.8) dev: true + /floating-vue@5.2.2(vue@3.4.21): + resolution: {integrity: sha512-afW+h2CFafo+7Y9Lvw/xsqjaQlKLdJV7h1fCHfcYQ1C4SVMlu7OAekqWgu5d4SgvkBVU0pVpLlVsrSTBURFRkg==} + peerDependencies: + '@nuxt/kit': ^3.2.0 + vue: ^3.2.0 + peerDependenciesMeta: + '@nuxt/kit': + optional: true + dependencies: + '@floating-ui/dom': 1.1.1 + vue: 3.4.21(typescript@5.2.2) + vue-resize: 2.0.0-alpha.1(vue@3.4.21) + dev: true + /flush-write-stream@1.1.1: resolution: {integrity: sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==} dependencies: @@ -18120,6 +18307,10 @@ packages: react-is: 16.13.1 dev: false + /hookable@5.5.3: + resolution: {integrity: sha512-Yc+BQe8SvoXH1643Qez1zqLRmbA5rCL+sSmk6TVos0LWVfNIB7PGncdlId77WzLGSIB5KaWgTaNTs2lNVEI6VQ==} + dev: true + /hosted-git-info@2.8.9: resolution: {integrity: sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==} dev: true @@ -20595,6 +20786,10 @@ packages: engines: {node: '>= 0.6.0'} dev: true + /longest-streak@3.1.0: + resolution: {integrity: sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g==} + dev: true + /loose-envify@1.4.0: resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} hasBin: true @@ -20691,6 +20886,13 @@ packages: dependencies: '@jridgewell/sourcemap-codec': 1.4.15 + /magic-string@0.30.9: + resolution: {integrity: sha512-S1+hd+dIrC8EZqKyT9DstTH/0Z+f76kmmvZnkfQVmOpDEF9iVgdYif3Q/pIWHmCoo59bQVGW0kVL3e2nl+9+Sw==} + engines: {node: '>=12'} + dependencies: + '@jridgewell/sourcemap-codec': 1.4.15 + dev: true + /magicast@0.3.3: resolution: {integrity: sha512-ZbrP1Qxnpoes8sz47AM0z08U+jW6TyRgZzcWy3Ma3vDhJttwMwAFDMMQFobwdBxByBD46JYmxRzeF7w2+wJEuw==} dependencies: @@ -20755,6 +20957,10 @@ packages: resolution: {integrity: sha512-8z4efJYk43E0upd0NbVXwgSTQs6cT3T06etieCMEg7dRbzCbxUCK/GHlX8mhHRDcp+OLlHkPKsvqQTCvsRl2cg==} dev: true + /markdown-table@3.0.3: + resolution: {integrity: sha512-Z1NL3Tb1M9wH4XESsCDEksWoKTdlUafKc4pt0GRwjUyXaCFZ+dc3g2erqB6zm3szA2IUSi7VnPI+o/9jnxh9hw==} + dev: true + /marko@5.32.0: resolution: {integrity: sha512-jsUr2cwpV7DwQ1ctQq4vpOGKunP1RSsRkeV5TsP6JMaQclbnIwy2FtD8CKhYpPc5ROUdZ3EAgnI284tq4evkMA==} hasBin: true @@ -20804,6 +21010,15 @@ packages: unist-util-visit: 2.0.3 dev: true + /mdast-util-find-and-replace@3.0.1: + resolution: {integrity: sha512-SG21kZHGC3XRTSUhtofZkBzZTJNM5ecCi0SK2IMKmSXR8vO3peL+kb1O0z7Zl83jKtutG4k5Wv/W7V3/YHvzPA==} + dependencies: + '@types/mdast': 4.0.3 + escape-string-regexp: 5.0.0 + unist-util-is: 6.0.0 + unist-util-visit-parents: 6.0.1 + dev: true + /mdast-util-from-markdown@0.8.5: resolution: {integrity: sha512-2hkTXtYYnr+NubD/g6KGBS/0mFmBcifAsI0yIWRiRo0PjVs6SSOSOdtzbp6kSGnShDN6G5aWZpKQ2lWRy27mWQ==} dependencies: @@ -20816,6 +21031,101 @@ packages: - supports-color dev: true + /mdast-util-from-markdown@2.0.0: + resolution: {integrity: sha512-n7MTOr/z+8NAX/wmhhDji8O3bRvPTV/U0oTCaZJkjhPSKTPhS3xufVhKGF8s1pJ7Ox4QgoIU7KHseh09S+9rTA==} + dependencies: + '@types/mdast': 4.0.3 + '@types/unist': 3.0.2 + decode-named-character-reference: 1.0.2 + devlop: 1.1.0 + mdast-util-to-string: 4.0.0 + micromark: 4.0.0 + micromark-util-decode-numeric-character-reference: 2.0.1 + micromark-util-decode-string: 2.0.0 + micromark-util-normalize-identifier: 2.0.0 + micromark-util-symbol: 2.0.0 + micromark-util-types: 2.0.0 + unist-util-stringify-position: 4.0.0 + transitivePeerDependencies: + - supports-color + dev: true + + /mdast-util-gfm-autolink-literal@2.0.0: + resolution: {integrity: sha512-FyzMsduZZHSc3i0Px3PQcBT4WJY/X/RCtEJKuybiC6sjPqLv7h1yqAkmILZtuxMSsUyaLUWNp71+vQH2zqp5cg==} + dependencies: + '@types/mdast': 4.0.3 + ccount: 2.0.1 + devlop: 1.1.0 + mdast-util-find-and-replace: 3.0.1 + micromark-util-character: 2.1.0 + dev: true + + /mdast-util-gfm-footnote@2.0.0: + resolution: {integrity: sha512-5jOT2boTSVkMnQ7LTrd6n/18kqwjmuYqo7JUPe+tRCY6O7dAuTFMtTPauYYrMPpox9hlN0uOx/FL8XvEfG9/mQ==} + dependencies: + '@types/mdast': 4.0.3 + devlop: 1.1.0 + mdast-util-from-markdown: 2.0.0 + mdast-util-to-markdown: 2.1.0 + micromark-util-normalize-identifier: 2.0.0 + transitivePeerDependencies: + - supports-color + dev: true + + /mdast-util-gfm-strikethrough@2.0.0: + resolution: {integrity: sha512-mKKb915TF+OC5ptj5bJ7WFRPdYtuHv0yTRxK2tJvi+BDqbkiG7h7u/9SI89nRAYcmap2xHQL9D+QG/6wSrTtXg==} + dependencies: + '@types/mdast': 4.0.3 + mdast-util-from-markdown: 2.0.0 + mdast-util-to-markdown: 2.1.0 + transitivePeerDependencies: + - supports-color + dev: true + + /mdast-util-gfm-table@2.0.0: + resolution: {integrity: sha512-78UEvebzz/rJIxLvE7ZtDd/vIQ0RHv+3Mh5DR96p7cS7HsBhYIICDBCu8csTNWNO6tBWfqXPWekRuj2FNOGOZg==} + dependencies: + '@types/mdast': 4.0.3 + devlop: 1.1.0 + markdown-table: 3.0.3 + mdast-util-from-markdown: 2.0.0 + mdast-util-to-markdown: 2.1.0 + transitivePeerDependencies: + - supports-color + dev: true + + /mdast-util-gfm-task-list-item@2.0.0: + resolution: {integrity: sha512-IrtvNvjxC1o06taBAVJznEnkiHxLFTzgonUdy8hzFVeDun0uTjxxrRGVaNFqkU1wJR3RBPEfsxmU6jDWPofrTQ==} + dependencies: + '@types/mdast': 4.0.3 + devlop: 1.1.0 + mdast-util-from-markdown: 2.0.0 + mdast-util-to-markdown: 2.1.0 + transitivePeerDependencies: + - supports-color + dev: true + + /mdast-util-gfm@3.0.0: + resolution: {integrity: sha512-dgQEX5Amaq+DuUqf26jJqSK9qgixgd6rYDHAv4aTBuA92cTknZlKpPfa86Z/s8Dj8xsAQpFfBmPUHWJBWqS4Bw==} + dependencies: + mdast-util-from-markdown: 2.0.0 + mdast-util-gfm-autolink-literal: 2.0.0 + mdast-util-gfm-footnote: 2.0.0 + mdast-util-gfm-strikethrough: 2.0.0 + mdast-util-gfm-table: 2.0.0 + mdast-util-gfm-task-list-item: 2.0.0 + mdast-util-to-markdown: 2.1.0 + transitivePeerDependencies: + - supports-color + dev: true + + /mdast-util-phrasing@4.1.0: + resolution: {integrity: sha512-TqICwyvJJpBwvGAMZjj4J2n0X8QWp21b9l0o7eXyVJ25YNWYbJDVIyD1bZXE6WtV6RmKJVYmQAKWa0zWOABz2w==} + dependencies: + '@types/mdast': 4.0.3 + unist-util-is: 6.0.0 + dev: true + /mdast-util-to-hast@10.0.1: resolution: {integrity: sha512-BW3LM9SEMnjf4HXXVApZMt8gLQWVNXc3jryK0nJu/rOXPOnlkUjmdkDlmxMirpbU9ILncGFIwLH/ubnWBbcdgA==} dependencies: @@ -20829,6 +21139,33 @@ packages: unist-util-visit: 2.0.3 dev: true + /mdast-util-to-hast@13.1.0: + resolution: {integrity: sha512-/e2l/6+OdGp/FB+ctrJ9Avz71AN/GRH3oi/3KAx/kMnoUsD6q0woXlDT8lLEeViVKE7oZxE7RXzvO3T8kF2/sA==} + dependencies: + '@types/hast': 3.0.4 + '@types/mdast': 4.0.3 + '@ungap/structured-clone': 1.2.0 + devlop: 1.1.0 + micromark-util-sanitize-uri: 2.0.0 + trim-lines: 3.0.1 + unist-util-position: 5.0.0 + unist-util-visit: 5.0.0 + vfile: 6.0.1 + dev: true + + /mdast-util-to-markdown@2.1.0: + resolution: {integrity: sha512-SR2VnIEdVNCJbP6y7kVTJgPLifdr8WEU440fQec7qHoHOUz/oJ2jmNRqdDQ3rbiStOXb2mCDGTuwsK5OPUgYlQ==} + dependencies: + '@types/mdast': 4.0.3 + '@types/unist': 3.0.2 + longest-streak: 3.1.0 + mdast-util-phrasing: 4.1.0 + mdast-util-to-string: 4.0.0 + micromark-util-decode-string: 2.0.0 + unist-util-visit: 5.0.0 + zwitch: 2.0.4 + dev: true + /mdast-util-to-string@1.1.0: resolution: {integrity: sha512-jVU0Nr2B9X3MU4tSK7JP1CMkSvOj7X5l/GboG1tKRw52lLF1x2Ju92Ms9tNetCcbfX3hzlM73zYo2NKkWSfF/A==} dev: true @@ -20837,6 +21174,12 @@ packages: resolution: {integrity: sha512-AW4DRS3QbBayY/jJmD8437V1Gombjf8RSOUCMFBuo5iHi58AGEgVCKQ+ezHkZZDpAQS75hcBMpLqjpJTjtUL7w==} dev: true + /mdast-util-to-string@4.0.0: + resolution: {integrity: sha512-0H44vDimn51F0YwvxSJSm0eCDOJTRlmN0R1yBh4HLj9wiV1Dn0QoXGbvFAWj2hSItVTlCmBF1hqKlIyUBVFLPg==} + dependencies: + '@types/mdast': 4.0.3 + dev: true + /mdn-data@2.0.30: resolution: {integrity: sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==} dev: true @@ -20923,6 +21266,157 @@ packages: resolution: {integrity: sha512-jo1OfR4TaEwd5HOrt5+tAZ9mqT4jmpNAusXtyfNzqVm9uiSYFZlKM1wYL4oU7azZW/PxQW53wM0S6OR1JHNa2g==} dev: true + /micromark-core-commonmark@2.0.0: + resolution: {integrity: sha512-jThOz/pVmAYUtkroV3D5c1osFXAMv9e0ypGDOIZuCeAe91/sD6BoE2Sjzt30yuXtwOYUmySOhMas/PVyh02itA==} + dependencies: + decode-named-character-reference: 1.0.2 + devlop: 1.1.0 + micromark-factory-destination: 2.0.0 + micromark-factory-label: 2.0.0 + micromark-factory-space: 2.0.0 + micromark-factory-title: 2.0.0 + micromark-factory-whitespace: 2.0.0 + micromark-util-character: 2.1.0 + micromark-util-chunked: 2.0.0 + micromark-util-classify-character: 2.0.0 + micromark-util-html-tag-name: 2.0.0 + micromark-util-normalize-identifier: 2.0.0 + micromark-util-resolve-all: 2.0.0 + micromark-util-subtokenize: 2.0.0 + micromark-util-symbol: 2.0.0 + micromark-util-types: 2.0.0 + dev: true + + /micromark-factory-destination@2.0.0: + resolution: {integrity: sha512-j9DGrQLm/Uhl2tCzcbLhy5kXsgkHUrjJHg4fFAeoMRwJmJerT9aw4FEhIbZStWN8A3qMwOp1uzHr4UL8AInxtA==} + dependencies: + micromark-util-character: 2.1.0 + micromark-util-symbol: 2.0.0 + micromark-util-types: 2.0.0 + dev: true + + /micromark-factory-label@2.0.0: + resolution: {integrity: sha512-RR3i96ohZGde//4WSe/dJsxOX6vxIg9TimLAS3i4EhBAFx8Sm5SmqVfR8E87DPSR31nEAjZfbt91OMZWcNgdZw==} + dependencies: + devlop: 1.1.0 + micromark-util-character: 2.1.0 + micromark-util-symbol: 2.0.0 + micromark-util-types: 2.0.0 + dev: true + + /micromark-factory-space@2.0.0: + resolution: {integrity: sha512-TKr+LIDX2pkBJXFLzpyPyljzYK3MtmllMUMODTQJIUfDGncESaqB90db9IAUcz4AZAJFdd8U9zOp9ty1458rxg==} + dependencies: + micromark-util-character: 2.1.0 + micromark-util-types: 2.0.0 + dev: true + + /micromark-factory-title@2.0.0: + resolution: {integrity: sha512-jY8CSxmpWLOxS+t8W+FG3Xigc0RDQA9bKMY/EwILvsesiRniiVMejYTE4wumNc2f4UbAa4WsHqe3J1QS1sli+A==} + dependencies: + micromark-factory-space: 2.0.0 + micromark-util-character: 2.1.0 + micromark-util-symbol: 2.0.0 + micromark-util-types: 2.0.0 + dev: true + + /micromark-factory-whitespace@2.0.0: + resolution: {integrity: sha512-28kbwaBjc5yAI1XadbdPYHX/eDnqaUFVikLwrO7FDnKG7lpgxnvk/XGRhX/PN0mOZ+dBSZ+LgunHS+6tYQAzhA==} + dependencies: + micromark-factory-space: 2.0.0 + micromark-util-character: 2.1.0 + micromark-util-symbol: 2.0.0 + micromark-util-types: 2.0.0 + dev: true + + /micromark-util-character@2.1.0: + resolution: {integrity: sha512-KvOVV+X1yLBfs9dCBSopq/+G1PcgT3lAK07mC4BzXi5E7ahzMAF8oIupDDJ6mievI6F+lAATkbQQlQixJfT3aQ==} + dependencies: + micromark-util-symbol: 2.0.0 + micromark-util-types: 2.0.0 + dev: true + + /micromark-util-chunked@2.0.0: + resolution: {integrity: sha512-anK8SWmNphkXdaKgz5hJvGa7l00qmcaUQoMYsBwDlSKFKjc6gjGXPDw3FNL3Nbwq5L8gE+RCbGqTw49FK5Qyvg==} + dependencies: + micromark-util-symbol: 2.0.0 + dev: true + + /micromark-util-classify-character@2.0.0: + resolution: {integrity: sha512-S0ze2R9GH+fu41FA7pbSqNWObo/kzwf8rN/+IGlW/4tC6oACOs8B++bh+i9bVyNnwCcuksbFwsBme5OCKXCwIw==} + dependencies: + micromark-util-character: 2.1.0 + micromark-util-symbol: 2.0.0 + micromark-util-types: 2.0.0 + dev: true + + /micromark-util-combine-extensions@2.0.0: + resolution: {integrity: sha512-vZZio48k7ON0fVS3CUgFatWHoKbbLTK/rT7pzpJ4Bjp5JjkZeasRfrS9wsBdDJK2cJLHMckXZdzPSSr1B8a4oQ==} + dependencies: + micromark-util-chunked: 2.0.0 + micromark-util-types: 2.0.0 + dev: true + + /micromark-util-decode-numeric-character-reference@2.0.1: + resolution: {integrity: sha512-bmkNc7z8Wn6kgjZmVHOX3SowGmVdhYS7yBpMnuMnPzDq/6xwVA604DuOXMZTO1lvq01g+Adfa0pE2UKGlxL1XQ==} + dependencies: + micromark-util-symbol: 2.0.0 + dev: true + + /micromark-util-decode-string@2.0.0: + resolution: {integrity: sha512-r4Sc6leeUTn3P6gk20aFMj2ntPwn6qpDZqWvYmAG6NgvFTIlj4WtrAudLi65qYoaGdXYViXYw2pkmn7QnIFasA==} + dependencies: + decode-named-character-reference: 1.0.2 + micromark-util-character: 2.1.0 + micromark-util-decode-numeric-character-reference: 2.0.1 + micromark-util-symbol: 2.0.0 + dev: true + + /micromark-util-encode@2.0.0: + resolution: {integrity: sha512-pS+ROfCXAGLWCOc8egcBvT0kf27GoWMqtdarNfDcjb6YLuV5cM3ioG45Ys2qOVqeqSbjaKg72vU+Wby3eddPsA==} + dev: true + + /micromark-util-html-tag-name@2.0.0: + resolution: {integrity: sha512-xNn4Pqkj2puRhKdKTm8t1YHC/BAjx6CEwRFXntTaRf/x16aqka6ouVoutm+QdkISTlT7e2zU7U4ZdlDLJd2Mcw==} + dev: true + + /micromark-util-normalize-identifier@2.0.0: + resolution: {integrity: sha512-2xhYT0sfo85FMrUPtHcPo2rrp1lwbDEEzpx7jiH2xXJLqBuy4H0GgXk5ToU8IEwoROtXuL8ND0ttVa4rNqYK3w==} + dependencies: + micromark-util-symbol: 2.0.0 + dev: true + + /micromark-util-resolve-all@2.0.0: + resolution: {integrity: sha512-6KU6qO7DZ7GJkaCgwBNtplXCvGkJToU86ybBAUdavvgsCiG8lSSvYxr9MhwmQ+udpzywHsl4RpGJsYWG1pDOcA==} + dependencies: + micromark-util-types: 2.0.0 + dev: true + + /micromark-util-sanitize-uri@2.0.0: + resolution: {integrity: sha512-WhYv5UEcZrbAtlsnPuChHUAsu/iBPOVaEVsntLBIdpibO0ddy8OzavZz3iL2xVvBZOpolujSliP65Kq0/7KIYw==} + dependencies: + micromark-util-character: 2.1.0 + micromark-util-encode: 2.0.0 + micromark-util-symbol: 2.0.0 + dev: true + + /micromark-util-subtokenize@2.0.0: + resolution: {integrity: sha512-vc93L1t+gpR3p8jxeVdaYlbV2jTYteDje19rNSS/H5dlhxUYll5Fy6vJ2cDwP8RnsXi818yGty1ayP55y3W6fg==} + dependencies: + devlop: 1.1.0 + micromark-util-chunked: 2.0.0 + micromark-util-symbol: 2.0.0 + micromark-util-types: 2.0.0 + dev: true + + /micromark-util-symbol@2.0.0: + resolution: {integrity: sha512-8JZt9ElZ5kyTnO94muPxIGS8oyElRJaiJO8EzV6ZSyGQ1Is8xwl4Q45qU5UOg+bGH4AikWziz0iN4sFLWs8PGw==} + dev: true + + /micromark-util-types@2.0.0: + resolution: {integrity: sha512-oNh6S2WMHWRZrmutsRmDDfkzKtxF+bc2VxLC9dvtrDIRFln627VsFP6fLMgTryGDljgLPjkrzQSDcPrjPyDJ5w==} + dev: true + /micromark@2.11.4: resolution: {integrity: sha512-+WoovN/ppKolQOFIAajxi7Lu9kInbPxFuTBVEavFcL8eAfVstoc5MocPmqBeAdBOJV00uaVjegzH4+MA0DN/uA==} dependencies: @@ -20932,6 +21426,30 @@ packages: - supports-color dev: true + /micromark@4.0.0: + resolution: {integrity: sha512-o/sd0nMof8kYff+TqcDx3VSrgBTcZpSvYcAHIfHhv5VAuNmisCxjhx6YmxS8PFEpb9z5WKWKPdzf0jM23ro3RQ==} + dependencies: + '@types/debug': 4.1.12 + debug: 4.3.4(supports-color@8.1.1) + decode-named-character-reference: 1.0.2 + devlop: 1.1.0 + micromark-core-commonmark: 2.0.0 + micromark-factory-space: 2.0.0 + micromark-util-character: 2.1.0 + micromark-util-chunked: 2.0.0 + micromark-util-combine-extensions: 2.0.0 + micromark-util-decode-numeric-character-reference: 2.0.1 + micromark-util-encode: 2.0.0 + micromark-util-normalize-identifier: 2.0.0 + micromark-util-resolve-all: 2.0.0 + micromark-util-sanitize-uri: 2.0.0 + micromark-util-subtokenize: 2.0.0 + micromark-util-symbol: 2.0.0 + micromark-util-types: 2.0.0 + transitivePeerDependencies: + - supports-color + dev: true + /micromatch@3.1.10: resolution: {integrity: sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==} engines: {node: '>=0.10.0'} @@ -21139,6 +21657,10 @@ packages: resolution: {integrity: sha512-7dX2/10ITVyqh4aOSVI9gdape+t9l2/8QxHrFmUXu4EEUpdlxl6RudZUPZoc+zuY2hk1j7XxVroIVIan/pD/SQ==} dev: true + /mitt@3.0.1: + resolution: {integrity: sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==} + dev: true + /mixin-deep@1.3.2: resolution: {integrity: sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==} engines: {node: '>=0.10.0'} @@ -22178,6 +22700,10 @@ packages: resolution: {integrity: sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ==} dev: true + /path-browserify@1.0.1: + resolution: {integrity: sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==} + dev: true + /path-dirname@1.0.2: resolution: {integrity: sha512-ALzNPpyNq9AqXMBjeymIjFDAkAFH06mHJH/cSBHAgU0s4vfpBn6b2nf8tiRLvagKD8RbTpq2FKTBg7cl9l3c7Q==} requiresBuild: true @@ -22577,15 +23103,6 @@ packages: picocolors: 1.0.0 source-map-js: 1.0.2 - /postcss@8.4.32: - resolution: {integrity: sha512-D/kj5JNu6oo2EIy+XL/26JEDTlIbB8hw85G8StOE6L74RQAVVP5rej6wxCNqyMbR4RkPfqvezVbPw81Ngd6Kcw==} - engines: {node: ^10 || ^12 || >=14} - dependencies: - nanoid: 3.3.7 - picocolors: 1.0.0 - source-map-js: 1.0.2 - dev: true - /postcss@8.4.38: resolution: {integrity: sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==} engines: {node: ^10 || ^12 || >=14} @@ -23822,6 +24339,10 @@ packages: resolution: {integrity: sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==} dev: true + /rfdc@1.3.1: + resolution: {integrity: sha512-r5a3l5HzYlIC68TpmYKlxWjmOP6wiPJ1vWv2HeLhNsRZMrCkxeqxiHlQ21oXmQ4F3SiryXBHhAD7JZqvOJjFmg==} + dev: true + /rgb2hex@0.2.5: resolution: {integrity: sha512-22MOP1Rh7sAo1BZpDG6R5RFYzR2lYEgwq7HEmyW2qcsOqR2lQKmn+O//xV3YG/0rrhMC6KVX2hU+ZXuaw9a5bw==} dev: true @@ -24407,20 +24928,10 @@ packages: resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} engines: {node: '>=8'} - /shikiji-core@0.9.17: - resolution: {integrity: sha512-r1FWTXk6SO2aYqfWgcsJ11MuVQ1ymPSdXzJjK7q8EXuyqu8yc2N5qrQy5+BL6gTVOaF4yLjbxFjF+KTRM1Sp8Q==} - dev: true - - /shikiji-transformers@0.9.17: - resolution: {integrity: sha512-2CCG9qSLS6Bn/jbeUTEuvC6YSuP8gm8VyX5VjmCvDKyCPGhlLJbH1k/kg9wfRt7cJqpYjhdMDgT5rkdYrOZnsA==} + /shiki@1.2.4: + resolution: {integrity: sha512-Q9n9jKiOjJCRPztA9POn3/uZXNySHDNKAsPNpmtHDcFyi6ZQhx5vQKZW3Nhrwn8TWW3RudSRk66zqY603EZDeg==} dependencies: - shikiji: 0.9.17 - dev: true - - /shikiji@0.9.17: - resolution: {integrity: sha512-0z/1NfkhBkm3ijrfFeHg3G9yDNuHhXdAGbQm7tRxj4WQ5z2y0XDbnagFyKyuV2ebCTS1Mwy1I3n0Fzcc/4xdmw==} - dependencies: - shikiji-core: 0.9.17 + '@shikijs/core': 1.2.4 dev: true /side-channel@1.0.4: @@ -24759,6 +25270,11 @@ packages: - supports-color dev: true + /speakingurl@14.0.1: + resolution: {integrity: sha512-1POYv7uv2gXoyGFpBCmpDVSNV74IfsWlDW216UPjbWufNf+bSU6GdbDsxdcxtfwb4xlI3yxzOTKClUosxARYrQ==} + engines: {node: '>=0.10.0'} + dev: true + /split-string@3.1.0: resolution: {integrity: sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==} engines: {node: '>=0.10.0'} @@ -25895,6 +26411,10 @@ packages: resolution: {integrity: sha512-iawgk0hLP3SxGKDfnDJf8wTz4p2qImnyihM5Hh/sGvQ3K37dPi/w8sRhdNIxYA1TwFwc5mDhIJq+O0RsvXBKdQ==} dev: true + /trim-lines@3.0.1: + resolution: {integrity: sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==} + dev: true + /trim-newlines@1.0.0: resolution: {integrity: sha512-Nm4cF79FhSTzrLKGDMi3I4utBtFv8qKy4sq1enftf2gMdpqI8oVQTAfySkTz5r49giVzDj88SVZXP4CeYQwjaw==} engines: {node: '>=0.10.0'} @@ -25993,6 +26513,35 @@ packages: resolution: {integrity: sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==} dev: true + /twoslash-protocol@0.2.5: + resolution: {integrity: sha512-oUr5ZAn37CgNa6p1mrCuuR/pINffsnGCee2aS170Uj1IObxCjsHzu6sgdPUdxGLLn6++gd/qjNH1/iR6RrfLeg==} + dev: true + + /twoslash-vue@0.2.5(typescript@5.2.2): + resolution: {integrity: sha512-Tai45V/1G/jEJQIbDe/DIkJCgOqtA/ZHxx4TgC5EM/nnyTP6zbZNtvKOlzMjFgXFdk6rebWEl2Mi/RHKs/sbDQ==} + peerDependencies: + typescript: '*' + dependencies: + '@vue/language-core': 1.8.27(typescript@5.2.2) + twoslash: 0.2.5(typescript@5.2.2) + twoslash-protocol: 0.2.5 + typescript: 5.2.2 + transitivePeerDependencies: + - supports-color + dev: true + + /twoslash@0.2.5(typescript@5.2.2): + resolution: {integrity: sha512-U8rqsfVh8jQMO1NJekUtglb52b7xD9+FrzeFrgzpHsRTKl8IQgqnZP6ld4PeKaHXhLfoZPuju9K50NXJ7wom8g==} + peerDependencies: + typescript: '*' + dependencies: + '@typescript/vfs': 1.5.0 + twoslash-protocol: 0.2.5 + typescript: 5.2.2 + transitivePeerDependencies: + - supports-color + dev: true + /type-check@0.3.2: resolution: {integrity: sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==} engines: {node: '>= 0.8.0'} @@ -26289,10 +26838,22 @@ packages: resolution: {integrity: sha512-ZOQSsnce92GrxSqlnEEseX0gi7GH9zTJZ0p9dtu87WRb/37mMPO2Ilx1s/t9vBHrFhbgweUwb+t7cIn5dxPhZg==} dev: true + /unist-util-is@6.0.0: + resolution: {integrity: sha512-2qCTHimwdxLfz+YzdGfkqNlH0tLi9xjTnHddPmJwtIG9MGsdbutfTc4P+haPD7l7Cjxf/WZj+we5qfVPvvxfYw==} + dependencies: + '@types/unist': 3.0.2 + dev: true + /unist-util-position@3.1.0: resolution: {integrity: sha512-w+PkwCbYSFw8vpgWD0v7zRCl1FpY3fjDSQ3/N/wNd9Ffa4gPi8+4keqt99N3XW6F99t/mUzp2xAhNmfKWp95QA==} dev: true + /unist-util-position@5.0.0: + resolution: {integrity: sha512-fucsC7HjXvkB5R3kTCO7kUjRdrS0BJt3M/FPxmHMBOm8JQi2BsHAHFsy27E0EolP8rp0NzXsJ+jNPyDWvOJZPA==} + dependencies: + '@types/unist': 3.0.2 + dev: true + /unist-util-remove-position@2.0.1: resolution: {integrity: sha512-fDZsLYIe2uT+oGFnuZmy73K6ZxOPG/Qcm+w7jbEjaFcJgbQ6cqjs/eSPzXhsmGpAsWPkqZM9pYjww5QTn3LHMA==} dependencies: @@ -26311,6 +26872,12 @@ packages: '@types/unist': 2.0.6 dev: true + /unist-util-stringify-position@4.0.0: + resolution: {integrity: sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==} + dependencies: + '@types/unist': 3.0.2 + dev: true + /unist-util-visit-parents@3.1.1: resolution: {integrity: sha512-1KROIZWo6bcMrZEwiH2UrXDyalAa0uqzWCxCJj6lPOvTve2WkfgCytoDTPaMnodXh1WrXOq0haVYHj99ynJlsg==} dependencies: @@ -26318,6 +26885,13 @@ packages: unist-util-is: 4.1.0 dev: true + /unist-util-visit-parents@6.0.1: + resolution: {integrity: sha512-L/PqWzfTP9lzzEa6CKs0k2nARxTdZduw3zyh8d2NVBnsyvHjSX4TWse388YrrQKbvI8w20fGjGlhgT96WwKykw==} + dependencies: + '@types/unist': 3.0.2 + unist-util-is: 6.0.0 + dev: true + /unist-util-visit@2.0.3: resolution: {integrity: sha512-iJ4/RczbJMkD0712mGktuGpm/U4By4FfDonL7N/9tATGIF4imikjOuagyMY53tnZq3NP6BcmlrHhEKAfGWjh7Q==} dependencies: @@ -26326,6 +26900,14 @@ packages: unist-util-visit-parents: 3.1.1 dev: true + /unist-util-visit@5.0.0: + resolution: {integrity: sha512-MR04uvD+07cwl/yhVuVWAtw+3GOR/knlL55Nd/wAdblk27GCVt3lqpTivy/tkJcZoNPzTwS1Y+KMojlLDhoTzg==} + dependencies: + '@types/unist': 3.0.2 + unist-util-is: 6.0.0 + unist-util-visit-parents: 6.0.1 + dev: true + /universalify@0.1.2: resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} engines: {node: '>= 4.0.0'} @@ -26758,6 +27340,13 @@ packages: unist-util-stringify-position: 2.0.3 dev: true + /vfile-message@4.0.2: + resolution: {integrity: sha512-jRDZ1IMLttGj41KcZvlrYAaI3CfqpLpfpf+Mfig13viT6NKvRzWZ+lXz0Y5D60w6uJIBAOGq9mSHf0gktF0duw==} + dependencies: + '@types/unist': 3.0.2 + unist-util-stringify-position: 4.0.0 + dev: true + /vfile@4.2.1: resolution: {integrity: sha512-O6AE4OskCG5S1emQ/4gl8zK586RqA3srz3nfK/Viy0UPToBc5Trp9BVFb1u0CjsKrAWwnpr4ifM/KBXPWwJbCA==} dependencies: @@ -26767,7 +27356,15 @@ packages: vfile-message: 2.0.4 dev: true - /vite-plugin-pages@0.31.0(@vue/compiler-sfc@3.4.5)(vite@5.2.6): + /vfile@6.0.1: + resolution: {integrity: sha512-1bYqc7pt6NIADBJ98UiG0Bn/CHIVOoZ/IyEkqIruLg0mE1BKzkOXY2D6CSqQIcKqgadppE5lrxgWXJmXd7zZJw==} + dependencies: + '@types/unist': 3.0.2 + unist-util-stringify-position: 4.0.0 + vfile-message: 4.0.2 + dev: true + + /vite-plugin-pages@0.31.0(@vue/compiler-sfc@3.4.21)(vite@5.2.6): resolution: {integrity: sha512-fw3onBfVTXQI7rOzAbSZhmfwvk50+3qNnGZpERjmD93c8nEjrGLyd53eFXYMxcJV4KA1vzi4qIHt2+6tS4dEMw==} peerDependencies: '@vue/compiler-sfc': ^2.7.0 || ^3.0.0 @@ -26777,7 +27374,7 @@ packages: optional: true dependencies: '@types/debug': 4.1.12 - '@vue/compiler-sfc': 3.4.5 + '@vue/compiler-sfc': 3.4.21 debug: 4.3.4(supports-color@8.1.1) deep-equal: 2.2.1 extract-comments: 1.1.0 @@ -26934,34 +27531,34 @@ packages: vite: 5.2.6(@types/node@20.11.5)(less@4.1.3) dev: true - /vitepress@1.0.0-rc.35(@types/node@20.11.5)(postcss@8.4.38)(search-insights@2.9.0)(typescript@5.2.2): - resolution: {integrity: sha512-+2VnFwtYIiKWWAnMjWg7ik0PfsUdrNoZIZKeu5dbJtrkzKO/mTvlA3owiT5VBKJsZAgI17B5UV37aYfUvGrN6g==} + /vitepress@1.0.0(@types/node@20.11.5)(postcss@8.4.38)(search-insights@2.9.0)(typescript@5.2.2): + resolution: {integrity: sha512-4YXbHzuyhymuVTKPexnnOgJOgf1Uzmak4B6g3L3SQf9KRgtnVKHoPV4/WorWhaGnLBaIS/g8KspxRJAIOsOdJQ==} hasBin: true peerDependencies: markdown-it-mathjax3: ^4.3.2 - postcss: ^8.4.32 + postcss: ^8.4.35 peerDependenciesMeta: markdown-it-mathjax3: optional: true postcss: optional: true dependencies: - '@docsearch/css': 3.5.2 - '@docsearch/js': 3.5.2(search-insights@2.9.0) + '@docsearch/css': 3.6.0 + '@docsearch/js': 3.6.0(search-insights@2.9.0) + '@shikijs/core': 1.2.4 + '@shikijs/transformers': 1.2.4 '@types/markdown-it': 13.0.7 - '@vitejs/plugin-vue': 5.0.2(vite@5.2.6)(vue@3.4.5) - '@vue/devtools-api': 6.5.1 - '@vueuse/core': 10.7.1(vue@3.4.5) - '@vueuse/integrations': 10.7.1(focus-trap@7.5.4)(vue@3.4.5) + '@vitejs/plugin-vue': 5.0.4(vite@5.2.6)(vue@3.4.21) + '@vue/devtools-api': 7.0.25(vue@3.4.21) + '@vueuse/core': 10.9.0(vue@3.4.21) + '@vueuse/integrations': 10.9.0(focus-trap@7.5.4)(vue@3.4.21) focus-trap: 7.5.4 mark.js: 8.11.1 minisearch: 6.3.0 postcss: 8.4.38 - shikiji: 0.9.17 - shikiji-core: 0.9.17 - shikiji-transformers: 0.9.17 + shiki: 1.2.4 vite: 5.2.6(@types/node@20.11.5)(less@4.1.3) - vue: 3.4.5(typescript@5.2.2) + vue: 3.4.21(typescript@5.2.2) transitivePeerDependencies: - '@algolia/client-search' - '@types/node' @@ -27036,8 +27633,8 @@ packages: dependencies: vue: 3.3.8(typescript@5.2.2) - /vue-demi@0.14.6(vue@3.4.5): - resolution: {integrity: sha512-8QA7wrYSHKaYgUxDA5ZC24w+eHm3sYCbp0EzcDwKqN3p6HqtTCGR/GVsPyZW92unff4UlcSh++lmqDWN3ZIq4w==} + /vue-demi@0.14.7(vue@3.4.21): + resolution: {integrity: sha512-EOG8KXDQNwkJILkx/gPcoL/7vH+hORoBaKgGe+6W7VFMvCYJfmF2dGbvgDroVnI8LU7/kTu8mbjRZGBU1z9NTA==} engines: {node: '>=12'} hasBin: true requiresBuild: true @@ -27048,7 +27645,7 @@ packages: '@vue/composition-api': optional: true dependencies: - vue: 3.4.5(typescript@5.2.2) + vue: 3.4.21(typescript@5.2.2) dev: true /vue-eslint-parser@9.4.2(eslint@8.54.0): @@ -27077,6 +27674,14 @@ packages: vue: 3.3.8(typescript@5.2.2) dev: true + /vue-resize@2.0.0-alpha.1(vue@3.4.21): + resolution: {integrity: sha512-7+iqOueLU7uc9NrMfrzbG8hwMqchfVfSzpVlCMeJQe4pyibqyoifDNbKTZvwxZKDvGkB+PdFeKvnGZMoEb8esg==} + peerDependencies: + vue: ^3.0.0 + dependencies: + vue: 3.4.21(typescript@5.2.2) + dev: true + /vue-router@4.2.5(vue@3.3.8): resolution: {integrity: sha512-DIUpKcyg4+PTQKfFPX88UWhlagBEBEfJ5A8XDXRJLUnZOvcpMF8o/dnL90vpVkGaPbjvXazV/rC1qBKrZlFugw==} peerDependencies: @@ -27129,19 +27734,19 @@ packages: '@vue/shared': 3.3.8 typescript: 5.2.2 - /vue@3.4.5(typescript@5.2.2): - resolution: {integrity: sha512-VH6nHFhLPjgu2oh5vEBXoNZxsGHuZNr3qf4PHClwJWw6IDqw6B3x+4J+ABdoZ0aJuT8Zi0zf3GpGlLQCrGWHrw==} + /vue@3.4.21(typescript@5.2.2): + resolution: {integrity: sha512-5hjyV/jLEIKD/jYl4cavMcnzKwjMKohureP8ejn3hhEjwhWIhWeuzL2kJAjzl/WyVsgPY56Sy4Z40C3lVshxXA==} peerDependencies: typescript: '*' peerDependenciesMeta: typescript: optional: true dependencies: - '@vue/compiler-dom': 3.4.5 - '@vue/compiler-sfc': 3.4.5 - '@vue/runtime-dom': 3.4.5 - '@vue/server-renderer': 3.4.5(vue@3.4.5) - '@vue/shared': 3.4.5 + '@vue/compiler-dom': 3.4.21 + '@vue/compiler-sfc': 3.4.21 + '@vue/runtime-dom': 3.4.21 + '@vue/server-renderer': 3.4.21(vue@3.4.21) + '@vue/shared': 3.4.21 typescript: 5.2.2 dev: true @@ -28220,6 +28825,10 @@ packages: resolution: {integrity: sha512-V50KMwwzqJV0NpZIZFwfOD5/lyny3WlSzRiXgA0G7VUnRlqttta1L6UQIHzd6EuBY/cHGfwTIck7w1yH6Q5zUw==} dev: true + /zwitch@2.0.4: + resolution: {integrity: sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==} + dev: true + /zx@8.0.1: resolution: {integrity: sha512-Y+ITW1GQjADk7qgrbhnukMgoNsJmlyx53cUQ6/6NXU+BMBdCbTc6flTOHUctmzKvPjTmdwaddzJY/dbLie9sQg==} engines: {node: '>= 16.0.0'}