@volar/language-server 1.4.0-alpha.0 → 1.4.0-alpha.10

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.
@@ -1,12 +1,4 @@
1
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
- return new (P || (P = Promise))(function (resolve, reject) {
4
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
- step((generator = generator.apply(thisArg, _arguments || [])).next());
8
- });
9
- };
1
+ "use strict";
10
2
  Object.defineProperty(exports, "__esModule", { value: true });
11
3
  exports.startCommonLanguageServer = void 0;
12
4
  const language_service_1 = require("@volar/language-service");
@@ -30,17 +22,18 @@ function startCommonLanguageServer(connection, getCtx) {
30
22
  let plugins;
31
23
  let documents;
32
24
  let context;
33
- connection.onInitialize((_params) => __awaiter(this, void 0, void 0, function* () {
34
- var _a, _b, _c, _d;
25
+ connection.onInitialize(async (_params) => {
35
26
  initParams = _params;
36
27
  options = initParams.initializationOptions;
37
28
  context = getCtx(options);
38
- plugins = context.plugins.map(plugin => plugin(options));
29
+ plugins = context.plugins.map(plugin => plugin(options, {
30
+ typescript: options.typescript ? context.runtimeEnv.loadTypescript(options.typescript.tsdk) : undefined
31
+ }));
39
32
  documents = (0, documents_1.createDocuments)(context.runtimeEnv, connection);
40
33
  if (options.l10n) {
41
- yield l10n.config({ uri: options.l10n.location });
34
+ await l10n.config({ uri: options.l10n.location });
42
35
  }
43
- if (((_a = initParams.capabilities.workspace) === null || _a === void 0 ? void 0 : _a.workspaceFolders) && initParams.workspaceFolders) {
36
+ if (initParams.capabilities.workspace?.workspaceFolders && initParams.workspaceFolders) {
44
37
  roots = initParams.workspaceFolders.map(folder => vscode_uri_1.URI.parse(folder.uri));
45
38
  }
46
39
  else if (initParams.rootUri) {
@@ -51,27 +44,36 @@ function startCommonLanguageServer(connection, getCtx) {
51
44
  }
52
45
  const result = {
53
46
  capabilities: {
54
- textDocumentSync: (_b = options.textDocumentSync) !== null && _b !== void 0 ? _b : vscode.TextDocumentSyncKind.Incremental,
47
+ textDocumentSync: vscode.TextDocumentSyncKind.Incremental,
48
+ workspace: {
49
+ // #18
50
+ workspaceFolders: {
51
+ supported: true,
52
+ changeNotifications: true,
53
+ },
54
+ },
55
55
  },
56
56
  };
57
- configurationHost = ((_c = initParams.capabilities.workspace) === null || _c === void 0 ? void 0 : _c.configuration) ? (0, configurationHost_1.createConfigurationHost)(initParams, connection) : undefined;
57
+ configurationHost = initParams.capabilities.workspace?.configuration ? (0, configurationHost_1.createConfigurationHost)(initParams, connection) : undefined;
58
58
  let lsPlugins = {};
59
- const ts = options.typescript ? context.runtimeEnv.loadTypescript(options.typescript.tsdk) : undefined;
60
59
  for (const root of roots) {
61
60
  if (root.scheme === 'file') {
62
- let config = (_d = (0, serverConfig_1.loadConfig)(root.path, options.configFilePath)) !== null && _d !== void 0 ? _d : {};
61
+ let config = (0, serverConfig_1.loadConfig)(root.path, options.configFilePath) ?? {};
63
62
  for (const plugin of plugins) {
64
63
  if (plugin.resolveConfig) {
65
- config = plugin.resolveConfig(config, { typescript: ts });
64
+ config = plugin.resolveConfig(config, undefined);
66
65
  }
67
66
  }
68
67
  if (config.plugins) {
69
- lsPlugins = Object.assign(Object.assign({}, lsPlugins), config.plugins);
68
+ lsPlugins = {
69
+ ...lsPlugins,
70
+ ...config.plugins,
71
+ };
70
72
  }
71
73
  }
72
74
  }
73
75
  (0, registerFeatures_1.setupCapabilities)(result.capabilities, options, plugins, getSemanticTokensLegend(), lsPlugins);
74
- yield createLanguageServiceHost();
76
+ await createLanguageServiceHost();
75
77
  try {
76
78
  // show version on LSP logs
77
79
  const packageJson = require('../package.json');
@@ -80,26 +82,25 @@ function startCommonLanguageServer(connection, getCtx) {
80
82
  version: packageJson.version,
81
83
  };
82
84
  }
83
- catch (_e) { }
85
+ catch { }
84
86
  return result;
85
- }));
87
+ });
86
88
  connection.onInitialized(() => {
87
- var _a, _b, _c;
88
- fsHost === null || fsHost === void 0 ? void 0 : fsHost.ready(connection);
89
- configurationHost === null || configurationHost === void 0 ? void 0 : configurationHost.ready();
90
- if ((_a = initParams.capabilities.workspace) === null || _a === void 0 ? void 0 : _a.workspaceFolders) {
89
+ fsHost?.ready(connection);
90
+ configurationHost?.ready();
91
+ if (initParams.capabilities.workspace?.workspaceFolders) {
91
92
  connection.workspace.onDidChangeWorkspaceFolders(e => {
92
93
  for (const folder of e.added) {
93
- projects === null || projects === void 0 ? void 0 : projects.add(vscode_uri_1.URI.parse(folder.uri));
94
+ projects?.add(vscode_uri_1.URI.parse(folder.uri));
94
95
  }
95
96
  for (const folder of e.removed) {
96
- projects === null || projects === void 0 ? void 0 : projects.remove(vscode_uri_1.URI.parse(folder.uri));
97
+ projects?.remove(vscode_uri_1.URI.parse(folder.uri));
97
98
  }
98
99
  });
99
100
  }
100
101
  if (options.serverMode !== types_1.ServerMode.Syntactic
101
102
  && !options.disableFileWatcher
102
- && ((_c = (_b = initParams.capabilities.workspace) === null || _b === void 0 ? void 0 : _b.didChangeWatchedFiles) === null || _c === void 0 ? void 0 : _c.dynamicRegistration)) {
103
+ && initParams.capabilities.workspace?.didChangeWatchedFiles?.dynamicRegistration) {
103
104
  const exts = plugins.map(plugin => plugin.watchFileExtensions).flat();
104
105
  if (exts.length) {
105
106
  connection.client.register(vscode.DidChangeWatchedFilesNotification.type, {
@@ -112,50 +113,44 @@ function startCommonLanguageServer(connection, getCtx) {
112
113
  }
113
114
  }
114
115
  });
115
- connection.onShutdown(() => __awaiter(this, void 0, void 0, function* () {
116
+ connection.onShutdown(async () => {
116
117
  if (projects) {
117
118
  for (const workspace of projects.workspaces) {
118
- (yield workspace[1]).dispose();
119
+ (await workspace[1]).dispose();
119
120
  }
120
121
  }
121
- }));
122
+ });
122
123
  connection.listen();
123
- function createLanguageServiceHost() {
124
- var _a;
125
- return __awaiter(this, void 0, void 0, function* () {
126
- const ts = options.typescript ? context.runtimeEnv.loadTypescript(options.typescript.tsdk) : undefined;
127
- fsHost = ts ? context.runtimeEnv.createFileSystemHost(ts, initParams.capabilities, context.runtimeEnv, options) : undefined;
128
- const tsLocalized = options.typescript && initParams.locale ? yield context.runtimeEnv.loadTypescriptLocalized(options.typescript.tsdk, initParams.locale) : undefined;
129
- const cancelTokenHost = (0, cancellationPipe_1.createCancellationTokenHost)(options.cancellationPipeName);
130
- const _projects = (0, workspaces_1.createWorkspaces)({
131
- server: context,
132
- fileSystemHost: fsHost,
133
- configurationHost,
134
- ts,
135
- tsLocalized,
136
- initParams: initParams,
137
- initOptions: options,
138
- documents,
139
- cancelTokenHost,
140
- plugins,
141
- });
142
- projects = _projects;
143
- for (const root of roots) {
144
- projects.add(root);
145
- }
146
- (yield Promise.resolve().then(() => require('./features/customFeatures'))).register(connection, projects, context.runtimeEnv);
147
- (yield Promise.resolve().then(() => require('./features/languageFeatures'))).register(connection, projects, initParams, options, cancelTokenHost, getSemanticTokensLegend(), context.runtimeEnv, documents);
148
- for (const plugin of plugins) {
149
- (_a = plugin.onInitialized) === null || _a === void 0 ? void 0 : _a.call(plugin, getLanguageService, context.runtimeEnv);
150
- }
151
- function getLanguageService(uri) {
152
- var _a;
153
- return __awaiter(this, void 0, void 0, function* () {
154
- const project = (_a = (yield projects.getProject(uri))) === null || _a === void 0 ? void 0 : _a.project;
155
- return project === null || project === void 0 ? void 0 : project.getLanguageService();
156
- });
157
- }
124
+ async function createLanguageServiceHost() {
125
+ const ts = options.typescript ? context.runtimeEnv.loadTypescript(options.typescript.tsdk) : undefined;
126
+ fsHost = ts ? context.runtimeEnv.createFileSystemHost(ts, initParams.capabilities, context.runtimeEnv, options) : undefined;
127
+ const tsLocalized = options.typescript && initParams.locale ? await context.runtimeEnv.loadTypescriptLocalized(options.typescript.tsdk, initParams.locale) : undefined;
128
+ const cancelTokenHost = (0, cancellationPipe_1.createCancellationTokenHost)(options.cancellationPipeName);
129
+ const _projects = (0, workspaces_1.createWorkspaces)({
130
+ server: context,
131
+ fileSystemHost: fsHost,
132
+ configurationHost,
133
+ ts,
134
+ tsLocalized,
135
+ initParams: initParams,
136
+ initOptions: options,
137
+ documents,
138
+ cancelTokenHost,
139
+ plugins,
158
140
  });
141
+ projects = _projects;
142
+ for (const root of roots) {
143
+ projects.add(root);
144
+ }
145
+ (await Promise.resolve().then(() => require('./features/customFeatures'))).register(connection, projects, context.runtimeEnv);
146
+ (await Promise.resolve().then(() => require('./features/languageFeatures'))).register(connection, projects, initParams, options, cancelTokenHost, getSemanticTokensLegend(), context.runtimeEnv, documents);
147
+ for (const plugin of plugins) {
148
+ plugin.onInitialized?.(getLanguageService, context.runtimeEnv);
149
+ }
150
+ async function getLanguageService(uri) {
151
+ const project = (await projects.getProject(uri))?.project;
152
+ return project?.getLanguageService();
153
+ }
159
154
  }
160
155
  function getSemanticTokensLegend() {
161
156
  if (!options.semanticTokensLegend) {
@@ -1,71 +1,68 @@
1
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
- return new (P || (P = Promise))(function (resolve, reject) {
4
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
- step((generator = generator.apply(thisArg, _arguments || [])).next());
8
- });
9
- };
1
+ "use strict";
10
2
  Object.defineProperty(exports, "__esModule", { value: true });
11
3
  exports.getInferredCompilerOptions = void 0;
12
- function getInferredCompilerOptions(configurationHost) {
13
- return __awaiter(this, void 0, void 0, function* () {
14
- let [implicitProjectConfig_1, implicitProjectConfig_2] = yield Promise.all([
15
- configurationHost === null || configurationHost === void 0 ? void 0 : configurationHost.getConfiguration('js/ts.implicitProjectConfig'),
16
- configurationHost === null || configurationHost === void 0 ? void 0 : configurationHost.getConfiguration('javascript.implicitProjectConfig'),
17
- ]);
18
- implicitProjectConfig_1 = implicitProjectConfig_1 !== null && implicitProjectConfig_1 !== void 0 ? implicitProjectConfig_1 : {};
19
- implicitProjectConfig_2 = implicitProjectConfig_2 !== null && implicitProjectConfig_2 !== void 0 ? implicitProjectConfig_2 : {};
20
- const checkJs = readCheckJs();
21
- const experimentalDecorators = readExperimentalDecorators();
22
- const strictNullChecks = readImplicitStrictNullChecks();
23
- const strictFunctionTypes = readImplicitStrictFunctionTypes();
24
- const options = Object.assign(Object.assign({}, inferredProjectCompilerOptions('typescript')), { allowJs: true, allowSyntheticDefaultImports: true, allowNonTsExtensions: true, resolveJsonModule: true, jsx: 1 /* ts.JsxEmit.Preserve */ });
25
- return options;
26
- function readCheckJs() {
27
- var _a, _b;
28
- return (_b = (_a = implicitProjectConfig_1['checkJs']) !== null && _a !== void 0 ? _a : implicitProjectConfig_2['checkJs']) !== null && _b !== void 0 ? _b : false;
4
+ async function getInferredCompilerOptions(configurationHost) {
5
+ let [implicitProjectConfig_1, implicitProjectConfig_2] = await Promise.all([
6
+ configurationHost?.getConfiguration('js/ts.implicitProjectConfig'),
7
+ configurationHost?.getConfiguration('javascript.implicitProjectConfig'),
8
+ ]);
9
+ implicitProjectConfig_1 = implicitProjectConfig_1 ?? {};
10
+ implicitProjectConfig_2 = implicitProjectConfig_2 ?? {};
11
+ const checkJs = readCheckJs();
12
+ const experimentalDecorators = readExperimentalDecorators();
13
+ const strictNullChecks = readImplicitStrictNullChecks();
14
+ const strictFunctionTypes = readImplicitStrictFunctionTypes();
15
+ const options = {
16
+ ...inferredProjectCompilerOptions('typescript'),
17
+ allowJs: true,
18
+ allowSyntheticDefaultImports: true,
19
+ allowNonTsExtensions: true,
20
+ resolveJsonModule: true,
21
+ jsx: 1 /* ts.JsxEmit.Preserve */,
22
+ };
23
+ return options;
24
+ function readCheckJs() {
25
+ return implicitProjectConfig_1['checkJs']
26
+ ?? implicitProjectConfig_2['checkJs']
27
+ ?? false;
28
+ }
29
+ function readExperimentalDecorators() {
30
+ return implicitProjectConfig_1['experimentalDecorators']
31
+ ?? implicitProjectConfig_2['experimentalDecorators']
32
+ ?? false;
33
+ }
34
+ function readImplicitStrictNullChecks() {
35
+ return implicitProjectConfig_1['strictNullChecks'] ?? false;
36
+ }
37
+ function readImplicitStrictFunctionTypes() {
38
+ return implicitProjectConfig_1['strictFunctionTypes'] ?? true;
39
+ }
40
+ function inferredProjectCompilerOptions(projectType) {
41
+ const projectConfig = {
42
+ module: 1 /* ts.ModuleKind.CommonJS */,
43
+ target: 7 /* ts.ScriptTarget.ES2020 */,
44
+ jsx: 1 /* ts.JsxEmit.Preserve */,
45
+ };
46
+ if (checkJs) {
47
+ projectConfig.checkJs = true;
48
+ if (projectType === 'typescript') {
49
+ projectConfig.allowJs = true;
50
+ }
29
51
  }
30
- function readExperimentalDecorators() {
31
- var _a, _b;
32
- return (_b = (_a = implicitProjectConfig_1['experimentalDecorators']) !== null && _a !== void 0 ? _a : implicitProjectConfig_2['experimentalDecorators']) !== null && _b !== void 0 ? _b : false;
52
+ if (experimentalDecorators) {
53
+ projectConfig.experimentalDecorators = true;
33
54
  }
34
- function readImplicitStrictNullChecks() {
35
- var _a;
36
- return (_a = implicitProjectConfig_1['strictNullChecks']) !== null && _a !== void 0 ? _a : false;
55
+ if (strictNullChecks) {
56
+ projectConfig.strictNullChecks = true;
37
57
  }
38
- function readImplicitStrictFunctionTypes() {
39
- var _a;
40
- return (_a = implicitProjectConfig_1['strictFunctionTypes']) !== null && _a !== void 0 ? _a : true;
58
+ if (strictFunctionTypes) {
59
+ projectConfig.strictFunctionTypes = true;
41
60
  }
42
- function inferredProjectCompilerOptions(projectType) {
43
- const projectConfig = {
44
- module: 1 /* ts.ModuleKind.CommonJS */,
45
- target: 7 /* ts.ScriptTarget.ES2020 */,
46
- jsx: 1 /* ts.JsxEmit.Preserve */,
47
- };
48
- if (checkJs) {
49
- projectConfig.checkJs = true;
50
- if (projectType === 'typescript') {
51
- projectConfig.allowJs = true;
52
- }
53
- }
54
- if (experimentalDecorators) {
55
- projectConfig.experimentalDecorators = true;
56
- }
57
- if (strictNullChecks) {
58
- projectConfig.strictNullChecks = true;
59
- }
60
- if (strictFunctionTypes) {
61
- projectConfig.strictFunctionTypes = true;
62
- }
63
- if (projectType === 'typescript') {
64
- projectConfig.sourceMap = true;
65
- }
66
- return projectConfig;
61
+ if (projectType === 'typescript') {
62
+ projectConfig.sourceMap = true;
67
63
  }
68
- });
64
+ return projectConfig;
65
+ }
69
66
  }
70
67
  exports.getInferredCompilerOptions = getInferredCompilerOptions;
71
68
  //# sourceMappingURL=inferredCompilerOptions.js.map
@@ -1,3 +1,4 @@
1
+ "use strict";
1
2
  Object.defineProperty(exports, "__esModule", { value: true });
2
3
  exports.isFileInDir = void 0;
3
4
  const path = require("typesafe-path");
@@ -1,14 +1,14 @@
1
+ "use strict";
1
2
  Object.defineProperty(exports, "__esModule", { value: true });
2
3
  exports.setupCapabilities = void 0;
3
- const embedded = require("@volar/language-service");
4
4
  const types_1 = require("../../types");
5
5
  const vscode = require("vscode-languageserver");
6
6
  function setupCapabilities(server, initOptions, plugins, semanticTokensLegend, lsPlugins) {
7
- var _a, _b, _c;
8
7
  const lsPluginInstances = Object.values(lsPlugins)
9
8
  .map(plugin => typeof plugin === 'function' ? plugin() : plugin)
10
9
  .filter((plugin) => !!plugin);
11
- if (initOptions.serverMode === types_1.ServerMode.Semantic || initOptions.serverMode === types_1.ServerMode.Syntactic) {
10
+ const serverMode = initOptions.serverMode ?? types_1.ServerMode.Semantic;
11
+ if (serverMode === types_1.ServerMode.Semantic || serverMode === types_1.ServerMode.Syntactic) {
12
12
  server.selectionRangeProvider = true;
13
13
  server.foldingRangeProvider = true;
14
14
  server.linkedEditingRangeProvider = true;
@@ -16,7 +16,7 @@ function setupCapabilities(server, initOptions, plugins, semanticTokensLegend, l
16
16
  server.documentSymbolProvider = true;
17
17
  server.documentFormattingProvider = true;
18
18
  server.documentRangeFormattingProvider = true;
19
- const characters = [...new Set(lsPluginInstances.map(plugin => { var _a; return (_a = plugin.autoFormatTriggerCharacters) !== null && _a !== void 0 ? _a : []; }).flat())];
19
+ const characters = [...new Set(lsPluginInstances.map(plugin => plugin.autoFormatTriggerCharacters ?? []).flat())];
20
20
  if (characters.length) {
21
21
  server.documentOnTypeFormattingProvider = {
22
22
  firstTriggerCharacter: characters[0],
@@ -24,7 +24,7 @@ function setupCapabilities(server, initOptions, plugins, semanticTokensLegend, l
24
24
  };
25
25
  }
26
26
  }
27
- if (initOptions.serverMode === types_1.ServerMode.Semantic || initOptions.serverMode === types_1.ServerMode.PartialSemantic) {
27
+ if (serverMode === types_1.ServerMode.Semantic || serverMode === types_1.ServerMode.PartialSemantic) {
28
28
  server.referencesProvider = true;
29
29
  server.implementationProvider = true;
30
30
  server.definitionProvider = true;
@@ -35,15 +35,16 @@ function setupCapabilities(server, initOptions, plugins, semanticTokensLegend, l
35
35
  prepareProvider: true,
36
36
  };
37
37
  server.signatureHelpProvider = {
38
- triggerCharacters: [...new Set(lsPluginInstances.map(plugin => { var _a; return (_a = plugin.signatureHelpTriggerCharacters) !== null && _a !== void 0 ? _a : []; }).flat())],
39
- retriggerCharacters: [...new Set(lsPluginInstances.map(plugin => { var _a; return (_a = plugin.signatureHelpRetriggerCharacters) !== null && _a !== void 0 ? _a : []; }).flat())],
38
+ triggerCharacters: [...new Set(lsPluginInstances.map(plugin => plugin.signatureHelpTriggerCharacters ?? []).flat())],
39
+ retriggerCharacters: [...new Set(lsPluginInstances.map(plugin => plugin.signatureHelpRetriggerCharacters ?? []).flat())],
40
40
  };
41
41
  server.completionProvider = {
42
- triggerCharacters: [...new Set(lsPluginInstances.map(plugin => { var _a; return (_a = plugin.triggerCharacters) !== null && _a !== void 0 ? _a : []; }).flat())],
42
+ triggerCharacters: [...new Set(lsPluginInstances.map(plugin => plugin.triggerCharacters ?? []).flat())],
43
43
  resolveProvider: true,
44
44
  };
45
45
  if (initOptions.ignoreTriggerCharacters) {
46
- server.completionProvider.triggerCharacters = (_a = server.completionProvider.triggerCharacters) === null || _a === void 0 ? void 0 : _a.filter(c => !initOptions.ignoreTriggerCharacters.includes(c));
46
+ server.completionProvider.triggerCharacters = server.completionProvider.triggerCharacters
47
+ ?.filter(c => !initOptions.ignoreTriggerCharacters.includes(c));
47
48
  }
48
49
  server.documentHighlightProvider = true;
49
50
  server.documentLinkProvider = {
@@ -52,8 +53,6 @@ function setupCapabilities(server, initOptions, plugins, semanticTokensLegend, l
52
53
  server.codeLensProvider = {
53
54
  resolveProvider: true,
54
55
  };
55
- (_b = server.executeCommandProvider) !== null && _b !== void 0 ? _b : (server.executeCommandProvider = { commands: [] });
56
- server.executeCommandProvider.commands.push(embedded.showReferencesCommand);
57
56
  server.semanticTokensProvider = {
58
57
  range: true,
59
58
  full: false,
@@ -93,7 +92,7 @@ function setupCapabilities(server, initOptions, plugins, semanticTokensLegend, l
93
92
  server.workspaceSymbolProvider = true;
94
93
  }
95
94
  // diagnostics are shunted in the api
96
- if (((_c = initOptions.diagnosticModel) !== null && _c !== void 0 ? _c : types_1.DiagnosticModel.Push) === types_1.DiagnosticModel.Pull) {
95
+ if ((initOptions.diagnosticModel ?? types_1.DiagnosticModel.Push) === types_1.DiagnosticModel.Pull) {
97
96
  server.diagnosticProvider = {
98
97
  interFileDependencies: true,
99
98
  workspaceDiagnostics: false,
@@ -1,11 +1,12 @@
1
+ "use strict";
1
2
  Object.defineProperty(exports, "__esModule", { value: true });
2
3
  exports.loadConfig = void 0;
3
4
  function loadConfig(dir, configFile) {
4
5
  let configPath;
5
6
  try {
6
- configPath = require.resolve(configFile !== null && configFile !== void 0 ? configFile : './volar.config.js', { paths: [dir] });
7
+ configPath = require.resolve(configFile ?? './volar.config.js', { paths: [dir] });
7
8
  }
8
- catch (_a) { }
9
+ catch { }
9
10
  try {
10
11
  if (configPath) {
11
12
  const config = require(configPath);
@@ -1,3 +1,4 @@
1
+ "use strict";
1
2
  Object.defineProperty(exports, "__esModule", { value: true });
2
3
  exports.createUriMap = exports._ = void 0;
3
4
  const vscode_uri_1 = require("vscode-uri");
@@ -64,7 +65,7 @@ function normalizeUri(uri) {
64
65
  try {
65
66
  return vscode_uri_1.URI.parse(uri).toString();
66
67
  }
67
- catch (_a) {
68
+ catch {
68
69
  return '';
69
70
  }
70
71
  }