Skip to content

Commit

Permalink
v.3.6.1 #33
Browse files Browse the repository at this point in the history
  • Loading branch information
iRoachie authored Aug 9, 2018
2 parents aa0cfea + 85dd5c4 commit 955305b
Show file tree
Hide file tree
Showing 17 changed files with 2,250 additions and 678 deletions.
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package.json
67 changes: 67 additions & 0 deletions flow-typed/npm/enzyme-adapter-react-16_vx.x.x.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
// flow-typed signature: 7814bad223d2abb492841c50a587c50a
// flow-typed version: <<STUB>>/enzyme-adapter-react-16_v^1.1.0/flow_v0.56.0

/**
* This is an autogenerated libdef stub for:
*
* 'enzyme-adapter-react-16'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/

declare module 'enzyme-adapter-react-16' {
declare module.exports: any;
}

/**
* We include stubs for each file inside this npm package in case you need to
* require those files directly. Feel free to delete any files that aren't
* needed.
*/
declare module 'enzyme-adapter-react-16/build/findCurrentFiberUsingSlowPath' {
declare module.exports: any;
}

declare module 'enzyme-adapter-react-16/build/index' {
declare module.exports: any;
}

declare module 'enzyme-adapter-react-16/build/ReactSixteenAdapter' {
declare module.exports: any;
}

declare module 'enzyme-adapter-react-16/src/findCurrentFiberUsingSlowPath' {
declare module.exports: any;
}

declare module 'enzyme-adapter-react-16/src/index' {
declare module.exports: any;
}

declare module 'enzyme-adapter-react-16/src/ReactSixteenAdapter' {
declare module.exports: any;
}

// Filename aliases
declare module 'enzyme-adapter-react-16/build/findCurrentFiberUsingSlowPath.js' {
declare module.exports: $Exports<'enzyme-adapter-react-16/build/findCurrentFiberUsingSlowPath'>;
}
declare module 'enzyme-adapter-react-16/build/index.js' {
declare module.exports: $Exports<'enzyme-adapter-react-16/build/index'>;
}
declare module 'enzyme-adapter-react-16/build/ReactSixteenAdapter.js' {
declare module.exports: $Exports<'enzyme-adapter-react-16/build/ReactSixteenAdapter'>;
}
declare module 'enzyme-adapter-react-16/src/findCurrentFiberUsingSlowPath.js' {
declare module.exports: $Exports<'enzyme-adapter-react-16/src/findCurrentFiberUsingSlowPath'>;
}
declare module 'enzyme-adapter-react-16/src/index.js' {
declare module.exports: $Exports<'enzyme-adapter-react-16/src/index'>;
}
declare module 'enzyme-adapter-react-16/src/ReactSixteenAdapter.js' {
declare module.exports: $Exports<'enzyme-adapter-react-16/src/ReactSixteenAdapter'>;
}
12 changes: 7 additions & 5 deletions flow-typed/npm/enzyme_v3.x.x.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// flow-typed signature: 687805dabf4b11b8ad99d263c9d3703d
// flow-typed version: f0c7fe5246/enzyme_v3.x.x/flow_>=v0.53.x
// flow-typed signature: 7be2af8800fdadaea6ac0404d256bafc
// flow-typed version: 6ce6a0467c/enzyme_v3.x.x/flow_>=v0.53.x

import * as React from "react";

Expand All @@ -20,6 +20,7 @@ declare module "enzyme" {
findWhere(predicate: PredicateFunction<this>): this,
filter(selector: EnzymeSelector): this,
filterWhere(predicate: PredicateFunction<this>): this,
hostNodes(): this,
contains(nodeOrNodes: NodeOrNodes): boolean,
containsMatchingElement(node: React.Node): boolean,
containsAllMatchingElements(nodes: NodeOrNodes): boolean,
Expand All @@ -42,7 +43,6 @@ declare module "enzyme" {
text(): string,
html(): string,
get(index: number): React.Node,
getNodes(): Array<React.Node>,
getDOMNode(): HTMLElement | HTMLInputElement,
at(index: number): this,
first(): this,
Expand All @@ -58,7 +58,7 @@ declare module "enzyme" {
setContext(context: Object): this,
instance(): React.Component<*, *>,
update(): this,
debug(): string,
debug(options?: Object): string,
type(): string | Function | null,
name(): string,
forEach(fn: (node: this, index: number) => mixed): this,
Expand Down Expand Up @@ -92,7 +92,9 @@ declare module "enzyme" {
options?: ?Object
): ShallowWrapper,
equals(node: React.Node): boolean,
shallow(options?: { context?: Object }): ShallowWrapper
shallow(options?: { context?: Object }): ShallowWrapper,
getElement(): React.Node,
getElements(): Array<React.Node>
}

declare function shallow(
Expand Down
52 changes: 49 additions & 3 deletions flow-typed/npm/jest_v21.x.x.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// flow-typed signature: 107cf7068b8835594e97f938e8848244
// flow-typed version: 8b4dd96654/jest_v21.x.x/flow_>=v0.39.x
// flow-typed signature: 483ecb6e4d88147c244d0b4e27951c1e
// flow-typed version: a5bbe16c29/jest_v21.x.x/flow_>=v0.39.x

type JestMockFn<TArguments: $ReadOnlyArray<*>, TReturn> = {
(...args: TArguments): TReturn,
Expand Down Expand Up @@ -538,14 +538,60 @@ declare var xit: typeof it;
/** A disabled individual test */
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 },
};

type JestPrettyFormatIndent = string => string;
type JestPrettyFormatRefs = Array<any>;
type JestPrettyFormatPrint = any => string;
type JestPrettyFormatStringOrNull = string | null;

type JestPrettyFormatOptions = {|
callToJSON: boolean,
edgeSpacing: string,
escapeRegex: boolean,
highlight: boolean,
indent: number,
maxDepth: number,
min: boolean,
plugins: JestPrettyFormatPlugins,
printFunctionName: boolean,
spacing: string,
theme: {|
comment: string,
content: string,
prop: string,
tag: string,
value: string,
|},
|};

type JestPrettyFormatPlugin = {
print: (
val: any,
serialize: JestPrettyFormatPrint,
indent: JestPrettyFormatIndent,
opts: JestPrettyFormatOptions,
colors: JestPrettyFormatColors,
) => string,
test: any => boolean,
};

type JestPrettyFormatPlugins = Array<JestPrettyFormatPlugin>;

/** The expect function is used every time you want to test a value */
declare var expect: {
/** The object that you want to make assertions against */
(value: any): JestExpectType & JestPromiseType & EnzymeMatchersType,
/** Add additional Jasmine matchers to Jest's roster */
extend(matchers: { [name: string]: JestMatcher }): void,
/** Add a module that formats application-specific data structures. */
addSnapshotSerializer(serializer: (input: Object) => string): void,
addSnapshotSerializer(pluginModule: JestPrettyFormatPlugin): void,
assertions(expectedAssertions: number): void,
hasAssertions(): void,
any(value: mixed): JestAsymmetricEqualityType,
Expand Down
178 changes: 178 additions & 0 deletions flow-typed/npm/prettier_v1.x.x.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,178 @@
// flow-typed signature: 4eed8da2dc730dc33e7710b465eaa44b
// flow-typed version: cc7a557b34/prettier_v1.x.x/flow_>=v0.56.x

declare module "prettier" {
declare type AST = Object;
declare type Doc = Object;
declare type FastPath = Object;

declare type PrettierParserName =
| "babylon"
| "flow"
| "typescript"
| "postcss"
| "css"
| "less"
| "scss"
| "json"
| "graphql"
| "markdown"
| "vue";

declare type PrettierParser = {
[name: PrettierParserName]: (text: string, options?: Object) => AST
};

declare type CustomParser = (
text: string,
parsers: PrettierParser,
options: Options
) => AST;

declare type Options = {|
printWidth?: number,
tabWidth?: number,
useTabs?: boolean,
semi?: boolean,
singleQuote?: boolean,
trailingComma?: "none" | "es5" | "all",
bracketSpacing?: boolean,
jsxBracketSameLine?: boolean,
arrowParens?: "avoid" | "always",
rangeStart?: number,
rangeEnd?: number,
parser?: PrettierParserName | CustomParser,
filepath?: string,
requirePragma?: boolean,
insertPragma?: boolean,
proseWrap?: "always" | "never" | "preserve",
plugins?: Array<string | Plugin>
|};

declare type Plugin = {
languages: SupportLanguage,
parsers: { [parserName: string]: Parser },
printers: { [astFormat: string]: Printer }
};

declare type Parser = {
parse: (
text: string,
parsers: { [parserName: string]: Parser },
options: Object
) => AST,
astFormat: string
};

declare type Printer = {
print: (
path: FastPath,
options: Object,
print: (path: FastPath) => Doc
) => Doc,
embed: (
path: FastPath,
print: (path: FastPath) => Doc,
textToDoc: (text: string, options: Object) => Doc,
options: Object
) => ?Doc
};

declare type CursorOptions = {|
cursorOffset: number,
printWidth?: $PropertyType<Options, "printWidth">,
tabWidth?: $PropertyType<Options, "tabWidth">,
useTabs?: $PropertyType<Options, "useTabs">,
semi?: $PropertyType<Options, "semi">,
singleQuote?: $PropertyType<Options, "singleQuote">,
trailingComma?: $PropertyType<Options, "trailingComma">,
bracketSpacing?: $PropertyType<Options, "bracketSpacing">,
jsxBracketSameLine?: $PropertyType<Options, "jsxBracketSameLine">,
arrowParens?: $PropertyType<Options, "arrowParens">,
parser?: $PropertyType<Options, "parser">,
filepath?: $PropertyType<Options, "filepath">,
requirePragma?: $PropertyType<Options, "requirePragma">,
insertPragma?: $PropertyType<Options, "insertPragma">,
proseWrap?: $PropertyType<Options, "proseWrap">,
plugins?: $PropertyType<Options, "plugins">
|};

declare type CursorResult = {|
formatted: string,
cursorOffset: number
|};

declare type ResolveConfigOptions = {|
useCache?: boolean,
config?: string,
editorconfig?: boolean
|};

declare type SupportLanguage = {
name: string,
since: string,
parsers: Array<string>,
group?: string,
tmScope: string,
aceMode: string,
codemirrorMode: string,
codemirrorMimeType: string,
aliases?: Array<string>,
extensions: Array<string>,
filenames?: Array<string>,
linguistLanguageId: number,
vscodeLanguageIds: Array<string>
};

declare type SupportOption = {|
since: string,
type: "int" | "boolean" | "choice" | "path",
deprecated?: string,
redirect?: SupportOptionRedirect,
description: string,
oppositeDescription?: string,
default: SupportOptionValue,
range?: SupportOptionRange,
choices?: SupportOptionChoice
|};

declare type SupportOptionRedirect = {|
options: string,
value: SupportOptionValue
|};

declare type SupportOptionRange = {|
start: number,
end: number,
step: number
|};

declare type SupportOptionChoice = {|
value: boolean | string,
description?: string,
since?: string,
deprecated?: string,
redirect?: SupportOptionValue
|};

declare type SupportOptionValue = number | boolean | string;

declare type SupportInfo = {|
languages: Array<SupportLanguage>,
options: Array<SupportOption>
|};

declare type Prettier = {|
format: (source: string, options?: Options) => string,
check: (source: string, options?: Options) => boolean,
formatWithCursor: (source: string, options: CursorOptions) => CursorResult,
resolveConfig: {
(filePath: string, options?: ResolveConfigOptions): Promise<?Options>,
sync(filePath: string, options?: ResolveConfigOptions): Promise<?Options>
},
clearConfigCache: () => void,
getSupportInfo: (version?: string) => SupportInfo
|};

declare export default Prettier;
}
Loading

0 comments on commit 955305b

Please sign in to comment.