From 6599158921c9cc7c809355121801194ab4ae191c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 12 Sep 2020 13:28:51 +0900 Subject: [PATCH] chore(deps): update dependency flow-bin to ^0.133.0 (#2509) * chore(deps): update dependency flow-bin to ^0.133.0 [skip netlify] * Update .flowconfig, editor SDKs, and flow-typed * chore(deps): update dependency flow-bin to ^0.133.0 [skip netlify] Co-authored-by: Renovate Bot Co-authored-by: ylemkimon --- .flowconfig | 2 +- .yarn/sdks/eslint/package.json | 2 +- .yarn/sdks/flow-bin/package.json | 2 +- .yarn/sdks/stylelint/package.json | 2 +- .../npm/{jest_v24.x.x.js => jest_v26.x.x.js} | 203 ++++++++++-------- package.json | 2 +- yarn.lock | 10 +- 7 files changed, 120 insertions(+), 103 deletions(-) rename flow-typed/npm/{jest_v24.x.x.js => jest_v26.x.x.js} (93%) diff --git a/.flowconfig b/.flowconfig index 4d58092e..91961148 100644 --- a/.flowconfig +++ b/.flowconfig @@ -1,5 +1,5 @@ [version] -0.132.0 +0.133.0 [ignore] /dist diff --git a/.yarn/sdks/eslint/package.json b/.yarn/sdks/eslint/package.json index 424cfd59..a6c476fe 100644 --- a/.yarn/sdks/eslint/package.json +++ b/.yarn/sdks/eslint/package.json @@ -1,6 +1,6 @@ { "name": "eslint", - "version": "7.7.0-pnpify", + "version": "7.8.1-pnpify", "main": "./lib/api.js", "type": "commonjs" } diff --git a/.yarn/sdks/flow-bin/package.json b/.yarn/sdks/flow-bin/package.json index 1c0f68d6..87f02652 100644 --- a/.yarn/sdks/flow-bin/package.json +++ b/.yarn/sdks/flow-bin/package.json @@ -1,5 +1,5 @@ { "name": "flow-bin", - "version": "0.132.0-pnpify", + "version": "0.133.0-pnpify", "type": "commonjs" } diff --git a/.yarn/sdks/stylelint/package.json b/.yarn/sdks/stylelint/package.json index 6f91fbfd..ef84f52a 100644 --- a/.yarn/sdks/stylelint/package.json +++ b/.yarn/sdks/stylelint/package.json @@ -1,6 +1,6 @@ { "name": "stylelint", - "version": "13.6.1-pnpify", + "version": "13.7.1-pnpify", "main": "lib/index.js", "type": "commonjs" } diff --git a/flow-typed/npm/jest_v24.x.x.js b/flow-typed/npm/jest_v26.x.x.js similarity index 93% rename from flow-typed/npm/jest_v24.x.x.js rename to flow-typed/npm/jest_v26.x.x.js index 7487ebd3..587373b2 100644 --- a/flow-typed/npm/jest_v24.x.x.js +++ b/flow-typed/npm/jest_v26.x.x.js @@ -1,5 +1,5 @@ -// flow-typed signature: 3e71a890e92658d48779f359ce8bf84b -// flow-typed version: cd4a902eba/jest_v24.x.x/flow_>=v0.39.x +// flow-typed signature: e60c7806ec0ddaf4588f438843ef37bd +// flow-typed version: 7afca48d86/jest_v26.x.x/flow_>=v0.104.x type JestMockFn, TReturn> = { (...args: TArguments): TReturn, @@ -22,7 +22,12 @@ type JestMockFn, TReturn> = { * An array that contains all the object results that have been * returned by this mock function call */ - results: Array<{ isThrow: boolean, value: TReturn }>, + results: Array<{ + isThrow: boolean, + value: TReturn, + ... + }>, + ... }, /** * Resets all information stored in the mockFn.mock.calls and @@ -95,6 +100,7 @@ type JestMockFn, TReturn> = { * Sugar for jest.fn().mockImplementationOnce(() => Promise.reject(value)) */ mockRejectedValueOnce(value: TReturn): JestMockFn>, + ... }; type JestAsymmetricEqualityType = { @@ -102,6 +108,7 @@ type JestAsymmetricEqualityType = { * A custom Jasmine equality tester */ asymmetricMatch(value: mixed): boolean, + ... }; type JestCallsType = { @@ -112,6 +119,7 @@ type JestCallsType = { first(): mixed, mostRecent(): mixed, reset(): void, + ... }; type JestClockType = { @@ -119,11 +127,13 @@ type JestClockType = { mockDate(date: Date): void, tick(milliseconds?: number): void, uninstall(): void, + ... }; type JestMatcherResult = { message?: string | (() => string), pass: boolean, + ... }; type JestMatcher = ( @@ -142,6 +152,7 @@ type JestPromiseType = { * matcher can be chained. If the promise is rejected the assertion fails. */ resolves: JestExpectType, + ... }; /** @@ -164,6 +175,7 @@ type JestStyledComponentsMatcherOptions = { media?: string, modifier?: string, supports?: string, + ... }; type JestStyledComponentsMatchersType = { @@ -172,6 +184,7 @@ type JestStyledComponentsMatchersType = { value: JestStyledComponentsMatcherValue, options?: JestStyledComponentsMatcherOptions ): void, + ... }; /** @@ -193,12 +206,12 @@ type EnzymeMatchersType = { toHaveClassName(className: string): void, toHaveHTML(html: string): void, toHaveProp: ((propKey: string, propValue?: any) => void) & - ((props: {}) => void), + ((props: { ... }) => void), toHaveRef(refName: string): void, toHaveState: ((stateKey: string, stateValue?: any) => void) & - ((state: {}) => void), + ((state: { ... }) => void), toHaveStyle: ((styleKey: string, styleValue?: any) => void) & - ((style: {}) => void), + ((style: { ... }) => void), toHaveTagName(tagName: string): void, toHaveText(text: string): void, toHaveValue(value: any): void, @@ -210,6 +223,7 @@ type EnzymeMatchersType = { toMatchSelector(selector: string): void, // 7.x toHaveDisplayName(name: string): void, + ... }; // DOM testing library extensions (jest-dom) @@ -220,6 +234,7 @@ type DomTestingLibraryType = { */ toBeInTheDOM(container?: HTMLElement): void, + // 4.x toBeInTheDocument(): void, toBeVisible(): void, toBeEmpty(): void, @@ -233,13 +248,18 @@ type DomTestingLibraryType = { toHaveAttribute(attr: string, value?: any): void, toHaveClass(...classNames: string[]): void, toHaveFocus(): void, - toHaveFormValues(expectedValues: { [name: string]: any }): void, - toHaveStyle(css: string): void, + toHaveFormValues(expectedValues: { [name: string]: any, ... }): void, + toHaveStyle(css: string | { [name: string]: any, ... }): void, toHaveTextContent( text: string | RegExp, - options?: { normalizeWhitespace: boolean } + options?: {| normalizeWhitespace: boolean |} ): void, toHaveValue(value?: string | string[] | number): void, + + // 5.x + toHaveDisplayValue(value: string | string[]): void, + toBeChecked(): void, + ... }; // Jest JQuery Matchers: https://github.com/unindented/custom-jquery-matchers @@ -254,7 +274,7 @@ type JestJQueryMatchersType = { toHaveText(text: string | RegExp): void, toHaveData(key: string, val?: any): void, toHaveValue(val: any): void, - toHaveCss(css: { [key: string]: any }): void, + toHaveCss(css: { [key: string]: any, ... }): void, toBeChecked(): void, toBeDisabled(): void, toBeEmpty(): void, @@ -266,6 +286,7 @@ type JestJQueryMatchersType = { toBeMatchedBy(sel: string): void, toHaveDescendant(sel: string): void, toHaveDescendantWithText(sel: string, text: string | RegExp): void, + ... }; // Jest Extended Matchers: https://github.com/jest-community/jest-extended @@ -290,78 +311,64 @@ type JestExtendedMatchersType = { * Use .toBeEmpty when checking if a String '', Array [] or Object {} is empty. */ toBeEmpty(): void, - /** * Use .toBeOneOf when checking if a value is a member of a given Array. * @param {Array.<*>} members */ toBeOneOf(members: any[]): void, - /** * Use `.toBeNil` when checking a value is `null` or `undefined`. */ toBeNil(): void, - /** * Use `.toSatisfy` when you want to use a custom matcher by supplying a predicate function that returns a `Boolean`. * @param {Function} predicate */ toSatisfy(predicate: (n: any) => boolean): void, - /** * Use `.toBeArray` when checking if a value is an `Array`. */ toBeArray(): void, - /** * Use `.toBeArrayOfSize` when checking if a value is an `Array` of size x. * @param {Number} x */ toBeArrayOfSize(x: number): void, - /** * Use `.toIncludeAllMembers` when checking if an `Array` contains all of the same members of a given set. * @param {Array.<*>} members */ toIncludeAllMembers(members: any[]): void, - /** * Use `.toIncludeAnyMembers` when checking if an `Array` contains any of the members of a given set. * @param {Array.<*>} members */ toIncludeAnyMembers(members: any[]): void, - /** * Use `.toSatisfyAll` when you want to use a custom matcher by supplying a predicate function that returns a `Boolean` for all values in an array. * @param {Function} predicate */ toSatisfyAll(predicate: (n: any) => boolean): void, - /** * Use `.toBeBoolean` when checking if a value is a `Boolean`. */ toBeBoolean(): void, - /** * Use `.toBeTrue` when checking a value is equal (===) to `true`. */ toBeTrue(): void, - /** * Use `.toBeFalse` when checking a value is equal (===) to `false`. */ toBeFalse(): void, - /** * Use .toBeDate when checking if a value is a Date. */ toBeDate(): void, - /** * Use `.toBeFunction` when checking if a value is a `Function`. */ toBeFunction(): void, - /** * Use `.toHaveBeenCalledBefore` when checking if a `Mock` was called before another `Mock`. * @@ -371,42 +378,34 @@ type JestExtendedMatchersType = { * @param {Mock} mock */ toHaveBeenCalledBefore(mock: JestMockFn): void, - /** * Use `.toBeNumber` when checking if a value is a `Number`. */ toBeNumber(): void, - /** * Use `.toBeNaN` when checking a value is `NaN`. */ toBeNaN(): void, - /** * Use `.toBeFinite` when checking if a value is a `Number`, not `NaN` or `Infinity`. */ toBeFinite(): void, - /** * Use `.toBePositive` when checking if a value is a positive `Number`. */ toBePositive(): void, - /** * Use `.toBeNegative` when checking if a value is a negative `Number`. */ toBeNegative(): void, - /** * Use `.toBeEven` when checking if a value is an even `Number`. */ toBeEven(): void, - /** * Use `.toBeOdd` when checking if a value is an odd `Number`. */ toBeOdd(): void, - /** * Use `.toBeWithin` when checking if a number is in between the given bounds of: start (inclusive) and end (exclusive). * @@ -414,144 +413,122 @@ type JestExtendedMatchersType = { * @param {Number} end */ toBeWithin(start: number, end: number): void, - /** * Use `.toBeObject` when checking if a value is an `Object`. */ toBeObject(): void, - /** * Use `.toContainKey` when checking if an object contains the provided key. * * @param {String} key */ toContainKey(key: string): void, - /** * Use `.toContainKeys` when checking if an object has all of the provided keys. * * @param {Array.} keys */ toContainKeys(keys: string[]): void, - /** * Use `.toContainAllKeys` when checking if an object only contains all of the provided keys. * * @param {Array.} keys */ toContainAllKeys(keys: string[]): void, - /** * Use `.toContainAnyKeys` when checking if an object contains at least one of the provided keys. * * @param {Array.} keys */ toContainAnyKeys(keys: string[]): void, - /** * Use `.toContainValue` when checking if an object contains the provided value. * * @param {*} value */ toContainValue(value: any): void, - /** * Use `.toContainValues` when checking if an object contains all of the provided values. * * @param {Array.<*>} values */ toContainValues(values: any[]): void, - /** * Use `.toContainAllValues` when checking if an object only contains all of the provided values. * * @param {Array.<*>} values */ toContainAllValues(values: any[]): void, - /** * Use `.toContainAnyValues` when checking if an object contains at least one of the provided values. * * @param {Array.<*>} values */ toContainAnyValues(values: any[]): void, - /** * Use `.toContainEntry` when checking if an object contains the provided entry. * * @param {Array.} entry */ toContainEntry(entry: [string, string]): void, - /** * Use `.toContainEntries` when checking if an object contains all of the provided entries. * * @param {Array.>} entries */ toContainEntries(entries: [string, string][]): void, - /** * Use `.toContainAllEntries` when checking if an object only contains all of the provided entries. * * @param {Array.>} entries */ toContainAllEntries(entries: [string, string][]): void, - /** * Use `.toContainAnyEntries` when checking if an object contains at least one of the provided entries. * * @param {Array.>} entries */ toContainAnyEntries(entries: [string, string][]): void, - /** * Use `.toBeExtensible` when checking if an object is extensible. */ toBeExtensible(): void, - /** * Use `.toBeFrozen` when checking if an object is frozen. */ toBeFrozen(): void, - /** * Use `.toBeSealed` when checking if an object is sealed. */ toBeSealed(): void, - /** * Use `.toBeString` when checking if a value is a `String`. */ toBeString(): void, - /** * Use `.toEqualCaseInsensitive` when checking if a string is equal (===) to another ignoring the casing of both strings. * * @param {String} string */ toEqualCaseInsensitive(string: string): void, - /** * Use `.toStartWith` when checking if a `String` starts with a given `String` prefix. * * @param {String} prefix */ toStartWith(prefix: string): void, - /** * Use `.toEndWith` when checking if a `String` ends with a given `String` suffix. * * @param {String} suffix */ toEndWith(suffix: string): void, - /** * Use `.toInclude` when checking if a `String` includes the given `String` substring. * * @param {String} substring */ toInclude(substring: string): void, - /** * Use `.toIncludeRepeated` when checking if a `String` includes the given `String` substring the correct number of times. * @@ -559,13 +536,35 @@ type JestExtendedMatchersType = { * @param {Number} times */ toIncludeRepeated(substring: string, times: number): void, - /** * Use `.toIncludeMultiple` when checking if a `String` includes all of the given substrings. * * @param {Array.} substring */ toIncludeMultiple(substring: string[]): void, + ... +}; + +// Diffing snapshot utility for Jest (snapshot-diff) +// https://github.com/jest-community/snapshot-diff +type SnapshotDiffType = { + /** + * Compare the difference between the actual in the `expect()` + * vs the object inside `valueB` with some extra options. + */ + toMatchDiffSnapshot( + valueB: any, + options?: {| + expand?: boolean, + colors?: boolean, + contextLines?: number, + stablePatchmarks?: boolean, + aAnnotation?: string, + bAnnotation?: string, + |}, + testName?: string + ): void, + ... }; interface JestExpectType { @@ -574,7 +573,8 @@ interface JestExpectType { DomTestingLibraryType & JestJQueryMatchersType & JestStyledComponentsMatchersType & - JestExtendedMatchersType; + JestExtendedMatchersType & + SnapshotDiffType; /** * If you have a mock function, you can use .lastCalledWith to test what * arguments it was last called with. @@ -845,7 +845,7 @@ type JestObjectType = { * Returns the actual module instead of a mock, bypassing all checks on * whether the module should receive a mock implementation or not. */ - requireActual(moduleName: string): any, + requireActual(m: $Flow$ModuleRef | string): T, /** * Returns a mock module instead of the actual module, bypassing all checks * on whether the module should be required normally or not. @@ -856,14 +856,12 @@ type JestObjectType = { * useful to isolate modules where local state might conflict between tests. */ resetModules(): JestObjectType, - /** * Creates a sandbox registry for the modules that are loaded inside the * callback function. This is useful to isolate specific modules for every * test so that local module state doesn't conflict between tests. */ isolateModules(fn: () => void): JestObjectType, - /** * Exhausts the micro-task queue (usually interfaced in node via * process.nextTick). @@ -913,7 +911,7 @@ type JestObjectType = { * (setTimeout, setInterval, clearTimeout, clearInterval, nextTick, * setImmediate and clearImmediate). */ - useFakeTimers(): JestObjectType, + useFakeTimers(mode?: 'modern' | 'legacy'): JestObjectType, /** * Instructs Jest to use the real versions of the standard timer functions. */ @@ -932,16 +930,15 @@ type JestObjectType = { * Note: The default timeout interval is 5 seconds if this method is not called. */ setTimeout(timeout: number): JestObjectType, + ... }; -type JestSpyType = { - calls: JestCallsType, -}; +type JestSpyType = { calls: JestCallsType, ... }; -type JestDoneFn = { - (): void, +type JestDoneFn = {| + (error?: Error): void, fail: (error: Error) => void, -}; +|}; /** Runs this function after every test inside this context */ declare function afterEach( @@ -970,17 +967,14 @@ declare var describe: { * Creates a block that groups together several related tests in one "test suite" */ (name: JestTestName, fn: () => void): void, - /** * Only run this describe block */ only(name: JestTestName, fn: () => void): void, - /** * Skip running this describe block */ skip(name: JestTestName, fn: () => void): void, - /** * each runs this test against array of argument arrays per each run * @@ -993,6 +987,7 @@ declare var describe: { fn?: (...args: Array) => ?Promise, timeout?: number ) => void, + ... }; /** An individual test unit */ @@ -1009,7 +1004,6 @@ declare var it: { fn?: (done: JestDoneFn) => ?Promise, timeout?: number ): void, - /** * Only run this test * @@ -1017,11 +1011,12 @@ declare var it: { * @param {Function} Test * @param {number} Timeout for the test, in milliseconds. */ - only( - name: JestTestName, - fn?: (done: JestDoneFn) => ?Promise, - timeout?: number - ): { + only: {| + ( + name: JestTestName, + fn?: (done: JestDoneFn) => ?Promise, + timeout?: number + ): void, each( ...table: Array | mixed> | [Array, string] ): ( @@ -1029,8 +1024,7 @@ declare var it: { fn?: (...args: Array) => ?Promise, timeout?: number ) => void, - }, - + |}, /** * Skip running this test * @@ -1043,14 +1037,12 @@ declare var it: { fn?: (done: JestDoneFn) => ?Promise, timeout?: number ): void, - /** * Highlight planned tests in the summary output * * @param {String} Name of Test to do */ todo(name: string): void, - /** * Run the test concurrently * @@ -1063,7 +1055,6 @@ declare var it: { fn?: (done: JestDoneFn) => ?Promise, timeout?: number ): void, - /** * each runs this test against array of argument arrays per each run * @@ -1076,6 +1067,7 @@ declare var it: { fn?: (...args: Array) => ?Promise, timeout?: number ) => void, + ... }; declare function fit( @@ -1095,16 +1087,37 @@ declare var xit: typeof it; declare var xtest: typeof it; type JestPrettyFormatColors = { - comment: { close: string, open: string }, - content: { close: string, open: string }, - prop: { close: string, open: string }, - tag: { close: string, open: string }, - value: { close: string, open: string }, + comment: { + close: string, + open: string, + ... + }, + content: { + close: string, + open: string, + ... + }, + prop: { + close: string, + open: string, + ... + }, + tag: { + close: string, + open: string, + ... + }, + value: { + close: string, + open: string, + ... + }, + ... }; -type JestPrettyFormatIndent = string => string; +type JestPrettyFormatIndent = (string) => string; type JestPrettyFormatRefs = Array; -type JestPrettyFormatPrint = any => string; +type JestPrettyFormatPrint = (any) => string; type JestPrettyFormatStringOrNull = string | null; type JestPrettyFormatOptions = {| @@ -1135,7 +1148,8 @@ type JestPrettyFormatPlugin = { opts: JestPrettyFormatOptions, colors: JestPrettyFormatColors ) => string, - test: any => boolean, + test: (any) => boolean, + ... }; type JestPrettyFormatPlugins = Array; @@ -1151,10 +1165,10 @@ declare var expect: { DomTestingLibraryType & JestJQueryMatchersType & JestStyledComponentsMatchersType & - JestExtendedMatchersType, - + JestExtendedMatchersType & + SnapshotDiffType, /** Add additional Jasmine matchers to Jest's roster */ - extend(matchers: { [name: string]: JestMatcher }): void, + extend(matchers: { [name: string]: JestMatcher, ... }): void, /** Add a module that formats application-specific data structures. */ addSnapshotSerializer(pluginModule: JestPrettyFormatPlugin): void, assertions(expectedAssertions: number): void, @@ -1168,10 +1182,12 @@ declare var expect: { stringMatching(value: string | RegExp): string, not: { arrayContaining: (value: $ReadOnlyArray) => Array, - objectContaining: (value: {}) => Object, + objectContaining: (value: { ... }) => Object, stringContaining: (value: string) => string, stringMatching: (value: string | RegExp) => string, + ... }, + ... }; // TODO handle return type @@ -1195,7 +1211,8 @@ declare var jasmine: { createSpyObj( baseName: string, methodNames: Array - ): { [methodName: string]: JestSpyType }, + ): { [methodName: string]: JestSpyType, ... }, objectContaining(value: Object): Object, stringMatching(value: string): string, + ... }; diff --git a/package.json b/package.json index cebdc872..b673a9c7 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "eslint-plugin-flowtype": "^5.2.0", "eslint-plugin-react": "^7.20.3", "file-loader": "^6.0.0", - "flow-bin": "^0.132.0", + "flow-bin": "^0.133.0", "fs-extra": "^9.0.1", "husky": "^4.2.5", "istanbul-lib-coverage": "^3.0.0", diff --git a/yarn.lock b/yarn.lock index 75e08cf6..0e0ad679 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5345,12 +5345,12 @@ __metadata: languageName: node linkType: hard -"flow-bin@npm:^0.132.0": - version: 0.132.0 - resolution: "flow-bin@npm:0.132.0" +"flow-bin@npm:^0.133.0": + version: 0.133.0 + resolution: "flow-bin@npm:0.133.0" bin: flow: cli.js - checksum: ecaa7ff45608831e4a7634d3232dcb4114733036a58a4cc41403b37cfa073af55d8b7cedc11c308c41527c0728440d35628a62c2dc05d27a2d3f3d4d134132c6 + checksum: b767946fb8763372127d7c7fd013a8c39de2066e59e19210aba17e6e7bb772bdd19f225b90466ca02bcdb2523463d59eb10d15f671d1ea024612219ed9f44fb2 languageName: node linkType: hard @@ -7675,7 +7675,7 @@ fsevents@^1.2.7: eslint-plugin-flowtype: ^5.2.0 eslint-plugin-react: ^7.20.3 file-loader: ^6.0.0 - flow-bin: ^0.132.0 + flow-bin: ^0.133.0 fs-extra: ^9.0.1 husky: ^4.2.5 istanbul-lib-coverage: ^3.0.0