Skip to content

Commit

Permalink
Upgrade node-abort-controller to 1.2.1 (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
deaz authored Apr 9, 2021
1 parent b3fe31d commit bacbad8
Show file tree
Hide file tree
Showing 18 changed files with 25 additions and 16 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ node_modules
lib
es
yarn-error.log
.idea
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@
"typescript": "^4.0.3"
},
"dependencies": {
"node-abort-controller": "^1.1.0"
"node-abort-controller": "^1.2.1"
}
}
2 changes: 2 additions & 0 deletions src/AbortError.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import {AbortSignal} from 'node-abort-controller';

/**
* Thrown when an abortable function was aborted.
*
Expand Down
1 change: 1 addition & 0 deletions src/abortable.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import {AbortSignal} from 'node-abort-controller';
import {execute} from './execute';

/**
Expand Down
2 changes: 1 addition & 1 deletion src/all.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import AbortController from 'node-abort-controller';
import AbortController, {AbortSignal} from 'node-abort-controller';
import defer = require('defer-promise');
import {AbortError} from './AbortError';
import {all} from './all';
Expand Down
6 changes: 3 additions & 3 deletions src/all.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import AbortController from 'node-abort-controller';
import AbortController, {AbortSignal} from 'node-abort-controller';
import {AbortError, isAbortError} from './AbortError';

/**
Expand All @@ -16,9 +16,9 @@ import {AbortError, isAbortError} from './AbortError';
* The promises returned from `executor` must be abortable, i.e. once
* `innerSignal` is aborted, they must reject with `AbortError` either
* immediately, or after doing any async cleanup.
*
*
* Example:
*
*
* const [result1, result2] = await all(signal, signal => [
* makeRequest(signal, params1),
* makeRequest(signal, params2),
Expand Down
1 change: 1 addition & 0 deletions src/delay.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {execute} from './execute';
import {AbortSignal} from 'node-abort-controller';

/**
* Returns a promise that fulfills after delay and rejects with
Expand Down
1 change: 1 addition & 0 deletions src/execute.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {AbortError} from './AbortError';
import {AbortSignal} from 'node-abort-controller';

/**
* Similar to `new Promise(executor)`, but allows executor to return abort
Expand Down
1 change: 1 addition & 0 deletions src/forever.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import {AbortSignal} from 'node-abort-controller';
import {execute} from './execute';

/**
Expand Down
2 changes: 1 addition & 1 deletion src/race.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import AbortController from 'node-abort-controller';
import AbortController, {AbortSignal} from 'node-abort-controller';
import defer = require('defer-promise');
import {AbortError} from './AbortError';
import {race} from './race';
Expand Down
2 changes: 1 addition & 1 deletion src/race.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import AbortController from 'node-abort-controller';
import AbortController, {AbortSignal} from 'node-abort-controller';
import {AbortError, isAbortError} from './AbortError';

/**
Expand Down
1 change: 1 addition & 0 deletions src/retry.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import {AbortSignal} from 'node-abort-controller';
import {delay} from './delay';
import {rethrowAbortError} from './AbortError';

Expand Down
2 changes: 1 addition & 1 deletion src/run.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import AbortController from 'node-abort-controller';
import AbortController, {AbortSignal} from 'node-abort-controller';
import {catchAbortError} from './AbortError';

/**
Expand Down
2 changes: 1 addition & 1 deletion src/spawn.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import AbortController from 'node-abort-controller';
import AbortController, {AbortSignal} from 'node-abort-controller';
import {spawn} from './spawn';
import {forever} from './forever';
import {delay} from './delay';
Expand Down
2 changes: 1 addition & 1 deletion src/spawn.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import AbortController from 'node-abort-controller';
import AbortController, {AbortSignal} from 'node-abort-controller';
import {AbortError, catchAbortError, isAbortError} from './AbortError';

export type SpawnEffects = {
Expand Down
4 changes: 2 additions & 2 deletions src/waitForEvent.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ test('external abort', async () => {
const eventTarget = new AbortController().signal;
eventTarget.removeEventListener = jest.fn(eventTarget.removeEventListener);

let result: PromiseSettledResult<Event> | undefined;
let result: PromiseSettledResult<any> | undefined;

waitForEvent(signal, eventTarget, 'test').then(
value => {
Expand Down Expand Up @@ -48,7 +48,7 @@ test('fulfill', async () => {
const eventTarget = eventTargetController.signal;
eventTarget.removeEventListener = jest.fn(eventTarget.removeEventListener);

let result: PromiseSettledResult<Event> | undefined;
let result: PromiseSettledResult<any> | undefined;

waitForEvent(signal, eventTarget, 'abort').then(
value => {
Expand Down
1 change: 1 addition & 0 deletions src/waitForEvent.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import {AbortSignal} from 'node-abort-controller';
import {execute} from './execute';

export type EventTargetLike<T> =
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2677,10 +2677,10 @@ nice-try@^1.0.4:
resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366"
integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==

node-abort-controller@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/node-abort-controller/-/node-abort-controller-1.1.0.tgz#8a734a631b022af29963be7245c1483cbb9e070d"
integrity sha512-dEYmUqjtbivotqjraOe8UvhT/poFfog1BQRNsZm/MSEDDESk2cQ1tvD8kGyuN07TM/zoW+n42odL8zTeJupYdQ==
node-abort-controller@^1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/node-abort-controller/-/node-abort-controller-1.2.1.tgz#1eddb57eb8fea734198b11b28857596dc6165708"
integrity sha512-79PYeJuj6S9+yOHirR0JBLFOgjB6sQCir10uN6xRx25iD+ZD4ULqgRn3MwWBRaQGB0vEgReJzWwJo42T1R6YbQ==

node-int64@^0.4.0:
version "0.4.0"
Expand Down

0 comments on commit bacbad8

Please sign in to comment.