@nuxt/kit-nightly 5.0.0-29741513.94de156f → 5.0.0-29741587.ad7d78f0
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.
- package/dist/index.mjs +4 -5
- package/package.json +4 -5
package/dist/index.mjs
CHANGED
|
@@ -8,7 +8,7 @@ import { createConsoleReporter, defineDiagnostics } from "nostics";
|
|
|
8
8
|
import process from "node:process";
|
|
9
9
|
import { ansiFormatter } from "nostics/formatters/ansi";
|
|
10
10
|
import { colors } from "consola/utils";
|
|
11
|
-
import satisfies from "
|
|
11
|
+
import { isGreater, isGreaterOrEqual, satisfies } from "verkit";
|
|
12
12
|
import { readPackageJSON, resolvePackageJSON } from "pkg-types";
|
|
13
13
|
import { existsSync, lstatSync, promises, readFileSync } from "node:fs";
|
|
14
14
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
@@ -18,7 +18,6 @@ import { interopDefault, lookupNodeModuleSubpath, parseNodeModulePath, resolveMo
|
|
|
18
18
|
import { resolveModulePath, resolveModuleURL } from "exsolve";
|
|
19
19
|
import { isRelative, withTrailingSlash, withoutTrailingSlash } from "ufo";
|
|
20
20
|
import { read, update } from "rc9";
|
|
21
|
-
import semver, { gte } from "semver";
|
|
22
21
|
import { captureStackTrace } from "errx";
|
|
23
22
|
import { glob } from "tinyglobby";
|
|
24
23
|
import { resolveAlias as resolveAlias$1, reverseResolveAlias } from "pathe/utils";
|
|
@@ -771,7 +770,7 @@ async function installModules(modulesToInstall, resolvedModulePaths, nuxt = useN
|
|
|
771
770
|
}
|
|
772
771
|
if (value.version) {
|
|
773
772
|
const pkg = await readPackageJSON(name, { from: [res.resolvedModulePath, ...nuxt.options.modulesDir].filter(Boolean) }).catch(() => null);
|
|
774
|
-
if (pkg?.version && !
|
|
773
|
+
if (pkg?.version && !satisfies(pkg.version, value.version, { includePrerelease: true })) {
|
|
775
774
|
const message = `Module \`${name}\` version (\`${pkg.version}\`) does not satisfy \`${value.version}\` (requested by ${moduleToAttribute}).`;
|
|
776
775
|
error = new TypeError(message);
|
|
777
776
|
}
|
|
@@ -971,7 +970,7 @@ async function callLifecycleHooks(nuxtModule, meta = {}, inlineOptions, nuxt = u
|
|
|
971
970
|
})?.setups?.[meta.name];
|
|
972
971
|
try {
|
|
973
972
|
if (!previousVersion) await nuxtModule.onInstall?.(nuxt);
|
|
974
|
-
else if (
|
|
973
|
+
else if (isGreater(meta.version, previousVersion)) await nuxtModule.onUpgrade?.(nuxt, inlineOptions, previousVersion);
|
|
975
974
|
if (previousVersion !== meta.version) update({ setups: { [meta.name]: meta?.version } }, {
|
|
976
975
|
dir: nuxt.options.rootDir,
|
|
977
976
|
name: ".nuxtrc"
|
|
@@ -2054,7 +2053,7 @@ async function _generateTypes(nuxt) {
|
|
|
2054
2053
|
if (nestedModulesDirs.every((d) => !d.startsWith(withSlash))) nestedModulesDirs.push(withSlash);
|
|
2055
2054
|
}
|
|
2056
2055
|
let hasTypescriptVersionWithModulePreserve;
|
|
2057
|
-
for (const parent of nestedModulesDirs) hasTypescriptVersionWithModulePreserve ??= await readPackageJSON("typescript", { parent }).then((r) => r?.version &&
|
|
2056
|
+
for (const parent of nestedModulesDirs) hasTypescriptVersionWithModulePreserve ??= await readPackageJSON("typescript", { parent }).then((r) => r?.version && isGreaterOrEqual(r.version, "5.4.0")).catch(() => void 0);
|
|
2058
2057
|
hasTypescriptVersionWithModulePreserve ??= true;
|
|
2059
2058
|
const useDecorators = Boolean(nuxt.options.experimental?.decorators);
|
|
2060
2059
|
const isV5OrHigher = (nuxt.options.future?.compatibilityVersion ?? 4) >= 5;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuxt/kit-nightly",
|
|
3
|
-
"version": "5.0.0-
|
|
3
|
+
"version": "5.0.0-29741587.ad7d78f0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/nuxt/nuxt.git",
|
|
@@ -36,16 +36,15 @@
|
|
|
36
36
|
"pkg-types": "^2.3.1",
|
|
37
37
|
"rc9": "^3.0.1",
|
|
38
38
|
"scule": "^1.3.0",
|
|
39
|
-
"semver": "^7.8.5",
|
|
40
39
|
"std-env": "^4.2.0",
|
|
41
40
|
"tinyglobby": "^0.2.17",
|
|
42
41
|
"ufo": "^1.6.4",
|
|
43
42
|
"unctx": "^3.0.0",
|
|
44
|
-
"untyped": "^2.0.0"
|
|
43
|
+
"untyped": "^2.0.0",
|
|
44
|
+
"verkit": "^0.1.2"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@nuxt/schema": "npm:@nuxt/schema-nightly@5.0.0-
|
|
48
|
-
"@types/semver": "7.7.1",
|
|
47
|
+
"@nuxt/schema": "npm:@nuxt/schema-nightly@5.0.0-29741587.ad7d78f0",
|
|
49
48
|
"hookable": "6.1.1",
|
|
50
49
|
"nitro": "3.0.260610-beta",
|
|
51
50
|
"nitropack": "2.13.4",
|