@vue/compiler-sfc 3.4.24 → 3.4.25
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/compiler-sfc.cjs.js +26 -16
- package/dist/compiler-sfc.esm-browser.js +26 -16
- package/package.json +5 -5
package/dist/compiler-sfc.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compiler-sfc v3.4.
|
|
2
|
+
* @vue/compiler-sfc v3.4.25
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -19306,29 +19306,39 @@ function genModelProps(ctx) {
|
|
|
19306
19306
|
return;
|
|
19307
19307
|
const isProd = !!ctx.options.isProd;
|
|
19308
19308
|
let modelPropsDecl = "";
|
|
19309
|
-
for (const [name, { type, options }] of Object.entries(
|
|
19309
|
+
for (const [name, { type, options: runtimeOptions }] of Object.entries(
|
|
19310
|
+
ctx.modelDecls
|
|
19311
|
+
)) {
|
|
19310
19312
|
let skipCheck = false;
|
|
19313
|
+
let codegenOptions = ``;
|
|
19311
19314
|
let runtimeTypes = type && inferRuntimeType(ctx, type);
|
|
19312
19315
|
if (runtimeTypes) {
|
|
19313
19316
|
const hasBoolean = runtimeTypes.includes("Boolean");
|
|
19317
|
+
const hasFunction = runtimeTypes.includes("Function");
|
|
19314
19318
|
const hasUnknownType = runtimeTypes.includes(UNKNOWN_TYPE);
|
|
19315
|
-
if (
|
|
19316
|
-
|
|
19317
|
-
(t) => t
|
|
19318
|
-
|
|
19319
|
-
|
|
19319
|
+
if (hasUnknownType) {
|
|
19320
|
+
if (hasBoolean || hasFunction) {
|
|
19321
|
+
runtimeTypes = runtimeTypes.filter((t) => t !== UNKNOWN_TYPE);
|
|
19322
|
+
skipCheck = true;
|
|
19323
|
+
} else {
|
|
19324
|
+
runtimeTypes = ["null"];
|
|
19325
|
+
}
|
|
19320
19326
|
}
|
|
19327
|
+
if (!isProd) {
|
|
19328
|
+
codegenOptions = `type: ${toRuntimeTypeString(runtimeTypes)}` + (skipCheck ? ", skipCheck: true" : "");
|
|
19329
|
+
} else if (hasBoolean || runtimeOptions && hasFunction) {
|
|
19330
|
+
codegenOptions = `type: ${toRuntimeTypeString(runtimeTypes)}`;
|
|
19331
|
+
} else ;
|
|
19321
19332
|
}
|
|
19322
|
-
let runtimeType = runtimeTypes && runtimeTypes.length > 0 && toRuntimeTypeString(runtimeTypes) || void 0;
|
|
19323
|
-
const codegenOptions = concatStrings([
|
|
19324
|
-
runtimeType && `type: ${runtimeType}`,
|
|
19325
|
-
skipCheck && "skipCheck: true"
|
|
19326
|
-
]);
|
|
19327
19333
|
let decl;
|
|
19328
|
-
if (
|
|
19329
|
-
decl = ctx.isTS ? `{ ${codegenOptions}, ...${
|
|
19334
|
+
if (codegenOptions && runtimeOptions) {
|
|
19335
|
+
decl = ctx.isTS ? `{ ${codegenOptions}, ...${runtimeOptions} }` : `Object.assign({ ${codegenOptions} }, ${runtimeOptions})`;
|
|
19336
|
+
} else if (codegenOptions) {
|
|
19337
|
+
decl = `{ ${codegenOptions} }`;
|
|
19338
|
+
} else if (runtimeOptions) {
|
|
19339
|
+
decl = runtimeOptions;
|
|
19330
19340
|
} else {
|
|
19331
|
-
decl =
|
|
19341
|
+
decl = `{}`;
|
|
19332
19342
|
}
|
|
19333
19343
|
modelPropsDecl += `
|
|
19334
19344
|
${JSON.stringify(name)}: ${decl},`;
|
|
@@ -20753,7 +20763,7 @@ function isStaticNode(node) {
|
|
|
20753
20763
|
return false;
|
|
20754
20764
|
}
|
|
20755
20765
|
|
|
20756
|
-
const version = "3.4.
|
|
20766
|
+
const version = "3.4.25";
|
|
20757
20767
|
const parseCache = parseCache$1;
|
|
20758
20768
|
const errorMessages = {
|
|
20759
20769
|
...CompilerDOM.errorMessages,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compiler-sfc v3.4.
|
|
2
|
+
* @vue/compiler-sfc v3.4.25
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -46882,29 +46882,39 @@ function genModelProps(ctx) {
|
|
|
46882
46882
|
return;
|
|
46883
46883
|
const isProd = !!ctx.options.isProd;
|
|
46884
46884
|
let modelPropsDecl = "";
|
|
46885
|
-
for (const [name, { type, options }] of Object.entries(
|
|
46885
|
+
for (const [name, { type, options: runtimeOptions }] of Object.entries(
|
|
46886
|
+
ctx.modelDecls
|
|
46887
|
+
)) {
|
|
46886
46888
|
let skipCheck = false;
|
|
46889
|
+
let codegenOptions = ``;
|
|
46887
46890
|
let runtimeTypes = type && inferRuntimeType(ctx, type);
|
|
46888
46891
|
if (runtimeTypes) {
|
|
46889
46892
|
const hasBoolean = runtimeTypes.includes("Boolean");
|
|
46893
|
+
const hasFunction = runtimeTypes.includes("Function");
|
|
46890
46894
|
const hasUnknownType = runtimeTypes.includes(UNKNOWN_TYPE);
|
|
46891
|
-
if (
|
|
46892
|
-
|
|
46893
|
-
(t) => t
|
|
46894
|
-
|
|
46895
|
-
|
|
46895
|
+
if (hasUnknownType) {
|
|
46896
|
+
if (hasBoolean || hasFunction) {
|
|
46897
|
+
runtimeTypes = runtimeTypes.filter((t) => t !== UNKNOWN_TYPE);
|
|
46898
|
+
skipCheck = true;
|
|
46899
|
+
} else {
|
|
46900
|
+
runtimeTypes = ["null"];
|
|
46901
|
+
}
|
|
46896
46902
|
}
|
|
46903
|
+
if (!isProd) {
|
|
46904
|
+
codegenOptions = `type: ${toRuntimeTypeString(runtimeTypes)}` + (skipCheck ? ", skipCheck: true" : "");
|
|
46905
|
+
} else if (hasBoolean || runtimeOptions && hasFunction) {
|
|
46906
|
+
codegenOptions = `type: ${toRuntimeTypeString(runtimeTypes)}`;
|
|
46907
|
+
} else ;
|
|
46897
46908
|
}
|
|
46898
|
-
let runtimeType = runtimeTypes && runtimeTypes.length > 0 && toRuntimeTypeString(runtimeTypes) || void 0;
|
|
46899
|
-
const codegenOptions = concatStrings([
|
|
46900
|
-
runtimeType && `type: ${runtimeType}`,
|
|
46901
|
-
skipCheck && "skipCheck: true"
|
|
46902
|
-
]);
|
|
46903
46909
|
let decl;
|
|
46904
|
-
if (
|
|
46905
|
-
decl = ctx.isTS ? `{ ${codegenOptions}, ...${
|
|
46910
|
+
if (codegenOptions && runtimeOptions) {
|
|
46911
|
+
decl = ctx.isTS ? `{ ${codegenOptions}, ...${runtimeOptions} }` : `Object.assign({ ${codegenOptions} }, ${runtimeOptions})`;
|
|
46912
|
+
} else if (codegenOptions) {
|
|
46913
|
+
decl = `{ ${codegenOptions} }`;
|
|
46914
|
+
} else if (runtimeOptions) {
|
|
46915
|
+
decl = runtimeOptions;
|
|
46906
46916
|
} else {
|
|
46907
|
-
decl =
|
|
46917
|
+
decl = `{}`;
|
|
46908
46918
|
}
|
|
46909
46919
|
modelPropsDecl += `
|
|
46910
46920
|
${JSON.stringify(name)}: ${decl},`;
|
|
@@ -48359,7 +48369,7 @@ var __spreadValues = (a, b) => {
|
|
|
48359
48369
|
}
|
|
48360
48370
|
return a;
|
|
48361
48371
|
};
|
|
48362
|
-
const version = "3.4.
|
|
48372
|
+
const version = "3.4.25";
|
|
48363
48373
|
const parseCache = parseCache$1;
|
|
48364
48374
|
const errorMessages = __spreadValues(__spreadValues({}, errorMessages$1), DOMErrorMessages);
|
|
48365
48375
|
const walk = walk$2;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue/compiler-sfc",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.25",
|
|
4
4
|
"description": "@vue/compiler-sfc",
|
|
5
5
|
"main": "dist/compiler-sfc.cjs.js",
|
|
6
6
|
"module": "dist/compiler-sfc.esm-browser.js",
|
|
@@ -47,10 +47,10 @@
|
|
|
47
47
|
"magic-string": "^0.30.10",
|
|
48
48
|
"postcss": "^8.4.38",
|
|
49
49
|
"source-map-js": "^1.2.0",
|
|
50
|
-
"@vue/compiler-core": "3.4.
|
|
51
|
-
"@vue/compiler-
|
|
52
|
-
"@vue/compiler-
|
|
53
|
-
"@vue/shared": "3.4.
|
|
50
|
+
"@vue/compiler-core": "3.4.25",
|
|
51
|
+
"@vue/compiler-ssr": "3.4.25",
|
|
52
|
+
"@vue/compiler-dom": "3.4.25",
|
|
53
|
+
"@vue/shared": "3.4.25"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@babel/types": "^7.24.0",
|