@vizejs/nuxt 0.404.14 → 0.406.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -8,6 +8,21 @@ import { fileURLToPath, pathToFileURL } from "node:url";
|
|
|
8
8
|
import { randomBytes, randomUUID } from "node:crypto";
|
|
9
9
|
import { buildNuxtLintPlan, collectNuxtLintDirs, resolveNuxtLintFeatures } from "@vizejs/nuxt-lint-config";
|
|
10
10
|
import { createServer } from "node:http";
|
|
11
|
+
//#region src/builder.ts
|
|
12
|
+
function isViteNuxtBuilder(builder) {
|
|
13
|
+
if (typeof builder !== "string") return false;
|
|
14
|
+
return builder === "vite" || builder.includes("vite-builder") || builder === "rolldown-vite" || builder.includes("rolldown-vite-builder");
|
|
15
|
+
}
|
|
16
|
+
function isWebpackNuxtBuilder(builder) {
|
|
17
|
+
if (typeof builder !== "string") return false;
|
|
18
|
+
return builder === "webpack" || builder.includes("webpack-builder");
|
|
19
|
+
}
|
|
20
|
+
function getNuxtBuilderKind(builder) {
|
|
21
|
+
if (isViteNuxtBuilder(builder)) return "vite";
|
|
22
|
+
if (isWebpackNuxtBuilder(builder)) return "webpack";
|
|
23
|
+
return "unsupported";
|
|
24
|
+
}
|
|
25
|
+
//#endregion
|
|
11
26
|
//#region src/lint/checker/options.ts
|
|
12
27
|
/**
|
|
13
28
|
* Resolve the engine-neutral part of `@nuxt/eslint`'s checker contract.
|
|
@@ -481,12 +496,6 @@ async function addVitePlugin(plugin) {
|
|
|
481
496
|
async function addWebpackPlugin(plugin) {
|
|
482
497
|
(await import("@nuxt/kit")).addWebpackPlugin(plugin, { server: false });
|
|
483
498
|
}
|
|
484
|
-
function builderKind(builder) {
|
|
485
|
-
if (typeof builder !== "string") return "unsupported";
|
|
486
|
-
if (builder === "vite" || builder.includes("vite-builder")) return "vite";
|
|
487
|
-
if (builder === "webpack" || builder.includes("webpack-builder")) return "webpack";
|
|
488
|
-
return "unsupported";
|
|
489
|
-
}
|
|
490
499
|
/** Register the dev-only adapter over Phase 3's generated config artifact. */
|
|
491
500
|
async function setupNuxtLintChecker(checker, nuxt, generation, dependencies = {}) {
|
|
492
501
|
if (checker !== true && (checker === false || checker == null)) return void 0;
|
|
@@ -503,7 +512,7 @@ async function setupNuxtLintChecker(checker, nuxt, generation, dependencies = {}
|
|
|
503
512
|
options,
|
|
504
513
|
rootDir
|
|
505
514
|
};
|
|
506
|
-
const builder =
|
|
515
|
+
const builder = getNuxtBuilderKind(nuxt.options.builder);
|
|
507
516
|
if (builder === "vite") await (dependencies.addVitePlugin ?? addVitePlugin)(createNuxtLintCheckerVitePlugin(config));
|
|
508
517
|
else if (builder === "webpack") await (dependencies.addWebpackPlugin ?? addWebpackPlugin)(createNuxtLintCheckerWebpackPlugin(config));
|
|
509
518
|
else {
|
|
@@ -1198,4 +1207,4 @@ async function setupNuxtLintConfigGeneration(lint, nuxt, dependencies = {}) {
|
|
|
1198
1207
|
};
|
|
1199
1208
|
}
|
|
1200
1209
|
//#endregion
|
|
1201
|
-
export { toNuxtLintProjectState as a, setupNuxtLintConfigAddons as c, createNuxtLintCheckerVitePlugin as d, resolveNuxtLintCheckerOptions as f, setupLintInspector as i, setupNuxtLintChecker as l, setupNuxtLintConfigGeneration as n, renderNuxtOxlintConfig as o, writeFileIfChanged as r, VIZE_NUXT_LINT_CONFIG_ADDONS_HOOK as s, ROOT_OXLINT_CONFIG_NAMES as t, createNuxtLintCheckerWebpackPlugin as u };
|
|
1210
|
+
export { toNuxtLintProjectState as a, setupNuxtLintConfigAddons as c, createNuxtLintCheckerVitePlugin as d, resolveNuxtLintCheckerOptions as f, setupLintInspector as i, setupNuxtLintChecker as l, setupNuxtLintConfigGeneration as n, renderNuxtOxlintConfig as o, isViteNuxtBuilder as p, writeFileIfChanged as r, VIZE_NUXT_LINT_CONFIG_ADDONS_HOOK as s, ROOT_OXLINT_CONFIG_NAMES as t, createNuxtLintCheckerWebpackPlugin as u };
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as setupLintInspector, l as setupNuxtLintChecker, n as setupNuxtLintConfigGeneration } from "./generation-
|
|
1
|
+
import { i as setupLintInspector, l as setupNuxtLintChecker, n as setupNuxtLintConfigGeneration, p as isViteNuxtBuilder } from "./generation-0O5ZoaRp.mjs";
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import fs from "node:fs";
|
|
4
4
|
import path, { dirname, resolve } from "node:path";
|
|
@@ -1179,8 +1179,7 @@ function getDetectedNuxtMajor(nuxt) {
|
|
|
1179
1179
|
return major === 2 || major === 3 || major === 4 ? major : null;
|
|
1180
1180
|
}
|
|
1181
1181
|
function hasNuxtViteCompilerSupport(nuxt) {
|
|
1182
|
-
|
|
1183
|
-
if (typeof builder === "string") return builder === "vite" || builder.includes("vite-builder");
|
|
1182
|
+
if (isViteNuxtBuilder(nuxt.options.builder)) return true;
|
|
1184
1183
|
if (nuxt.options.vite) return true;
|
|
1185
1184
|
return getDetectedNuxtMajor(nuxt) !== 2;
|
|
1186
1185
|
}
|
package/dist/lint/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as toNuxtLintProjectState, c as setupNuxtLintConfigAddons, d as createNuxtLintCheckerVitePlugin, f as resolveNuxtLintCheckerOptions, l as setupNuxtLintChecker, n as setupNuxtLintConfigGeneration, o as renderNuxtOxlintConfig, r as writeFileIfChanged, s as VIZE_NUXT_LINT_CONFIG_ADDONS_HOOK, t as ROOT_OXLINT_CONFIG_NAMES, u as createNuxtLintCheckerWebpackPlugin } from "../generation-
|
|
1
|
+
import { a as toNuxtLintProjectState, c as setupNuxtLintConfigAddons, d as createNuxtLintCheckerVitePlugin, f as resolveNuxtLintCheckerOptions, l as setupNuxtLintChecker, n as setupNuxtLintConfigGeneration, o as renderNuxtOxlintConfig, r as writeFileIfChanged, s as VIZE_NUXT_LINT_CONFIG_ADDONS_HOOK, t as ROOT_OXLINT_CONFIG_NAMES, u as createNuxtLintCheckerWebpackPlugin } from "../generation-0O5ZoaRp.mjs";
|
|
2
2
|
export * from "@vizejs/nuxt-lint-config";
|
|
3
3
|
export { ROOT_OXLINT_CONFIG_NAMES, VIZE_NUXT_LINT_CONFIG_ADDONS_HOOK, createNuxtLintCheckerVitePlugin, createNuxtLintCheckerWebpackPlugin, renderNuxtOxlintConfig, resolveNuxtLintCheckerOptions, setupNuxtLintChecker, setupNuxtLintConfigAddons, setupNuxtLintConfigGeneration, toNuxtLintProjectState, writeFileIfChanged };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vizejs/nuxt",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.406.0",
|
|
4
4
|
"description": "Nuxt module for Vize - compiler, musea gallery, linter, and type checker",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"compiler",
|
|
@@ -49,12 +49,12 @@
|
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@nuxt/kit": "3.11.2",
|
|
52
|
-
"@vizejs/native": "0.
|
|
53
|
-
"@vizejs/nuxt-lint-config": "0.
|
|
54
|
-
"@vizejs/vite-plugin": "0.
|
|
55
|
-
"@vizejs/vite-plugin-musea": "0.
|
|
56
|
-
"oxlint-plugin-vize": "0.
|
|
57
|
-
"vize": "0.
|
|
52
|
+
"@vizejs/native": "0.406.0",
|
|
53
|
+
"@vizejs/nuxt-lint-config": "0.406.0",
|
|
54
|
+
"@vizejs/vite-plugin": "0.406.0",
|
|
55
|
+
"@vizejs/vite-plugin-musea": "0.406.0",
|
|
56
|
+
"oxlint-plugin-vize": "0.406.0",
|
|
57
|
+
"vize": "0.406.0"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"jiti-nuxt2": "npm:jiti@1.21.7",
|