Skip to content

Commit

Permalink
chore: fix fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
sylc committed Oct 11, 2024
1 parent c2e859a commit 6d86659
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 11 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/bump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ on:
workflow_dispatch:
inputs:
releaseKind:
description: 'Kind of version bump'
default: 'minor'
description: "Kind of version bump"
default: "minor"
type: choice
options:
- patch
Expand Down Expand Up @@ -43,7 +43,6 @@ jobs:
run: |
deno task release ${{github.event.inputs.releaseKind}}
publish:
runs-on: ubuntu-latest

Expand All @@ -59,4 +58,3 @@ jobs:

- name: Publish package
run: deno publish

2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ jobs:

- name: Verify lint
run: deno lint

- name: Verify ts
run: deno check ./cli.ts
16 changes: 12 additions & 4 deletions cli.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,25 +22,33 @@ Deno.test("semver", () => {
);
assertEquals(
semver.format(
semver.increment(semver.parse("1.0.0"), "prepatch", { prerelease: "canary" }),
semver.increment(semver.parse("1.0.0"), "prepatch", {
prerelease: "canary",
}),
),
"1.0.1-canary.0",
);
assertEquals(
semver.format(
semver.increment(semver.parse("1.0.0-canary.1"), "patch", { prerelease: "canary" }),
semver.increment(semver.parse("1.0.0-canary.1"), "patch", {
prerelease: "canary",
}),
),
"1.0.0",
);
assertEquals(
semver.format(
semver.increment(semver.parse("1.0.0"), "prerelease", { prerelease: "canary" }),
semver.increment(semver.parse("1.0.0"), "prerelease", {
prerelease: "canary",
}),
),
"1.0.1-canary.0",
);
assertEquals(
semver.format(
semver.increment(semver.parse("1.0.1-canary.0"), "prerelease", { prerelease: "canary" }),
semver.increment(semver.parse("1.0.1-canary.0"), "prerelease", {
prerelease: "canary",
}),
),
"1.0.1-canary.1",
);
Expand Down
6 changes: 4 additions & 2 deletions cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ await new Command()
...(JSON.parse(Deno.readTextFileSync(opts.config))),
...config,
};
// deno-lint-ignore no-explicit-any
// deno-lint-ignore no-explicit-any
} catch (err: any) {
if (err.code === "ENOENT" && opts.config !== DEFAULT_CONFIG_PATH) {
log.error(`Cannot find config file at ${opts.config}`);
Expand Down Expand Up @@ -180,7 +180,9 @@ await new Command()

const [latest] = repo.tags;
const from = latest ? latest.version : "0.0.0";
const to = semver.increment(semver.parse(from), release_type, { build: suffix });
const to = semver.increment(semver.parse(from), release_type, {
build: suffix,
});

const integrity = step("Checking the project").start();
await delay(1000);
Expand Down

0 comments on commit 6d86659

Please sign in to comment.