volar-service-typescript 0.0.67 → 0.0.69

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.
@@ -63,18 +63,20 @@ function getQuoteStylePreference(config) {
63
63
  }
64
64
  }
65
65
  function getAutoImportFileExcludePatternsPreference(config, workspacePath) {
66
- return workspacePath && config.autoImportFileExcludePatterns?.map(p => {
67
- // Normalization rules: https://github.com/microsoft/TypeScript/pull/49578
68
- const slashNormalized = p.replace(/\\/g, '/');
69
- const isRelative = /^\.\.?($|\/)/.test(slashNormalized);
70
- return path.isAbsolute(p)
71
- ? p
72
- : p.startsWith('*')
73
- ? '/' + slashNormalized
74
- : isRelative
75
- ? path.join(workspacePath, p)
76
- : '/**/' + slashNormalized;
77
- });
66
+ if (workspacePath) {
67
+ return config.autoImportFileExcludePatterns?.map(p => {
68
+ // Normalization rules: https://github.com/microsoft/TypeScript/pull/49578
69
+ const slashNormalized = p.replace(/\\/g, '/');
70
+ const isRelative = /^\.\.?($|\/)/.test(slashNormalized);
71
+ return path.isAbsolute(p)
72
+ ? p
73
+ : p.startsWith('*')
74
+ ? '/' + slashNormalized
75
+ : isRelative
76
+ ? path.join(workspacePath, p)
77
+ : '/**/' + slashNormalized;
78
+ });
79
+ }
78
80
  }
79
81
  function getImportModuleSpecifierPreference(config) {
80
82
  switch (config.importModuleSpecifier) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "volar-service-typescript",
3
- "version": "0.0.67",
3
+ "version": "0.0.69",
4
4
  "description": "Integrate TypeScript into Volar",
5
5
  "homepage": "https://github.com/volarjs/services/tree/master/packages/typescript",
6
6
  "bugs": "https://github.com/volarjs/services/issues",
@@ -44,5 +44,5 @@
44
44
  "optional": true
45
45
  }
46
46
  },
47
- "gitHead": "7bf732781fe5900fbe0be87e993b5a74bc939aff"
47
+ "gitHead": "1e526251a7229ad3092d1757bccbabcc6e6412e8"
48
48
  }