[READ-ONLY] Mirror of https://github.com/vitest-dev/vitest. Next generation testing framework powered by Vite. vitest.dev
test testing-tools vite
12

Configure Feed

Select the types of activity you want to include in your feed.

docs: show a warning in v1 docs (#7003)

Co-authored-by: Vladimir Sheremet <sleuths.slews0s@icloud.com>

authored by

dalaoshu
Vladimir Sheremet
and committed by
GitHub
(Dec 3, 2024, 11:39 AM +0100) 73cb6968 ef8cc005

+57 -2
+1
docs/.vitepress/components.d.ts
··· 13 13 HomePage: typeof import('./components/HomePage.vue')['default'] 14 14 ListItem: typeof import('./components/ListItem.vue')['default'] 15 15 NonProjectOption: typeof import('./components/NonProjectOption.vue')['default'] 16 + OldDocument: typeof import('./components/OldDocument.vue')['default'] 16 17 RouterLink: typeof import('vue-router')['RouterLink'] 17 18 RouterView: typeof import('vue-router')['RouterView'] 18 19 Version: typeof import('./components/Version.vue')['default']
+42
docs/.vitepress/components/OldDocument.vue
··· 1 + <template> 2 + <div class="old-document"> 3 + <p> 4 + This documentation covers Vitest v1 <strong>(old version)</strong>. For the 5 + latest version, see 6 + <a href="https://vitest.dev" class="new-document-link">https://vitest.dev</a>. 7 + </p> 8 + </div> 9 + </template> 10 + 11 + <style> 12 + :root { 13 + --vp-layout-top-height: 96px; 14 + @media (min-width: 455px) { 15 + --vp-layout-top-height: 64px; 16 + } 17 + @media (min-width: 960px) { 18 + --vp-layout-top-height: 32px; 19 + } 20 + } 21 + 22 + .old-document { 23 + position: fixed; 24 + display: flex; 25 + height: var(--vp-layout-top-height); 26 + width: 100%; 27 + padding: 4px 32px; 28 + justify-content: center; 29 + align-items: center; 30 + color: var(--vp-c-old-document-text); 31 + background: var(--vp-c-old-document-bg); 32 + z-index: var(--vp-z-index-layout-top); 33 + 34 + .new-document-link { 35 + text-decoration: underline; 36 + color: var(--vp-c-text-1); 37 + &:hover { 38 + color: var(--vp-c-text-2); 39 + } 40 + } 41 + } 42 + </style>
+8
docs/.vitepress/style/vars.css
··· 8 8 --vp-c-brand-3: #506e10; 9 9 --vp-c-sponsor: #ca2971; 10 10 --vitest-c-sponsor-hover: #c13071; 11 + 12 + /* Old Document */ 13 + --vp-c-old-document-bg: #f4f8e0; 14 + --vp-c-old-document-text: #2a3a1b; 11 15 } 12 16 13 17 .dark { ··· 16 20 --vp-c-brand-3: #acd268; 17 21 --vp-c-sponsor: #ee4e95; 18 22 --vitest-c-sponsor-hover: #e51370; 23 + 24 + /* Old Document */ 25 + --vp-c-old-document-bg: #2d3b2e; 26 + --vp-c-old-document-text: #c5d9b6; 19 27 } 20 28 21 29
+2
docs/.vitepress/theme/index.ts
··· 6 6 import '../style/vars.css' 7 7 import 'uno.css' 8 8 import TwoslashFloatingVue from '@shikijs/vitepress-twoslash/client' 9 + import OldDocument from '../components/OldDocument.vue' 9 10 import HomePage from '../components/HomePage.vue' 10 11 import Version from '../components/Version.vue' 11 12 import '@shikijs/vitepress-twoslash/style.css' ··· 18 19 Layout() { 19 20 return h(Theme.Layout, null, { 20 21 'home-features-after': () => h(HomePage), 22 + 'layout-top': () => h(OldDocument), 21 23 }) 22 24 }, 23 25 enhanceApp({ app }: EnhanceAppContext) {
+2 -1
packages/coverage-istanbul/src/provider.ts
··· 13 13 import libSourceMaps from 'istanbul-lib-source-maps' 14 14 import { type Instrumenter, createInstrumenter } from 'istanbul-lib-instrument' 15 15 16 - // @ts-expect-error missing types 16 + // eslint-disable-next-line ts/prefer-ts-expect-error 17 + // @ts-ignore missing types 17 18 import _TestExclude from 'test-exclude' 18 19 import { COVERAGE_STORE_KEY } from './constants' 19 20
+2 -1
packages/coverage-v8/src/provider.ts
··· 23 23 import type { AfterSuiteRunMeta, CoverageProvider, CoverageV8Options, ReportContext, ResolvedCoverageOptions } from 'vitest' 24 24 import type { Vitest } from 'vitest/node' 25 25 26 - // @ts-expect-error missing types 26 + // eslint-disable-next-line ts/prefer-ts-expect-error 27 + // @ts-ignore missing types 27 28 import _TestExclude from 'test-exclude' 28 29 29 30 interface TestExclude {