@vue/compiler-sfc 3.3.5 → 3.3.6

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.
@@ -2189,7 +2189,10 @@ function getImportsExpressionExp(path2, hash, loc, context) {
2189
2189
  loc,
2190
2190
  3
2191
2191
  );
2192
- context.imports.push({ exp, path: path2 });
2192
+ context.imports.push({
2193
+ exp,
2194
+ path: decodeURIComponent(path2)
2195
+ });
2193
2196
  }
2194
2197
  if (!hash) {
2195
2198
  return exp;
@@ -15555,7 +15558,7 @@ class ScriptCompileContext {
15555
15558
  this.hasDefineModelCall = false;
15556
15559
  this.propsDestructuredBindings = /* @__PURE__ */ Object.create(null);
15557
15560
  // defineModel
15558
- this.modelDecls = {};
15561
+ this.modelDecls = /* @__PURE__ */ Object.create(null);
15559
15562
  // codegen
15560
15563
  this.bindingMetadata = {};
15561
15564
  this.helperImports = /* @__PURE__ */ new Set();
@@ -20407,7 +20410,7 @@ function isStaticNode(node) {
20407
20410
  return false;
20408
20411
  }
20409
20412
 
20410
- const version = "3.3.5";
20413
+ const version = "3.3.6";
20411
20414
  const walk = estreeWalker.walk;
20412
20415
 
20413
20416
  exports.babelParse = parser$2.parse;
@@ -16506,7 +16506,7 @@ function createTransformContext(root, {
16506
16506
  directives: /* @__PURE__ */ new Set(),
16507
16507
  hoists: [],
16508
16508
  imports: [],
16509
- constantCache: /* @__PURE__ */ new Map(),
16509
+ constantCache: /* @__PURE__ */ new WeakMap(),
16510
16510
  temps: 0,
16511
16511
  cached: 0,
16512
16512
  identifiers: /* @__PURE__ */ Object.create(null),
@@ -31665,7 +31665,10 @@ function getImportsExpressionExp(path2, hash, loc, context) {
31665
31665
  loc,
31666
31666
  3
31667
31667
  );
31668
- context.imports.push({ exp, path: path2 });
31668
+ context.imports.push({
31669
+ exp,
31670
+ path: decodeURIComponent(path2)
31671
+ });
31669
31672
  }
31670
31673
  if (!hash) {
31671
31674
  return exp;
@@ -32388,7 +32391,8 @@ function ssrTransformTransitionGroup(node, context) {
32388
32391
  }
32389
32392
  wipMap$1.set(node, {
32390
32393
  tag,
32391
- propsExp
32394
+ propsExp,
32395
+ scopeId: context.scopeId || null
32392
32396
  });
32393
32397
  }
32394
32398
  };
@@ -32396,13 +32400,16 @@ function ssrTransformTransitionGroup(node, context) {
32396
32400
  function ssrProcessTransitionGroup(node, context) {
32397
32401
  const entry = wipMap$1.get(node);
32398
32402
  if (entry) {
32399
- const { tag, propsExp } = entry;
32403
+ const { tag, propsExp, scopeId } = entry;
32400
32404
  if (tag.type === 7) {
32401
32405
  context.pushStringPart(`<`);
32402
32406
  context.pushStringPart(tag.exp);
32403
32407
  if (propsExp) {
32404
32408
  context.pushStringPart(propsExp);
32405
32409
  }
32410
+ if (scopeId) {
32411
+ context.pushStringPart(` ${scopeId}`);
32412
+ }
32406
32413
  context.pushStringPart(`>`);
32407
32414
  processChildren(
32408
32415
  node,
@@ -32424,6 +32431,9 @@ function ssrProcessTransitionGroup(node, context) {
32424
32431
  if (propsExp) {
32425
32432
  context.pushStringPart(propsExp);
32426
32433
  }
32434
+ if (scopeId) {
32435
+ context.pushStringPart(` ${scopeId}`);
32436
+ }
32427
32437
  context.pushStringPart(`>`);
32428
32438
  processChildren(node, context, false, true);
32429
32439
  context.pushStringPart(`</${tag.value.content}>`);
@@ -32824,6 +32834,38 @@ const ssrTransformModel = (dir, node, context) => {
32824
32834
  );
32825
32835
  }
32826
32836
  }
32837
+ function processOption(plainNode) {
32838
+ if (plainNode.tag === "option") {
32839
+ if (plainNode.props.findIndex((p) => p.name === "selected") === -1) {
32840
+ const value = findValueBinding(plainNode);
32841
+ plainNode.ssrCodegenNode.elements.push(
32842
+ createConditionalExpression(
32843
+ createCallExpression(context.helper(SSR_INCLUDE_BOOLEAN_ATTR), [
32844
+ createConditionalExpression(
32845
+ createCallExpression(`Array.isArray`, [model]),
32846
+ createCallExpression(context.helper(SSR_LOOSE_CONTAIN), [
32847
+ model,
32848
+ value
32849
+ ]),
32850
+ createCallExpression(context.helper(SSR_LOOSE_EQUAL), [
32851
+ model,
32852
+ value
32853
+ ])
32854
+ )
32855
+ ]),
32856
+ createSimpleExpression(" selected", true),
32857
+ createSimpleExpression("", true),
32858
+ false
32859
+ /* no newline */
32860
+ )
32861
+ );
32862
+ }
32863
+ } else if (plainNode.tag === "optgroup") {
32864
+ plainNode.children.forEach(
32865
+ (option) => processOption(option)
32866
+ );
32867
+ }
32868
+ }
32827
32869
  if (node.tagType === 0) {
32828
32870
  const res = { props: [] };
32829
32871
  const defaultProps = [
@@ -32906,33 +32948,9 @@ const ssrTransformModel = (dir, node, context) => {
32906
32948
  checkDuplicatedValue();
32907
32949
  node.children = [createInterpolation(model, model.loc)];
32908
32950
  } else if (node.tag === "select") {
32909
- node.children.forEach((option) => {
32910
- if (option.type === 1) {
32911
- const plainNode = option;
32912
- if (plainNode.props.findIndex((p) => p.name === "selected") === -1) {
32913
- const value = findValueBinding(plainNode);
32914
- plainNode.ssrCodegenNode.elements.push(
32915
- createConditionalExpression(
32916
- createCallExpression(context.helper(SSR_INCLUDE_BOOLEAN_ATTR), [
32917
- createConditionalExpression(
32918
- createCallExpression(`Array.isArray`, [model]),
32919
- createCallExpression(context.helper(SSR_LOOSE_CONTAIN), [
32920
- model,
32921
- value
32922
- ]),
32923
- createCallExpression(context.helper(SSR_LOOSE_EQUAL), [
32924
- model,
32925
- value
32926
- ])
32927
- )
32928
- ]),
32929
- createSimpleExpression(" selected", true),
32930
- createSimpleExpression("", true),
32931
- false
32932
- /* no newline */
32933
- )
32934
- );
32935
- }
32951
+ node.children.forEach((child) => {
32952
+ if (child.type === 1) {
32953
+ processOption(child);
32936
32954
  }
32937
32955
  });
32938
32956
  } else {
@@ -46944,7 +46962,7 @@ class ScriptCompileContext {
46944
46962
  this.hasDefineModelCall = false;
46945
46963
  this.propsDestructuredBindings = /* @__PURE__ */ Object.create(null);
46946
46964
  // defineModel
46947
- this.modelDecls = {};
46965
+ this.modelDecls = /* @__PURE__ */ Object.create(null);
46948
46966
  // codegen
46949
46967
  this.bindingMetadata = {};
46950
46968
  this.helperImports = /* @__PURE__ */ new Set();
@@ -49712,7 +49730,7 @@ function isStaticNode(node) {
49712
49730
  return false;
49713
49731
  }
49714
49732
 
49715
- const version = "3.3.5";
49733
+ const version = "3.3.6";
49716
49734
  const walk = walk$1;
49717
49735
 
49718
49736
  export { MagicString, parse_1$1 as babelParse, compileScript, compileStyle, compileStyleAsync, compileTemplate, extractIdentifiers, generateCodeFrame, inferRuntimeType, invalidateTypeCache, isInDestructureAssignment, isStaticProperty, parse$7 as parse, parseCache, registerTS, resolveTypeElements, rewriteDefault, rewriteDefaultAST, shouldTransform as shouldTransformRef, transform as transformRef, transformAST as transformRefAST, version, walk, walkIdentifiers };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue/compiler-sfc",
3
- "version": "3.3.5",
3
+ "version": "3.3.6",
4
4
  "description": "@vue/compiler-sfc",
5
5
  "main": "dist/compiler-sfc.cjs.js",
6
6
  "module": "dist/compiler-sfc.esm-browser.js",
@@ -33,11 +33,11 @@
33
33
  "homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-sfc#readme",
34
34
  "dependencies": {
35
35
  "@babel/parser": "^7.23.0",
36
- "@vue/compiler-core": "3.3.5",
37
- "@vue/compiler-dom": "3.3.5",
38
- "@vue/compiler-ssr": "3.3.5",
39
- "@vue/reactivity-transform": "3.3.5",
40
- "@vue/shared": "3.3.5",
36
+ "@vue/compiler-core": "3.3.6",
37
+ "@vue/compiler-dom": "3.3.6",
38
+ "@vue/compiler-ssr": "3.3.6",
39
+ "@vue/reactivity-transform": "3.3.6",
40
+ "@vue/shared": "3.3.6",
41
41
  "estree-walker": "^2.0.2",
42
42
  "magic-string": "^0.30.5",
43
43
  "postcss": "^8.4.31",
@@ -45,7 +45,6 @@
45
45
  },
46
46
  "devDependencies": {
47
47
  "@babel/types": "^7.23.0",
48
- "@types/estree": "^0.0.52",
49
48
  "@vue/consolidate": "^0.17.3",
50
49
  "hash-sum": "^2.0.0",
51
50
  "lru-cache": "^10.0.1",