From 04152eaabb3ef6bb2a8f691db152a16f9bc1d996 Mon Sep 17 00:00:00 2001 From: tiddlygit-test Date: Sun, 11 Oct 2020 18:42:16 +0800 Subject: [PATCH] chore: upgrade tiddlywiki --- .../npm/@tiddlygit/tiddlywiki_vx.x.x.js | 18 +- flow-typed/npm/bluebird_v3.x.x.js | 330 ++++++++++++++++++ package-lock.json | 6 +- package.json | 2 +- 4 files changed, 350 insertions(+), 6 deletions(-) create mode 100644 flow-typed/npm/bluebird_v3.x.x.js diff --git a/flow-typed/npm/@tiddlygit/tiddlywiki_vx.x.x.js b/flow-typed/npm/@tiddlygit/tiddlywiki_vx.x.x.js index fc44b8ad..26703f57 100644 --- a/flow-typed/npm/@tiddlygit/tiddlywiki_vx.x.x.js +++ b/flow-typed/npm/@tiddlygit/tiddlywiki_vx.x.x.js @@ -1,5 +1,5 @@ -// flow-typed signature: 6a211634652c2c983c4b0c701eee2488 -// flow-typed version: <>/@tiddlygit/tiddlywiki_v^5.1.23-prerelease.20201003-fix-file-info/flow_v0.135.0 +// flow-typed signature: aa6671de9c1924e9f224b6bde2062598 +// flow-typed version: <>/@tiddlygit/tiddlywiki_v^5.1.23-prerelease.20201011-fix-file-info/flow_v0.135.0 /** * This is an autogenerated libdef stub for: @@ -322,6 +322,10 @@ declare module '@tiddlygit/tiddlywiki/core/modules/filters/fields' { declare module.exports: any; } +declare module '@tiddlygit/tiddlywiki/core/modules/filters/filter' { + declare module.exports: any; +} + declare module '@tiddlygit/tiddlywiki/core/modules/filters/format' { declare module.exports: any; } @@ -474,6 +478,10 @@ declare module '@tiddlygit/tiddlywiki/core/modules/filters/range' { declare module.exports: any; } +declare module '@tiddlygit/tiddlywiki/core/modules/filters/reduce' { + declare module.exports: any; +} + declare module '@tiddlygit/tiddlywiki/core/modules/filters/regexp' { declare module.exports: any; } @@ -2268,6 +2276,9 @@ declare module '@tiddlygit/tiddlywiki/core/modules/filters/field.js' { declare module '@tiddlygit/tiddlywiki/core/modules/filters/fields.js' { declare module.exports: $Exports<'@tiddlygit/tiddlywiki/core/modules/filters/fields'>; } +declare module '@tiddlygit/tiddlywiki/core/modules/filters/filter.js' { + declare module.exports: $Exports<'@tiddlygit/tiddlywiki/core/modules/filters/filter'>; +} declare module '@tiddlygit/tiddlywiki/core/modules/filters/format.js' { declare module.exports: $Exports<'@tiddlygit/tiddlywiki/core/modules/filters/format'>; } @@ -2382,6 +2393,9 @@ declare module '@tiddlygit/tiddlywiki/core/modules/filters/previous.js' { declare module '@tiddlygit/tiddlywiki/core/modules/filters/range.js' { declare module.exports: $Exports<'@tiddlygit/tiddlywiki/core/modules/filters/range'>; } +declare module '@tiddlygit/tiddlywiki/core/modules/filters/reduce.js' { + declare module.exports: $Exports<'@tiddlygit/tiddlywiki/core/modules/filters/reduce'>; +} declare module '@tiddlygit/tiddlywiki/core/modules/filters/regexp.js' { declare module.exports: $Exports<'@tiddlygit/tiddlywiki/core/modules/filters/regexp'>; } diff --git a/flow-typed/npm/bluebird_v3.x.x.js b/flow-typed/npm/bluebird_v3.x.x.js new file mode 100644 index 00000000..81c2c4dd --- /dev/null +++ b/flow-typed/npm/bluebird_v3.x.x.js @@ -0,0 +1,330 @@ +// flow-typed signature: 55f6f471f003e310f0b2cf093203660e +// flow-typed version: 7472df5490/bluebird_v3.x.x/flow_>=v0.104.x + +type Bluebird$RangeError = Error; +type Bluebird$CancellationErrors = Error; +type Bluebird$TimeoutError = Error; +type Bluebird$RejectionError = Error; +type Bluebird$OperationalError = Error; + +type Bluebird$ConcurrencyOption = { concurrency: number, ... }; +type Bluebird$SpreadOption = { spread: boolean, ... }; +type Bluebird$MultiArgsOption = { multiArgs: boolean, ... }; +type Bluebird$BluebirdConfig = { + warnings?: boolean, + longStackTraces?: boolean, + cancellation?: boolean, + monitoring?: boolean, + ... +}; + +declare class Bluebird$PromiseInspection { + isCancelled(): boolean; + isFulfilled(): boolean; + isRejected(): boolean; + pending(): boolean; + reason(): any; + value(): T; +} + +type Bluebird$PromisifyOptions = {| + multiArgs?: boolean, + context: any +|}; + +declare type Bluebird$PromisifyAllOptions = { + suffix?: string, + filter?: ( + name: string, + func: Function, + target?: any, + passesDefaultFilter?: boolean + ) => boolean, + // The promisifier gets a reference to the original method and should return a function which returns a promise + promisifier?: (originalMethod: Function) => () => Bluebird$Promise, + ... +}; + +declare type $Promisable = Promise | T; + +declare class Bluebird$Disposable {} + +declare class Bluebird$Promise<+R> extends Promise { + static RangeError: Class; + static CancellationErrors: Class; + static TimeoutError: Class; + static RejectionError: Class; + static OperationalError: Class; + + static Defer: Class; + static PromiseInspection: Class>; + + static all>(promises: Promise): Bluebird$Promise< + $TupleMap(p: Promise | V) => V> + >; + static all>(promises: T): Bluebird$Promise< + $TupleMap(p: Promise | V) => V> + >; + static props( + input: Object | Map<*, *> | $Promisable> + ): Bluebird$Promise<*>; + static any>( + Promises: Iterable | $Promisable> + ): Bluebird$Promise; + static race>( + Promises: Iterable | $Promisable> + ): Bluebird$Promise; + static reject(error?: any): Bluebird$Promise; + static resolve(): Bluebird$Promise; + static resolve(object: Promise): Bluebird$Promise; + static resolve(object: T): Bluebird$Promise; + static some>( + Promises: Iterable | $Promisable>, + count: number + ): Bluebird$Promise>; + static join( + value1: $Promisable, + handler: (a: A) => $Promisable + ): Bluebird$Promise; + static join( + value1: $Promisable, + value2: $Promisable, + handler: (a: A, b: B) => $Promisable + ): Bluebird$Promise; + static join( + value1: $Promisable, + value2: $Promisable, + value3: $Promisable, + handler: (a: A, b: B, c: C) => $Promisable + ): Bluebird$Promise; + static map>( + Promises: Iterable | $Promisable>, + mapper: (item: T, index: number, arrayLength: number) => $Promisable, + options?: Bluebird$ConcurrencyOption + ): Bluebird$Promise>; + static mapSeries>( + Promises: Iterable | $Promisable>, + mapper: (item: T, index: number, arrayLength: number) => $Promisable + ): Bluebird$Promise>; + static reduce>( + Promises: Iterable | $Promisable>, + reducer: ( + total: U, + current: T, + index: number, + arrayLength: number + ) => $Promisable, + initialValue?: $Promisable + ): Bluebird$Promise; + static filter>( + Promises: Iterable | $Promisable>, + filterer: ( + item: T, + index: number, + arrayLength: number + ) => $Promisable, + option?: Bluebird$ConcurrencyOption + ): Bluebird$Promise>; + static each>( + Promises: Iterable | $Promisable>, + iterator: ( + item: T, + index: number, + arrayLength: number + ) => $Promisable + ): Bluebird$Promise>; + static try( + fn: () => $Promisable, + args: ?Array, + ctx: ?any + ): Bluebird$Promise; + static attempt( + fn: () => $Promisable, + args: ?Array, + ctx: ?any + ): Bluebird$Promise; + static delay(ms: number, value: $Promisable): Bluebird$Promise; + static delay(ms: number): Bluebird$Promise; + static config(config: Bluebird$BluebirdConfig): void; + + static defer(): Bluebird$Defer; + static setScheduler( + scheduler: (callback: (...args: Array) => void) => void + ): void; + static promisify( + nodeFunction: Function, + receiver?: Bluebird$PromisifyOptions + ): Function; + static promisifyAll( + target: Object | Array, + options?: Bluebird$PromisifyAllOptions + ): void; + + static coroutine(generatorFunction: Function): Function; + static spawn(generatorFunction: Function): Promise; + + // It doesn't seem possible to have type-generics for a variable number of arguments. + // Handle up to 3 arguments, then just give up and accept 'any'. + static method>(fn: () => R): () => Bluebird$Promise; + static method, A>( + fn: (a: A) => R + ): (a: A) => Bluebird$Promise; + static method, A, B>( + fn: (a: A, b: B) => R + ): (a: A, b: B) => Bluebird$Promise; + static method, A, B, C>( + fn: (a: A, b: B, c: C) => R + ): (a: A, b: B, c: C) => Bluebird$Promise; + static method>( + fn: (...args: any) => R + ): (...args: any) => Bluebird$Promise; + + static cast(value: $Promisable): Bluebird$Promise; + // static bind(ctx: any): Bluebird$Promise; + static is(value: any): boolean; + static longStackTraces(): void; + + static onPossiblyUnhandledRejection(handler: (reason: any) => any): void; + static fromCallback( + resolver: (fn: (error: ?Error, value?: T) => any) => any, + options?: Bluebird$MultiArgsOption + ): Bluebird$Promise; + + constructor( + callback: ( + resolve: (result?: $Promisable) => void, + reject: (error?: any) => void, + onCancel?: (fn?: () => void) => void, + ) => mixed + ): void; + then(onFulfill: null | void, onReject: null | void): Bluebird$Promise; + then( + onFulfill: null | void, + onReject: (error: any) => Promise | U + ): Bluebird$Promise; + then( + onFulfill: (value: R) => Promise | U, + onReject: null | void | ((error: any) => Promise | U) + ): Bluebird$Promise; + catch(onReject: null | void): Promise; + catch(onReject?: (error: any) => $Promisable): Bluebird$Promise; + catch( + err: Class, + onReject: (error: ErrorT) => $Promisable + ): Bluebird$Promise; + catch( + err1: Class, + err2: Class, + onReject: (error: ErrorT) => $Promisable + ): Bluebird$Promise; + catch( + err1: Class, + err2: Class, + err3: Class, + onReject: (error: ErrorT) => $Promisable + ): Bluebird$Promise; + caught( + err: Class, + onReject: (error: Error) => $Promisable + ): Bluebird$Promise; + caught( + err1: Class, + err2: Class, + onReject: (error: ErrorT) => $Promisable + ): Bluebird$Promise; + caught( + err1: Class, + err2: Class, + err3: Class, + onReject: (error: ErrorT) => $Promisable + ): Bluebird$Promise; + caught(onReject: (error: any) => $Promisable): Bluebird$Promise; + + error(onReject?: (error: any) => ?$Promisable): Bluebird$Promise; + done( + onFulfill?: (value: R) => mixed, + onReject?: (error: any) => mixed + ): void; + finally(onDone?: (value: R) => mixed): Bluebird$Promise; + lastly(onDone?: (value: R) => mixed): Bluebird$Promise; + tap(onDone?: (value: R) => mixed): Bluebird$Promise; + delay(ms: number): Bluebird$Promise; + timeout(ms: number, message?: string): Bluebird$Promise; + cancel(): void; + + // bind(ctx: any): Bluebird$Promise; + call(propertyName: string, ...args: Array): Bluebird$Promise; + throw(reason: Error): Bluebird$Promise; + thenThrow(reason: Error): Bluebird$Promise; + all(): Bluebird$Promise>; + any(): Bluebird$Promise; + some(count: number): Bluebird$Promise>; + race(): Bluebird$Promise; + map( + mapper: (item: T, index: number, arrayLength: number) => $Promisable, + options?: Bluebird$ConcurrencyOption + ): Bluebird$Promise>; + mapSeries( + mapper: (item: T, index: number, arrayLength: number) => $Promisable + ): Bluebird$Promise>; + reduce( + reducer: ( + total: T, + item: U, + index: number, + arrayLength: number + ) => $Promisable, + initialValue?: $Promisable + ): Bluebird$Promise; + filter( + filterer: ( + item: T, + index: number, + arrayLength: number + ) => $Promisable, + options?: Bluebird$ConcurrencyOption + ): Bluebird$Promise>; + each( + iterator: (item: T, index: number, arrayLength: number) => $Promisable + ): Bluebird$Promise>; + asCallback( + callback: (error: ?any, value?: T) => any, + options?: Bluebird$SpreadOption + ): void; + return(value: T): Bluebird$Promise; + thenReturn(value: T): Bluebird$Promise; + spread(...args: Array): Bluebird$Promise<*>; + + reflect(): Bluebird$Promise>; + + isFulfilled(): boolean; + isRejected(): boolean; + isPending(): boolean; + isResolved(): boolean; + + value(): R; + reason(): any; + + disposer( + disposer: (value: R, promise: Promise<*>) => void + ): Bluebird$Disposable; + + static using( + disposable: Bluebird$Disposable, + handler: (value: T) => $Promisable + ): Bluebird$Promise; + + suppressUnhandledRejections(): void; +} + +declare class Bluebird$Defer { + promise: Bluebird$Promise<*>; + resolve: (value: any) => any; + reject: (value: any) => any; +} + +declare module "bluebird" { + declare module.exports: typeof Bluebird$Promise; + + declare type Disposable = Bluebird$Disposable; +} diff --git a/package-lock.json b/package-lock.json index 7c2ac1a3..62637b4a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4613,9 +4613,9 @@ } }, "@tiddlygit/tiddlywiki": { - "version": "5.1.23-prerelease.20201003-fix-file-info", - "resolved": "https://registry.npmjs.org/@tiddlygit/tiddlywiki/-/tiddlywiki-5.1.23-prerelease.20201003-fix-file-info.tgz", - "integrity": "sha512-CMVq/sOkdctpP2/kCgXeFwBrQ2V62W1Y0teAfJBhWFzyPdf8WJfTpcIw4jZfVvV5BFQkXX0sWsDh5LtFGrEJ4Q==" + "version": "5.1.23-prerelease.20201011-fix-file-info", + "resolved": "https://registry.npmjs.org/@tiddlygit/tiddlywiki/-/tiddlywiki-5.1.23-prerelease.20201011-fix-file-info.tgz", + "integrity": "sha512-qEjvdOmgElQjSZpjUoovEahN8IlThxRtzNcoclZOJzHp6lg9COU+StFDF9LD0f5Gz1JvKGbO1QFoUszRgEZPXA==" }, "@tootallnate/once": { "version": "1.1.2", diff --git a/package.json b/package.json index b893d834..eb2fb7b8 100755 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "author": "Lin Onetwo, Quang Lam ", "dependencies": { "@cliqz/adblocker-electron": "1.18.3", - "@tiddlygit/tiddlywiki": "^5.1.23-prerelease.20201003-fix-file-info", + "@tiddlygit/tiddlywiki": "^5.1.23-prerelease.20201011-fix-file-info", "bluebird": "^3.7.2", "chokidar": "^3.4.2", "darkreader": "4.9.21",