@vue/compiler-sfc 3.4.10 → 3.4.11
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
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compiler-sfc v3.4.
|
|
2
|
+
* @vue/compiler-sfc v3.4.11
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -19116,6 +19116,7 @@ function processDefineModel(ctx, node, declId) {
|
|
|
19116
19116
|
}
|
|
19117
19117
|
let optionsString = options && ctx.getString(options);
|
|
19118
19118
|
let optionsRemoved = !options;
|
|
19119
|
+
const runtimeOptionNodes = [];
|
|
19119
19120
|
if (options && options.type === "ObjectExpression" && !options.properties.some((p) => p.type === "SpreadElement" || p.computed)) {
|
|
19120
19121
|
let removed = 0;
|
|
19121
19122
|
for (let i = options.properties.length - 1; i >= 0; i--) {
|
|
@@ -19128,6 +19129,7 @@ function processDefineModel(ctx, node, declId) {
|
|
|
19128
19129
|
} else {
|
|
19129
19130
|
removed++;
|
|
19130
19131
|
ctx.s.remove(ctx.startOffset + start, ctx.startOffset + end);
|
|
19132
|
+
runtimeOptionNodes.push(p);
|
|
19131
19133
|
}
|
|
19132
19134
|
}
|
|
19133
19135
|
if (removed === options.properties.length) {
|
|
@@ -19141,6 +19143,7 @@ function processDefineModel(ctx, node, declId) {
|
|
|
19141
19143
|
ctx.modelDecls[modelName] = {
|
|
19142
19144
|
type,
|
|
19143
19145
|
options: optionsString,
|
|
19146
|
+
runtimeOptionNodes,
|
|
19144
19147
|
identifier: declId && declId.type === "Identifier" ? declId.name : void 0
|
|
19145
19148
|
};
|
|
19146
19149
|
ctx.bindingMetadata[modelName] = "props";
|
|
@@ -20182,6 +20185,11 @@ const ${normalScriptDefaultVar} = ${defaultSpecifier.local.name}
|
|
|
20182
20185
|
checkInvalidScopeReference(ctx.propsDestructureDecl, DEFINE_PROPS);
|
|
20183
20186
|
checkInvalidScopeReference(ctx.emitsRuntimeDecl, DEFINE_EMITS);
|
|
20184
20187
|
checkInvalidScopeReference(ctx.optionsRuntimeDecl, DEFINE_OPTIONS);
|
|
20188
|
+
for (const { runtimeOptionNodes } of Object.values(ctx.modelDecls)) {
|
|
20189
|
+
for (const node of runtimeOptionNodes) {
|
|
20190
|
+
checkInvalidScopeReference(node, DEFINE_MODEL);
|
|
20191
|
+
}
|
|
20192
|
+
}
|
|
20185
20193
|
if (script) {
|
|
20186
20194
|
if (startOffset < scriptStartOffset) {
|
|
20187
20195
|
ctx.s.remove(0, startOffset);
|
|
@@ -20599,7 +20607,7 @@ function isStaticNode(node) {
|
|
|
20599
20607
|
return false;
|
|
20600
20608
|
}
|
|
20601
20609
|
|
|
20602
|
-
const version = "3.4.
|
|
20610
|
+
const version = "3.4.11";
|
|
20603
20611
|
const parseCache = parseCache$1;
|
|
20604
20612
|
const errorMessages = {
|
|
20605
20613
|
...CompilerDOM.errorMessages,
|
package/dist/compiler-sfc.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _babel_types from '@babel/types';
|
|
2
|
-
import { Statement, Expression, TSType, Program, CallExpression,
|
|
2
|
+
import { Statement, Expression, TSType, Node, Program, CallExpression, ObjectPattern, TSModuleDeclaration, TSPropertySignature, TSMethodSignature, TSCallSignatureDeclaration, TSFunctionType } from '@babel/types';
|
|
3
3
|
import { RootNode, CompilerOptions, CodegenResult, ParserOptions, CompilerError, SourceLocation, BindingMetadata as BindingMetadata$1 } from '@vue/compiler-core';
|
|
4
4
|
export { BindingMetadata, CompilerError, CompilerOptions, extractIdentifiers, generateCodeFrame, isInDestructureAssignment, isStaticProperty, walkIdentifiers } from '@vue/compiler-core';
|
|
5
5
|
import { RawSourceMap } from 'source-map-js';
|
|
@@ -294,6 +294,7 @@ interface ModelDecl {
|
|
|
294
294
|
type: TSType | undefined;
|
|
295
295
|
options: string | undefined;
|
|
296
296
|
identifier: string | undefined;
|
|
297
|
+
runtimeOptionNodes: Node[];
|
|
297
298
|
}
|
|
298
299
|
|
|
299
300
|
declare enum BindingTypes {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compiler-sfc v3.4.
|
|
2
|
+
* @vue/compiler-sfc v3.4.11
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -17034,7 +17034,7 @@ function walkIdentifiers(root, onIdentifier, includeAll = false, parentStack = [
|
|
|
17034
17034
|
if (includeAll || isRefed && !isLocal) {
|
|
17035
17035
|
onIdentifier(node, parent, parentStack, isRefed, isLocal);
|
|
17036
17036
|
}
|
|
17037
|
-
} else if (node.type === "ObjectProperty" && parent.type === "ObjectPattern") {
|
|
17037
|
+
} else if (node.type === "ObjectProperty" && (parent == null ? void 0 : parent.type) === "ObjectPattern") {
|
|
17038
17038
|
node.inPattern = true;
|
|
17039
17039
|
} else if (isFunctionType(node)) {
|
|
17040
17040
|
if (node.scopeIds) {
|
|
@@ -47121,6 +47121,7 @@ function processDefineModel(ctx, node, declId) {
|
|
|
47121
47121
|
}
|
|
47122
47122
|
let optionsString = options && ctx.getString(options);
|
|
47123
47123
|
let optionsRemoved = !options;
|
|
47124
|
+
const runtimeOptionNodes = [];
|
|
47124
47125
|
if (options && options.type === "ObjectExpression" && !options.properties.some((p) => p.type === "SpreadElement" || p.computed)) {
|
|
47125
47126
|
let removed = 0;
|
|
47126
47127
|
for (let i = options.properties.length - 1; i >= 0; i--) {
|
|
@@ -47133,6 +47134,7 @@ function processDefineModel(ctx, node, declId) {
|
|
|
47133
47134
|
} else {
|
|
47134
47135
|
removed++;
|
|
47135
47136
|
ctx.s.remove(ctx.startOffset + start, ctx.startOffset + end);
|
|
47137
|
+
runtimeOptionNodes.push(p);
|
|
47136
47138
|
}
|
|
47137
47139
|
}
|
|
47138
47140
|
if (removed === options.properties.length) {
|
|
@@ -47146,6 +47148,7 @@ function processDefineModel(ctx, node, declId) {
|
|
|
47146
47148
|
ctx.modelDecls[modelName] = {
|
|
47147
47149
|
type,
|
|
47148
47150
|
options: optionsString,
|
|
47151
|
+
runtimeOptionNodes,
|
|
47149
47152
|
identifier: declId && declId.type === "Identifier" ? declId.name : void 0
|
|
47150
47153
|
};
|
|
47151
47154
|
ctx.bindingMetadata[modelName] = "props";
|
|
@@ -48206,6 +48209,11 @@ const ${normalScriptDefaultVar} = ${defaultSpecifier.local.name}
|
|
|
48206
48209
|
checkInvalidScopeReference(ctx.propsDestructureDecl, DEFINE_PROPS);
|
|
48207
48210
|
checkInvalidScopeReference(ctx.emitsRuntimeDecl, DEFINE_EMITS);
|
|
48208
48211
|
checkInvalidScopeReference(ctx.optionsRuntimeDecl, DEFINE_OPTIONS);
|
|
48212
|
+
for (const { runtimeOptionNodes } of Object.values(ctx.modelDecls)) {
|
|
48213
|
+
for (const node of runtimeOptionNodes) {
|
|
48214
|
+
checkInvalidScopeReference(node, DEFINE_MODEL);
|
|
48215
|
+
}
|
|
48216
|
+
}
|
|
48209
48217
|
if (script) {
|
|
48210
48218
|
if (startOffset < scriptStartOffset) {
|
|
48211
48219
|
ctx.s.remove(0, startOffset);
|
|
@@ -48634,7 +48642,7 @@ var __spreadValues = (a, b) => {
|
|
|
48634
48642
|
}
|
|
48635
48643
|
return a;
|
|
48636
48644
|
};
|
|
48637
|
-
const version = "3.4.
|
|
48645
|
+
const version = "3.4.11";
|
|
48638
48646
|
const parseCache = parseCache$1;
|
|
48639
48647
|
const errorMessages = __spreadValues(__spreadValues({}, errorMessages$1), DOMErrorMessages);
|
|
48640
48648
|
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.11",
|
|
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.5",
|
|
48
48
|
"postcss": "^8.4.32",
|
|
49
49
|
"source-map-js": "^1.0.2",
|
|
50
|
-
"@vue/compiler-
|
|
51
|
-
"@vue/
|
|
52
|
-
"@vue/
|
|
53
|
-
"@vue/compiler-
|
|
50
|
+
"@vue/compiler-core": "3.4.11",
|
|
51
|
+
"@vue/shared": "3.4.11",
|
|
52
|
+
"@vue/compiler-dom": "3.4.11",
|
|
53
|
+
"@vue/compiler-ssr": "3.4.11"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@babel/types": "^7.23.6",
|