Skip to content

Commit

Permalink
Merge pull request #382 from jontze/chore/update-prettier
Browse files Browse the repository at this point in the history
Update prettier and format files
  • Loading branch information
jontze authored Jul 7, 2023
2 parents f455a66 + 7c26496 commit 9da2832
Show file tree
Hide file tree
Showing 26 changed files with 127 additions and 127 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"@vercel/ncc": "^0.36.1",
"jest": "^27.5.1",
"mock-fs": "^5.2.0",
"prettier": "^2.8.8",
"prettier": "^3.0.0",
"semantic-release": "^19.0.5",
"ts-jest": "^27.1.4",
"ts-node": "^10.9.1",
Expand Down
2 changes: 1 addition & 1 deletion src/mdbook/MdBook.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ describe("MdBook", () => {
spyGetInput.mockReturnValueOnce("latest");
spyPlatform.mockReturnValueOnce("darwin");
expect(() => new MdBook()).toThrowError(
`Unsupported operating system 'darwin'. This action supports only linux.`
`Unsupported operating system 'darwin'. This action supports only linux.`,
);
expect(spyPlatform).toHaveBeenCalledTimes(1);
expect(spyGetInput).toHaveBeenCalledWith("mdbook-version");
Expand Down
4 changes: 2 additions & 2 deletions src/mdbook/MdBook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export class MdBook {
private validateOs() {
if (this.platform !== "linux") {
throw new Error(
`Unsupported operating system '${this.platform}'. This action supports only linux.`
`Unsupported operating system '${this.platform}'. This action supports only linux.`,
);
}
}
Expand All @@ -33,7 +33,7 @@ export class MdBook {
const installer = new Installer(
archivePath,
"mdbook",
this.loader.archiveType
this.loader.archiveType,
);
await installer.install();
}
Expand Down
18 changes: 9 additions & 9 deletions src/mdbook/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ describe("Should run action", () => {
describe("with linkcheck plugin", () => {
beforeEach(() => {
spyGetBooleanInput.mockImplementation(
(activatedPlugin) => activatedPlugin === "use-linkcheck"
(activatedPlugin) => activatedPlugin === "use-linkcheck",
);
});

it("should setup", async () => {
const linkcheckConstructorSpy = jest.spyOn(linkcheckModule, "Linkcheck");
const linkcheckSetupSpy = jest.spyOn(
linkcheckModule.Linkcheck.prototype,
"setup"
"setup",
);

await run();
Expand All @@ -58,15 +58,15 @@ describe("Should run action", () => {
describe("with mermaid plugin", () => {
beforeEach(() => {
spyGetBooleanInput.mockImplementation(
(activatedPlugin) => activatedPlugin === "use-mermaid"
(activatedPlugin) => activatedPlugin === "use-mermaid",
);
});

it("should setup", async () => {
const mermaidConstructorSpy = jest.spyOn(mermaidModule, "Mermaid");
const mermaidSetupSpy = jest.spyOn(
mermaidModule.Mermaid.prototype,
"setup"
"setup",
);

await run();
Expand All @@ -79,7 +79,7 @@ describe("Should run action", () => {
describe("with toc plugin", () => {
beforeEach(() => {
spyGetBooleanInput.mockImplementation(
(activatedPlugin) => activatedPlugin === "use-toc"
(activatedPlugin) => activatedPlugin === "use-toc",
);
});

Expand All @@ -97,7 +97,7 @@ describe("Should run action", () => {
describe("with opengh plugin", () => {
beforeEach(() => {
spyGetBooleanInput.mockImplementation(
(activatedPlugin) => activatedPlugin === "use-opengh"
(activatedPlugin) => activatedPlugin === "use-opengh",
);
});

Expand All @@ -115,15 +115,15 @@ describe("Should run action", () => {
describe("with admonish plugin", () => {
beforeEach(() => {
spyGetBooleanInput.mockImplementation(
(activatedPlugin) => activatedPlugin === "use-admonish"
(activatedPlugin) => activatedPlugin === "use-admonish",
);
});

it("should setup", async () => {
const admonishConstructorSpy = jest.spyOn(admonishModule, "Admonish");
const admonishSetupSpy = jest.spyOn(
admonishModule.Admonish.prototype,
"setup"
"setup",
);

await run();
Expand All @@ -136,7 +136,7 @@ describe("Should run action", () => {
describe("with katex plugin", () => {
beforeEach(() => {
spyGetBooleanInput.mockImplementation(
(activatedPlugin) => activatedPlugin === "use-katex"
(activatedPlugin) => activatedPlugin === "use-katex",
);
});

Expand Down
2 changes: 1 addition & 1 deletion src/mdbook/plugins/Admonish.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe("Admonish", () => {
"tommilligan/mdbook-admonish",
"admonish-version",
"mdbook-admonish",
"unknown-linux-musl"
"unknown-linux-musl",
);
expect(admonish).toBeDefined();
});
Expand Down
2 changes: 1 addition & 1 deletion src/mdbook/plugins/Admonish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export class Admonish extends MdPlugin {
"tommilligan/mdbook-admonish",
"admonish-version",
"mdbook-admonish",
"unknown-linux-musl"
"unknown-linux-musl",
);
}
}
2 changes: 1 addition & 1 deletion src/mdbook/plugins/Katex.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe("Katex", () => {
"lzanini/mdbook-katex",
"katex-version",
"mdbook-katex",
"unknown-linux-musl"
"unknown-linux-musl",
);
expect(katex).toBeDefined();
});
Expand Down
2 changes: 1 addition & 1 deletion src/mdbook/plugins/Katex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export class Katex extends MdPlugin {
"lzanini/mdbook-katex",
"katex-version",
"mdbook-katex",
"unknown-linux-musl"
"unknown-linux-musl",
);
}
}
2 changes: 1 addition & 1 deletion src/mdbook/plugins/Linkcheck.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe("Linkcheck", () => {
"Michael-F-Bryan/mdbook-linkcheck",
"linkcheck-version",
"mdbook-linkcheck",
"unknown-linux-gnu"
"unknown-linux-gnu",
);
expect(linkchecker).toBeDefined();
});
Expand Down
2 changes: 1 addition & 1 deletion src/mdbook/plugins/Linkcheck.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export class Linkcheck extends MdPlugin {
"Michael-F-Bryan/mdbook-linkcheck",
"linkcheck-version",
"mdbook-linkcheck",
"unknown-linux-gnu"
"unknown-linux-gnu",
);
}
}
8 changes: 4 additions & 4 deletions src/mdbook/plugins/MdPlugin.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ describe("MdPlugin", () => {
"repoName",
"test-key",
"platformName",
"binaryName"
"binaryName",
);
expect(plugin).toBeDefined();
expect(spyPlatform).toHaveBeenCalledTimes(1);
Expand All @@ -78,9 +78,9 @@ describe("MdPlugin", () => {
spyGetInput.mockReturnValueOnce("latest");
spyPlatform.mockReturnValueOnce("darwin");
expect(
() => new MdPlugin("repoName", "test-key", "platformName", "binaryName")
() => new MdPlugin("repoName", "test-key", "platformName", "binaryName"),
).toThrowError(
`Unsupported operating system 'darwin'. This plugin supports only linux.`
`Unsupported operating system 'darwin'. This plugin supports only linux.`,
);
expect(spyPlatform).toHaveBeenCalledTimes(1);
expect(spyGetInput).toHaveBeenCalledWith("test-key");
Expand All @@ -94,7 +94,7 @@ describe("MdPlugin", () => {
"repoName",
"test-key",
"platformName",
"binaryName"
"binaryName",
);
await plugin.setup();

Expand Down
6 changes: 3 additions & 3 deletions src/mdbook/plugins/MdPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export class MdPlugin {
private readonly repoName: string,
private readonly versionKey: string,
private readonly binaryName: string,
private readonly binaryPlatformName: string
private readonly binaryPlatformName: string,
) {
this.version = new Version(getInput(this.versionKey));
this.repo = new Repo(this.repoName);
Expand All @@ -27,7 +27,7 @@ export class MdPlugin {
private validateOs() {
if (this.platform !== "linux") {
throw new Error(
`Unsupported operating system '${this.platform}'. This plugin supports only linux.`
`Unsupported operating system '${this.platform}'. This plugin supports only linux.`,
);
}
}
Expand All @@ -39,7 +39,7 @@ export class MdPlugin {
const installer = new Installer(
archivePath,
this.binaryName,
this.loader.archiveType
this.loader.archiveType,
);
await installer.install();
}
Expand Down
2 changes: 1 addition & 1 deletion src/mdbook/plugins/Mermaid.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ describe("Mermaid", () => {
"badboy/mdbook-mermaid",
"mermaid-version",
"mdbook-mermaid",
"unknown-linux-gnu"
"unknown-linux-gnu",
);
expect(mermaid).toBeDefined();
});
Expand Down
2 changes: 1 addition & 1 deletion src/mdbook/plugins/Mermaid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export class Mermaid extends MdPlugin {
"badboy/mdbook-mermaid",
"mermaid-version",
"mdbook-mermaid",
"unknown-linux-gnu"
"unknown-linux-gnu",
);
}
}
2 changes: 1 addition & 1 deletion src/mdbook/plugins/OpenGh.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ describe("OpenGh", () => {
"badboy/mdbook-open-on-gh",
"opengh-version",
"mdbook-open-on-gh",
"unknown-linux-musl"
"unknown-linux-musl",
);
});
});
2 changes: 1 addition & 1 deletion src/mdbook/plugins/OpenGh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export class OpenGh extends MdPlugin {
"badboy/mdbook-open-on-gh",
"opengh-version",
"mdbook-open-on-gh",
"unknown-linux-musl"
"unknown-linux-musl",
);
}
}
2 changes: 1 addition & 1 deletion src/mdbook/plugins/Toc.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe("Toc", () => {
"badboy/mdbook-toc",
"toc-version",
"mdbook-toc",
"unknown-linux-musl"
"unknown-linux-musl",
);
expect(linkchecker).toBeDefined();
});
Expand Down
2 changes: 1 addition & 1 deletion src/mdbook/plugins/Toc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export class Toc extends MdPlugin {
"badboy/mdbook-toc",
"toc-version",
"mdbook-toc",
"unknown-linux-musl"
"unknown-linux-musl",
);
}
}
14 changes: 7 additions & 7 deletions src/utils/Installer.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ describe("Installer", () => {
const installer = new Installer(
"downloadPath/",
"plugin-binary-name",
ARCHIVE_TYPE.ZIP
ARCHIVE_TYPE.ZIP,
);
expect(installer).toBeDefined();
});
Expand All @@ -66,7 +66,7 @@ describe("Installer", () => {
const installer = new Installer(
"downloadPath/",
"plugin-binary-name",
ARCHIVE_TYPE.ZIP
ARCHIVE_TYPE.ZIP,
);
await installer.install();

Expand All @@ -86,7 +86,7 @@ describe("Installer", () => {
const installer = new Installer(
"downloadPath/",
"plugin-binary-name",
ARCHIVE_TYPE.ZIP
ARCHIVE_TYPE.ZIP,
);
await installer.install();

Expand All @@ -105,7 +105,7 @@ describe("Installer", () => {
const installer = new Installer(
"downloadPath/",
"plugin-binary-name",
ARCHIVE_TYPE.ZIP
ARCHIVE_TYPE.ZIP,
);
await installer.install();

Expand All @@ -123,7 +123,7 @@ describe("Installer", () => {
const installer = new Installer(
"downloadPath/",
"plugin-binary-name",
ARCHIVE_TYPE.TAR
ARCHIVE_TYPE.TAR,
);
await installer.install();

Expand All @@ -141,7 +141,7 @@ describe("Installer", () => {
const installer = new Installer(
"downloadPath/",
"plugin-binary-name",
ARCHIVE_TYPE.XAR
ARCHIVE_TYPE.XAR,
);
await installer.install();

Expand All @@ -159,7 +159,7 @@ describe("Installer", () => {
const installer = new Installer(
"downloadPath/",
"plugin-binary-name",
ARCHIVE_TYPE.SEVENZ
ARCHIVE_TYPE.SEVENZ,
);
await installer.install();

Expand Down
2 changes: 1 addition & 1 deletion src/utils/Installer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export class Installer {
constructor(
private readonly downloadPath: string,
private readonly binaryName: string,
private readonly archiveType?: ARCHIVE_TYPE
private readonly archiveType?: ARCHIVE_TYPE,
) {}

private async extractArchive(): Promise<string> {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/Loader.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ describe("Loader", () => {
await loader.downloadBinary();
} catch (err: any) {
expect(err).toEqual(
new Error("No release found with a matching linux binary")
new Error("No release found with a matching linux binary"),
);
}

Expand Down
Loading

0 comments on commit 9da2832

Please sign in to comment.