Skip to content

Commit

Permalink
run eslint and prettier again
Browse files Browse the repository at this point in the history
  • Loading branch information
echo-bravo-yahoo committed Oct 29, 2024
1 parent 27e809f commit 3f5d3bd
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 11 deletions.
8 changes: 6 additions & 2 deletions src/commands/schema/push.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,17 @@ async function doPush(argv) {
method: "POST",
});

let message = isStagedPush ? "Stage the above changes?" : "Push the above changes?";
let message = isStagedPush
? "Stage the above changes?"
: "Push the above changes?";
if (response.diff) {
logger.stdout(`Proposed diff:\n`);
logger.stdout(response.diff);
} else {
logger.stdout("No logical changes.");
message = isStagedPush ? "Stage the file contents anyway?" : "Push the file contents anyway?";
message = isStagedPush
? "Stage the file contents anyway?"
: "Push the file contents anyway?";
}
const confirm = container.resolve("confirm");
const confirmed = await confirm({
Expand Down
10 changes: 3 additions & 7 deletions src/lib/db.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,10 @@ export async function makeFaunaRequest({
shouldThrow = true,
}) {
const fetch = container.resolve("fetch");
const routesWithColor = [
"/schema/1/staged/status",
"/schema/1/validate",
];
const routesWithColor = ["/schema/1/staged/status", "/schema/1/validate"];
if (params && argv.color && routesWithColor.includes(path))
params.set("color", "ansi")
if (params && params.sort)
params.sort();
params.set("color", "ansi");
if (params && params.sort) params.sort();
const paramsString = params && params.size ? `?${params.toString()}` : "";
let fullUrl;

Expand Down
2 changes: 1 addition & 1 deletion test/general-cli.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import { expect } from "chai";
import chalk from "chalk";
import { stub } from "sinon";

import { f } from "./helpers.mjs";
import { builtYargs, run } from "../src/cli.mjs";
import { setupTestContainer as setupContainer } from "../src/config/setup-test-container.mjs";
import { f } from "./helpers.mjs";

describe("cli operations", function () {
let container;
Expand Down
5 changes: 4 additions & 1 deletion test/schema/pull.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,10 @@ describe("schema pull", function () {
);
// the version param in the URL is important - we use it for optimistic locking
expect(fetch).to.have.been.calledWith(
buildUrl("/schema/1/staged/status", { version: "194838274939473", color: "ansi" }),
buildUrl("/schema/1/staged/status", {
version: "194838274939473",
color: "ansi",
}),
commonFetchParams,
);
expect(fetch).to.have.been.calledWith(
Expand Down

0 comments on commit 3f5d3bd

Please sign in to comment.