test: add `typeCheck` test in minimal build (#28166)

This commit is contained in:
Daniel Roe 2024-07-16 11:08:21 +01:00 committed by GitHub
parent 4b89540848
commit e19d5dd243
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 16 additions and 34 deletions

View File

@ -64,7 +64,7 @@
"unplugin": "^1.11.0", "unplugin": "^1.11.0",
"vite": "^5.3.3", "vite": "^5.3.3",
"vite-node": "^1.6.0", "vite-node": "^1.6.0",
"vite-plugin-checker": "0.7.0", "vite-plugin-checker": "^0.7.2",
"vue-bundle-renderer": "^2.1.0" "vue-bundle-renderer": "^2.1.0"
}, },
"peerDependencies": { "peerDependencies": {

View File

@ -725,8 +725,8 @@ importers:
specifier: ^1.6.0 specifier: ^1.6.0
version: 1.6.0(@types/node@20.14.10)(sass@1.69.4)(terser@5.27.0) version: 1.6.0(@types/node@20.14.10)(sass@1.69.4)(terser@5.27.0)
vite-plugin-checker: vite-plugin-checker:
specifier: 0.7.0 specifier: ^0.7.2
version: 0.7.0(eslint@9.7.0)(optionator@0.9.3)(typescript@5.5.3)(vite@5.3.3(@types/node@20.14.10)(sass@1.69.4)(terser@5.27.0))(vue-tsc@2.0.26(typescript@5.5.3)) version: 0.7.2(eslint@9.7.0)(optionator@0.9.3)(typescript@5.5.3)(vite@5.3.3(@types/node@20.14.10)(sass@1.69.4)(terser@5.27.0))(vue-tsc@2.0.26(typescript@5.5.3))
vue-bundle-renderer: vue-bundle-renderer:
specifier: ^2.1.0 specifier: ^2.1.0
version: 2.1.0 version: 2.1.0
@ -2745,21 +2745,12 @@ packages:
'@vitest/utils@1.6.0': '@vitest/utils@1.6.0':
resolution: {integrity: sha512-21cPiuGMoMZwiOHa2i4LXkMkMkCGzA+MVFV70jRwHo95dL4x/ts5GZhML1QWuy7yfp3WzK3lRvZi3JnXTYqrBw==} resolution: {integrity: sha512-21cPiuGMoMZwiOHa2i4LXkMkMkCGzA+MVFV70jRwHo95dL4x/ts5GZhML1QWuy7yfp3WzK3lRvZi3JnXTYqrBw==}
'@volar/language-core@2.3.4':
resolution: {integrity: sha512-wXBhY11qG6pCDAqDnbBRFIDSIwbqkWI7no+lj5+L7IlA7HRIjRP7YQLGzT0LF4lS6eHkMSsclXqy9DwYJasZTQ==}
'@volar/language-core@2.4.0-alpha.15': '@volar/language-core@2.4.0-alpha.15':
resolution: {integrity: sha512-mt8z4Fm2WxfQYoQHPcKVjLQV6PgPqyKLbkCVY2cr5RSaamqCHjhKEpsFX66aL4D/7oYguuaUw9Bx03Vt0TpIIA==} resolution: {integrity: sha512-mt8z4Fm2WxfQYoQHPcKVjLQV6PgPqyKLbkCVY2cr5RSaamqCHjhKEpsFX66aL4D/7oYguuaUw9Bx03Vt0TpIIA==}
'@volar/source-map@2.3.4':
resolution: {integrity: sha512-C+t63nwcblqLIVTYXaVi/+gC8NukDaDIQI72J3R7aXGvtgaVB16c+J8Iz7/VfOy7kjYv7lf5GhBny6ACw9fTGQ==}
'@volar/source-map@2.4.0-alpha.15': '@volar/source-map@2.4.0-alpha.15':
resolution: {integrity: sha512-8Htngw5TmBY4L3ClDqBGyfLhsB8EmoEXUH1xydyEtEoK0O6NX5ur4Jw8jgvscTlwzizyl/wsN1vn0cQXVbbXYg==} resolution: {integrity: sha512-8Htngw5TmBY4L3ClDqBGyfLhsB8EmoEXUH1xydyEtEoK0O6NX5ur4Jw8jgvscTlwzizyl/wsN1vn0cQXVbbXYg==}
'@volar/typescript@2.3.4':
resolution: {integrity: sha512-acCvt7dZECyKcvO5geNybmrqOsu9u8n5XP1rfiYsOLYGPxvHRav9BVmEdRyZ3vvY6mNyQ1wLL5Hday4IShe17w==}
'@volar/typescript@2.4.0-alpha.15': '@volar/typescript@2.4.0-alpha.15':
resolution: {integrity: sha512-U3StRBbDuxV6Woa4hvGS4kz3XcOzrWUKgFdEFN+ba1x3eaYg7+ytau8ul05xgA+UNGLXXsKur7fTUhDFyISk0w==} resolution: {integrity: sha512-U3StRBbDuxV6Woa4hvGS4kz3XcOzrWUKgFdEFN+ba1x3eaYg7+ytau8ul05xgA+UNGLXXsKur7fTUhDFyISk0w==}
@ -6883,10 +6874,11 @@ packages:
engines: {node: ^18.0.0 || >=20.0.0} engines: {node: ^18.0.0 || >=20.0.0}
hasBin: true hasBin: true
vite-plugin-checker@0.7.0: vite-plugin-checker@0.7.2:
resolution: {integrity: sha512-F3MdUORNLcPC0oDB9zxmPDhUC8X/3fzDShU5Izk4bqE4uTgxbQdOuOCa99bS6OSyWVC0uhHG4yAtWUXM2jOx9A==} resolution: {integrity: sha512-xeYeJbG0gaCaT0QcUC4B2Zo4y5NR8ZhYenc5gPbttrZvraRFwkEADCYwq+BfEHl9zYz7yf85TxsiGoYwyyIjhw==}
engines: {node: '>=14.16'} engines: {node: '>=14.16'}
peerDependencies: peerDependencies:
'@biomejs/biome': '>=1.7'
eslint: '>=7' eslint: '>=7'
meow: ^9.0.0 meow: ^9.0.0
optionator: ^0.9.1 optionator: ^0.9.1
@ -6897,6 +6889,8 @@ packages:
vti: '*' vti: '*'
vue-tsc: '>=2.0.0' vue-tsc: '>=2.0.0'
peerDependenciesMeta: peerDependenciesMeta:
'@biomejs/biome':
optional: true
eslint: eslint:
optional: true optional: true
meow: meow:
@ -9288,24 +9282,12 @@ snapshots:
loupe: 2.3.7 loupe: 2.3.7
pretty-format: 29.7.0 pretty-format: 29.7.0
'@volar/language-core@2.3.4':
dependencies:
'@volar/source-map': 2.3.4
'@volar/language-core@2.4.0-alpha.15': '@volar/language-core@2.4.0-alpha.15':
dependencies: dependencies:
'@volar/source-map': 2.4.0-alpha.15 '@volar/source-map': 2.4.0-alpha.15
'@volar/source-map@2.3.4': {}
'@volar/source-map@2.4.0-alpha.15': {} '@volar/source-map@2.4.0-alpha.15': {}
'@volar/typescript@2.3.4':
dependencies:
'@volar/language-core': 2.3.4
path-browserify: 1.0.1
vscode-uri: 3.0.8
'@volar/typescript@2.4.0-alpha.15': '@volar/typescript@2.4.0-alpha.15':
dependencies: dependencies:
'@volar/language-core': 2.4.0-alpha.15 '@volar/language-core': 2.4.0-alpha.15
@ -14195,10 +14177,9 @@ snapshots:
- supports-color - supports-color
- terser - terser
vite-plugin-checker@0.7.0(eslint@9.7.0)(optionator@0.9.3)(typescript@5.5.3)(vite@5.3.3(@types/node@20.14.10)(sass@1.69.4)(terser@5.27.0))(vue-tsc@2.0.26(typescript@5.5.3)): vite-plugin-checker@0.7.2(eslint@9.7.0)(optionator@0.9.3)(typescript@5.5.3)(vite@5.3.3(@types/node@20.14.10)(sass@1.69.4)(terser@5.27.0))(vue-tsc@2.0.26(typescript@5.5.3)):
dependencies: dependencies:
'@babel/code-frame': 7.24.7 '@babel/code-frame': 7.24.7
'@volar/typescript': 2.3.4
ansi-escapes: 4.3.2 ansi-escapes: 4.3.2
chalk: 4.1.2 chalk: 4.1.2
chokidar: 3.6.0 chokidar: 3.6.0

View File

@ -10,12 +10,6 @@
"3.x" "3.x"
], ],
"packageRules": [ "packageRules": [
{
"groupName": "vite-plugin-checker",
"matchPackageNames": [
"vite-plugin-checker"
]
},
{ {
"groupName": "vitest", "groupName": "vitest",
"matchPackageNames": [ "matchPackageNames": [

View File

@ -1,9 +1,16 @@
import { readFileSync } from 'node:fs'
import { fileURLToPath } from 'node:url' import { fileURLToPath } from 'node:url'
const testWithInlineVue = process.env.EXTERNAL_VUE === 'false' const testWithInlineVue = process.env.EXTERNAL_VUE === 'false'
const nuxtEntry = fileURLToPath(new URL('../../../packages/nuxt/dist/index.mjs', import.meta.url))
const isStubbed = readFileSync(nuxtEntry, 'utf-8').includes('const _module = await jiti')
export default defineNuxtConfig({ export default defineNuxtConfig({
compatibilityDate: '2024-06-28', compatibilityDate: '2024-06-28',
typescript: {
typeCheck: isStubbed ? false : 'build',
},
pages: false, pages: false,
experimental: { experimental: {
externalVue: !testWithInlineVue, externalVue: !testWithInlineVue,