@vue/compiler-sfc 3.2.32 → 3.2.33

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.
@@ -3763,7 +3763,9 @@ function compileScript(sfc, options) {
3763
3763
  const imported = specifier.type === 'ImportSpecifier' &&
3764
3764
  specifier.imported.type === 'Identifier' &&
3765
3765
  specifier.imported.name;
3766
- registerUserImport(node.source.value, specifier.local.name, imported, node.importKind === 'type', false);
3766
+ registerUserImport(node.source.value, specifier.local.name, imported, node.importKind === 'type' ||
3767
+ (specifier.type === 'ImportSpecifier' &&
3768
+ specifier.importKind === 'type'), false);
3767
3769
  }
3768
3770
  }
3769
3771
  else if (node.type === 'ExportDefaultDeclaration') {
@@ -3897,7 +3899,9 @@ function compileScript(sfc, options) {
3897
3899
  }
3898
3900
  }
3899
3901
  else {
3900
- registerUserImport(source, local, imported, node.importKind === 'type', true);
3902
+ registerUserImport(source, local, imported, node.importKind === 'type' ||
3903
+ (specifier.type === 'ImportSpecifier' &&
3904
+ specifier.importKind === 'type'), true);
3901
3905
  }
3902
3906
  }
3903
3907
  if (node.specifiers.length && removed === node.specifiers.length) {
@@ -35104,6 +35104,15 @@ function transformAST(ast, s, offset = 0, knownRefs, knownProps) {
35104
35104
  }
35105
35105
  return;
35106
35106
  }
35107
+ // catch param
35108
+ if (node.type === 'CatchClause') {
35109
+ scopeStack.push((currentScope = {}));
35110
+ if (node.param && node.param.type === 'Identifier') {
35111
+ registerBinding(node.param);
35112
+ }
35113
+ walkScope(node.body);
35114
+ return;
35115
+ }
35107
35116
  // non-function block scopes
35108
35117
  if (node.type === 'BlockStatement' && !isFunctionType(parent)) {
35109
35118
  scopeStack.push((currentScope = {}));
@@ -35676,7 +35685,9 @@ function compileScript(sfc, options) {
35676
35685
  const imported = specifier.type === 'ImportSpecifier' &&
35677
35686
  specifier.imported.type === 'Identifier' &&
35678
35687
  specifier.imported.name;
35679
- registerUserImport(node.source.value, specifier.local.name, imported, node.importKind === 'type', false);
35688
+ registerUserImport(node.source.value, specifier.local.name, imported, node.importKind === 'type' ||
35689
+ (specifier.type === 'ImportSpecifier' &&
35690
+ specifier.importKind === 'type'), false);
35680
35691
  }
35681
35692
  }
35682
35693
  else if (node.type === 'ExportDefaultDeclaration') {
@@ -35810,7 +35821,9 @@ function compileScript(sfc, options) {
35810
35821
  }
35811
35822
  }
35812
35823
  else {
35813
- registerUserImport(source, local, imported, node.importKind === 'type', true);
35824
+ registerUserImport(source, local, imported, node.importKind === 'type' ||
35825
+ (specifier.type === 'ImportSpecifier' &&
35826
+ specifier.importKind === 'type'), true);
35814
35827
  }
35815
35828
  }
35816
35829
  if (node.specifiers.length && removed === node.specifiers.length) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue/compiler-sfc",
3
- "version": "3.2.32",
3
+ "version": "3.2.33",
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.32",
37
- "@vue/compiler-dom": "3.2.32",
38
- "@vue/compiler-ssr": "3.2.32",
39
- "@vue/reactivity-transform": "3.2.32",
40
- "@vue/shared": "3.2.32",
36
+ "@vue/compiler-core": "3.2.33",
37
+ "@vue/compiler-dom": "3.2.33",
38
+ "@vue/compiler-ssr": "3.2.33",
39
+ "@vue/reactivity-transform": "3.2.33",
40
+ "@vue/shared": "3.2.33",
41
41
  "estree-walker": "^2.0.2",
42
42
  "magic-string": "^0.25.7",
43
43
  "source-map": "^0.6.1",