@theia/task 1.77.0-next.0 → 1.77.0-next.101

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.
Files changed (257) hide show
  1. package/lib/browser/index.d.ts +6 -6
  2. package/lib/browser/index.d.ts.map +1 -1
  3. package/lib/browser/index.js +6 -9
  4. package/lib/browser/index.js.map +1 -1
  5. package/lib/browser/process/process-task-contribution.d.ts +2 -2
  6. package/lib/browser/process/process-task-contribution.d.ts.map +1 -1
  7. package/lib/browser/process/process-task-contribution.js +8 -12
  8. package/lib/browser/process/process-task-contribution.js.map +1 -1
  9. package/lib/browser/process/process-task-frontend-module.js +7 -10
  10. package/lib/browser/process/process-task-frontend-module.js.map +1 -1
  11. package/lib/browser/process/process-task-resolver.d.ts +8 -4
  12. package/lib/browser/process/process-task-resolver.d.ts.map +1 -1
  13. package/lib/browser/process/process-task-resolver.js +50 -44
  14. package/lib/browser/process/process-task-resolver.js.map +1 -1
  15. package/lib/browser/process/process-task-resolver.spec.d.ts +2 -0
  16. package/lib/browser/process/process-task-resolver.spec.d.ts.map +1 -0
  17. package/lib/browser/process/process-task-resolver.spec.js +215 -0
  18. package/lib/browser/process/process-task-resolver.spec.js.map +1 -0
  19. package/lib/browser/provided-task-configurations.d.ts +3 -3
  20. package/lib/browser/provided-task-configurations.d.ts.map +1 -1
  21. package/lib/browser/provided-task-configurations.js +18 -23
  22. package/lib/browser/provided-task-configurations.js.map +1 -1
  23. package/lib/browser/provided-task-configurations.spec.js +14 -16
  24. package/lib/browser/provided-task-configurations.spec.js.map +1 -1
  25. package/lib/browser/quick-open-task.d.ts +7 -7
  26. package/lib/browser/quick-open-task.d.ts.map +1 -1
  27. package/lib/browser/quick-open-task.js +160 -199
  28. package/lib/browser/quick-open-task.js.map +1 -1
  29. package/lib/browser/task-configuration-manager.d.ts +4 -4
  30. package/lib/browser/task-configuration-manager.d.ts.map +1 -1
  31. package/lib/browser/task-configuration-manager.js +61 -77
  32. package/lib/browser/task-configuration-manager.js.map +1 -1
  33. package/lib/browser/task-configuration-model.d.ts +1 -1
  34. package/lib/browser/task-configuration-model.d.ts.map +1 -1
  35. package/lib/browser/task-configuration-model.js +8 -12
  36. package/lib/browser/task-configuration-model.js.map +1 -1
  37. package/lib/browser/task-configurations.d.ts +6 -6
  38. package/lib/browser/task-configurations.d.ts.map +1 -1
  39. package/lib/browser/task-configurations.js +41 -55
  40. package/lib/browser/task-configurations.js.map +1 -1
  41. package/lib/browser/task-context-key-service.js +13 -21
  42. package/lib/browser/task-context-key-service.js.map +1 -1
  43. package/lib/browser/task-contribution.d.ts +1 -1
  44. package/lib/browser/task-contribution.d.ts.map +1 -1
  45. package/lib/browser/task-contribution.js +20 -27
  46. package/lib/browser/task-contribution.js.map +1 -1
  47. package/lib/browser/task-definition-registry.d.ts +1 -1
  48. package/lib/browser/task-definition-registry.d.ts.map +1 -1
  49. package/lib/browser/task-definition-registry.js +12 -15
  50. package/lib/browser/task-definition-registry.js.map +1 -1
  51. package/lib/browser/task-definition-registry.spec.js +20 -22
  52. package/lib/browser/task-definition-registry.spec.js.map +1 -1
  53. package/lib/browser/task-frontend-contribution.d.ts +5 -5
  54. package/lib/browser/task-frontend-contribution.d.ts.map +1 -1
  55. package/lib/browser/task-frontend-contribution.js +83 -106
  56. package/lib/browser/task-frontend-contribution.js.map +1 -1
  57. package/lib/browser/task-frontend-module.d.ts +1 -1
  58. package/lib/browser/task-frontend-module.d.ts.map +1 -1
  59. package/lib/browser/task-frontend-module.js +64 -66
  60. package/lib/browser/task-frontend-module.js.map +1 -1
  61. package/lib/browser/task-name-resolver.d.ts +3 -3
  62. package/lib/browser/task-name-resolver.d.ts.map +1 -1
  63. package/lib/browser/task-name-resolver.js +11 -16
  64. package/lib/browser/task-name-resolver.js.map +1 -1
  65. package/lib/browser/task-node.d.ts +1 -1
  66. package/lib/browser/task-node.d.ts.map +1 -1
  67. package/lib/browser/task-node.js +1 -5
  68. package/lib/browser/task-node.js.map +1 -1
  69. package/lib/browser/task-problem-matcher-registry.d.ts +2 -2
  70. package/lib/browser/task-problem-matcher-registry.d.ts.map +1 -1
  71. package/lib/browser/task-problem-matcher-registry.js +64 -72
  72. package/lib/browser/task-problem-matcher-registry.js.map +1 -1
  73. package/lib/browser/task-problem-pattern-registry.d.ts +1 -1
  74. package/lib/browser/task-problem-pattern-registry.d.ts.map +1 -1
  75. package/lib/browser/task-problem-pattern-registry.js +30 -37
  76. package/lib/browser/task-problem-pattern-registry.js.map +1 -1
  77. package/lib/browser/task-schema-updater.d.ts +4 -4
  78. package/lib/browser/task-schema-updater.d.ts.map +1 -1
  79. package/lib/browser/task-schema-updater.js +115 -126
  80. package/lib/browser/task-schema-updater.js.map +1 -1
  81. package/lib/browser/task-service.d.ts +14 -14
  82. package/lib/browser/task-service.d.ts.map +1 -1
  83. package/lib/browser/task-service.js +168 -202
  84. package/lib/browser/task-service.js.map +1 -1
  85. package/lib/browser/task-service.spec.d.ts +2 -0
  86. package/lib/browser/task-service.spec.d.ts.map +1 -0
  87. package/lib/browser/task-service.spec.js +91 -0
  88. package/lib/browser/task-service.spec.js.map +1 -0
  89. package/lib/browser/task-source-resolver.d.ts +2 -2
  90. package/lib/browser/task-source-resolver.d.ts.map +1 -1
  91. package/lib/browser/task-source-resolver.js +10 -14
  92. package/lib/browser/task-source-resolver.js.map +1 -1
  93. package/lib/browser/task-templates.js +10 -13
  94. package/lib/browser/task-templates.js.map +1 -1
  95. package/lib/browser/task-terminal-widget-manager.d.ts +2 -2
  96. package/lib/browser/task-terminal-widget-manager.d.ts.map +1 -1
  97. package/lib/browser/task-terminal-widget-manager.js +39 -50
  98. package/lib/browser/task-terminal-widget-manager.js.map +1 -1
  99. package/lib/browser/tasks-monaco-contribution.js +1 -3
  100. package/lib/browser/tasks-monaco-contribution.js.map +1 -1
  101. package/lib/common/index.d.ts +4 -4
  102. package/lib/common/index.d.ts.map +1 -1
  103. package/lib/common/index.js +4 -7
  104. package/lib/common/index.js.map +1 -1
  105. package/lib/common/problem-matcher-protocol.js +17 -20
  106. package/lib/common/problem-matcher-protocol.js.map +1 -1
  107. package/lib/common/process/task-protocol.d.ts +1 -1
  108. package/lib/common/process/task-protocol.d.ts.map +1 -1
  109. package/lib/common/process/task-protocol.js +6 -9
  110. package/lib/common/process/task-protocol.js.map +1 -1
  111. package/lib/common/task-common-module.js +3 -6
  112. package/lib/common/task-common-module.js.map +1 -1
  113. package/lib/common/task-preferences.js +10 -14
  114. package/lib/common/task-preferences.js.map +1 -1
  115. package/lib/common/task-protocol.d.ts +1 -1
  116. package/lib/common/task-protocol.d.ts.map +1 -1
  117. package/lib/common/task-protocol.js +15 -18
  118. package/lib/common/task-protocol.js.map +1 -1
  119. package/lib/common/task-util.js +2 -6
  120. package/lib/common/task-util.js.map +1 -1
  121. package/lib/common/task-watcher.d.ts +1 -1
  122. package/lib/common/task-watcher.d.ts.map +1 -1
  123. package/lib/common/task-watcher.js +12 -15
  124. package/lib/common/task-watcher.js.map +1 -1
  125. package/lib/node/custom/custom-task-runner-backend-module.js +14 -17
  126. package/lib/node/custom/custom-task-runner-backend-module.js.map +1 -1
  127. package/lib/node/custom/custom-task-runner-contribution.d.ts +2 -2
  128. package/lib/node/custom/custom-task-runner-contribution.d.ts.map +1 -1
  129. package/lib/node/custom/custom-task-runner-contribution.js +8 -12
  130. package/lib/node/custom/custom-task-runner-contribution.js.map +1 -1
  131. package/lib/node/custom/custom-task-runner.d.ts +4 -4
  132. package/lib/node/custom/custom-task-runner.d.ts.map +1 -1
  133. package/lib/node/custom/custom-task-runner.js +15 -21
  134. package/lib/node/custom/custom-task-runner.js.map +1 -1
  135. package/lib/node/custom/custom-task.d.ts +4 -4
  136. package/lib/node/custom/custom-task.d.ts.map +1 -1
  137. package/lib/node/custom/custom-task.js +15 -19
  138. package/lib/node/custom/custom-task.js.map +1 -1
  139. package/lib/node/index.d.ts +3 -3
  140. package/lib/node/index.d.ts.map +1 -1
  141. package/lib/node/index.js +3 -6
  142. package/lib/node/index.js.map +1 -1
  143. package/lib/node/process/process-task-runner-backend-module.js +14 -17
  144. package/lib/node/process/process-task-runner-backend-module.js.map +1 -1
  145. package/lib/node/process/process-task-runner-contribution.d.ts +2 -2
  146. package/lib/node/process/process-task-runner-contribution.d.ts.map +1 -1
  147. package/lib/node/process/process-task-runner-contribution.js +8 -12
  148. package/lib/node/process/process-task-runner-contribution.js.map +1 -1
  149. package/lib/node/process/process-task-runner.d.ts +5 -5
  150. package/lib/node/process/process-task-runner.d.ts.map +1 -1
  151. package/lib/node/process/process-task-runner.js +37 -44
  152. package/lib/node/process/process-task-runner.js.map +1 -1
  153. package/lib/node/process/process-task.d.ts +5 -5
  154. package/lib/node/process/process-task.d.ts.map +1 -1
  155. package/lib/node/process/process-task.js +16 -21
  156. package/lib/node/process/process-task.js.map +1 -1
  157. package/lib/node/process/process-task.spec.js +6 -8
  158. package/lib/node/process/process-task.spec.js.map +1 -1
  159. package/lib/node/task-abstract-line-matcher.d.ts +1 -1
  160. package/lib/node/task-abstract-line-matcher.d.ts.map +1 -1
  161. package/lib/node/task-abstract-line-matcher.js +28 -32
  162. package/lib/node/task-abstract-line-matcher.js.map +1 -1
  163. package/lib/node/task-backend-application-contribution.d.ts +1 -1
  164. package/lib/node/task-backend-application-contribution.d.ts.map +1 -1
  165. package/lib/node/task-backend-application-contribution.js +12 -17
  166. package/lib/node/task-backend-application-contribution.js.map +1 -1
  167. package/lib/node/task-backend-module.js +27 -29
  168. package/lib/node/task-backend-module.js.map +1 -1
  169. package/lib/node/task-line-matchers.d.ts +2 -2
  170. package/lib/node/task-line-matchers.d.ts.map +1 -1
  171. package/lib/node/task-line-matchers.js +3 -8
  172. package/lib/node/task-line-matchers.js.map +1 -1
  173. package/lib/node/task-manager.d.ts +2 -2
  174. package/lib/node/task-manager.d.ts.map +1 -1
  175. package/lib/node/task-manager.js +9 -13
  176. package/lib/node/task-manager.js.map +1 -1
  177. package/lib/node/task-problem-collector.d.ts +1 -1
  178. package/lib/node/task-problem-collector.d.ts.map +1 -1
  179. package/lib/node/task-problem-collector.js +9 -13
  180. package/lib/node/task-problem-collector.js.map +1 -1
  181. package/lib/node/task-problem-collector.spec.js +63 -65
  182. package/lib/node/task-problem-collector.spec.js.map +1 -1
  183. package/lib/node/task-runner-protocol.d.ts +2 -2
  184. package/lib/node/task-runner-protocol.d.ts.map +1 -1
  185. package/lib/node/task-runner-protocol.js +1 -4
  186. package/lib/node/task-runner-protocol.js.map +1 -1
  187. package/lib/node/task-runner.d.ts +2 -2
  188. package/lib/node/task-runner.d.ts.map +1 -1
  189. package/lib/node/task-runner.js +13 -20
  190. package/lib/node/task-runner.js.map +1 -1
  191. package/lib/node/task-server.d.ts +5 -5
  192. package/lib/node/task-server.d.ts.map +1 -1
  193. package/lib/node/task-server.js +21 -27
  194. package/lib/node/task-server.js.map +1 -1
  195. package/lib/node/task-server.slow-spec.d.ts.map +1 -1
  196. package/lib/node/task-server.slow-spec.js +58 -61
  197. package/lib/node/task-server.slow-spec.js.map +1 -1
  198. package/lib/node/task.d.ts +2 -2
  199. package/lib/node/task.d.ts.map +1 -1
  200. package/lib/node/task.js +12 -16
  201. package/lib/node/task.js.map +1 -1
  202. package/lib/node/test/task-test-container.js +28 -31
  203. package/lib/node/test/task-test-container.js.map +1 -1
  204. package/package.json +23 -12
  205. package/src/browser/index.ts +6 -6
  206. package/src/browser/process/process-task-contribution.ts +2 -2
  207. package/src/browser/process/process-task-frontend-module.ts +3 -3
  208. package/src/browser/process/process-task-resolver.spec.ts +247 -0
  209. package/src/browser/process/process-task-resolver.ts +44 -27
  210. package/src/browser/provided-task-configurations.spec.ts +4 -4
  211. package/src/browser/provided-task-configurations.ts +3 -3
  212. package/src/browser/quick-open-task.ts +8 -8
  213. package/src/browser/task-configuration-manager.ts +5 -5
  214. package/src/browser/task-configuration-model.ts +1 -1
  215. package/src/browser/task-configurations.ts +6 -6
  216. package/src/browser/task-contribution.ts +1 -1
  217. package/src/browser/task-definition-registry.spec.ts +2 -2
  218. package/src/browser/task-definition-registry.ts +1 -1
  219. package/src/browser/task-frontend-contribution.ts +5 -5
  220. package/src/browser/task-frontend-module.ts +22 -22
  221. package/src/browser/task-name-resolver.ts +3 -3
  222. package/src/browser/task-node.ts +1 -1
  223. package/src/browser/task-problem-matcher-registry.ts +2 -2
  224. package/src/browser/task-problem-pattern-registry.ts +1 -1
  225. package/src/browser/task-schema-updater.ts +6 -6
  226. package/src/browser/task-service.spec.ts +102 -0
  227. package/src/browser/task-service.ts +20 -17
  228. package/src/browser/task-source-resolver.ts +2 -2
  229. package/src/browser/task-terminal-widget-manager.ts +3 -3
  230. package/src/common/index.ts +4 -4
  231. package/src/common/process/task-protocol.ts +1 -1
  232. package/src/common/task-common-module.ts +1 -1
  233. package/src/common/task-protocol.ts +1 -1
  234. package/src/common/task-watcher.ts +1 -1
  235. package/src/node/custom/custom-task-runner-backend-module.ts +4 -4
  236. package/src/node/custom/custom-task-runner-contribution.ts +2 -2
  237. package/src/node/custom/custom-task-runner.ts +4 -4
  238. package/src/node/custom/custom-task.ts +4 -4
  239. package/src/node/index.ts +3 -3
  240. package/src/node/process/process-task-runner-backend-module.ts +4 -4
  241. package/src/node/process/process-task-runner-contribution.ts +2 -2
  242. package/src/node/process/process-task-runner.ts +5 -5
  243. package/src/node/process/process-task.spec.ts +1 -1
  244. package/src/node/process/process-task.ts +5 -5
  245. package/src/node/task-abstract-line-matcher.ts +1 -1
  246. package/src/node/task-backend-application-contribution.ts +1 -1
  247. package/src/node/task-backend-module.ts +9 -9
  248. package/src/node/task-line-matchers.ts +2 -2
  249. package/src/node/task-manager.ts +2 -2
  250. package/src/node/task-problem-collector.spec.ts +2 -2
  251. package/src/node/task-problem-collector.ts +3 -3
  252. package/src/node/task-runner-protocol.ts +2 -2
  253. package/src/node/task-runner.ts +2 -2
  254. package/src/node/task-server.slow-spec.ts +4 -5
  255. package/src/node/task-server.ts +8 -8
  256. package/src/node/task.ts +2 -2
  257. package/src/node/test/task-test-container.ts +1 -1
@@ -13,7 +13,7 @@
13
13
  //
14
14
  // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
15
  // *****************************************************************************
16
- import { TaskConfiguration } from '../common';
16
+ import { TaskConfiguration } from '../common/index.js';
17
17
 
18
18
  export class TaskNode {
19
19
 
@@ -26,8 +26,8 @@ import {
26
26
  ApplyToKind, FileLocationKind, NamedProblemMatcher,
27
27
  ProblemPattern, ProblemMatcher, ProblemMatcherContribution, WatchingMatcher,
28
28
  fromVariableName
29
- } from '../common';
30
- import { ProblemPatternRegistry } from './task-problem-pattern-registry';
29
+ } from '../common/index.js';
30
+ import { ProblemPatternRegistry } from './task-problem-pattern-registry.js';
31
31
  import { Severity } from '@theia/core/lib/common/severity';
32
32
  import { Deferred } from '@theia/core/lib/common/promise-util';
33
33
  import { ILogger } from '@theia/core';
@@ -22,7 +22,7 @@
22
22
  import { Disposable, DisposableCollection } from '@theia/core/lib/common/disposable';
23
23
  import { Deferred } from '@theia/core/lib/common/promise-util';
24
24
  import { injectable, inject, postConstruct, named } from '@theia/core/shared/inversify';
25
- import { NamedProblemPattern, ProblemLocationKind, ProblemPattern, ProblemPatternContribution } from '../common';
25
+ import { NamedProblemPattern, ProblemLocationKind, ProblemPattern, ProblemPatternContribution } from '../common/index.js';
26
26
  import { ILogger } from '@theia/core';
27
27
 
28
28
  @injectable()
@@ -20,21 +20,21 @@
20
20
  * Licensed under the MIT License. See License.txt in the project root for license information.
21
21
  *--------------------------------------------------------------------------------------------*/
22
22
 
23
- import * as Ajv from '@theia/core/shared/ajv';
24
- import debounce = require('p-debounce');
23
+ import Ajv from '@theia/core/shared/ajv';
24
+ import debounce from 'p-debounce';
25
25
  import { postConstruct, injectable, inject } from '@theia/core/shared/inversify';
26
26
  import { JsonSchemaContribution, JsonSchemaDataStore, JsonSchemaRegisterContext } from '@theia/core/lib/browser/json-schema-store';
27
27
  import { deepClone, Emitter, nls } from '@theia/core/lib/common';
28
28
  import { IJSONSchema } from '@theia/core/lib/common/json-schema';
29
29
  import { inputsSchema } from '@theia/variable-resolver/lib/browser/variable-input-schema';
30
30
  import URI from '@theia/core/lib/common/uri';
31
- import { ProblemMatcherRegistry } from './task-problem-matcher-registry';
32
- import { TaskDefinitionRegistry } from './task-definition-registry';
33
- import { TaskServer, asVariableName } from '../common';
31
+ import { ProblemMatcherRegistry } from './task-problem-matcher-registry.js';
32
+ import { TaskDefinitionRegistry } from './task-definition-registry.js';
33
+ import { TaskServer, asVariableName } from '../common/index.js';
34
34
  import { UserStorageUri } from '@theia/userstorage/lib/browser';
35
35
  import { WorkspaceService } from '@theia/workspace/lib/browser';
36
36
  import { JSONObject } from '@theia/core/shared/@lumino/coreutils';
37
- import { taskSchemaId } from '../common/task-preferences';
37
+ import { taskSchemaId } from '../common/task-preferences.js';
38
38
 
39
39
  @injectable()
40
40
  export class TaskSchemaUpdater implements JsonSchemaContribution {
@@ -0,0 +1,102 @@
1
+ // *****************************************************************************
2
+ // Copyright (C) 2026 Md. Mehedi Hasan.
3
+ //
4
+ // This program and the accompanying materials are made available under the
5
+ // terms of the Eclipse Public License v. 2.0 which is available at
6
+ // http://www.eclipse.org/legal/epl-2.0.
7
+ //
8
+ // This Source Code may also be made available under the following Secondary
9
+ // Licenses when the conditions for such availability set forth in the Eclipse
10
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ // with the GNU Classpath Exception which is available at
12
+ // https://www.gnu.org/software/classpath/license.html.
13
+ //
14
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
+ // *****************************************************************************
16
+
17
+ import { enableJSDOM } from '@theia/core/lib/browser/test/jsdom';
18
+ let disableJSDOM = enableJSDOM();
19
+
20
+ import { FrontendApplicationConfigProvider } from '@theia/core/lib/browser/frontend-application-config-provider';
21
+ FrontendApplicationConfigProvider.set({});
22
+
23
+ import * as sinon from 'sinon';
24
+ // TaskService imports xterm, which probes the canvas API during module loading.
25
+ // These tests do not render a terminal, and JSDOM has no canvas backend.
26
+ const canvasContext = sinon.stub(HTMLCanvasElement.prototype, 'getContext');
27
+
28
+ import { expect } from 'chai';
29
+ import { cancelled } from '@theia/core/lib/common/cancellation';
30
+ import { MockLogger } from '@theia/core/lib/common/test/mock-logger';
31
+ import { RunTaskOption, TaskConfiguration, TaskInfo, TaskScope } from '../common/index.js';
32
+ import { TaskResolverRegistry } from './task-contribution.js';
33
+ import { TaskDefinitionRegistry } from './task-definition-registry.js';
34
+ import { TaskService } from './task-service.js';
35
+
36
+ canvasContext.restore();
37
+ disableJSDOM();
38
+
39
+ class TestTaskService extends TaskService {
40
+ override readonly logger = new MockLogger();
41
+ override readonly taskResolverRegistry = new TaskResolverRegistry();
42
+ override readonly taskDefinitionRegistry = new TaskDefinitionRegistry();
43
+ override readonly removeProblemMarkers = sinon.stub<[RunTaskOption?], Promise<void>>().resolves();
44
+ override readonly runResolvedTask = sinon.stub<[TaskConfiguration, RunTaskOption?], Promise<TaskInfo | undefined>>().resolves();
45
+
46
+ resolveAndRun(task: TaskConfiguration): Promise<TaskInfo | undefined> {
47
+ return this.doRunTask(task);
48
+ }
49
+ }
50
+
51
+ describe('TaskService task resolution', () => {
52
+ let service: TestTaskService;
53
+ let logError: sinon.SinonStub;
54
+ const task: TaskConfiguration = { type: 'shell', label: 'input task', _scope: TaskScope.Workspace };
55
+
56
+ before(() => {
57
+ disableJSDOM = enableJSDOM();
58
+ });
59
+
60
+ after(() => {
61
+ disableJSDOM();
62
+ });
63
+
64
+ beforeEach(() => {
65
+ service = new TestTaskService();
66
+ logError = sinon.stub(service.logger, 'error').resolves();
67
+ });
68
+
69
+ for (const stage of ['task', 'execution'] as const) {
70
+ it(`does not launch a task or log an error when the ${stage} resolver is cancelled`, async () => {
71
+ const resolver = { resolveTask: sinon.stub().rejects(cancelled()) };
72
+ if (stage === 'task') {
73
+ service.taskResolverRegistry.registerTaskResolver('shell', resolver);
74
+ } else {
75
+ service.taskResolverRegistry.registerExecutionResolver('shell', resolver);
76
+ }
77
+
78
+ expect(await service.resolveAndRun(task)).to.equal(undefined);
79
+ sinon.assert.calledOnce(resolver.resolveTask);
80
+ sinon.assert.notCalled(service.removeProblemMarkers);
81
+ sinon.assert.notCalled(service.runResolvedTask);
82
+ sinon.assert.notCalled(logError);
83
+
84
+ resolver.resolveTask.resolves(task);
85
+ await service.resolveAndRun(task);
86
+ sinon.assert.calledOnce(service.removeProblemMarkers);
87
+ sinon.assert.calledOnceWithExactly(service.runResolvedTask, task, undefined);
88
+ sinon.assert.notCalled(logError);
89
+ });
90
+ }
91
+
92
+ it('still logs unexpected resolver errors without launching the task', async () => {
93
+ const error = new Error('Unable to resolve task');
94
+ service.taskResolverRegistry.registerExecutionResolver('shell', {
95
+ resolveTask: sinon.stub().rejects(error)
96
+ });
97
+
98
+ expect(await service.resolveAndRun(task)).to.equal(undefined);
99
+ sinon.assert.notCalled(service.runResolvedTask);
100
+ sinon.assert.calledOnceWithExactly(logError, `Error resolving task '${task.label}': ${error}`);
101
+ });
102
+ });
@@ -16,7 +16,7 @@
16
16
 
17
17
  import { ApplicationShell, FrontendApplication, QuickPickValue, WidgetManager, WidgetOpenMode } from '@theia/core/lib/browser';
18
18
  import { open, OpenerService } from '@theia/core/lib/browser/opener-service';
19
- import { CommandService, ILogger, nls } from '@theia/core/lib/common';
19
+ import { CommandService, ILogger, isCancelled, nls } from '@theia/core/lib/common';
20
20
  import { MessageService } from '@theia/core/lib/common/message-service';
21
21
  import { Deferred } from '@theia/core/lib/common/promise-util';
22
22
  import { QuickPickItemOrSeparator, QuickPickService } from '@theia/core/lib/common/quick-pick-service';
@@ -51,24 +51,24 @@ import {
51
51
  TaskOutputProcessedEvent,
52
52
  TaskServer,
53
53
  asVariableName
54
- } from '../common';
55
- import { TaskWatcher } from '../common/task-watcher';
56
- import { ProvidedTaskConfigurations } from './provided-task-configurations';
57
- import { TaskConfigurationClient, TaskConfigurations } from './task-configurations';
58
- import { TaskResolverRegistry } from './task-contribution';
59
- import { TaskDefinitionRegistry } from './task-definition-registry';
60
- import { TaskNameResolver } from './task-name-resolver';
61
- import { TaskSourceResolver } from './task-source-resolver';
62
- import { ProblemMatcherRegistry } from './task-problem-matcher-registry';
63
- import { TaskSchemaUpdater } from './task-schema-updater';
64
- import { TaskConfigurationManager } from './task-configuration-manager';
54
+ } from '../common/index.js';
55
+ import { TaskWatcher } from '../common/task-watcher.js';
56
+ import { ProvidedTaskConfigurations } from './provided-task-configurations.js';
57
+ import { TaskConfigurationClient, TaskConfigurations } from './task-configurations.js';
58
+ import { TaskResolverRegistry } from './task-contribution.js';
59
+ import { TaskDefinitionRegistry } from './task-definition-registry.js';
60
+ import { TaskNameResolver } from './task-name-resolver.js';
61
+ import { TaskSourceResolver } from './task-source-resolver.js';
62
+ import { ProblemMatcherRegistry } from './task-problem-matcher-registry.js';
63
+ import { TaskSchemaUpdater } from './task-schema-updater.js';
64
+ import { TaskConfigurationManager } from './task-configuration-manager.js';
65
65
  import { PROBLEMS_WIDGET_ID, ProblemWidget } from '@theia/markers/lib/browser/problem/problem-widget';
66
- import { TaskNode } from './task-node';
66
+ import { TaskNode } from './task-node.js';
67
67
  import { MonacoWorkspace } from '@theia/monaco/lib/browser/monaco-workspace';
68
- import { TaskTerminalWidgetManager } from './task-terminal-widget-manager';
68
+ import { TaskTerminalWidgetManager } from './task-terminal-widget-manager.js';
69
69
  import { ShellTerminalServerProxy } from '@theia/terminal/lib/common/shell-terminal-protocol';
70
70
  import { Mutex } from 'async-mutex';
71
- import { TaskContextKeyService } from './task-context-key-service';
71
+ import { TaskContextKeyService } from './task-context-key-service.js';
72
72
  import { TerminalPreferences } from '@theia/terminal/lib/common/terminal-preferences';
73
73
 
74
74
  export interface QuickPickProblemMatcherItem {
@@ -383,7 +383,7 @@ export class TaskService implements TaskConfigurationClient {
383
383
  async getConfiguredTasks(token: number): Promise<TaskConfiguration[]> {
384
384
  const invalidTaskConfig = this.taskConfigurations.getInvalidTaskConfigurations()[0];
385
385
  if (invalidTaskConfig) {
386
- const widget = <ProblemWidget>await this.widgetManager.getOrCreateWidget(PROBLEMS_WIDGET_ID);
386
+ const widget = await this.widgetManager.getOrCreateWidget(PROBLEMS_WIDGET_ID) as ProblemWidget;
387
387
  const isProblemsWidgetVisible = widget && widget.isVisible;
388
388
  const currentEditorUri = this.editorManager.currentEditor && this.editorManager.currentEditor.editor.getResourceUri();
389
389
  let isInvalidTaskConfigFileOpen = false;
@@ -862,6 +862,9 @@ export class TaskService implements TaskConfigurationClient {
862
862
  await this.removeProblemMarkers(option);
863
863
  return this.runResolvedTask(taskToRun, option);
864
864
  } catch (error) {
865
+ if (isCancelled(error)) {
866
+ return undefined;
867
+ }
865
868
  const errMessage = `Error resolving task '${task.label}': ${error}`;
866
869
  this.logger.error(errMessage);
867
870
  }
@@ -1083,7 +1086,7 @@ export class TaskService implements TaskConfigurationClient {
1083
1086
  const selectedText: string = this.editorManager.currentEditor.editor.document.getText(selectedRange).trimRight() + '\n';
1084
1087
  let terminal = this.terminalService.lastUsedTerminal;
1085
1088
  if (!terminal || terminal.kind !== 'user' || (await terminal.hasChildProcesses())) {
1086
- terminal = <TerminalWidget>await this.terminalService.newTerminal(<TerminalWidgetFactoryOptions>{ created: nextTerminalCreationToken() });
1089
+ terminal = await this.terminalService.newTerminal(<TerminalWidgetFactoryOptions>{ created: nextTerminalCreationToken() }) as TerminalWidget;
1087
1090
  await terminal.start();
1088
1091
  this.terminalService.open(terminal);
1089
1092
  }
@@ -15,8 +15,8 @@
15
15
  // *****************************************************************************
16
16
 
17
17
  import { inject, injectable } from '@theia/core/shared/inversify';
18
- import { TaskConfiguration, TaskScope } from '../common';
19
- import { TaskDefinitionRegistry } from './task-definition-registry';
18
+ import { TaskConfiguration, TaskScope } from '../common/index.js';
19
+ import { TaskDefinitionRegistry } from './task-definition-registry.js';
20
20
 
21
21
  @injectable()
22
22
  export class TaskSourceResolver {
@@ -19,9 +19,9 @@ import { WidgetOpenerOptions } from '@theia/core/lib/browser';
19
19
  import { TerminalWidget } from '@theia/terminal/lib/browser/base/terminal-widget';
20
20
  import { TerminalWidgetFactoryOptions } from '@theia/terminal/lib/browser/terminal-widget-impl';
21
21
  import { TerminalService } from '@theia/terminal/lib/browser/base/terminal-service';
22
- import { PanelKind, TaskConfiguration, TaskWatcher, TaskExitedEvent, TaskServer, TaskOutputPresentation, TaskInfo } from '../common';
23
- import { ProcessTaskInfo } from '../common/process/task-protocol';
24
- import { TaskDefinitionRegistry } from './task-definition-registry';
22
+ import { PanelKind, TaskConfiguration, TaskWatcher, TaskExitedEvent, TaskServer, TaskOutputPresentation, TaskInfo } from '../common/index.js';
23
+ import { ProcessTaskInfo } from '../common/process/task-protocol.js';
24
+ import { TaskDefinitionRegistry } from './task-definition-registry.js';
25
25
  import { WorkspaceService } from '@theia/workspace/lib/browser/workspace-service';
26
26
  import URI from '@theia/core/lib/common/uri';
27
27
  import { nls } from '@theia/core';
@@ -14,7 +14,7 @@
14
14
  // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
15
  // *****************************************************************************
16
16
 
17
- export * from './task-protocol';
18
- export * from './task-watcher';
19
- export * from './problem-matcher-protocol';
20
- export * from './task-util';
17
+ export * from './task-protocol.js';
18
+ export * from './task-watcher.js';
19
+ export * from './problem-matcher-protocol.js';
20
+ export * from './task-util.js';
@@ -14,7 +14,7 @@
14
14
  // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
15
  // *****************************************************************************
16
16
 
17
- import { TaskConfiguration, TaskInfo } from '../task-protocol';
17
+ import { TaskConfiguration, TaskInfo } from '../task-protocol.js';
18
18
  import { ApplicationError } from '@theia/core/lib/common/application-error';
19
19
 
20
20
  export type ProcessType = 'shell' | 'process';
@@ -15,7 +15,7 @@
15
15
  // *****************************************************************************
16
16
 
17
17
  import { interfaces } from '@theia/core/shared/inversify';
18
- import { TaskWatcher } from './task-watcher';
18
+ import { TaskWatcher } from './task-watcher.js';
19
19
 
20
20
  /**
21
21
  * Create the bindings common to node and browser.
@@ -17,7 +17,7 @@
17
17
  import { Event } from '@theia/core';
18
18
  import { RpcServer } from '@theia/core/lib/common/messaging/proxy-factory';
19
19
  import { IJSONSchema } from '@theia/core/lib/common/json-schema';
20
- import { ProblemMatcher, ProblemMatch, WatchingMatcherContribution, ProblemMatcherContribution, ProblemPatternContribution } from './problem-matcher-protocol';
20
+ import { ProblemMatcher, ProblemMatch, WatchingMatcherContribution, ProblemMatcherContribution, ProblemPatternContribution } from './problem-matcher-protocol.js';
21
21
  export { WatchingMatcherContribution, ProblemMatcherContribution, ProblemPatternContribution };
22
22
 
23
23
  export const taskPath = '/services/task';
@@ -16,7 +16,7 @@
16
16
 
17
17
  import { injectable } from '@theia/core/shared/inversify';
18
18
  import { Emitter, Event } from '@theia/core/lib/common/event';
19
- import { TaskClient, TaskExitedEvent, TaskInfo, TaskOutputProcessedEvent, BackgroundTaskEndedEvent } from './task-protocol';
19
+ import { TaskClient, TaskExitedEvent, TaskInfo, TaskOutputProcessedEvent, BackgroundTaskEndedEvent } from './task-protocol.js';
20
20
 
21
21
  @injectable()
22
22
  export class TaskWatcher {
@@ -15,10 +15,10 @@
15
15
  // *****************************************************************************
16
16
 
17
17
  import { interfaces, Container } from '@theia/core/shared/inversify';
18
- import { CustomTask, TaskFactory, TaskCustomOptions } from './custom-task';
19
- import { CustomTaskRunner } from './custom-task-runner';
20
- import { CustomTaskRunnerContribution } from './custom-task-runner-contribution';
21
- import { TaskRunnerContribution } from '../task-runner';
18
+ import { CustomTask, TaskFactory, TaskCustomOptions } from './custom-task.js';
19
+ import { CustomTaskRunner } from './custom-task-runner.js';
20
+ import { CustomTaskRunnerContribution } from './custom-task-runner-contribution.js';
21
+ import { TaskRunnerContribution } from '../task-runner.js';
22
22
 
23
23
  export function bindCustomTaskRunnerModule(bind: interfaces.Bind): void {
24
24
 
@@ -15,8 +15,8 @@
15
15
  // *****************************************************************************
16
16
 
17
17
  import { injectable, inject } from '@theia/core/shared/inversify';
18
- import { CustomTaskRunner } from './custom-task-runner';
19
- import { TaskRunnerContribution, TaskRunnerRegistry } from '../task-runner';
18
+ import { CustomTaskRunner } from './custom-task-runner.js';
19
+ import { TaskRunnerContribution, TaskRunnerRegistry } from '../task-runner.js';
20
20
 
21
21
  @injectable()
22
22
  export class CustomTaskRunnerContribution implements TaskRunnerContribution {
@@ -14,12 +14,12 @@
14
14
  // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
15
  // *****************************************************************************
16
16
 
17
- import { TaskConfiguration } from '../../common';
18
- import { Task } from '../task';
19
- import { TaskRunner } from '../task-runner';
17
+ import { TaskConfiguration } from '../../common/index.js';
18
+ import { Task } from '../task.js';
19
+ import { TaskRunner } from '../task-runner.js';
20
20
  import { injectable, inject, named } from '@theia/core/shared/inversify';
21
21
  import { ILogger } from '@theia/core';
22
- import { TaskFactory } from './custom-task';
22
+ import { TaskFactory } from './custom-task.js';
23
23
  import {
24
24
  TerminalProcessFactory,
25
25
  Process,
@@ -15,10 +15,10 @@
15
15
  // *****************************************************************************
16
16
 
17
17
  import { injectable, inject, named } from '@theia/core/shared/inversify';
18
- import { ILogger, MaybePromise } from '@theia/core/lib/common/';
19
- import { Task, TaskOptions } from '../task';
20
- import { TaskManager } from '../task-manager';
21
- import { TaskInfo } from '../../common/task-protocol';
18
+ import { ILogger, MaybePromise } from '@theia/core/lib/common';
19
+ import { Task, TaskOptions } from '../task.js';
20
+ import { TaskManager } from '../task-manager.js';
21
+ import { TaskInfo } from '../../common/task-protocol.js';
22
22
  import { Process } from '@theia/process/lib/node';
23
23
 
24
24
  export const TaskCustomOptions = Symbol('TaskCustomOptions');
package/src/node/index.ts CHANGED
@@ -14,6 +14,6 @@
14
14
  // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
15
  // *****************************************************************************
16
16
 
17
- export * from './task';
18
- export * from './task-runner';
19
- export * from './task-manager';
17
+ export * from './task.js';
18
+ export * from './task-runner.js';
19
+ export * from './task-manager.js';
@@ -15,10 +15,10 @@
15
15
  // *****************************************************************************
16
16
 
17
17
  import { interfaces, Container } from '@theia/core/shared/inversify';
18
- import { ProcessTask, TaskFactory, TaskProcessOptions } from './process-task';
19
- import { ProcessTaskRunner } from './process-task-runner';
20
- import { ProcessTaskRunnerContribution } from './process-task-runner-contribution';
21
- import { TaskRunnerContribution } from '../task-runner';
18
+ import { ProcessTask, TaskFactory, TaskProcessOptions } from './process-task.js';
19
+ import { ProcessTaskRunner } from './process-task-runner.js';
20
+ import { ProcessTaskRunnerContribution } from './process-task-runner-contribution.js';
21
+ import { TaskRunnerContribution } from '../task-runner.js';
22
22
 
23
23
  export function bindProcessTaskRunnerModule(bind: interfaces.Bind): void {
24
24
 
@@ -15,8 +15,8 @@
15
15
  // *****************************************************************************
16
16
 
17
17
  import { injectable, inject } from '@theia/core/shared/inversify';
18
- import { ProcessTaskRunner } from './process-task-runner';
19
- import { TaskRunnerContribution, TaskRunnerRegistry } from '../task-runner';
18
+ import { ProcessTaskRunner } from './process-task-runner.js';
19
+ import { TaskRunnerContribution, TaskRunnerRegistry } from '../task-runner.js';
20
20
 
21
21
  @injectable()
22
22
  export class ProcessTaskRunnerContribution implements TaskRunnerContribution {
@@ -33,11 +33,11 @@ import {
33
33
  import {
34
34
  ShellQuotedString, ShellQuotingFunctions, BashQuotingFunctions, CmdQuotingFunctions, PowershellQuotingFunctions, createShellCommandLine, ShellQuoting,
35
35
  } from '@theia/process/lib/common/shell-quoting';
36
- import { TaskFactory } from './process-task';
37
- import { TaskRunner } from '../task-runner-protocol';
38
- import { Task } from '../task';
39
- import { TaskConfiguration } from '../../common/task-protocol';
40
- import { ProcessTaskError, CommandOptions } from '../../common/process/task-protocol';
36
+ import { TaskFactory } from './process-task.js';
37
+ import { TaskRunner } from '../task-runner-protocol.js';
38
+ import { Task } from '../task.js';
39
+ import { TaskConfiguration } from '../../common/task-protocol.js';
40
+ import { ProcessTaskError, CommandOptions } from '../../common/process/task-protocol.js';
41
41
  import * as fs from 'fs';
42
42
  import { ShellProcess } from '@theia/terminal/lib/node/shell-process';
43
43
 
@@ -15,7 +15,7 @@
15
15
  // *****************************************************************************
16
16
 
17
17
  import { expect } from 'chai';
18
- import { removeAnsiEscapeCodes } from './process-task';
18
+ import { removeAnsiEscapeCodes } from './process-task.js';
19
19
 
20
20
  describe('removeAnsiEscapeCodes function', () => {
21
21
  it('should remove all end line and color codes', () => {
@@ -20,12 +20,12 @@
20
20
  *--------------------------------------------------------------------------------------------*/
21
21
 
22
22
  import { injectable, inject, named } from '@theia/core/shared/inversify';
23
- import { ILogger } from '@theia/core/lib/common/';
23
+ import { ILogger } from '@theia/core/lib/common';
24
24
  import { Process, IProcessExitEvent } from '@theia/process/lib/node';
25
- import { Task, TaskOptions } from '../task';
26
- import { TaskManager } from '../task-manager';
27
- import { ProcessType, ProcessTaskInfo } from '../../common/process/task-protocol';
28
- import { TaskExitedEvent } from '../../common/task-protocol';
25
+ import { Task, TaskOptions } from '../task.js';
26
+ import { TaskManager } from '../task-manager.js';
27
+ import { ProcessType, ProcessTaskInfo } from '../../common/process/task-protocol.js';
28
+ import { TaskExitedEvent } from '../../common/task-protocol.js';
29
29
 
30
30
  // copied from https://github.com/microsoft/vscode/blob/1.79.0/src/vs/base/common/strings.ts#L736
31
31
  const CSI_SEQUENCE = /(:?\x1b\[|\x9B)[=?>!]?[\d;:]*["$#'* ]?[a-zA-Z@^`{}|~]/g;
@@ -24,7 +24,7 @@ import { Diagnostic, DiagnosticSeverity, Range } from '@theia/core/shared/vscode
24
24
  import {
25
25
  FileLocationKind, ProblemMatcher, ProblemPattern,
26
26
  ProblemMatch, ProblemMatchData, ProblemLocationKind
27
- } from '../common/problem-matcher-protocol';
27
+ } from '../common/problem-matcher-protocol.js';
28
28
  import URI from '@theia/core/lib/common/uri';
29
29
  import { Severity } from '@theia/core/lib/common/severity';
30
30
  import { MAX_SAFE_INTEGER } from '@theia/core/lib/common/numbers';
@@ -17,7 +17,7 @@
17
17
  import { injectable, inject, named } from '@theia/core/shared/inversify';
18
18
  import { ContributionProvider } from '@theia/core';
19
19
  import { BackendApplicationContribution } from '@theia/core/lib/node';
20
- import { TaskRunnerContribution, TaskRunnerRegistry } from './task-runner';
20
+ import { TaskRunnerContribution, TaskRunnerRegistry } from './task-runner.js';
21
21
 
22
22
  @injectable()
23
23
  export class TaskBackendApplicationContribution implements BackendApplicationContribution {
@@ -18,15 +18,15 @@ import { ContainerModule } from '@theia/core/shared/inversify';
18
18
  import { bindRootContributionProvider } from '@theia/core';
19
19
  import { ConnectionHandler, RpcConnectionHandler } from '@theia/core/lib/common/messaging';
20
20
  import { BackendApplicationContribution } from '@theia/core/lib/node';
21
- import { bindProcessTaskRunnerModule } from './process/process-task-runner-backend-module';
22
- import { bindCustomTaskRunnerModule } from './custom/custom-task-runner-backend-module';
23
- import { TaskBackendApplicationContribution } from './task-backend-application-contribution';
24
- import { TaskManager } from './task-manager';
25
- import { TaskRunnerContribution, TaskRunnerRegistry } from './task-runner';
26
- import { TaskServerImpl } from './task-server';
27
- import { createCommonBindings } from '../common/task-common-module';
28
- import { TaskClient, TaskServer, taskPath } from '../common';
29
- import { bindTaskPreferences } from '../common/task-preferences';
21
+ import { bindProcessTaskRunnerModule } from './process/process-task-runner-backend-module.js';
22
+ import { bindCustomTaskRunnerModule } from './custom/custom-task-runner-backend-module.js';
23
+ import { TaskBackendApplicationContribution } from './task-backend-application-contribution.js';
24
+ import { TaskManager } from './task-manager.js';
25
+ import { TaskRunnerContribution, TaskRunnerRegistry } from './task-runner.js';
26
+ import { TaskServerImpl } from './task-server.js';
27
+ import { createCommonBindings } from '../common/task-common-module.js';
28
+ import { TaskClient, TaskServer, taskPath } from '../common/index.js';
29
+ import { bindTaskPreferences } from '../common/task-preferences.js';
30
30
 
31
31
  export default new ContainerModule(bind => {
32
32
 
@@ -14,8 +14,8 @@
14
14
  // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
15
  // *****************************************************************************
16
16
 
17
- import { AbstractLineMatcher } from './task-abstract-line-matcher';
18
- import { ProblemMatcher, ProblemMatch, WatchingPattern } from '../common/problem-matcher-protocol';
17
+ import { AbstractLineMatcher } from './task-abstract-line-matcher.js';
18
+ import { ProblemMatcher, ProblemMatch, WatchingPattern } from '../common/problem-matcher-protocol.js';
19
19
 
20
20
  export class StartStopLineMatcher extends AbstractLineMatcher {
21
21
 
@@ -16,8 +16,8 @@
16
16
  import { inject, injectable, named } from '@theia/core/shared/inversify';
17
17
  import { Emitter, Event, ILogger } from '@theia/core/lib/common';
18
18
  import { BackendApplicationContribution } from '@theia/core/lib/node';
19
- import { Task } from './task';
20
- import { ManagedTaskManager } from '../common';
19
+ import { Task } from './task.js';
20
+ import { ManagedTaskManager } from '../common/index.js';
21
21
 
22
22
  // inspired by process-manager.ts
23
23
 
@@ -17,8 +17,8 @@
17
17
  import { Severity } from '@theia/core/lib/common/severity';
18
18
  import { DiagnosticSeverity } from '@theia/core/shared/vscode-languageserver-protocol';
19
19
  import { expect } from 'chai';
20
- import { ApplyToKind, FileLocationKind, ProblemLocationKind, ProblemMatch, ProblemMatchData, ProblemMatcher } from '../common/problem-matcher-protocol';
21
- import { ProblemCollector } from './task-problem-collector';
20
+ import { ApplyToKind, FileLocationKind, ProblemLocationKind, ProblemMatch, ProblemMatchData, ProblemMatcher } from '../common/problem-matcher-protocol.js';
21
+ import { ProblemCollector } from './task-problem-collector.js';
22
22
 
23
23
  const startStopMatcher1: ProblemMatcher = {
24
24
  owner: 'test1',
@@ -14,9 +14,9 @@
14
14
  // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
15
  // *****************************************************************************
16
16
 
17
- import { AbstractLineMatcher } from './task-abstract-line-matcher';
18
- import { ProblemMatcher, ProblemMatch } from '../common/problem-matcher-protocol';
19
- import { StartStopLineMatcher, WatchModeLineMatcher } from './task-line-matchers';
17
+ import { AbstractLineMatcher } from './task-abstract-line-matcher.js';
18
+ import { ProblemMatcher, ProblemMatch } from '../common/problem-matcher-protocol.js';
19
+ import { StartStopLineMatcher, WatchModeLineMatcher } from './task-line-matchers.js';
20
20
 
21
21
  export class ProblemCollector {
22
22
 
@@ -14,8 +14,8 @@
14
14
  // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
15
  // *****************************************************************************
16
16
 
17
- import { TaskConfiguration } from '../common';
18
- import { Task } from './task';
17
+ import { TaskConfiguration } from '../common/index.js';
18
+ import { Task } from './task.js';
19
19
 
20
20
  export const TaskRunner = Symbol('TaskRunner');
21
21
  /**
@@ -16,8 +16,8 @@
16
16
 
17
17
  import { injectable, inject, postConstruct } from '@theia/core/shared/inversify';
18
18
  import { Disposable } from '@theia/core/lib/common/disposable';
19
- import { ProcessTaskRunner } from './process/process-task-runner';
20
- import { TaskRunner } from './task-runner-protocol';
19
+ import { ProcessTaskRunner } from './process/process-task-runner.js';
20
+ import { TaskRunner } from './task-runner-protocol.js';
21
21
  export { TaskRunner };
22
22
 
23
23
  export const TaskRunnerContribution = Symbol('TaskRunnerContribution');
@@ -14,12 +14,11 @@
14
14
  // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
15
  // *****************************************************************************
16
16
 
17
- // tslint:disable-next-line:no-implicit-dependencies
18
17
  import 'reflect-metadata';
19
- import { createTaskTestContainer } from './test/task-test-container';
18
+ import { createTaskTestContainer } from './test/task-test-container.js';
20
19
  import { BackendApplication } from '@theia/core/lib/node/backend-application';
21
- import { TaskExitedEvent, TaskInfo, TaskServer, TaskWatcher, TaskConfiguration } from '../common';
22
- import { ProcessType, ProcessTaskConfiguration } from '../common/process/task-protocol';
20
+ import { TaskExitedEvent, TaskInfo, TaskServer, TaskWatcher, TaskConfiguration } from '../common/index.js';
21
+ import { ProcessType, ProcessTaskConfiguration } from '../common/process/task-protocol.js';
23
22
  import * as http from 'http';
24
23
  import * as https from 'https';
25
24
  import { isWindows, isOSX } from '@theia/core/lib/common/os';
@@ -54,7 +53,7 @@ const script2 = './test-arguments-2.js';
54
53
 
55
54
  // we use test-resources subfolder ('<theia>/packages/task/test-resources/'),
56
55
  // as workspace root, for these tests
57
- const wsRootUri: URI = FileUri.create(__dirname).resolve('../../test-resources');
56
+ const wsRootUri: URI = FileUri.create(import.meta.dirname).resolve('../../test-resources');
58
57
  const wsRoot: string = FileUri.fsPath(wsRootUri);
59
58
 
60
59
  describe('Task server / back-end', function (): void {