Skip to content

Commit

Permalink
lint: format
Browse files Browse the repository at this point in the history
  • Loading branch information
nadilas committed Feb 15, 2024
1 parent 62f74c1 commit b853609
Show file tree
Hide file tree
Showing 6 changed files with 445 additions and 407 deletions.
6 changes: 5 additions & 1 deletion packages/ogre/src/checkout.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ test("checkout prev commit", async (t) => {
t.is(history.commits.length, 1, "incorrect # of commits");
t.is(head, headerDataHash, `points to wrong commit`);
t.is(repo.branch(), "HEAD", "repo is not in detached state");
t.deepEqual(obj.nested.length, 0, `has a nested object when it shouldn't: ${JSON.stringify(obj)}`)
t.deepEqual(
obj.nested.length,
0,
`has a nested object when it shouldn't: ${JSON.stringify(obj)}`
);
});

test("checkout new branch with simple name", async (t) => {
Expand Down
4 changes: 2 additions & 2 deletions packages/ogre/src/commit.test.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import test from 'ava';
import test from "ava";

import {
addOneStep,
getBaseline,
sumChanges,
testAuthor,
updateHeaderData,
} from './test.utils';
} from "./test.utils";

test("baseline with 1 commit and zero changelog entries", async (t) => {
const [repo] = await getBaseline();
Expand Down
4 changes: 2 additions & 2 deletions packages/ogre/src/commit.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { digest } from "./hash";
import { Operation } from 'fast-json-patch';
import { Operation } from "fast-json-patch";

export interface Commit {
// The hash of the commit
Expand All @@ -19,7 +19,7 @@ export interface Commit {
parent: string | undefined;

// The diff of this commit from the parent
changes: Operation[]
changes: Operation[];

// Commit timestamp with timezone
timestamp: Date;
Expand Down
4 changes: 2 additions & 2 deletions packages/ogre/src/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ export interface Reference {
value: string;
}

export interface History<T extends {[k: string]: any}> {
original: T
export interface History<T extends { [k: string]: any }> {
original: T;
refs: Map<string, Reference>;
commits: Commit[];
}
6 changes: 3 additions & 3 deletions packages/ogre/src/repository.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import test from "ava";

import {Repository} from "./repository";
import { Repository } from "./repository";
import {
addOneStep as addOneNested,
ComplexObject,
Expand Down Expand Up @@ -48,13 +48,13 @@ test("reconstruct with 2 commits", async (t) => {
await repo.commit("header data", testAuthor);

addOneNested(wrapped);
changeEntries++
changeEntries++;
const first = await repo.commit("first nested", testAuthor);

t.is(repo.ref("refs/heads/main"), first, "main is pointing at wrong commit");

addOneNested(wrapped);
changeEntries++
changeEntries++;

const second = await repo.commit("second nested", testAuthor);

Expand Down
Loading

0 comments on commit b853609

Please sign in to comment.