deps: upgrade `prettier@1.19.1` (#1439)
Summary: Most changes due to <https://github.com/prettier/prettier/pull/6694>. Generated with `yarn add prettier@1.19.1 && yarn prettify`. Test Plan: Running `yarn test` suffices. wchargin-branch: prettier-v1.19.1
This commit is contained in:
parent
64834c6874
commit
c07a3fe208
|
@ -66,7 +66,7 @@
|
||||||
"flow-bin": "^0.111.0",
|
"flow-bin": "^0.111.0",
|
||||||
"jest": "^24.8.0",
|
"jest": "^24.8.0",
|
||||||
"jest-fetch-mock": "^2.1.2",
|
"jest-fetch-mock": "^2.1.2",
|
||||||
"prettier": "1.18.2",
|
"prettier": "1.19.1",
|
||||||
"raf": "3.4.1",
|
"raf": "3.4.1",
|
||||||
"react-dev-utils": "^5.0.0",
|
"react-dev-utils": "^5.0.0",
|
||||||
"static-site-generator-webpack-plugin": "^3.4.1",
|
"static-site-generator-webpack-plugin": "^3.4.1",
|
||||||
|
|
|
@ -25,7 +25,10 @@ describe("src/analysis/timeline/timelinePagerank", () => {
|
||||||
const expected = [
|
const expected = [
|
||||||
new Map([[foo.address, 2]]),
|
new Map([[foo.address, 2]]),
|
||||||
new Map([[foo.address, 1]]),
|
new Map([[foo.address, 1]]),
|
||||||
new Map([[foo.address, 0.5], [bar.address, 0.5]]),
|
new Map([
|
||||||
|
[foo.address, 0.5],
|
||||||
|
[bar.address, 0.5],
|
||||||
|
]),
|
||||||
];
|
];
|
||||||
expect(weights).toEqual(expected);
|
expect(weights).toEqual(expected);
|
||||||
});
|
});
|
||||||
|
|
|
@ -34,7 +34,11 @@ describe("core/attribution/markovChain", () => {
|
||||||
|
|
||||||
describe("sparseMarkovChainFromTransitionMatrix", () => {
|
describe("sparseMarkovChainFromTransitionMatrix", () => {
|
||||||
it("works for a simple matrix", () => {
|
it("works for a simple matrix", () => {
|
||||||
const matrix = [[1, 0, 0], [0.25, 0, 0.75], [0.25, 0.75, 0]];
|
const matrix = [
|
||||||
|
[1, 0, 0],
|
||||||
|
[0.25, 0, 0.75],
|
||||||
|
[0.25, 0.75, 0],
|
||||||
|
];
|
||||||
const chain = sparseMarkovChainFromTransitionMatrix(matrix);
|
const chain = sparseMarkovChainFromTransitionMatrix(matrix);
|
||||||
const expected = [
|
const expected = [
|
||||||
{
|
{
|
||||||
|
@ -80,7 +84,11 @@ describe("core/attribution/markovChain", () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it("rejects a matrix with negative entries", () => {
|
it("rejects a matrix with negative entries", () => {
|
||||||
const matrix = [[1, 0, 0], [-0.5, 0.75, 0.75], [0, 0, 1]];
|
const matrix = [
|
||||||
|
[1, 0, 0],
|
||||||
|
[-0.5, 0.75, 0.75],
|
||||||
|
[0, 0, 1],
|
||||||
|
];
|
||||||
expect(() => sparseMarkovChainFromTransitionMatrix(matrix)).toThrow(
|
expect(() => sparseMarkovChainFromTransitionMatrix(matrix)).toThrow(
|
||||||
/positive real.*-0.5/
|
/positive real.*-0.5/
|
||||||
);
|
);
|
||||||
|
@ -101,7 +109,10 @@ describe("core/attribution/markovChain", () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it("rejects a non-stochastic matrix", () => {
|
it("rejects a non-stochastic matrix", () => {
|
||||||
const matrix = [[1, 0], [0.125, 0.625]];
|
const matrix = [
|
||||||
|
[1, 0],
|
||||||
|
[0.125, 0.625],
|
||||||
|
];
|
||||||
expect(() => sparseMarkovChainFromTransitionMatrix(matrix)).toThrow(
|
expect(() => sparseMarkovChainFromTransitionMatrix(matrix)).toThrow(
|
||||||
/sums to 0.75/
|
/sums to 0.75/
|
||||||
);
|
);
|
||||||
|
@ -338,7 +349,10 @@ describe("core/attribution/markovChain", () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it("finds the stationary distribution of a periodic chain", async () => {
|
it("finds the stationary distribution of a periodic chain", async () => {
|
||||||
const chain = sparseMarkovChainFromTransitionMatrix([[0, 1], [1, 0]]);
|
const chain = sparseMarkovChainFromTransitionMatrix([
|
||||||
|
[0, 1],
|
||||||
|
[1, 0],
|
||||||
|
]);
|
||||||
const params: PagerankParams = {
|
const params: PagerankParams = {
|
||||||
chain,
|
chain,
|
||||||
alpha: 0,
|
alpha: 0,
|
||||||
|
@ -359,7 +373,10 @@ describe("core/attribution/markovChain", () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it("returns initial distribution if maxIterations===0", async () => {
|
it("returns initial distribution if maxIterations===0", async () => {
|
||||||
const chain = sparseMarkovChainFromTransitionMatrix([[0, 1], [0, 1]]);
|
const chain = sparseMarkovChainFromTransitionMatrix([
|
||||||
|
[0, 1],
|
||||||
|
[0, 1],
|
||||||
|
]);
|
||||||
const params: PagerankParams = {
|
const params: PagerankParams = {
|
||||||
chain,
|
chain,
|
||||||
alpha: 0,
|
alpha: 0,
|
||||||
|
|
|
@ -994,7 +994,10 @@ describe("core/graph", () => {
|
||||||
Direction.IN,
|
Direction.IN,
|
||||||
[],
|
[],
|
||||||
[],
|
[],
|
||||||
[{node: loop, edge: loop_loop}, {node: foo, edge: foo_loop}]
|
[
|
||||||
|
{node: loop, edge: loop_loop},
|
||||||
|
{node: foo, edge: foo_loop},
|
||||||
|
]
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
it("OUT", () => {
|
it("OUT", () => {
|
||||||
|
@ -1076,7 +1079,10 @@ describe("core/graph", () => {
|
||||||
it("works for a proper prefix match", () => {
|
it("works for a proper prefix match", () => {
|
||||||
edgeExpectNeighbors(
|
edgeExpectNeighbors(
|
||||||
["foo"],
|
["foo"],
|
||||||
[{node: foo, edge: foo_loop}, {node: foo, edge: loop_foo}]
|
[
|
||||||
|
{node: foo, edge: foo_loop},
|
||||||
|
{node: foo, edge: loop_foo},
|
||||||
|
]
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
it("works when there are no matching edges", () => {
|
it("works when there are no matching edges", () => {
|
||||||
|
|
|
@ -29,7 +29,11 @@ export class NodeRowList extends React.PureComponent<NodeRowListProps> {
|
||||||
const {pnd, maxEntriesPerList} = sharedProps;
|
const {pnd, maxEntriesPerList} = sharedProps;
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
{sortBy(nodes, (n) => -NullUtil.get(pnd.get(n)).score, (n) => n)
|
{sortBy(
|
||||||
|
nodes,
|
||||||
|
(n) => -NullUtil.get(pnd.get(n)).score,
|
||||||
|
(n) => n
|
||||||
|
)
|
||||||
.slice(0, maxEntriesPerList)
|
.slice(0, maxEntriesPerList)
|
||||||
.map((node) => (
|
.map((node) => (
|
||||||
<NodeRow
|
<NodeRow
|
||||||
|
|
|
@ -861,9 +861,10 @@ export class Mirror {
|
||||||
case "UNION":
|
case "UNION":
|
||||||
return [
|
return [
|
||||||
b.field("__typename"),
|
b.field("__typename"),
|
||||||
...this._schemaInfo.unionTypes[typename].clauses.map(
|
...this._schemaInfo.unionTypes[
|
||||||
(clause: Schema.Typename) =>
|
typename
|
||||||
b.inlineFragment(clause, [b.field("id")])
|
].clauses.map((clause: Schema.Typename) =>
|
||||||
|
b.inlineFragment(clause, [b.field("id")])
|
||||||
),
|
),
|
||||||
];
|
];
|
||||||
// istanbul ignore next
|
// istanbul ignore next
|
||||||
|
|
|
@ -2195,7 +2195,10 @@ describe("graphql/mirror", () => {
|
||||||
"ORDER BY o_id ASC"
|
"ORDER BY o_id ASC"
|
||||||
)
|
)
|
||||||
.all()
|
.all()
|
||||||
).toEqual([{o_id: "dos", p_rowid: null}, {o_id: "uno", p_rowid: null}]);
|
).toEqual([
|
||||||
|
{o_id: "dos", p_rowid: null},
|
||||||
|
{o_id: "uno", p_rowid: null},
|
||||||
|
]);
|
||||||
expect(
|
expect(
|
||||||
db
|
db
|
||||||
.prepare("SELECT * FROM links ORDER BY parent_id ASC")
|
.prepare("SELECT * FROM links ORDER BY parent_id ASC")
|
||||||
|
|
|
@ -231,7 +231,12 @@ describe("plugins/discourse/mirror", () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
function expectLikesSorted(as, bs) {
|
function expectLikesSorted(as, bs) {
|
||||||
const s = (ls) => sortBy(ls, (x) => x.username, (x) => x.postId);
|
const s = (ls) =>
|
||||||
|
sortBy(
|
||||||
|
ls,
|
||||||
|
(x) => x.username,
|
||||||
|
(x) => x.postId
|
||||||
|
);
|
||||||
expect(s(as)).toEqual(s(bs));
|
expect(s(as)).toEqual(s(bs));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -82,9 +82,9 @@ describe("plugins/github/parseReferences", () => {
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
it("a link with surrounding context", () => {
|
it("a link with surrounding context", () => {
|
||||||
expect(parseReferences("please see sourcecred/example_.repo#12")).toEqual(
|
expect(
|
||||||
[{refType: "BASIC", ref: repoRef}]
|
parseReferences("please see sourcecred/example_.repo#12")
|
||||||
);
|
).toEqual([{refType: "BASIC", ref: repoRef}]);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -295,9 +295,11 @@ export class RelationalView {
|
||||||
issues: expectAllNonNull(json, "issues", json.issues).map((x) =>
|
issues: expectAllNonNull(json, "issues", json.issues).map((x) =>
|
||||||
this._addIssue(address, x)
|
this._addIssue(address, x)
|
||||||
),
|
),
|
||||||
pulls: expectAllNonNull(json, "pullRequests", json.pullRequests).map(
|
pulls: expectAllNonNull(
|
||||||
(x) => this._addPull(address, x)
|
json,
|
||||||
),
|
"pullRequests",
|
||||||
|
json.pullRequests
|
||||||
|
).map((x) => this._addPull(address, x)),
|
||||||
timestampMs: +new Date(json.createdAt),
|
timestampMs: +new Date(json.createdAt),
|
||||||
};
|
};
|
||||||
const raw = N.toRaw(address);
|
const raw = N.toRaw(address);
|
||||||
|
|
|
@ -57,12 +57,36 @@ describe("plugins/github/relationalView", () => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
hasEntityMethods("repos", () => view.repos(), (x) => view.repo(x));
|
hasEntityMethods(
|
||||||
hasEntityMethods("issues", () => view.issues(), (x) => view.issue(x));
|
"repos",
|
||||||
hasEntityMethods("pulls", () => view.pulls(), (x) => view.pull(x));
|
() => view.repos(),
|
||||||
hasEntityMethods("reviews", () => view.reviews(), (x) => view.review(x));
|
(x) => view.repo(x)
|
||||||
hasEntityMethods("comments", () => view.comments(), (x) => view.comment(x));
|
);
|
||||||
hasEntityMethods("commits", () => view.commits(), (x) => view.commit(x));
|
hasEntityMethods(
|
||||||
|
"issues",
|
||||||
|
() => view.issues(),
|
||||||
|
(x) => view.issue(x)
|
||||||
|
);
|
||||||
|
hasEntityMethods(
|
||||||
|
"pulls",
|
||||||
|
() => view.pulls(),
|
||||||
|
(x) => view.pull(x)
|
||||||
|
);
|
||||||
|
hasEntityMethods(
|
||||||
|
"reviews",
|
||||||
|
() => view.reviews(),
|
||||||
|
(x) => view.review(x)
|
||||||
|
);
|
||||||
|
hasEntityMethods(
|
||||||
|
"comments",
|
||||||
|
() => view.comments(),
|
||||||
|
(x) => view.comment(x)
|
||||||
|
);
|
||||||
|
hasEntityMethods(
|
||||||
|
"commits",
|
||||||
|
() => view.commits(),
|
||||||
|
(x) => view.commit(x)
|
||||||
|
);
|
||||||
hasEntityMethods(
|
hasEntityMethods(
|
||||||
"userlikes",
|
"userlikes",
|
||||||
() => view.userlikes(),
|
() => view.userlikes(),
|
||||||
|
|
|
@ -6740,10 +6740,10 @@ prelude-ls@~1.1.2:
|
||||||
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54"
|
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54"
|
||||||
integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=
|
integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=
|
||||||
|
|
||||||
prettier@1.18.2:
|
prettier@1.19.1:
|
||||||
version "1.18.2"
|
version "1.19.1"
|
||||||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.18.2.tgz#6823e7c5900017b4bd3acf46fe9ac4b4d7bda9ea"
|
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb"
|
||||||
integrity sha512-OeHeMc0JhFE9idD4ZdtNibzY0+TPHSpSSb9h8FqtP+YnoZZ1sl8Vc9b1sasjfymH3SonAF4QcA2+mzHPhMvIiw==
|
integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==
|
||||||
|
|
||||||
pretty-format@^24.8.0:
|
pretty-format@^24.8.0:
|
||||||
version "24.8.0"
|
version "24.8.0"
|
||||||
|
|
Loading…
Reference in New Issue