@yume-chan/async-operation-manager
Advanced tools
Comparing version 2.1.0 to 2.1.1
@@ -0,1 +1,5 @@ | ||
# 2.1.1 | ||
* Add ESModule output. | ||
# 2.1.0 | ||
@@ -2,0 +6,0 @@ |
{ | ||
"name": "@yume-chan/async-operation-manager", | ||
"version": "2.1.0", | ||
"version": "2.1.1", | ||
"description": "Utilities to manage RPC operations.", | ||
"keywords": [ | ||
"RPC" | ||
], | ||
"license": "MIT", | ||
"author": { | ||
"name": "Simon Chan", | ||
"email": "cnsimonchan@live.com", | ||
"url": "https://chensi.moe/blog" | ||
}, | ||
"homepage": "https://github.com/yume-chan/typescript-package-scaffold#readme", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/yume-chan/typescript-package-scaffold.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/yume-chan/typescript-package-scaffold/issues" | ||
}, | ||
"main": "lib/index.js", | ||
"types": "lib/index.d.ts", | ||
"directories": { | ||
"test": "test" | ||
}, | ||
"module": "esm/index.js", | ||
"types": "dts/index.d.ts", | ||
"scripts": { | ||
"build": "tsc", | ||
"build": "node scripts/build", | ||
"test": "jest", | ||
@@ -16,21 +31,11 @@ "coverage": "jest --coverage", | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/yume-chan/async-operation-manager.git" | ||
"dependencies": { | ||
"tslib": "2.0.3" | ||
}, | ||
"keywords": [ | ||
"async" | ||
], | ||
"author": "Simon Chan", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/yume-chan/async-operation-manager/issues" | ||
}, | ||
"homepage": "https://github.com/yume-chan/async-operation-manager#readme", | ||
"devDependencies": { | ||
"@types/jest": "26.0.7", | ||
"jest": "26.1.0", | ||
"@types/jest": "26.0.14", | ||
"jest": "26.6.0", | ||
"ts-jest": "26.1.4", | ||
"typescript": "4.0.2" | ||
"typescript": "4.0.3" | ||
} | ||
} |
@@ -0,0 +0,0 @@ # Async Operation Manager |
@@ -1,31 +0,3 @@ | ||
export type PromiseResolverState = 'running' | 'resolved' | 'rejected'; | ||
import { PromiseResolver } from './promise-resolver'; | ||
export class PromiseResolver<T>{ | ||
private _promise: Promise<T>; | ||
public get promise(): Promise<T> { return this._promise; } | ||
private _resolve!: (value: T | PromiseLike<T>) => void; | ||
private _reject!: (reason?: any) => void; | ||
private _state: PromiseResolverState = 'running'; | ||
public get state(): PromiseResolverState { return this._state; } | ||
public constructor() { | ||
this._promise = new Promise<T>((resolve, reject) => { | ||
this._resolve = resolve; | ||
this._reject = reject; | ||
}); | ||
} | ||
public resolve(value: T | PromiseLike<T>): void { | ||
this._resolve(value); | ||
this._state = 'resolved'; | ||
} | ||
public reject(reason?: any): void { | ||
this._reject(reason); | ||
this._state = 'rejected'; | ||
} | ||
} | ||
export default class AsyncOperationManager { | ||
@@ -75,1 +47,3 @@ private operationId: number; | ||
} | ||
export * from './promise-resolver'; |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
20997
19
272
1
1
+ Addedtslib@2.0.3
+ Addedtslib@2.0.3(transitive)