From e19d5dd24363faf660ec39c54d32d5fe832f2c70 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Tue, 16 Jul 2024 11:08:21 +0100 Subject: [PATCH] test: add `typeCheck` test in minimal build (#28166) --- packages/vite/package.json | 2 +- pnpm-lock.yaml | 35 +++++++--------------------- renovate.json | 6 ----- test/fixtures/minimal/nuxt.config.ts | 7 ++++++ 4 files changed, 16 insertions(+), 34 deletions(-) diff --git a/packages/vite/package.json b/packages/vite/package.json index 7fe68f5bdc..44351651e9 100644 --- a/packages/vite/package.json +++ b/packages/vite/package.json @@ -64,7 +64,7 @@ "unplugin": "^1.11.0", "vite": "^5.3.3", "vite-node": "^1.6.0", - "vite-plugin-checker": "0.7.0", + "vite-plugin-checker": "^0.7.2", "vue-bundle-renderer": "^2.1.0" }, "peerDependencies": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 945f09f27a..7ab3a732a7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -725,8 +725,8 @@ importers: specifier: ^1.6.0 version: 1.6.0(@types/node@20.14.10)(sass@1.69.4)(terser@5.27.0) vite-plugin-checker: - specifier: 0.7.0 - 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)) + specifier: ^0.7.2 + 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: specifier: ^2.1.0 version: 2.1.0 @@ -2745,21 +2745,12 @@ packages: '@vitest/utils@1.6.0': 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': 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': resolution: {integrity: sha512-8Htngw5TmBY4L3ClDqBGyfLhsB8EmoEXUH1xydyEtEoK0O6NX5ur4Jw8jgvscTlwzizyl/wsN1vn0cQXVbbXYg==} - '@volar/typescript@2.3.4': - resolution: {integrity: sha512-acCvt7dZECyKcvO5geNybmrqOsu9u8n5XP1rfiYsOLYGPxvHRav9BVmEdRyZ3vvY6mNyQ1wLL5Hday4IShe17w==} - '@volar/typescript@2.4.0-alpha.15': resolution: {integrity: sha512-U3StRBbDuxV6Woa4hvGS4kz3XcOzrWUKgFdEFN+ba1x3eaYg7+ytau8ul05xgA+UNGLXXsKur7fTUhDFyISk0w==} @@ -6883,10 +6874,11 @@ packages: engines: {node: ^18.0.0 || >=20.0.0} hasBin: true - vite-plugin-checker@0.7.0: - resolution: {integrity: sha512-F3MdUORNLcPC0oDB9zxmPDhUC8X/3fzDShU5Izk4bqE4uTgxbQdOuOCa99bS6OSyWVC0uhHG4yAtWUXM2jOx9A==} + vite-plugin-checker@0.7.2: + resolution: {integrity: sha512-xeYeJbG0gaCaT0QcUC4B2Zo4y5NR8ZhYenc5gPbttrZvraRFwkEADCYwq+BfEHl9zYz7yf85TxsiGoYwyyIjhw==} engines: {node: '>=14.16'} peerDependencies: + '@biomejs/biome': '>=1.7' eslint: '>=7' meow: ^9.0.0 optionator: ^0.9.1 @@ -6897,6 +6889,8 @@ packages: vti: '*' vue-tsc: '>=2.0.0' peerDependenciesMeta: + '@biomejs/biome': + optional: true eslint: optional: true meow: @@ -9288,24 +9282,12 @@ snapshots: loupe: 2.3.7 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': dependencies: '@volar/source-map': 2.4.0-alpha.15 - '@volar/source-map@2.3.4': {} - '@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': dependencies: '@volar/language-core': 2.4.0-alpha.15 @@ -14195,10 +14177,9 @@ snapshots: - supports-color - 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: '@babel/code-frame': 7.24.7 - '@volar/typescript': 2.3.4 ansi-escapes: 4.3.2 chalk: 4.1.2 chokidar: 3.6.0 diff --git a/renovate.json b/renovate.json index 5df229fa9e..02bd3cbaf1 100644 --- a/renovate.json +++ b/renovate.json @@ -10,12 +10,6 @@ "3.x" ], "packageRules": [ - { - "groupName": "vite-plugin-checker", - "matchPackageNames": [ - "vite-plugin-checker" - ] - }, { "groupName": "vitest", "matchPackageNames": [ diff --git a/test/fixtures/minimal/nuxt.config.ts b/test/fixtures/minimal/nuxt.config.ts index bf1b59d106..7ea275c12e 100644 --- a/test/fixtures/minimal/nuxt.config.ts +++ b/test/fixtures/minimal/nuxt.config.ts @@ -1,9 +1,16 @@ +import { readFileSync } from 'node:fs' import { fileURLToPath } from 'node:url' 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({ compatibilityDate: '2024-06-28', + typescript: { + typeCheck: isStubbed ? false : 'build', + }, pages: false, experimental: { externalVue: !testWithInlineVue,