Merge remote-tracking branch 'upstream/master' into feat/frontmatter-description

pull/170/head
Matias Capeletto 5 years ago
commit 255a793cf4

@ -1,3 +1,3 @@
github: [yyx990803, kiaking, posva, antfu, pikax]
github: [yyx990803, kiaking, posva, pikax]
open_collective: vuejs
patreon: evanyou

@ -0,0 +1,20 @@
name: Test
on: [push]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14, 15]
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: install and test
run: |
yarn install
yarn test

@ -1,3 +1,80 @@
## [0.11.5](https://github.com/vuejs/vitepress/compare/v0.11.4...v0.11.5) (2021-01-29)
### Bug Fixes
- avoid layout shift due to ads ([#176](https://github.com/vuejs/vitepress/issues/176)) ([78b026c](https://github.com/vuejs/vitepress/commit/78b026cb7aa5b40a7dd98a1337646b38b1fc5367))
- support symbolic links in building docs dist ([#184](https://github.com/vuejs/vitepress/issues/184)) ([#185](https://github.com/vuejs/vitepress/issues/185)) ([5190604](https://github.com/vuejs/vitepress/commit/51906043d318b2485ea8fc3aff4b4644c95dd3f4))
- update base option usage ([8cfdd19](https://github.com/vuejs/vitepress/commit/8cfdd1912dda9153daa7cb4db8e5c9f0cab4d654))
### Features
- $lang and $localePath globals ([#166](https://github.com/vuejs/vitepress/issues/166)) ([#167](https://github.com/vuejs/vitepress/issues/167)) ([481c451](https://github.com/vuejs/vitepress/commit/481c4513d78450951add6177824b7996b89ae034))
## [0.11.4](https://github.com/vuejs/vitepress/compare/v0.11.3...v0.11.4) (2021-01-19)
- Latest Vite beta.32 compat (internal changes).
## [0.11.3](https://github.com/vuejs/vitepress/compare/v0.11.2...v0.11.3) (2021-01-13)
### Bug Fixes
- ignore non-html links in router and prefetch ([3e6e61b](https://github.com/vuejs/vitepress/commit/3e6e61bcea8d4a34079428fcce3ecd25af1ae4f7))
## [0.11.2](https://github.com/vuejs/vitepress/compare/v0.11.1...v0.11.2) (2021-01-12)
### Bug Fixes
- aria label id ([a0f463a](https://github.com/vuejs/vitepress/commit/a0f463af8fd828d24d9a01c3d808d85af8a71c9f))
### Performance Improvements
- generate preload directives for dynamicImport chunks too ([b9fc0cb](https://github.com/vuejs/vitepress/commit/b9fc0cb78d43949b417376498939daa892a33334))
## [0.11.1](https://github.com/vuejs/vitepress/compare/v0.11.0...v0.11.1) (2021-01-12)
### Features
- render content on home page ([ca631c7](https://github.com/vuejs/vitepress/commit/ca631c7f516ad6c643d252dd81e03e29fb3b9e05))
# [0.11.0](https://github.com/vuejs/vitepress/compare/v0.10.8...v0.11.0) (2021-01-12)
### Code Refactoring
- move default theme to 'vitepress/theme' ([a79e1e1](https://github.com/vuejs/vitepress/commit/a79e1e1916a71271728e6fe7c2b734fc2f209518))
### Features
- support customData in config ([4072dc5](https://github.com/vuejs/vitepress/commit/4072dc5f7ede381709fce49e9a29d6af4f7ab81a))
### BREAKING CHANGES
- the default theme is now exposed via 'vitepress/theme',
instead of a named export from 'vitepress'. This change fixes the case where
when a completely custom theme is used, importing anything from 'vitepress'
also imports the entire default theme.
## [0.10.8](https://github.com/vuejs/vitepress/compare/v0.10.7...v0.10.8) (2021-01-11)
### Bug Fixes
- resolve page hash case-insenstively, close [#202](https://github.com/vuejs/vitepress/issues/202) ([#203](https://github.com/vuejs/vitepress/issues/203)) ([bac1ce2](https://github.com/vuejs/vitepress/commit/bac1ce2d01469ff7586437f43b0d665b1c5eb278))
## [0.10.7](https://github.com/vuejs/vitepress/compare/v0.10.6...v0.10.7) (2021-01-05)
### Features
Bump to Vite 2.0.0-beta.8
### Bug Fixes
- scrollbar when using line highlight ([#200](https://github.com/vuejs/vitepress/issues/200)) ([b6ba8a9](https://github.com/vuejs/vitepress/commit/b6ba8a943cc0488410a438c6c2f277c1c33a90bf))
## [0.10.6](https://github.com/vuejs/vitepress/compare/v0.10.5...v0.10.6) (2021-01-04)
### Bug Fixes
- bump vite and fix win32 path resolving ([#198](https://github.com/vuejs/vitepress/issues/198)) ([da2c4f6](https://github.com/vuejs/vitepress/commit/da2c4f694e6dd2d11ff061b8eb7cae2354ae930d))
## [0.10.5](https://github.com/vuejs/vitepress/compare/v0.10.4...v0.10.5) (2021-01-02)
### Bug Fixes

@ -1,5 +1,6 @@
# (WIP) VitePress 📝💨
[![Test](https://github.com/vuejs/vitepress/workflows/Test/badge.svg)](https://github.com/vuejs/vitepress/actions)
[![npm](https://img.shields.io/npm/v/vitepress)](https://www.npmjs.com/package/vitepress)
---

@ -39,11 +39,11 @@ export default {
}
```
If you want to extend the default theme, you can import it from `vitepress/dist/client/theme-default`.
If you want to extend the default theme, you can import it from `vitepress/theme`.
```js
// .vitepress/theme/index.js
import DefaultTheme from 'vitepress/dist/client/theme-default'
import DefaultTheme from 'vitepress/theme'
export default {
...DefaultTheme

@ -34,7 +34,7 @@ $ yarn docs:build
$ yarn docs:serve
```
The `serve` command will boot up local static web server that serves the files from `.vitepress/dist` at http://localhost:3000. It's an easy way to check if the production build looks OK in your local environment.
The `serve` command will boot up local static web server that serves the files from `.vitepress/dist` at http://localhost:5000. It's an easy way to check if the production build looks OK in your local environment.
You may configure the port of the server py passing `--port` flag as an argument.
@ -90,10 +90,6 @@ cd -
You can also run the above script in your CI setup to enable automatic deployment on each push.
:::
::: warning
GitHub pages have issues with the underscore in the dist `_assets` folder. To fix this an empty file name `.nojekyll` needs to be placed in the docs `public` directory. See [Bypassing Jekyll on GitHub Pages](https://github.blog/2009-12-29-bypassing-jekyll-on-github-pages/).
:::
### GitHub Pages and Travis CI
1. Set the correct `base` in `docs/.vitepress/config.js`.

@ -64,6 +64,14 @@ Reference of `$page.frontmatter`.
}
```
## $lang
The language of the current page. Default: `en-US`.
## $localePath
The locale path prefix for the current page. Default: `/`.
## $title
Value of the `<title>` label used for the current page.

@ -1,6 +1,6 @@
{
"name": "vitepress",
"version": "0.10.5",
"version": "0.11.5",
"description": "Vite & Vue powered static site generator",
"main": "dist/node/index.js",
"typings": "types/index.d.ts",
@ -31,7 +31,7 @@
"docs-dev": "node ./bin/vitepress dev docs",
"docs-debug": "node --inspect-brk ./bin/vitepress dev docs",
"docs-build": "yarn build && node ./bin/vitepress build docs",
"docs-serve": "yarn docs-build && node ./bin/vitepress serve docs"
"docs-serve": "node ./bin/vitepress serve docs"
},
"engines": {
"node": ">=12.0.0"
@ -65,7 +65,7 @@
"dependencies": {
"@docsearch/css": "^1.0.0-alpha.28",
"@docsearch/js": "^1.0.0-alpha.28",
"@vitejs/plugin-vue": "^1.0.3",
"@vitejs/plugin-vue": "^1.1.4",
"@vue/compiler-sfc": "^3.0.5",
"@vue/server-renderer": "^3.0.5",
"chalk": "^4.1.0",
@ -73,8 +73,8 @@
"debug": "^4.1.1",
"diacritics": "^1.3.0",
"escape-html": "^1.0.3",
"fs-extra": "^9.0.0",
"globby": "^11.0.1",
"fs-extra": "^9.1.0",
"globby": "^11.0.2",
"gray-matter": "^4.0.2",
"lru-cache": "^6.0.0",
"markdown-it": "^10.0.0",
@ -83,36 +83,36 @@
"markdown-it-emoji": "^1.4.0",
"markdown-it-table-of-contents": "^0.4.4",
"minimist": "^1.2.5",
"ora": "^5.1.0",
"ora": "^5.3.0",
"polka": "^0.5.2",
"prismjs": "^1.20.0",
"sirv": "^1.0.10",
"prismjs": "^1.23.0",
"sirv": "^1.0.11",
"slash": "^3.0.0",
"vite": "^2.0.0-beta.2",
"vite": "2.0.0-beta.50",
"vue": "^3.0.5"
},
"devDependencies": {
"@types/compression": "^1.7.0",
"@types/fs-extra": "^9.0.1",
"@types/jest": "^26.0.15",
"@types/koa": "^2.11.6",
"@types/jest": "^26.0.20",
"@types/koa": "^2.11.7",
"@types/koa-static": "^4.0.1",
"@types/lru-cache": "^5.1.0",
"@types/markdown-it": "^10.0.2",
"@types/node": "^13.13.4",
"@types/node": "^14.14.25",
"@types/postcss-load-config": "^2.0.1",
"chokidar": "^3.4.2",
"chokidar": "^3.5.1",
"conventional-changelog-cli": "^2.1.0",
"enquirer": "^2.3.6",
"execa": "^4.1.0",
"execa": "^5.0.0",
"jest": "^26.6.3",
"lint-staged": "^10.3.0",
"npm-run-all": "^4.1.5",
"prettier": "^2.0.5",
"rimraf": "^3.0.2",
"rollup": "^2.33.3",
"rollup": "^2.38.5",
"semver": "^7.3.2",
"ts-jest": "^26.4.4",
"ts-jest": "^26.5.0",
"typescript": "^4.1.3",
"yorkie": "^2.0.0"
}

@ -7,7 +7,7 @@ export function useUpdateHead(route: Route, siteDataByRouteRef: Ref<SiteData>) {
let isFirstUpdate = true
const updateHeadTags = (newTags: HeadConfig[]) => {
if (process.env.NODE_ENV === 'production' && isFirstUpdate) {
if (import.meta.env.PROD && isFirstUpdate) {
// in production, the initial meta tags are already pre-rendered so we
// skip the first update.
isFirstUpdate = false

@ -75,6 +75,11 @@ export function usePrefetch() {
rIC(() => {
document.querySelectorAll('#app a').forEach((link) => {
const { target, hostname, pathname } = link as HTMLAnchorElement
const extMatch = pathname.match(/\.\w+$/)
if (extMatch && extMatch[0] !== '.html') {
return
}
if (
// only prefetch same tab navigation, since a new tab will load
// the lean js chunk instead.

@ -1,3 +1,4 @@
import 'vite/dynamic-import-polyfill'
import { App, createApp as createClientApp, createSSRApp, h } from 'vue'
import { inBrowser, pathToFile } from './utils'
import { Router, RouterSymbol, createRouter } from './router'
@ -54,7 +55,7 @@ export function createApp() {
}
function newApp(): App {
return process.env.NODE_ENV === 'production'
return import.meta.env.PROD
? createSSRApp(VitePressApp)
: createClientApp(VitePressApp)
}
@ -85,6 +86,7 @@ function newRouter(): Router {
}
// SSR: sync require
// @ts-ignore
return require(pageFilePath)
}, NotFound)
}
@ -111,7 +113,7 @@ function shouldHotReload(payload: any): boolean {
if (inBrowser) {
const { app, router } = createApp()
// wait unitl page component is fetched before mounting
// wait until page component is fetched before mounting
router.go().then(() => {
app.mount('#app')
})

@ -42,6 +42,25 @@ export function mixinGlobalComputed(
}
},
$lang: {
get() {
return siteByRoute.value.lang
}
},
$localePath: {
get() {
const { locales } = site.value
const { lang } = siteByRoute.value
const path = Object.keys(locales).find(
(lp) => locales[lp].lang === lang
)
return (locales && path) || '/'
}
},
$title: {
get() {
return page.value.title
@ -65,13 +84,11 @@ export function mixinGlobalComputed(
}
export function mixinGlobalComponents(app: App) {
const isProd = process.env.NODE_ENV === 'production'
app.component('Content', Content)
app.component('ClientOnly', ClientOnly)
app.component(
'Debug',
isProd
import.meta.env.PROD
? () => null
: defineAsyncComponent(() => import('./components/Debug.vue'))
)

@ -23,7 +23,7 @@ const getDefaultRoute = (): Route => ({
path: '/',
component: null,
// this will be set upon initial page load, which is before
// the app is mounted, so it's guaranteed to be avaiable in
// the app is mounted, so it's guaranteed to be available in
// components
data: null as any
})
@ -114,6 +114,7 @@ export function createRouter(
if (link) {
const { href, protocol, hostname, pathname, hash, target } = link
const currentUrl = window.location
const extMatch = pathname.match(/\.\w+$/)
// only intercept inbound links
if (
!e.ctrlKey &&
@ -122,7 +123,8 @@ export function createRouter(
!e.metaKey &&
target !== `_blank` &&
protocol === currentUrl.protocol &&
hostname === currentUrl.hostname
hostname === currentUrl.hostname &&
!(extMatch && extMatch[0] !== '.html')
) {
e.preventDefault()
if (pathname === currentUrl.pathname) {

@ -17,7 +17,7 @@ export function pathToFile(path: string): string {
}
if (import.meta.env.DEV) {
// awlays force re-fetch content in dev
// always force re-fetch content in dev
pagePath += `.md?t=${Date.now()}`
} else {
// in production, each .md file is built into a .md.js file following
@ -28,7 +28,7 @@ export function pathToFile(path: string): string {
pagePath = pagePath.slice(base.length).replace(/\//g, '_') + '.md'
// client production build needs to account for page hash, which is
// injected directly in the page's html
const pageHash = __VP_HASH_MAP__[pagePath]
const pageHash = __VP_HASH_MAP__[pagePath.toLowerCase()]
pagePath = `${base}assets/${pagePath}.${pageHash}.js`
} else {
// ssr build uses much simpler name mapping

@ -5,7 +5,7 @@
export type { Router, Route } from './app/router'
// theme types
export * from './app/theme'
export type { Theme, EnhanceAppContext } from './app/theme'
// composables
export { useRouter, useRoute } from './app/router'
@ -24,6 +24,3 @@ import { ComponentOptions } from 'vue'
import _Debug from './app/components/Debug.vue'
const Debug = _Debug as ComponentOptions
export { Debug }
// default theme
export { default as DefaultTheme } from './theme-default'

@ -36,12 +36,16 @@
<Page v-else>
<template #top>
<slot name="page-top-ads">
<div
id="ads-container"
v-if="theme.carbonAds && theme.carbonAds.carbon"
>
<CarbonAds
v-if="theme.carbonAds"
:key="'carbon' + page.relativePath"
:code="theme.carbonAds.carbon"
:placement="theme.carbonAds.placement"
/>
</div>
</slot>
<slot name="page-top" />
</template>
@ -154,3 +158,34 @@ const pageClasses = computed(() => {
]
})
</script>
<style>
#ads-container {
margin: 0 auto;
}
@media (min-width: 420px) {
#ads-container {
position: relative;
right: 0;
float: right;
margin: -8px -8px 24px 24px;
width: 146px;
}
}
@media (max-width: 420px) {
#ads-container {
/* Avoid layout shift */
height: 105px;
}
}
@media (min-width: 1400px) {
#ads-container {
position: fixed;
right: 8px;
bottom: 8px;
}
}
</style>

@ -156,7 +156,7 @@ function initialize(userOptions: any) {
}
.DocSearch {
--docsearch-primary-color: #42b983;
--docsearch-primary-color: var(--c-brand);
--docsearch-highlight-color: var(--docsearch-primary-color);
--docsearch-searchbox-shadow: inset 0 0 0 2px var(--docsearch-primary-color);
--docsearch-text-color: var(--c-text-light);

@ -26,21 +26,19 @@ onMounted(() => {
border-radius: 4px;
margin: 0 auto;
max-width: 280px;
font-size: .75rem;
background-color: rgba(255, 255, 255, .8);
font-size: 0.75rem;
background-color: rgba(255, 255, 255, 0.8);
min-height: 105.38px; /* avoid layout shift on mobile */
}
.carbon-ads::after {
clear: both;
display: block;
content: "";
content: '';
}
@media (min-width: 420px) {
.carbon-ads {
position: relative;
right: -8px;
z-index: 1;
float: right;
margin: -8px -8px 24px 24px;
@ -53,10 +51,7 @@ onMounted(() => {
@media (min-width: 1400px) {
.carbon-ads {
position: fixed;
top: auto;
right: 8px;
bottom: 8px;
float: none;
margin: 0;
}
@ -64,7 +59,7 @@ onMounted(() => {
.carbon-ads :deep(.carbon-img) {
float: left;
margin-right: .75rem;
margin-right: 0.75rem;
max-width: 100px;
border: 1px solid var(--c-divider);
}

@ -3,6 +3,9 @@
<HomeHero />
<slot name="hero" />
<HomeFeatures />
<div class="home-content">
<Content />
</div>
<slot name="features" />
<HomeFooter />
<slot name="footer" />
@ -19,4 +22,17 @@ import HomeFooter from './HomeFooter.vue'
.home {
padding-top: var(--header-height);
}
.home-content {
max-width: 960px;
margin: 0px auto;
padding: 0 1.5rem;
}
@media (max-width: 720px) {
.home-content {
max-width: 392px;
padding: 0;
}
}
</style>

@ -4,7 +4,7 @@
<img class="image" :src="$withBase($frontmatter.heroImage)" :alt="$frontmatter.heroAlt" />
</figure>
<h1 v-if="hasHeroText" class="title">{{ heroText }}</h1>
<h1 v-if="hasHeroText" id="main-title" class="title">{{ heroText }}</h1>
<p v-if="hasTagline" class="description">{{ tagline }}</p>
<NavLink

@ -113,7 +113,7 @@ function isAnchorActive(
}
function throttleAndDebounce(fn: () => void, delay: number): () => void {
let timeout: NodeJS.Timeout
let timeout: number
let called = false
return () => {

@ -85,6 +85,7 @@ li > div[class*='language-'] {
font-family: var(--code-font-family);
font-size: var(--code-font-size);
user-select: none;
overflow: hidden;
}
.highlight-lines .highlighted {

@ -6,7 +6,7 @@
"target": "esnext",
"module": "esnext",
"lib": ["ESNext", "DOM"],
"types": ["vite"],
"types": ["vite/client"],
"paths": {
"/@shared/*": ["shared/*"],
"/@types/*": ["../../types/*"],

@ -18,7 +18,6 @@ export const SITE_DATA_ID = '@siteData'
export const SITE_DATA_REQUEST_PATH = '/' + SITE_DATA_ID
export function resolveAliases(
root: string,
themeDir: string,
userConfig: UserConfig
): AliasOptions {
@ -38,6 +37,10 @@ export function resolveAliases(
find: /^vitepress$/,
replacement: path.join(__dirname, '../client/index')
},
{
find: /^vitepress\/theme$/,
replacement: path.join(__dirname, '../client/theme-default/index')
},
// alias for local linked development
{ find: /^vitepress\//, replacement: PKG_ROOT + '/' },
// make sure it always use the same vue dependency that comes with

@ -3,7 +3,7 @@ import path from 'path'
import slash from 'slash'
import { APP_PATH } from '../alias'
import { SiteConfig } from '../config'
import { RollupOutput, ExternalOption } from 'rollup'
import { RollupOutput } from 'rollup'
import { build, BuildOptions, UserConfig as ViteUserConfig } from 'vite'
import { createVitePressPlugin } from '../plugin'
@ -36,30 +36,29 @@ export async function bundle(
const resolveViteConfig = (ssr: boolean): ViteUserConfig => ({
root,
base: config.site.base,
logLevel: 'warn',
plugins: createVitePressPlugin(root, config, ssr, pageToHashMap),
// @ts-ignore
ssr: {
noExternal: ['vitepress']
},
build: {
...options,
base: config.site.base,
emptyOutDir: true,
ssr,
outDir: ssr ? config.tempDir : config.outDir,
cssCodeSplit: false,
rollupOptions: {
...rollupOptions,
input,
external: ssr
? resolveExternal(rollupOptions?.external)
: rollupOptions?.external,
// important so that each page chunk and the index export things for each
// other
preserveEntrySignatures: 'allow-extension',
output: {
...rollupOptions?.output,
...(ssr
? {
format: 'cjs',
exports: 'named',
entryFileNames: '[name].js'
}
? {}
: {
chunkFileNames(chunk): string {
if (!chunk.isEntry && /runtime/.test(chunk.name)) {
@ -96,24 +95,3 @@ export async function bundle(
return [clientResult, serverResult, pageToHashMap]
}
function resolveExternal(
userExternal: ExternalOption | undefined
): ExternalOption {
const required = ['vue', /^@vue\//]
if (!userExternal) {
return required
}
if (Array.isArray(userExternal)) {
return [...required, ...userExternal]
} else if (typeof userExternal === 'function') {
return (src, importer, isResolved) => {
if (src === 'vue' || /^@vue\//.test(src)) {
return true
}
return userExternal(src, importer, isResolved)
}
} else {
return [...required, userExternal]
}
}

@ -2,6 +2,7 @@ import path from 'path'
import fs from 'fs-extra'
import { SiteConfig, resolveSiteDataByRoute } from '../config'
import { HeadConfig } from '../../../types/shared'
import { normalizePath } from 'vite'
import { RollupOutput, OutputChunk, OutputAsset } from 'rollup'
const escape = require('escape-html')
@ -28,7 +29,7 @@ export async function renderPage(
const pageServerJsFileName = pageName + '.js'
// for any initial page load, we only need the lean version of the page js
// since the static content is already on the page!
const pageHash = pageToHashMap[pageName]
const pageHash = pageToHashMap[pageName.toLowerCase()]
const pageClientJsFileName = `assets/${pageName}.${pageHash}.lean.js`
// resolve page data so we can render head tags
@ -90,12 +91,20 @@ function resolvePageImports(
) {
// find the page's js chunk and inject script tags for its imports so that
// they are start fetching as early as possible
const srcPath = path.resolve(config.root, page)
const srcPath = normalizePath(
fs.realpathSync(path.resolve(config.root, page))
)
const pageChunk = result.output.find(
(chunk) => chunk.type === 'chunk' && chunk.facadeModuleId === srcPath
) as OutputChunk
return Array.from(new Set([...indexChunk.imports, ...pageChunk.imports]))
return Array.from(
new Set([
...indexChunk.imports,
...indexChunk.dynamicImports,
...pageChunk.imports,
...pageChunk.dynamicImports
])
)
}
function renderHead(head: HeadConfig[]) {

@ -20,7 +20,7 @@ export interface UserConfig<ThemeConfig = any> {
locales?: Record<string, LocaleConfig>
alias?: Record<string, string>
markdown?: MarkdownOptions
// TODO locales support etc.
customData?: any
}
export interface SiteConfig<ThemeConfig = any> {
@ -30,7 +30,7 @@ export interface SiteConfig<ThemeConfig = any> {
themeDir: string
outDir: string
tempDir: string
aliases: AliasOptions
alias: AliasOptions
pages: string[]
markdown?: MarkdownOptions
}
@ -59,7 +59,7 @@ export async function resolveConfig(
outDir: resolve(root, 'dist'),
tempDir: path.resolve(APP_PATH, 'temp'),
markdown: userConfig.markdown,
aliases: resolveAliases(root, themeDir, userConfig)
alias: resolveAliases(themeDir, userConfig)
}
return config
@ -91,6 +91,7 @@ export async function resolveSiteData(root: string): Promise<SiteData> {
base: userConfig.base ? userConfig.base.replace(/([^/])$/, '$1/') : '/',
head: userConfig.head || [],
themeConfig: userConfig.themeConfig || {},
locales: userConfig.locales || {}
locales: userConfig.locales || {},
customData: userConfig.customData || {}
}
}

@ -24,15 +24,14 @@ const isPageChunk = (
export function createVitePressPlugin(
root: string,
{ configPath, aliases, markdown, themeDir, site }: SiteConfig,
{ configPath, alias, markdown, site }: SiteConfig,
ssr = false,
pageToHashMap?: Record<string, string>
): Plugin[] {
const markdownToVue = createMarkdownToVueRenderFn(root, markdown)
const vuePlugin = createVuePlugin({
include: [/\.vue$/, /\.md$/],
ssr
include: [/\.vue$/, /\.md$/]
})
let siteData = site
@ -42,12 +41,14 @@ export function createVitePressPlugin(
config() {
return {
alias: aliases,
transformInclude: /\.md$/,
alias,
define: {
__CARBON__: !!site.themeConfig.carbonAds?.carbon,
__BSA__: !!site.themeConfig.carbonAds?.custom,
__ALGOLIA__: !!site.themeConfig.algolia
},
optimizeDeps: {
exclude: ['@docsearch/js']
}
}
},
@ -74,8 +75,7 @@ export function createVitePressPlugin(
configureServer(server) {
// serve our index.html after vite history fallback
return () => {
// @ts-ignore
server.app.use((req, res, next) => {
server.middlewares.use((req, res, next) => {
if (req.url!.endsWith('.html')) {
res.statusCode = 200
res.end(
@ -123,7 +123,7 @@ export function createVitePressPlugin(
if (isPageChunk(chunk)) {
// record page -> hash relations
const hash = chunk.fileName.match(hashRE)![1]
pageToHashMap![chunk.name] = hash
pageToHashMap![chunk.name.toLowerCase()] = hash
// inject another chunk with the content stripped
bundle[name + '-lean'] = {

@ -30,6 +30,6 @@ export async function serve(options: ServeOptions = {}) {
.use(compress, serve)
.listen(port, (err: any) => {
if (err) throw err
console.log(`Built site served at http://localhost:${port}.\n`)
console.log(`Built site served at http://localhost:${port}/\n`)
})
}

@ -10,6 +10,7 @@ export async function createServer(
return createViteServer({
root,
base: config.site.base,
// logLevel: 'warn',
plugins: createVitePressPlugin(root, config),
server: serverOptions

3
theme.d.ts vendored

@ -0,0 +1,3 @@
// so that users can do `import DefaultTheme from 'vitepress/theme'`
import DefaultTheme from './dist/client/theme-default/index'
export default DefaultTheme

3
types/index.d.ts vendored

@ -1,5 +1,4 @@
export * from './shared'
export * from '../dist/node/index'
export * from '../dist/client/app/exports'
export * from '../dist/client/index'
export * from '../dist/client/theme-default/config'
export { default as defaultTheme } from '../dist/client/theme-default/index'

1
types/shared.d.ts vendored

@ -17,6 +17,7 @@ export interface SiteData<ThemeConfig = any> {
head: HeadConfig[]
themeConfig: ThemeConfig
locales: Record<string, LocaleConfig>
customData: any
}
export type HeadConfig =

@ -796,7 +796,7 @@
dependencies:
"@types/istanbul-lib-report" "*"
"@types/jest@26.x", "@types/jest@^26.0.15":
"@types/jest@26.x":
version "26.0.19"
resolved "https://registry.yarnpkg.com/@types/jest/-/jest-26.0.19.tgz#e6fa1e3def5842ec85045bd5210e9bb8289de790"
integrity sha512-jqHoirTG61fee6v6rwbnEuKhpSKih0tuhqeFbCmMmErhtu3BYlOZaXWjffgOstMM4S/3iQD31lI5bGLTrs97yQ==
@ -804,6 +804,14 @@
jest-diff "^26.0.0"
pretty-format "^26.0.0"
"@types/jest@^26.0.20":
version "26.0.20"
resolved "https://registry.yarnpkg.com/@types/jest/-/jest-26.0.20.tgz#cd2f2702ecf69e86b586e1f5223a60e454056307"
integrity sha512-9zi2Y+5USJRxd0FsahERhBwlcvFh6D2GLQnY2FH2BzK8J9s9omvNHIbvABwIluXa0fD8XVKMLTO0aOEuUfACAA==
dependencies:
jest-diff "^26.0.0"
pretty-format "^26.0.0"
"@types/keygrip@*":
version "1.0.2"
resolved "https://registry.yarnpkg.com/@types/keygrip/-/keygrip-1.0.2.tgz#513abfd256d7ad0bf1ee1873606317b33b1b2a72"
@ -831,7 +839,7 @@
"@types/koa" "*"
"@types/koa-send" "*"
"@types/koa@*", "@types/koa@^2.11.6":
"@types/koa@*":
version "2.11.6"
resolved "https://registry.yarnpkg.com/@types/koa/-/koa-2.11.6.tgz#b7030caa6b44af801c2aea13ba77d74aff7484d5"
integrity sha512-BhyrMj06eQkk04C97fovEDQMpLpd2IxCB4ecitaXwOKGq78Wi2tooaDOWOFGajPk8IkQOAtMppApgSVkYe1F/A==
@ -845,6 +853,20 @@
"@types/koa-compose" "*"
"@types/node" "*"
"@types/koa@^2.11.7":
version "2.11.7"
resolved "https://registry.yarnpkg.com/@types/koa/-/koa-2.11.7.tgz#3b38f3b9faa66315a84890a771d166fb36463100"
integrity sha512-1iXJZZWCePoMe9LGSIPWsu5k5RI4ooXijW78c+nljMn3YbUts8PXoEESu1OeFmrazLPl1l97vTxzwvmH32TWVQ==
dependencies:
"@types/accepts" "*"
"@types/content-disposition" "*"
"@types/cookies" "*"
"@types/http-assert" "*"
"@types/http-errors" "*"
"@types/keygrip" "*"
"@types/koa-compose" "*"
"@types/node" "*"
"@types/linkify-it@*":
version "3.0.0"
resolved "https://registry.yarnpkg.com/@types/linkify-it/-/linkify-it-3.0.0.tgz#c0ca4c253664492dbf47a646f31cfd483a6bbc95"
@ -885,10 +907,10 @@
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.16.tgz#3cc351f8d48101deadfed4c9e4f116048d437b4b"
integrity sha512-naXYePhweTi+BMv11TgioE2/FXU4fSl29HAH1ffxVciNsH3rYXjNP2yM8wqmSm7jS20gM8TIklKiTen+1iVncw==
"@types/node@^13.13.4":
version "13.13.38"
resolved "https://registry.yarnpkg.com/@types/node/-/node-13.13.38.tgz#66a7c068305dbd64cf167d0f6b6b6be71dd453e1"
integrity sha512-oxo8j9doh7ab9NwDA9bCeFfjHRF/uzk+fTljCy8lMjZ3YzZGAXNDKhTE3Byso/oy32UTUQIXB3HCVHu3d2T3xg==
"@types/node@^14.14.25":
version "14.14.25"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.25.tgz#15967a7b577ff81383f9b888aa6705d43fbbae93"
integrity sha512-EPpXLOVqDvisVxtlbvzfyqSsFeQxltFbluZNRndIb8tr9KiBnYNLzrc1N3pyKUCww2RNrfHDViqDWWE1LCJQtQ==
"@types/normalize-package-data@^2.4.0":
version "2.4.0"
@ -948,10 +970,10 @@
dependencies:
"@types/yargs-parser" "*"
"@vitejs/plugin-vue@^1.0.3":
version "1.0.3"
resolved "https://registry.yarnpkg.com/@vitejs/plugin-vue/-/plugin-vue-1.0.3.tgz#2df3c22802f2d2142ae3bd8d3e93623df790446d"
integrity sha512-sOVHFS97zxuRLAMj10C9Vaiv3WeEwnhtee9V+yv/G/xoJTXPJIRct4Nj2unPtp5zAUoCL+iTVbIC6LnNmNE4Hw==
"@vitejs/plugin-vue@^1.1.4":
version "1.1.4"
resolved "https://registry.yarnpkg.com/@vitejs/plugin-vue/-/plugin-vue-1.1.4.tgz#1dd388519b75439b7733601b55238ca691864796"
integrity sha512-cUDILd++9jdhdjpuhgJofQqOabOKe+kTWTE2HQY2PBHEUO2fgwTurLE0cJg9UcIo1x4lHfsp+59S9TBCHgTZkw==
"@vue/compiler-core@3.0.5":
version "3.0.5"
@ -1328,6 +1350,11 @@ balanced-match@^1.0.0:
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c=
base64-js@^1.3.1:
version "1.5.1"
resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a"
integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==
base@^0.11.1:
version "0.11.2"
resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f"
@ -1358,6 +1385,15 @@ binary-extensions@^2.0.0:
resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.1.0.tgz#30fa40c9e7fe07dbc895678cd287024dea241dd9"
integrity sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==
bl@^4.0.3:
version "4.0.4"
resolved "https://registry.yarnpkg.com/bl/-/bl-4.0.4.tgz#f4fda39f81a811d0df6368c1ed91dae499d1c900"
integrity sha512-7tdr4EpSd7jJ6tuQ21vu2ke8w7pNEstzj1O8wwq6sNNzO3UDi5MA8Gny/gquCj7r2C6fHudg8tKRGyjRgmvNxQ==
dependencies:
buffer "^5.5.0"
inherits "^2.0.4"
readable-stream "^3.4.0"
bluebird@^3.7.2:
version "3.7.2"
resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f"
@ -1418,6 +1454,14 @@ buffer-from@1.x, buffer-from@^1.0.0:
resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef"
integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==
buffer@^5.5.0:
version "5.7.1"
resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0"
integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==
dependencies:
base64-js "^1.3.1"
ieee754 "^1.1.13"
bytes@3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048"
@ -1531,10 +1575,10 @@ char-regex@^1.0.2:
resolved "https://registry.yarnpkg.com/char-regex/-/char-regex-1.0.2.tgz#d744358226217f981ed58f479b1d6bcc29545dcf"
integrity sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==
chokidar@^3.4.2:
version "3.4.3"
resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.4.3.tgz#c1df38231448e45ca4ac588e6c79573ba6a57d5b"
integrity sha512-DtM3g7juCXQxFVSNPNByEC2+NImtBuxQQvWlHunpJIS5Ocr0lG306cC7FCi7cEA0fzmybPUIl4txBIobk1gGOQ==
chokidar@^3.5.1:
version "3.5.1"
resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.1.tgz#ee9ce7bbebd2b79f49f304799d5468e31e14e68a"
integrity sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw==
dependencies:
anymatch "~3.1.1"
braces "~3.0.2"
@ -1544,7 +1588,7 @@ chokidar@^3.4.2:
normalize-path "~3.0.0"
readdirp "~3.5.0"
optionalDependencies:
fsevents "~2.1.2"
fsevents "~2.3.1"
ci-info@^1.5.0:
version "1.6.0"
@ -1583,7 +1627,7 @@ cli-cursor@^3.1.0:
dependencies:
restore-cursor "^3.1.0"
cli-spinners@^2.4.0:
cli-spinners@^2.5.0:
version "2.5.0"
resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.5.0.tgz#12763e47251bf951cb75c201dfa58ff1bcb2d047"
integrity sha512-PC+AmIuK04E6aeSs/pUccSujsTzBhu4HzC2dL+CfJB/Jcc2qTRbEwZQDfIUpt2Xl8BodYBEq8w4fc0kU2I9DjQ==
@ -1940,7 +1984,7 @@ cross-spawn@^6.0.0, cross-spawn@^6.0.5:
shebang-command "^1.2.0"
which "^1.2.9"
cross-spawn@^7.0.0:
cross-spawn@^7.0.0, cross-spawn@^7.0.3:
version "7.0.3"
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6"
integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==
@ -2221,10 +2265,10 @@ es-to-primitive@^1.2.1:
is-date-object "^1.0.1"
is-symbol "^1.0.2"
esbuild@^0.8.26:
version "0.8.26"
resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.8.26.tgz#a85491617ebd2bd35ca4bf479239487eb6819d71"
integrity sha512-u3MMHOOumdWoAKF+073GHPpzvVB2cM+y9VD4ZwYs1FAQ6atRPISya35dbrbOu/mM68mQ42P+nwPzQVBTfQhkvQ==
esbuild@^0.8.34:
version "0.8.42"
resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.8.42.tgz#26101cf17fe4c4602c7c767e3177cf0c538073ac"
integrity sha512-zUtj5RMqROCCCH0vV/a7cd8YQg8I0GWBhV3A3PklWRT+oM/YwVbnrtFnITzE1otGdnXplWHWdZ4OcYiV0PN+JQ==
escape-html@^1.0.3:
version "1.0.3"
@ -2319,6 +2363,21 @@ execa@^4.0.0, execa@^4.1.0:
signal-exit "^3.0.2"
strip-final-newline "^2.0.0"
execa@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/execa/-/execa-5.0.0.tgz#4029b0007998a841fbd1032e5f4de86a3c1e3376"
integrity sha512-ov6w/2LCiuyO4RLYGdpFGjkcs0wMTgGE8PrkTHikeUy5iJekXyPIKUjifk5CsE0pt7sMCrMZ3YNqoCj6idQOnQ==
dependencies:
cross-spawn "^7.0.3"
get-stream "^6.0.0"
human-signals "^2.1.0"
is-stream "^2.0.0"
merge-stream "^2.0.0"
npm-run-path "^4.0.1"
onetime "^5.1.2"
signal-exit "^3.0.3"
strip-final-newline "^2.0.0"
exit@^0.1.2:
version "0.1.2"
resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c"
@ -2507,15 +2566,15 @@ fragment-cache@^0.2.1:
dependencies:
map-cache "^0.2.2"
fs-extra@^9.0.0:
version "9.0.1"
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.0.1.tgz#910da0062437ba4c39fedd863f1675ccfefcb9fc"
integrity sha512-h2iAoN838FqAFJY2/qVpzFXy+EBxfVE220PalAqQLDVsFOHLJrZvut5puAbCdNv6WJk+B8ihI+k0c7JK5erwqQ==
fs-extra@^9.1.0:
version "9.1.0"
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d"
integrity sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==
dependencies:
at-least-node "^1.0.0"
graceful-fs "^4.2.0"
jsonfile "^6.0.1"
universalify "^1.0.0"
universalify "^2.0.0"
fs.realpath@^1.0.0:
version "1.0.0"
@ -2532,6 +2591,11 @@ fsevents@~2.1.2:
resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.3.tgz#fb738703ae8d2f9fe900c33836ddebee8b97f23e"
integrity sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==
fsevents@~2.3.1:
version "2.3.1"
resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.1.tgz#b209ab14c61012636c8863507edf7fb68cc54e9f"
integrity sha512-YR47Eg4hChJGAB1O3yEAOkGO+rlzutoICGqGo9EZ4lKWokzZRSyIW1QmTzqjtw8MJdj9srP869CuWw/hyzSiBw==
function-bind@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d"
@ -2608,6 +2672,11 @@ get-stream@^5.0.0:
dependencies:
pump "^3.0.0"
get-stream@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.0.tgz#3e0012cb6827319da2706e601a1583e8629a6718"
integrity sha512-A1B3Bh1UmL0bidM/YX2NsCOTnGJePL9rO/M+Mw3m9f2gUpfokS0hi5Eah0WSUEWZdZhIZtMjkIYS7mDfOqNHbg==
get-value@^2.0.3, get-value@^2.0.6:
version "2.0.6"
resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28"
@ -2678,10 +2747,10 @@ globals@^11.1.0:
resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e"
integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==
globby@^11.0.1:
version "11.0.1"
resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.1.tgz#9a2bf107a068f3ffeabc49ad702c79ede8cfd357"
integrity sha512-iH9RmgwCmUJHi2z5o2l3eTtGBtXek1OYlHrbcxOYugyHLmAsZrPj43OtHThd62Buh/Vv6VyCBD2bdyWcGNQqoQ==
globby@^11.0.2:
version "11.0.2"
resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.2.tgz#1af538b766a3b540ebfb58a32b2e2d5897321d83"
integrity sha512-2ZThXDvvV8fYFRVIxnrMQBipZQDr7MxKAmQK1vujaj9/7eF0efG7BPUKJ7jP7G5SLF37xKDXvO4S/KKLj/Z0og==
dependencies:
array-union "^2.1.0"
dir-glob "^3.0.1"
@ -2848,6 +2917,11 @@ human-signals@^1.1.1:
resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3"
integrity sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==
human-signals@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0"
integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==
iconv-lite@0.4.24:
version "0.4.24"
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"
@ -2867,6 +2941,11 @@ icss-utils@^4.0.0, icss-utils@^4.1.1:
dependencies:
postcss "^7.0.14"
ieee754@^1.1.13:
version "1.2.1"
resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352"
integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==
ignore@^5.1.4:
version "5.1.8"
resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57"
@ -2923,7 +3002,7 @@ inflight@^1.0.4:
once "^1.3.0"
wrappy "1"
inherits@2, inherits@^2.0.3, inherits@~2.0.3:
inherits@2, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.3:
version "2.0.4"
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
@ -3896,11 +3975,6 @@ lodash.ismatch@^4.4.0:
resolved "https://registry.yarnpkg.com/lodash.ismatch/-/lodash.ismatch-4.4.0.tgz#756cb5150ca3ba6f11085a78849645f188f85f37"
integrity sha1-dWy1FQyjum8RCFp4hJZF8Yj4Xzc=
lodash.memoize@4.x:
version "4.1.2"
resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe"
integrity sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=
lodash.sortby@^4.7.0:
version "4.7.0"
resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438"
@ -3921,7 +3995,7 @@ lodash.templatesettings@^4.0.0:
dependencies:
lodash._reinterpolate "^3.0.0"
lodash@^4.17.15, lodash@^4.17.19:
lodash@4.x, lodash@^4.17.15, lodash@^4.17.19:
version "4.17.20"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52"
integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==
@ -4255,11 +4329,6 @@ ms@2.1.2:
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==
mute-stream@0.0.8:
version "0.0.8"
resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d"
integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==
nanoid@^3.1.20:
version "3.1.20"
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.20.tgz#badc263c6b1dcf14b71efaa85f6ab4c1d6cfc788"
@ -4383,7 +4452,7 @@ npm-run-path@^2.0.0:
dependencies:
path-key "^2.0.0"
npm-run-path@^4.0.0:
npm-run-path@^4.0.0, npm-run-path@^4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea"
integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==
@ -4465,7 +4534,7 @@ once@^1.3.0, once@^1.3.1, once@^1.4.0:
dependencies:
wrappy "1"
onetime@^5.1.0:
onetime@^5.1.0, onetime@^5.1.2:
version "5.1.2"
resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e"
integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==
@ -4484,17 +4553,17 @@ optionator@^0.8.1:
type-check "~0.3.2"
word-wrap "~1.2.3"
ora@^5.1.0:
version "5.1.0"
resolved "https://registry.yarnpkg.com/ora/-/ora-5.1.0.tgz#b188cf8cd2d4d9b13fd25383bc3e5cba352c94f8"
integrity sha512-9tXIMPvjZ7hPTbk8DFq1f7Kow/HU/pQYB60JbNq+QnGwcyhWVZaQ4hM9zQDEsPxw/muLpgiHSaumUZxCAmod/w==
ora@^5.3.0:
version "5.3.0"
resolved "https://registry.yarnpkg.com/ora/-/ora-5.3.0.tgz#fb832899d3a1372fe71c8b2c534bbfe74961bb6f"
integrity sha512-zAKMgGXUim0Jyd6CXK9lraBnD3H5yPGBPPOkC23a2BG6hsm4Zu6OQSjQuEtV0BHDf4aKHcUFvJiGRrFuW3MG8g==
dependencies:
bl "^4.0.3"
chalk "^4.1.0"
cli-cursor "^3.1.0"
cli-spinners "^2.4.0"
cli-spinners "^2.5.0"
is-interactive "^1.0.0"
log-symbols "^4.0.0"
mute-stream "0.0.8"
strip-ansi "^6.0.0"
wcwidth "^1.0.1"
@ -4835,10 +4904,10 @@ pretty-format@^26.0.0, pretty-format@^26.6.2:
ansi-styles "^4.0.0"
react-is "^17.0.1"
prismjs@^1.20.0:
version "1.22.0"
resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.22.0.tgz#73c3400afc58a823dd7eed023f8e1ce9fd8977fa"
integrity sha512-lLJ/Wt9yy0AiSYBf212kK3mM5L8ycwlyTlSxHBAneXLR0nzFMlZ5y7riFPF3E33zXOF2IH95xdY5jIyZbM9z/w==
prismjs@^1.23.0:
version "1.23.0"
resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.23.0.tgz#d3b3967f7d72440690497652a9d40ff046067f33"
integrity sha512-c29LVsqOaLbBHuIbsTxaKENh1N2EQBOHaWv7gkHN4dgRbxSREqDnDbtFJYdpPauS4YCplMSNCABQ6Eeor69bAA==
optionalDependencies:
clipboard "^2.0.0"
@ -4956,7 +5025,7 @@ read-pkg@^5.2.0:
parse-json "^5.0.0"
type-fest "^0.6.0"
readable-stream@3:
readable-stream@3, readable-stream@^3.4.0:
version "3.6.0"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198"
integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==
@ -5120,7 +5189,7 @@ resolve-url@^0.2.1:
resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a"
integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=
resolve@^1.1.6, resolve@^1.10.0, resolve@^1.17.0, resolve@^1.18.1:
resolve@^1.1.6, resolve@^1.10.0, resolve@^1.17.0, resolve@^1.18.1, resolve@^1.19.0:
version "1.19.0"
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.19.0.tgz#1af5bf630409734a067cae29318aac7fa29a267c"
integrity sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==
@ -5153,13 +5222,20 @@ rimraf@^3.0.0, rimraf@^3.0.2:
dependencies:
glob "^7.1.3"
rollup@^2.33.3, rollup@^2.35.1:
rollup@^2.35.1:
version "2.35.1"
resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.35.1.tgz#e6bc8d10893556a638066f89e8c97f422d03968c"
integrity sha512-q5KxEyWpprAIcainhVy6HfRttD9kutQpHbeqDTWnqAFNJotiojetK6uqmcydNMymBEtC4I8bCYR+J3mTMqeaUA==
optionalDependencies:
fsevents "~2.1.2"
rollup@^2.38.5:
version "2.38.5"
resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.38.5.tgz#be41ad4fe0c103a8794377afceb5f22b8f603d6a"
integrity sha512-VoWt8DysFGDVRGWuHTqZzT02J0ASgjVq/hPs9QcBOGMd7B+jfTr/iqMVEyOi901rE3xq+Deq66GzIT1yt7sGwQ==
optionalDependencies:
fsevents "~2.3.1"
rsvp@^4.8.4:
version "4.8.5"
resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-4.8.5.tgz#c8f155311d167f68f21e168df71ec5b083113734"
@ -5314,15 +5390,15 @@ shellwords@^0.1.1:
resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b"
integrity sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww==
signal-exit@^3.0.0, signal-exit@^3.0.2:
signal-exit@^3.0.0, signal-exit@^3.0.2, signal-exit@^3.0.3:
version "3.0.3"
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c"
integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==
sirv@^1.0.10:
version "1.0.10"
resolved "https://registry.yarnpkg.com/sirv/-/sirv-1.0.10.tgz#3e591f5a9ae2520f50d5830f5fae38d97e7be194"
integrity sha512-H5EZCoZaggEUQy8ocKsF7WAToGuZhjJlLvM3XOef46CbdIgbNeQ1p32N1PCuCjkVYwrAVOSMacN6CXXgIzuspg==
sirv@^1.0.11:
version "1.0.11"
resolved "https://registry.yarnpkg.com/sirv/-/sirv-1.0.11.tgz#81c19a29202048507d6ec0d8ba8910fda52eb5a4"
integrity sha512-SR36i3/LSWja7AJNRBz4fF/Xjpn7lQFI30tZ434dIy+bitLYSP+ZEenHg36i23V2SGEz+kqjksg0uOGZ5LPiqg==
dependencies:
"@polka/url" "^1.0.0-next.9"
mime "^2.3.1"
@ -5847,10 +5923,10 @@ trouter@^2.0.1:
dependencies:
matchit "^1.0.0"
ts-jest@^26.4.4:
version "26.4.4"
resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-26.4.4.tgz#61f13fb21ab400853c532270e52cc0ed7e502c49"
integrity sha512-3lFWKbLxJm34QxyVNNCgXX1u4o/RV0myvA2y2Bxm46iGIjKlaY0own9gIckbjZJPn+WaJEnfPPJ20HHGpoq4yg==
ts-jest@^26.5.0:
version "26.5.0"
resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-26.5.0.tgz#3e3417d91bc40178a6716d7dacc5b0505835aa21"
integrity sha512-Ya4IQgvIFNa2Mgq52KaO8yBw2W8tWp61Ecl66VjF0f5JaV8u50nGoptHVILOPGoI7SDnShmEqnYQEmyHdQ+56g==
dependencies:
"@types/jest" "26.x"
bs-logger "0.x"
@ -5858,7 +5934,7 @@ ts-jest@^26.4.4:
fast-json-stable-stringify "2.x"
jest-util "^26.1.0"
json5 "2.x"
lodash.memoize "4.x"
lodash "4.x"
make-error "1.x"
mkdirp "1.x"
semver "7.x"
@ -5950,11 +6026,6 @@ uniq@^1.0.1:
resolved "https://registry.yarnpkg.com/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff"
integrity sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=
universalify@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/universalify/-/universalify-1.0.0.tgz#b61a1da173e8435b2fe3c67d29b9adf8594bd16d"
integrity sha512-rb6X1W158d7pRQBg5gkR8uPaSfiids68LTJQYOtEUhoJUWBdaQHsuT/EUduxXYxcrt4r5PJ4fuHW1MHT6p0qug==
universalify@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717"
@ -6031,13 +6102,14 @@ verror@1.10.0:
core-util-is "1.0.2"
extsprintf "^1.2.0"
vite@^2.0.0-beta.2:
version "2.0.0-beta.2"
resolved "https://registry.yarnpkg.com/vite/-/vite-2.0.0-beta.2.tgz#5ea8fd4a01d0f722db59bff2bdc4ae24ba9fa63a"
integrity sha512-bZ2IeW+Uo4A7HpRIqyyHUDk6/WOGIkNdTm5/0yLmgjvXgLErwUhzv7Z0T0C6lc4lwoQV9KEA8IbFkZ+ZyWzhWg==
vite@2.0.0-beta.50:
version "2.0.0-beta.50"
resolved "https://registry.yarnpkg.com/vite/-/vite-2.0.0-beta.50.tgz#04e66d009470ca90ab8a4a43687e899b670a0f25"
integrity sha512-zzMgrWJK92/aQ1rxvc+0QKeOCdOP4m2EPGwK2HKhlifQVnSdpYQzQkWLzaGh1GQAp61W+Su8cu6cWINpFgNrfQ==
dependencies:
esbuild "^0.8.26"
esbuild "^0.8.34"
postcss "^8.2.1"
resolve "^1.19.0"
rollup "^2.35.1"
optionalDependencies:
fsevents "~2.1.2"

Loading…
Cancel
Save