From 8d5936c564381a82b42b07947bca5ee984e69688 Mon Sep 17 00:00:00 2001 From: Hiroshi Ogawa Date: Fri, 19 Jan 2024 10:47:37 +0900 Subject: [PATCH 1/7] chore: add examples/typecheck --- examples/typecheck/README.md | 5 + examples/typecheck/package.json | 21 ++ examples/typecheck/test/normal.test.ts | 5 + examples/typecheck/test/type.test-d.ts | 6 + examples/typecheck/tsconfig.json | 14 + examples/typecheck/vite.config.ts | 15 + pnpm-lock.yaml | 437 ++----------------------- 7 files changed, 100 insertions(+), 403 deletions(-) create mode 100644 examples/typecheck/README.md create mode 100644 examples/typecheck/package.json create mode 100644 examples/typecheck/test/normal.test.ts create mode 100644 examples/typecheck/test/type.test-d.ts create mode 100644 examples/typecheck/tsconfig.json create mode 100644 examples/typecheck/vite.config.ts diff --git a/examples/typecheck/README.md b/examples/typecheck/README.md new file mode 100644 index 000000000000..c2aeeb97396c --- /dev/null +++ b/examples/typecheck/README.md @@ -0,0 +1,5 @@ +# Vitest Demo + +Run `npm test` and change a test or source code to see HMR in action! + +Learn more at https://vitest.dev diff --git a/examples/typecheck/package.json b/examples/typecheck/package.json new file mode 100644 index 000000000000..6bedeb1ed044 --- /dev/null +++ b/examples/typecheck/package.json @@ -0,0 +1,21 @@ +{ + "name": "@vitest/example-typecheck", + "type": "module", + "private": true, + "license": "MIT", + "main": "index.js", + "scripts": { + "test": "vitest", + "test:ui": "vitest --ui", + "test:run": "vitest run" + }, + "devDependencies": { + "@vitest/ui": "latest", + "typescript": "^5.2.2", + "vite": "latest", + "vitest": "latest" + }, + "stackblitz": { + "startCommand": "npm run test:ui" + } +} diff --git a/examples/typecheck/test/normal.test.ts b/examples/typecheck/test/normal.test.ts new file mode 100644 index 000000000000..5e7ab4dc0934 --- /dev/null +++ b/examples/typecheck/test/normal.test.ts @@ -0,0 +1,5 @@ +import { expect, test } from 'vitest' + +test('normal', () => { + expect(1 + 1).toBe(2) +}) diff --git a/examples/typecheck/test/type.test-d.ts b/examples/typecheck/test/type.test-d.ts new file mode 100644 index 000000000000..37cd35f4f58a --- /dev/null +++ b/examples/typecheck/test/type.test-d.ts @@ -0,0 +1,6 @@ +import { expect, expectTypeOf, test } from 'vitest' + +test('type', () => { + expectTypeOf(1).toEqualTypeOf(2) + expect(1).toBe(2) // not executed +}) diff --git a/examples/typecheck/tsconfig.json b/examples/typecheck/tsconfig.json new file mode 100644 index 000000000000..c27a77299457 --- /dev/null +++ b/examples/typecheck/tsconfig.json @@ -0,0 +1,14 @@ +{ + "compilerOptions": { + "target": "es2020", + "module": "ESNext", + "moduleResolution": "Bundler", + "strict": true, + "declaration": true, + "declarationMap": true, + "sourceMap": true, + "verbatimModuleSyntax": true + }, + "include": ["src", "test"], + "exclude": ["node_modules"] +} diff --git a/examples/typecheck/vite.config.ts b/examples/typecheck/vite.config.ts new file mode 100644 index 000000000000..45812bebfbe4 --- /dev/null +++ b/examples/typecheck/vite.config.ts @@ -0,0 +1,15 @@ +/// + +// Configure Vitest (https://vitest.dev/config/) + +import { defineConfig } from 'vite' + +export default defineConfig({ + test: { + /* for example, use global to avoid globals imports (describe, test, expect): */ + // globals: true, + typecheck: { + enabled: true, + }, + }, +}) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a91783d65eb9..a720a059251e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -363,7 +363,7 @@ importers: version: 1.41.0 vite: specifier: ^5.0.0 - version: 5.0.2 + version: 5.0.2(@types/node@18.18.9)(less@4.1.3) vitest: specifier: workspace:* version: link:../../packages/vitest @@ -789,6 +789,21 @@ importers: specifier: workspace:* version: link:../../packages/vitest + examples/typecheck: + devDependencies: + '@vitest/ui': + specifier: latest + version: link:../../packages/ui + typescript: + specifier: ^5.2.2 + version: 5.2.2 + vite: + specifier: ^5.0.0 + version: 5.0.2(@types/node@18.18.9)(less@4.1.3) + vitest: + specifier: workspace:* + version: link:../../packages/vitest + examples/vitesse: dependencies: vue: @@ -907,7 +922,7 @@ importers: version: link:../vitest webdriverio: specifier: ^8.22.1 - version: 8.22.1 + version: 8.22.1(typescript@5.2.2) packages/coverage-istanbul: dependencies: @@ -5053,7 +5068,6 @@ packages: cpu: [ppc64] os: [aix] requiresBuild: true - dev: true optional: true /@esbuild/android-arm64@0.18.20: @@ -5071,15 +5085,6 @@ packages: cpu: [arm64] os: [android] requiresBuild: true - dev: true - optional: true - - /@esbuild/android-arm64@0.19.5: - resolution: {integrity: sha512-5d1OkoJxnYQfmC+Zd8NBFjkhyCNYwM4n9ODrycTFY6Jk1IGiZ+tjVJDDSwDt77nK+tfpGP4T50iMtVi4dEGzhQ==} - engines: {node: '>=12'} - cpu: [arm64] - os: [android] - requiresBuild: true optional: true /@esbuild/android-arm@0.15.18: @@ -5106,15 +5111,6 @@ packages: cpu: [arm] os: [android] requiresBuild: true - dev: true - optional: true - - /@esbuild/android-arm@0.19.5: - resolution: {integrity: sha512-bhvbzWFF3CwMs5tbjf3ObfGqbl/17ict2/uwOSfr3wmxDE6VdS2GqY/FuzIPe0q0bdhj65zQsvqfArI9MY6+AA==} - engines: {node: '>=12'} - cpu: [arm] - os: [android] - requiresBuild: true optional: true /@esbuild/android-x64@0.18.20: @@ -5132,15 +5128,6 @@ packages: cpu: [x64] os: [android] requiresBuild: true - dev: true - optional: true - - /@esbuild/android-x64@0.19.5: - resolution: {integrity: sha512-9t+28jHGL7uBdkBjL90QFxe7DVA+KGqWlHCF8ChTKyaKO//VLuoBricQCgwhOjA1/qOczsw843Fy4cbs4H3DVA==} - engines: {node: '>=12'} - cpu: [x64] - os: [android] - requiresBuild: true optional: true /@esbuild/darwin-arm64@0.18.20: @@ -5158,15 +5145,6 @@ packages: cpu: [arm64] os: [darwin] requiresBuild: true - dev: true - optional: true - - /@esbuild/darwin-arm64@0.19.5: - resolution: {integrity: sha512-mvXGcKqqIqyKoxq26qEDPHJuBYUA5KizJncKOAf9eJQez+L9O+KfvNFu6nl7SCZ/gFb2QPaRqqmG0doSWlgkqw==} - engines: {node: '>=12'} - cpu: [arm64] - os: [darwin] - requiresBuild: true optional: true /@esbuild/darwin-x64@0.18.20: @@ -5184,15 +5162,6 @@ packages: cpu: [x64] os: [darwin] requiresBuild: true - dev: true - optional: true - - /@esbuild/darwin-x64@0.19.5: - resolution: {integrity: sha512-Ly8cn6fGLNet19s0X4unjcniX24I0RqjPv+kurpXabZYSXGM4Pwpmf85WHJN3lAgB8GSth7s5A0r856S+4DyiA==} - engines: {node: '>=12'} - cpu: [x64] - os: [darwin] - requiresBuild: true optional: true /@esbuild/freebsd-arm64@0.18.20: @@ -5210,15 +5179,6 @@ packages: cpu: [arm64] os: [freebsd] requiresBuild: true - dev: true - optional: true - - /@esbuild/freebsd-arm64@0.19.5: - resolution: {integrity: sha512-GGDNnPWTmWE+DMchq1W8Sd0mUkL+APvJg3b11klSGUDvRXh70JqLAO56tubmq1s2cgpVCSKYywEiKBfju8JztQ==} - engines: {node: '>=12'} - cpu: [arm64] - os: [freebsd] - requiresBuild: true optional: true /@esbuild/freebsd-x64@0.18.20: @@ -5236,15 +5196,6 @@ packages: cpu: [x64] os: [freebsd] requiresBuild: true - dev: true - optional: true - - /@esbuild/freebsd-x64@0.19.5: - resolution: {integrity: sha512-1CCwDHnSSoA0HNwdfoNY0jLfJpd7ygaLAp5EHFos3VWJCRX9DMwWODf96s9TSse39Br7oOTLryRVmBoFwXbuuQ==} - engines: {node: '>=12'} - cpu: [x64] - os: [freebsd] - requiresBuild: true optional: true /@esbuild/linux-arm64@0.18.20: @@ -5262,15 +5213,6 @@ packages: cpu: [arm64] os: [linux] requiresBuild: true - dev: true - optional: true - - /@esbuild/linux-arm64@0.19.5: - resolution: {integrity: sha512-o3vYippBmSrjjQUCEEiTZ2l+4yC0pVJD/Dl57WfPwwlvFkrxoSO7rmBZFii6kQB3Wrn/6GwJUPLU5t52eq2meA==} - engines: {node: '>=12'} - cpu: [arm64] - os: [linux] - requiresBuild: true optional: true /@esbuild/linux-arm@0.18.20: @@ -5288,15 +5230,6 @@ packages: cpu: [arm] os: [linux] requiresBuild: true - dev: true - optional: true - - /@esbuild/linux-arm@0.19.5: - resolution: {integrity: sha512-lrWXLY/vJBzCPC51QN0HM71uWgIEpGSjSZZADQhq7DKhPcI6NH1IdzjfHkDQws2oNpJKpR13kv7/pFHBbDQDwQ==} - engines: {node: '>=12'} - cpu: [arm] - os: [linux] - requiresBuild: true optional: true /@esbuild/linux-ia32@0.18.20: @@ -5314,15 +5247,6 @@ packages: cpu: [ia32] os: [linux] requiresBuild: true - dev: true - optional: true - - /@esbuild/linux-ia32@0.19.5: - resolution: {integrity: sha512-MkjHXS03AXAkNp1KKkhSKPOCYztRtK+KXDNkBa6P78F8Bw0ynknCSClO/ztGszILZtyO/lVKpa7MolbBZ6oJtQ==} - engines: {node: '>=12'} - cpu: [ia32] - os: [linux] - requiresBuild: true optional: true /@esbuild/linux-loong64@0.15.18: @@ -5349,15 +5273,6 @@ packages: cpu: [loong64] os: [linux] requiresBuild: true - dev: true - optional: true - - /@esbuild/linux-loong64@0.19.5: - resolution: {integrity: sha512-42GwZMm5oYOD/JHqHska3Jg0r+XFb/fdZRX+WjADm3nLWLcIsN27YKtqxzQmGNJgu0AyXg4HtcSK9HuOk3v1Dw==} - engines: {node: '>=12'} - cpu: [loong64] - os: [linux] - requiresBuild: true optional: true /@esbuild/linux-mips64el@0.18.20: @@ -5375,15 +5290,6 @@ packages: cpu: [mips64el] os: [linux] requiresBuild: true - dev: true - optional: true - - /@esbuild/linux-mips64el@0.19.5: - resolution: {integrity: sha512-kcjndCSMitUuPJobWCnwQ9lLjiLZUR3QLQmlgaBfMX23UEa7ZOrtufnRds+6WZtIS9HdTXqND4yH8NLoVVIkcg==} - engines: {node: '>=12'} - cpu: [mips64el] - os: [linux] - requiresBuild: true optional: true /@esbuild/linux-ppc64@0.18.20: @@ -5401,15 +5307,6 @@ packages: cpu: [ppc64] os: [linux] requiresBuild: true - dev: true - optional: true - - /@esbuild/linux-ppc64@0.19.5: - resolution: {integrity: sha512-yJAxJfHVm0ZbsiljbtFFP1BQKLc8kUF6+17tjQ78QjqjAQDnhULWiTA6u0FCDmYT1oOKS9PzZ2z0aBI+Mcyj7Q==} - engines: {node: '>=12'} - cpu: [ppc64] - os: [linux] - requiresBuild: true optional: true /@esbuild/linux-riscv64@0.18.20: @@ -5427,15 +5324,6 @@ packages: cpu: [riscv64] os: [linux] requiresBuild: true - dev: true - optional: true - - /@esbuild/linux-riscv64@0.19.5: - resolution: {integrity: sha512-5u8cIR/t3gaD6ad3wNt1MNRstAZO+aNyBxu2We8X31bA8XUNyamTVQwLDA1SLoPCUehNCymhBhK3Qim1433Zag==} - engines: {node: '>=12'} - cpu: [riscv64] - os: [linux] - requiresBuild: true optional: true /@esbuild/linux-s390x@0.18.20: @@ -5453,15 +5341,6 @@ packages: cpu: [s390x] os: [linux] requiresBuild: true - dev: true - optional: true - - /@esbuild/linux-s390x@0.19.5: - resolution: {integrity: sha512-Z6JrMyEw/EmZBD/OFEFpb+gao9xJ59ATsoTNlj39jVBbXqoZm4Xntu6wVmGPB/OATi1uk/DB+yeDPv2E8PqZGw==} - engines: {node: '>=12'} - cpu: [s390x] - os: [linux] - requiresBuild: true optional: true /@esbuild/linux-x64@0.18.20: @@ -5479,15 +5358,6 @@ packages: cpu: [x64] os: [linux] requiresBuild: true - dev: true - optional: true - - /@esbuild/linux-x64@0.19.5: - resolution: {integrity: sha512-psagl+2RlK1z8zWZOmVdImisMtrUxvwereIdyJTmtmHahJTKb64pAcqoPlx6CewPdvGvUKe2Jw+0Z/0qhSbG1A==} - engines: {node: '>=12'} - cpu: [x64] - os: [linux] - requiresBuild: true optional: true /@esbuild/netbsd-x64@0.18.20: @@ -5505,15 +5375,6 @@ packages: cpu: [x64] os: [netbsd] requiresBuild: true - dev: true - optional: true - - /@esbuild/netbsd-x64@0.19.5: - resolution: {integrity: sha512-kL2l+xScnAy/E/3119OggX8SrWyBEcqAh8aOY1gr4gPvw76la2GlD4Ymf832UCVbmuWeTf2adkZDK+h0Z/fB4g==} - engines: {node: '>=12'} - cpu: [x64] - os: [netbsd] - requiresBuild: true optional: true /@esbuild/openbsd-x64@0.18.20: @@ -5531,15 +5392,6 @@ packages: cpu: [x64] os: [openbsd] requiresBuild: true - dev: true - optional: true - - /@esbuild/openbsd-x64@0.19.5: - resolution: {integrity: sha512-sPOfhtzFufQfTBgRnE1DIJjzsXukKSvZxloZbkJDG383q0awVAq600pc1nfqBcl0ice/WN9p4qLc39WhBShRTA==} - engines: {node: '>=12'} - cpu: [x64] - os: [openbsd] - requiresBuild: true optional: true /@esbuild/sunos-x64@0.18.20: @@ -5557,15 +5409,6 @@ packages: cpu: [x64] os: [sunos] requiresBuild: true - dev: true - optional: true - - /@esbuild/sunos-x64@0.19.5: - resolution: {integrity: sha512-dGZkBXaafuKLpDSjKcB0ax0FL36YXCvJNnztjKV+6CO82tTYVDSH2lifitJ29jxRMoUhgkg9a+VA/B03WK5lcg==} - engines: {node: '>=12'} - cpu: [x64] - os: [sunos] - requiresBuild: true optional: true /@esbuild/win32-arm64@0.18.20: @@ -5583,15 +5426,6 @@ packages: cpu: [arm64] os: [win32] requiresBuild: true - dev: true - optional: true - - /@esbuild/win32-arm64@0.19.5: - resolution: {integrity: sha512-dWVjD9y03ilhdRQ6Xig1NWNgfLtf2o/STKTS+eZuF90fI2BhbwD6WlaiCGKptlqXlURVB5AUOxUj09LuwKGDTg==} - engines: {node: '>=12'} - cpu: [arm64] - os: [win32] - requiresBuild: true optional: true /@esbuild/win32-ia32@0.18.20: @@ -5609,15 +5443,6 @@ packages: cpu: [ia32] os: [win32] requiresBuild: true - dev: true - optional: true - - /@esbuild/win32-ia32@0.19.5: - resolution: {integrity: sha512-4liggWIA4oDgUxqpZwrDhmEfAH4d0iljanDOK7AnVU89T6CzHon/ony8C5LeOdfgx60x5cnQJFZwEydVlYx4iw==} - engines: {node: '>=12'} - cpu: [ia32] - os: [win32] - requiresBuild: true optional: true /@esbuild/win32-x64@0.18.20: @@ -5635,15 +5460,6 @@ packages: cpu: [x64] os: [win32] requiresBuild: true - dev: true - optional: true - - /@esbuild/win32-x64@0.19.5: - resolution: {integrity: sha512-czTrygUsB/jlM8qEW5MD8bgYU2Xg14lo6kBDXW6HdxKjh8M5PzETGiSHaz9MtbXBYDloHNUAUW2tMiKW4KM9Mw==} - engines: {node: '>=12'} - cpu: [x64] - os: [win32] - requiresBuild: true optional: true /@eslint-community/eslint-utils@4.4.0(eslint@8.54.0): @@ -6974,27 +6790,6 @@ packages: - supports-color dev: true - /@puppeteer/browsers@1.4.6: - resolution: {integrity: sha512-x4BEjr2SjOPowNeiguzjozQbsc6h437ovD/wu+JpaenxVLm3jkgzHY2xOslMTp50HoTvQreMjiexiGQw1sqZlQ==} - engines: {node: '>=16.3.0'} - hasBin: true - peerDependencies: - typescript: '>= 4.7.4' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - debug: 4.3.4 - extract-zip: 2.0.1 - progress: 2.0.3 - proxy-agent: 6.3.0 - tar-fs: 3.0.4 - unbzip2-stream: 1.4.3 - yargs: 17.7.1 - transitivePeerDependencies: - - supports-color - dev: true - /@puppeteer/browsers@1.4.6(typescript@5.2.2): resolution: {integrity: sha512-x4BEjr2SjOPowNeiguzjozQbsc6h437ovD/wu+JpaenxVLm3jkgzHY2xOslMTp50HoTvQreMjiexiGQw1sqZlQ==} engines: {node: '>=16.3.0'} @@ -7022,8 +6817,8 @@ packages: engines: {node: '>=16.3.0'} hasBin: true dependencies: - debug: 4.3.4 - extract-zip: 2.0.1 + debug: 4.3.4(supports-color@8.1.1) + extract-zip: 2.0.1(supports-color@8.1.1) progress: 2.0.3 proxy-agent: 6.3.0 tar-fs: 3.0.4 @@ -9847,14 +9642,6 @@ packages: '@types/yargs-parser': 21.0.0 dev: true - /@types/yauzl@2.10.2: - resolution: {integrity: sha512-Km7XAtUIduROw7QPgvcft0lIupeG8a8rdKL8RiSyKvlE7dYY31fEn41HVuQsRFDuROA8tA4K2UVL+WdfFmErBA==} - requiresBuild: true - dependencies: - '@types/node': 18.18.9 - dev: true - optional: true - /@types/yauzl@2.10.3: resolution: {integrity: sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==} requiresBuild: true @@ -11467,7 +11254,7 @@ packages: resolution: {integrity: sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg==} engines: {node: '>= 14'} dependencies: - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) transitivePeerDependencies: - supports-color dev: true @@ -14105,18 +13892,6 @@ packages: ms: 2.1.3 supports-color: 8.1.1 - /debug@4.3.4: - resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} - engines: {node: '>=6.0'} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - dependencies: - ms: 2.1.2 - dev: true - /debug@4.3.4(supports-color@8.1.1): resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} engines: {node: '>=6.0'} @@ -15221,36 +14996,6 @@ packages: '@esbuild/win32-arm64': 0.19.11 '@esbuild/win32-ia32': 0.19.11 '@esbuild/win32-x64': 0.19.11 - dev: true - - /esbuild@0.19.5: - resolution: {integrity: sha512-bUxalY7b1g8vNhQKdB24QDmHeY4V4tw/s6Ak5z+jJX9laP5MoQseTOMemAr0gxssjNcH0MCViG8ONI2kksvfFQ==} - engines: {node: '>=12'} - hasBin: true - requiresBuild: true - optionalDependencies: - '@esbuild/android-arm': 0.19.5 - '@esbuild/android-arm64': 0.19.5 - '@esbuild/android-x64': 0.19.5 - '@esbuild/darwin-arm64': 0.19.5 - '@esbuild/darwin-x64': 0.19.5 - '@esbuild/freebsd-arm64': 0.19.5 - '@esbuild/freebsd-x64': 0.19.5 - '@esbuild/linux-arm': 0.19.5 - '@esbuild/linux-arm64': 0.19.5 - '@esbuild/linux-ia32': 0.19.5 - '@esbuild/linux-loong64': 0.19.5 - '@esbuild/linux-mips64el': 0.19.5 - '@esbuild/linux-ppc64': 0.19.5 - '@esbuild/linux-riscv64': 0.19.5 - '@esbuild/linux-s390x': 0.19.5 - '@esbuild/linux-x64': 0.19.5 - '@esbuild/netbsd-x64': 0.19.5 - '@esbuild/openbsd-x64': 0.19.5 - '@esbuild/sunos-x64': 0.19.5 - '@esbuild/win32-arm64': 0.19.5 - '@esbuild/win32-ia32': 0.19.5 - '@esbuild/win32-x64': 0.19.5 /escalade@3.1.1: resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} @@ -16111,20 +15856,6 @@ packages: parse-code-context: 1.0.0 dev: true - /extract-zip@2.0.1: - resolution: {integrity: sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==} - engines: {node: '>= 10.17.0'} - hasBin: true - dependencies: - debug: 4.3.4 - get-stream: 5.2.0 - yauzl: 2.10.0 - optionalDependencies: - '@types/yauzl': 2.10.3 - transitivePeerDependencies: - - supports-color - dev: true - /extract-zip@2.0.1(supports-color@8.1.1): resolution: {integrity: sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==} engines: {node: '>= 10.17.0'} @@ -16134,7 +15865,7 @@ packages: get-stream: 5.2.0 yauzl: 2.10.0 optionalDependencies: - '@types/yauzl': 2.10.2 + '@types/yauzl': 2.10.3 transitivePeerDependencies: - supports-color dev: true @@ -16940,7 +16671,7 @@ packages: dependencies: basic-ftp: 5.0.3 data-uri-to-buffer: 5.0.1 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) fs-extra: 8.1.0 transitivePeerDependencies: - supports-color @@ -17708,7 +17439,7 @@ packages: engines: {node: '>= 14'} dependencies: agent-base: 7.1.0 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) transitivePeerDependencies: - supports-color dev: true @@ -17763,7 +17494,7 @@ packages: engines: {node: '>= 14'} dependencies: agent-base: 7.1.0 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) transitivePeerDependencies: - supports-color dev: true @@ -20760,7 +20491,6 @@ packages: resolution: {integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true - dev: true /nanomatch@1.2.13: resolution: {integrity: sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==} @@ -21464,7 +21194,7 @@ packages: dependencies: '@tootallnate/quickjs-emscripten': 0.23.0 agent-base: 7.1.0 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) get-uri: 6.0.1 http-proxy-agent: 7.0.0 https-proxy-agent: 7.0.2 @@ -22014,7 +21744,6 @@ packages: nanoid: 3.3.7 picocolors: 1.0.0 source-map-js: 1.0.2 - dev: true /postcss@8.4.5: resolution: {integrity: sha512-jBDboWM8qpaqwkMwItqTQTiFikhs/67OYVvblFFTM7MrZjt6yMKd6r2kgXizEbTTljacm4NldIlZnhbjr84QYg==} @@ -22212,7 +21941,7 @@ packages: engines: {node: '>= 14'} dependencies: agent-base: 7.1.0 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) http-proxy-agent: 7.0.0 https-proxy-agent: 7.0.2 lru-cache: 7.18.3 @@ -22290,28 +22019,6 @@ packages: engines: {node: '>=6'} dev: true - /puppeteer-core@20.9.0: - resolution: {integrity: sha512-H9fYZQzMTRrkboEfPmf7m3CLDN6JvbxXA3qTtS+dFt27tR+CsFHzPsT6pzp6lYL6bJbAPaR0HaPO6uSi+F94Pg==} - engines: {node: '>=16.3.0'} - peerDependencies: - typescript: '>= 4.7.4' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - '@puppeteer/browsers': 1.4.6 - chromium-bidi: 0.4.16(devtools-protocol@0.0.1147663) - cross-fetch: 4.0.0 - debug: 4.3.4 - devtools-protocol: 0.0.1147663 - ws: 8.13.0 - transitivePeerDependencies: - - bufferutil - - encoding - - supports-color - - utf-8-validate - dev: true - /puppeteer-core@20.9.0(typescript@5.2.2): resolution: {integrity: sha512-H9fYZQzMTRrkboEfPmf7m3CLDN6JvbxXA3qTtS+dFt27tR+CsFHzPsT6pzp6lYL6bJbAPaR0HaPO6uSi+F94Pg==} engines: {node: '>=16.3.0'} @@ -24024,7 +23731,7 @@ packages: engines: {node: '>= 14'} dependencies: agent-base: 7.1.0 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) socks: 2.7.1 transitivePeerDependencies: - supports-color @@ -26274,41 +25981,6 @@ packages: - supports-color dev: true - /vite@5.0.2: - resolution: {integrity: sha512-6CCq1CAJCNM1ya2ZZA7+jS2KgnhbzvxakmlIjN24cF/PXhRMzpM/z8QgsVJA/Dm5fWUWnVEsmtBoMhmerPxT0g==} - engines: {node: ^18.0.0 || >=20.0.0} - hasBin: true - peerDependencies: - '@types/node': ^18.0.0 || >=20.0.0 - less: '*' - lightningcss: ^1.21.0 - sass: '*' - stylus: '*' - sugarss: '*' - terser: ^5.4.0 - peerDependenciesMeta: - '@types/node': - optional: true - less: - optional: true - lightningcss: - optional: true - sass: - optional: true - stylus: - optional: true - sugarss: - optional: true - terser: - optional: true - dependencies: - esbuild: 0.19.5 - postcss: 8.4.31 - rollup: 4.4.0 - optionalDependencies: - fsevents: 2.3.3 - dev: true - /vite@5.0.2(@types/node@18.16.19): resolution: {integrity: sha512-6CCq1CAJCNM1ya2ZZA7+jS2KgnhbzvxakmlIjN24cF/PXhRMzpM/z8QgsVJA/Dm5fWUWnVEsmtBoMhmerPxT0g==} engines: {node: ^18.0.0 || >=20.0.0} @@ -26338,8 +26010,8 @@ packages: optional: true dependencies: '@types/node': 18.16.19 - esbuild: 0.19.5 - postcss: 8.4.31 + esbuild: 0.19.11 + postcss: 8.4.32 rollup: 4.4.0 optionalDependencies: fsevents: 2.3.3 @@ -26374,9 +26046,9 @@ packages: optional: true dependencies: '@types/node': 18.18.9 - esbuild: 0.19.5 + esbuild: 0.19.11 less: 4.1.3 - postcss: 8.4.31 + postcss: 8.4.32 rollup: 4.4.0 optionalDependencies: fsevents: 2.3.3 @@ -26410,8 +26082,8 @@ packages: optional: true dependencies: '@types/node': 20.9.5 - esbuild: 0.19.5 - postcss: 8.4.31 + esbuild: 0.19.11 + postcss: 8.4.32 rollup: 4.4.0 optionalDependencies: fsevents: 2.3.3 @@ -26691,7 +26363,7 @@ packages: dependencies: chalk: 4.1.2 commander: 9.5.0 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) transitivePeerDependencies: - supports-color dev: true @@ -26812,47 +26484,6 @@ packages: - utf-8-validate dev: true - /webdriverio@8.22.1: - resolution: {integrity: sha512-SFqCKM93DPZU5Vn2r9OMi5EFbJHmWnIf8KXZvdzVOkGzQxFDtJ8LDgzwH1/LZxjG9nO+D7y+4wyQl7V24b8L+Q==} - engines: {node: ^16.13 || >=18} - peerDependencies: - devtools: ^8.14.0 - peerDependenciesMeta: - devtools: - optional: true - dependencies: - '@types/node': 20.9.4 - '@wdio/config': 8.22.1 - '@wdio/logger': 8.16.17 - '@wdio/protocols': 8.22.0 - '@wdio/repl': 8.10.1 - '@wdio/types': 8.21.0 - '@wdio/utils': 8.22.0 - archiver: 6.0.1 - aria-query: 5.3.0 - css-shorthand-properties: 1.1.1 - css-value: 0.0.1 - devtools-protocol: 0.0.1213968 - grapheme-splitter: 1.0.4 - import-meta-resolve: 3.0.0 - is-plain-obj: 4.1.0 - lodash.clonedeep: 4.5.0 - lodash.zip: 4.2.0 - minimatch: 9.0.3 - puppeteer-core: 20.9.0 - query-selector-shadow-dom: 1.0.1 - resq: 1.11.0 - rgb2hex: 0.2.5 - serialize-error: 11.0.2 - webdriver: 8.22.1 - transitivePeerDependencies: - - bufferutil - - encoding - - supports-color - - typescript - - utf-8-validate - dev: true - /webdriverio@8.22.1(typescript@5.2.2): resolution: {integrity: sha512-SFqCKM93DPZU5Vn2r9OMi5EFbJHmWnIf8KXZvdzVOkGzQxFDtJ8LDgzwH1/LZxjG9nO+D7y+4wyQl7V24b8L+Q==} engines: {node: ^16.13 || >=18} From 39d0e70fe456fc384af4e8be559fa8b899bdf8e0 Mon Sep 17 00:00:00 2001 From: Hiroshi Ogawa Date: Fri, 19 Jan 2024 10:55:23 +0900 Subject: [PATCH 2/7] fix: install @types/node --- examples/typecheck/package.json | 1 + pnpm-lock.yaml | 159 +++++++++++++++++++------------- 2 files changed, 97 insertions(+), 63 deletions(-) diff --git a/examples/typecheck/package.json b/examples/typecheck/package.json index 6bedeb1ed044..c47e21c63778 100644 --- a/examples/typecheck/package.json +++ b/examples/typecheck/package.json @@ -10,6 +10,7 @@ "test:run": "vitest run" }, "devDependencies": { + "@types/node": "^20.11.5", "@vitest/ui": "latest", "typescript": "^5.2.2", "vite": "latest", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a720a059251e..04d0ba9ef0a2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -791,6 +791,9 @@ importers: examples/typecheck: devDependencies: + '@types/node': + specifier: ^20.11.5 + version: 20.11.5 '@vitest/ui': specifier: latest version: link:../../packages/ui @@ -799,7 +802,7 @@ importers: version: 5.2.2 vite: specifier: ^5.0.0 - version: 5.0.2(@types/node@18.18.9)(less@4.1.3) + version: 5.0.2(@types/node@20.11.5) vitest: specifier: workspace:* version: link:../../packages/vitest @@ -5661,7 +5664,7 @@ packages: engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: '@jest/types': 27.5.1 - '@types/node': 18.18.9 + '@types/node': 20.11.5 chalk: 4.1.2 jest-message-util: 27.5.1 jest-util: 27.5.1 @@ -5682,7 +5685,7 @@ packages: '@jest/test-result': 27.5.1 '@jest/transform': 27.5.1 '@jest/types': 27.5.1 - '@types/node': 18.18.9 + '@types/node': 20.11.5 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.8.1 @@ -5719,7 +5722,7 @@ packages: dependencies: '@jest/fake-timers': 27.5.1 '@jest/types': 27.5.1 - '@types/node': 18.18.9 + '@types/node': 20.11.5 jest-mock: 27.5.1 dev: true @@ -5736,7 +5739,7 @@ packages: dependencies: '@jest/types': 27.5.1 '@sinonjs/fake-timers': 8.1.0 - '@types/node': 18.18.9 + '@types/node': 20.11.5 jest-message-util: 27.5.1 jest-mock: 27.5.1 jest-util: 27.5.1 @@ -5765,7 +5768,7 @@ packages: '@jest/test-result': 27.5.1 '@jest/transform': 27.5.1 '@jest/types': 27.5.1 - '@types/node': 18.18.9 + '@types/node': 20.11.5 chalk: 4.1.2 collect-v8-coverage: 1.0.2 exit: 0.1.2 @@ -5885,7 +5888,7 @@ packages: dependencies: '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 - '@types/node': 18.18.9 + '@types/node': 20.11.5 '@types/yargs': 15.0.14 chalk: 4.1.2 dev: true @@ -5896,7 +5899,7 @@ packages: dependencies: '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 - '@types/node': 18.18.9 + '@types/node': 20.11.5 '@types/yargs': 16.0.7 chalk: 4.1.2 dev: true @@ -5908,7 +5911,7 @@ packages: '@jest/schemas': 29.4.3 '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 - '@types/node': 18.18.9 + '@types/node': 20.11.5 '@types/yargs': 17.0.12 chalk: 4.1.2 dev: true @@ -8998,7 +9001,7 @@ packages: resolution: {integrity: sha512-N7UDG0/xiPQa2D/XrVJXjkWbpqHCd2sBaB32ggRF2l83RhPfamgKGF8gwwqyksS95qUS5ZYF9aF+lLPRlwI2UA==} dependencies: '@types/connect': 3.4.37 - '@types/node': 18.18.9 + '@types/node': 20.11.5 dev: true /@types/braces@3.0.1: @@ -9019,7 +9022,7 @@ packages: /@types/connect@3.4.37: resolution: {integrity: sha512-zBUSRqkfZ59OcwXon4HVxhx5oWCJmc0OtBTK05M+p0dYjgN6iTwIL2T/WbsQZrEsdnwaF9cWQ+azOnpPvIqY3Q==} dependencies: - '@types/node': 18.18.9 + '@types/node': 20.11.5 dev: true /@types/cookie@0.4.1: @@ -9086,7 +9089,7 @@ packages: /@types/express-serve-static-core@4.17.39: resolution: {integrity: sha512-BiEUfAiGCOllomsRAZOiMFP7LAnrifHpt56pc4Z7l9K6ACyN06Ns1JLMBxwkfLOjJRlSf06NwWsT7yzfpaVpyQ==} dependencies: - '@types/node': 18.18.9 + '@types/node': 20.11.5 '@types/qs': 6.9.9 '@types/range-parser': 1.2.6 '@types/send': 0.17.3 @@ -9108,39 +9111,39 @@ packages: /@types/fs-extra@8.1.3: resolution: {integrity: sha512-7IdV01N0u/CaVO0fuY1YmEg14HQN3+EW8mpNgg6NEfxEl/lzCa5OxlBu3iFsCAdamnYOcTQ7oEi43Xc/67Rgzw==} dependencies: - '@types/node': 18.18.9 + '@types/node': 20.11.5 dev: true /@types/fs-extra@9.0.13: resolution: {integrity: sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA==} dependencies: - '@types/node': 18.18.9 + '@types/node': 20.11.5 dev: true /@types/glob@7.2.0: resolution: {integrity: sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==} dependencies: '@types/minimatch': 5.1.1 - '@types/node': 18.18.9 + '@types/node': 20.11.5 dev: true /@types/glob@8.0.0: resolution: {integrity: sha512-l6NQsDDyQUVeoTynNpC9uRvCUint/gSUXQA2euwmTuWGvPY5LSDUu6tkCtJB2SvGQlJQzLaKqcGZP4//7EDveA==} dependencies: '@types/minimatch': 5.1.1 - '@types/node': 18.18.9 + '@types/node': 20.11.5 dev: true /@types/graceful-fs@4.1.5: resolution: {integrity: sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw==} dependencies: - '@types/node': 18.18.9 + '@types/node': 20.11.5 dev: true /@types/graceful-fs@4.1.8: resolution: {integrity: sha512-NhRH7YzWq8WiNKVavKPBmtLYZHxNY19Hh+az28O/phfp68CF45pMFud+ZzJ8ewnxnC5smIdF3dqFeiSUQ5I+pw==} dependencies: - '@types/node': 18.18.9 + '@types/node': 20.11.5 dev: true /@types/hast@2.3.4: @@ -9216,7 +9219,7 @@ packages: /@types/jsdom@21.1.6: resolution: {integrity: sha512-/7kkMsC+/kMs7gAYmmBR9P0vGTnOoLhQhyhQJSlXGI5bzTHp6xdo0TtKWQAsz6pmSAeVqKSbqeyP6hytqr9FDw==} dependencies: - '@types/node': 18.18.9 + '@types/node': 20.11.5 '@types/tough-cookie': 4.0.2 parse5: 7.1.2 dev: true @@ -9283,14 +9286,14 @@ packages: /@types/node-fetch@2.6.2: resolution: {integrity: sha512-DHqhlq5jeESLy19TYhLakJ07kNumXWjcDdxXsLUMJZ6ue8VZJj4kLPQVE/2mdHh3xZziNF1xppu5lwmS53HR+A==} dependencies: - '@types/node': 18.18.9 + '@types/node': 20.11.5 form-data: 3.0.1 dev: true /@types/node-fetch@2.6.7: resolution: {integrity: sha512-lX17GZVpJ/fuCjguZ5b3TjEbSENxmEk1B2z02yoXSK9WMEWRivhdSY73wWMn6bpcCDAOh6qAdktpKHIlkDk2lg==} dependencies: - '@types/node': 18.18.9 + '@types/node': 20.11.5 form-data: 4.0.0 dev: true @@ -9308,14 +9311,8 @@ packages: dependencies: undici-types: 5.26.5 - /@types/node@20.10.5: - resolution: {integrity: sha512-nNPsNE65wjMxEKI93yOP+NPGGBJz/PoN3kZsVLee0XMiJolxSekEVD8wRwBUBqkwc7UWop0edW50yrCQW4CyRw==} - dependencies: - undici-types: 5.26.5 - dev: true - - /@types/node@20.9.4: - resolution: {integrity: sha512-wmyg8HUhcn6ACjsn8oKYjkN/zUzQeNtMy44weTJSM6p4MMzEOuKbA3OjJ267uPCOW7Xex9dyrNTful8XTQYoDA==} + /@types/node@20.11.5: + resolution: {integrity: sha512-g557vgQjUUfN76MZAN/dt1z3dzcUsimuysco0KeluHgrPdJXkP/XdAURgyO2W9fZWHRtRBiVKzKn8vyOAwlG+w==} dependencies: undici-types: 5.26.5 dev: true @@ -9360,7 +9357,7 @@ packages: /@types/prompts@2.4.9: resolution: {integrity: sha512-qTxFi6Buiu8+50/+3DGIWLHM6QuWsEKugJnnP6iv2Mc4ncxE4A/OJkjuVOA+5X0X1S/nq5VJRa8Lu+nwcvbrKA==} dependencies: - '@types/node': 18.18.9 + '@types/node': 20.11.5 kleur: 3.0.3 dev: true @@ -9470,7 +9467,7 @@ packages: /@types/resolve@1.17.1: resolution: {integrity: sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==} dependencies: - '@types/node': 18.18.9 + '@types/node': 20.11.5 dev: true /@types/resolve@1.20.2: @@ -9488,7 +9485,7 @@ packages: resolution: {integrity: sha512-/7fKxvKUoETxjFUsuFlPB9YndePpxxRAOfGC/yJdc9kTjTeP5kRCTzfnE8kPUKCeyiyIZu0YQ76s50hCedI1ug==} dependencies: '@types/mime': 1.3.4 - '@types/node': 18.18.9 + '@types/node': 20.11.5 dev: true /@types/serve-static@1.15.4: @@ -9496,13 +9493,13 @@ packages: dependencies: '@types/http-errors': 2.0.3 '@types/mime': 3.0.3 - '@types/node': 18.18.9 + '@types/node': 20.11.5 dev: true /@types/set-cookie-parser@2.4.2: resolution: {integrity: sha512-fBZgytwhYAUkj/jC/FAV4RQ5EerRup1YQsXQCh8rZfiHkc4UahC192oH0smGwsXol3cL3A5oETuAHeQHmhXM4w==} dependencies: - '@types/node': 18.18.9 + '@types/node': 20.11.5 dev: true /@types/sinonjs__fake-timers@8.1.1: @@ -9552,7 +9549,7 @@ packages: /@types/through@0.0.30: resolution: {integrity: sha512-FvnCJljyxhPM3gkRgWmxmDZyAQSiBQQWLI0A0VFL0K7W1oRUrPJSqNO0NvTnLkBcotdlp3lKvaT0JrnyRDkzOg==} dependencies: - '@types/node': 18.18.9 + '@types/node': 20.11.5 dev: true /@types/tough-cookie@4.0.2: @@ -9590,7 +9587,7 @@ packages: /@types/webpack-sources@3.2.0: resolution: {integrity: sha512-Ft7YH3lEVRQ6ls8k4Ff1oB4jN6oy/XmU6tQISKdhfh+1mR+viZFphS6WL0IrtDOzvefmJg5a0s7ZQoRXwqTEFg==} dependencies: - '@types/node': 18.18.9 + '@types/node': 20.11.5 '@types/source-list-map': 0.1.2 source-map: 0.7.4 dev: true @@ -9598,7 +9595,7 @@ packages: /@types/webpack@4.41.32: resolution: {integrity: sha512-cb+0ioil/7oz5//7tZUSwbrSAN/NWHrQylz5cW8G0dWTcF/g+/dSdMlKVZspBYuMAN1+WnwHrkxiRrLcwd0Heg==} dependencies: - '@types/node': 18.18.9 + '@types/node': 20.11.5 '@types/tapable': 1.0.8 '@types/uglify-js': 3.17.0 '@types/webpack-sources': 3.2.0 @@ -9613,7 +9610,7 @@ packages: /@types/ws@8.5.9: resolution: {integrity: sha512-jbdrY0a8lxfdTp/+r7Z4CkycbOFN8WX+IOchLJr3juT/xzbJ8URyTVSJ/hvNdadTgM1mnedb47n+Y31GsFnQlg==} dependencies: - '@types/node': 20.9.4 + '@types/node': 20.11.5 dev: true /@types/yargs-parser@21.0.0: @@ -9646,7 +9643,7 @@ packages: resolution: {integrity: sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==} requiresBuild: true dependencies: - '@types/node': 18.18.9 + '@types/node': 20.11.5 dev: true optional: true @@ -10674,28 +10671,28 @@ packages: resolution: {integrity: sha512-VZ1WFHTNKjR8Ga97TtV2SZM6fvRjWbYI2i/f4pJB4PtusorKvONAMJf2LQcUBIyzbVobqr7KSrcjmSwRolI+yw==} engines: {node: ^16.13 || >=18} dependencies: - '@types/node': 20.10.5 + '@types/node': 20.11.5 dev: true /@wdio/repl@8.23.1: resolution: {integrity: sha512-u6zG2cgBm67V5/WlQzadWqLGXs3moH8MOsgoljULQncelSBBZGZ5DyLB4p7jKcUAsKtMjgmFQmIvpQoqmyvdfg==} engines: {node: ^16.13 || >=18} dependencies: - '@types/node': 20.10.5 + '@types/node': 20.11.5 dev: true /@wdio/types@8.21.0: resolution: {integrity: sha512-mZFOipmu541z0BXBW7mBAUjM4zZWhNnP/w321OSYx082Jy4d0UHMFXYWaOC98DIMBPahJu/yLX2WH5iCrazKSA==} engines: {node: ^16.13 || >=18} dependencies: - '@types/node': 20.10.5 + '@types/node': 20.11.5 dev: true /@wdio/types@8.24.0: resolution: {integrity: sha512-FXbJnQCS1b39RKqBlW9HTNEP4vukxjFc+GiwvPS+XPtY+3Vn7eOyBv3X3CiH1K7C+tzelqlio/HgP68pV5cXsQ==} engines: {node: ^16.13 || >=18} dependencies: - '@types/node': 20.10.5 + '@types/node': 20.11.5 dev: true /@wdio/utils@8.22.0: @@ -18362,7 +18359,7 @@ packages: '@jest/environment': 27.5.1 '@jest/test-result': 27.5.1 '@jest/types': 27.5.1 - '@types/node': 18.18.9 + '@types/node': 20.11.5 chalk: 4.1.2 co: 4.6.0 dedent: 0.7.0 @@ -18497,7 +18494,7 @@ packages: '@jest/environment': 27.5.1 '@jest/fake-timers': 27.5.1 '@jest/types': 27.5.1 - '@types/node': 18.18.9 + '@types/node': 20.11.5 jest-mock: 27.5.1 jest-util: 27.5.1 jsdom: 16.7.0 @@ -18515,7 +18512,7 @@ packages: '@jest/environment': 27.5.1 '@jest/fake-timers': 27.5.1 '@jest/types': 27.5.1 - '@types/node': 18.18.9 + '@types/node': 20.11.5 jest-mock: 27.5.1 jest-util: 27.5.1 dev: true @@ -18536,7 +18533,7 @@ packages: dependencies: '@jest/types': 26.6.2 '@types/graceful-fs': 4.1.5 - '@types/node': 18.18.9 + '@types/node': 20.11.5 anymatch: 3.1.3 fb-watchman: 2.0.1 graceful-fs: 4.2.11 @@ -18559,7 +18556,7 @@ packages: dependencies: '@jest/types': 27.5.1 '@types/graceful-fs': 4.1.8 - '@types/node': 18.18.9 + '@types/node': 20.11.5 anymatch: 3.1.3 fb-watchman: 2.0.2 graceful-fs: 4.2.11 @@ -18599,7 +18596,7 @@ packages: '@jest/source-map': 27.5.1 '@jest/test-result': 27.5.1 '@jest/types': 27.5.1 - '@types/node': 18.18.9 + '@types/node': 20.11.5 chalk: 4.1.2 co: 4.6.0 expect: 27.5.1 @@ -18679,7 +18676,7 @@ packages: engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: '@jest/types': 27.5.1 - '@types/node': 18.18.9 + '@types/node': 20.11.5 dev: true /jest-pnp-resolver@1.2.3(jest-resolve@27.5.1): @@ -18740,7 +18737,7 @@ packages: '@jest/test-result': 27.5.1 '@jest/transform': 27.5.1 '@jest/types': 27.5.1 - '@types/node': 18.18.9 + '@types/node': 20.11.5 chalk: 4.1.2 emittery: 0.8.1 graceful-fs: 4.2.11 @@ -18797,7 +18794,7 @@ packages: resolution: {integrity: sha512-S5wqyz0DXnNJPd/xfIzZ5Xnp1HrJWBczg8mMfMpN78OJ5eDxXyf+Ygld9wX1DnUWbIbhM1YDY95NjR4CBXkb2g==} engines: {node: '>= 10.14.2'} dependencies: - '@types/node': 18.18.9 + '@types/node': 20.11.5 graceful-fs: 4.2.11 dev: true @@ -18805,7 +18802,7 @@ packages: resolution: {integrity: sha512-jZCyo6iIxO1aqUxpuBlwTDMkzOAJS4a3eYz3YzgxxVQFwLeSA7Jfq5cbqCY+JLvTDrWirgusI/0KwxKMgrdf7w==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: - '@types/node': 18.18.9 + '@types/node': 20.11.5 graceful-fs: 4.2.11 dev: true @@ -18844,7 +18841,7 @@ packages: engines: {node: '>= 10.14.2'} dependencies: '@jest/types': 26.6.2 - '@types/node': 18.18.9 + '@types/node': 20.11.5 chalk: 4.1.2 graceful-fs: 4.2.11 is-ci: 2.0.0 @@ -18856,7 +18853,7 @@ packages: engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: '@jest/types': 27.5.1 - '@types/node': 18.18.9 + '@types/node': 20.11.5 chalk: 4.1.2 ci-info: 3.9.0 graceful-fs: 4.2.11 @@ -18868,7 +18865,7 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/types': 29.0.1 - '@types/node': 18.18.9 + '@types/node': 20.11.5 chalk: 4.1.2 ci-info: 3.9.0 graceful-fs: 4.2.11 @@ -18893,7 +18890,7 @@ packages: dependencies: '@jest/test-result': 27.5.1 '@jest/types': 27.5.1 - '@types/node': 18.18.9 + '@types/node': 20.11.5 ansi-escapes: 4.3.2 chalk: 4.1.2 jest-util: 27.5.1 @@ -18904,7 +18901,7 @@ packages: resolution: {integrity: sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==} engines: {node: '>= 10.13.0'} dependencies: - '@types/node': 18.18.9 + '@types/node': 20.11.5 merge-stream: 2.0.0 supports-color: 7.2.0 dev: true @@ -18913,7 +18910,7 @@ packages: resolution: {integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==} engines: {node: '>= 10.13.0'} dependencies: - '@types/node': 18.18.9 + '@types/node': 20.11.5 merge-stream: 2.0.0 supports-color: 8.1.1 dev: true @@ -26053,6 +26050,42 @@ packages: optionalDependencies: fsevents: 2.3.3 + /vite@5.0.2(@types/node@20.11.5): + resolution: {integrity: sha512-6CCq1CAJCNM1ya2ZZA7+jS2KgnhbzvxakmlIjN24cF/PXhRMzpM/z8QgsVJA/Dm5fWUWnVEsmtBoMhmerPxT0g==} + engines: {node: ^18.0.0 || >=20.0.0} + hasBin: true + peerDependencies: + '@types/node': ^18.0.0 || >=20.0.0 + less: '*' + lightningcss: ^1.21.0 + sass: '*' + stylus: '*' + sugarss: '*' + terser: ^5.4.0 + peerDependenciesMeta: + '@types/node': + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + dependencies: + '@types/node': 20.11.5 + esbuild: 0.19.11 + postcss: 8.4.32 + rollup: 4.4.0 + optionalDependencies: + fsevents: 2.3.3 + dev: true + /vite@5.0.2(@types/node@20.9.5): resolution: {integrity: sha512-6CCq1CAJCNM1ya2ZZA7+jS2KgnhbzvxakmlIjN24cF/PXhRMzpM/z8QgsVJA/Dm5fWUWnVEsmtBoMhmerPxT0g==} engines: {node: ^18.0.0 || >=20.0.0} @@ -26446,7 +26479,7 @@ packages: resolution: {integrity: sha512-EQY2YjbOZInuvYAqEEP7w7voWSy9cPMt3UB1o1+obKhrD8dkIDZNkPocpZUI59PokqHTXk4zIclV50k1KpyyiA==} engines: {node: ^16.13 || >=18} dependencies: - '@types/node': 20.10.5 + '@types/node': 20.11.5 '@types/ws': 8.5.9 '@wdio/config': 8.22.1 '@wdio/logger': 8.16.17 @@ -26467,7 +26500,7 @@ packages: resolution: {integrity: sha512-zI1zw4lbP2cg1NPikIaUBHQU3+xdvEEBi0Jrydhtp3VVeIEqJWwUFxG/P9LwJpiQ0PYMb/5cxoQrSRhrEXyXHQ==} engines: {node: ^16.13 || >=18} dependencies: - '@types/node': 20.10.5 + '@types/node': 20.11.5 '@types/ws': 8.5.9 '@wdio/config': 8.24.0 '@wdio/logger': 8.16.17 @@ -26493,7 +26526,7 @@ packages: devtools: optional: true dependencies: - '@types/node': 20.9.4 + '@types/node': 20.11.5 '@wdio/config': 8.22.1 '@wdio/logger': 8.16.17 '@wdio/protocols': 8.22.0 @@ -26534,7 +26567,7 @@ packages: devtools: optional: true dependencies: - '@types/node': 20.9.5 + '@types/node': 20.11.5 '@wdio/config': 8.24.0 '@wdio/logger': 8.16.17 '@wdio/protocols': 8.23.0 From 022d97c19a8b914c96ac4c4f256f1abab90cb9db Mon Sep 17 00:00:00 2001 From: Hiroshi Ogawa Date: Fri, 19 Jan 2024 11:24:34 +0900 Subject: [PATCH 3/7] chore: add examples/workspace --- examples/workspace/README.md | 5 +++++ examples/workspace/package.json | 19 +++++++++++++++++++ examples/workspace/packages/lib1/package.json | 6 ++++++ .../packages/lib1/test/double.test.ts | 5 +++++ .../workspace/packages/lib1/tsconfig.json | 14 ++++++++++++++ .../workspace/packages/lib1/vite.config.ts | 8 ++++++++ examples/workspace/packages/lib2/package.json | 6 ++++++ .../packages/lib2/test/square.test.ts | 5 +++++ .../workspace/packages/lib2/tsconfig.json | 14 ++++++++++++++ .../workspace/packages/lib2/vite.config.ts | 8 ++++++++ examples/workspace/tsconfig.json | 13 +++++++++++++ examples/workspace/vitest.workspace.ts | 5 +++++ pnpm-lock.yaml | 12 ++++++++++++ 13 files changed, 120 insertions(+) create mode 100644 examples/workspace/README.md create mode 100644 examples/workspace/package.json create mode 100644 examples/workspace/packages/lib1/package.json create mode 100644 examples/workspace/packages/lib1/test/double.test.ts create mode 100644 examples/workspace/packages/lib1/tsconfig.json create mode 100644 examples/workspace/packages/lib1/vite.config.ts create mode 100644 examples/workspace/packages/lib2/package.json create mode 100644 examples/workspace/packages/lib2/test/square.test.ts create mode 100644 examples/workspace/packages/lib2/tsconfig.json create mode 100644 examples/workspace/packages/lib2/vite.config.ts create mode 100644 examples/workspace/tsconfig.json create mode 100644 examples/workspace/vitest.workspace.ts diff --git a/examples/workspace/README.md b/examples/workspace/README.md new file mode 100644 index 000000000000..c2aeeb97396c --- /dev/null +++ b/examples/workspace/README.md @@ -0,0 +1,5 @@ +# Vitest Demo + +Run `npm test` and change a test or source code to see HMR in action! + +Learn more at https://vitest.dev diff --git a/examples/workspace/package.json b/examples/workspace/package.json new file mode 100644 index 000000000000..4538f2c2894b --- /dev/null +++ b/examples/workspace/package.json @@ -0,0 +1,19 @@ +{ + "name": "@vitest/example-workspace", + "type": "module", + "private": true, + "license": "MIT", + "scripts": { + "test": "vitest", + "test:ui": "vitest --ui", + "test:run": "vitest run" + }, + "devDependencies": { + "@vitest/ui": "latest", + "vite": "latest", + "vitest": "latest" + }, + "stackblitz": { + "startCommand": "npm run test:ui" + } +} diff --git a/examples/workspace/packages/lib1/package.json b/examples/workspace/packages/lib1/package.json new file mode 100644 index 000000000000..05d694593839 --- /dev/null +++ b/examples/workspace/packages/lib1/package.json @@ -0,0 +1,6 @@ +{ + "name": "@vitest/example-workspace-lib1", + "type": "module", + "private": true, + "license": "MIT" +} diff --git a/examples/workspace/packages/lib1/test/double.test.ts b/examples/workspace/packages/lib1/test/double.test.ts new file mode 100644 index 000000000000..e220b0c8327b --- /dev/null +++ b/examples/workspace/packages/lib1/test/double.test.ts @@ -0,0 +1,5 @@ +import { expect, test } from 'vitest' + +test('double', () => { + expect(2 * 2).toBe(4) +}) diff --git a/examples/workspace/packages/lib1/tsconfig.json b/examples/workspace/packages/lib1/tsconfig.json new file mode 100644 index 000000000000..c27a77299457 --- /dev/null +++ b/examples/workspace/packages/lib1/tsconfig.json @@ -0,0 +1,14 @@ +{ + "compilerOptions": { + "target": "es2020", + "module": "ESNext", + "moduleResolution": "Bundler", + "strict": true, + "declaration": true, + "declarationMap": true, + "sourceMap": true, + "verbatimModuleSyntax": true + }, + "include": ["src", "test"], + "exclude": ["node_modules"] +} diff --git a/examples/workspace/packages/lib1/vite.config.ts b/examples/workspace/packages/lib1/vite.config.ts new file mode 100644 index 000000000000..8c7f38b9c192 --- /dev/null +++ b/examples/workspace/packages/lib1/vite.config.ts @@ -0,0 +1,8 @@ +/// + +import { defineConfig } from 'vite' + +export default defineConfig({ + test: { + }, +}) diff --git a/examples/workspace/packages/lib2/package.json b/examples/workspace/packages/lib2/package.json new file mode 100644 index 000000000000..bf8308ff2076 --- /dev/null +++ b/examples/workspace/packages/lib2/package.json @@ -0,0 +1,6 @@ +{ + "name": "@vitest/example-workspace-lib2", + "type": "module", + "private": true, + "license": "MIT" +} diff --git a/examples/workspace/packages/lib2/test/square.test.ts b/examples/workspace/packages/lib2/test/square.test.ts new file mode 100644 index 000000000000..49e92f00f85c --- /dev/null +++ b/examples/workspace/packages/lib2/test/square.test.ts @@ -0,0 +1,5 @@ +import { expect, test } from 'vitest' + +test('square', () => { + expect(2 ** 2).toBe(4) +}) diff --git a/examples/workspace/packages/lib2/tsconfig.json b/examples/workspace/packages/lib2/tsconfig.json new file mode 100644 index 000000000000..c27a77299457 --- /dev/null +++ b/examples/workspace/packages/lib2/tsconfig.json @@ -0,0 +1,14 @@ +{ + "compilerOptions": { + "target": "es2020", + "module": "ESNext", + "moduleResolution": "Bundler", + "strict": true, + "declaration": true, + "declarationMap": true, + "sourceMap": true, + "verbatimModuleSyntax": true + }, + "include": ["src", "test"], + "exclude": ["node_modules"] +} diff --git a/examples/workspace/packages/lib2/vite.config.ts b/examples/workspace/packages/lib2/vite.config.ts new file mode 100644 index 000000000000..8c7f38b9c192 --- /dev/null +++ b/examples/workspace/packages/lib2/vite.config.ts @@ -0,0 +1,8 @@ +/// + +import { defineConfig } from 'vite' + +export default defineConfig({ + test: { + }, +}) diff --git a/examples/workspace/tsconfig.json b/examples/workspace/tsconfig.json new file mode 100644 index 000000000000..1d25015762c3 --- /dev/null +++ b/examples/workspace/tsconfig.json @@ -0,0 +1,13 @@ +{ + "compilerOptions": { + "target": "es2020", + "module": "node16", + "strict": true, + "declaration": true, + "declarationMap": true, + "sourceMap": true, + "verbatimModuleSyntax": true + }, + "include": ["src", "test"], + "exclude": ["node_modules"] +} diff --git a/examples/workspace/vitest.workspace.ts b/examples/workspace/vitest.workspace.ts new file mode 100644 index 000000000000..b18a56c5a4c8 --- /dev/null +++ b/examples/workspace/vitest.workspace.ts @@ -0,0 +1,5 @@ +import { defineWorkspace } from 'vitest/config' + +export default defineWorkspace([ + 'packages/*', +]) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 04d0ba9ef0a2..f38653306729 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -881,6 +881,18 @@ importers: specifier: latest version: 3.3.8(typescript@5.2.2) + examples/workspace: + devDependencies: + '@vitest/ui': + specifier: latest + version: link:../../packages/ui + vite: + specifier: ^5.0.0 + version: 5.0.2(@types/node@18.18.9)(less@4.1.3) + vitest: + specifier: workspace:* + version: link:../../packages/vitest + packages/browser: dependencies: '@vitest/utils': From f93d0a970174aee70938c2426c957c143640d9f8 Mon Sep 17 00:00:00 2001 From: Hiroshi Ogawa Date: Fri, 19 Jan 2024 12:03:06 +0900 Subject: [PATCH 4/7] chore: use defineProject config --- examples/typecheck/README.md | 5 ----- examples/workspace/README.md | 5 ----- examples/workspace/packages/lib1/vite.config.ts | 9 +++------ examples/workspace/packages/lib2/vite.config.ts | 9 +++------ 4 files changed, 6 insertions(+), 22 deletions(-) delete mode 100644 examples/typecheck/README.md delete mode 100644 examples/workspace/README.md diff --git a/examples/typecheck/README.md b/examples/typecheck/README.md deleted file mode 100644 index c2aeeb97396c..000000000000 --- a/examples/typecheck/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Vitest Demo - -Run `npm test` and change a test or source code to see HMR in action! - -Learn more at https://vitest.dev diff --git a/examples/workspace/README.md b/examples/workspace/README.md deleted file mode 100644 index c2aeeb97396c..000000000000 --- a/examples/workspace/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Vitest Demo - -Run `npm test` and change a test or source code to see HMR in action! - -Learn more at https://vitest.dev diff --git a/examples/workspace/packages/lib1/vite.config.ts b/examples/workspace/packages/lib1/vite.config.ts index 8c7f38b9c192..f797ea2206c3 100644 --- a/examples/workspace/packages/lib1/vite.config.ts +++ b/examples/workspace/packages/lib1/vite.config.ts @@ -1,8 +1,5 @@ -/// +import { defineProject } from 'vitest/config' -import { defineConfig } from 'vite' - -export default defineConfig({ - test: { - }, +export default defineProject({ + test: {}, }) diff --git a/examples/workspace/packages/lib2/vite.config.ts b/examples/workspace/packages/lib2/vite.config.ts index 8c7f38b9c192..f797ea2206c3 100644 --- a/examples/workspace/packages/lib2/vite.config.ts +++ b/examples/workspace/packages/lib2/vite.config.ts @@ -1,8 +1,5 @@ -/// +import { defineProject } from 'vitest/config' -import { defineConfig } from 'vite' - -export default defineConfig({ - test: { - }, +export default defineProject({ + test: {}, }) From e5a31e6f633b567f2080d43a56f53e4ff37083f5 Mon Sep 17 00:00:00 2001 From: Hiroshi Ogawa Date: Fri, 19 Jan 2024 16:41:23 +0900 Subject: [PATCH 5/7] chore: docs --- docs/guide/testing-types.md | 12 ++++++++++++ docs/guide/workspace.md | 12 ++++++++++++ examples/README.md | 2 ++ 3 files changed, 26 insertions(+) diff --git a/docs/guide/testing-types.md b/docs/guide/testing-types.md index 329ce0a312eb..6b80ce8566e6 100644 --- a/docs/guide/testing-types.md +++ b/docs/guide/testing-types.md @@ -4,6 +4,18 @@ title: Testing Types | Guide # Testing Types +::: tip Sample Project + +[GitHub](https://github.com/vitest-dev/vitest/tree/main/examples/typecheck) - [Play Online](https://stackblitz.com/fork/github/vitest-dev/vitest/tree/main/examples/typecheck?initialPath=__vitest__/) + +::: + +::: tip + +You can find a sample project in [Examples](/guide/#examples). + +::: + Vitest allows you to write tests for your types, using `expectTypeOf` or `assertType` syntaxes. By default all tests inside `*.test-d.ts` files are considered type tests, but you can change it with [`typecheck.include`](/config/#typecheck-include) config option. Under the hood Vitest calls `tsc` or `vue-tsc`, depending on your config, and parses results. Vitest will also print out type errors in your source code, if it finds any. You can disable it with [`typecheck.ignoreSourceErrors`](/config/#typecheck-ignoresourceerrors) config option. diff --git a/docs/guide/workspace.md b/docs/guide/workspace.md index 131c2013e8e2..3fd56803c24f 100644 --- a/docs/guide/workspace.md +++ b/docs/guide/workspace.md @@ -4,6 +4,18 @@ title: Workspace | Guide # Workspace +::: tip Sample Project + +[GitHub](https://github.com/vitest-dev/vitest/tree/main/examples/workspace) - [Play Online](https://stackblitz.com/fork/github/vitest-dev/vitest/tree/main/examples/workspace?initialPath=__vitest__/) + +::: + +::: tip + +You can find a sample project in [Examples](/guide/#examples). + +::: + Vitest provides built-in support for monorepos through a workspace configuration file. You can create a workspace to define your project's setups. ## Defining a Workspace diff --git a/examples/README.md b/examples/README.md index 70b36494a6bd..2e3c5108f587 100644 --- a/examples/README.md +++ b/examples/README.md @@ -22,3 +22,5 @@ | `vitesse` | [GitHub](https://github.com/vitest-dev/vitest/tree/main/examples/vitesse) | [Play Online](https://stackblitz.com/fork/github/vitest-dev/vitest/tree/main/examples/vitesse?initialPath=__vitest__/) | | `vue-jsx` | [GitHub](https://github.com/vitest-dev/vitest/tree/main/examples/vue-jsx) | [Play Online](https://stackblitz.com/fork/github/vitest-dev/vitest/tree/main/examples/vue-jsx?initialPath=__vitest__/) | | `vue` | [GitHub](https://github.com/vitest-dev/vitest/tree/main/examples/vue) | [Play Online](https://stackblitz.com/fork/github/vitest-dev/vitest/tree/main/examples/vue?initialPath=__vitest__/) | +| `typecheck` | [GitHub](https://github.com/vitest-dev/vitest/tree/main/examples/typecheck) | [Play Online](https://stackblitz.com/fork/github/vitest-dev/vitest/tree/main/examples/typecheck?initialPath=__vitest__/) | +| `workspace` | [GitHub](https://github.com/vitest-dev/vitest/tree/main/examples/workspace) | [Play Online](https://stackblitz.com/fork/github/vitest-dev/vitest/tree/main/examples/workspace?initialPath=__vitest__/) | From e75dabb5e57ba20dffc708f3faf8de21c46f3845 Mon Sep 17 00:00:00 2001 From: Hiroshi Ogawa Date: Fri, 19 Jan 2024 16:54:40 +0900 Subject: [PATCH 6/7] chore: run "pnpm docs:examples" --- examples/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/README.md b/examples/README.md index 2e3c5108f587..07a53801e566 100644 --- a/examples/README.md +++ b/examples/README.md @@ -5,6 +5,7 @@ | `graphql` | [GitHub](https://github.com/vitest-dev/vitest/tree/main/examples/graphql) | [Play Online](https://stackblitz.com/fork/github/vitest-dev/vitest/tree/main/examples/graphql?initialPath=__vitest__/) | | `image-snapshot` | [GitHub](https://github.com/vitest-dev/vitest/tree/main/examples/image-snapshot) | [Play Online](https://stackblitz.com/fork/github/vitest-dev/vitest/tree/main/examples/image-snapshot?initialPath=__vitest__/) | | `lit` | [GitHub](https://github.com/vitest-dev/vitest/tree/main/examples/lit) | [Play Online](https://stackblitz.com/fork/github/vitest-dev/vitest/tree/main/examples/lit?initialPath=__vitest__/) | +| `marko` | [GitHub](https://github.com/vitest-dev/vitest/tree/main/examples/marko) | [Play Online](https://stackblitz.com/fork/github/vitest-dev/vitest/tree/main/examples/marko?initialPath=__vitest__/) | | `mocks` | [GitHub](https://github.com/vitest-dev/vitest/tree/main/examples/mocks) | [Play Online](https://stackblitz.com/fork/github/vitest-dev/vitest/tree/main/examples/mocks?initialPath=__vitest__/) | | `nextjs` | [GitHub](https://github.com/vitest-dev/vitest/tree/main/examples/nextjs) | [Play Online](https://stackblitz.com/fork/github/vitest-dev/vitest/tree/main/examples/nextjs?initialPath=__vitest__/) | | `playwright` | [GitHub](https://github.com/vitest-dev/vitest/tree/main/examples/playwright) | | @@ -18,9 +19,8 @@ | `solid` | [GitHub](https://github.com/vitest-dev/vitest/tree/main/examples/solid) | [Play Online](https://stackblitz.com/fork/github/vitest-dev/vitest/tree/main/examples/solid?initialPath=__vitest__/) | | `svelte` | [GitHub](https://github.com/vitest-dev/vitest/tree/main/examples/svelte) | [Play Online](https://stackblitz.com/fork/github/vitest-dev/vitest/tree/main/examples/svelte?initialPath=__vitest__/) | | `sveltekit` | [GitHub](https://github.com/vitest-dev/vitest/tree/main/examples/sveltekit) | [Play Online](https://stackblitz.com/fork/github/vitest-dev/vitest/tree/main/examples/sveltekit?initialPath=__vitest__/) | -| `marko` | [GitHub](https://github.com/vitest-dev/vitest/tree/main/examples/marko) | [Play Online](https://stackblitz.com/fork/github/vitest-dev/vitest/tree/main/examples/marko?initialPath=__vitest__/) | +| `typecheck` | [GitHub](https://github.com/vitest-dev/vitest/tree/main/examples/typecheck) | [Play Online](https://stackblitz.com/fork/github/vitest-dev/vitest/tree/main/examples/typecheck?initialPath=__vitest__/) | | `vitesse` | [GitHub](https://github.com/vitest-dev/vitest/tree/main/examples/vitesse) | [Play Online](https://stackblitz.com/fork/github/vitest-dev/vitest/tree/main/examples/vitesse?initialPath=__vitest__/) | | `vue-jsx` | [GitHub](https://github.com/vitest-dev/vitest/tree/main/examples/vue-jsx) | [Play Online](https://stackblitz.com/fork/github/vitest-dev/vitest/tree/main/examples/vue-jsx?initialPath=__vitest__/) | | `vue` | [GitHub](https://github.com/vitest-dev/vitest/tree/main/examples/vue) | [Play Online](https://stackblitz.com/fork/github/vitest-dev/vitest/tree/main/examples/vue?initialPath=__vitest__/) | -| `typecheck` | [GitHub](https://github.com/vitest-dev/vitest/tree/main/examples/typecheck) | [Play Online](https://stackblitz.com/fork/github/vitest-dev/vitest/tree/main/examples/typecheck?initialPath=__vitest__/) | | `workspace` | [GitHub](https://github.com/vitest-dev/vitest/tree/main/examples/workspace) | [Play Online](https://stackblitz.com/fork/github/vitest-dev/vitest/tree/main/examples/workspace?initialPath=__vitest__/) | From 78b3840740469cbd7037fb1e35d68675ca18fba3 Mon Sep 17 00:00:00 2001 From: Hiroshi Ogawa Date: Fri, 19 Jan 2024 16:58:27 +0900 Subject: [PATCH 7/7] chore: docs --- docs/guide/testing-types.md | 6 ------ docs/guide/workspace.md | 6 ------ 2 files changed, 12 deletions(-) diff --git a/docs/guide/testing-types.md b/docs/guide/testing-types.md index 6b80ce8566e6..091bc6a20d82 100644 --- a/docs/guide/testing-types.md +++ b/docs/guide/testing-types.md @@ -10,12 +10,6 @@ title: Testing Types | Guide ::: -::: tip - -You can find a sample project in [Examples](/guide/#examples). - -::: - Vitest allows you to write tests for your types, using `expectTypeOf` or `assertType` syntaxes. By default all tests inside `*.test-d.ts` files are considered type tests, but you can change it with [`typecheck.include`](/config/#typecheck-include) config option. Under the hood Vitest calls `tsc` or `vue-tsc`, depending on your config, and parses results. Vitest will also print out type errors in your source code, if it finds any. You can disable it with [`typecheck.ignoreSourceErrors`](/config/#typecheck-ignoresourceerrors) config option. diff --git a/docs/guide/workspace.md b/docs/guide/workspace.md index 3fd56803c24f..885353ad40cd 100644 --- a/docs/guide/workspace.md +++ b/docs/guide/workspace.md @@ -10,12 +10,6 @@ title: Workspace | Guide ::: -::: tip - -You can find a sample project in [Examples](/guide/#examples). - -::: - Vitest provides built-in support for monorepos through a workspace configuration file. You can create a workspace to define your project's setups. ## Defining a Workspace