Skip to content

Commit 7c2ebb4

Browse files
committed
Fixes build & moves pause* methods into promise
Reworks `pause*` methods to use AbortSignal for timeouts
1 parent f68013e commit 7c2ebb4

File tree

13 files changed

+432
-463
lines changed

13 files changed

+432
-463
lines changed

src/annotations/autolinks.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ import type { ProviderReference } from '../git/models/remoteProvider';
1010
import type { ResourceDescriptor } from '../plus/integrations/integration';
1111
import type { IntegrationId } from '../plus/integrations/providers/models';
1212
import { IssueIntegrationId } from '../plus/integrations/providers/models';
13-
import type { MaybePausedResult } from '../system/cancellation';
1413
import { configuration } from '../system/configuration';
1514
import { fromNow } from '../system/date';
1615
import { debug } from '../system/decorators/log';
1716
import { encodeUrl } from '../system/encoding';
1817
import { join, map } from '../system/iterable';
1918
import { Logger } from '../system/logger';
19+
import type { MaybePausedResult } from '../system/promise';
2020
import { capitalize, encodeHtmlWeak, escapeMarkdown, escapeRegex, getSuperscript } from '../system/string';
2121

2222
const emptyAutolinkMap = Object.freeze(new Map<string, Autolink>());

src/annotations/lineAnnotationController.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,14 @@ import type { Container } from '../container';
55
import { CommitFormatter } from '../git/formatters/commitFormatter';
66
import type { PullRequest } from '../git/models/pullRequest';
77
import { detailsMessage } from '../hovers/hovers';
8-
import type { MaybePausedResult } from '../system/cancellation';
9-
import { pauseOnCancelOrTimeoutMap } from '../system/cancellation';
108
import { configuration } from '../system/configuration';
119
import { debug, log } from '../system/decorators/log';
1210
import { once } from '../system/event';
1311
import { debounce } from '../system/function';
1412
import { Logger } from '../system/logger';
1513
import { getLogScope, setLogScopeExit } from '../system/logger.scope';
16-
import { getSettledValue } from '../system/promise';
14+
import type { MaybePausedResult } from '../system/promise';
15+
import { getSettledValue, pauseOnCancelOrTimeoutMap } from '../system/promise';
1716
import { isTextEditor } from '../system/utils';
1817
import type { LinesChangeEvent, LineState } from '../trackers/lineTracker';
1918
import { getInlineDecoration } from './annotations';

src/hovers/hovers.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,13 @@ import type { PullRequest } from '../git/models/pullRequest';
1414
import { isUncommittedStaged, shortenRevision } from '../git/models/reference';
1515
import type { GitRemote } from '../git/models/remote';
1616
import type { RemoteProvider } from '../git/remotes/remoteProvider';
17-
import { pauseOnCancelOrTimeout, pauseOnCancelOrTimeoutMapTuplePromise } from '../system/cancellation';
1817
import { configuration } from '../system/configuration';
19-
import { cancellable, getSettledValue } from '../system/promise';
18+
import {
19+
cancellable,
20+
getSettledValue,
21+
pauseOnCancelOrTimeout,
22+
pauseOnCancelOrTimeoutMapTuplePromise,
23+
} from '../system/promise';
2024

2125
export async function changesMessage(
2226
container: Container,

src/plus/gk/account/subscriptionService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ import { Commands, urls } from '../../../constants';
2626
import type { Container } from '../../../container';
2727
import { AccountValidationError } from '../../../errors';
2828
import type { RepositoriesChangeEvent } from '../../../git/gitProviderService';
29-
import { pauseOnCancelOrTimeout } from '../../../system/cancellation';
3029
import { executeCommand, registerCommand } from '../../../system/command';
3130
import { configuration } from '../../../system/configuration';
3231
import { setContext } from '../../../system/context';
@@ -39,6 +38,7 @@ import { debounce, once } from '../../../system/function';
3938
import { Logger } from '../../../system/logger';
4039
import { getLogScope, setLogScopeExit } from '../../../system/logger.scope';
4140
import { flatten } from '../../../system/object';
41+
import { pauseOnCancelOrTimeout } from '../../../system/promise';
4242
import { pluralize } from '../../../system/string';
4343
import { openUrl } from '../../../system/utils';
4444
import { satisfies } from '../../../system/version';

src/statusbar/statusBarController.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,14 @@ import type { Container } from '../container';
88
import { CommitFormatter } from '../git/formatters/commitFormatter';
99
import type { PullRequest } from '../git/models/pullRequest';
1010
import { detailsMessage } from '../hovers/hovers';
11-
import type { MaybePausedResult } from '../system/cancellation';
12-
import { pauseOnCancelOrTimeout } from '../system/cancellation';
1311
import { asCommand } from '../system/command';
1412
import { configuration } from '../system/configuration';
1513
import { debug } from '../system/decorators/log';
1614
import { once } from '../system/event';
1715
import { Logger } from '../system/logger';
1816
import { getLogScope } from '../system/logger.scope';
19-
import { getSettledValue } from '../system/promise';
17+
import type { MaybePausedResult } from '../system/promise';
18+
import { getSettledValue, pauseOnCancelOrTimeout } from '../system/promise';
2019
import { isTextEditor } from '../system/utils';
2120
import type { LinesChangeEvent, LineState } from '../trackers/lineTracker';
2221

0 commit comments

Comments
 (0)