@vue/compiler-sfc 3.2.35 → 3.2.36

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.
@@ -3295,7 +3295,6 @@ function rewriteDefault(input, as, parserPlugins) {
3295
3295
  plugins: parserPlugins
3296
3296
  }).program.body;
3297
3297
  ast.forEach(node => {
3298
- var _a;
3299
3298
  if (node.type === 'ExportDefaultDeclaration') {
3300
3299
  s.overwrite(node.start, node.declaration.start, `const ${as} = `);
3301
3300
  }
@@ -3314,7 +3313,7 @@ function rewriteDefault(input, as, parserPlugins) {
3314
3313
  }
3315
3314
  else {
3316
3315
  const end = specifierEnd(input, specifier.exported.end, node.end);
3317
- s.prepend(`import { ${input.slice(specifier.local.start, specifier.local.end)} } from '${(_a = node.source) === null || _a === void 0 ? void 0 : _a.value}'\n`);
3316
+ s.prepend(`import { ${input.slice(specifier.local.start, specifier.local.end)} } from '${node.source.value}'\n`);
3318
3317
  s.overwrite(specifier.start, end, ``);
3319
3318
  s.append(`\nconst ${as} = ${specifier.local.name}`);
3320
3319
  continue;
@@ -17347,6 +17347,14 @@ function getConstantType(node, context) {
17347
17347
  // static then they don't need to be blocks since there will be no
17348
17348
  // nested updates.
17349
17349
  if (codegenNode.isBlock) {
17350
+ // except set custom directives.
17351
+ for (let i = 0; i < node.props.length; i++) {
17352
+ const p = node.props[i];
17353
+ if (p.type === 7 /* DIRECTIVE */) {
17354
+ constantCache.set(node, 0 /* NOT_CONSTANT */);
17355
+ return 0 /* NOT_CONSTANT */;
17356
+ }
17357
+ }
17350
17358
  context.removeHelper(OPEN_BLOCK);
17351
17359
  context.removeHelper(getVNodeBlockHelper(context.inSSR, codegenNode.isComponent));
17352
17360
  codegenNode.isBlock = false;
@@ -34804,7 +34812,6 @@ function rewriteDefault(input, as, parserPlugins) {
34804
34812
  plugins: parserPlugins
34805
34813
  }).program.body;
34806
34814
  ast.forEach(node => {
34807
- var _a;
34808
34815
  if (node.type === 'ExportDefaultDeclaration') {
34809
34816
  s.overwrite(node.start, node.declaration.start, `const ${as} = `);
34810
34817
  }
@@ -34823,7 +34830,7 @@ function rewriteDefault(input, as, parserPlugins) {
34823
34830
  }
34824
34831
  else {
34825
34832
  const end = specifierEnd(input, specifier.exported.end, node.end);
34826
- s.prepend(`import { ${input.slice(specifier.local.start, specifier.local.end)} } from '${(_a = node.source) === null || _a === void 0 ? void 0 : _a.value}'\n`);
34833
+ s.prepend(`import { ${input.slice(specifier.local.start, specifier.local.end)} } from '${node.source.value}'\n`);
34827
34834
  s.overwrite(specifier.start, end, ``);
34828
34835
  s.append(`\nconst ${as} = ${specifier.local.name}`);
34829
34836
  continue;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue/compiler-sfc",
3
- "version": "3.2.35",
3
+ "version": "3.2.36",
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.16.4",
36
- "@vue/compiler-core": "3.2.35",
37
- "@vue/compiler-dom": "3.2.35",
38
- "@vue/compiler-ssr": "3.2.35",
39
- "@vue/reactivity-transform": "3.2.35",
40
- "@vue/shared": "3.2.35",
36
+ "@vue/compiler-core": "3.2.36",
37
+ "@vue/compiler-dom": "3.2.36",
38
+ "@vue/compiler-ssr": "3.2.36",
39
+ "@vue/reactivity-transform": "3.2.36",
40
+ "@vue/shared": "3.2.36",
41
41
  "estree-walker": "^2.0.2",
42
42
  "magic-string": "^0.25.7",
43
43
  "source-map": "^0.6.1",