From d255c495b4cec6c31ffdac29de90bb504991cdfe Mon Sep 17 00:00:00 2001 From: meteorlxy Date: Thu, 15 Aug 2024 23:00:40 +0800 Subject: [PATCH 01/12] fix: upgrade eslint and fix lint and type errors --- .eslintignore | 7 - .eslintrc.cjs | 26 - commitlint.config.ts | 5 +- e2e/docs/.vuepress/plugins/foo/fooPlugin.ts | 7 +- .../.vuepress/theme/client/layouts/Layout.vue | 4 +- e2e/docs/.vuepress/theme/node/e2eTheme.ts | 34 +- e2e/modules/conditional-exports/types.d.ts | 4 +- e2e/playwright.config.ts | 8 +- .../router/resolve-route-query-hash.spec.ts | 11 +- e2e/utils/source.ts | 13 +- eslint.config.js | 41 + package.json | 13 +- packages/bundler-vite/src/build/build.ts | 4 +- packages/bundler-vite/src/build/renderPage.ts | 6 +- .../src/build/renderPagePrefetchLinks.ts | 2 +- .../src/build/renderPagePreloadLinks.ts | 2 +- packages/bundler-vite/src/dev.ts | 6 +- .../src/plugins/vuepressMainPlugin.ts | 14 +- .../bundler-vite/src/resolveViteConfig.ts | 7 +- packages/bundler-webpack/src/build/build.ts | 15 +- .../src/build/createClientConfig.ts | 6 +- .../bundler-webpack/src/build/renderPage.ts | 2 +- .../src/dev/createDevServerConfig.ts | 4 +- packages/bundler-webpack/src/dev/dev.ts | 6 +- .../src/dev/trailingSlashMiddleware.ts | 3 +- packages/bundler-webpack/src/types.ts | 14 +- .../cli/src/commands/build/createBuild.ts | 10 +- packages/cli/src/commands/dev/createDev.ts | 14 +- .../cli/src/commands/dev/handlePageAdd.ts | 2 +- .../cli/src/commands/dev/handlePageChange.ts | 2 +- .../cli/src/commands/dev/handlePageUnlink.ts | 2 +- .../src/commands/dev/watchUserConfigFile.ts | 6 +- packages/cli/src/commands/info.ts | 4 +- packages/cli/src/config/loadUserConfig.ts | 10 +- packages/cli/src/config/resolveAppConfig.ts | 9 +- .../cli/tests/config/loadUserConfig.spec.ts | 12 +- .../config/resolveUserConfigPath.spec.ts | 1 + packages/client/src/app.ts | 11 +- packages/client/src/components/AutoLink.ts | 8 +- packages/client/src/components/Content.ts | 5 +- packages/client/src/components/RouteLink.ts | 8 +- packages/core/src/app/resolveAppVersion.ts | 2 +- packages/core/src/page/renderPageContent.ts | 1 + packages/core/src/page/resolvePageSlug.ts | 2 +- .../src/pluginApi/normalizeAliasDefineHook.ts | 1 + .../core/tests/app/resolveAppOptions.spec.ts | 5 +- .../core/tests/app/resolveAppPages.spec.ts | 17 +- .../tests/plugins/importCodePlugin.spec.ts | 5 +- .../shared/src/utils/routes/inferRoutePath.ts | 4 +- packages/shared/src/utils/typeGuards.ts | 7 +- .../shared/tests/links/isLinkExternal.spec.ts | 4 +- .../shared/tests/links/isLinkHttp.spec.ts | 4 +- .../tests/links/isLinkWithProtocol.spec.ts | 4 +- .../shared/tests/removeEndingSlash.spec.ts | 4 +- .../shared/tests/removeLeadingSlash.spec.ts | 4 +- .../tests/resolveHeadIdentifier.spec.ts | 2 +- .../tests/routes/normalizeRoutePath.spec.ts | 4 +- .../routes/resolveRoutePathFromUrl.spec.ts | 6 +- .../shared/tests/routes/splitPath.spec.ts | 6 +- packages/utils/src/console/logger.ts | 11 +- packages/utils/src/module/importFile.ts | 6 +- packages/utils/src/ssr/templateRenderer.ts | 2 +- packages/utils/tests/console/formatMs.spec.ts | 4 +- packages/utils/tests/console/logger.spec.ts | 7 +- .../utils/tests/console/withSpinner.spec.ts | 4 +- .../utils/tests/module/isChildPath.spec.ts | 4 +- packages/utils/tests/ssr/renderHead.spec.ts | 4 +- .../utils/tests/ssr/renderHeadAttrs.spec.ts | 4 +- .../utils/tests/ssr/templateRenderer.spec.ts | 30 +- pnpm-lock.yaml | 1560 ++++++----------- vitest.config.ts | 9 +- 71 files changed, 773 insertions(+), 1322 deletions(-) delete mode 100644 .eslintignore delete mode 100644 .eslintrc.cjs create mode 100644 eslint.config.js diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index 744240c870..0000000000 --- a/.eslintignore +++ /dev/null @@ -1,7 +0,0 @@ -!.vuepress/ -!.*.js -.cache/ -.temp/ -node_modules/ -lib/ -dist/ diff --git a/.eslintrc.cjs b/.eslintrc.cjs deleted file mode 100644 index 7f763acda8..0000000000 --- a/.eslintrc.cjs +++ /dev/null @@ -1,26 +0,0 @@ -module.exports = { - root: true, - extends: 'vuepress', - overrides: [ - { - files: ['*.ts', '*.vue', '*.cts'], - extends: 'vuepress-typescript', - parserOptions: { - project: ['tsconfig.json'], - }, - rules: { - '@typescript-eslint/no-explicit-any': 'off', - '@typescript-eslint/no-non-null-assertion': 'off', - 'vue/multi-word-component-names': 'off', - }, - }, - { - files: ['**/tests/**/*.ts', 'e2e/**/*.ts', 'tsup.config.ts'], - rules: { - '@typescript-eslint/explicit-function-return-type': 'off', - 'import/no-extraneous-dependencies': 'off', - 'vue/one-component-per-file': 'off', - }, - }, - ], -} diff --git a/commitlint.config.ts b/commitlint.config.ts index 6ee3b18b7a..859187f3de 100644 --- a/commitlint.config.ts +++ b/commitlint.config.ts @@ -6,12 +6,13 @@ const getSubDirectories = (dir: string): string[] => fs .readdirSync(dir) .filter((item) => fs.statSync(path.join(dir, item)).isDirectory()) -const packages = getSubDirectories(path.resolve(__dirname, 'packages')) + +const PACKAGES = getSubDirectories(path.resolve(__dirname, 'packages')) export default { extends: ['@commitlint/config-conventional'], rules: { - 'scope-enum': [2, 'always', [...packages, 'e2e']], + 'scope-enum': [2, 'always', [...PACKAGES, 'e2e']], 'footer-max-line-length': [0], }, } satisfies UserConfig diff --git a/e2e/docs/.vuepress/plugins/foo/fooPlugin.ts b/e2e/docs/.vuepress/plugins/foo/fooPlugin.ts index 93ef0c8cff..ac2c07663f 100644 --- a/e2e/docs/.vuepress/plugins/foo/fooPlugin.ts +++ b/e2e/docs/.vuepress/plugins/foo/fooPlugin.ts @@ -1,11 +1,8 @@ import { getDirname, path } from 'vuepress/utils' -const __dirname = getDirname(import.meta.url) +const DIRNAME = getDirname(import.meta.url) export const fooPlugin = { name: 'test-plugin', - clientConfigFile: path.resolve( - __dirname, - './nonDefaultExportClientConfig.js', - ), + clientConfigFile: path.resolve(DIRNAME, './nonDefaultExportClientConfig.js'), } diff --git a/e2e/docs/.vuepress/theme/client/layouts/Layout.vue b/e2e/docs/.vuepress/theme/client/layouts/Layout.vue index 4c4d2d83d2..07519db48d 100644 --- a/e2e/docs/.vuepress/theme/client/layouts/Layout.vue +++ b/e2e/docs/.vuepress/theme/client/layouts/Layout.vue @@ -21,4 +21,6 @@ const siteData = useSiteData() - + diff --git a/e2e/docs/.vuepress/theme/node/e2eTheme.ts b/e2e/docs/.vuepress/theme/node/e2eTheme.ts index 7c2a5f2e6c..7d2f5d1288 100644 --- a/e2e/docs/.vuepress/theme/node/e2eTheme.ts +++ b/e2e/docs/.vuepress/theme/node/e2eTheme.ts @@ -1,26 +1,24 @@ -import type { Page, Theme } from 'vuepress/core' +import type { Theme } from 'vuepress/core' import { getDirname, path } from 'vuepress/utils' -const __dirname = getDirname(import.meta.url) +const DIRNAME = getDirname(import.meta.url) -export const e2eTheme = (): Theme => { - return { - name: '@vuepress/theme-e2e', +export const e2eTheme = (): Theme => ({ + name: '@vuepress/theme-e2e', - alias: { - // ... - }, + alias: { + // ... + }, - define: { - // ... - }, + define: { + // ... + }, - clientConfigFile: path.resolve(__dirname, '../client/config.ts'), + clientConfigFile: path.resolve(DIRNAME, '../client/config.ts'), - extendsPage: (page: Page) => { - // ... - }, + extendsPage: () => { + // ... + }, - plugins: [], - } -} + plugins: [], +}) diff --git a/e2e/modules/conditional-exports/types.d.ts b/e2e/modules/conditional-exports/types.d.ts index 657d2a74ff..a1d1d5f6c2 100644 --- a/e2e/modules/conditional-exports/types.d.ts +++ b/e2e/modules/conditional-exports/types.d.ts @@ -1,2 +1,2 @@ -declare const str: string -export default str +declare const STR: string +export default STR diff --git a/e2e/playwright.config.ts b/e2e/playwright.config.ts index 13ff0ad7f3..a8b19d25c1 100644 --- a/e2e/playwright.config.ts +++ b/e2e/playwright.config.ts @@ -1,9 +1,9 @@ import { defineConfig, devices } from '@playwright/test' import { BASE, BUNDLER, isCI, isDev } from './utils/env' -const commandPart1 = isDev ? 'docs:dev' : 'docs:build' -const commandPart2 = BUNDLER === 'vite' ? '' : `-${BUNDLER}` -const commandPart3 = isDev ? '' : ' && pnpm docs:serve' +const COMMAND_PART1 = isDev ? 'docs:dev' : 'docs:build' +const COMMAND_PART2 = BUNDLER === 'vite' ? '' : `-${BUNDLER}` +const COMMAND_PART3 = isDev ? '' : ' && pnpm docs:serve' export default defineConfig({ testDir: 'tests', @@ -22,7 +22,7 @@ export default defineConfig({ trace: 'on-first-retry', }, webServer: { - command: `pnpm docs:clean && pnpm ${commandPart1}${commandPart2}${commandPart3}`, + command: `pnpm docs:clean && pnpm ${COMMAND_PART1}${COMMAND_PART2}${COMMAND_PART3}`, url: 'http://127.0.0.1:9080', reuseExistingServer: !isCI, }, diff --git a/e2e/tests/router/resolve-route-query-hash.spec.ts b/e2e/tests/router/resolve-route-query-hash.spec.ts index d7554c6425..1afa86d501 100644 --- a/e2e/tests/router/resolve-route-query-hash.spec.ts +++ b/e2e/tests/router/resolve-route-query-hash.spec.ts @@ -1,6 +1,6 @@ import { expect, test } from '@playwright/test' -const testCases = [ +const TEST_CASES = [ { path: '/?query=1', notFound: false, @@ -28,8 +28,11 @@ test('should resolve routes when including both the query and hash', async ({ for (const [index, li] of listItemsLocator.entries()) { const textContent = await li.textContent() - const resolvedRoute = JSON.parse(/: (\{.*\})\s*$/.exec(textContent!)![1]) - expect(resolvedRoute.path).toEqual(testCases[index].path) - expect(resolvedRoute.notFound).toEqual(testCases[index].notFound) + const resolvedRoute = JSON.parse( + /: (\{.*\})\s*$/.exec(textContent!)![1], + ) as { path: string; notFound: boolean } + + expect(resolvedRoute.path).toEqual(TEST_CASES[index].path) + expect(resolvedRoute.notFound).toEqual(TEST_CASES[index].notFound) } }) diff --git a/e2e/utils/source.ts b/e2e/utils/source.ts index 1db8f57011..6f07073446 100644 --- a/e2e/utils/source.ts +++ b/e2e/utils/source.ts @@ -1,17 +1,14 @@ import { fs, getDirname, path } from 'vuepress/utils' -const __dirname = getDirname(import.meta.url) +const DIRNAME = getDirname(import.meta.url) const resolveSourceMarkdownPath = (...args: string[]): string => - path.resolve(__dirname, '../docs', ...args) + path.resolve(DIRNAME, '../docs', ...args) -export const readSourceMarkdown = async (filePath: string): Promise => { - return fs.readFile(resolveSourceMarkdownPath(filePath), 'utf-8') -} +export const readSourceMarkdown = async (filePath: string): Promise => + fs.readFile(resolveSourceMarkdownPath(filePath), 'utf-8') export const writeSourceMarkdown = async ( filePath: string, content: string, -): Promise => { - return fs.writeFile(resolveSourceMarkdownPath(filePath), content) -} +): Promise => fs.writeFile(resolveSourceMarkdownPath(filePath), content) diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 0000000000..edb6b9af1f --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,41 @@ +import fs from 'node:fs' +import path from 'node:path' +import { fileURLToPath } from 'node:url' +import { vuepress } from 'eslint-config-vuepress' + +const ROOT = path.resolve(fileURLToPath(import.meta.url), '..') +const E2E_DIR = path.resolve(ROOT, 'e2e') +const PACKAGES_DIRS = fs + .readdirSync(path.resolve(ROOT, 'packages')) + .map((item) => `./packages/${item}`) + +export default vuepress( + { + imports: { + packageDir: [ROOT, E2E_DIR, ...PACKAGES_DIRS], + }, + typescript: { + overrides: { + '@typescript-eslint/no-dynamic-delete': 'off', + '@typescript-eslint/no-non-null-assertion': 'off', + 'no-underscore-dangle': [ + 'warn', + { allow: ['_context', '_registeredComponents'] }, + ], + }, + }, + vue: { + overrides: { + 'vue/multi-word-component-names': 'off', + 'no-useless-assignment': 'off', // TODO: false positive in vue sfc + }, + }, + }, + // { + // files: ['**/tests/**/*.ts', 'e2e/**/*.ts', 'tsup.config.ts'], + // rules: { + // '@typescript-eslint/explicit-function-return-type': 'off', + // 'vue/one-component-per-file': 'off', + // }, + // }, +) diff --git a/package.json b/package.json index c5fd77e1f4..b838469cc1 100644 --- a/package.json +++ b/package.json @@ -8,8 +8,8 @@ "check-types": "vue-tsc --noEmit", "clean": "pnpm --parallel --stream clean", "format": "prettier --write .", - "lint": "eslint --ext .cjs,.js,.ts,.vue . && prettier --check .", - "lint:fix": "eslint --fix --ext .cjs,.js,.ts,.vue . && prettier --write .", + "lint": "eslint . && prettier --check .", + "lint:fix": "eslint --fix . && prettier --write .", "prepare": "husky", "release": "pnpm release:check && pnpm release:version && pnpm release:publish", "release:changelog": "conventional-changelog -p angular -i CHANGELOG.md -s", @@ -39,16 +39,15 @@ "@vitest/coverage-istanbul": "^2.0.5", "bumpp": "^9.5.1", "conventional-changelog-cli": "^5.0.0", - "eslint": "^8.57.0", - "eslint-config-vuepress": "^4.10.1", - "eslint-config-vuepress-typescript": "^4.10.1", + "eslint": "^9.9.0", + "eslint-config-vuepress": "^5.1.0", "husky": "^9.1.4", "lint-staged": "^15.2.9", "prettier": "^3.3.3", - "prettier-config-vuepress": "^4.4.0", + "prettier-config-vuepress": "^5.0.0", "rimraf": "^6.0.1", "sort-package-json": "^2.10.0", - "tsconfig-vuepress": "^4.5.0", + "tsconfig-vuepress": "^5.0.0", "tsup": "^8.2.4", "typescript": "^5.5.4", "vite": "~5.4.0", diff --git a/packages/bundler-vite/src/build/build.ts b/packages/bundler-vite/src/build/build.ts index 4b90aa5137..33466ea6b0 100644 --- a/packages/bundler-vite/src/build/build.ts +++ b/packages/bundler-vite/src/build/build.ts @@ -22,13 +22,13 @@ export const build = async ( let serverOutput!: RollupOutput await withSpinner('Compiling with vite')(async () => { // create vite config - const clientConfig = await resolveViteConfig({ + const clientConfig = resolveViteConfig({ app, options, isBuild: true, isServer: false, }) - const serverConfig = await resolveViteConfig({ + const serverConfig = resolveViteConfig({ app, options, isBuild: true, diff --git a/packages/bundler-vite/src/build/renderPage.ts b/packages/bundler-vite/src/build/renderPage.ts index 6e8af6ed88..7601c1dcfa 100644 --- a/packages/bundler-vite/src/build/renderPage.ts +++ b/packages/bundler-vite/src/build/renderPage.ts @@ -1,8 +1,9 @@ import type { App, Page } from '@vuepress/core' +import type { VuepressSSRContext } from '@vuepress/shared' import { fs, renderHead } from '@vuepress/utils' import type { OutputAsset, OutputChunk, RollupOutput } from 'rollup' -import { ssrContextKey } from 'vue' import type { App as VueApp } from 'vue' +import { ssrContextKey } from 'vue' import type { SSRContext } from 'vue/server-renderer' import type { Router } from 'vue-router' import { renderPagePrefetchLinks } from './renderPagePrefetchLinks.js' @@ -37,8 +38,9 @@ export const renderPage = async ({ await vueRouter.isReady() // create vue ssr context with default values + // eslint-disable-next-line @typescript-eslint/no-dynamic-delete, no-underscore-dangle delete vueApp._context.provides[ssrContextKey] - const ssrContext: SSRContext = { + const ssrContext: VuepressSSRContext = { lang: 'en', head: [], } diff --git a/packages/bundler-vite/src/build/renderPagePrefetchLinks.ts b/packages/bundler-vite/src/build/renderPagePrefetchLinks.ts index a0bd189560..e4a81b24df 100644 --- a/packages/bundler-vite/src/build/renderPagePrefetchLinks.ts +++ b/packages/bundler-vite/src/build/renderPagePrefetchLinks.ts @@ -14,7 +14,7 @@ export const renderPagePrefetchLinks = ({ pageChunkFiles: string[] }): string => { // shouldPrefetch option - const shouldPrefetch = app.options.shouldPrefetch + const { shouldPrefetch } = app.options // do not render prefetch links if (shouldPrefetch === false) { diff --git a/packages/bundler-vite/src/build/renderPagePreloadLinks.ts b/packages/bundler-vite/src/build/renderPagePreloadLinks.ts index 8e198ec445..3f035d699e 100644 --- a/packages/bundler-vite/src/build/renderPagePreloadLinks.ts +++ b/packages/bundler-vite/src/build/renderPagePreloadLinks.ts @@ -14,7 +14,7 @@ export const renderPagePreloadLinks = ({ pageChunkFiles: string[] }): string => { // shouldPreload option - const shouldPreload = app.options.shouldPreload + const { shouldPreload } = app.options // do not render preload links if (shouldPreload === false) { diff --git a/packages/bundler-vite/src/dev.ts b/packages/bundler-vite/src/dev.ts index da2c69bb4f..c389d08131 100644 --- a/packages/bundler-vite/src/dev.ts +++ b/packages/bundler-vite/src/dev.ts @@ -14,7 +14,7 @@ export const dev = async ( // plugin hook: extendsBundlerOptions await app.pluginApi.hooks.extendsBundlerOptions.process(options, app) - const viteConfig = await resolveViteConfig({ + const viteConfig = resolveViteConfig({ app, options, isBuild: false, @@ -24,8 +24,8 @@ export const dev = async ( const server = await createServer(viteConfig) await server.listen() - const viteVersion = fs.readJsonSync( - require.resolve('vite/package.json'), + const viteVersion = ( + fs.readJsonSync(require.resolve('vite/package.json')) as { version: string } ).version server.config.logger.info( colors.cyan(`\n vite v${viteVersion}`) + diff --git a/packages/bundler-vite/src/plugins/vuepressMainPlugin.ts b/packages/bundler-vite/src/plugins/vuepressMainPlugin.ts index 05a53d3b0d..9e811ada18 100644 --- a/packages/bundler-vite/src/plugins/vuepressMainPlugin.ts +++ b/packages/bundler-vite/src/plugins/vuepressMainPlugin.ts @@ -56,7 +56,7 @@ import 'vuepress/client-app' try { const postcssConfigResult = await postcssrc() postcssPlugins = postcssConfigResult.plugins - } catch (error) { + } catch { postcssPlugins = [autoprefixer] } @@ -164,11 +164,11 @@ const resolveAlias = async ({ // plugin hook: alias const aliasResult = await app.pluginApi.hooks.alias.process(app, isServer) - aliasResult.forEach((aliasObject) => + aliasResult.forEach((aliasObject) => { Object.entries(aliasObject).forEach(([key, value]) => { alias[key] = value - }), - ) + }) + }) return [ ...Object.keys(alias).map((item) => ({ @@ -222,11 +222,11 @@ const resolveDefine = async ({ // plugin hook: define const defineResult = await app.pluginApi.hooks.define.process(app, isServer) - defineResult.forEach((defineObject) => + defineResult.forEach((defineObject) => { Object.entries(defineObject).forEach(([key, value]) => { define[key] = JSON.stringify(value) - }), - ) + }) + }) return define } diff --git a/packages/bundler-vite/src/resolveViteConfig.ts b/packages/bundler-vite/src/resolveViteConfig.ts index ee18480c1e..2c381386c7 100644 --- a/packages/bundler-vite/src/resolveViteConfig.ts +++ b/packages/bundler-vite/src/resolveViteConfig.ts @@ -8,7 +8,7 @@ import { } from './plugins/index.js' import type { ViteBundlerOptions } from './types.js' -export const resolveViteConfig = async ({ +export const resolveViteConfig = ({ app, options, isBuild, @@ -18,8 +18,8 @@ export const resolveViteConfig = async ({ options: ViteBundlerOptions isBuild: boolean isServer: boolean -}): Promise => { - return mergeConfig( +}): InlineConfig => + mergeConfig( { clearScreen: false, configFile: false, @@ -36,4 +36,3 @@ export const resolveViteConfig = async ({ // some vite options would not take effect inside a plugin, so we still need to merge them here in addition to userConfigPlugin options.viteOptions ?? {}, ) -} diff --git a/packages/bundler-webpack/src/build/build.ts b/packages/bundler-webpack/src/build/build.ts index c6ead7feab..72ddb08331 100644 --- a/packages/bundler-webpack/src/build/build.ts +++ b/packages/bundler-webpack/src/build/build.ts @@ -5,13 +5,14 @@ import { debug, fs, importFileDefault, + logger, withSpinner, } from '@vuepress/utils' import webpack from 'webpack' import { resolveWebpackConfig } from '../resolveWebpackConfig.js' import type { WebpackBundlerOptions } from '../types.js' import { - clientManifestFilename, + CLIENT_MANIFEST_FILENAME, createClientConfig, } from './createClientConfig.js' import { createServerConfig } from './createServerConfig.js' @@ -50,14 +51,14 @@ export const build = async ( if (err) { reject(err) } else if (stats?.hasErrors()) { - stats.toJson().errors?.forEach((err) => { - console.error(err) + stats.toJson().errors?.forEach((item) => { + logger.error(item) }) reject(new Error('Failed to compile with errors')) } else { if (stats?.hasWarnings()) { stats.toJson().warnings?.forEach((warning) => { - console.warn(warning) + logger.warn(warning) }) } resolve() @@ -70,8 +71,10 @@ export const build = async ( // render pages await withSpinner(`Rendering ${app.pages.length} pages`)(async (spinner) => { // load the client manifest file - const clientManifestPath = app.dir.temp(clientManifestFilename) - const clientManifest: ClientManifest = await fs.readJson(clientManifestPath) + const clientManifestPath = app.dir.temp(CLIENT_MANIFEST_FILENAME) + const clientManifest = (await fs.readJson( + clientManifestPath, + )) as ClientManifest // resolve client files meta const { initialFilesMeta, asyncFilesMeta, moduleFilesMetaMap } = diff --git a/packages/bundler-webpack/src/build/createClientConfig.ts b/packages/bundler-webpack/src/build/createClientConfig.ts index b64ea26770..e61f048c77 100644 --- a/packages/bundler-webpack/src/build/createClientConfig.ts +++ b/packages/bundler-webpack/src/build/createClientConfig.ts @@ -15,7 +15,7 @@ const require = createRequire(import.meta.url) /** * Filename of the client manifest file that generated by client plugin */ -export const clientManifestFilename = '.server/client-manifest.json' +export const CLIENT_MANIFEST_FILENAME = '.server/client-manifest.json' export const createClientConfig = async ( app: App, @@ -39,7 +39,7 @@ export const createClientConfig = async ( // vuepress client plugin, handle client assets info for ssr config .plugin('vuepress-client') - .use(createClientPlugin(app.dir.temp(clientManifestFilename))) + .use(createClientPlugin(app.dir.temp(CLIENT_MANIFEST_FILENAME))) // copy files from public dir to dest dir if (fs.pathExistsSync(app.dir.public())) { @@ -66,7 +66,7 @@ export const createClientConfig = async ( styles: { idHint: 'styles', // necessary to ensure async chunks are also extracted - test: (m: CssModule) => /css\/mini-extract/.test(m.type), + test: (m: CssModule) => m.type.includes('css/mini-extract'), chunks: 'all', enforce: true, reuseExistingChunk: true, diff --git a/packages/bundler-webpack/src/build/renderPage.ts b/packages/bundler-webpack/src/build/renderPage.ts index ac7deb7378..009841dffb 100644 --- a/packages/bundler-webpack/src/build/renderPage.ts +++ b/packages/bundler-webpack/src/build/renderPage.ts @@ -1,8 +1,8 @@ import type { App, Page } from '@vuepress/core' import type { VuepressSSRContext } from '@vuepress/shared' import { fs, renderHead } from '@vuepress/utils' -import { ssrContextKey } from 'vue' import type { App as VueApp } from 'vue' +import { ssrContextKey } from 'vue' import type { SSRContext } from 'vue/server-renderer' import type { Router } from 'vue-router' import { renderPagePrefetchLinks } from './renderPagePrefetchLinks.js' diff --git a/packages/bundler-webpack/src/dev/createDevServerConfig.ts b/packages/bundler-webpack/src/dev/createDevServerConfig.ts index de6ce8c7c1..742e7ae82c 100644 --- a/packages/bundler-webpack/src/dev/createDevServerConfig.ts +++ b/packages/bundler-webpack/src/dev/createDevServerConfig.ts @@ -5,10 +5,10 @@ import type WebpackDevServer from 'webpack-dev-server' import type { WebpackBundlerOptions } from '../types.js' import { trailingSlashMiddleware } from './trailingSlashMiddleware.js' -export const createDevServerConfig = async ( +export const createDevServerConfig = ( app: App, options: WebpackBundlerOptions, -): Promise => ({ +): WebpackDevServer.Configuration => ({ allowedHosts: 'all', compress: true, devMiddleware: { diff --git a/packages/bundler-webpack/src/dev/dev.ts b/packages/bundler-webpack/src/dev/dev.ts index 96b5f5428e..c96a31c530 100644 --- a/packages/bundler-webpack/src/dev/dev.ts +++ b/packages/bundler-webpack/src/dev/dev.ts @@ -29,7 +29,7 @@ export const dev = async ( const compiler = webpack(webpackConfig) // create webpack-dev-server - const serverConfig = await createDevServerConfig(app, options) + const serverConfig = createDevServerConfig(app, options) const server = new WebpackDevServer(serverConfig, compiler) const [, close] = await Promise.all([ @@ -56,7 +56,7 @@ export const dev = async ( if (hasFinished) return hasFinished = true - spinner.succeed(`Compilation finished in ${endTime! - startTime!}ms`) + spinner.succeed(`Compilation finished in ${endTime - startTime}ms`) // replace `0.0.0.0` with `localhost` as `0.0.0.0` is not available on windows const url = `http://${ @@ -67,7 +67,7 @@ export const dev = async ( ) // resolve the close function - resolve((): Promise => server.stop()) + resolve(async (): Promise => server.stop()) }) // stop spinner and reject error if the first compilation is failed diff --git a/packages/bundler-webpack/src/dev/trailingSlashMiddleware.ts b/packages/bundler-webpack/src/dev/trailingSlashMiddleware.ts index 17133dd16a..34d34e0717 100644 --- a/packages/bundler-webpack/src/dev/trailingSlashMiddleware.ts +++ b/packages/bundler-webpack/src/dev/trailingSlashMiddleware.ts @@ -15,7 +15,8 @@ export const trailingSlashMiddleware: RequestHandler = (req, res, next) => { // if the path already has trailing slash req.path.endsWith('/') ) { - return next() + next() + return } // add trailing slash and retain query diff --git a/packages/bundler-webpack/src/types.ts b/packages/bundler-webpack/src/types.ts index 9ce835dba1..30e67e256b 100644 --- a/packages/bundler-webpack/src/types.ts +++ b/packages/bundler-webpack/src/types.ts @@ -84,7 +84,7 @@ export interface StylePreprocessorLoaderOptions { | string | (( content: string, - loaderContext: LoaderContext>, + loaderContext: LoaderContext>, ) => string) sourceMap?: boolean webpackImporter?: boolean @@ -94,7 +94,7 @@ export interface StylePreprocessorLoaderOptions { * Common type for style pre-processor options */ export type StylePreprocessorOptions< - T extends Record = Record, + T extends Record = Record, > = T | ((loaderContext: LoaderContext) => TextDecodeOptions) /** @@ -105,7 +105,7 @@ export type StylePreprocessorOptions< export interface PostcssLoaderOptions extends Pick { execute?: boolean - implementation?: ((...args: any) => any) | string + implementation?: string | ((...args: unknown[]) => unknown) postcssOptions?: StylePreprocessorOptions } @@ -115,7 +115,7 @@ export interface PostcssLoaderOptions * @see https://github.com/webpack-contrib/stylus-loader#options */ export interface StylusLoaderOptions extends StylePreprocessorLoaderOptions { - implementation?: ((...args: any) => any) | string + implementation?: string | ((...args: unknown[]) => unknown) stylusOptions?: StylePreprocessorOptions } @@ -125,8 +125,8 @@ export interface StylusLoaderOptions extends StylePreprocessorLoaderOptions { * @see https://github.com/webpack-contrib/sass-loader#options */ export interface SassLoaderOptions extends StylePreprocessorLoaderOptions { - api?: 'legacy' | 'modern' | 'modern-compiler' - implementation?: Record | string + api?: 'legacy' | 'modern-compiler' | 'modern' + implementation?: Record | string sassOptions?: StylePreprocessorOptions warnRuleAsWarning?: boolean } @@ -137,7 +137,7 @@ export interface SassLoaderOptions extends StylePreprocessorLoaderOptions { * @see https://github.com/webpack-contrib/less-loader#options */ export interface LessLoaderOptions extends StylePreprocessorLoaderOptions { - implementation?: Record | string + implementation?: Record | string lessLogAsWarnOrErr?: boolean lessOptions?: StylePreprocessorOptions } diff --git a/packages/cli/src/commands/build/createBuild.ts b/packages/cli/src/commands/build/createBuild.ts index 5828bdc5c8..ad001bd536 100644 --- a/packages/cli/src/commands/build/createBuild.ts +++ b/packages/cli/src/commands/build/createBuild.ts @@ -1,6 +1,6 @@ import process from 'node:process' -import { createBuildApp } from '@vuepress/core' import type { AppConfig } from '@vuepress/core' +import { createBuildApp } from '@vuepress/core' import { debug, formatMs, fs, logger, withSpinner } from '@vuepress/utils' import { loadUserConfig, @@ -53,13 +53,13 @@ export const createBuild = // clean temp and cache if (commandOptions.cleanTemp === true) { - await withSpinner('Cleaning temp')(() => { - return fs.remove(app.dir.temp()) + await withSpinner('Cleaning temp')(async () => { + await fs.remove(app.dir.temp()) }) } if (commandOptions.cleanCache === true) { - await withSpinner('Cleaning cache')(() => { - return fs.remove(app.dir.cache()) + await withSpinner('Cleaning cache')(async () => { + await fs.remove(app.dir.cache()) }) } diff --git a/packages/cli/src/commands/dev/createDev.ts b/packages/cli/src/commands/dev/createDev.ts index d34a7b7f82..b340e00a82 100644 --- a/packages/cli/src/commands/dev/createDev.ts +++ b/packages/cli/src/commands/dev/createDev.ts @@ -1,6 +1,6 @@ import process from 'node:process' -import { createDevApp } from '@vuepress/core' import type { AppConfig } from '@vuepress/core' +import { createDevApp } from '@vuepress/core' import { debug, fs, logger, withSpinner } from '@vuepress/utils' import type { FSWatcher } from 'chokidar' import { @@ -57,14 +57,12 @@ export const createDev = (defaultAppConfig: Partial): DevCommand => { // clean temp and cache if (commandOptions.cleanTemp === true) { - await withSpinner('Cleaning temp')(() => { - return fs.remove(app.dir.temp()) - }) + await withSpinner('Cleaning temp')(async () => fs.remove(app.dir.temp())) } if (commandOptions.cleanCache === true) { - await withSpinner('Cleaning cache')(() => { - return fs.remove(app.dir.cache()) - }) + await withSpinner('Cleaning cache')(async () => + fs.remove(app.dir.cache()), + ) } // initialize and prepare @@ -88,7 +86,7 @@ export const createDev = (defaultAppConfig: Partial): DevCommand => { const restart = async (): Promise => { await Promise.all([ // close all watchers - ...watchers.map((item) => item.close()), + ...watchers.map(async (item) => item.close()), // close current dev server close(), ]) diff --git a/packages/cli/src/commands/dev/handlePageAdd.ts b/packages/cli/src/commands/dev/handlePageAdd.ts index 8f4b367975..bcf5415a97 100644 --- a/packages/cli/src/commands/dev/handlePageAdd.ts +++ b/packages/cli/src/commands/dev/handlePageAdd.ts @@ -1,10 +1,10 @@ +import type { App, Page } from '@vuepress/core' import { createPage, preparePageChunk, preparePageComponent, prepareRoutes, } from '@vuepress/core' -import type { App, Page } from '@vuepress/core' /** * Event handler for page add event diff --git a/packages/cli/src/commands/dev/handlePageChange.ts b/packages/cli/src/commands/dev/handlePageChange.ts index 6eeff179aa..c2255096f0 100644 --- a/packages/cli/src/commands/dev/handlePageChange.ts +++ b/packages/cli/src/commands/dev/handlePageChange.ts @@ -1,10 +1,10 @@ +import type { App, Page } from '@vuepress/core' import { createPage, preparePageChunk, preparePageComponent, prepareRoutes, } from '@vuepress/core' -import type { App, Page } from '@vuepress/core' /** * Event handler for page change event diff --git a/packages/cli/src/commands/dev/handlePageUnlink.ts b/packages/cli/src/commands/dev/handlePageUnlink.ts index 1260480292..ad4d01a2c4 100644 --- a/packages/cli/src/commands/dev/handlePageUnlink.ts +++ b/packages/cli/src/commands/dev/handlePageUnlink.ts @@ -1,5 +1,5 @@ -import { prepareRoutes } from '@vuepress/core' import type { App, Page } from '@vuepress/core' +import { prepareRoutes } from '@vuepress/core' /** * Event handler for page unlink event diff --git a/packages/cli/src/commands/dev/watchUserConfigFile.ts b/packages/cli/src/commands/dev/watchUserConfigFile.ts index 6b89ac9e89..fa11200698 100644 --- a/packages/cli/src/commands/dev/watchUserConfigFile.ts +++ b/packages/cli/src/commands/dev/watchUserConfigFile.ts @@ -1,7 +1,7 @@ import process from 'node:process' import { colors, logger } from '@vuepress/utils' -import chokidar from 'chokidar' import type { FSWatcher } from 'chokidar' +import chokidar from 'chokidar' export const watchUserConfigFile = ({ userConfigPath, @@ -20,7 +20,7 @@ export const watchUserConfigFile = ({ }) configWatcher.on('change', (configFile) => { logger.info(`config ${colors.magenta(configFile)} is modified`) - restart() + void restart() }) const depsWatcher = chokidar.watch(userConfigDependencies, { @@ -29,7 +29,7 @@ export const watchUserConfigFile = ({ }) depsWatcher.on('change', (depFile) => { logger.info(`config dependency ${colors.magenta(depFile)} is modified`) - restart() + void restart() }) return [configWatcher, depsWatcher] diff --git a/packages/cli/src/commands/info.ts b/packages/cli/src/commands/info.ts index 3b09851a3b..ee2906e4b3 100644 --- a/packages/cli/src/commands/info.ts +++ b/packages/cli/src/commands/info.ts @@ -1,4 +1,4 @@ -import { ora } from '@vuepress/utils' +import { logger, ora } from '@vuepress/utils' import envinfo from 'envinfo' export const info = async (): Promise => { @@ -33,5 +33,5 @@ export const info = async (): Promise => { ) spinner.stop() - console.info(result) + logger.info(result) } diff --git a/packages/cli/src/config/loadUserConfig.ts b/packages/cli/src/config/loadUserConfig.ts index ff796865fa..f1ea549af4 100644 --- a/packages/cli/src/config/loadUserConfig.ts +++ b/packages/cli/src/config/loadUserConfig.ts @@ -42,10 +42,10 @@ export const loadUserConfig = async ( plugins: [ { name: 'externalize-deps', - setup(build) { - build.onResolve({ filter: /.*/ }, ({ path: id }) => { + setup(pluginBuild) { + pluginBuild.onResolve({ filter: /.*/ }, ({ path: id }) => { // externalize bare imports - if (id[0] !== '.' && !path.isAbsolute(id)) { + if (!id.startsWith('.') && !path.isAbsolute(id)) { return { external: true, } @@ -56,8 +56,8 @@ export const loadUserConfig = async ( }, { name: 'inject-file-scope-variables', - setup(build) { - build.onLoad({ filter: /\.[cm]?[jt]s$/ }, async (args) => { + setup(pluginBuild) { + pluginBuild.onLoad({ filter: /\.[cm]?[jt]s$/ }, async (args) => { const contents = await fs.readFile(args.path, 'utf8') const injectValues = `const ${dirnameVarName} = ${JSON.stringify( diff --git a/packages/cli/src/config/resolveAppConfig.ts b/packages/cli/src/config/resolveAppConfig.ts index ba52cde94e..0c8263cbdb 100644 --- a/packages/cli/src/config/resolveAppConfig.ts +++ b/packages/cli/src/config/resolveAppConfig.ts @@ -25,7 +25,12 @@ export const resolveAppConfig = ({ ...userConfig, // allow cli options to override config file ...cliAppConfig, - } as AppConfig + } + + if (appConfig.source === undefined) { + logger.error(`The ${colors.magenta('source')} option is missing.`) + return null + } if (appConfig.bundler === undefined || appConfig.theme === undefined) { logger.error( @@ -57,5 +62,5 @@ export const resolveAppConfig = ({ delete appConfig.dest } - return appConfig + return appConfig as AppConfig } diff --git a/packages/cli/tests/config/loadUserConfig.spec.ts b/packages/cli/tests/config/loadUserConfig.spec.ts index 74ccbd1c3b..3327d9bd05 100644 --- a/packages/cli/tests/config/loadUserConfig.spec.ts +++ b/packages/cli/tests/config/loadUserConfig.spec.ts @@ -2,7 +2,7 @@ import { path } from '@vuepress/utils' import { describe, expect, it } from 'vitest' import { loadUserConfig } from '../../src/index.js' -const tsCases: [string, any][] = [ +const TS_CASES: [string, unknown][] = [ [ path.resolve(__dirname, '../__fixtures__/config/ts/.vuepress/config.ts'), { @@ -17,7 +17,7 @@ const tsCases: [string, any][] = [ ], ] -const jsCases: [string, any][] = [ +const JS_CASES: [string, unknown][] = [ [ path.resolve(__dirname, '../__fixtures__/config/js/.vuepress/config.js'), { @@ -32,7 +32,7 @@ const jsCases: [string, any][] = [ ], ] -const mjsCases: [string, any][] = [ +const MJS_CASES: [string, unknown][] = [ [ path.resolve(__dirname, '../__fixtures__/config/mjs/.vuepress/config.mjs'), { @@ -49,7 +49,7 @@ const mjsCases: [string, any][] = [ describe('cli > config > loadUserConfig', () => { describe('should load ts config file correctly', () => { - tsCases.forEach(([source, expected]) => { + TS_CASES.forEach(([source, expected]) => { it(JSON.stringify(source), async () => { const { userConfig } = await loadUserConfig(source) expect(userConfig).toEqual(expected) @@ -58,7 +58,7 @@ describe('cli > config > loadUserConfig', () => { }) describe('should load js config file correctly', () => { - jsCases.forEach(([source, expected]) => { + JS_CASES.forEach(([source, expected]) => { it(JSON.stringify(source), async () => { const { userConfig } = await loadUserConfig(source) expect(userConfig).toEqual(expected) @@ -67,7 +67,7 @@ describe('cli > config > loadUserConfig', () => { }) describe('should load mjs config file correctly', () => { - mjsCases.forEach(([source, expected]) => { + MJS_CASES.forEach(([source, expected]) => { it(JSON.stringify(source), async () => { const { userConfig } = await loadUserConfig(source) expect(userConfig).toEqual(expected) diff --git a/packages/cli/tests/config/resolveUserConfigPath.spec.ts b/packages/cli/tests/config/resolveUserConfigPath.spec.ts index 4fdc25f309..150cadd2aa 100644 --- a/packages/cli/tests/config/resolveUserConfigPath.spec.ts +++ b/packages/cli/tests/config/resolveUserConfigPath.spec.ts @@ -1,3 +1,4 @@ +/* eslint-disable no-console */ import { path } from '@vuepress/utils' import { describe, expect, it, vi } from 'vitest' import { resolveUserConfigPath } from '../../src/index.js' diff --git a/packages/client/src/app.ts b/packages/client/src/app.ts index 4c85269963..dfab9f56d2 100644 --- a/packages/client/src/app.ts +++ b/packages/client/src/app.ts @@ -29,15 +29,16 @@ export const createVueApp: CreateVueAppFunction = async () => { } // get all root components - const rootComponents = clientConfigs.flatMap(({ rootComponents = [] }) => - rootComponents.map((component) => h(component)), + const clientRootComponents = clientConfigs.flatMap( + ({ rootComponents = [] }) => + rootComponents.map((component) => h(component)), ) // get page layout const pageLayout = usePageLayout() // render layout and root components - return () => [h(pageLayout.value), rootComponents] + return () => [h(pageLayout.value), clientRootComponents] }, }) @@ -74,8 +75,8 @@ export const createVueApp: CreateVueAppFunction = async () => { // mount app in client bundle if (!__VUEPRESS_SSR__) { - createVueApp().then(({ app, router }) => { - router.isReady().then(() => { + void createVueApp().then(({ app, router }) => { + void router.isReady().then(() => { app.mount('#app') }) }) diff --git a/packages/client/src/components/AutoLink.ts b/packages/client/src/components/AutoLink.ts index f570dcd49d..94daedc223 100644 --- a/packages/client/src/components/AutoLink.ts +++ b/packages/client/src/components/AutoLink.ts @@ -9,7 +9,7 @@ export interface AutoLinkConfig { /** * Pattern to determine if the link should be active, which has higher priority than `exact` */ - activeMatch?: string | RegExp + activeMatch?: RegExp | string /** * The `aria-label` attribute @@ -59,9 +59,9 @@ export const AutoLink = defineComponent({ }, slots: Object as SlotsType<{ - default?: (config: AutoLinkConfig) => VNode[] | VNode - before?: (config: AutoLinkConfig) => VNode[] | VNode | null - after?: (config: AutoLinkConfig) => VNode[] | VNode | null + default?: (config: AutoLinkConfig) => VNode | VNode[] + before?: (config: AutoLinkConfig) => VNode | VNode[] | null + after?: (config: AutoLinkConfig) => VNode | VNode[] | null }>, setup(props, { slots }) { diff --git a/packages/client/src/components/Content.ts b/packages/client/src/components/Content.ts index 41204daeb6..e58b46214d 100644 --- a/packages/client/src/components/Content.ts +++ b/packages/client/src/components/Content.ts @@ -6,7 +6,6 @@ import { resolveRoute } from '../router/index.js' * Markdown rendered content */ export const Content = defineComponent({ - // eslint-disable-next-line vue/no-reserved-component-names name: 'Content', props: { @@ -22,7 +21,9 @@ export const Content = defineComponent({ const ContentComponent = computed(() => { if (!props.path) return pageComponent.value const route = resolveRoute(props.path) - return defineAsyncComponent(() => route.loader().then(({ comp }) => comp)) + return defineAsyncComponent(async () => + route.loader().then(({ comp }) => comp), + ) }) return () => h(ContentComponent.value) diff --git a/packages/client/src/components/RouteLink.ts b/packages/client/src/components/RouteLink.ts index 1b1e62b157..4f861c5baa 100644 --- a/packages/client/src/components/RouteLink.ts +++ b/packages/client/src/components/RouteLink.ts @@ -1,5 +1,5 @@ -import { computed, defineComponent, h } from 'vue' import type { SlotsType, VNode } from 'vue' +import { computed, defineComponent, h } from 'vue' import { useRoute, useRouter } from 'vue-router' import { resolveRouteFullPath } from '../router/index.js' @@ -81,7 +81,7 @@ export const RouteLink = defineComponent({ }, slots: Object as SlotsType<{ - default: () => string | VNode | (string | VNode)[] + default: () => (VNode | string)[] | VNode | string }>, setup(props, { slots }) { @@ -102,11 +102,11 @@ export const RouteLink = defineComponent({ href: path.value, onClick: (event: MouseEvent = {} as MouseEvent) => { if (guardEvent(event)) { - router.push(props.to).catch() + void router.push(props.to).catch() } }, }, - slots.default?.(), + slots.default(), ) }, }) diff --git a/packages/core/src/app/resolveAppVersion.ts b/packages/core/src/app/resolveAppVersion.ts index 0990da5f7e..590340ffc4 100644 --- a/packages/core/src/app/resolveAppVersion.ts +++ b/packages/core/src/app/resolveAppVersion.ts @@ -9,6 +9,6 @@ const require = createRequire(import.meta.url) export const resolveAppVersion = (): string => { const pkgJson = fs.readJsonSync( require.resolve('@vuepress/core/package.json'), - ) + ) as { version: string } return pkgJson.version } diff --git a/packages/core/src/page/renderPageContent.ts b/packages/core/src/page/renderPageContent.ts index ea430de1f2..3702cd037b 100644 --- a/packages/core/src/page/renderPageContent.ts +++ b/packages/core/src/page/renderPageContent.ts @@ -74,6 +74,7 @@ export const renderPageContent = ({ 'frontmatter', ), sfcBlocks, + // eslint-disable-next-line @typescript-eslint/no-unnecessary-template-expression -- the title from frontmatter is not guaranteed to be a string title: frontmatter.title ? `${frontmatter.title}` : title, } } diff --git a/packages/core/src/page/resolvePageSlug.ts b/packages/core/src/page/resolvePageSlug.ts index e538526e47..a7329ffbaa 100644 --- a/packages/core/src/page/resolvePageSlug.ts +++ b/packages/core/src/page/resolvePageSlug.ts @@ -15,5 +15,5 @@ export const resolvePageSlug = ({ } const filename = path.parse(filePathRelative).name const match = filename.match(DATE_RE) - return match ? match[3]! : filename + return match ? match[3] : filename } diff --git a/packages/core/src/pluginApi/normalizeAliasDefineHook.ts b/packages/core/src/pluginApi/normalizeAliasDefineHook.ts index 6c3da1a21b..6801b04cb6 100644 --- a/packages/core/src/pluginApi/normalizeAliasDefineHook.ts +++ b/packages/core/src/pluginApi/normalizeAliasDefineHook.ts @@ -1,3 +1,4 @@ +/* eslint-disable @typescript-eslint/require-await, @typescript-eslint/no-unsafe-return */ import { isFunction } from '@vuepress/shared' import type { AliasDefineHook } from '../types/index.js' diff --git a/packages/core/tests/app/resolveAppOptions.spec.ts b/packages/core/tests/app/resolveAppOptions.spec.ts index a7f3ff125c..a79cec1d5a 100644 --- a/packages/core/tests/app/resolveAppOptions.spec.ts +++ b/packages/core/tests/app/resolveAppOptions.spec.ts @@ -1,5 +1,6 @@ import { path, templateRenderer } from '@vuepress/utils' import { describe, expect, it } from 'vitest' +import type { Bundler, Theme } from '../../src/index.js' import { resolveAppOptions } from '../../src/index.js' describe('core > app > resolveAppOptions', () => { @@ -9,8 +10,8 @@ describe('core > app > resolveAppOptions', () => { expect( resolveAppOptions({ source, - theme: { name: 'theme' } as any, - bundler: { name: 'bundler' } as any, + theme: { name: 'theme' } as Theme, + bundler: { name: 'bundler' } as Bundler, }), ).toEqual({ base: '/', diff --git a/packages/core/tests/app/resolveAppPages.spec.ts b/packages/core/tests/app/resolveAppPages.spec.ts index 8d47875eb2..877d910819 100644 --- a/packages/core/tests/app/resolveAppPages.spec.ts +++ b/packages/core/tests/app/resolveAppPages.spec.ts @@ -1,14 +1,15 @@ import { createMarkdown } from '@vuepress/markdown' import { path } from '@vuepress/utils' import { describe, expect, it } from 'vitest' +import type { Bundler, Theme } from '../../src/index.js' import { createBaseApp, resolveAppPages } from '../../src/index.js' describe('core > app > resolveAppPages', () => { it('should create two pages with default 404 page', async () => { const app = createBaseApp({ source: path.resolve(__dirname, '../__fixtures__/pages'), - theme: { name: 'test' }, - bundler: {} as any, + theme: { name: 'test' } as Theme, + bundler: {} as Bundler, }) app.markdown = createMarkdown() @@ -27,8 +28,8 @@ describe('core > app > resolveAppPages', () => { it('should create two pages with custom 404 page', async () => { const app = createBaseApp({ source: path.resolve(__dirname, '../__fixtures__/pages-with-404'), - theme: { name: 'test' }, - bundler: {} as any, + theme: { name: 'test' } as Theme, + bundler: {} as Bundler, }) app.markdown = createMarkdown() @@ -46,8 +47,8 @@ describe('core > app > resolveAppPages', () => { it('should process extendsPageOptions hook correctly', async () => { const app = createBaseApp({ source: path.resolve(__dirname, '../__fixtures__/pages-with-404'), - theme: { name: 'test' }, - bundler: {} as any, + theme: { name: 'test' } as Theme, + bundler: {} as Bundler, }) app.use({ @@ -70,8 +71,8 @@ describe('core > app > resolveAppPages', () => { it('should process extendsPage hook correctly', async () => { const app = createBaseApp({ source: path.resolve(__dirname, '../__fixtures__/pages-with-404'), - theme: { name: 'test' }, - bundler: {} as any, + theme: { name: 'test' } as Theme, + bundler: {} as Bundler, }) app.use({ diff --git a/packages/markdown/tests/plugins/importCodePlugin.spec.ts b/packages/markdown/tests/plugins/importCodePlugin.spec.ts index 7bd5cc3f38..37beda1faa 100644 --- a/packages/markdown/tests/plugins/importCodePlugin.spec.ts +++ b/packages/markdown/tests/plugins/importCodePlugin.spec.ts @@ -1,3 +1,4 @@ +/* eslint-disable no-console */ import { fs, path } from '@vuepress/utils' import MarkdownIt from 'markdown-it' import { @@ -9,8 +10,8 @@ import { it, vi, } from 'vitest' -import { importCodePlugin, vPrePlugin } from '../../src/index.js' import type { MarkdownEnv } from '../../src/index.js' +import { importCodePlugin, vPrePlugin } from '../../src/index.js' const jsFixturePathRelative = '../__fixtures__/importCode.js' const mdFixturePathRelative = '../__fixtures__/importCode.md' @@ -52,7 +53,7 @@ describe('@vuepress/markdown > plugins > importCodePlugin', () => { const rendered = md.render(source.join('\n\n'), env) expect(rendered).toEqual( - source.map((item) => `

${item}

`).join('\n') + '\n', + `${source.map((item) => `

${item}

`).join('\n')}\n`, ) expect(env.importedFiles).toBeUndefined() }) diff --git a/packages/shared/src/utils/routes/inferRoutePath.ts b/packages/shared/src/utils/routes/inferRoutePath.ts index 0a1ba2e4aa..5436e677f9 100644 --- a/packages/shared/src/utils/routes/inferRoutePath.ts +++ b/packages/shared/src/utils/routes/inferRoutePath.ts @@ -10,11 +10,11 @@ export const inferRoutePath = (path: string): string => { // convert /foo/bar.md to /foo/bar.html if (routePath.endsWith('.md')) { - routePath = routePath.substring(0, routePath.length - 3) + '.html' + routePath = `${routePath.substring(0, routePath.length - 3)}.html` } // convert /foo/bar to /foo/bar.html else if (!routePath.endsWith('.html')) { - routePath = routePath + '.html' + routePath = `${routePath}.html` } // convert /foo/index.html to /foo/ diff --git a/packages/shared/src/utils/typeGuards.ts b/packages/shared/src/utils/typeGuards.ts index 6ff96310bf..44f08427be 100644 --- a/packages/shared/src/utils/typeGuards.ts +++ b/packages/shared/src/utils/typeGuards.ts @@ -1,14 +1,17 @@ /** * Check if a value is a function */ -// eslint-disable-next-line @typescript-eslint/ban-types +// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type export const isFunction = (val: unknown): val is Function => typeof val === 'function' /** * Check if a value is plain object, with generic type support */ -export const isPlainObject = = Record>( +export const isPlainObject = < + // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters + T extends Record = Record, +>( val: unknown, ): val is T => Object.prototype.toString.call(val) === '[object Object]' diff --git a/packages/shared/tests/links/isLinkExternal.spec.ts b/packages/shared/tests/links/isLinkExternal.spec.ts index d875503ee1..2736cceffd 100644 --- a/packages/shared/tests/links/isLinkExternal.spec.ts +++ b/packages/shared/tests/links/isLinkExternal.spec.ts @@ -1,7 +1,7 @@ import { expect, it } from 'vitest' import { isLinkExternal } from '../../src/index.js' -const testCases: [ +const TEST_CASES: [ Parameters, ReturnType, ][] = [ @@ -62,7 +62,7 @@ const testCases: [ [['./foo/bar/baz.html', '/foo/'], false], ] -testCases.forEach(([[link, base], expected]) => { +TEST_CASES.forEach(([[link, base], expected]) => { it(`link: ${link}, base: ${base}`, () => { expect(isLinkExternal(link, base)).toBe(expected) expect(isLinkExternal(`${link}#foobar`, base)).toBe(expected) diff --git a/packages/shared/tests/links/isLinkHttp.spec.ts b/packages/shared/tests/links/isLinkHttp.spec.ts index c897ab8680..750727ad2c 100644 --- a/packages/shared/tests/links/isLinkHttp.spec.ts +++ b/packages/shared/tests/links/isLinkHttp.spec.ts @@ -1,7 +1,7 @@ import { expect, it } from 'vitest' import { isLinkHttp } from '../../src/index.js' -const testCases: [string, ReturnType][] = [ +const TEST_CASES: [string, ReturnType][] = [ ['https://foobar.com', true], ['http://foobar.com', true], ['//foobar.com', true], @@ -9,7 +9,7 @@ const testCases: [string, ReturnType][] = [ ['/foo/bar', false], ] -testCases.forEach(([source, expected]) => { +TEST_CASES.forEach(([source, expected]) => { it(`link: ${source}`, () => { expect(isLinkHttp(source)).toBe(expected) }) diff --git a/packages/shared/tests/links/isLinkWithProtocol.spec.ts b/packages/shared/tests/links/isLinkWithProtocol.spec.ts index 85679f31ec..5cdbd41ba2 100644 --- a/packages/shared/tests/links/isLinkWithProtocol.spec.ts +++ b/packages/shared/tests/links/isLinkWithProtocol.spec.ts @@ -1,7 +1,7 @@ import { expect, it } from 'vitest' import { isLinkWithProtocol } from '../../src/index.js' -const testCases: [string, ReturnType][] = [ +const TEST_CASES: [string, ReturnType][] = [ // with protocol ['ftp://foobar.com', true], ['ms-windows-store://home', true], @@ -23,7 +23,7 @@ const testCases: [string, ReturnType][] = [ ['foo/bar', false], ] -testCases.forEach(([source, expected]) => { +TEST_CASES.forEach(([source, expected]) => { it(`link: ${source}`, () => { expect(isLinkWithProtocol(source)).toBe(expected) }) diff --git a/packages/shared/tests/removeEndingSlash.spec.ts b/packages/shared/tests/removeEndingSlash.spec.ts index 45dfb1b52d..8e67bea2e4 100644 --- a/packages/shared/tests/removeEndingSlash.spec.ts +++ b/packages/shared/tests/removeEndingSlash.spec.ts @@ -1,7 +1,7 @@ import { expect, it } from 'vitest' import { removeEndingSlash } from '../src/index.js' -const testCases = [ +const TEST_CASES = [ ['foo/bar', 'foo/bar'], ['foo/bar/', 'foo/bar'], ['/foo/bar', '/foo/bar'], @@ -10,7 +10,7 @@ const testCases = [ ['/foo/bar.html', '/foo/bar.html'], ] -testCases.forEach(([source, expected]) => { +TEST_CASES.forEach(([source, expected]) => { it(source, () => { expect(removeEndingSlash(source)).toBe(expected) }) diff --git a/packages/shared/tests/removeLeadingSlash.spec.ts b/packages/shared/tests/removeLeadingSlash.spec.ts index 5ecb891742..f2321ddfeb 100644 --- a/packages/shared/tests/removeLeadingSlash.spec.ts +++ b/packages/shared/tests/removeLeadingSlash.spec.ts @@ -1,7 +1,7 @@ import { expect, it } from 'vitest' import { removeLeadingSlash } from '../src/index.js' -const testCases = [ +const TEST_CASES = [ ['foo/bar', 'foo/bar'], ['foo/bar/', 'foo/bar/'], ['/foo/bar', 'foo/bar'], @@ -10,7 +10,7 @@ const testCases = [ ['/foo/bar.html', 'foo/bar.html'], ] -testCases.forEach(([source, expected]) => { +TEST_CASES.forEach(([source, expected]) => { it(source, () => { expect(removeLeadingSlash(source)).toBe(expected) }) diff --git a/packages/shared/tests/resolveHeadIdentifier.spec.ts b/packages/shared/tests/resolveHeadIdentifier.spec.ts index 569237147b..554bcc4743 100644 --- a/packages/shared/tests/resolveHeadIdentifier.spec.ts +++ b/packages/shared/tests/resolveHeadIdentifier.spec.ts @@ -1,6 +1,6 @@ import { expect, it } from 'vitest' -import { resolveHeadIdentifier } from '../src/index.js' import type { HeadConfig } from '../src/index.js' +import { resolveHeadIdentifier } from '../src/index.js' it('should resolve same identifiers of ', () => { const titleFoo = resolveHeadIdentifier(['title', {}, 'title foo']) diff --git a/packages/shared/tests/routes/normalizeRoutePath.spec.ts b/packages/shared/tests/routes/normalizeRoutePath.spec.ts index 1732c6d2f6..2fbb745762 100644 --- a/packages/shared/tests/routes/normalizeRoutePath.spec.ts +++ b/packages/shared/tests/routes/normalizeRoutePath.spec.ts @@ -1,7 +1,7 @@ import { describe, expect, it } from 'vitest' import { normalizeRoutePath } from '../../src/index.js' -const testCases = [ +const TEST_CASES = [ // absolute index [['/'], '/'], [['/README.md'], '/'], @@ -198,7 +198,7 @@ const testCases = [ ] describe('should normalize clean paths correctly', () => { - testCases.forEach(([[path, current], expected]) => + TEST_CASES.forEach(([[path, current], expected]) => it(`${current ? `"${current}"-` : ''}"${path}" -> "${expected}"`, () => { expect(normalizeRoutePath(path, current)).toBe(expected) }), diff --git a/packages/shared/tests/routes/resolveRoutePathFromUrl.spec.ts b/packages/shared/tests/routes/resolveRoutePathFromUrl.spec.ts index f7a9b892fd..8c6076f15d 100644 --- a/packages/shared/tests/routes/resolveRoutePathFromUrl.spec.ts +++ b/packages/shared/tests/routes/resolveRoutePathFromUrl.spec.ts @@ -1,7 +1,7 @@ import { expect, it } from 'vitest' import { resolveRoutePathFromUrl } from '../../src/index.js' -const testCases: [ +const TEST_CASES: [ Parameters<typeof resolveRoutePathFromUrl>, ReturnType<typeof resolveRoutePathFromUrl>, ][] = [ @@ -23,9 +23,9 @@ const testCases: [ [['foo/bar', '/base/'], 'foo/bar'], ] -testCases.forEach(([source, expected]) => { +TEST_CASES.forEach(([source, expected]) => { it(`url: ${source[0]}, base: ${ - source[1] || '/' + source[1] ?? '/' } => expected: ${expected}`, () => { expect(resolveRoutePathFromUrl(...source)).toEqual(expected) }) diff --git a/packages/shared/tests/routes/splitPath.spec.ts b/packages/shared/tests/routes/splitPath.spec.ts index 6dfd2452fb..53338d336a 100644 --- a/packages/shared/tests/routes/splitPath.spec.ts +++ b/packages/shared/tests/routes/splitPath.spec.ts @@ -1,7 +1,7 @@ import { expect, it } from 'vitest' import { splitPath } from '../../src/index.js' -const testCases: [string, ReturnType<typeof splitPath>][] = [ +const TEST_CASES: [string, ReturnType<typeof splitPath>][] = [ ['/a/b/c/', { pathname: '/a/b/c/', hashAndQueries: '' }], ['/a/b/c/?a=1', { pathname: '/a/b/c/', hashAndQueries: '?a=1' }], ['/a/b/c/#b', { pathname: '/a/b/c/', hashAndQueries: '#b' }], @@ -15,8 +15,8 @@ const testCases: [string, ReturnType<typeof splitPath>][] = [ ], ] -testCases.forEach(([source, expected]) => { - it(`${source} -> ${expected}`, () => { +TEST_CASES.forEach(([source, expected]) => { + it(`${source} -> ${JSON.stringify(expected)}`, () => { expect(splitPath(source)).toEqual(expected) }) }) diff --git a/packages/utils/src/console/logger.ts b/packages/utils/src/console/logger.ts index e7ed816be8..9aca6707dd 100644 --- a/packages/utils/src/console/logger.ts +++ b/packages/utils/src/console/logger.ts @@ -1,22 +1,23 @@ +/* eslint-disable no-console */ import colors from 'picocolors' -export const info = (...args: any[]): void => { +export const info = (...args: unknown[]): void => { console.log(colors.cyan('info'), ...args) } -export const tip = (...args: any[]): void => { +export const tip = (...args: unknown[]): void => { console.log(colors.blue('tip'), ...args) } -export const success = (...args: any[]): void => { +export const success = (...args: unknown[]): void => { console.log(colors.green('success'), ...args) } -export const warn = (...args: any[]): void => { +export const warn = (...args: unknown[]): void => { console.warn(colors.yellow('warning'), ...args) } -export const error = (...args: any[]): void => { +export const error = (...args: unknown[]): void => { console.error(colors.red('error'), ...args) } diff --git a/packages/utils/src/module/importFile.ts b/packages/utils/src/module/importFile.ts index ffb39170a2..f4682c8000 100644 --- a/packages/utils/src/module/importFile.ts +++ b/packages/utils/src/module/importFile.ts @@ -5,11 +5,11 @@ import { pathToFileURL } from 'node:url' * * We need to use `pathToFileURL` to transform file path wo compat with windows */ -export const importFile = <T>(filePath: string): Promise<T> => - import(pathToFileURL(filePath).toString()) +export const importFile = async <T>(filePath: string): Promise<T> => + import(pathToFileURL(filePath).toString()) as Promise<T> /** * A wrapper of `importFile` and returns the default export */ -export const importFileDefault = <T>(filePath: string): Promise<T> => +export const importFileDefault = async <T>(filePath: string): Promise<T> => importFile<{ default: T }>(filePath).then((m) => m.default) diff --git a/packages/utils/src/ssr/templateRenderer.ts b/packages/utils/src/ssr/templateRenderer.ts index d9bc546bce..0726d174be 100644 --- a/packages/utils/src/ssr/templateRenderer.ts +++ b/packages/utils/src/ssr/templateRenderer.ts @@ -63,7 +63,7 @@ export interface TemplateRendererContext { export type TemplateRenderer = ( template: string, context: TemplateRendererContext, -) => string | Promise<string> +) => Promise<string> | string /** * The default template renderer implementation diff --git a/packages/utils/tests/console/formatMs.spec.ts b/packages/utils/tests/console/formatMs.spec.ts index ca8484d8bd..4a5ef30d90 100644 --- a/packages/utils/tests/console/formatMs.spec.ts +++ b/packages/utils/tests/console/formatMs.spec.ts @@ -1,7 +1,7 @@ import { expect, it } from 'vitest' import { formatMs } from '../../src/index.js' -const testCases: [source: number, expected: string][] = [ +const TEST_CASES: [source: number, expected: string][] = [ [0, '0ms'], [999, '999ms'], [1000, '1.00s'], @@ -11,7 +11,7 @@ const testCases: [source: number, expected: string][] = [ [2001, '2.00s'], ] -testCases.forEach(([source, expected]) => { +TEST_CASES.forEach(([source, expected]) => { it(`${source} -> ${expected}`, () => { expect(formatMs(source)).toBe(expected) }) diff --git a/packages/utils/tests/console/logger.spec.ts b/packages/utils/tests/console/logger.spec.ts index 4b34ca4408..19ae7cedfb 100644 --- a/packages/utils/tests/console/logger.spec.ts +++ b/packages/utils/tests/console/logger.spec.ts @@ -1,15 +1,16 @@ +/* eslint-disable no-console */ import { expect, it, vi } from 'vitest' import { logger } from '../../src/index.js' -const methods = [ +const METHODS = [ ['info', 'log'], ['tip', 'log'], ['success', 'log'], ['warn', 'warn'], ['error', 'error'], -] +] as const -methods.forEach(([method, innerMethod]) => { +METHODS.forEach(([method, innerMethod]) => { it(method, () => { const stored = console[innerMethod] console[innerMethod] = vi.fn() diff --git a/packages/utils/tests/console/withSpinner.spec.ts b/packages/utils/tests/console/withSpinner.spec.ts index 9038516435..cdae161ad8 100644 --- a/packages/utils/tests/console/withSpinner.spec.ts +++ b/packages/utils/tests/console/withSpinner.spec.ts @@ -58,7 +58,9 @@ it('should call target with spinner.fail', async () => { const error = new Error('mock error') const target = vi.fn().mockRejectedValue(error) - await expect(() => withSpinner('msg')(target)).rejects.toThrowError(error) + await expect(async () => withSpinner('msg')(target)).rejects.toThrowError( + error, + ) expect(target).toHaveBeenCalledTimes(1) expect(mocks.ora).toHaveBeenCalledTimes(1) diff --git a/packages/utils/tests/module/isChildPath.spec.ts b/packages/utils/tests/module/isChildPath.spec.ts index d77d2e9d65..4f1801c430 100644 --- a/packages/utils/tests/module/isChildPath.spec.ts +++ b/packages/utils/tests/module/isChildPath.spec.ts @@ -1,7 +1,7 @@ import { expect, it } from 'vitest' import { isChildPath } from '../../src/index.js' -const testCases: [[string, string], boolean][] = [ +const TEST_CASES: [[string, string], boolean][] = [ [['/foo', '/foo'], true], [['/foo', '/bar'], false], [['/foo', '/foo/bar'], false], @@ -22,7 +22,7 @@ const testCases: [[string, string], boolean][] = [ [['foo-bar', 'foo'], false], ] -testCases.forEach(([source, expected]) => { +TEST_CASES.forEach(([source, expected]) => { it(`${JSON.stringify(source)} -> ${expected}`, () => { expect(isChildPath(...source)).toBe(expected) }) diff --git a/packages/utils/tests/ssr/renderHead.spec.ts b/packages/utils/tests/ssr/renderHead.spec.ts index 035785ba72..00586896b9 100644 --- a/packages/utils/tests/ssr/renderHead.spec.ts +++ b/packages/utils/tests/ssr/renderHead.spec.ts @@ -2,7 +2,7 @@ import type { HeadConfig } from '@vuepress/shared' import { expect, it } from 'vitest' import { renderHead } from '../../src/index.js' -const testCases: [HeadConfig, string][] = [ +const TEST_CASES: [HeadConfig, string][] = [ [['title', {}, 'vuepress site title'], `<title>vuepress site title`], [ [ @@ -70,7 +70,7 @@ const testCases: [HeadConfig, string][] = [ ], ] -testCases.forEach(([source, expected]) => { +TEST_CASES.forEach(([source, expected]) => { it(expected, () => { expect(renderHead(source)).toBe(expected) }) diff --git a/packages/utils/tests/ssr/renderHeadAttrs.spec.ts b/packages/utils/tests/ssr/renderHeadAttrs.spec.ts index 49df3547bc..fea1fef11c 100644 --- a/packages/utils/tests/ssr/renderHeadAttrs.spec.ts +++ b/packages/utils/tests/ssr/renderHeadAttrs.spec.ts @@ -2,7 +2,7 @@ import type { HeadAttrsConfig } from '@vuepress/shared' import { expect, it } from 'vitest' import { renderHeadAttrs } from '../../src/index.js' -const testCases: [HeadAttrsConfig, string][] = [ +const TEST_CASES: [HeadAttrsConfig, string][] = [ [ { foo: 'foo', @@ -18,7 +18,7 @@ const testCases: [HeadAttrsConfig, string][] = [ ], ] -testCases.forEach(([source, expected]) => { +TEST_CASES.forEach(([source, expected]) => { it(JSON.stringify(source), () => { expect(renderHeadAttrs(source)).toBe(expected) }) diff --git a/packages/utils/tests/ssr/templateRenderer.spec.ts b/packages/utils/tests/ssr/templateRenderer.spec.ts index 7795491144..423040f4c1 100644 --- a/packages/utils/tests/ssr/templateRenderer.spec.ts +++ b/packages/utils/tests/ssr/templateRenderer.spec.ts @@ -2,7 +2,7 @@ import { expect, it } from 'vitest' import type { TemplateRendererContext } from '../../src/index.js' import { templateRenderer } from '../../src/index.js' -const template = `\ +const TEMPLATE = `\ @@ -22,18 +22,7 @@ const template = `\ ` -const context: TemplateRendererContext = { - content: '#content#', - head: '#head#', - lang: '#lang#', - prefetch: '#prefetch#', - preload: '#preload#', - scripts: '#scripts#', - styles: '#styles#', - version: '#version#', -} - -const expected = `\ +const EXPECTED = `\ @@ -53,8 +42,19 @@ const expected = `\ ` +const context: TemplateRendererContext = { + content: '#content#', + head: '#head#', + lang: '#lang#', + prefetch: '#prefetch#', + preload: '#preload#', + scripts: '#scripts#', + styles: '#styles#', + version: '#version#', +} + it('should fill template outlets correctly', () => { - const result = templateRenderer(template, context) + const result = templateRenderer(TEMPLATE, context) - expect(result).toBe(expected) + expect(result).toBe(EXPECTED) }) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f488eb7d1e..937766ad8b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -33,14 +33,11 @@ importers: specifier: ^5.0.0 version: 5.0.0(conventional-commits-filter@5.0.0) eslint: - specifier: ^8.57.0 - version: 8.57.0 + specifier: ^9.9.0 + version: 9.9.0(jiti@1.21.6) eslint-config-vuepress: - specifier: ^4.10.1 - version: 4.10.1(@typescript-eslint/parser@7.18.0(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0) - eslint-config-vuepress-typescript: - specifier: ^4.10.1 - version: 4.10.1(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.18.0(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0))(eslint-plugin-n@16.6.2(eslint@8.57.0))(eslint-plugin-promise@6.6.0(eslint@8.57.0))(eslint@8.57.0)(typescript@5.5.4) + specifier: ^5.1.0 + version: 5.1.0(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4)(vue-eslint-parser@9.4.3(eslint@9.9.0(jiti@1.21.6))) husky: specifier: ^9.1.4 version: 9.1.4 @@ -51,8 +48,8 @@ importers: specifier: ^3.3.3 version: 3.3.3 prettier-config-vuepress: - specifier: ^4.4.0 - version: 4.4.0 + specifier: ^5.0.0 + version: 5.0.0 rimraf: specifier: ^6.0.1 version: 6.0.1 @@ -60,8 +57,8 @@ importers: specifier: ^2.10.0 version: 2.10.0 tsconfig-vuepress: - specifier: ^4.5.0 - version: 4.5.0 + specifier: ^5.0.0 + version: 5.0.0 tsup: specifier: ^8.2.4 version: 8.2.4(jiti@1.21.6)(postcss@8.4.41)(typescript@5.5.4)(yaml@2.5.0) @@ -70,7 +67,7 @@ importers: version: 5.5.4 vite: specifier: ~5.4.0 - version: 5.4.0(@types/node@22.3.0)(lightningcss@1.26.0)(sass-embedded@1.77.8)(sass@1.77.8)(terser@5.31.6) + version: 5.4.1(@types/node@22.3.0)(lightningcss@1.26.0)(sass-embedded@1.77.8)(sass@1.77.8)(terser@5.31.6) vitest: specifier: ^2.0.5 version: 2.0.5(@types/node@22.3.0)(lightningcss@1.26.0)(sass-embedded@1.77.8)(sass@1.77.8)(terser@5.31.6) @@ -103,7 +100,7 @@ importers: version: 16.0.0(sass-embedded@1.77.8)(sass@1.77.8)(webpack@5.93.0(esbuild@0.23.0)) vue: specifier: ^3.4.37 - version: 3.4.37(typescript@5.5.4) + version: 3.4.38(typescript@5.5.4) vuepress: specifier: workspace:* version: link:../packages/vuepress @@ -122,7 +119,7 @@ importers: dependencies: '@vitejs/plugin-vue': specifier: ^5.1.2 - version: 5.1.2(vite@5.4.0(@types/node@22.3.0)(lightningcss@1.26.0)(sass-embedded@1.77.8)(sass@1.77.8)(terser@5.31.6))(vue@3.4.37(typescript@5.5.4)) + version: 5.1.2(vite@5.4.1(@types/node@22.3.0)(lightningcss@1.26.0)(sass-embedded@1.77.8)(sass@1.77.8)(terser@5.31.6))(vue@3.4.38(typescript@5.5.4)) '@vuepress/client': specifier: workspace:* version: link:../client @@ -152,13 +149,13 @@ importers: version: 4.20.0 vite: specifier: ~5.4.0 - version: 5.4.0(@types/node@22.3.0)(lightningcss@1.26.0)(sass-embedded@1.77.8)(sass@1.77.8)(terser@5.31.6) + version: 5.4.1(@types/node@22.3.0)(lightningcss@1.26.0)(sass-embedded@1.77.8)(sass@1.77.8)(terser@5.31.6) vue: specifier: ^3.4.37 - version: 3.4.37(typescript@5.5.4) + version: 3.4.38(typescript@5.5.4) vue-router: specifier: ^4.4.3 - version: 4.4.3(vue@3.4.37(typescript@5.5.4)) + version: 4.4.3(vue@3.4.38(typescript@5.5.4)) packages/bundler-webpack: dependencies: @@ -221,13 +218,13 @@ importers: version: 4.0.0(webpack@5.93.0(esbuild@0.23.0)) vue: specifier: ^3.4.37 - version: 3.4.37(typescript@5.5.4) + version: 3.4.38(typescript@5.5.4) vue-loader: specifier: ^17.4.2 - version: 17.4.2(vue@3.4.37(typescript@5.5.4))(webpack@5.93.0(esbuild@0.23.0)) + version: 17.4.2(vue@3.4.38(typescript@5.5.4))(webpack@5.93.0(esbuild@0.23.0)) vue-router: specifier: ^4.4.3 - version: 4.4.3(vue@3.4.37(typescript@5.5.4)) + version: 4.4.3(vue@3.4.38(typescript@5.5.4)) webpack: specifier: ^5.93.0 version: 5.93.0(esbuild@0.23.0) @@ -279,10 +276,10 @@ importers: version: link:../shared vue: specifier: ^3.4.37 - version: 3.4.37(typescript@5.5.4) + version: 3.4.38(typescript@5.5.4) vue-router: specifier: ^4.4.3 - version: 4.4.3(vue@3.4.37(typescript@5.5.4)) + version: 4.4.3(vue@3.4.38(typescript@5.5.4)) packages/core: dependencies: @@ -300,7 +297,7 @@ importers: version: link:../utils vue: specifier: ^3.4.37 - version: 3.4.37(typescript@5.5.4) + version: 3.4.38(typescript@5.5.4) packages/markdown: dependencies: @@ -427,7 +424,7 @@ importers: version: link:../utils vue: specifier: ^3.4.37 - version: 3.4.37(typescript@5.5.4) + version: 3.4.38(typescript@5.5.4) packages: @@ -882,26 +879,29 @@ packages: resolution: {integrity: sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - '@eslint/eslintrc@2.1.4': - resolution: {integrity: sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + '@eslint/config-array@0.17.1': + resolution: {integrity: sha512-BlYOpej8AQ8Ev9xVqroV7a02JK3SkBAaN9GfMMH9W6Ch8FlQlkjGw4Ir7+FgYwfirivAf4t+GtzuAxqfukmISA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/js@8.57.0': - resolution: {integrity: sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + '@eslint/eslintrc@3.1.0': + resolution: {integrity: sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@humanwhocodes/config-array@0.11.14': - resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==} - engines: {node: '>=10.10.0'} - deprecated: Use @eslint/config-array instead + '@eslint/js@9.9.0': + resolution: {integrity: sha512-hhetes6ZHP3BlXLxmd8K2SNgkhNSi+UcecbnwWKwpP7kyi/uC75DJ1lOOBO3xrC4jyojtGE3YxKZPHfk4yrgug==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/object-schema@2.1.4': + resolution: {integrity: sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@humanwhocodes/module-importer@1.0.1': resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} engines: {node: '>=12.22'} - '@humanwhocodes/object-schema@2.0.3': - resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} - deprecated: Use @eslint/object-schema instead + '@humanwhocodes/retry@0.3.0': + resolution: {integrity: sha512-d2CGZR2o7fS6sWB7DG/3a95bGKQyHMACZ5aW8qGkkqQpUoZV6C0X7Pc7l4ZNMZkfNBf4VWNe9E1jRsf0G146Ew==} + engines: {node: '>=18.18'} '@hutson/parse-repository-url@5.0.0': resolution: {integrity: sha512-e5+YUKENATs1JgYHMzTr2MW/NDcXGfYFAuOQU8gJgF/kEh4EqKgfGrfLI67bMD4tbhZVlkigz/9YYwWcbOFthg==} @@ -993,6 +993,26 @@ packages: '@mdit-vue/types@2.1.0': resolution: {integrity: sha512-TMBB/BQWVvwtpBdWD75rkZx4ZphQ6MN0O4QB2Bc0oI5PC2uE57QerhNxdRZ7cvBHE2iY2C+BUNUziCfJbjIRRA==} + '@meteorlxy/eslint-config@4.2.0': + resolution: {integrity: sha512-G8K9Is7bkG0d/eumMxWOS86C2w7ulaAlVM1p2bja3NAgCmwQqeOiGsYrsmrhLhGO/H/rb2c9gRnxZ7WbApM+PQ==} + peerDependencies: + eslint-plugin-react: ^7.35.0 + eslint-plugin-react-hooks: ^4.6.2 + eslint-plugin-react-refresh: ^0.4.9 + eslint-plugin-vue: ^9.27.0 + vue-eslint-parser: ^9.4.3 + peerDependenciesMeta: + eslint-plugin-react: + optional: true + eslint-plugin-react-hooks: + optional: true + eslint-plugin-react-refresh: + optional: true + eslint-plugin-vue: + optional: true + vue-eslint-parser: + optional: true + '@nodelib/fs.scandir@2.1.5': resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} @@ -1168,9 +1188,6 @@ packages: '@types/json-schema@7.0.15': resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} - '@types/json5@0.0.29': - resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==} - '@types/jsonfile@6.1.4': resolution: {integrity: sha512-D5qGUYwjvnNNextdU59/+fI+spnwtTFmyQP0h+PfIOSkNfpU6AOICUOkm4i0OnSk+NyjdPJrxCDro0sJsWlRpQ==} @@ -1183,6 +1200,9 @@ packages: '@types/markdown-it@14.1.2': resolution: {integrity: sha512-promo4eFwuiW+TfGxhi+0x3czqTYJkG8qB17ZUJiVF10Xm7NLVRSLUsfRTU/6h1e24VvRnXCx+hG7li58lkzog==} + '@types/mdast@3.0.15': + resolution: {integrity: sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==} + '@types/mdurl@2.0.0': resolution: {integrity: sha512-RGdgjQUZba5p6QEFAVx2OGb8rQDL/cPRG7GiedRzMcJ1tYnUANBncjbSB1NRGwbvjcPeikRABz2nshyPk1bhWg==} @@ -1225,6 +1245,9 @@ packages: '@types/sockjs@0.3.36': resolution: {integrity: sha512-MK9V6NzAS1+Ud7JV9lJLFqW85VbC9dq3LmwZCuBe4wBDgKC0Kj/jd8Xl+nSviU+Qc3+m7umHHyHg//2KSa0a0Q==} + '@types/unist@2.0.11': + resolution: {integrity: sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==} + '@types/webpack-env@1.18.5': resolution: {integrity: sha512-wz7kjjRRj8/Lty4B+Kr0LN6Ypc/3SymeCCGSbaXp2leH0ZVg/PriNiOwNj4bD4uphI7A8NXS4b6Gl373sfO5mA==} @@ -1237,22 +1260,22 @@ packages: '@types/yargs@17.0.33': resolution: {integrity: sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA==} - '@typescript-eslint/eslint-plugin@7.18.0': - resolution: {integrity: sha512-94EQTWZ40mzBc42ATNIBimBEDltSJ9RQHCC8vc/PDbxi4k8dVwUAv4o98dk50M1zB+JGFxp43FP7f8+FP8R6Sw==} - engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/eslint-plugin@8.1.0': + resolution: {integrity: sha512-LlNBaHFCEBPHyD4pZXb35mzjGkuGKXU5eeCA1SxvHfiRES0E82dOounfVpL4DCqYvJEKab0bZIA0gCRpdLKkCw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - '@typescript-eslint/parser': ^7.0.0 - eslint: ^8.56.0 + '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 + eslint: ^8.57.0 || ^9.0.0 typescript: '*' peerDependenciesMeta: typescript: optional: true - '@typescript-eslint/parser@7.18.0': - resolution: {integrity: sha512-4Z+L8I2OqhZV8qA132M4wNL30ypZGYOQVBfMgxDH/K5UX0PNqTu1c6za9ST5r9+tavvHiTWmBnKzpCJ/GlVFtg==} - engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/parser@8.1.0': + resolution: {integrity: sha512-U7iTAtGgJk6DPX9wIWPPOlt1gO57097G06gIcl0N0EEnNw8RGD62c+2/DiP/zL7KrkqnnqF7gtFGR7YgzPllTA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - eslint: ^8.56.0 + eslint: ^8.57.0 || ^9.0.0 typescript: '*' peerDependenciesMeta: typescript: @@ -1262,11 +1285,14 @@ packages: resolution: {integrity: sha512-jjhdIE/FPF2B7Z1uzc6i3oWKbGcHb87Qw7AWj6jmEqNOfDFbJWtjt/XfwCpvNkpGWlcJaog5vTR+VV8+w9JflA==} engines: {node: ^18.18.0 || >=20.0.0} - '@typescript-eslint/type-utils@7.18.0': - resolution: {integrity: sha512-XL0FJXuCLaDuX2sYqZUUSOJ2sG5/i1AAze+axqmLnSkNEVMVYLF+cbwlB2w8D1tinFuSikHmFta+P+HOofrLeA==} - engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/scope-manager@8.1.0': + resolution: {integrity: sha512-DsuOZQji687sQUjm4N6c9xABJa7fjvfIdjqpSIIVOgaENf2jFXiM9hIBZOL3hb6DHK9Nvd2d7zZnoMLf9e0OtQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@typescript-eslint/type-utils@8.1.0': + resolution: {integrity: sha512-oLYvTxljVvsMnldfl6jIKxTaU7ok7km0KDrwOt1RHYu6nxlhN3TIx8k5Q52L6wR33nOwDgM7VwW1fT1qMNfFIA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - eslint: ^8.56.0 typescript: '*' peerDependenciesMeta: typescript: @@ -1276,6 +1302,10 @@ packages: resolution: {integrity: sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ==} engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/types@8.1.0': + resolution: {integrity: sha512-q2/Bxa0gMOu/2/AKALI0tCKbG2zppccnRIRCW6BaaTlRVaPKft4oVYPp7WOPpcnsgbr0qROAVCVKCvIQ0tbWog==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/typescript-estree@7.18.0': resolution: {integrity: sha512-aP1v/BSPnnyhMHts8cf1qQ6Q1IFwwRvAQGRvBFkWlo3/lH29OXA3Pts+c10nxRxIBrDnoMqzhgdwVe5f2D6OzA==} engines: {node: ^18.18.0 || >=20.0.0} @@ -1285,18 +1315,34 @@ packages: typescript: optional: true + '@typescript-eslint/typescript-estree@8.1.0': + resolution: {integrity: sha512-NTHhmufocEkMiAord/g++gWKb0Fr34e9AExBRdqgWdVBaKoei2dIyYKD9Q0jBnvfbEA5zaf8plUFMUH6kQ0vGg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + '@typescript-eslint/utils@7.18.0': resolution: {integrity: sha512-kK0/rNa2j74XuHVcoCZxdFBMF+aq/vH83CXAOHieC+2Gis4mF8jJXT5eAfyD3K0sAxtPuwxaIOIOvhwzVDt/kw==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 + '@typescript-eslint/utils@8.1.0': + resolution: {integrity: sha512-ypRueFNKTIFwqPeJBfeIpxZ895PQhNyH4YID6js0UoBImWYoSjBsahUn9KMiJXh94uOjVBgHD9AmkyPsPnFwJA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + '@typescript-eslint/visitor-keys@7.18.0': resolution: {integrity: sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==} engines: {node: ^18.18.0 || >=20.0.0} - '@ungap/structured-clone@1.2.0': - resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} + '@typescript-eslint/visitor-keys@8.1.0': + resolution: {integrity: sha512-ba0lNI19awqZ5ZNKh6wCModMwoZs457StTebQ0q1NP58zSi2F6MOZRXwfKZy+jB78JNJ/WH8GSh2IQNzXX8Nag==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@vitejs/plugin-vue@5.1.2': resolution: {integrity: sha512-nY9IwH12qeiJqumTCLJLE7IiNx7HZ39cbHaysEUd+Myvbz9KAqd2yq+U01Kab1R/H1BmiyM2ShTYlNH32Fzo3A==} @@ -1337,17 +1383,17 @@ packages: '@volar/typescript@2.4.0-alpha.18': resolution: {integrity: sha512-sXh5Y8sqGUkgxpMWUGvRXggxYHAVxg0Pa1C42lQZuPDrW6vHJPR0VCK8Sr7WJsAW530HuNQT/ZIskmXtxjybMQ==} - '@vue/compiler-core@3.4.37': - resolution: {integrity: sha512-ZDDT/KiLKuCRXyzWecNzC5vTcubGz4LECAtfGPENpo0nrmqJHwuWtRLxk/Sb9RAKtR9iFflFycbkjkY+W/PZUQ==} + '@vue/compiler-core@3.4.38': + resolution: {integrity: sha512-8IQOTCWnLFqfHzOGm9+P8OPSEDukgg3Huc92qSG49if/xI2SAwLHQO2qaPQbjCWPBcQoO1WYfXfTACUrWV3c5A==} - '@vue/compiler-dom@3.4.37': - resolution: {integrity: sha512-rIiSmL3YrntvgYV84rekAtU/xfogMUJIclUMeIKEtVBFngOL3IeZHhsH3UaFEgB5iFGpj6IW+8YuM/2Up+vVag==} + '@vue/compiler-dom@3.4.38': + resolution: {integrity: sha512-Osc/c7ABsHXTsETLgykcOwIxFktHfGSUDkb05V61rocEfsFDcjDLH/IHJSNJP+/Sv9KeN2Lx1V6McZzlSb9EhQ==} - '@vue/compiler-sfc@3.4.37': - resolution: {integrity: sha512-vCfetdas40Wk9aK/WWf8XcVESffsbNkBQwS5t13Y/PcfqKfIwJX2gF+82th6dOpnpbptNMlMjAny80li7TaCIg==} + '@vue/compiler-sfc@3.4.38': + resolution: {integrity: sha512-s5QfZ+9PzPh3T5H4hsQDJtI8x7zdJaew/dCGgqZ2630XdzaZ3AD8xGZfBqpT8oaD/p2eedd+pL8tD5vvt5ZYJQ==} - '@vue/compiler-ssr@3.4.37': - resolution: {integrity: sha512-TyAgYBWrHlFrt4qpdACh8e9Ms6C/AZQ6A6xLJaWrCL8GCX5DxMzxyeFAEMfU/VFr4tylHm+a2NpfJpcd7+20XA==} + '@vue/compiler-ssr@3.4.38': + resolution: {integrity: sha512-YXznKFQ8dxYpAz9zLuVvfcXhc31FSPFDcqr0kyujbOwNhlmaNvL2QfIy+RZeJgSn5Fk54CWoEUeW+NVBAogGaw==} '@vue/compiler-vue2@2.7.16': resolution: {integrity: sha512-qYC3Psj9S/mfu9uVi5WvNZIzq+xnXMhOwbTFKKDD7b1lhpnn71jXSFdTQ+WsIEk0ONCd7VV2IMm7ONl6tbQ86A==} @@ -1363,22 +1409,22 @@ packages: typescript: optional: true - '@vue/reactivity@3.4.37': - resolution: {integrity: sha512-UmdKXGx0BZ5kkxPqQr3PK3tElz6adTey4307NzZ3whZu19i5VavYal7u2FfOmAzlcDVgE8+X0HZ2LxLb/jgbYw==} + '@vue/reactivity@3.4.38': + resolution: {integrity: sha512-4vl4wMMVniLsSYYeldAKzbk72+D3hUnkw9z8lDeJacTxAkXeDAP1uE9xr2+aKIN0ipOL8EG2GPouVTH6yF7Gnw==} - '@vue/runtime-core@3.4.37': - resolution: {integrity: sha512-MNjrVoLV/sirHZoD7QAilU1Ifs7m/KJv4/84QVbE6nyAZGQNVOa1HGxaOzp9YqCG+GpLt1hNDC4RbH+KtanV7w==} + '@vue/runtime-core@3.4.38': + resolution: {integrity: sha512-21z3wA99EABtuf+O3IhdxP0iHgkBs1vuoCAsCKLVJPEjpVqvblwBnTj42vzHRlWDCyxu9ptDm7sI2ZMcWrQqlA==} - '@vue/runtime-dom@3.4.37': - resolution: {integrity: sha512-Mg2EwgGZqtwKrqdL/FKMF2NEaOHuH+Ks9TQn3DHKyX//hQTYOun+7Tqp1eo0P4Ds+SjltZshOSRq6VsU0baaNg==} + '@vue/runtime-dom@3.4.38': + resolution: {integrity: sha512-afZzmUreU7vKwKsV17H1NDThEEmdYI+GCAK/KY1U957Ig2NATPVjCROv61R19fjZNzMmiU03n79OMnXyJVN0UA==} - '@vue/server-renderer@3.4.37': - resolution: {integrity: sha512-jZ5FAHDR2KBq2FsRUJW6GKDOAG9lUTX8aBEGq4Vf6B/35I9fPce66BornuwmqmKgfiSlecwuOb6oeoamYMohkg==} + '@vue/server-renderer@3.4.38': + resolution: {integrity: sha512-NggOTr82FbPEkkUvBm4fTGcwUY8UuTsnWC/L2YZBmvaQ4C4Jl/Ao4HHTB+l7WnFCt5M/dN3l0XLuyjzswGYVCA==} peerDependencies: - vue: 3.4.37 + vue: 3.4.38 - '@vue/shared@3.4.37': - resolution: {integrity: sha512-nIh8P2fc3DflG8+5Uw8PT/1i17ccFn0xxN/5oE9RfV5SVnd7G0XEFRwakrnNFE/jlS95fpGXDVG5zDETS26nmg==} + '@vue/shared@3.4.38': + resolution: {integrity: sha512-q0xCiLkuWWQLzVrecPb0RMsNWyxICOjPrcrwxTUEHb1fsnvni4dcuyG7RT/Ie7VPTvnjzIaWzRMUBsrqNj/hhw==} '@vuepress-e2e/conditional-exports@file:e2e/modules/conditional-exports': resolution: {directory: e2e/modules/conditional-exports, type: directory} @@ -1545,20 +1591,12 @@ packages: resolution: {integrity: sha512-sKpyeERZ02v1FeCZT8lrfJq5u6goHCtpTAzPwJYe7c8SPFOboNjNg1vz2L4VTn9T4PQxEx13TbXLmYUcS6Ug7Q==} engines: {node: '>=0.10.0'} - array-buffer-byte-length@1.0.1: - resolution: {integrity: sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==} - engines: {node: '>= 0.4'} - array-flatten@1.1.1: resolution: {integrity: sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==} array-ify@1.0.0: resolution: {integrity: sha512-c5AMf34bKdvPhQ7tBGhqkgKNUzMr4WUs+WDtC2ZUGOUncbxKMTvqxYctiseW3+L4bA8ec+GcZ6/A/FW4m8ukng==} - array-includes@3.1.8: - resolution: {integrity: sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ==} - engines: {node: '>= 0.4'} - array-union@2.1.0: resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} engines: {node: '>=8'} @@ -1567,22 +1605,6 @@ packages: resolution: {integrity: sha512-SleRWjh9JUud2wH1hPs9rZBZ33H6T9HOiL0uwGnGx9FpE6wKGyfWugmbkEOIs6qWrZhg0LWeLziLrEwQJhs5mQ==} engines: {node: '>=0.10.0'} - array.prototype.findlastindex@1.2.5: - resolution: {integrity: sha512-zfETvRFA8o7EiNn++N5f/kaCw221hrpGsDmcpndVupkPzEc1Wuf3VgC0qby1BbHs7f5DVYjgtEU2LLh5bqeGfQ==} - engines: {node: '>= 0.4'} - - array.prototype.flat@1.3.2: - resolution: {integrity: sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==} - engines: {node: '>= 0.4'} - - array.prototype.flatmap@1.3.2: - resolution: {integrity: sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==} - engines: {node: '>= 0.4'} - - arraybuffer.prototype.slice@1.0.3: - resolution: {integrity: sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==} - engines: {node: '>= 0.4'} - assertion-error@2.0.1: resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} engines: {node: '>=12'} @@ -1603,10 +1625,6 @@ packages: peerDependencies: postcss: ^8.1.0 - available-typed-arrays@1.0.7: - resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==} - engines: {node: '>= 0.4'} - balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} @@ -1659,13 +1677,6 @@ packages: buffer-from@1.1.2: resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} - builtin-modules@3.3.0: - resolution: {integrity: sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==} - engines: {node: '>=6'} - - builtins@5.1.0: - resolution: {integrity: sha512-SW9lzGTLvWTP1AY8xeAMZimqDrIaSdLQUcVr9DMef51niJ022Ri87SwRRKYm4A6iHfkPaiVUu/Duw2Wc4J7kKg==} - bumpp@9.5.1: resolution: {integrity: sha512-crWpuPh5/SO84HTsIIQbwFpjwg8Zadm3udyj2YfnSSijCvjxwdtmXy2vQh6GLMWJ5LgKwmmMIn85qJ4AIHKlhg==} engines: {node: '>=10'} @@ -1741,6 +1752,15 @@ packages: resolution: {integrity: sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==} engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} + character-entities-legacy@1.1.4: + resolution: {integrity: sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA==} + + character-entities@1.2.4: + resolution: {integrity: sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw==} + + character-reference-invalid@1.1.4: + resolution: {integrity: sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==} + check-error@2.1.1: resolution: {integrity: sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==} engines: {node: '>= 16'} @@ -1861,6 +1881,9 @@ packages: confbox@0.1.7: resolution: {integrity: sha512-uJcB/FKZtBMCJpK8MQji6bJHgu1tixKPxRLeGkNzBoOZzpnZUJm0jm2/sBDWcuBx1dYgxV4JU+g5hmNxCyAmdA==} + confusing-browser-globals@1.0.11: + resolution: {integrity: sha512-JsPKdmh8ZkmnHxDk55FZ1TqVLvEQTvoByJZRN9jzI0UjxK/QgAmsphz7PGtqgPieQZ/CQcHWXCR7ATDNhGe+YA==} + connect-history-api-fallback@1.6.0: resolution: {integrity: sha512-e54B99q/OUoH64zYYRf3HBP5z24G38h5D3qXu23JGRoigpX5Ss4r9ZnDk3g0Z8uQC2x2lPaJ+UlWBc1ZWBWdLg==} engines: {node: '>=0.8'} @@ -2109,18 +2132,6 @@ packages: resolution: {integrity: sha512-wAV9QHOsNbwnWdNW2FYvE1P56wtgSbM+3SZcdGiWQILwVjACCXDCI3Ai8QlCjMDB8YK5zySiXZYBiwGmNY3lnw==} engines: {node: '>=12'} - data-view-buffer@1.0.1: - resolution: {integrity: sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==} - engines: {node: '>= 0.4'} - - data-view-byte-length@1.0.1: - resolution: {integrity: sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==} - engines: {node: '>= 0.4'} - - data-view-byte-offset@1.0.0: - resolution: {integrity: sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==} - engines: {node: '>= 0.4'} - de-indent@1.0.2: resolution: {integrity: sha512-e/1zu3xH5MQryN2zdVaF0OrdNLUbvWxzMbi+iNA6Bky7l1RoP8a2fIbRocyHclXt/arDrrR6lL3TqFD9pMQTsg==} @@ -2184,10 +2195,6 @@ packages: resolution: {integrity: sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==} engines: {node: '>=12'} - define-properties@1.2.1: - resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==} - engines: {node: '>= 0.4'} - define-property@0.2.5: resolution: {integrity: sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==} engines: {node: '>=0.10.0'} @@ -2242,10 +2249,6 @@ packages: resolution: {integrity: sha512-l4gcSouhcgIKRvyy99RNVOgxXiicE+2jZoNmaNmZ6JXiGajBOJAesk1OBlJuM5k2c+eudGdLxDqXuPCKIj6kpw==} engines: {node: '>=6'} - doctrine@2.1.0: - resolution: {integrity: sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==} - engines: {node: '>=0.10.0'} - doctrine@3.0.0: resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} engines: {node: '>=6.0.0'} @@ -2293,8 +2296,8 @@ packages: ee-first@1.1.1: resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} - electron-to-chromium@1.5.7: - resolution: {integrity: sha512-6FTNWIWMxMy/ZY6799nBlPtF1DFDQ6VQJ7yyDP27SJNt5lwtQ5ufqVvHylb3fdQefvRcgA3fKcFMJi9OLwBRNw==} + electron-to-chromium@1.5.8: + resolution: {integrity: sha512-4Nx0gP2tPNBLTrFxBMHpkQbtn2hidPVr/+/FTtcCiBYTucqc70zRyVZiOLj17Ui3wTO7SQ1/N+hkHYzJjBzt6A==} emoji-regex@10.3.0: resolution: {integrity: sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==} @@ -2324,10 +2327,6 @@ packages: resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} engines: {node: '>=0.12'} - entities@5.0.0: - resolution: {integrity: sha512-BeJFvFRJddxobhvEdm5GqHzRV/X+ACeuw0/BuuxsCh1EUZcAIz8+kYmBp/LrQuloy6K1f3a0M7+IhmZ7QnkISA==} - engines: {node: '>=0.12'} - env-paths@2.2.1: resolution: {integrity: sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==} engines: {node: '>=6'} @@ -2344,10 +2343,6 @@ packages: error-ex@1.3.2: resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} - es-abstract@1.23.3: - resolution: {integrity: sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==} - engines: {node: '>= 0.4'} - es-define-property@1.0.0: resolution: {integrity: sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==} engines: {node: '>= 0.4'} @@ -2359,21 +2354,6 @@ packages: es-module-lexer@1.5.4: resolution: {integrity: sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw==} - es-object-atoms@1.0.0: - resolution: {integrity: sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==} - engines: {node: '>= 0.4'} - - es-set-tostringtag@2.0.3: - resolution: {integrity: sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==} - engines: {node: '>= 0.4'} - - es-shim-unscopables@1.0.2: - resolution: {integrity: sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==} - - es-to-primitive@1.2.1: - resolution: {integrity: sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==} - engines: {node: '>= 0.4'} - esbuild-loader@4.2.2: resolution: {integrity: sha512-Mdq/A1L8p37hkibp8jGFwuQTDSWhDmlueAefsrCPRwNWThEOlQmIglV7Gd6GE2mO5bt7ksfxKOMwkuY7jjVTXg==} peerDependencies: @@ -2404,84 +2384,35 @@ packages: resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} engines: {node: '>=10'} - eslint-compat-utils@0.5.1: - resolution: {integrity: sha512-3z3vFexKIEnjHE3zCMRo6fn/e44U7T1khUjg+Hp0ZQMCigh28rALD0nPFBcGZuiLC5rLZa2ubQHDRln09JfU2Q==} - engines: {node: '>=12'} - peerDependencies: - eslint: '>=6.0.0' - eslint-config-prettier@9.1.0: resolution: {integrity: sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==} hasBin: true peerDependencies: eslint: '>=7.0.0' - eslint-config-standard@17.1.0: - resolution: {integrity: sha512-IwHwmaBNtDK4zDHQukFDW5u/aTb8+meQWZvNFWkiGmbWjD6bqyuSSBxxXKkCftCUzc1zwCH2m/baCNDLGmuO5Q==} - engines: {node: '>=12.0.0'} - peerDependencies: - eslint: ^8.0.1 - eslint-plugin-import: ^2.25.2 - eslint-plugin-n: '^15.0.0 || ^16.0.0 ' - eslint-plugin-promise: ^6.0.0 - - eslint-config-vuepress-typescript@4.10.1: - resolution: {integrity: sha512-MD6Z0K/GViVIIRuCym2CfHb8XB2JJ3MXPN5gNe+Bv2lAXOyi5/IUDR+BjBjA/Hdo6xrLHQOM+I8gtQrxUuddjg==} - - eslint-config-vuepress@4.10.1: - resolution: {integrity: sha512-VunYtLhFdDxReGRCp+Lba86f18Hd/Srb+tOVbonYFITUNtpr8y85JgtVrXCS9c5+JE9PPx0JcxAFDxWDtoTH7g==} + eslint-config-vuepress@5.1.0: + resolution: {integrity: sha512-7rMq5I2Io6tcMAkcaqzI0mowQyQrd11EEDBcHmFRbhSuxsjDt6VF8FGRUNRhkBQGCc3WqdTcoIzI2KYdjj5Q4A==} eslint-import-resolver-node@0.3.9: resolution: {integrity: sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==} - eslint-module-utils@2.8.1: - resolution: {integrity: sha512-rXDXR3h7cs7dy9RNpUlQf80nX31XWJEyGq1tRMo+6GsO5VmTe4UTwtmonAD4ZkAsrfMVDA2wlGJ3790Ys+D49Q==} - engines: {node: '>=4'} - peerDependencies: - '@typescript-eslint/parser': '*' - eslint: '*' - eslint-import-resolver-node: '*' - eslint-import-resolver-typescript: '*' - eslint-import-resolver-webpack: '*' - peerDependenciesMeta: - '@typescript-eslint/parser': - optional: true - eslint: - optional: true - eslint-import-resolver-node: - optional: true - eslint-import-resolver-typescript: - optional: true - eslint-import-resolver-webpack: - optional: true - - eslint-plugin-es-x@7.8.0: - resolution: {integrity: sha512-7Ds8+wAAoV3T+LAKeu39Y5BzXCrGKrcISfgKEqTS4BDN8SFEDQd0S43jiQ8vIa3wUKD07qitZdfzlenSi8/0qQ==} - engines: {node: ^14.18.0 || >=16.0.0} - peerDependencies: - eslint: '>=8' - - eslint-plugin-import@2.29.1: - resolution: {integrity: sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==} - engines: {node: '>=4'} + eslint-plugin-eslint-comments@3.2.0: + resolution: {integrity: sha512-0jkOl0hfojIHHmEHgmNdqv4fmh7300NdpA9FFpF7zaoLvB/QeXOGNLIo86oAveJFrfB1p05kC8hpEMHM8DwWVQ==} + engines: {node: '>=6.5.0'} peerDependencies: - '@typescript-eslint/parser': '*' - eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 - peerDependenciesMeta: - '@typescript-eslint/parser': - optional: true + eslint: '>=4.19.1' - eslint-plugin-n@16.6.2: - resolution: {integrity: sha512-6TyDmZ1HXoFQXnhCTUjVFULReoBPOAjpuiKELMkeP40yffI/1ZRO+d9ug/VC6fqISo2WkuIBk3cvuRPALaWlOQ==} - engines: {node: '>=16.0.0'} + eslint-plugin-import-x@3.1.0: + resolution: {integrity: sha512-/UbPA+bYY7nIxcjL3kpcDY3UNdoLHFhyBFzHox2M0ypcUoueTn6woZUUmzzi5et/dXChksasYYFeKE2wshOrhg==} + engines: {node: '>=16'} peerDependencies: - eslint: '>=7.0.0' + eslint: ^8.56.0 || ^9.0.0-0 - eslint-plugin-promise@6.6.0: - resolution: {integrity: sha512-57Zzfw8G6+Gq7axm2Pdo3gW/Rx3h9Yywgn61uE/3elTCOePEHVrn2i5CdfBwA1BLK0Q0WqctICIUSqXZW/VprQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + eslint-plugin-markdown@5.1.0: + resolution: {integrity: sha512-SJeyKko1K6GwI0AN6xeCDToXDkfKZfXcexA6B+O2Wr2btUS9GrC+YgwSyVli5DJnctUHjFXcQ2cqTaAmVoLi2A==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - eslint: ^7.0.0 || ^8.0.0 || ^9.0.0 + eslint: '>=8' eslint-plugin-vue@9.27.0: resolution: {integrity: sha512-5Dw3yxEyuBSXTzT5/Ge1X5kIkRTQ3nvBn/VwPwInNiZBSJOO/timWMUaflONnFBzU6NhB68lxnCda7ULV5N7LA==} @@ -2497,14 +2428,31 @@ packages: resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + eslint-scope@8.0.2: + resolution: {integrity: sha512-6E4xmrTw5wtxnLA5wYL3WDfhZ/1bUBGOXV0zQvVRDOtrR8D0p6W7fs3JweNYhwRYeGvd/1CKX2se0/2s7Q/nJA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + eslint-visitor-keys@3.4.3: resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - eslint@8.57.0: - resolution: {integrity: sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + eslint-visitor-keys@4.0.0: + resolution: {integrity: sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + eslint@9.9.0: + resolution: {integrity: sha512-JfiKJrbx0506OEerjK2Y1QlldtBxkAlLxT5OEcRF8uaQ86noDe2k31Vw9rnSWv+MXZHj7OOUV/dA0AhdLFcyvA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} hasBin: true + peerDependencies: + jiti: '*' + peerDependenciesMeta: + jiti: + optional: true + + espree@10.1.0: + resolution: {integrity: sha512-M1M6CpiE6ffoigIOWYO9UDP8TMUw9kqb21tf+08IgDYjCsOvCuDt4jQcZmoYxx+w7zlKw9/N0KXfto+I8/FrXA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} espree@9.6.1: resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} @@ -2606,9 +2554,9 @@ packages: resolution: {integrity: sha512-CzbClwlXAuiRQAlUyfqPgvPoNKTckTPGfwZV4ZdAhVcP2lh9KUxJg2b5GkE7XbjKQ3YJnQ9z6D9ntLAlB+tP8g==} engines: {node: '>=0.8.0'} - file-entry-cache@6.0.1: - resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} - engines: {node: ^10.12.0 || >=12.0.0} + file-entry-cache@8.0.0: + resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} + engines: {node: '>=16.0.0'} fill-range@4.0.0: resolution: {integrity: sha512-VcpLTWqWDiTerugjj8e3+esbg+skS3M9e54UuR3iCeIDMXCLTsAH8hTSzDQU/X6/6t3eYkOKoZSef2PlU6U1XQ==} @@ -2638,9 +2586,9 @@ packages: resolution: {integrity: sha512-YyZM99iHrqLKjmt4LJDj58KI+fYyufRLBSYcqycxf//KpBk9FoewoGX0450m9nB44qrZnovzC2oeP5hUibxc/g==} engines: {node: '>=18'} - flat-cache@3.2.0: - resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} - engines: {node: ^10.12.0 || >=12.0.0} + flat-cache@4.0.1: + resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} + engines: {node: '>=16'} flat@5.0.2: resolution: {integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==} @@ -2658,9 +2606,6 @@ packages: debug: optional: true - for-each@0.3.3: - resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} - for-in@1.0.2: resolution: {integrity: sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ==} engines: {node: '>=0.10.0'} @@ -2692,9 +2637,6 @@ packages: resolution: {integrity: sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==} engines: {node: '>= 8'} - fs.realpath@1.0.0: - resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} - fsevents@2.3.2: resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} @@ -2708,13 +2650,6 @@ packages: function-bind@1.1.2: resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} - function.prototype.name@1.1.6: - resolution: {integrity: sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==} - engines: {node: '>= 0.4'} - - functions-have-names@1.2.3: - resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==} - gensync@1.0.0-beta.2: resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} engines: {node: '>=6.9.0'} @@ -2746,10 +2681,6 @@ packages: resolution: {integrity: sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==} engines: {node: '>=16'} - get-symbol-description@1.0.2: - resolution: {integrity: sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==} - engines: {node: '>= 0.4'} - get-tsconfig@4.7.6: resolution: {integrity: sha512-ZAqrLlu18NbDdRaHq+AKXzAmqIUPswPWKUchfytdAjiRFnCe5ojG2bstg6mRiZabkKfCoL/e98pbBELIV/YCeA==} @@ -2799,10 +2730,6 @@ packages: engines: {node: 20 || >=22} hasBin: true - glob@7.2.3: - resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} - deprecated: Glob versions prior to v9 are no longer supported - global-directory@4.0.1: resolution: {integrity: sha512-wHTUcDUoZ1H5/0iVqEudYW4/kAlN5cZ3j/bXn0Dpbizl9iaUVeWSHqiOjsgk6OW2bkLclbBjzewBz6weQ1zA2Q==} engines: {node: '>=18'} @@ -2815,9 +2742,13 @@ packages: resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==} engines: {node: '>=8'} - globalthis@1.0.4: - resolution: {integrity: sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==} - engines: {node: '>= 0.4'} + globals@14.0.0: + resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} + engines: {node: '>=18'} + + globals@15.9.0: + resolution: {integrity: sha512-SmSKyLLKFbSr6rptvP8izbyxJL4ILwqO9Jg23UA0sDlGlu58V59D1//I3vlc0KJphVdUR7vMjHIplYnzBxorQA==} + engines: {node: '>=18'} globby@11.1.0: resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} @@ -2852,9 +2783,6 @@ packages: engines: {node: '>=0.4.7'} hasBin: true - has-bigints@1.0.2: - resolution: {integrity: sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==} - has-flag@3.0.0: resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} engines: {node: '>=4'} @@ -2874,10 +2802,6 @@ packages: resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} engines: {node: '>= 0.4'} - has-tostringtag@1.0.2: - resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==} - engines: {node: '>= 0.4'} - has-value@0.3.1: resolution: {integrity: sha512-gpG936j8/MzaeID5Yif+577c17TxaDmhuyVgSwtnL/q8UUTySg8Mecb+8Cf1otgLoD7DDH75axp86ER7LFsf3Q==} engines: {node: '>=0.10.0'} @@ -3018,10 +2942,6 @@ packages: resolution: {integrity: sha512-MWDKS3AS1bGCHLBA2VLImJz42f7bJh8wQsTGCzI3j519/CASStoDONUBVz2I/VID0MpiX3SGSnbOD2xUalbE5g==} engines: {node: '>=18'} - inflight@1.0.6: - resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} - deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. - inherits@2.0.3: resolution: {integrity: sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==} @@ -3032,10 +2952,6 @@ packages: resolution: {integrity: sha512-QQnnxNyfvmHFIsj7gkPcYymR8Jdw/o7mp5ZFihxn6h8Ci6fh3Dx4E1gPjpQEpIuPo9XVNY/ZUwh4BPMjGyL01g==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} - internal-slot@1.0.7: - resolution: {integrity: sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==} - engines: {node: '>= 0.4'} - ipaddr.js@1.9.1: resolution: {integrity: sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==} engines: {node: '>= 0.10'} @@ -3048,35 +2964,22 @@ packages: resolution: {integrity: sha512-YBUanLI8Yoihw923YeFUS5fs0fF2f5TSFTNiYAAzhhDscDa3lEqYuz1pDOEP5KvX94I9ey3vsqjJcLVFVU+3QA==} engines: {node: '>= 0.10'} - is-array-buffer@3.0.4: - resolution: {integrity: sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==} - engines: {node: '>= 0.4'} + is-alphabetical@1.0.4: + resolution: {integrity: sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg==} + + is-alphanumerical@1.0.4: + resolution: {integrity: sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A==} is-arrayish@0.2.1: resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} - is-bigint@1.0.4: - resolution: {integrity: sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==} - is-binary-path@2.1.0: resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} engines: {node: '>=8'} - is-boolean-object@1.1.2: - resolution: {integrity: sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==} - engines: {node: '>= 0.4'} - is-buffer@1.1.6: resolution: {integrity: sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==} - is-builtin-module@3.2.1: - resolution: {integrity: sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==} - engines: {node: '>=6'} - - is-callable@1.2.7: - resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==} - engines: {node: '>= 0.4'} - is-core-module@2.15.0: resolution: {integrity: sha512-Dd+Lb2/zvk9SKy1TGCt1wFJFo/MWBPMX5x7KcvLajWTGuomczdQX61PvY5yK6SVACwpoexWo81IfFyoKY2QnTA==} engines: {node: '>= 0.4'} @@ -3085,13 +2988,8 @@ packages: resolution: {integrity: sha512-bc4NlCDiCr28U4aEsQ3Qs2491gVq4V8G7MQyws968ImqjKuYtTJXrl7Vq7jsN7Ly/C3xj5KWFrY7sHNeDkAzXw==} engines: {node: '>= 0.4'} - is-data-view@1.0.1: - resolution: {integrity: sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==} - engines: {node: '>= 0.4'} - - is-date-object@1.0.5: - resolution: {integrity: sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==} - engines: {node: '>= 0.4'} + is-decimal@1.0.4: + resolution: {integrity: sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw==} is-descriptor@0.1.7: resolution: {integrity: sha512-C3grZTvObeN1xud4cRWl366OMXZTj0+HGyk4hvfpx4ZHt1Pb60ANSXqCK7pdOTeUQpRzECBSTphqvD7U+l22Eg==} @@ -3134,6 +3032,9 @@ packages: resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} engines: {node: '>=0.10.0'} + is-hexadecimal@1.0.4: + resolution: {integrity: sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw==} + is-inside-container@1.0.0: resolution: {integrity: sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==} engines: {node: '>=14.16'} @@ -3143,18 +3044,10 @@ packages: resolution: {integrity: sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ==} engines: {node: '>=12'} - is-negative-zero@2.0.3: - resolution: {integrity: sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==} - engines: {node: '>= 0.4'} - is-network-error@1.1.0: resolution: {integrity: sha512-tUdRRAnhT+OtCZR/LxZelH/C7QtjtFrTu5tXCA8pl55eTUElUHT+GPYV8MBMBvea/j+NxQqVt3LbWMRir7Gx9g==} engines: {node: '>=16'} - is-number-object@1.0.7: - resolution: {integrity: sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==} - engines: {node: '>= 0.4'} - is-number@3.0.0: resolution: {integrity: sha512-4cboCqIpliH+mAvFNegjZQ4kgKc3ZUhQVr3HvWbSh5q3WH2v82ct+T2Y1hdU5Gdtorx/cLifQjqCbL7bpznLTg==} engines: {node: '>=0.10.0'} @@ -3183,14 +3076,6 @@ packages: resolution: {integrity: sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==} engines: {node: '>=0.10.0'} - is-regex@1.1.4: - resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} - engines: {node: '>= 0.4'} - - is-shared-array-buffer@1.0.3: - resolution: {integrity: sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==} - engines: {node: '>= 0.4'} - is-stream@2.0.1: resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==} engines: {node: '>=8'} @@ -3199,22 +3084,10 @@ packages: resolution: {integrity: sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - is-string@1.0.7: - resolution: {integrity: sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==} - engines: {node: '>= 0.4'} - - is-symbol@1.0.4: - resolution: {integrity: sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==} - engines: {node: '>= 0.4'} - is-text-path@2.0.0: resolution: {integrity: sha512-+oDTluR6WEjdXEJMnC2z6A4FRwFoYuvShVVEGsS7ewc0UTi2QtAKMDJuL4BDEVt+5T7MjFo12RP8ghOM75oKJw==} engines: {node: '>=8'} - is-typed-array@1.1.13: - resolution: {integrity: sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==} - engines: {node: '>= 0.4'} - is-unicode-supported@1.3.0: resolution: {integrity: sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==} engines: {node: '>=12'} @@ -3223,9 +3096,6 @@ packages: resolution: {integrity: sha512-FRdAyx5lusK1iHG0TWpVtk9+1i+GjrzRffhDg4ovQ7mcidMQ6mj+MhKPmvh7Xwyv5gIS06ns49CA7Sqg7lC22Q==} engines: {node: '>=18'} - is-weakref@1.0.2: - resolution: {integrity: sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==} - is-windows@1.0.2: resolution: {integrity: sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==} engines: {node: '>=0.10.0'} @@ -3237,9 +3107,6 @@ packages: isarray@1.0.0: resolution: {integrity: sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==} - isarray@2.0.5: - resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==} - isexe@2.0.0: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} @@ -3332,10 +3199,6 @@ packages: json-stable-stringify-without-jsonify@1.0.1: resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} - json5@1.0.2: - resolution: {integrity: sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==} - hasBin: true - json5@2.2.3: resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} engines: {node: '>=6'} @@ -3571,6 +3434,12 @@ packages: resolution: {integrity: sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==} hasBin: true + mdast-util-from-markdown@0.8.5: + resolution: {integrity: sha512-2hkTXtYYnr+NubD/g6KGBS/0mFmBcifAsI0yIWRiRo0PjVs6SSOSOdtzbp6kSGnShDN6G5aWZpKQ2lWRy27mWQ==} + + mdast-util-to-string@2.0.0: + resolution: {integrity: sha512-AW4DRS3QbBayY/jJmD8437V1Gombjf8RSOUCMFBuo5iHi58AGEgVCKQ+ezHkZZDpAQS75hcBMpLqjpJTjtUL7w==} + mdn-data@2.0.28: resolution: {integrity: sha512-aylIc7Z9y4yzHYAJNuESG3hfhC+0Ibp/MAMiaOZgNv4pmEdFyfZhhhny4MNiAfWdBQ1RQ2mfDWmM1x8SvGyp8g==} @@ -3610,6 +3479,9 @@ packages: resolution: {integrity: sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==} engines: {node: '>= 0.6'} + micromark@2.11.4: + resolution: {integrity: sha512-+WoovN/ppKolQOFIAajxi7Lu9kInbPxFuTBVEavFcL8eAfVstoc5MocPmqBeAdBOJV00uaVjegzH4+MA0DN/uA==} + micromatch@3.1.10: resolution: {integrity: sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==} engines: {node: '>=0.10.0'} @@ -3789,34 +3661,14 @@ packages: resolution: {integrity: sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==} engines: {node: '>= 0.4'} - object-keys@1.1.1: - resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==} - engines: {node: '>= 0.4'} - object-visit@1.0.1: resolution: {integrity: sha512-GBaMwwAVK9qbQN3Scdo0OyvgPW7l3lnaVMj84uTOZlswkX0KpF6fyDBJhtTthf7pymztoN36/KEr1DyhF96zEA==} engines: {node: '>=0.10.0'} - object.assign@4.1.5: - resolution: {integrity: sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==} - engines: {node: '>= 0.4'} - - object.fromentries@2.0.8: - resolution: {integrity: sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==} - engines: {node: '>= 0.4'} - - object.groupby@1.0.3: - resolution: {integrity: sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ==} - engines: {node: '>= 0.4'} - object.pick@1.3.0: resolution: {integrity: sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ==} engines: {node: '>=0.10.0'} - object.values@1.2.0: - resolution: {integrity: sha512-yBYjY9QX2hnRmZHAjG/f13MzmBzxzYgQhFrke06TTyKY5zSTEqkOeukBzIdVA3j3ulu8Qa3MbVFShV7T2RmGtQ==} - engines: {node: '>= 0.4'} - obuf@1.1.2: resolution: {integrity: sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==} @@ -3835,9 +3687,6 @@ packages: resolution: {integrity: sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==} engines: {node: '>= 0.8'} - once@1.4.0: - resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} - onetime@5.1.2: resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==} engines: {node: '>=6'} @@ -3892,6 +3741,9 @@ packages: resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} engines: {node: '>=6'} + parse-entities@2.0.0: + resolution: {integrity: sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ==} + parse-json@5.2.0: resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} engines: {node: '>=8'} @@ -3922,10 +3774,6 @@ packages: resolution: {integrity: sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - path-is-absolute@1.0.1: - resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} - engines: {node: '>=0.10.0'} - path-key@3.1.1: resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} engines: {node: '>=8'} @@ -3999,10 +3847,6 @@ packages: resolution: {integrity: sha512-xTgYBc3fuo7Yt7JbiuFxSYGToMoz8fLoE6TC9Wx1P/u+LfeThMOAqmuyECnlBaaJb+u1m9hHiXUEtwW4OzfUJg==} engines: {node: '>=0.10.0'} - possible-typed-array-names@1.0.0: - resolution: {integrity: sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==} - engines: {node: '>= 0.4'} - postcss-calc@10.0.1: resolution: {integrity: sha512-pp1Z3FxtxA+xHAoWXcOXgnBN1WPu4ZiJ5LWGjKyf9MMreagAsaTUtnqFK1y1sHhyJddAkYTPu6XSuLgb3oYCjw==} engines: {node: ^18.12 || ^20.9 || >=22.0} @@ -4235,8 +4079,8 @@ packages: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'} - prettier-config-vuepress@4.4.0: - resolution: {integrity: sha512-jTbs0zkoEHbLJgktcLA4BPJo7+3ipiY4fZcvdDWHkhAq+JhvGBmuoY3VRJcjlSs/7yp0e81oPTp3tl6I9VkpTg==} + prettier-config-vuepress@5.0.0: + resolution: {integrity: sha512-Q7zeehclvi/UYkLvzR1ef0N6FxUEuUFVy4zjpXrZ3VVHpJ2PR8/Z9g+iEJhjdu/Vfa5HnmCCpH8Wswn/U05n7w==} prettier@3.3.3: resolution: {integrity: sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==} @@ -4309,10 +4153,6 @@ packages: resolution: {integrity: sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==} engines: {node: '>=0.10.0'} - regexp.prototype.flags@1.5.2: - resolution: {integrity: sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==} - engines: {node: '>= 0.4'} - relateurl@0.2.7: resolution: {integrity: sha512-G08Dxvm4iDN3MLM0EsP62EDV9IuhXPR6blNz6Utcp7zyV3tr4HVNINt6MpaRWbxoOHT3Q7YN2P+jaHX8vUbgog==} engines: {node: '>= 0.10'} @@ -4381,11 +4221,6 @@ packages: rfdc@1.4.1: resolution: {integrity: sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==} - rimraf@3.0.2: - resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} - deprecated: Rimraf versions prior to v4 are no longer supported - hasBin: true - rimraf@5.0.10: resolution: {integrity: sha512-l0OE8wL34P4nJH/H2ffoaniAokM2qSmrtXHmlpvYr5AVVX8msAyW0l8NVJFDxlSK4u3Uh/f41cQheDVdnYijwQ==} hasBin: true @@ -4410,20 +4245,12 @@ packages: rxjs@7.8.1: resolution: {integrity: sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==} - safe-array-concat@1.1.2: - resolution: {integrity: sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==} - engines: {node: '>=0.4'} - safe-buffer@5.1.2: resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==} safe-buffer@5.2.1: resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} - safe-regex-test@1.0.3: - resolution: {integrity: sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==} - engines: {node: '>= 0.4'} - safe-regex@1.1.0: resolution: {integrity: sha512-aJXcif4xnaNUzvUuC5gcb46oTS7zvg4jpMTnuqtrEPlR3vFr4pxtdTwaF1Qs3Enjn9HK+ZlwQui+a7z0SywIzg==} @@ -4622,10 +4449,6 @@ packages: resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==} engines: {node: '>= 0.4'} - set-function-name@2.0.2: - resolution: {integrity: sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==} - engines: {node: '>= 0.4'} - set-value@2.0.1: resolution: {integrity: sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==} engines: {node: '>=0.10.0'} @@ -4770,6 +4593,9 @@ packages: sprintf-js@1.0.3: resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} + stable-hash@0.0.4: + resolution: {integrity: sha512-LjdcbuBeLcdETCrPn9i8AYAZ1eCtu4ECAWtP7UleOiZ9LzVxRzzUZEoZ8zB24nhkQnDWyET0I+3sWokSDS3E7g==} + stackback@0.0.2: resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} @@ -4808,17 +4634,6 @@ packages: resolution: {integrity: sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==} engines: {node: '>=18'} - string.prototype.trim@1.2.9: - resolution: {integrity: sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==} - engines: {node: '>= 0.4'} - - string.prototype.trimend@1.0.8: - resolution: {integrity: sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==} - - string.prototype.trimstart@1.0.8: - resolution: {integrity: sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==} - engines: {node: '>= 0.4'} - string_decoder@1.1.1: resolution: {integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==} @@ -4837,10 +4652,6 @@ packages: resolution: {integrity: sha512-uCC2VHvQRYu+lMh4My/sFNmF2klFymLX1wHJeXnbEJERpV/ZsVuonzerjfrGpIGF7LBVa1O7i9kjiWvJiFck8g==} engines: {node: '>=0.10.0'} - strip-bom@3.0.0: - resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} - engines: {node: '>=4'} - strip-final-newline@2.0.0: resolution: {integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==} engines: {node: '>=6'} @@ -5019,11 +4830,8 @@ packages: ts-interface-checker@0.1.13: resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} - tsconfig-paths@3.15.0: - resolution: {integrity: sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==} - - tsconfig-vuepress@4.5.0: - resolution: {integrity: sha512-edJbEJwTQayS4+q5mIPsVY9UaZfgzJezNX/eO86rRgIIDsJyVdcUahr7WgqQWdYI7MIcdDvMRlSn0+Veznmq5g==} + tsconfig-vuepress@5.0.0: + resolution: {integrity: sha512-mhfDD72YN0N41PWE3A04wHrUyOR1w+80wRLx36rFJ5uYBLY97fp3DubbxQW6l0iuicA0Jswai4TW5sCWk6HS6A==} tslib@2.6.3: resolution: {integrity: sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==} @@ -5067,22 +4875,6 @@ packages: resolution: {integrity: sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==} engines: {node: '>= 0.6'} - typed-array-buffer@1.0.2: - resolution: {integrity: sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==} - engines: {node: '>= 0.4'} - - typed-array-byte-length@1.0.1: - resolution: {integrity: sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==} - engines: {node: '>= 0.4'} - - typed-array-byte-offset@1.0.2: - resolution: {integrity: sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA==} - engines: {node: '>= 0.4'} - - typed-array-length@1.0.6: - resolution: {integrity: sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==} - engines: {node: '>= 0.4'} - typescript@5.5.4: resolution: {integrity: sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==} engines: {node: '>=14.17'} @@ -5099,9 +4891,6 @@ packages: engines: {node: '>=0.8.0'} hasBin: true - unbox-primitive@1.0.2: - resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==} - undici-types@6.18.2: resolution: {integrity: sha512-5ruQbENj95yDYJNS3TvcaxPMshV7aizdv/hWYjGIKoANWKjhWNBsr2YEuYZKodQulB1b8l7ILOuDQep3afowQQ==} @@ -5113,6 +4902,9 @@ packages: resolution: {integrity: sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==} engines: {node: '>=0.10.0'} + unist-util-stringify-position@2.0.3: + resolution: {integrity: sha512-3faScn5I+hy9VleOq/qNbAd6pAx7iH5jYBMS9I1HgQVijz/4mv5Bvw5iw1sC/90CODiKo81G/ps8AJrISn687g==} + universalify@2.0.1: resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==} engines: {node: '>= 10.0.0'} @@ -5175,8 +4967,8 @@ packages: engines: {node: ^18.0.0 || >=20.0.0} hasBin: true - vite@5.4.0: - resolution: {integrity: sha512-5xokfMX0PIiwCMCMb9ZJcMyh5wbBun0zUzKib+L65vAZ8GY9ePZMXxFrHbr/Kyll2+LSCY7xtERPpxkBDKngwg==} + vite@5.4.1: + resolution: {integrity: sha512-1oE6yuNXssjrZdblI9AfBbHCC41nnyoVoEZxQnID6yvQZAFBzxxkqoFLtHUMkYunL8hwOLEjgTuxpkRxvba3kA==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: @@ -5263,8 +5055,8 @@ packages: peerDependencies: typescript: '>=5.0.0' - vue@3.4.37: - resolution: {integrity: sha512-3vXvNfkKTBsSJ7JP+LyR7GBuwQuckbWvuwAid3xbqK9ppsKt/DUvfqgZ48fgOLEfpy1IacL5f8QhUVl77RaI7A==} + vue@3.4.38: + resolution: {integrity: sha512-f0ZgN+mZ5KFgVv9wz0f4OgVKukoXtS3nwET4c2vLBGQR50aI8G0cqbFtLlX9Yiyg3LFGBitruPHt2PxwTduJEw==} peerDependencies: typescript: '*' peerDependenciesMeta: @@ -5339,13 +5131,6 @@ packages: whatwg-url@7.1.0: resolution: {integrity: sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==} - which-boxed-primitive@1.0.2: - resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==} - - which-typed-array@1.1.15: - resolution: {integrity: sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==} - engines: {node: '>= 0.4'} - which@2.0.2: resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} engines: {node: '>= 8'} @@ -5378,9 +5163,6 @@ packages: resolution: {integrity: sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q==} engines: {node: '>=18'} - wrappy@1.0.2: - resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} - ws@8.18.0: resolution: {integrity: sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==} engines: {node: '>=10.0.0'} @@ -5809,19 +5591,27 @@ snapshots: '@esbuild/win32-x64@0.23.0': optional: true - '@eslint-community/eslint-utils@4.4.0(eslint@8.57.0)': + '@eslint-community/eslint-utils@4.4.0(eslint@9.9.0(jiti@1.21.6))': dependencies: - eslint: 8.57.0 + eslint: 9.9.0(jiti@1.21.6) eslint-visitor-keys: 3.4.3 '@eslint-community/regexpp@4.11.0': {} - '@eslint/eslintrc@2.1.4': + '@eslint/config-array@0.17.1': + dependencies: + '@eslint/object-schema': 2.1.4 + debug: 4.3.6 + minimatch: 3.1.2 + transitivePeerDependencies: + - supports-color + + '@eslint/eslintrc@3.1.0': dependencies: ajv: 6.12.6 debug: 4.3.6 - espree: 9.6.1 - globals: 13.24.0 + espree: 10.1.0 + globals: 14.0.0 ignore: 5.3.2 import-fresh: 3.3.0 js-yaml: 4.1.0 @@ -5830,19 +5620,13 @@ snapshots: transitivePeerDependencies: - supports-color - '@eslint/js@8.57.0': {} + '@eslint/js@9.9.0': {} - '@humanwhocodes/config-array@0.11.14': - dependencies: - '@humanwhocodes/object-schema': 2.0.3 - debug: 4.3.6 - minimatch: 3.1.2 - transitivePeerDependencies: - - supports-color + '@eslint/object-schema@2.1.4': {} '@humanwhocodes/module-importer@1.0.1': {} - '@humanwhocodes/object-schema@2.0.3': {} + '@humanwhocodes/retry@0.3.0': {} '@hutson/parse-repository-url@5.0.0': {} @@ -5964,6 +5748,25 @@ snapshots: '@mdit-vue/types@2.1.0': {} + '@meteorlxy/eslint-config@4.2.0(eslint-plugin-vue@9.27.0(eslint@9.9.0(jiti@1.21.6)))(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4)(vue-eslint-parser@9.4.3(eslint@9.9.0(jiti@1.21.6)))': + dependencies: + '@typescript-eslint/eslint-plugin': 8.1.0(@typescript-eslint/parser@8.1.0(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4))(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4) + '@typescript-eslint/parser': 8.1.0(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4) + '@typescript-eslint/utils': 8.1.0(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4) + confusing-browser-globals: 1.0.11 + eslint-config-prettier: 9.1.0(eslint@9.9.0(jiti@1.21.6)) + eslint-plugin-eslint-comments: 3.2.0(eslint@9.9.0(jiti@1.21.6)) + eslint-plugin-import-x: 3.1.0(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4) + eslint-plugin-markdown: 5.1.0(eslint@9.9.0(jiti@1.21.6)) + globals: 15.9.0 + optionalDependencies: + eslint-plugin-vue: 9.27.0(eslint@9.9.0(jiti@1.21.6)) + vue-eslint-parser: 9.4.3(eslint@9.9.0(jiti@1.21.6)) + transitivePeerDependencies: + - eslint + - supports-color + - typescript + '@nodelib/fs.scandir@2.1.5': dependencies: '@nodelib/fs.stat': 2.0.5 @@ -6118,8 +5921,6 @@ snapshots: '@types/json-schema@7.0.15': {} - '@types/json5@0.0.29': {} - '@types/jsonfile@6.1.4': dependencies: '@types/node': 22.3.0 @@ -6135,6 +5936,10 @@ snapshots: '@types/linkify-it': 5.0.0 '@types/mdurl': 2.0.0 + '@types/mdast@3.0.15': + dependencies: + '@types/unist': 2.0.11 + '@types/mdurl@2.0.0': {} '@types/mime@1.3.5': {} @@ -6178,6 +5983,8 @@ snapshots: dependencies: '@types/node': 22.3.0 + '@types/unist@2.0.11': {} + '@types/webpack-env@1.18.5': {} '@types/ws@8.5.12': @@ -6190,15 +5997,15 @@ snapshots: dependencies: '@types/yargs-parser': 21.0.3 - '@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4)': + '@typescript-eslint/eslint-plugin@8.1.0(@typescript-eslint/parser@8.1.0(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4))(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4)': dependencies: '@eslint-community/regexpp': 4.11.0 - '@typescript-eslint/parser': 7.18.0(eslint@8.57.0)(typescript@5.5.4) - '@typescript-eslint/scope-manager': 7.18.0 - '@typescript-eslint/type-utils': 7.18.0(eslint@8.57.0)(typescript@5.5.4) - '@typescript-eslint/utils': 7.18.0(eslint@8.57.0)(typescript@5.5.4) - '@typescript-eslint/visitor-keys': 7.18.0 - eslint: 8.57.0 + '@typescript-eslint/parser': 8.1.0(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4) + '@typescript-eslint/scope-manager': 8.1.0 + '@typescript-eslint/type-utils': 8.1.0(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4) + '@typescript-eslint/utils': 8.1.0(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4) + '@typescript-eslint/visitor-keys': 8.1.0 + eslint: 9.9.0(jiti@1.21.6) graphemer: 1.4.0 ignore: 5.3.2 natural-compare: 1.4.0 @@ -6208,14 +6015,14 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@7.18.0(eslint@8.57.0)(typescript@5.5.4)': + '@typescript-eslint/parser@8.1.0(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4)': dependencies: - '@typescript-eslint/scope-manager': 7.18.0 - '@typescript-eslint/types': 7.18.0 - '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.5.4) - '@typescript-eslint/visitor-keys': 7.18.0 + '@typescript-eslint/scope-manager': 8.1.0 + '@typescript-eslint/types': 8.1.0 + '@typescript-eslint/typescript-estree': 8.1.0(typescript@5.5.4) + '@typescript-eslint/visitor-keys': 8.1.0 debug: 4.3.6 - eslint: 8.57.0 + eslint: 9.9.0(jiti@1.21.6) optionalDependencies: typescript: 5.5.4 transitivePeerDependencies: @@ -6226,20 +6033,27 @@ snapshots: '@typescript-eslint/types': 7.18.0 '@typescript-eslint/visitor-keys': 7.18.0 - '@typescript-eslint/type-utils@7.18.0(eslint@8.57.0)(typescript@5.5.4)': + '@typescript-eslint/scope-manager@8.1.0': dependencies: - '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.5.4) - '@typescript-eslint/utils': 7.18.0(eslint@8.57.0)(typescript@5.5.4) + '@typescript-eslint/types': 8.1.0 + '@typescript-eslint/visitor-keys': 8.1.0 + + '@typescript-eslint/type-utils@8.1.0(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4)': + dependencies: + '@typescript-eslint/typescript-estree': 8.1.0(typescript@5.5.4) + '@typescript-eslint/utils': 8.1.0(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4) debug: 4.3.6 - eslint: 8.57.0 ts-api-utils: 1.3.0(typescript@5.5.4) optionalDependencies: typescript: 5.5.4 transitivePeerDependencies: + - eslint - supports-color '@typescript-eslint/types@7.18.0': {} + '@typescript-eslint/types@8.1.0': {} + '@typescript-eslint/typescript-estree@7.18.0(typescript@5.5.4)': dependencies: '@typescript-eslint/types': 7.18.0 @@ -6255,28 +6069,57 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@7.18.0(eslint@8.57.0)(typescript@5.5.4)': - dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) - '@typescript-eslint/scope-manager': 7.18.0 - '@typescript-eslint/types': 7.18.0 - '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.5.4) - eslint: 8.57.0 - transitivePeerDependencies: - - supports-color - - typescript - - '@typescript-eslint/visitor-keys@7.18.0': + '@typescript-eslint/typescript-estree@8.1.0(typescript@5.5.4)': + dependencies: + '@typescript-eslint/types': 8.1.0 + '@typescript-eslint/visitor-keys': 8.1.0 + debug: 4.3.6 + globby: 11.1.0 + is-glob: 4.0.3 + minimatch: 9.0.5 + semver: 7.6.3 + ts-api-utils: 1.3.0(typescript@5.5.4) + optionalDependencies: + typescript: 5.5.4 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/utils@7.18.0(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4)': + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@9.9.0(jiti@1.21.6)) + '@typescript-eslint/scope-manager': 7.18.0 + '@typescript-eslint/types': 7.18.0 + '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.5.4) + eslint: 9.9.0(jiti@1.21.6) + transitivePeerDependencies: + - supports-color + - typescript + + '@typescript-eslint/utils@8.1.0(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4)': + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@9.9.0(jiti@1.21.6)) + '@typescript-eslint/scope-manager': 8.1.0 + '@typescript-eslint/types': 8.1.0 + '@typescript-eslint/typescript-estree': 8.1.0(typescript@5.5.4) + eslint: 9.9.0(jiti@1.21.6) + transitivePeerDependencies: + - supports-color + - typescript + + '@typescript-eslint/visitor-keys@7.18.0': dependencies: '@typescript-eslint/types': 7.18.0 eslint-visitor-keys: 3.4.3 - '@ungap/structured-clone@1.2.0': {} + '@typescript-eslint/visitor-keys@8.1.0': + dependencies: + '@typescript-eslint/types': 8.1.0 + eslint-visitor-keys: 3.4.3 - '@vitejs/plugin-vue@5.1.2(vite@5.4.0(@types/node@22.3.0)(lightningcss@1.26.0)(sass-embedded@1.77.8)(sass@1.77.8)(terser@5.31.6))(vue@3.4.37(typescript@5.5.4))': + '@vitejs/plugin-vue@5.1.2(vite@5.4.1(@types/node@22.3.0)(lightningcss@1.26.0)(sass-embedded@1.77.8)(sass@1.77.8)(terser@5.31.6))(vue@3.4.38(typescript@5.5.4))': dependencies: - vite: 5.4.0(@types/node@22.3.0)(lightningcss@1.26.0)(sass-embedded@1.77.8)(sass@1.77.8)(terser@5.31.6) - vue: 3.4.37(typescript@5.5.4) + vite: 5.4.1(@types/node@22.3.0)(lightningcss@1.26.0)(sass-embedded@1.77.8)(sass@1.77.8)(terser@5.31.6) + vue: 3.4.38(typescript@5.5.4) '@vitest/coverage-istanbul@2.0.5(vitest@2.0.5(@types/node@22.3.0)(lightningcss@1.26.0)(sass-embedded@1.77.8)(sass@1.77.8)(terser@5.31.6))': dependencies: @@ -6339,35 +6182,35 @@ snapshots: path-browserify: 1.0.1 vscode-uri: 3.0.8 - '@vue/compiler-core@3.4.37': + '@vue/compiler-core@3.4.38': dependencies: '@babel/parser': 7.25.3 - '@vue/shared': 3.4.37 - entities: 5.0.0 + '@vue/shared': 3.4.38 + entities: 4.5.0 estree-walker: 2.0.2 source-map-js: 1.2.0 - '@vue/compiler-dom@3.4.37': + '@vue/compiler-dom@3.4.38': dependencies: - '@vue/compiler-core': 3.4.37 - '@vue/shared': 3.4.37 + '@vue/compiler-core': 3.4.38 + '@vue/shared': 3.4.38 - '@vue/compiler-sfc@3.4.37': + '@vue/compiler-sfc@3.4.38': dependencies: '@babel/parser': 7.25.3 - '@vue/compiler-core': 3.4.37 - '@vue/compiler-dom': 3.4.37 - '@vue/compiler-ssr': 3.4.37 - '@vue/shared': 3.4.37 + '@vue/compiler-core': 3.4.38 + '@vue/compiler-dom': 3.4.38 + '@vue/compiler-ssr': 3.4.38 + '@vue/shared': 3.4.38 estree-walker: 2.0.2 magic-string: 0.30.11 postcss: 8.4.41 source-map-js: 1.2.0 - '@vue/compiler-ssr@3.4.37': + '@vue/compiler-ssr@3.4.38': dependencies: - '@vue/compiler-dom': 3.4.37 - '@vue/shared': 3.4.37 + '@vue/compiler-dom': 3.4.38 + '@vue/shared': 3.4.38 '@vue/compiler-vue2@2.7.16': dependencies: @@ -6379,9 +6222,9 @@ snapshots: '@vue/language-core@2.0.29(typescript@5.5.4)': dependencies: '@volar/language-core': 2.4.0-alpha.18 - '@vue/compiler-dom': 3.4.37 + '@vue/compiler-dom': 3.4.38 '@vue/compiler-vue2': 2.7.16 - '@vue/shared': 3.4.37 + '@vue/shared': 3.4.38 computeds: 0.0.1 minimatch: 9.0.5 muggle-string: 0.4.1 @@ -6389,29 +6232,29 @@ snapshots: optionalDependencies: typescript: 5.5.4 - '@vue/reactivity@3.4.37': + '@vue/reactivity@3.4.38': dependencies: - '@vue/shared': 3.4.37 + '@vue/shared': 3.4.38 - '@vue/runtime-core@3.4.37': + '@vue/runtime-core@3.4.38': dependencies: - '@vue/reactivity': 3.4.37 - '@vue/shared': 3.4.37 + '@vue/reactivity': 3.4.38 + '@vue/shared': 3.4.38 - '@vue/runtime-dom@3.4.37': + '@vue/runtime-dom@3.4.38': dependencies: - '@vue/reactivity': 3.4.37 - '@vue/runtime-core': 3.4.37 - '@vue/shared': 3.4.37 + '@vue/reactivity': 3.4.38 + '@vue/runtime-core': 3.4.38 + '@vue/shared': 3.4.38 csstype: 3.1.3 - '@vue/server-renderer@3.4.37(vue@3.4.37(typescript@5.5.4))': + '@vue/server-renderer@3.4.38(vue@3.4.38(typescript@5.5.4))': dependencies: - '@vue/compiler-ssr': 3.4.37 - '@vue/shared': 3.4.37 - vue: 3.4.37(typescript@5.5.4) + '@vue/compiler-ssr': 3.4.38 + '@vue/shared': 3.4.38 + vue: 3.4.38(typescript@5.5.4) - '@vue/shared@3.4.37': {} + '@vue/shared@3.4.38': {} '@vuepress-e2e/conditional-exports@file:e2e/modules/conditional-exports': {} @@ -6597,62 +6440,14 @@ snapshots: arr-union@3.1.0: {} - array-buffer-byte-length@1.0.1: - dependencies: - call-bind: 1.0.7 - is-array-buffer: 3.0.4 - array-flatten@1.1.1: {} array-ify@1.0.0: {} - array-includes@3.1.8: - dependencies: - call-bind: 1.0.7 - define-properties: 1.2.1 - es-abstract: 1.23.3 - es-object-atoms: 1.0.0 - get-intrinsic: 1.2.4 - is-string: 1.0.7 - array-union@2.1.0: {} array-unique@0.3.2: {} - array.prototype.findlastindex@1.2.5: - dependencies: - call-bind: 1.0.7 - define-properties: 1.2.1 - es-abstract: 1.23.3 - es-errors: 1.3.0 - es-object-atoms: 1.0.0 - es-shim-unscopables: 1.0.2 - - array.prototype.flat@1.3.2: - dependencies: - call-bind: 1.0.7 - define-properties: 1.2.1 - es-abstract: 1.23.3 - es-shim-unscopables: 1.0.2 - - array.prototype.flatmap@1.3.2: - dependencies: - call-bind: 1.0.7 - define-properties: 1.2.1 - es-abstract: 1.23.3 - es-shim-unscopables: 1.0.2 - - arraybuffer.prototype.slice@1.0.3: - dependencies: - array-buffer-byte-length: 1.0.1 - call-bind: 1.0.7 - define-properties: 1.2.1 - es-abstract: 1.23.3 - es-errors: 1.3.0 - get-intrinsic: 1.2.4 - is-array-buffer: 3.0.4 - is-shared-array-buffer: 1.0.3 - assertion-error@2.0.1: {} assign-symbols@1.0.0: {} @@ -6669,10 +6464,6 @@ snapshots: postcss: 8.4.41 postcss-value-parser: 4.2.0 - available-typed-arrays@1.0.7: - dependencies: - possible-typed-array-names: 1.0.0 - balanced-match@1.0.2: {} base@0.11.2: @@ -6746,7 +6537,7 @@ snapshots: browserslist@4.23.3: dependencies: caniuse-lite: 1.0.30001651 - electron-to-chromium: 1.5.7 + electron-to-chromium: 1.5.8 node-releases: 2.0.18 update-browserslist-db: 1.1.0(browserslist@4.23.3) @@ -6754,12 +6545,6 @@ snapshots: buffer-from@1.1.2: {} - builtin-modules@3.3.0: {} - - builtins@5.1.0: - dependencies: - semver: 7.6.3 - bumpp@9.5.1(magicast@0.3.4): dependencies: '@jsdevtools/ez-spawn': 3.0.4 @@ -6865,6 +6650,12 @@ snapshots: chalk@5.3.0: {} + character-entities-legacy@1.1.4: {} + + character-entities@1.2.4: {} + + character-reference-invalid@1.1.4: {} + check-error@2.1.1: {} chokidar@3.6.0: @@ -6987,6 +6778,8 @@ snapshots: confbox@0.1.7: {} + confusing-browser-globals@1.0.11: {} + connect-history-api-fallback@1.6.0: {} connect-history-api-fallback@2.0.0: {} @@ -7261,24 +7054,6 @@ snapshots: dargs@8.1.0: {} - data-view-buffer@1.0.1: - dependencies: - call-bind: 1.0.7 - es-errors: 1.3.0 - is-data-view: 1.0.1 - - data-view-byte-length@1.0.1: - dependencies: - call-bind: 1.0.7 - es-errors: 1.3.0 - is-data-view: 1.0.1 - - data-view-byte-offset@1.0.0: - dependencies: - call-bind: 1.0.7 - es-errors: 1.3.0 - is-data-view: 1.0.1 - de-indent@1.0.2: {} debug@2.6.9: @@ -7320,12 +7095,6 @@ snapshots: define-lazy-prop@3.0.0: {} - define-properties@1.2.1: - dependencies: - define-data-property: 1.1.4 - has-property-descriptors: 1.0.2 - object-keys: 1.1.1 - define-property@0.2.5: dependencies: is-descriptor: 0.1.7 @@ -7365,10 +7134,6 @@ snapshots: dependencies: '@leichtgewicht/ip-codec': 2.0.5 - doctrine@2.1.0: - dependencies: - esutils: 2.0.3 - doctrine@3.0.0: dependencies: esutils: 2.0.3 @@ -7426,7 +7191,7 @@ snapshots: ee-first@1.1.1: {} - electron-to-chromium@1.5.7: {} + electron-to-chromium@1.5.8: {} emoji-regex@10.3.0: {} @@ -7447,8 +7212,6 @@ snapshots: entities@4.5.0: {} - entities@5.0.0: {} - env-paths@2.2.1: {} envinfo@7.13.0: {} @@ -7459,55 +7222,6 @@ snapshots: dependencies: is-arrayish: 0.2.1 - es-abstract@1.23.3: - dependencies: - array-buffer-byte-length: 1.0.1 - arraybuffer.prototype.slice: 1.0.3 - available-typed-arrays: 1.0.7 - call-bind: 1.0.7 - data-view-buffer: 1.0.1 - data-view-byte-length: 1.0.1 - data-view-byte-offset: 1.0.0 - es-define-property: 1.0.0 - es-errors: 1.3.0 - es-object-atoms: 1.0.0 - es-set-tostringtag: 2.0.3 - es-to-primitive: 1.2.1 - function.prototype.name: 1.1.6 - get-intrinsic: 1.2.4 - get-symbol-description: 1.0.2 - globalthis: 1.0.4 - gopd: 1.0.1 - has-property-descriptors: 1.0.2 - has-proto: 1.0.3 - has-symbols: 1.0.3 - hasown: 2.0.2 - internal-slot: 1.0.7 - is-array-buffer: 3.0.4 - is-callable: 1.2.7 - is-data-view: 1.0.1 - is-negative-zero: 2.0.3 - is-regex: 1.1.4 - is-shared-array-buffer: 1.0.3 - is-string: 1.0.7 - is-typed-array: 1.1.13 - is-weakref: 1.0.2 - object-inspect: 1.13.2 - object-keys: 1.1.1 - object.assign: 4.1.5 - regexp.prototype.flags: 1.5.2 - safe-array-concat: 1.1.2 - safe-regex-test: 1.0.3 - string.prototype.trim: 1.2.9 - string.prototype.trimend: 1.0.8 - string.prototype.trimstart: 1.0.8 - typed-array-buffer: 1.0.2 - typed-array-byte-length: 1.0.1 - typed-array-byte-offset: 1.0.2 - typed-array-length: 1.0.6 - unbox-primitive: 1.0.2 - which-typed-array: 1.1.15 - es-define-property@1.0.0: dependencies: get-intrinsic: 1.2.4 @@ -7516,26 +7230,6 @@ snapshots: es-module-lexer@1.5.4: {} - es-object-atoms@1.0.0: - dependencies: - es-errors: 1.3.0 - - es-set-tostringtag@2.0.3: - dependencies: - get-intrinsic: 1.2.4 - has-tostringtag: 1.0.2 - hasown: 2.0.2 - - es-shim-unscopables@1.0.2: - dependencies: - hasown: 2.0.2 - - es-to-primitive@1.2.1: - dependencies: - is-callable: 1.2.7 - is-date-object: 1.0.5 - is-symbol: 1.0.4 - esbuild-loader@4.2.2(webpack@5.93.0(esbuild@0.23.0)): dependencies: esbuild: 0.21.5 @@ -7605,52 +7299,23 @@ snapshots: escape-string-regexp@4.0.0: {} - eslint-compat-utils@0.5.1(eslint@8.57.0): - dependencies: - eslint: 8.57.0 - semver: 7.6.3 - - eslint-config-prettier@9.1.0(eslint@8.57.0): - dependencies: - eslint: 8.57.0 - - eslint-config-standard@17.1.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.18.0(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0))(eslint-plugin-n@16.6.2(eslint@8.57.0))(eslint-plugin-promise@6.6.0(eslint@8.57.0))(eslint@8.57.0): + eslint-config-prettier@9.1.0(eslint@9.9.0(jiti@1.21.6)): dependencies: - eslint: 8.57.0 - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.18.0(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0) - eslint-plugin-n: 16.6.2(eslint@8.57.0) - eslint-plugin-promise: 6.6.0(eslint@8.57.0) + eslint: 9.9.0(jiti@1.21.6) - eslint-config-vuepress-typescript@4.10.1(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.18.0(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0))(eslint-plugin-n@16.6.2(eslint@8.57.0))(eslint-plugin-promise@6.6.0(eslint@8.57.0))(eslint@8.57.0)(typescript@5.5.4): + eslint-config-vuepress@5.1.0(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4)(vue-eslint-parser@9.4.3(eslint@9.9.0(jiti@1.21.6))): dependencies: - '@typescript-eslint/eslint-plugin': 7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4) - '@typescript-eslint/parser': 7.18.0(eslint@8.57.0)(typescript@5.5.4) - eslint-config-standard: 17.1.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.18.0(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0))(eslint-plugin-n@16.6.2(eslint@8.57.0))(eslint-plugin-promise@6.6.0(eslint@8.57.0))(eslint@8.57.0) - eslint-config-vuepress: 4.10.1(@typescript-eslint/parser@7.18.0(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0) - eslint-plugin-vue: 9.27.0(eslint@8.57.0) + '@meteorlxy/eslint-config': 4.2.0(eslint-plugin-vue@9.27.0(eslint@9.9.0(jiti@1.21.6)))(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4)(vue-eslint-parser@9.4.3(eslint@9.9.0(jiti@1.21.6))) + '@typescript-eslint/utils': 8.1.0(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4) + eslint-plugin-vue: 9.27.0(eslint@9.9.0(jiti@1.21.6)) transitivePeerDependencies: - eslint - - eslint-import-resolver-typescript - - eslint-import-resolver-webpack - - eslint-plugin-import - - eslint-plugin-n - - eslint-plugin-promise + - eslint-plugin-react + - eslint-plugin-react-hooks + - eslint-plugin-react-refresh - supports-color - typescript - - eslint-config-vuepress@4.10.1(@typescript-eslint/parser@7.18.0(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0): - dependencies: - eslint-config-prettier: 9.1.0(eslint@8.57.0) - eslint-config-standard: 17.1.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.18.0(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0))(eslint-plugin-n@16.6.2(eslint@8.57.0))(eslint-plugin-promise@6.6.0(eslint@8.57.0))(eslint@8.57.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.18.0(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0) - eslint-plugin-n: 16.6.2(eslint@8.57.0) - eslint-plugin-promise: 6.6.0(eslint@8.57.0) - transitivePeerDependencies: - - '@typescript-eslint/parser' - - eslint - - eslint-import-resolver-typescript - - eslint-import-resolver-webpack - - supports-color + - vue-eslint-parser eslint-import-resolver-node@0.3.9: dependencies: @@ -7660,79 +7325,46 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-module-utils@2.8.1(@typescript-eslint/parser@7.18.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint@8.57.0): + eslint-plugin-eslint-comments@3.2.0(eslint@9.9.0(jiti@1.21.6)): dependencies: - debug: 3.2.7 - optionalDependencies: - '@typescript-eslint/parser': 7.18.0(eslint@8.57.0)(typescript@5.5.4) - eslint: 8.57.0 - eslint-import-resolver-node: 0.3.9 - transitivePeerDependencies: - - supports-color - - eslint-plugin-es-x@7.8.0(eslint@8.57.0): - dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) - '@eslint-community/regexpp': 4.11.0 - eslint: 8.57.0 - eslint-compat-utils: 0.5.1(eslint@8.57.0) + escape-string-regexp: 1.0.5 + eslint: 9.9.0(jiti@1.21.6) + ignore: 5.3.2 - eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.18.0(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0): + eslint-plugin-import-x@3.1.0(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4): dependencies: - array-includes: 3.1.8 - array.prototype.findlastindex: 1.2.5 - array.prototype.flat: 1.3.2 - array.prototype.flatmap: 1.3.2 - debug: 3.2.7 - doctrine: 2.1.0 - eslint: 8.57.0 + '@typescript-eslint/utils': 7.18.0(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4) + debug: 4.3.6 + doctrine: 3.0.0 + eslint: 9.9.0(jiti@1.21.6) eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.18.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint@8.57.0) - hasown: 2.0.2 - is-core-module: 2.15.0 + get-tsconfig: 4.7.6 is-glob: 4.0.3 - minimatch: 3.1.2 - object.fromentries: 2.0.8 - object.groupby: 1.0.3 - object.values: 1.2.0 - semver: 6.3.1 - tsconfig-paths: 3.15.0 - optionalDependencies: - '@typescript-eslint/parser': 7.18.0(eslint@8.57.0)(typescript@5.5.4) + minimatch: 9.0.5 + semver: 7.6.3 + stable-hash: 0.0.4 + tslib: 2.6.3 transitivePeerDependencies: - - eslint-import-resolver-typescript - - eslint-import-resolver-webpack - supports-color + - typescript - eslint-plugin-n@16.6.2(eslint@8.57.0): - dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) - builtins: 5.1.0 - eslint: 8.57.0 - eslint-plugin-es-x: 7.8.0(eslint@8.57.0) - get-tsconfig: 4.7.6 - globals: 13.24.0 - ignore: 5.3.2 - is-builtin-module: 3.2.1 - is-core-module: 2.15.0 - minimatch: 3.1.2 - resolve: 1.22.8 - semver: 7.6.3 - - eslint-plugin-promise@6.6.0(eslint@8.57.0): + eslint-plugin-markdown@5.1.0(eslint@9.9.0(jiti@1.21.6)): dependencies: - eslint: 8.57.0 + eslint: 9.9.0(jiti@1.21.6) + mdast-util-from-markdown: 0.8.5 + transitivePeerDependencies: + - supports-color - eslint-plugin-vue@9.27.0(eslint@8.57.0): + eslint-plugin-vue@9.27.0(eslint@9.9.0(jiti@1.21.6)): dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) - eslint: 8.57.0 + '@eslint-community/eslint-utils': 4.4.0(eslint@9.9.0(jiti@1.21.6)) + eslint: 9.9.0(jiti@1.21.6) globals: 13.24.0 natural-compare: 1.4.0 nth-check: 2.1.1 postcss-selector-parser: 6.1.2 semver: 7.6.3 - vue-eslint-parser: 9.4.3(eslint@8.57.0) + vue-eslint-parser: 9.4.3(eslint@9.9.0(jiti@1.21.6)) xml-name-validator: 4.0.0 transitivePeerDependencies: - supports-color @@ -7747,40 +7379,43 @@ snapshots: esrecurse: 4.3.0 estraverse: 5.3.0 + eslint-scope@8.0.2: + dependencies: + esrecurse: 4.3.0 + estraverse: 5.3.0 + eslint-visitor-keys@3.4.3: {} - eslint@8.57.0: + eslint-visitor-keys@4.0.0: {} + + eslint@9.9.0(jiti@1.21.6): dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.9.0(jiti@1.21.6)) '@eslint-community/regexpp': 4.11.0 - '@eslint/eslintrc': 2.1.4 - '@eslint/js': 8.57.0 - '@humanwhocodes/config-array': 0.11.14 + '@eslint/config-array': 0.17.1 + '@eslint/eslintrc': 3.1.0 + '@eslint/js': 9.9.0 '@humanwhocodes/module-importer': 1.0.1 + '@humanwhocodes/retry': 0.3.0 '@nodelib/fs.walk': 1.2.8 - '@ungap/structured-clone': 1.2.0 ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 debug: 4.3.6 - doctrine: 3.0.0 escape-string-regexp: 4.0.0 - eslint-scope: 7.2.2 - eslint-visitor-keys: 3.4.3 - espree: 9.6.1 + eslint-scope: 8.0.2 + eslint-visitor-keys: 4.0.0 + espree: 10.1.0 esquery: 1.6.0 esutils: 2.0.3 fast-deep-equal: 3.1.3 - file-entry-cache: 6.0.1 + file-entry-cache: 8.0.0 find-up: 5.0.0 glob-parent: 6.0.2 - globals: 13.24.0 - graphemer: 1.4.0 ignore: 5.3.2 imurmurhash: 0.1.4 is-glob: 4.0.3 is-path-inside: 3.0.3 - js-yaml: 4.1.0 json-stable-stringify-without-jsonify: 1.0.1 levn: 0.4.1 lodash.merge: 4.6.2 @@ -7789,9 +7424,17 @@ snapshots: optionator: 0.9.4 strip-ansi: 6.0.1 text-table: 0.2.0 + optionalDependencies: + jiti: 1.21.6 transitivePeerDependencies: - supports-color + espree@10.1.0: + dependencies: + acorn: 8.12.1 + acorn-jsx: 5.3.2(acorn@8.12.1) + eslint-visitor-keys: 4.0.0 + espree@9.6.1: dependencies: acorn: 8.12.1 @@ -7946,9 +7589,9 @@ snapshots: dependencies: websocket-driver: 0.7.4 - file-entry-cache@6.0.1: + file-entry-cache@8.0.0: dependencies: - flat-cache: 3.2.0 + flat-cache: 4.0.1 fill-range@4.0.0: dependencies: @@ -7998,11 +7641,10 @@ snapshots: path-exists: 5.0.0 unicorn-magic: 0.1.0 - flat-cache@3.2.0: + flat-cache@4.0.1: dependencies: flatted: 3.3.1 keyv: 4.5.4 - rimraf: 3.0.2 flat@5.0.2: {} @@ -8012,10 +7654,6 @@ snapshots: optionalDependencies: debug: 2.6.9 - for-each@0.3.3: - dependencies: - is-callable: 1.2.7 - for-in@1.0.2: {} foreground-child@3.3.0: @@ -8043,8 +7681,6 @@ snapshots: dependencies: minipass: 3.3.6 - fs.realpath@1.0.0: {} - fsevents@2.3.2: optional: true @@ -8053,15 +7689,6 @@ snapshots: function-bind@1.1.2: {} - function.prototype.name@1.1.6: - dependencies: - call-bind: 1.0.7 - define-properties: 1.2.1 - es-abstract: 1.23.3 - functions-have-names: 1.2.3 - - functions-have-names@1.2.3: {} - gensync@1.0.0-beta.2: {} get-caller-file@2.0.5: {} @@ -8084,12 +7711,6 @@ snapshots: get-stream@8.0.1: {} - get-symbol-description@1.0.2: - dependencies: - call-bind: 1.0.7 - es-errors: 1.3.0 - get-intrinsic: 1.2.4 - get-tsconfig@4.7.6: dependencies: resolve-pkg-maps: 1.0.0 @@ -8159,15 +7780,6 @@ snapshots: package-json-from-dist: 1.0.0 path-scurry: 2.0.0 - glob@7.2.3: - dependencies: - fs.realpath: 1.0.0 - inflight: 1.0.6 - inherits: 2.0.4 - minimatch: 3.1.2 - once: 1.4.0 - path-is-absolute: 1.0.1 - global-directory@4.0.1: dependencies: ini: 4.1.1 @@ -8178,10 +7790,9 @@ snapshots: dependencies: type-fest: 0.20.2 - globalthis@1.0.4: - dependencies: - define-properties: 1.2.1 - gopd: 1.0.1 + globals@14.0.0: {} + + globals@15.9.0: {} globby@11.1.0: dependencies: @@ -8235,8 +7846,6 @@ snapshots: optionalDependencies: uglify-js: 3.19.2 - has-bigints@1.0.2: {} - has-flag@3.0.0: {} has-flag@4.0.0: {} @@ -8249,10 +7858,6 @@ snapshots: has-symbols@1.0.3: {} - has-tostringtag@1.0.2: - dependencies: - has-symbols: 1.0.3 - has-value@0.3.1: dependencies: get-value: 2.0.6 @@ -8402,23 +8007,12 @@ snapshots: index-to-position@0.1.2: {} - inflight@1.0.6: - dependencies: - once: 1.4.0 - wrappy: 1.0.2 - inherits@2.0.3: {} inherits@2.0.4: {} ini@4.1.1: {} - internal-slot@1.0.7: - dependencies: - es-errors: 1.3.0 - hasown: 2.0.2 - side-channel: 1.0.6 - ipaddr.js@1.9.1: {} ipaddr.js@2.2.0: {} @@ -8427,34 +8021,21 @@ snapshots: dependencies: hasown: 2.0.2 - is-array-buffer@3.0.4: + is-alphabetical@1.0.4: {} + + is-alphanumerical@1.0.4: dependencies: - call-bind: 1.0.7 - get-intrinsic: 1.2.4 + is-alphabetical: 1.0.4 + is-decimal: 1.0.4 is-arrayish@0.2.1: {} - is-bigint@1.0.4: - dependencies: - has-bigints: 1.0.2 - is-binary-path@2.1.0: dependencies: binary-extensions: 2.3.0 - is-boolean-object@1.1.2: - dependencies: - call-bind: 1.0.7 - has-tostringtag: 1.0.2 - is-buffer@1.1.6: {} - is-builtin-module@3.2.1: - dependencies: - builtin-modules: 3.3.0 - - is-callable@1.2.7: {} - is-core-module@2.15.0: dependencies: hasown: 2.0.2 @@ -8463,13 +8044,7 @@ snapshots: dependencies: hasown: 2.0.2 - is-data-view@1.0.1: - dependencies: - is-typed-array: 1.1.13 - - is-date-object@1.0.5: - dependencies: - has-tostringtag: 1.0.2 + is-decimal@1.0.4: {} is-descriptor@0.1.7: dependencies: @@ -8503,20 +8078,16 @@ snapshots: dependencies: is-extglob: 2.1.1 + is-hexadecimal@1.0.4: {} + is-inside-container@1.0.0: dependencies: is-docker: 3.0.0 is-interactive@2.0.0: {} - is-negative-zero@2.0.3: {} - is-network-error@1.1.0: {} - is-number-object@1.0.7: - dependencies: - has-tostringtag: 1.0.2 - is-number@3.0.0: dependencies: kind-of: 3.2.2 @@ -8535,43 +8106,18 @@ snapshots: dependencies: isobject: 3.0.1 - is-regex@1.1.4: - dependencies: - call-bind: 1.0.7 - has-tostringtag: 1.0.2 - - is-shared-array-buffer@1.0.3: - dependencies: - call-bind: 1.0.7 - is-stream@2.0.1: {} is-stream@3.0.0: {} - is-string@1.0.7: - dependencies: - has-tostringtag: 1.0.2 - - is-symbol@1.0.4: - dependencies: - has-symbols: 1.0.3 - is-text-path@2.0.0: dependencies: text-extensions: 2.4.0 - is-typed-array@1.1.13: - dependencies: - which-typed-array: 1.1.15 - is-unicode-supported@1.3.0: {} is-unicode-supported@2.0.0: {} - is-weakref@1.0.2: - dependencies: - call-bind: 1.0.7 - is-windows@1.0.2: {} is-wsl@3.1.0: @@ -8580,8 +8126,6 @@ snapshots: isarray@1.0.0: {} - isarray@2.0.5: {} - isexe@2.0.0: {} isobject@2.1.0: @@ -8684,10 +8228,6 @@ snapshots: json-stable-stringify-without-jsonify@1.0.1: {} - json5@1.0.2: - dependencies: - minimist: 1.2.8 - json5@2.2.3: {} jsonc-parser@3.3.1: {} @@ -8910,6 +8450,18 @@ snapshots: punycode.js: 2.3.1 uc.micro: 2.1.0 + mdast-util-from-markdown@0.8.5: + dependencies: + '@types/mdast': 3.0.15 + mdast-util-to-string: 2.0.0 + micromark: 2.11.4 + parse-entities: 2.0.0 + unist-util-stringify-position: 2.0.3 + transitivePeerDependencies: + - supports-color + + mdast-util-to-string@2.0.0: {} + mdn-data@2.0.28: {} mdn-data@2.0.30: {} @@ -8937,6 +8489,13 @@ snapshots: methods@1.1.2: {} + micromark@2.11.4: + dependencies: + debug: 4.3.6 + parse-entities: 2.0.0 + transitivePeerDependencies: + - supports-color + micromatch@3.1.10: dependencies: arr-diff: 4.0.0 @@ -9120,42 +8679,14 @@ snapshots: object-inspect@1.13.2: {} - object-keys@1.1.1: {} - object-visit@1.0.1: dependencies: isobject: 3.0.1 - object.assign@4.1.5: - dependencies: - call-bind: 1.0.7 - define-properties: 1.2.1 - has-symbols: 1.0.3 - object-keys: 1.1.1 - - object.fromentries@2.0.8: - dependencies: - call-bind: 1.0.7 - define-properties: 1.2.1 - es-abstract: 1.23.3 - es-object-atoms: 1.0.0 - - object.groupby@1.0.3: - dependencies: - call-bind: 1.0.7 - define-properties: 1.2.1 - es-abstract: 1.23.3 - object.pick@1.3.0: dependencies: isobject: 3.0.1 - object.values@1.2.0: - dependencies: - call-bind: 1.0.7 - define-properties: 1.2.1 - es-object-atoms: 1.0.0 - obuf@1.1.2: {} ohash@1.1.3: {} @@ -9170,10 +8701,6 @@ snapshots: on-headers@1.0.2: {} - once@1.4.0: - dependencies: - wrappy: 1.0.2 - onetime@5.1.2: dependencies: mimic-fn: 2.1.0 @@ -9247,6 +8774,15 @@ snapshots: dependencies: callsites: 3.1.0 + parse-entities@2.0.0: + dependencies: + character-entities: 1.2.4 + character-entities-legacy: 1.1.4 + character-reference-invalid: 1.1.4 + is-alphanumerical: 1.0.4 + is-decimal: 1.0.4 + is-hexadecimal: 1.0.4 + parse-json@5.2.0: dependencies: '@babel/code-frame': 7.24.7 @@ -9275,8 +8811,6 @@ snapshots: path-exists@5.0.0: {} - path-is-absolute@1.0.1: {} - path-key@3.1.1: {} path-key@4.0.0: {} @@ -9329,8 +8863,6 @@ snapshots: posix-character-classes@0.1.1: {} - possible-typed-array-names@1.0.0: {} - postcss-calc@10.0.1(postcss@8.4.41): dependencies: postcss: 8.4.41 @@ -9535,7 +9067,7 @@ snapshots: prelude-ls@1.2.1: {} - prettier-config-vuepress@4.4.0: {} + prettier-config-vuepress@5.0.0: {} prettier@3.3.3: {} @@ -9623,13 +9155,6 @@ snapshots: extend-shallow: 3.0.2 safe-regex: 1.1.0 - regexp.prototype.flags@1.5.2: - dependencies: - call-bind: 1.0.7 - define-properties: 1.2.1 - es-errors: 1.3.0 - set-function-name: 2.0.2 - relateurl@0.2.7: {} renderkid@3.0.0: @@ -9682,10 +9207,6 @@ snapshots: rfdc@1.4.1: {} - rimraf@3.0.2: - dependencies: - glob: 7.2.3 - rimraf@5.0.10: dependencies: glob: 10.4.5 @@ -9727,23 +9248,10 @@ snapshots: dependencies: tslib: 2.6.3 - safe-array-concat@1.1.2: - dependencies: - call-bind: 1.0.7 - get-intrinsic: 1.2.4 - has-symbols: 1.0.3 - isarray: 2.0.5 - safe-buffer@5.1.2: {} safe-buffer@5.2.1: {} - safe-regex-test@1.0.3: - dependencies: - call-bind: 1.0.7 - es-errors: 1.3.0 - is-regex: 1.1.4 - safe-regex@1.1.0: dependencies: ret: 0.1.15 @@ -9923,13 +9431,6 @@ snapshots: gopd: 1.0.1 has-property-descriptors: 1.0.2 - set-function-name@2.0.2: - dependencies: - define-data-property: 1.1.4 - es-errors: 1.3.0 - functions-have-names: 1.2.3 - has-property-descriptors: 1.0.2 - set-value@2.0.1: dependencies: extend-shallow: 2.0.1 @@ -10096,6 +9597,8 @@ snapshots: sprintf-js@1.0.3: {} + stable-hash@0.0.4: {} + stackback@0.0.2: {} static-extend@0.1.2: @@ -10131,25 +9634,6 @@ snapshots: get-east-asian-width: 1.2.0 strip-ansi: 7.1.0 - string.prototype.trim@1.2.9: - dependencies: - call-bind: 1.0.7 - define-properties: 1.2.1 - es-abstract: 1.23.3 - es-object-atoms: 1.0.0 - - string.prototype.trimend@1.0.8: - dependencies: - call-bind: 1.0.7 - define-properties: 1.2.1 - es-object-atoms: 1.0.0 - - string.prototype.trimstart@1.0.8: - dependencies: - call-bind: 1.0.7 - define-properties: 1.2.1 - es-object-atoms: 1.0.0 - string_decoder@1.1.1: dependencies: safe-buffer: 5.1.2 @@ -10168,8 +9652,6 @@ snapshots: strip-bom-string@1.0.0: {} - strip-bom@3.0.0: {} - strip-final-newline@2.0.0: {} strip-final-newline@3.0.0: {} @@ -10329,14 +9811,7 @@ snapshots: ts-interface-checker@0.1.13: {} - tsconfig-paths@3.15.0: - dependencies: - '@types/json5': 0.0.29 - json5: 1.0.2 - minimist: 1.2.8 - strip-bom: 3.0.0 - - tsconfig-vuepress@4.5.0: {} + tsconfig-vuepress@5.0.0: {} tslib@2.6.3: {} @@ -10382,38 +9857,6 @@ snapshots: media-typer: 0.3.0 mime-types: 2.1.35 - typed-array-buffer@1.0.2: - dependencies: - call-bind: 1.0.7 - es-errors: 1.3.0 - is-typed-array: 1.1.13 - - typed-array-byte-length@1.0.1: - dependencies: - call-bind: 1.0.7 - for-each: 0.3.3 - gopd: 1.0.1 - has-proto: 1.0.3 - is-typed-array: 1.1.13 - - typed-array-byte-offset@1.0.2: - dependencies: - available-typed-arrays: 1.0.7 - call-bind: 1.0.7 - for-each: 0.3.3 - gopd: 1.0.1 - has-proto: 1.0.3 - is-typed-array: 1.1.13 - - typed-array-length@1.0.6: - dependencies: - call-bind: 1.0.7 - for-each: 0.3.3 - gopd: 1.0.1 - has-proto: 1.0.3 - is-typed-array: 1.1.13 - possible-typed-array-names: 1.0.0 - typescript@5.5.4: {} uc.micro@2.1.0: {} @@ -10423,13 +9866,6 @@ snapshots: uglify-js@3.19.2: optional: true - unbox-primitive@1.0.2: - dependencies: - call-bind: 1.0.7 - has-bigints: 1.0.2 - has-symbols: 1.0.3 - which-boxed-primitive: 1.0.2 - undici-types@6.18.2: {} unicorn-magic@0.1.0: {} @@ -10441,6 +9877,10 @@ snapshots: is-extendable: 0.1.1 set-value: 2.0.1 + unist-util-stringify-position@2.0.3: + dependencies: + '@types/unist': 2.0.11 + universalify@2.0.1: {} unpipe@1.0.0: {} @@ -10489,7 +9929,7 @@ snapshots: debug: 4.3.6 pathe: 1.1.2 tinyrainbow: 1.2.0 - vite: 5.4.0(@types/node@22.3.0)(lightningcss@1.26.0)(sass-embedded@1.77.8)(sass@1.77.8)(terser@5.31.6) + vite: 5.4.1(@types/node@22.3.0)(lightningcss@1.26.0)(sass-embedded@1.77.8)(sass@1.77.8)(terser@5.31.6) transitivePeerDependencies: - '@types/node' - less @@ -10501,7 +9941,7 @@ snapshots: - supports-color - terser - vite@5.4.0(@types/node@22.3.0)(lightningcss@1.26.0)(sass-embedded@1.77.8)(sass@1.77.8)(terser@5.31.6): + vite@5.4.1(@types/node@22.3.0)(lightningcss@1.26.0)(sass-embedded@1.77.8)(sass@1.77.8)(terser@5.31.6): dependencies: esbuild: 0.21.5 postcss: 8.4.41 @@ -10532,7 +9972,7 @@ snapshots: tinybench: 2.9.0 tinypool: 1.0.0 tinyrainbow: 1.2.0 - vite: 5.4.0(@types/node@22.3.0)(lightningcss@1.26.0)(sass-embedded@1.77.8)(sass@1.77.8)(terser@5.31.6) + vite: 5.4.1(@types/node@22.3.0)(lightningcss@1.26.0)(sass-embedded@1.77.8)(sass@1.77.8)(terser@5.31.6) vite-node: 2.0.5(@types/node@22.3.0)(lightningcss@1.26.0)(sass-embedded@1.77.8)(sass@1.77.8)(terser@5.31.6) why-is-node-running: 2.3.0 optionalDependencies: @@ -10549,10 +9989,10 @@ snapshots: vscode-uri@3.0.8: {} - vue-eslint-parser@9.4.3(eslint@8.57.0): + vue-eslint-parser@9.4.3(eslint@9.9.0(jiti@1.21.6)): dependencies: debug: 4.3.6 - eslint: 8.57.0 + eslint: 9.9.0(jiti@1.21.6) eslint-scope: 7.2.2 eslint-visitor-keys: 3.4.3 espree: 9.6.1 @@ -10562,19 +10002,19 @@ snapshots: transitivePeerDependencies: - supports-color - vue-loader@17.4.2(vue@3.4.37(typescript@5.5.4))(webpack@5.93.0(esbuild@0.23.0)): + vue-loader@17.4.2(vue@3.4.38(typescript@5.5.4))(webpack@5.93.0(esbuild@0.23.0)): dependencies: chalk: 4.1.2 hash-sum: 2.0.0 watchpack: 2.4.2 webpack: 5.93.0(esbuild@0.23.0) optionalDependencies: - vue: 3.4.37(typescript@5.5.4) + vue: 3.4.38(typescript@5.5.4) - vue-router@4.4.3(vue@3.4.37(typescript@5.5.4)): + vue-router@4.4.3(vue@3.4.38(typescript@5.5.4)): dependencies: '@vue/devtools-api': 6.6.3 - vue: 3.4.37(typescript@5.5.4) + vue: 3.4.38(typescript@5.5.4) vue-tsc@2.0.29(typescript@5.5.4): dependencies: @@ -10583,13 +10023,13 @@ snapshots: semver: 7.6.3 typescript: 5.5.4 - vue@3.4.37(typescript@5.5.4): + vue@3.4.38(typescript@5.5.4): dependencies: - '@vue/compiler-dom': 3.4.37 - '@vue/compiler-sfc': 3.4.37 - '@vue/runtime-dom': 3.4.37 - '@vue/server-renderer': 3.4.37(vue@3.4.37(typescript@5.5.4)) - '@vue/shared': 3.4.37 + '@vue/compiler-dom': 3.4.38 + '@vue/compiler-sfc': 3.4.38 + '@vue/runtime-dom': 3.4.38 + '@vue/server-renderer': 3.4.38(vue@3.4.38(typescript@5.5.4)) + '@vue/shared': 3.4.38 optionalDependencies: typescript: 5.5.4 @@ -10718,22 +10158,6 @@ snapshots: tr46: 1.0.1 webidl-conversions: 4.0.2 - which-boxed-primitive@1.0.2: - dependencies: - is-bigint: 1.0.4 - is-boolean-object: 1.1.2 - is-number-object: 1.0.7 - is-string: 1.0.7 - is-symbol: 1.0.4 - - which-typed-array@1.1.15: - dependencies: - available-typed-arrays: 1.0.7 - call-bind: 1.0.7 - for-each: 0.3.3 - gopd: 1.0.1 - has-tostringtag: 1.0.2 - which@2.0.2: dependencies: isexe: 2.0.0 @@ -10767,8 +10191,6 @@ snapshots: string-width: 7.2.0 strip-ansi: 7.1.0 - wrappy@1.0.2: {} - ws@8.18.0: {} xml-name-validator@4.0.0: {} diff --git a/vitest.config.ts b/vitest.config.ts index 07cc14ea8d..71f9ca68b4 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -7,8 +7,9 @@ const getSubDirectories = (dir: string): string[] => fs .readdirSync(dir) .filter((item) => fs.statSync(path.join(dir, item)).isDirectory()) -const root = path.dirname(fileURLToPath(import.meta.url)) -const packages = getSubDirectories(path.resolve(root, 'packages')).filter( + +const ROOT = path.dirname(fileURLToPath(import.meta.url)) +const PACKAGES = getSubDirectories(path.resolve(ROOT, 'packages')).filter( (item) => item !== 'vuepress', ) @@ -16,8 +17,8 @@ export default defineConfig({ resolve: { alias: [ { - find: new RegExp(`^@vuepress/(${packages.join('|')})$`), - replacement: path.resolve(root, './packages/$1/src/index.ts'), + find: new RegExp(`^@vuepress/(${PACKAGES.join('|')})$`), + replacement: path.resolve(ROOT, './packages/$1/src/index.ts'), }, ], }, From f1d5b3775ad9c41bc6d7efe589980bb65a0b96e7 Mon Sep 17 00:00:00 2001 From: meteorlxy Date: Thu, 15 Aug 2024 23:11:18 +0800 Subject: [PATCH 02/12] chore: updates --- packages/client/src/components/AutoLink.ts | 2 +- pnpm-lock.yaml | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/client/src/components/AutoLink.ts b/packages/client/src/components/AutoLink.ts index 94daedc223..948a39e066 100644 --- a/packages/client/src/components/AutoLink.ts +++ b/packages/client/src/components/AutoLink.ts @@ -134,7 +134,7 @@ export const AutoLink = defineComponent({ return () => { const { before, after, default: defaultSlot } = slots - const content = defaultSlot?.(config.value) || [ + const content = defaultSlot?.(config.value) ?? [ before?.(config.value), config.value.text, after?.(config.value), diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 937766ad8b..aa445a21ea 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -993,8 +993,8 @@ packages: '@mdit-vue/types@2.1.0': resolution: {integrity: sha512-TMBB/BQWVvwtpBdWD75rkZx4ZphQ6MN0O4QB2Bc0oI5PC2uE57QerhNxdRZ7cvBHE2iY2C+BUNUziCfJbjIRRA==} - '@meteorlxy/eslint-config@4.2.0': - resolution: {integrity: sha512-G8K9Is7bkG0d/eumMxWOS86C2w7ulaAlVM1p2bja3NAgCmwQqeOiGsYrsmrhLhGO/H/rb2c9gRnxZ7WbApM+PQ==} + '@meteorlxy/eslint-config@4.2.1': + resolution: {integrity: sha512-uiqEsyMVlbtIJj8oDHs+J51kKqPLijp46PWzkeRjcqHo/4ERtuTKYVvWtjRkmYkfE9XdL5EJvTE+NQsnSormrQ==} peerDependencies: eslint-plugin-react: ^7.35.0 eslint-plugin-react-hooks: ^4.6.2 @@ -5748,7 +5748,7 @@ snapshots: '@mdit-vue/types@2.1.0': {} - '@meteorlxy/eslint-config@4.2.0(eslint-plugin-vue@9.27.0(eslint@9.9.0(jiti@1.21.6)))(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4)(vue-eslint-parser@9.4.3(eslint@9.9.0(jiti@1.21.6)))': + '@meteorlxy/eslint-config@4.2.1(eslint-plugin-vue@9.27.0(eslint@9.9.0(jiti@1.21.6)))(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4)(vue-eslint-parser@9.4.3(eslint@9.9.0(jiti@1.21.6)))': dependencies: '@typescript-eslint/eslint-plugin': 8.1.0(@typescript-eslint/parser@8.1.0(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4))(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4) '@typescript-eslint/parser': 8.1.0(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4) @@ -7305,7 +7305,7 @@ snapshots: eslint-config-vuepress@5.1.0(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4)(vue-eslint-parser@9.4.3(eslint@9.9.0(jiti@1.21.6))): dependencies: - '@meteorlxy/eslint-config': 4.2.0(eslint-plugin-vue@9.27.0(eslint@9.9.0(jiti@1.21.6)))(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4)(vue-eslint-parser@9.4.3(eslint@9.9.0(jiti@1.21.6))) + '@meteorlxy/eslint-config': 4.2.1(eslint-plugin-vue@9.27.0(eslint@9.9.0(jiti@1.21.6)))(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4)(vue-eslint-parser@9.4.3(eslint@9.9.0(jiti@1.21.6))) '@typescript-eslint/utils': 8.1.0(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4) eslint-plugin-vue: 9.27.0(eslint@9.9.0(jiti@1.21.6)) transitivePeerDependencies: From b4679c530bf04fe030766ae2e195820289465da7 Mon Sep 17 00:00:00 2001 From: meteorlxy Date: Thu, 15 Aug 2024 23:15:04 +0800 Subject: [PATCH 03/12] chore: updates --- .../plugins/importCodePlugin/createImportCodeBlockRule.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/markdown/src/plugins/importCodePlugin/createImportCodeBlockRule.ts b/packages/markdown/src/plugins/importCodePlugin/createImportCodeBlockRule.ts index c658f2ee73..34521c8165 100644 --- a/packages/markdown/src/plugins/importCodePlugin/createImportCodeBlockRule.ts +++ b/packages/markdown/src/plugins/importCodePlugin/createImportCodeBlockRule.ts @@ -48,7 +48,13 @@ export const createImportCodeBlockRule = // return true as we have matched the syntax if (silent) return true - const { info, importPath } = match.groups + const { info, importPath } = match.groups as { + lineSingle?: string + lineStart?: string + lineEnd?: string + info?: string + importPath: string + } const lineSingle = parseLineNumber(match.groups.lineSingle) const lineStart = lineSingle ?? parseLineNumber(match.groups.lineStart) ?? 0 From ff32bf3cb79a2f49da0b12a0e9aa0b08823da17d Mon Sep 17 00:00:00 2001 From: meteorlxy Date: Thu, 15 Aug 2024 23:49:19 +0800 Subject: [PATCH 04/12] chore: updates --- e2e/tests/router/resolve-route.spec.ts | 12 ++- eslint.config.js | 13 ++- .../resolveUserConfigConventionalPath.spec.ts | 4 +- .../config/resolveUserConfigPath.spec.ts | 1 - packages/core/tests/app/resolveAppEnv.spec.ts | 25 +++--- .../core/tests/page/inferPagePath.spec.ts | 13 +-- .../core/tests/page/resolvePageDate.spec.ts | 4 +- .../tests/page/resolvePageHtmlInfo.spec.ts | 9 ++- .../core/tests/page/resolvePageLang.spec.ts | 5 +- .../core/tests/page/resolvePagePath.spec.ts | 8 +- .../tests/pluginApi/createPluginApi.spec.ts | 6 +- .../normalizeAliasDefineHook.spec.ts | 16 ++-- .../normalizeClientFilesHook.spec.ts | 22 +++--- .../tests/plugins/assetsPlugin.spec.ts | 43 +++++----- .../tests/plugins/importCodePlugin.spec.ts | 79 +++++++++---------- .../shared/tests/ensureEndingSlash.spec.ts | 4 +- .../shared/tests/ensureLeadingSlash.spec.ts | 4 +- .../shared/tests/formatDateString.spec.ts | 8 +- .../tests/routes/inferRoutePath.spec.ts | 8 +- .../tests/routes/normalizeRoutePath.spec.ts | 8 +- .../tests/routes/resolveLocalePath.spec.ts | 4 +- packages/shared/tests/typeGuards.spec.ts | 4 +- packages/utils/tests/console/logger.spec.ts | 1 - 23 files changed, 153 insertions(+), 148 deletions(-) diff --git a/e2e/tests/router/resolve-route.spec.ts b/e2e/tests/router/resolve-route.spec.ts index 10cf9799c1..bad4350843 100644 --- a/e2e/tests/router/resolve-route.spec.ts +++ b/e2e/tests/router/resolve-route.spec.ts @@ -1,6 +1,6 @@ import { expect, test } from '@playwright/test' -const testCases = [ +const TEST_CASES = [ { selector: '#index', expected: { @@ -54,13 +54,19 @@ const testCases = [ test('should resolve routes correctly', async ({ page }) => { await page.goto('router/resolve-route.html') - for (const { selector, expected } of testCases) { + for (const { selector, expected } of TEST_CASES) { const listItemsLocator = await page .locator(`.e2e-theme-content ${selector} + ul > li`) .all() for (const li of listItemsLocator) { const textContent = await li.textContent() - const resolvedRoute = JSON.parse(/: (\{.*\})\s*$/.exec(textContent!)![1]) + const resolvedRoute = JSON.parse( + /: (\{.*\})\s*$/.exec(textContent!)![1], + ) as { + path: string + meta: Record + notFound: boolean + } expect(resolvedRoute.path).toEqual(expected.path) expect(resolvedRoute.meta).toStrictEqual(expected.meta) expect(resolvedRoute.notFound).toEqual(expected.notFound) diff --git a/eslint.config.js b/eslint.config.js index edb6b9af1f..115d6c4386 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -31,11 +31,10 @@ export default vuepress( }, }, }, - // { - // files: ['**/tests/**/*.ts', 'e2e/**/*.ts', 'tsup.config.ts'], - // rules: { - // '@typescript-eslint/explicit-function-return-type': 'off', - // 'vue/one-component-per-file': 'off', - // }, - // }, + { + files: ['**/*.spec.ts'], + rules: { + 'no-console': 'off', + }, + }, ) diff --git a/packages/cli/tests/config/resolveUserConfigConventionalPath.spec.ts b/packages/cli/tests/config/resolveUserConfigConventionalPath.spec.ts index f74b1f1d20..808ac4ec19 100644 --- a/packages/cli/tests/config/resolveUserConfigConventionalPath.spec.ts +++ b/packages/cli/tests/config/resolveUserConfigConventionalPath.spec.ts @@ -5,7 +5,7 @@ import { resolveUserConfigConventionalPath } from '../../src/index.js' const resolveFixtures = (str: string): string => path.resolve(__dirname, '../__fixtures__/config/convention', str) -const testCases: [string, string][] = [ +const TEST_CASES: [string, string][] = [ [resolveFixtures('case1'), 'vuepress.config.ts'], [resolveFixtures('case2'), '.vuepress/config.ts'], [resolveFixtures('case3'), 'vuepress.config.js'], @@ -16,7 +16,7 @@ const testCases: [string, string][] = [ describe('cli > config > resolveUserConfigConventionalPath', () => { describe('should resolve conventional config file correctly', () => { - testCases.forEach(([source, expected]) => { + TEST_CASES.forEach(([source, expected]) => { it(expected, () => { const configFile = resolveUserConfigConventionalPath(source, source) expect(configFile).toEqual(path.resolve(source, expected)) diff --git a/packages/cli/tests/config/resolveUserConfigPath.spec.ts b/packages/cli/tests/config/resolveUserConfigPath.spec.ts index 150cadd2aa..4fdc25f309 100644 --- a/packages/cli/tests/config/resolveUserConfigPath.spec.ts +++ b/packages/cli/tests/config/resolveUserConfigPath.spec.ts @@ -1,4 +1,3 @@ -/* eslint-disable no-console */ import { path } from '@vuepress/utils' import { describe, expect, it, vi } from 'vitest' import { resolveUserConfigPath } from '../../src/index.js' diff --git a/packages/core/tests/app/resolveAppEnv.spec.ts b/packages/core/tests/app/resolveAppEnv.spec.ts index bcdb45210d..13926aaa5d 100644 --- a/packages/core/tests/app/resolveAppEnv.spec.ts +++ b/packages/core/tests/app/resolveAppEnv.spec.ts @@ -1,18 +1,17 @@ import { describe, expect, it } from 'vitest' +import type { Bundler, Theme } from '../../src/index.js' import { resolveAppEnv, resolveAppOptions } from '../../src/index.js' -const source = '/foo' - -const testCases: [ +const TEST_CASES: [ Parameters, ReturnType, ][] = [ [ [ resolveAppOptions({ - source, - theme: { name: 'test' }, - bundler: {} as any, + source: '/foo', + theme: { name: 'test' } as Theme, + bundler: {} as Bundler, }), false, ], @@ -25,9 +24,9 @@ const testCases: [ [ [ resolveAppOptions({ - source, - theme: { name: 'test' }, - bundler: {} as any, + source: '/foo', + theme: { name: 'test' } as Theme, + bundler: {} as Bundler, debug: true, }), false, @@ -41,9 +40,9 @@ const testCases: [ [ [ resolveAppOptions({ - source, - theme: { name: 'test' }, - bundler: {} as any, + source: '/foo', + theme: { name: 'test' } as Theme, + bundler: {} as Bundler, }), true, ], @@ -57,7 +56,7 @@ const testCases: [ describe('core > app > resolveAppEnv', () => { describe('should create app env correctly', () => { - testCases.forEach(([params, expected], i) => { + TEST_CASES.forEach(([params, expected], i) => { it(`case ${i}`, () => { expect(resolveAppEnv(...params)).toEqual(expected) }) diff --git a/packages/core/tests/page/inferPagePath.spec.ts b/packages/core/tests/page/inferPagePath.spec.ts index 5f34327047..887fb496c5 100644 --- a/packages/core/tests/page/inferPagePath.spec.ts +++ b/packages/core/tests/page/inferPagePath.spec.ts @@ -1,11 +1,12 @@ import { path } from '@vuepress/utils' import { describe, expect, it } from 'vitest' +import type { Bundler, Theme } from '../../src/index.js' import { createBaseApp, inferPagePath } from '../../src/index.js' const app = createBaseApp({ source: path.resolve(__dirname, 'fake-source'), - theme: { name: 'test' }, - bundler: {} as any, + theme: { name: 'test' } as Theme, + bundler: {} as Bundler, locales: { '/': {}, '/en/': {}, @@ -15,11 +16,11 @@ const app = createBaseApp({ }) const appWithoutLocales = createBaseApp({ source: path.resolve(__dirname, 'fake-source'), - theme: { name: 'test' }, - bundler: {} as any, + theme: { name: 'test' } as Theme, + bundler: {} as Bundler, }) -const testCases: [string, ReturnType][] = [ +const TEST_CASES: [string, ReturnType][] = [ [ 'foo.md', { @@ -52,7 +53,7 @@ const testCases: [string, ReturnType][] = [ describe('core > page > inferPagePath', () => { describe('should infer page path according to relative path of page file', () => { - testCases.forEach(([source, expected]) => { + TEST_CASES.forEach(([source, expected]) => { it(JSON.stringify(source), () => { expect( inferPagePath({ diff --git a/packages/core/tests/page/resolvePageDate.spec.ts b/packages/core/tests/page/resolvePageDate.spec.ts index 35ef7b3084..4ea6d358ca 100644 --- a/packages/core/tests/page/resolvePageDate.spec.ts +++ b/packages/core/tests/page/resolvePageDate.spec.ts @@ -1,7 +1,7 @@ import { describe, expect, it } from 'vitest' import { resolvePageDate } from '../../src/index.js' -const testCases: [ +const TEST_CASES: [ Parameters, ReturnType, ][] = [ @@ -149,7 +149,7 @@ const testCases: [ describe('core > page > resolvePageDate', () => { describe('should resolve page date correctly', () => { - testCases.forEach(([source, expected]) => { + TEST_CASES.forEach(([source, expected]) => { it(`raw: ${JSON.stringify(source)}`, () => { expect(resolvePageDate(...source)).toEqual(expected) }) diff --git a/packages/core/tests/page/resolvePageHtmlInfo.spec.ts b/packages/core/tests/page/resolvePageHtmlInfo.spec.ts index 58042587be..498fe9b717 100644 --- a/packages/core/tests/page/resolvePageHtmlInfo.spec.ts +++ b/packages/core/tests/page/resolvePageHtmlInfo.spec.ts @@ -1,14 +1,15 @@ import { path } from '@vuepress/utils' import { describe, expect, it } from 'vitest' +import type { Bundler, Theme } from '../../src/index.js' import { createBaseApp, resolvePageHtmlInfo } from '../../src/index.js' const app = createBaseApp({ source: path.resolve(__dirname, 'fake-source'), - theme: { name: 'test' }, - bundler: {} as any, + theme: { name: 'test' } as Theme, + bundler: {} as Bundler, }) -const testCases: [string, string][] = [ +const TEST_CASES: [string, string][] = [ ['/foo', 'foo.html'], ['/foo.html', 'foo.html'], ['/foo/bar.html', 'foo/bar.html'], @@ -21,7 +22,7 @@ const testCases: [string, string][] = [ describe('core > page > resolvePageHtmlInfo', () => { describe('should resolve page html file path correctly', () => { - testCases.forEach(([source, expected]) => { + TEST_CASES.forEach(([source, expected]) => { it(JSON.stringify(source), () => { expect( resolvePageHtmlInfo({ diff --git a/packages/core/tests/page/resolvePageLang.spec.ts b/packages/core/tests/page/resolvePageLang.spec.ts index 818e561167..ebf5f19e29 100644 --- a/packages/core/tests/page/resolvePageLang.spec.ts +++ b/packages/core/tests/page/resolvePageLang.spec.ts @@ -1,11 +1,12 @@ import { path } from '@vuepress/utils' import { describe, expect, it } from 'vitest' +import type { Bundler, Theme } from '../../src/index.js' import { createBaseApp, resolvePageLang } from '../../src/index.js' const app = createBaseApp({ source: path.resolve(__dirname, 'fake-source'), - theme: { name: 'test' }, - bundler: {} as any, + theme: { name: 'test' } as Theme, + bundler: {} as Bundler, lang: 'site-lang', locales: { '/': { diff --git a/packages/core/tests/page/resolvePagePath.spec.ts b/packages/core/tests/page/resolvePagePath.spec.ts index 1ca68d2d65..9251721afc 100644 --- a/packages/core/tests/page/resolvePagePath.spec.ts +++ b/packages/core/tests/page/resolvePagePath.spec.ts @@ -1,7 +1,7 @@ import { describe, expect, it, vi } from 'vitest' import { resolvePagePath } from '../../src/index.js' -const testCases: [ +const TEST_CASES: [ Parameters, ReturnType, ][] = [ @@ -98,14 +98,14 @@ const testCases: [ describe('core > page > resolvePagePath', () => { describe('should resolve page path correctly', () => { - testCases.forEach(([input, expected]) => { - it(`input: ${JSON.stringify(input)}`, async () => { + TEST_CASES.forEach(([input, expected]) => { + it(`input: ${JSON.stringify(input)}`, () => { expect(resolvePagePath(...input)).toEqual(expected) }) }) }) - it('should throw an error', async () => { + it('should throw an error', () => { const consoleError = console.error console.error = vi.fn() diff --git a/packages/core/tests/pluginApi/createPluginApi.spec.ts b/packages/core/tests/pluginApi/createPluginApi.spec.ts index 864a696992..c1f8aa2e38 100644 --- a/packages/core/tests/pluginApi/createPluginApi.spec.ts +++ b/packages/core/tests/pluginApi/createPluginApi.spec.ts @@ -1,12 +1,12 @@ import { path } from '@vuepress/utils' import { describe, expect, it, vi } from 'vitest' +import type { Bundler, HooksName, Theme } from '../../src/index.js' import { createBaseApp, createPluginApi } from '../../src/index.js' -import type { HooksName } from '../../src/index.js' const app = createBaseApp({ source: path.resolve(__dirname, 'fake-source'), - theme: { name: 'test' }, - bundler: {} as any, + theme: { name: 'test' } as Theme, + bundler: {} as Bundler, }) describe('core > pluginApi > createPluginApi', () => { diff --git a/packages/core/tests/pluginApi/normalizeAliasDefineHook.spec.ts b/packages/core/tests/pluginApi/normalizeAliasDefineHook.spec.ts index 89b19fee84..cb6b62f164 100644 --- a/packages/core/tests/pluginApi/normalizeAliasDefineHook.spec.ts +++ b/packages/core/tests/pluginApi/normalizeAliasDefineHook.spec.ts @@ -1,20 +1,22 @@ import { path } from '@vuepress/utils' import { describe, expect, it, vi } from 'vitest' +import type { AliasDefineHook, Bundler, Theme } from '../../src/index.js' import { createBaseApp, normalizeAliasDefineHook } from '../../src/index.js' -import type { AliasDefineHook } from '../../src/index.js' const app = createBaseApp({ source: path.resolve(__dirname, 'fake-source'), - theme: { name: 'test' }, - bundler: {} as any, + theme: { name: 'test' } as Theme, + bundler: {} as Bundler, }) describe('core > pluginApi > normalizeAliasDefineHook', () => { it('should keep function as is', async () => { - const rawHook: AliasDefineHook['exposed'] = vi.fn((app, isServer) => ({ - foo: 'bar', - isServer, - })) + const rawHook: AliasDefineHook['exposed'] = vi.fn( + (_app, isServer: boolean) => ({ + foo: 'bar', + isServer, + }), + ) const normalizedHook = normalizeAliasDefineHook(rawHook) expect(await normalizedHook(app, true)).toEqual({ foo: 'bar', diff --git a/packages/core/tests/pluginApi/normalizeClientFilesHook.spec.ts b/packages/core/tests/pluginApi/normalizeClientFilesHook.spec.ts index 835fdd28b9..9a4141b1c0 100644 --- a/packages/core/tests/pluginApi/normalizeClientFilesHook.spec.ts +++ b/packages/core/tests/pluginApi/normalizeClientFilesHook.spec.ts @@ -1,21 +1,21 @@ import { path } from '@vuepress/utils' import { describe, expect, it, vi } from 'vitest' +import type { Bundler, ClientConfigFileHook, Theme } from '../../src/index.js' import { createBaseApp, normalizeClientConfigFileHook, } from '../../src/index.js' -import type { ClientConfigFileHook } from '../../src/index.js' const app = createBaseApp({ source: path.resolve(__dirname, 'fake-source'), - theme: { name: 'test' }, - bundler: {} as any, + theme: { name: 'test' } as Theme, + bundler: {} as Bundler, }) -const clientConfigFile = path.resolve( +const CLIENT_CONFIG_FILE = path.resolve( __dirname, '../__fixtures__/clientConfigs/clientConfig.ts', ) -const clientConfigFileNonExistent = path.resolve( +const CLIENT_CONFIG_FILE_NON_EXISTENT = path.resolve( __dirname, '../__fixtures__/clientConfigs/non-existent.ts', ) @@ -24,10 +24,10 @@ describe('core > pluginApi > normalizeClientConfigFileHook', () => { describe('should keep function as is', () => { it('return value is string', async () => { const rawHook: ClientConfigFileHook['exposed'] = vi.fn( - () => clientConfigFile, + () => CLIENT_CONFIG_FILE, ) const normalizedHook = normalizeClientConfigFileHook(rawHook) - expect(await normalizedHook(app)).toEqual(clientConfigFile) + expect(await normalizedHook(app)).toEqual(CLIENT_CONFIG_FILE) expect(rawHook).toHaveBeenCalledTimes(1) expect(rawHook).toHaveBeenCalledWith(app) }) @@ -37,7 +37,7 @@ describe('core > pluginApi > normalizeClientConfigFileHook', () => { console.error = vi.fn() const rawHook: ClientConfigFileHook['exposed'] = - clientConfigFileNonExistent + CLIENT_CONFIG_FILE_NON_EXISTENT const normalizedHook = normalizeClientConfigFileHook(rawHook) await expect(normalizedHook(app)).rejects.toThrow() expect(console.error).toHaveBeenCalled() @@ -48,9 +48,9 @@ describe('core > pluginApi > normalizeClientConfigFileHook', () => { describe('should wrap raw value with a function', () => { it('value is string', async () => { - const rawHook: ClientConfigFileHook['exposed'] = clientConfigFile + const rawHook: ClientConfigFileHook['exposed'] = CLIENT_CONFIG_FILE const normalizedHook = normalizeClientConfigFileHook(rawHook) - expect(await normalizedHook(app)).toEqual(clientConfigFile) + expect(await normalizedHook(app)).toEqual(CLIENT_CONFIG_FILE) }) it('should throw an error if file does not exist', async () => { @@ -58,7 +58,7 @@ describe('core > pluginApi > normalizeClientConfigFileHook', () => { console.error = vi.fn() const rawHook: ClientConfigFileHook['exposed'] = - clientConfigFileNonExistent + CLIENT_CONFIG_FILE_NON_EXISTENT const normalizedHook = normalizeClientConfigFileHook(rawHook) await expect(normalizedHook(app)).rejects.toThrow() expect(console.error).toHaveBeenCalled() diff --git a/packages/markdown/tests/plugins/assetsPlugin.spec.ts b/packages/markdown/tests/plugins/assetsPlugin.spec.ts index fa69f7e25c..af149f84d9 100644 --- a/packages/markdown/tests/plugins/assetsPlugin.spec.ts +++ b/packages/markdown/tests/plugins/assetsPlugin.spec.ts @@ -1,7 +1,7 @@ import MarkdownIt from 'markdown-it' import { describe, expect, it } from 'vitest' -import { assetsPlugin } from '../../src/index.js' import type { MarkdownEnv } from '../../src/index.js' +import { assetsPlugin } from '../../src/index.js' describe('@vuepress/markdown > plugins > assetsPlugin', () => { describe('markdown image syntax', () => { @@ -38,7 +38,7 @@ describe('@vuepress/markdown > plugins > assetsPlugin', () => { '![data-uri](data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+P+/HgAFhAJ/wr4H/wAAAABJRU5ErkJggg==)', ] - const testCases: { + const TEST_CASES: { description: string md: MarkdownIt env: MarkdownEnv @@ -207,13 +207,13 @@ describe('@vuepress/markdown > plugins > assetsPlugin', () => { }, ] - testCases.forEach(({ description, md, env, expected }) => + TEST_CASES.forEach(({ description, md, env, expected }) => { it(description, () => { expect(md.render(source.join('\n\n'), env)).toEqual( - expected.map((item) => `

${item}

`).join('\n') + '\n', + `${expected.map((item) => `

${item}

`).join('\n')}\n`, ) - }), - ) + }) + }) }) describe('html tag', () => { @@ -292,7 +292,7 @@ describe('@vuepress/markdown > plugins > assetsPlugin', () => { '', ] - const testCases: { + const TEST_CASES: { description: string md: MarkdownIt env: MarkdownEnv @@ -541,11 +541,11 @@ describe('@vuepress/markdown > plugins > assetsPlugin', () => { }, ] - testCases.forEach(({ description, md, env, expected }) => + TEST_CASES.forEach(({ description, md, env, expected }) => { it(description, () => { // block expect(md.render(source.join('\n\n'), env)).toEqual( - expected.map((item) => `${item}`).join('\n'), + expected.map((item) => item).join('\n'), ) // block with leading white space @@ -557,14 +557,14 @@ describe('@vuepress/markdown > plugins > assetsPlugin', () => { expect( md.render(source.map((item) => `foo${item}`).join('\n\n'), env), ).toEqual( - expected.map((item) => `

foo${item}

`).join('\n') + '\n', + `${expected.map((item) => `

foo${item}

`).join('\n')}\n`, ) // inline with suffix expect( md.render(source.map((item) => `${item}foo`).join('\n\n'), env), ).toEqual( - expected.map((item) => `

${item}foo

`).join('\n') + '\n', + `${expected.map((item) => `

${item}foo

`).join('\n')}\n`, ) // inline with line break @@ -574,9 +574,9 @@ describe('@vuepress/markdown > plugins > assetsPlugin', () => { env, ), ).toEqual( - expected + `${expected .map((item) => `

${item.replace('`) - .join('\n') + '\n', + .join('\n')}\n`, ) // wrapped item @@ -619,8 +619,8 @@ describe('@vuepress/markdown > plugins > assetsPlugin', () => { .map((item) => `

\n\n${item}\n${item}\n\n

`) .join('\n'), ) - }), - ) + }) + }) }) // multi-line `` tag will be wrapped with `

` tag @@ -648,7 +648,7 @@ describe('@vuepress/markdown > plugins > assetsPlugin', () => { ,default.png " width="100px">`, ] - const testCases: { + const TEST_CASES: { description: string md: MarkdownIt env: MarkdownEnv @@ -714,21 +714,20 @@ describe('@vuepress/markdown > plugins > assetsPlugin', () => { }, ] - testCases.forEach(({ description, md, env, expected }) => + TEST_CASES.forEach(({ description, md, env, expected }) => { it(description, () => { // double quote expect(md.render(source.join('\n\n'), env)).toEqual( - expected.map((item) => `${item}`).join('\n') + '\n', + `${expected.map((item) => item).join('\n')}\n`, ) // single quote expect( md.render(source.join('\n\n').replace(/"/g, "'"), env), ).toEqual( - expected.map((item) => `${item}`.replace(/"/g, "'")).join('\n') + - '\n', + `${expected.map((item) => item.replace(/"/g, "'")).join('\n')}\n`, ) - }), - ) + }) + }) }) }) }) diff --git a/packages/markdown/tests/plugins/importCodePlugin.spec.ts b/packages/markdown/tests/plugins/importCodePlugin.spec.ts index 37beda1faa..08c1d481f7 100644 --- a/packages/markdown/tests/plugins/importCodePlugin.spec.ts +++ b/packages/markdown/tests/plugins/importCodePlugin.spec.ts @@ -1,4 +1,3 @@ -/* eslint-disable no-console */ import { fs, path } from '@vuepress/utils' import MarkdownIt from 'markdown-it' import { @@ -13,12 +12,12 @@ import { import type { MarkdownEnv } from '../../src/index.js' import { importCodePlugin, vPrePlugin } from '../../src/index.js' -const jsFixturePathRelative = '../__fixtures__/importCode.js' -const mdFixturePathRelative = '../__fixtures__/importCode.md' -const jsFixturePath = path.resolve(__dirname, jsFixturePathRelative) -const mdFixturePath = path.resolve(__dirname, mdFixturePathRelative) -const jsFixtureContent = fs.readFileSync(jsFixturePath).toString() -const mdFixtureContent = fs.readFileSync(mdFixturePath).toString() +const JS_FIXTURE_PATH_RELATIVE = '../__fixtures__/importCode.js' +const MD_FIXTURE_PATH_RELATIVE = '../__fixtures__/importCode.md' +const JS_FIXTURE_PATH = path.resolve(__dirname, JS_FIXTURE_PATH_RELATIVE) +const MD_FIXTURE_PATH = path.resolve(__dirname, MD_FIXTURE_PATH_RELATIVE) +const JS_FIXTURE_CONTENT = fs.readFileSync(JS_FIXTURE_PATH).toString() +const MD_FIXTURE_CONTENT = fs.readFileSync(MD_FIXTURE_PATH).toString() const consoleError = console.error const mockConsoleError = vi.fn() @@ -61,16 +60,16 @@ describe('@vuepress/markdown > plugins > importCodePlugin', () => { describe('lines range', () => { it('should import all lines', () => { const source = `\ -@[code](${jsFixturePathRelative}) -@[code](${mdFixturePathRelative}) +@[code](${JS_FIXTURE_PATH_RELATIVE}) +@[code](${MD_FIXTURE_PATH_RELATIVE}) ` const expected = `\

\
-${jsFixtureContent}\
+${JS_FIXTURE_CONTENT}\
 
\
-${mdFixtureContent}\
+${MD_FIXTURE_CONTENT}\
 
` @@ -81,37 +80,37 @@ ${mdFixtureContent}\ const rendered = md.render(source, env) expect(rendered).toEqual(expected) - expect(env.importedFiles).toEqual([jsFixturePath, mdFixturePath]) + expect(env.importedFiles).toEqual([JS_FIXTURE_PATH, MD_FIXTURE_PATH]) }) it('should import partial lines', () => { const source = `\ -@[code{1-2}](${jsFixturePathRelative}) -@[code{1-}](${jsFixturePathRelative}) -@[code{2}](${jsFixturePathRelative}) -@[code{4-5}](${mdFixturePathRelative}) -@[code{-5}](${mdFixturePathRelative}) -@[code{5}](${mdFixturePathRelative}) +@[code{1-2}](${JS_FIXTURE_PATH_RELATIVE}) +@[code{1-}](${JS_FIXTURE_PATH_RELATIVE}) +@[code{2}](${JS_FIXTURE_PATH_RELATIVE}) +@[code{4-5}](${MD_FIXTURE_PATH_RELATIVE}) +@[code{-5}](${MD_FIXTURE_PATH_RELATIVE}) +@[code{5}](${MD_FIXTURE_PATH_RELATIVE}) ` const expected = `\
\
-${jsFixtureContent.split('\n').slice(0, 2).join('\n').replace(/\n?$/, '\n')}\
+${JS_FIXTURE_CONTENT.split('\n').slice(0, 2).join('\n').replace(/\n?$/, '\n')}\
 
\
-${jsFixtureContent.split('\n').slice(0).join('\n').replace(/\n?$/, '\n')}\
+${JS_FIXTURE_CONTENT.split('\n').slice(0).join('\n').replace(/\n?$/, '\n')}\
 
\
-${jsFixtureContent.split('\n').slice(1, 1).join('\n').replace(/\n?$/, '\n')}\
+${JS_FIXTURE_CONTENT.split('\n').slice(1, 1).join('\n').replace(/\n?$/, '\n')}\
 
\
-${mdFixtureContent.split('\n').slice(3, 5).join('\n').replace(/\n?$/, '\n')}\
+${MD_FIXTURE_CONTENT.split('\n').slice(3, 5).join('\n').replace(/\n?$/, '\n')}\
 
\
-${mdFixtureContent.split('\n').slice(0, 5).join('\n').replace(/\n?$/, '\n')}\
+${MD_FIXTURE_CONTENT.split('\n').slice(0, 5).join('\n').replace(/\n?$/, '\n')}\
 
\
-${mdFixtureContent.split('\n').slice(4, 5).join('\n').replace(/\n?$/, '\n')}\
+${MD_FIXTURE_CONTENT.split('\n').slice(4, 5).join('\n').replace(/\n?$/, '\n')}\
 
` @@ -123,12 +122,12 @@ ${mdFixtureContent.split('\n').slice(4, 5).join('\n').replace(/\n?$/, '\n')}\ expect(rendered).toEqual(expected) expect(env.importedFiles).toEqual([ - jsFixturePath, - jsFixturePath, - jsFixturePath, - mdFixturePath, - mdFixturePath, - mdFixturePath, + JS_FIXTURE_PATH, + JS_FIXTURE_PATH, + JS_FIXTURE_PATH, + MD_FIXTURE_PATH, + MD_FIXTURE_PATH, + MD_FIXTURE_PATH, ]) }) }) @@ -230,7 +229,7 @@ ${mdFixtureContent.split('\n').slice(4, 5).join('\n').replace(/\n?$/, '\n')}\ ` const expected = `\
\
-${jsFixtureContent}\
+${JS_FIXTURE_CONTENT}\
 
` @@ -244,7 +243,7 @@ ${jsFixtureContent}\ const rendered = md.render(source, env) expect(rendered).toEqual(expected) - expect(env.importedFiles).toEqual([jsFixturePath]) + expect(env.importedFiles).toEqual([JS_FIXTURE_PATH]) }) }) @@ -297,10 +296,10 @@ foo describe('compatibility with otherPlugin', () => { it('should preserve the things after code as fence info', () => { const source1 = `\ -@[code js{1,3-4}](${jsFixturePathRelative}) +@[code js{1,3-4}](${JS_FIXTURE_PATH_RELATIVE}) ` const source2 = `\ -@[code md:no-line-numbers:no-v-pre title="no-line-numbers.md"](${mdFixturePathRelative}) +@[code md:no-line-numbers:no-v-pre title="no-line-numbers.md"](${MD_FIXTURE_PATH_RELATIVE}) ` const md = MarkdownIt().use(importCodePlugin) @@ -313,12 +312,12 @@ foo expect(rendered1).toEqual( md.render(`\ \`\`\`js{1,3-4} -${jsFixtureContent}\ +${JS_FIXTURE_CONTENT}\ \`\`\` `), ) expect(rendered1).toMatchSnapshot() - expect(env1.importedFiles).toEqual([jsFixturePath]) + expect(env1.importedFiles).toEqual([JS_FIXTURE_PATH]) const env2: MarkdownEnv = { filePath: __filename, @@ -329,20 +328,20 @@ ${jsFixtureContent}\ expect(rendered2).toEqual( md.render(`\ \`\`\`md:no-line-numbers:no-v-pre title="no-line-numbers.md" -${mdFixtureContent}\ +${MD_FIXTURE_CONTENT}\ \`\`\` `), ) expect(rendered2).toMatchSnapshot() - expect(env2.importedFiles).toEqual([mdFixturePath]) + expect(env2.importedFiles).toEqual([MD_FIXTURE_PATH]) }) it('should work with syntax supported by vPrePlugin', () => { const source1 = `\ -@[code js{1,3-4}](${jsFixturePathRelative}) +@[code js{1,3-4}](${JS_FIXTURE_PATH_RELATIVE}) ` const source2 = `\ -@[code md:no-line-numbers:no-v-pre title="no-line-numbers.md"](${mdFixturePathRelative}) +@[code md:no-line-numbers:no-v-pre title="no-line-numbers.md"](${MD_FIXTURE_PATH_RELATIVE}) ` const md = MarkdownIt().use(importCodePlugin).use(vPrePlugin) diff --git a/packages/shared/tests/ensureEndingSlash.spec.ts b/packages/shared/tests/ensureEndingSlash.spec.ts index a5913f34cf..1cf9ed744b 100644 --- a/packages/shared/tests/ensureEndingSlash.spec.ts +++ b/packages/shared/tests/ensureEndingSlash.spec.ts @@ -1,7 +1,7 @@ import { expect, it } from 'vitest' import { ensureEndingSlash } from '../src/index.js' -const testCases = [ +const TEST_CASES = [ ['foo/bar', 'foo/bar/'], ['foo/bar/', 'foo/bar/'], ['/foo/bar', '/foo/bar/'], @@ -10,7 +10,7 @@ const testCases = [ ['/foo/bar.html', '/foo/bar.html'], ] -testCases.forEach(([source, expected]) => { +TEST_CASES.forEach(([source, expected]) => { it(source, () => { expect(ensureEndingSlash(source)).toBe(expected) }) diff --git a/packages/shared/tests/ensureLeadingSlash.spec.ts b/packages/shared/tests/ensureLeadingSlash.spec.ts index 43230a7463..e04b68d4bf 100644 --- a/packages/shared/tests/ensureLeadingSlash.spec.ts +++ b/packages/shared/tests/ensureLeadingSlash.spec.ts @@ -1,7 +1,7 @@ import { expect, it } from 'vitest' import { ensureLeadingSlash } from '../src/index.js' -const testCases = [ +const TEST_CASES = [ ['foo/bar', '/foo/bar'], ['foo/bar/', '/foo/bar/'], ['/foo/bar', '/foo/bar'], @@ -10,7 +10,7 @@ const testCases = [ ['/foo/bar.html', '/foo/bar.html'], ] -testCases.forEach(([source, expected]) => { +TEST_CASES.forEach(([source, expected]) => { it(source, () => { expect(ensureLeadingSlash(source)).toBe(expected) }) diff --git a/packages/shared/tests/formatDateString.spec.ts b/packages/shared/tests/formatDateString.spec.ts index 907e6786b1..c0f4831a4f 100644 --- a/packages/shared/tests/formatDateString.spec.ts +++ b/packages/shared/tests/formatDateString.spec.ts @@ -1,14 +1,14 @@ import { describe, expect, it } from 'vitest' import { formatDateString } from '../src/index.js' -const testCases = [ +const TEST_CASES = [ ['2020-1-1', '2020-01-01'], ['2020-1-01', '2020-01-01'], ['2020-01-1', '2020-01-01'], ['2020-01-01', '2020-01-01'], ] -const testCasesFallback = [ +const TEST_CASES_FALLBACK = [ ['202-1-1', '1970-01-01'], ['2020-111-1', '1970-01-01'], ['2020-01-001', '1970-01-01'], @@ -18,7 +18,7 @@ const testCasesFallback = [ ] describe('should format date string correctly', () => { - testCases.forEach(([source, expected]) => { + TEST_CASES.forEach(([source, expected]) => { it(source, () => { expect(formatDateString(source)).toBe(expected) }) @@ -26,7 +26,7 @@ describe('should format date string correctly', () => { }) describe('should fallback to default date string', () => { - testCasesFallback.forEach(([source, expected]) => { + TEST_CASES_FALLBACK.forEach(([source, expected]) => { it(source, () => { expect(formatDateString(source, expected)).toBe(expected) }) diff --git a/packages/shared/tests/routes/inferRoutePath.spec.ts b/packages/shared/tests/routes/inferRoutePath.spec.ts index 053fa22a89..8869932c13 100644 --- a/packages/shared/tests/routes/inferRoutePath.spec.ts +++ b/packages/shared/tests/routes/inferRoutePath.spec.ts @@ -1,7 +1,7 @@ import { describe, expect, it } from 'vitest' import { inferRoutePath } from '../../src/index.js' -const testCases = [ +const TEST_CASES = [ // absolute index ['/', '/'], ['/README.md', '/'], @@ -54,9 +54,9 @@ const testCases = [ ] describe('should normalize clean paths correctly', () => { - testCases.forEach(([path, expected]) => + TEST_CASES.forEach(([path, expected]) => { it(`"${path}" -> "${expected}"`, () => { expect(inferRoutePath(path)).toBe(expected) - }), - ) + }) + }) }) diff --git a/packages/shared/tests/routes/normalizeRoutePath.spec.ts b/packages/shared/tests/routes/normalizeRoutePath.spec.ts index 2fbb745762..267b5c2731 100644 --- a/packages/shared/tests/routes/normalizeRoutePath.spec.ts +++ b/packages/shared/tests/routes/normalizeRoutePath.spec.ts @@ -195,12 +195,12 @@ const TEST_CASES = [ [['foo/.md', '/a/b.html'], '/a/foo/.html'], [['/.md', '/a/b.html'], '/.html'], [['/foo/.md', '/a/b.html'], '/foo/.html'], -] +] as const describe('should normalize clean paths correctly', () => { - TEST_CASES.forEach(([[path, current], expected]) => + TEST_CASES.forEach(([[path, current], expected]) => { it(`${current ? `"${current}"-` : ''}"${path}" -> "${expected}"`, () => { expect(normalizeRoutePath(path, current)).toBe(expected) - }), - ) + }) + }) }) diff --git a/packages/shared/tests/routes/resolveLocalePath.spec.ts b/packages/shared/tests/routes/resolveLocalePath.spec.ts index 375be0d473..02b933aec6 100644 --- a/packages/shared/tests/routes/resolveLocalePath.spec.ts +++ b/packages/shared/tests/routes/resolveLocalePath.spec.ts @@ -17,7 +17,7 @@ const locales: LocaleConfig = { }, } -const testCases: [string, string][] = [ +const TEST_CASES: [string, string][] = [ ['/', '/'], ['/foo/', '/foo/'], ['/foo/foo/', '/foo/'], @@ -27,7 +27,7 @@ const testCases: [string, string][] = [ ['/foo-baz/foobar', '/foo-baz/'], ] -testCases.forEach(([routePath, expected]) => { +TEST_CASES.forEach(([routePath, expected]) => { it(routePath, () => { expect(resolveLocalePath(locales, routePath)).toEqual(expected) }) diff --git a/packages/shared/tests/typeGuards.spec.ts b/packages/shared/tests/typeGuards.spec.ts index f75beeaa11..21080f78a1 100644 --- a/packages/shared/tests/typeGuards.spec.ts +++ b/packages/shared/tests/typeGuards.spec.ts @@ -2,7 +2,7 @@ import { describe, expect, it } from 'vitest' import { isPlainObject } from '../src/index.js' describe('isPlainObject', () => { - const testCases: [unknown, boolean][] = [ + const TEST_CASES: [unknown, boolean][] = [ [true, false], [false, false], ['', false], @@ -16,7 +16,7 @@ describe('isPlainObject', () => { ] it('should determine plain object correctly', () => { - testCases.forEach(([source, expected]) => { + TEST_CASES.forEach(([source, expected]) => { expect(isPlainObject(source)).toBe(expected) }) }) diff --git a/packages/utils/tests/console/logger.spec.ts b/packages/utils/tests/console/logger.spec.ts index 19ae7cedfb..c99eb83e8e 100644 --- a/packages/utils/tests/console/logger.spec.ts +++ b/packages/utils/tests/console/logger.spec.ts @@ -1,4 +1,3 @@ -/* eslint-disable no-console */ import { expect, it, vi } from 'vitest' import { logger } from '../../src/index.js' From d85018d104d1f27df0afa8a3087d8b2f33eff4ae Mon Sep 17 00:00:00 2001 From: meteorlxy Date: Thu, 15 Aug 2024 23:57:08 +0800 Subject: [PATCH 05/12] chore: updates --- eslint.config.js | 3 +- packages/core/src/app/createBaseApp.ts | 4 +- packages/core/src/app/resolveAppDir.ts | 7 ++- packages/core/src/app/resolveAppMarkdown.ts | 2 +- packages/core/src/app/resolveAppPages.ts | 2 +- packages/core/src/page/resolvePageHtmlInfo.ts | 4 +- .../core/src/page/resolvePagePermalink.ts | 6 +- packages/core/src/types/app/options.ts | 6 +- packages/markdown/src/plugins/emojiPlugin.ts | 2 +- packages/markdown/src/types.ts | 20 +++--- .../tests/plugins/linksPlugin.spec.ts | 2 +- .../markdown/tests/plugins/vPrePlugin.spec.ts | 62 +++++++++---------- packages/shared/src/types/head.ts | 10 +-- packages/shared/tests/dedupeHead.spec.ts | 2 +- 14 files changed, 67 insertions(+), 65 deletions(-) diff --git a/eslint.config.js b/eslint.config.js index 115d6c4386..19dd6bb34c 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -32,9 +32,10 @@ export default vuepress( }, }, { - files: ['**/*.spec.ts'], + files: ['**/tests/**'], rules: { 'no-console': 'off', + 'prefer-template': 'off', }, }, ) diff --git a/packages/core/src/app/createBaseApp.ts b/packages/core/src/app/createBaseApp.ts index b596ac2031..3e91a42eff 100644 --- a/packages/core/src/app/createBaseApp.ts +++ b/packages/core/src/app/createBaseApp.ts @@ -36,8 +36,8 @@ export const createBaseApp = (config: AppConfig, isBuild = false): App => { // methods use: (plugin: Plugin) => appUse(app, plugin), - init: () => appInit(app), - prepare: () => appPrepare(app), + init: async () => appInit(app), + prepare: async () => appPrepare(app), } as App // setup theme and plugins diff --git a/packages/core/src/app/resolveAppDir.ts b/packages/core/src/app/resolveAppDir.ts index 675c30ee5e..5e78b9d344 100644 --- a/packages/core/src/app/resolveAppDir.ts +++ b/packages/core/src/app/resolveAppDir.ts @@ -7,9 +7,10 @@ const require = createRequire(import.meta.url) /** * Create directory util function */ -export const createAppDirFunction = (baseDir: string): AppDirFunction => { - return (...args: string[]): string => path.resolve(baseDir, ...args) -} +export const createAppDirFunction = + (baseDir: string): AppDirFunction => + (...args) => + path.resolve(baseDir, ...args) /** * Resolve directory utils for vuepress app diff --git a/packages/core/src/app/resolveAppMarkdown.ts b/packages/core/src/app/resolveAppMarkdown.ts index 0875dceaf6..84ce7d0a1a 100644 --- a/packages/core/src/app/resolveAppMarkdown.ts +++ b/packages/core/src/app/resolveAppMarkdown.ts @@ -1,5 +1,5 @@ -import { createMarkdown } from '@vuepress/markdown' import type { Markdown } from '@vuepress/markdown' +import { createMarkdown } from '@vuepress/markdown' import type { App } from '../types/index.js' /** diff --git a/packages/core/src/app/resolveAppPages.ts b/packages/core/src/app/resolveAppPages.ts index 2f721fa7fd..1f7d083dc0 100644 --- a/packages/core/src/app/resolveAppPages.ts +++ b/packages/core/src/app/resolveAppPages.ts @@ -18,7 +18,7 @@ export const resolveAppPages = async (app: App): Promise => { // create pages from files const pages = await Promise.all( - pageFilePaths.map((filePath) => createPage(app, { filePath })), + pageFilePaths.map(async (filePath) => createPage(app, { filePath })), ) // find the 404 page diff --git a/packages/core/src/page/resolvePageHtmlInfo.ts b/packages/core/src/page/resolvePageHtmlInfo.ts index 58d1c63b4b..677921ed04 100644 --- a/packages/core/src/page/resolvePageHtmlInfo.ts +++ b/packages/core/src/page/resolvePageHtmlInfo.ts @@ -20,10 +20,10 @@ export const resolvePageHtmlInfo = ({ // /foo/ -> foo/index.html const htmlFilePathRelative = removeLeadingSlash( path.endsWith('/') - ? path + 'index.html' + ? `${path}index.html` : path.endsWith('.html') ? path - : path + '.html', + : `${path}.html`, ) const htmlFilePath = app.dir.dest(htmlFilePathRelative) diff --git a/packages/core/src/page/resolvePagePermalink.ts b/packages/core/src/page/resolvePagePermalink.ts index 6a549085f2..15a421dec1 100644 --- a/packages/core/src/page/resolvePagePermalink.ts +++ b/packages/core/src/page/resolvePagePermalink.ts @@ -45,9 +45,9 @@ export const resolvePagePermalink = ({ const link = path.join( pathLocale, permalinkPattern - .replace(/:year/, year!) - .replace(/:month/, month!) - .replace(/:day/, day!) + .replace(/:year/, year) + .replace(/:month/, month) + .replace(/:day/, day) .replace(/:slug/, slug) .replace(/:raw/, pathInferred?.replace(/^\//, '') ?? ''), ) diff --git a/packages/core/src/types/app/options.ts b/packages/core/src/types/app/options.ts index 93271fd4bf..4cbcabbc37 100644 --- a/packages/core/src/types/app/options.ts +++ b/packages/core/src/types/app/options.ts @@ -67,7 +67,7 @@ export interface AppConfigBuild { * * @default true */ - shouldPreload?: ((file: string, type: string) => boolean) | boolean + shouldPreload?: boolean | ((file: string, type: string) => boolean) /** * Determine what resource files should be prefetched. Use boolean value to @@ -75,7 +75,7 @@ export interface AppConfigBuild { * * @default true */ - shouldPrefetch?: ((file: string, type: string) => boolean) | boolean + shouldPrefetch?: boolean | ((file: string, type: string) => boolean) /** * Specify the path of the HTML template to be used for build @@ -95,7 +95,7 @@ export interface AppConfigBuild { /** * Vuepress app config */ -export type AppConfig = AppConfigCommon & AppConfigDev & AppConfigBuild +export type AppConfig = AppConfigBuild & AppConfigCommon & AppConfigDev /** * Vuepress app options diff --git a/packages/markdown/src/plugins/emojiPlugin.ts b/packages/markdown/src/plugins/emojiPlugin.ts index 5defb59291..edae7522e0 100644 --- a/packages/markdown/src/plugins/emojiPlugin.ts +++ b/packages/markdown/src/plugins/emojiPlugin.ts @@ -1,5 +1,5 @@ -import { full as emojiPlugin } from 'markdown-it-emoji' import type { Options } from 'markdown-it-emoji' +import { full as emojiPlugin } from 'markdown-it-emoji' export type EmojiPluginOptions = Options export { emojiPlugin } diff --git a/packages/markdown/src/types.ts b/packages/markdown/src/types.ts index 274baabe08..5bb7cc76fc 100644 --- a/packages/markdown/src/types.ts +++ b/packages/markdown/src/types.ts @@ -20,19 +20,19 @@ export type Markdown = MarkdownIt export type { MarkdownSfcBlocks } export interface MarkdownOptions extends Options { - anchor?: false | AnchorPluginOptions - assets?: false | AssetsPluginOptions + anchor?: AnchorPluginOptions | false + assets?: AssetsPluginOptions | false component?: false - emoji?: false | EmojiPluginOptions - frontmatter?: false | FrontmatterPluginOptions - headers?: false | HeadersPluginOptions + emoji?: EmojiPluginOptions | false + frontmatter?: FrontmatterPluginOptions | false + headers?: HeadersPluginOptions | false title?: false - importCode?: false | ImportCodePluginOptions - links?: false | LinksPluginOptions - sfc?: false | SfcPluginOptions + importCode?: ImportCodePluginOptions | false + links?: LinksPluginOptions | false + sfc?: SfcPluginOptions | false slugify?: MarkdownSlugifyFunction - toc?: false | TocPluginOptions - vPre?: false | VPrePluginOptions + toc?: TocPluginOptions | false + vPre?: VPrePluginOptions | false /** * @deprecated This feature has been removed. Please use `@vuepress/plugin-prismjs` or `@vuepress/plugin-shiki` instead. */ diff --git a/packages/markdown/tests/plugins/linksPlugin.spec.ts b/packages/markdown/tests/plugins/linksPlugin.spec.ts index 19b1318c59..b74996ac9d 100644 --- a/packages/markdown/tests/plugins/linksPlugin.spec.ts +++ b/packages/markdown/tests/plugins/linksPlugin.spec.ts @@ -1,7 +1,7 @@ import MarkdownIt from 'markdown-it' import { describe, expect, it } from 'vitest' -import { linksPlugin } from '../../src/index.js' import type { MarkdownEnv } from '../../src/index.js' +import { linksPlugin } from '../../src/index.js' describe('@vuepress/markdown > plugins > linksPlugin', () => { describe('external links', () => { diff --git a/packages/markdown/tests/plugins/vPrePlugin.spec.ts b/packages/markdown/tests/plugins/vPrePlugin.spec.ts index 1bda5aaf05..128a163cf5 100644 --- a/packages/markdown/tests/plugins/vPrePlugin.spec.ts +++ b/packages/markdown/tests/plugins/vPrePlugin.spec.ts @@ -2,14 +2,14 @@ import MarkdownIt from 'markdown-it' import { describe, expect, it, vi } from 'vitest' import { vPrePlugin } from '../../src/index.js' -const codeFence = '```' +const CODE_FENCE = '```' describe('@vuepress/markdown > plugins > vPrePlugin', () => { describe('plugin options', () => { const source = `\ -${codeFence}js +${CODE_FENCE}js const a = 1 -${codeFence} +${CODE_FENCE} \`inline\` ` @@ -40,33 +40,33 @@ ${codeFence} describe(':v-pre / :no-v-pre', () => { const source = `\ -${codeFence}js:v-pre +${CODE_FENCE}js:v-pre const a = 1 -${codeFence} +${CODE_FENCE} -${codeFence}js:no-v-pre +${CODE_FENCE}js:no-v-pre const a = 1 -${codeFence} +${CODE_FENCE} -${codeFence}js{1,2}:v-pre +${CODE_FENCE}js{1,2}:v-pre const a = 1 -${codeFence} +${CODE_FENCE} -${codeFence}js{1,2}:no-v-pre +${CODE_FENCE}js{1,2}:no-v-pre const a = 1 -${codeFence} +${CODE_FENCE} -${codeFence}js:other-syntax:v-pre +${CODE_FENCE}js:other-syntax:v-pre const a = 1 -${codeFence} +${CODE_FENCE} -${codeFence}js:other-syntax:no-v-pre +${CODE_FENCE}js:other-syntax:no-v-pre const a = 1 -${codeFence} +${CODE_FENCE} -${codeFence}js +${CODE_FENCE}js const a = 1 -${codeFence} +${CODE_FENCE} ` it('should work if `block` is enabled by default', () => { const md = MarkdownIt().use(vPrePlugin) @@ -83,33 +83,33 @@ ${codeFence} describe('syntax highlighting', () => { const source = `\ -${codeFence}js:v-pre +${CODE_FENCE}js:v-pre const a = 1 -${codeFence} +${CODE_FENCE} -${codeFence}js:no-v-pre +${CODE_FENCE}js:no-v-pre const a = 1 -${codeFence} +${CODE_FENCE} -${codeFence}js{1,2}:v-pre +${CODE_FENCE}js{1,2}:v-pre const a = 1 -${codeFence} +${CODE_FENCE} -${codeFence}js{1,2}:no-v-pre +${CODE_FENCE}js{1,2}:no-v-pre const a = 1 -${codeFence} +${CODE_FENCE} -${codeFence}js:other-syntax:v-pre +${CODE_FENCE}js:other-syntax:v-pre const a = 1 -${codeFence} +${CODE_FENCE} -${codeFence}js:other-syntax:no-v-pre +${CODE_FENCE}js:other-syntax:no-v-pre const a = 1 -${codeFence} +${CODE_FENCE} -${codeFence}js +${CODE_FENCE}js const a = 1 -${codeFence} +${CODE_FENCE} ` it('should work highlighted code is wrapped with `
`', () => {
       const highlight = vi.fn(
diff --git a/packages/shared/src/types/head.ts b/packages/shared/src/types/head.ts
index 44024a9956..4cbf019a3b 100644
--- a/packages/shared/src/types/head.ts
+++ b/packages/shared/src/types/head.ts
@@ -10,17 +10,17 @@ export type HeadConfig =
  *
  * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/head
  */
-export type HeadTag = HeadTagNonEmpty | HeadTagEmpty
+export type HeadTag = HeadTagEmpty | HeadTagNonEmpty
 
 /**
  * Non-empty tags in ``
  */
 export type HeadTagNonEmpty =
-  | 'title'
-  | 'style'
-  | 'script'
   | 'noscript'
+  | 'script'
+  | 'style'
   | 'template'
+  | 'title'
 
 /**
  * Empty tags in ``
@@ -30,4 +30,4 @@ export type HeadTagEmpty = 'base' | 'link' | 'meta' | 'script'
 /**
  * Attributes to be set for tags in ``
  */
-export type HeadAttrsConfig = Record
+export type HeadAttrsConfig = Record
diff --git a/packages/shared/tests/dedupeHead.spec.ts b/packages/shared/tests/dedupeHead.spec.ts
index a73fae6b26..659cb1df16 100644
--- a/packages/shared/tests/dedupeHead.spec.ts
+++ b/packages/shared/tests/dedupeHead.spec.ts
@@ -1,6 +1,6 @@
 import { expect, it } from 'vitest'
-import { dedupeHead } from '../src/index.js'
 import type { HeadConfig } from '../src/index.js'
+import { dedupeHead } from '../src/index.js'
 
 it('should dedupe head correctly', () => {
   const head: HeadConfig[] = [

From 2d377d2860fd4ed02064782c79d6ea536a332020 Mon Sep 17 00:00:00 2001
From: meteorlxy 
Date: Fri, 16 Aug 2024 00:14:27 +0800
Subject: [PATCH 06/12] chore: updates

---
 eslint.config.js                              |  2 +-
 packages/client/src/setupGlobalComponents.ts  |  2 -
 packages/client/src/setupGlobalComputed.ts    |  2 +-
 packages/client/src/types/clientConfig.ts     |  2 +-
 packages/core/src/app/createBuildApp.ts       |  2 +-
 packages/core/src/app/createDevApp.ts         |  2 +-
 packages/core/src/page/resolvePageLang.ts     |  1 +
 packages/core/tests/app/resolveAppEnv.spec.ts |  8 +--
 .../core/tests/app/resolveAppOptions.spec.ts  |  4 +-
 .../core/tests/app/resolveAppPages.spec.ts    | 10 ++--
 .../core/tests/app/resolveThemeInfo.spec.ts   | 56 ++++++++++---------
 .../core/tests/page/inferPagePath.spec.ts     |  6 +-
 .../tests/page/resolvePageChunkInfo.spec.ts   |  3 +-
 .../tests/page/resolvePageHtmlInfo.spec.ts    |  4 +-
 .../core/tests/page/resolvePageLang.spec.ts   |  4 +-
 .../tests/pluginApi/createPluginApi.spec.ts   |  4 +-
 .../normalizeAliasDefineHook.spec.ts          |  4 +-
 .../normalizeClientFilesHook.spec.ts          |  4 +-
 packages/markdown/src/markdown.ts             | 26 ++++-----
 .../importCodePlugin/importCodePlugin.ts      | 10 +++-
 .../src/plugins/linksPlugin/linksPlugin.ts    | 14 ++---
 .../src/plugins/linksPlugin/resolvePaths.ts   | 34 ++++++-----
 22 files changed, 105 insertions(+), 99 deletions(-)

diff --git a/eslint.config.js b/eslint.config.js
index 19dd6bb34c..afafffce9f 100644
--- a/eslint.config.js
+++ b/eslint.config.js
@@ -20,7 +20,7 @@ export default vuepress(
         '@typescript-eslint/no-non-null-assertion': 'off',
         'no-underscore-dangle': [
           'warn',
-          { allow: ['_context', '_registeredComponents'] },
+          { allow: ['_context', '_pageChunk', '_registeredComponents'] },
         ],
       },
     },
diff --git a/packages/client/src/setupGlobalComponents.ts b/packages/client/src/setupGlobalComponents.ts
index 6c513cc98a..684f9d5b8a 100644
--- a/packages/client/src/setupGlobalComponents.ts
+++ b/packages/client/src/setupGlobalComponents.ts
@@ -5,9 +5,7 @@ import { ClientOnly, Content, RouteLink } from './components/index.js'
  * Register global built-in components
  */
 export const setupGlobalComponents = (app: App): void => {
-  /* eslint-disable vue/match-component-file-name, vue/no-reserved-component-names */
   app.component('ClientOnly', ClientOnly)
   app.component('Content', Content)
   app.component('RouteLink', RouteLink)
-  /* eslint-enable vue/match-component-file-name, vue/no-reserved-component-names */
 }
diff --git a/packages/client/src/setupGlobalComputed.ts b/packages/client/src/setupGlobalComputed.ts
index 57197148a6..e258cb7673 100644
--- a/packages/client/src/setupGlobalComputed.ts
+++ b/packages/client/src/setupGlobalComputed.ts
@@ -48,7 +48,7 @@ export const setupGlobalComputed = (
     __VUE_HMR_RUNTIME__.updatePageData = async (newPageData: PageData) => {
       const oldPageChunk = await routes.value[newPageData.path].loader()
       const newPageChunk = { comp: oldPageChunk.comp, data: newPageData }
-      routes.value[newPageData.path].loader = () =>
+      routes.value[newPageData.path].loader = async () =>
         Promise.resolve(newPageChunk)
       if (
         newPageData.path ===
diff --git a/packages/client/src/types/clientConfig.ts b/packages/client/src/types/clientConfig.ts
index 9b0a490bd9..ad2a73eca9 100644
--- a/packages/client/src/types/clientConfig.ts
+++ b/packages/client/src/types/clientConfig.ts
@@ -14,7 +14,7 @@ export interface ClientConfig {
     app: App
     router: Router
     siteData: SiteDataRef
-  }) => void | Promise
+  }) => Promise | void
 
   /**
    * A function to be called inside the setup function of vue app
diff --git a/packages/core/src/app/createBuildApp.ts b/packages/core/src/app/createBuildApp.ts
index 3be1e3e8e9..36830cbdf8 100644
--- a/packages/core/src/app/createBuildApp.ts
+++ b/packages/core/src/app/createBuildApp.ts
@@ -6,6 +6,6 @@ import { createBaseApp } from './createBaseApp.js'
  */
 export const createBuildApp = (config: AppConfig): BuildApp => {
   const app = createBaseApp(config, true) as BuildApp
-  app.build = () => app.options.bundler.build(app)
+  app.build = async () => app.options.bundler.build(app)
   return app
 }
diff --git a/packages/core/src/app/createDevApp.ts b/packages/core/src/app/createDevApp.ts
index c611560e3e..59fe0f2ea0 100644
--- a/packages/core/src/app/createDevApp.ts
+++ b/packages/core/src/app/createDevApp.ts
@@ -6,6 +6,6 @@ import { createBaseApp } from './createBaseApp.js'
  */
 export const createDevApp = (config: AppConfig): DevApp => {
   const app = createBaseApp(config, false) as DevApp
-  app.dev = () => app.options.bundler.dev(app)
+  app.dev = async () => app.options.bundler.dev(app)
   return app
 }
diff --git a/packages/core/src/page/resolvePageLang.ts b/packages/core/src/page/resolvePageLang.ts
index 1f3f49136a..3f2f243256 100644
--- a/packages/core/src/page/resolvePageLang.ts
+++ b/packages/core/src/page/resolvePageLang.ts
@@ -16,5 +16,6 @@ export const resolvePageLang = ({
   if (isString(frontmatter.lang) && frontmatter.lang) {
     return frontmatter.lang
   }
+  // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- unsafe indexed access
   return app.siteData.locales[pathLocale]?.lang ?? app.siteData.lang
 }
diff --git a/packages/core/tests/app/resolveAppEnv.spec.ts b/packages/core/tests/app/resolveAppEnv.spec.ts
index 13926aaa5d..6ba685baa6 100644
--- a/packages/core/tests/app/resolveAppEnv.spec.ts
+++ b/packages/core/tests/app/resolveAppEnv.spec.ts
@@ -1,5 +1,5 @@
 import { describe, expect, it } from 'vitest'
-import type { Bundler, Theme } from '../../src/index.js'
+import type { Bundler } from '../../src/index.js'
 import { resolveAppEnv, resolveAppOptions } from '../../src/index.js'
 
 const TEST_CASES: [
@@ -10,7 +10,7 @@ const TEST_CASES: [
     [
       resolveAppOptions({
         source: '/foo',
-        theme: { name: 'test' } as Theme,
+        theme: { name: 'test' },
         bundler: {} as Bundler,
       }),
       false,
@@ -25,7 +25,7 @@ const TEST_CASES: [
     [
       resolveAppOptions({
         source: '/foo',
-        theme: { name: 'test' } as Theme,
+        theme: { name: 'test' },
         bundler: {} as Bundler,
         debug: true,
       }),
@@ -41,7 +41,7 @@ const TEST_CASES: [
     [
       resolveAppOptions({
         source: '/foo',
-        theme: { name: 'test' } as Theme,
+        theme: { name: 'test' },
         bundler: {} as Bundler,
       }),
       true,
diff --git a/packages/core/tests/app/resolveAppOptions.spec.ts b/packages/core/tests/app/resolveAppOptions.spec.ts
index a79cec1d5a..442737587d 100644
--- a/packages/core/tests/app/resolveAppOptions.spec.ts
+++ b/packages/core/tests/app/resolveAppOptions.spec.ts
@@ -1,6 +1,6 @@
 import { path, templateRenderer } from '@vuepress/utils'
 import { describe, expect, it } from 'vitest'
-import type { Bundler, Theme } from '../../src/index.js'
+import type { Bundler } from '../../src/index.js'
 import { resolveAppOptions } from '../../src/index.js'
 
 describe('core > app > resolveAppOptions', () => {
@@ -10,7 +10,7 @@ describe('core > app > resolveAppOptions', () => {
     expect(
       resolveAppOptions({
         source,
-        theme: { name: 'theme' } as Theme,
+        theme: { name: 'theme' },
         bundler: { name: 'bundler' } as Bundler,
       }),
     ).toEqual({
diff --git a/packages/core/tests/app/resolveAppPages.spec.ts b/packages/core/tests/app/resolveAppPages.spec.ts
index 877d910819..f394888238 100644
--- a/packages/core/tests/app/resolveAppPages.spec.ts
+++ b/packages/core/tests/app/resolveAppPages.spec.ts
@@ -1,14 +1,14 @@
 import { createMarkdown } from '@vuepress/markdown'
 import { path } from '@vuepress/utils'
 import { describe, expect, it } from 'vitest'
-import type { Bundler, Theme } from '../../src/index.js'
+import type { Bundler } from '../../src/index.js'
 import { createBaseApp, resolveAppPages } from '../../src/index.js'
 
 describe('core > app > resolveAppPages', () => {
   it('should create two pages with default 404 page', async () => {
     const app = createBaseApp({
       source: path.resolve(__dirname, '../__fixtures__/pages'),
-      theme: { name: 'test' } as Theme,
+      theme: { name: 'test' },
       bundler: {} as Bundler,
     })
     app.markdown = createMarkdown()
@@ -28,7 +28,7 @@ describe('core > app > resolveAppPages', () => {
   it('should create two pages with custom 404 page', async () => {
     const app = createBaseApp({
       source: path.resolve(__dirname, '../__fixtures__/pages-with-404'),
-      theme: { name: 'test' } as Theme,
+      theme: { name: 'test' },
       bundler: {} as Bundler,
     })
     app.markdown = createMarkdown()
@@ -47,7 +47,7 @@ describe('core > app > resolveAppPages', () => {
   it('should process extendsPageOptions hook correctly', async () => {
     const app = createBaseApp({
       source: path.resolve(__dirname, '../__fixtures__/pages-with-404'),
-      theme: { name: 'test' } as Theme,
+      theme: { name: 'test' },
       bundler: {} as Bundler,
     })
 
@@ -71,7 +71,7 @@ describe('core > app > resolveAppPages', () => {
   it('should process extendsPage hook correctly', async () => {
     const app = createBaseApp({
       source: path.resolve(__dirname, '../__fixtures__/pages-with-404'),
-      theme: { name: 'test' } as Theme,
+      theme: { name: 'test' },
       bundler: {} as Bundler,
     })
 
diff --git a/packages/core/tests/app/resolveThemeInfo.spec.ts b/packages/core/tests/app/resolveThemeInfo.spec.ts
index cc331816d6..631deb2e6a 100644
--- a/packages/core/tests/app/resolveThemeInfo.spec.ts
+++ b/packages/core/tests/app/resolveThemeInfo.spec.ts
@@ -1,55 +1,59 @@
 import { importFileDefault, path } from '@vuepress/utils'
 import { describe, expect, it } from 'vitest'
+import type { App, Bundler, Theme, ThemeObject } from '../../src/index.js'
 import { createBaseApp, resolveThemeInfo } from '../../src/index.js'
 
-const fixtures = (...args: string[]) =>
+const fixtures = (...args: string[]): string =>
   path.resolve(__dirname, '../__fixtures__/', ...args)
 
-const createTestApp = async (themePath: string) =>
+const createTestApp = async (themePath: string): Promise =>
   createBaseApp({
     source: path.resolve(__dirname, 'fake-source'),
     theme: await importFileDefault(themePath),
-    bundler: {} as any,
+    bundler: {} as Bundler,
   })
 
-const themeEntryTypes = ['func', 'obj'] as const
+const THEME_ENTRY_TYPES = ['func', 'obj'] as const
 
-const getThemePlugin = async (themePath: string) => {
-  const theme = await importFileDefault(themePath)
-  return typeof theme === 'function' ? theme() : theme
+const getThemePlugin = async (
+  themePath: string,
+  app: App,
+): Promise => {
+  const theme = await importFileDefault(themePath)
+  return typeof theme === 'function' ? theme(app) : theme
 }
 
 describe('core > app > resolveThemeInfo', () => {
   describe('plugins', () => {
     describe('should resolve theme info without plugins correctly', () => {
-      themeEntryTypes.forEach((item) =>
+      THEME_ENTRY_TYPES.forEach((item) => {
         it(item, async () => {
           const themePath = fixtures(`themes/${item}-empty.js`)
           const app = await createTestApp(themePath)
           expect(resolveThemeInfo(app, app.options.theme).plugins).toEqual([
-            await getThemePlugin(themePath),
+            await getThemePlugin(themePath, app),
           ])
-        }),
-      )
+        })
+      })
     })
 
     describe('should resolve theme info with plugins correctly', () => {
-      themeEntryTypes.forEach((item) =>
+      THEME_ENTRY_TYPES.forEach((item) => {
         it(item, async () => {
           const themePath = fixtures(`themes/${item}.js`)
           const app = await createTestApp(themePath)
           expect(resolveThemeInfo(app, app.options.theme).plugins).toEqual([
             await importFileDefault(fixtures('plugins/obj.js')),
-            await getThemePlugin(themePath),
+            await getThemePlugin(themePath, app),
           ])
-        }),
-      )
+        })
+      })
     })
   })
 
   describe('extends', () => {
     describe('should resolve theme info with parent theme correctly', () => {
-      themeEntryTypes.forEach((item) =>
+      THEME_ENTRY_TYPES.forEach((item) => {
         it(item, async () => {
           const themePath = fixtures(`themes/${item}-extends-parent.js`)
           const parentThemePath = fixtures(`themes/${item}.js`)
@@ -58,19 +62,19 @@ describe('core > app > resolveThemeInfo', () => {
           expect(resolveThemeInfo(app, app.options.theme)).toEqual({
             plugins: [
               await importFileDefault(fixtures('plugins/obj.js')),
-              await getThemePlugin(parentThemePath),
+              await getThemePlugin(parentThemePath, app),
               await importFileDefault(fixtures('plugins/obj-foo.js')),
-              await getThemePlugin(themePath),
+              await getThemePlugin(themePath, app),
             ],
             templateBuild: `theme-${item}-extends-parent-template-build`,
             templateDev: `theme-${item}-template-dev`,
           })
-        }),
-      )
+        })
+      })
     })
 
     describe('should resolve theme info with grandparent theme correctly', () => {
-      themeEntryTypes.forEach((item) =>
+      THEME_ENTRY_TYPES.forEach((item) => {
         it(item, async () => {
           const themePath = fixtures(`themes/${item}-extends-grandparent.js`)
           const parentThemePath = fixtures(`themes/${item}-extends-parent.js`)
@@ -80,17 +84,17 @@ describe('core > app > resolveThemeInfo', () => {
           expect(resolveThemeInfo(app, app.options.theme)).toEqual({
             plugins: [
               await importFileDefault(fixtures('plugins/obj.js')),
-              await getThemePlugin(grandparentThemePath),
+              await getThemePlugin(grandparentThemePath, app),
               await importFileDefault(fixtures('plugins/obj-foo.js')),
-              await getThemePlugin(parentThemePath),
+              await getThemePlugin(parentThemePath, app),
               await importFileDefault(fixtures('plugins/obj-bar.js')),
-              await getThemePlugin(themePath),
+              await getThemePlugin(themePath, app),
             ],
             templateBuild: `theme-${item}-extends-parent-template-build`,
             templateDev: `theme-${item}-extends-grandparent-template-dev`,
           })
-        }),
-      )
+        })
+      })
     })
   })
 })
diff --git a/packages/core/tests/page/inferPagePath.spec.ts b/packages/core/tests/page/inferPagePath.spec.ts
index 887fb496c5..42eef99279 100644
--- a/packages/core/tests/page/inferPagePath.spec.ts
+++ b/packages/core/tests/page/inferPagePath.spec.ts
@@ -1,11 +1,11 @@
 import { path } from '@vuepress/utils'
 import { describe, expect, it } from 'vitest'
-import type { Bundler, Theme } from '../../src/index.js'
+import type { Bundler } from '../../src/index.js'
 import { createBaseApp, inferPagePath } from '../../src/index.js'
 
 const app = createBaseApp({
   source: path.resolve(__dirname, 'fake-source'),
-  theme: { name: 'test' } as Theme,
+  theme: { name: 'test' },
   bundler: {} as Bundler,
   locales: {
     '/': {},
@@ -16,7 +16,7 @@ const app = createBaseApp({
 })
 const appWithoutLocales = createBaseApp({
   source: path.resolve(__dirname, 'fake-source'),
-  theme: { name: 'test' } as Theme,
+  theme: { name: 'test' },
   bundler: {} as Bundler,
 })
 
diff --git a/packages/core/tests/page/resolvePageChunkInfo.spec.ts b/packages/core/tests/page/resolvePageChunkInfo.spec.ts
index e152bda7f5..19ec02eb03 100644
--- a/packages/core/tests/page/resolvePageChunkInfo.spec.ts
+++ b/packages/core/tests/page/resolvePageChunkInfo.spec.ts
@@ -1,11 +1,12 @@
 import { path, sanitizeFileName } from '@vuepress/utils'
 import { describe, expect, it } from 'vitest'
+import type { Bundler } from '../../src/index.js'
 import { createBaseApp, resolvePageChunkInfo } from '../../src/index.js'
 
 const app = createBaseApp({
   source: path.resolve(__dirname, 'fake-source'),
   theme: { name: 'test' },
-  bundler: {} as any,
+  bundler: {} as Bundler,
 })
 
 describe('core > page > resolvePageChunkInfo', () => {
diff --git a/packages/core/tests/page/resolvePageHtmlInfo.spec.ts b/packages/core/tests/page/resolvePageHtmlInfo.spec.ts
index 498fe9b717..61f04d5813 100644
--- a/packages/core/tests/page/resolvePageHtmlInfo.spec.ts
+++ b/packages/core/tests/page/resolvePageHtmlInfo.spec.ts
@@ -1,11 +1,11 @@
 import { path } from '@vuepress/utils'
 import { describe, expect, it } from 'vitest'
-import type { Bundler, Theme } from '../../src/index.js'
+import type { Bundler } from '../../src/index.js'
 import { createBaseApp, resolvePageHtmlInfo } from '../../src/index.js'
 
 const app = createBaseApp({
   source: path.resolve(__dirname, 'fake-source'),
-  theme: { name: 'test' } as Theme,
+  theme: { name: 'test' },
   bundler: {} as Bundler,
 })
 
diff --git a/packages/core/tests/page/resolvePageLang.spec.ts b/packages/core/tests/page/resolvePageLang.spec.ts
index ebf5f19e29..8b50e3e096 100644
--- a/packages/core/tests/page/resolvePageLang.spec.ts
+++ b/packages/core/tests/page/resolvePageLang.spec.ts
@@ -1,11 +1,11 @@
 import { path } from '@vuepress/utils'
 import { describe, expect, it } from 'vitest'
-import type { Bundler, Theme } from '../../src/index.js'
+import type { Bundler } from '../../src/index.js'
 import { createBaseApp, resolvePageLang } from '../../src/index.js'
 
 const app = createBaseApp({
   source: path.resolve(__dirname, 'fake-source'),
-  theme: { name: 'test' } as Theme,
+  theme: { name: 'test' },
   bundler: {} as Bundler,
   lang: 'site-lang',
   locales: {
diff --git a/packages/core/tests/pluginApi/createPluginApi.spec.ts b/packages/core/tests/pluginApi/createPluginApi.spec.ts
index c1f8aa2e38..d7d68e7dec 100644
--- a/packages/core/tests/pluginApi/createPluginApi.spec.ts
+++ b/packages/core/tests/pluginApi/createPluginApi.spec.ts
@@ -1,11 +1,11 @@
 import { path } from '@vuepress/utils'
 import { describe, expect, it, vi } from 'vitest'
-import type { Bundler, HooksName, Theme } from '../../src/index.js'
+import type { Bundler, HooksName } from '../../src/index.js'
 import { createBaseApp, createPluginApi } from '../../src/index.js'
 
 const app = createBaseApp({
   source: path.resolve(__dirname, 'fake-source'),
-  theme: { name: 'test' } as Theme,
+  theme: { name: 'test' },
   bundler: {} as Bundler,
 })
 
diff --git a/packages/core/tests/pluginApi/normalizeAliasDefineHook.spec.ts b/packages/core/tests/pluginApi/normalizeAliasDefineHook.spec.ts
index cb6b62f164..c7c9d05e80 100644
--- a/packages/core/tests/pluginApi/normalizeAliasDefineHook.spec.ts
+++ b/packages/core/tests/pluginApi/normalizeAliasDefineHook.spec.ts
@@ -1,11 +1,11 @@
 import { path } from '@vuepress/utils'
 import { describe, expect, it, vi } from 'vitest'
-import type { AliasDefineHook, Bundler, Theme } from '../../src/index.js'
+import type { AliasDefineHook, Bundler } from '../../src/index.js'
 import { createBaseApp, normalizeAliasDefineHook } from '../../src/index.js'
 
 const app = createBaseApp({
   source: path.resolve(__dirname, 'fake-source'),
-  theme: { name: 'test' } as Theme,
+  theme: { name: 'test' },
   bundler: {} as Bundler,
 })
 
diff --git a/packages/core/tests/pluginApi/normalizeClientFilesHook.spec.ts b/packages/core/tests/pluginApi/normalizeClientFilesHook.spec.ts
index 9a4141b1c0..44cd647bc8 100644
--- a/packages/core/tests/pluginApi/normalizeClientFilesHook.spec.ts
+++ b/packages/core/tests/pluginApi/normalizeClientFilesHook.spec.ts
@@ -1,6 +1,6 @@
 import { path } from '@vuepress/utils'
 import { describe, expect, it, vi } from 'vitest'
-import type { Bundler, ClientConfigFileHook, Theme } from '../../src/index.js'
+import type { Bundler, ClientConfigFileHook } from '../../src/index.js'
 import {
   createBaseApp,
   normalizeClientConfigFileHook,
@@ -8,7 +8,7 @@ import {
 
 const app = createBaseApp({
   source: path.resolve(__dirname, 'fake-source'),
-  theme: { name: 'test' } as Theme,
+  theme: { name: 'test' },
   bundler: {} as Bundler,
 })
 const CLIENT_CONFIG_FILE = path.resolve(
diff --git a/packages/markdown/src/markdown.ts b/packages/markdown/src/markdown.ts
index 88aeb05e83..bc2c0968b5 100644
--- a/packages/markdown/src/markdown.ts
+++ b/packages/markdown/src/markdown.ts
@@ -1,6 +1,18 @@
 import { slugify as defaultSlugify } from '@mdit-vue/shared'
 import { logger } from '@vuepress/utils'
 import MarkdownIt from 'markdown-it'
+import type {
+  AnchorPluginOptions,
+  AssetsPluginOptions,
+  EmojiPluginOptions,
+  FrontmatterPluginOptions,
+  HeadersPluginOptions,
+  ImportCodePluginOptions,
+  LinksPluginOptions,
+  SfcPluginOptions,
+  TocPluginOptions,
+  VPrePluginOptions,
+} from './plugins.js'
 import {
   anchorPlugin,
   assetsPlugin,
@@ -15,18 +27,6 @@ import {
   tocPlugin,
   vPrePlugin,
 } from './plugins.js'
-import type {
-  AnchorPluginOptions,
-  AssetsPluginOptions,
-  EmojiPluginOptions,
-  FrontmatterPluginOptions,
-  HeadersPluginOptions,
-  ImportCodePluginOptions,
-  LinksPluginOptions,
-  SfcPluginOptions,
-  TocPluginOptions,
-  VPrePluginOptions,
-} from './plugins.js'
 import type { Markdown, MarkdownOptions } from './types.js'
 
 /**
@@ -83,7 +83,7 @@ export const createMarkdown = ({
     md.use(assetsPlugin, assets)
   }
 
-  // process code fence
+  // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- deprecation warning
   if (code) {
     logger.warn(
       `\`markdown.code\` option has been removed, please use '@vuepress/plugin-shiki' or '@vuepress/plugin-prismjs' instead.\n See https://v2.vuepress.vuejs.org/reference/config.html#markdown-code`,
diff --git a/packages/markdown/src/plugins/importCodePlugin/importCodePlugin.ts b/packages/markdown/src/plugins/importCodePlugin/importCodePlugin.ts
index 8196e0ee70..32ba3e2154 100644
--- a/packages/markdown/src/plugins/importCodePlugin/importCodePlugin.ts
+++ b/packages/markdown/src/plugins/importCodePlugin/importCodePlugin.ts
@@ -2,6 +2,7 @@ import type { PluginWithOptions } from 'markdown-it'
 import type { MarkdownEnv } from '../../types.js'
 import { createImportCodeBlockRule } from './createImportCodeBlockRule.js'
 import { resolveImportCode } from './resolveImportCode.js'
+import type { ImportCodeTokenMeta } from './types.js'
 
 export interface ImportCodePluginOptions {
   /**
@@ -28,14 +29,17 @@ export const importCodePlugin: PluginWithOptions = (
   md.renderer.rules.import_code = (
     tokens,
     idx,
-    options,
+    opts,
     env: MarkdownEnv,
     slf,
   ) => {
     const token = tokens[idx]
 
     // use imported code as token content
-    const { importFilePath, importCode } = resolveImportCode(token.meta, env)
+    const { importFilePath, importCode } = resolveImportCode(
+      token.meta as ImportCodeTokenMeta,
+      env,
+    )
     token.content = importCode
 
     // extract imported files to env
@@ -44,6 +48,6 @@ export const importCodePlugin: PluginWithOptions = (
     }
 
     // render the import_code token as a fence token
-    return md.renderer.rules.fence!(tokens, idx, options, env, slf)
+    return md.renderer.rules.fence!(tokens, idx, opts, env, slf)
   }
 }
diff --git a/packages/markdown/src/plugins/linksPlugin/linksPlugin.ts b/packages/markdown/src/plugins/linksPlugin/linksPlugin.ts
index 5fb407656a..6da9f97fdc 100644
--- a/packages/markdown/src/plugins/linksPlugin/linksPlugin.ts
+++ b/packages/markdown/src/plugins/linksPlugin/linksPlugin.ts
@@ -75,9 +75,9 @@ export const linksPlugin: PluginWithOptions = (
     // check if a link is an external link
     if (isLinkExternal(hrefLink, base)) {
       // set `externalAttrs` to current token
-      Object.entries(externalAttrs).forEach(([key, val]) =>
-        token.attrSet(key, val),
-      )
+      Object.entries(externalAttrs).forEach(([key, val]) => {
+        token.attrSet(key, val)
+      })
       return
     }
 
@@ -137,17 +137,17 @@ export const linksPlugin: PluginWithOptions = (
     })
   }
 
-  md.renderer.rules.link_open = (tokens, idx, options, env, self) => {
+  md.renderer.rules.link_open = (tokens, idx, opts, env: MarkdownEnv, self) => {
     handleLinkOpen(tokens, idx, env)
-    return self.renderToken(tokens, idx, options)
+    return self.renderToken(tokens, idx, opts)
   }
 
-  md.renderer.rules.link_close = (tokens, idx, options, _env, self) => {
+  md.renderer.rules.link_close = (tokens, idx, opts, _env, self) => {
     // convert ending tag of internal link
     if (hasOpenInternalLink) {
       hasOpenInternalLink = false
       tokens[idx].tag = internalTag
     }
-    return self.renderToken(tokens, idx, options)
+    return self.renderToken(tokens, idx, opts)
   }
 }
diff --git a/packages/markdown/src/plugins/linksPlugin/resolvePaths.ts b/packages/markdown/src/plugins/linksPlugin/resolvePaths.ts
index 0fe64373b9..d63b3a98e6 100644
--- a/packages/markdown/src/plugins/linksPlugin/resolvePaths.ts
+++ b/packages/markdown/src/plugins/linksPlugin/resolvePaths.ts
@@ -31,25 +31,23 @@ export const resolvePaths = (
     }
   }
   // if raw path is relative
+  // if `filePathRelative` is available
+  else if (filePathRelative) {
+    // resolve relative path according to `filePathRelative`
+    relativePath = path.join(
+      // file path may contain non-ASCII characters
+      path.dirname(encodeURI(filePathRelative)),
+      rawPath,
+    )
+    // resolve absolute path according to `base`
+    absolutePath = path.join(base, relativePath)
+  }
+  // if `filePathRelative` is not available
   else {
-    // if `filePathRelative` is available
-    if (filePathRelative) {
-      // resolve relative path according to `filePathRelative`
-      relativePath = path.join(
-        // file path may contain non-ASCII characters
-        path.dirname(encodeURI(filePathRelative)),
-        rawPath,
-      )
-      // resolve absolute path according to `base`
-      absolutePath = path.join(base, relativePath)
-    }
-    // if `filePathRelative` is not available
-    else {
-      // remove leading './'
-      relativePath = rawPath.replace(/^(?:\.\/)?(.*)$/, '$1')
-      // just take relative link as absolute link
-      absolutePath = null
-    }
+    // remove leading './'
+    relativePath = rawPath.replace(/^(?:\.\/)?(.*)$/, '$1')
+    // just take relative link as absolute link
+    absolutePath = null
   }
 
   return {

From 4175b6c7cdef31e4832d05cea89f19141707df36 Mon Sep 17 00:00:00 2001
From: meteorlxy 
Date: Fri, 16 Aug 2024 00:22:22 +0800
Subject: [PATCH 07/12] chore: updates

---
 packages/cli/src/cli.ts | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/packages/cli/src/cli.ts b/packages/cli/src/cli.ts
index 4561cd04e2..1ec277bd8f 100644
--- a/packages/cli/src/cli.ts
+++ b/packages/cli/src/cli.ts
@@ -1,7 +1,7 @@
 import { createRequire } from 'node:module'
 import process from 'node:process'
 import type { AppConfig } from '@vuepress/core'
-import { colors } from '@vuepress/utils'
+import { colors, logger } from '@vuepress/utils'
 import { cac } from 'cac'
 import { createBuild, createDev, info } from './commands/index.js'
 
@@ -15,8 +15,10 @@ export const cli = (defaultAppConfig: Partial = {}): void => {
   const program = cac('vuepress')
 
   // display core version and cli version
-  const versionCli = require('../package.json').version
-  const versionCore = require('@vuepress/core/package.json').version
+  const versionCli = (require('../package.json') as { version: string }).version
+  const versionCore = (
+    require('@vuepress/core/package.json') as { version: string }
+  ).version
   program.version(`core@${versionCore} vuepress/cli@${versionCli}`)
 
   // display help message
@@ -59,8 +61,8 @@ export const cli = (defaultAppConfig: Partial = {}): void => {
 
   // run command or fallback to help messages
   if (program.matchedCommand) {
-    program.runMatchedCommand().catch((err) => {
-      console.error(colors.red(err.stack))
+    ;(program.runMatchedCommand() as Promise).catch((err: unknown) => {
+      logger.error(err instanceof Error ? colors.red(err.stack) : err)
       process.exit(1)
     })
   } else {

From 7aa9f43c6fc9e83f83b8d62888904bf97838c7d5 Mon Sep 17 00:00:00 2001
From: meteorlxy 
Date: Fri, 16 Aug 2024 10:11:34 +0800
Subject: [PATCH 08/12] chore: updates

---
 packages/core/src/types/page.ts               |  13 +-
 packages/core/src/types/plugin.ts             |   2 +-
 packages/core/src/types/pluginApi/hooks.ts    |  12 +-
 .../tests/app/resolvePluginObject.spec.ts     |   6 +-
 packages/core/tests/page/createPage.spec.ts   |  23 +-
 .../core/tests/page/inferPagePath.spec.ts     |  60 ++-
 .../core/tests/page/renderPageContent.spec.ts | 205 ++++----
 .../tests/page/resolvePageChunkInfo.spec.ts   |  22 +-
 .../page/resolvePageComponentInfo.spec.ts     |  23 +-
 .../core/tests/page/resolvePageDate.spec.ts   |  10 +-
 .../tests/page/resolvePageFileContent.spec.ts |  58 ++-
 .../tests/page/resolvePageFilePath.spec.ts    |  77 ++-
 .../tests/page/resolvePageHtmlInfo.spec.ts    |  24 +-
 .../core/tests/page/resolvePageLang.spec.ts   |  68 ++-
 .../core/tests/page/resolvePagePath.spec.ts   |  36 +-
 .../tests/page/resolvePagePermalink.spec.ts   | 317 ++++++------
 .../tests/page/resolvePageRouteMeta.spec.ts   |  34 +-
 .../core/tests/page/resolvePageSlug.spec.ts   |  34 +-
 .../tests/pluginApi/createHookQueue.spec.ts   | 466 +++++++++---------
 .../tests/pluginApi/createPluginApi.spec.ts   |  74 ++-
 .../normalizeAliasDefineHook.spec.ts          |  42 +-
 .../normalizeClientFilesHook.spec.ts          |  72 ++-
 .../src/plugins/assetsPlugin/assetsPlugin.ts  |   2 +-
 23 files changed, 832 insertions(+), 848 deletions(-)

diff --git a/packages/core/src/types/page.ts b/packages/core/src/types/page.ts
index 5aadd8d7ae..178fec9782 100644
--- a/packages/core/src/types/page.ts
+++ b/packages/core/src/types/page.ts
@@ -5,11 +5,14 @@ import type { PageBase, PageData, PageFrontmatter } from '@vuepress/shared'
  * Vuepress Page
  */
 export type Page<
-  ExtraPageData extends Record = Record,
-  ExtraPageFrontmatter extends Record = Record,
-  ExtraPageFields extends Record = Record,
-> = PageBase &
-  ExtraPageFields & {
+  ExtraPageData extends Record = Record,
+  ExtraPageFrontmatter extends Record = Record<
+    string,
+    unknown
+  >,
+  ExtraPageFields extends Record = Record,
+> = ExtraPageFields &
+  PageBase & {
     /**
      * Data of the page, which will be available in client code
      */
diff --git a/packages/core/src/types/plugin.ts b/packages/core/src/types/plugin.ts
index c7f6bc39ca..ae52a6b334 100644
--- a/packages/core/src/types/plugin.ts
+++ b/packages/core/src/types/plugin.ts
@@ -11,8 +11,8 @@ import type { HooksExposed } from './pluginApi/index.js'
  * A plugin package should have a `Plugin` as the default export
  */
 export type Plugin =
-  | T
   | PluginFunction
+  | T
 
 /**
  * Vuepress plugin function
diff --git a/packages/core/src/types/pluginApi/hooks.ts b/packages/core/src/types/pluginApi/hooks.ts
index 4e88851256..f2b2388f87 100644
--- a/packages/core/src/types/pluginApi/hooks.ts
+++ b/packages/core/src/types/pluginApi/hooks.ts
@@ -12,11 +12,11 @@ interface Closable {
 export interface Hook<
   Exposed,
   Normalized = Exposed,
-  Result = Normalized extends (...args: any) => infer U
+  Result = Normalized extends (...args: unknown[]) => infer U
     ? U extends Promise
       ? V
       : U
-    : void,
+    : never,
 > {
   exposed: Exposed
   normalized: Normalized
@@ -41,9 +41,9 @@ export type ClientConfigFileHook = Hook<
 
 // alias and define hook
 export type AliasDefineHook = Hook<
-  | Record
-  | ((app: App, isServer: boolean) => PromiseOrNot>),
-  (app: App, isServer: boolean) => Promise>
+  | Record
+  | ((app: App, isServer: boolean) => PromiseOrNot>),
+  (app: App, isServer: boolean) => Promise>
 >
 
 /**
@@ -58,7 +58,7 @@ export interface Hooks {
   extendsMarkdown: ExtendsHook
   extendsPageOptions: ExtendsHook
   extendsPage: ExtendsHook
-  extendsBundlerOptions: ExtendsHook
+  extendsBundlerOptions: ExtendsHook>
   clientConfigFile: ClientConfigFileHook
   alias: AliasDefineHook
   define: AliasDefineHook
diff --git a/packages/core/tests/app/resolvePluginObject.spec.ts b/packages/core/tests/app/resolvePluginObject.spec.ts
index 02d2441e81..d359120252 100644
--- a/packages/core/tests/app/resolvePluginObject.spec.ts
+++ b/packages/core/tests/app/resolvePluginObject.spec.ts
@@ -1,12 +1,12 @@
 import { path } from '@vuepress/utils'
 import { describe, expect, it, vi } from 'vitest'
+import type { Bundler, PluginFunction, PluginObject } from '../../src/index.js'
 import { createBaseApp, resolvePluginObject } from '../../src/index.js'
-import type { PluginFunction, PluginObject } from '../../src/index.js'
 
 const app = createBaseApp({
   source: path.resolve(__dirname, 'fake-source'),
   theme: { name: 'test' },
-  bundler: {} as any,
+  bundler: {} as Bundler,
 })
 
 describe('core > app > resolvePluginObject', () => {
@@ -20,7 +20,7 @@ describe('core > app > resolvePluginObject', () => {
   })
 
   it('should work with plugin function', () => {
-    const pluginFunction: PluginFunction = vi.fn((app) => ({
+    const pluginFunction: PluginFunction = vi.fn(() => ({
       name: 'plugin-function',
     }))
 
diff --git a/packages/core/tests/page/createPage.spec.ts b/packages/core/tests/page/createPage.spec.ts
index e2f832b2ab..313fed3876 100644
--- a/packages/core/tests/page/createPage.spec.ts
+++ b/packages/core/tests/page/createPage.spec.ts
@@ -1,18 +1,19 @@
 import { path } from '@vuepress/utils'
 import { beforeAll, describe, expect, it, vi } from 'vitest'
+import type { Bundler } from '../../src/index.js'
 import { createBaseApp, createPage } from '../../src/index.js'
 
-const app = createBaseApp({
-  source: path.resolve(__dirname, 'fake-source'),
-  theme: { name: 'test' },
-  bundler: {} as any,
-})
+describe('should work without plugins', () => {
+  const app = createBaseApp({
+    source: path.resolve(__dirname, 'fake-source'),
+    theme: { name: 'test' },
+    bundler: {} as Bundler,
+  })
 
-beforeAll(async () => {
-  await app.init()
-})
+  beforeAll(async () => {
+    await app.init()
+  })
 
-describe('core > page > createPage', () => {
   it('should throw an error', async () => {
     const consoleError = console.error
     console.error = vi.fn()
@@ -86,12 +87,14 @@ describe('core > page > createPage', () => {
     )
     expect(page.chunkName).toBeTruthy()
   })
+})
 
+describe('should work with plugins', () => {
   it('should be extended by plugin correctly', async () => {
     const app = createBaseApp({
       source: path.resolve(__dirname, 'fake-source'),
       theme: { name: 'test' },
-      bundler: {} as any,
+      bundler: {} as Bundler,
     })
     app.use({
       name: 'foo',
diff --git a/packages/core/tests/page/inferPagePath.spec.ts b/packages/core/tests/page/inferPagePath.spec.ts
index 42eef99279..f65aced2ad 100644
--- a/packages/core/tests/page/inferPagePath.spec.ts
+++ b/packages/core/tests/page/inferPagePath.spec.ts
@@ -51,41 +51,39 @@ const TEST_CASES: [string, ReturnType][] = [
   ],
 ]
 
-describe('core > page > inferPagePath', () => {
-  describe('should infer page path according to relative path of page file', () => {
-    TEST_CASES.forEach(([source, expected]) => {
-      it(JSON.stringify(source), () => {
-        expect(
-          inferPagePath({
-            app,
-            filePathRelative: source,
-          }),
-        ).toEqual(expected)
-      })
+describe('should infer page path according to relative path of page file', () => {
+  TEST_CASES.forEach(([source, expected]) => {
+    it(JSON.stringify(source), () => {
+      expect(
+        inferPagePath({
+          app,
+          filePathRelative: source,
+        }),
+      ).toEqual(expected)
     })
   })
+})
 
-  it('should use `/` as the default locale path', () => {
-    expect(
-      inferPagePath({
-        app: appWithoutLocales,
-        filePathRelative: 'en/foo/bar.md',
-      }),
-    ).toEqual({
-      pathInferred: '/en/foo/bar.html',
-      pathLocale: '/',
-    })
+it('should use `/` as the default locale path', () => {
+  expect(
+    inferPagePath({
+      app: appWithoutLocales,
+      filePathRelative: 'en/foo/bar.md',
+    }),
+  ).toEqual({
+    pathInferred: '/en/foo/bar.html',
+    pathLocale: '/',
   })
+})
 
-  it('should handle empty file relative path', () => {
-    expect(
-      inferPagePath({
-        app,
-        filePathRelative: null,
-      }),
-    ).toEqual({
-      pathInferred: null,
-      pathLocale: '/',
-    })
+it('should handle empty file relative path', () => {
+  expect(
+    inferPagePath({
+      app,
+      filePathRelative: null,
+    }),
+  ).toEqual({
+    pathInferred: null,
+    pathLocale: '/',
   })
 })
diff --git a/packages/core/tests/page/renderPageContent.spec.ts b/packages/core/tests/page/renderPageContent.spec.ts
index 055beaf0a1..c4c3e756fd 100644
--- a/packages/core/tests/page/renderPageContent.spec.ts
+++ b/packages/core/tests/page/renderPageContent.spec.ts
@@ -1,155 +1,154 @@
 import { createMarkdown } from '@vuepress/markdown'
 import { path } from '@vuepress/utils'
 import { describe, expect, it } from 'vitest'
+import type { Bundler } from '../../src/index.js'
 import { createBaseApp, renderPageContent } from '../../src/index.js'
 
 const app = createBaseApp({
   source: path.resolve(__dirname, 'fake-source'),
   theme: { name: 'test' },
-  bundler: {} as any,
+  bundler: {} as Bundler,
 })
 app.markdown = createMarkdown()
 
-describe('core > page > renderPageContent', () => {
-  it('should render page content correctly', () => {
-    const resolved = renderPageContent({
-      app,
-      content: `\
+it('should render page content correctly', () => {
+  const resolved = renderPageContent({
+    app,
+    content: `\
 foobar
 
 `,
-      filePath: app.dir.source('foo.md'),
-      filePathRelative: 'foo.md',
-      options: {},
-    })
+    filePath: app.dir.source('foo.md'),
+    filePathRelative: 'foo.md',
+    options: {},
+  })
 
-    expect(resolved).toEqual({
-      contentRendered: '

foobar

\n', - deps: [], - frontmatter: {}, - headers: [], - links: [], - markdownEnv: { excerpt: '' }, - sfcBlocks: { - template: { - type: 'template', - content: '', - contentStripped: '

foobar

\n', - tagClose: '', - tagOpen: '', + tagOpen: '