Compare commits

..

5 Commits

Author SHA1 Message Date
t.behrendt 9763964007 refactor: replace jest with vitest
CI / Check Dist (pull_request) Successful in 11s
CI / Test (pull_request) Successful in 12s
CI / Dry-Run Prerelease (pull_request) Successful in 8s
CI / Dry-Run (pull_request) Successful in 42s
2026-07-18 07:45:57 +02:00
t.behrendt 4cb5e68dd7 refactor: replace esbuild with rolldown 2026-07-18 07:44:03 +02:00
t.behrendt 0cd32ffb5e refactor: replace prettier with oxfmt 2026-07-18 07:22:25 +02:00
t.behrendt 39e952658b chore: lockfile maintenance (#88)
CD / Release (push) Successful in 10s
Reviewed-on: #88
Co-authored-by: Timo Behrendt <t.behrendt@t00n.de>
Co-committed-by: Timo Behrendt <t.behrendt@t00n.de>
2026-07-18 06:54:57 +02:00
renovate-bot d69250fd75 chore(deps): update actions/checkout action to v7 (#82)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [actions/checkout](https://github.com/actions/checkout) | action | major | `v6.0.3` → `v7.0.0` |

---

### Release Notes

<details>
<summary>actions/checkout (actions/checkout)</summary>

### [`v7.0.0`](https://github.com/actions/checkout/blob/HEAD/CHANGELOG.md#v700)

[Compare Source](https://github.com/actions/checkout/compare/v7.0.0...v7.0.0)

- Block checking out fork PR for pull\_request\_target and workflow\_run by [@&#8203;aiqiaoy](https://github.com/aiqiaoy) in [#&#8203;2454](https://github.com/actions/checkout/pull/2454)
- Bump actions/publish-immutable-action from 0.0.3 to 0.0.4 in the minor-actions-dependencies group across 1 directory by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;2458](https://github.com/actions/checkout/pull/2458)
- Bump flatted from 3.3.1 to 3.4.2 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;2460](https://github.com/actions/checkout/pull/2460)
- Bump js-yaml from 4.1.0 to 4.2.0 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;2461](https://github.com/actions/checkout/pull/2461)
- Bump [@&#8203;actions/core](https://github.com/actions/core) and [@&#8203;actions/tool-cache](https://github.com/actions/tool-cache) and Remove uuid by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;2459](https://github.com/actions/checkout/pull/2459)
- upgrade module to esm and update dependencies by [@&#8203;aiqiaoy](https://github.com/aiqiaoy) in [#&#8203;2463](https://github.com/actions/checkout/pull/2463)
- Bump the minor-npm-dependencies group across 1 directory with 3 updates by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;2462](https://github.com/actions/checkout/pull/2462)

### [`v7`](https://github.com/actions/checkout/blob/HEAD/CHANGELOG.md#v700)

[Compare Source](https://github.com/actions/checkout/compare/v6.0.3...v7.0.0)

- Block checking out fork PR for pull\_request\_target and workflow\_run by [@&#8203;aiqiaoy](https://github.com/aiqiaoy) in [#&#8203;2454](https://github.com/actions/checkout/pull/2454)
- Bump actions/publish-immutable-action from 0.0.3 to 0.0.4 in the minor-actions-dependencies group across 1 directory by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;2458](https://github.com/actions/checkout/pull/2458)
- Bump flatted from 3.3.1 to 3.4.2 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;2460](https://github.com/actions/checkout/pull/2460)
- Bump js-yaml from 4.1.0 to 4.2.0 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;2461](https://github.com/actions/checkout/pull/2461)
- Bump [@&#8203;actions/core](https://github.com/actions/core) and [@&#8203;actions/tool-cache](https://github.com/actions/tool-cache) and Remove uuid by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;2459](https://github.com/actions/checkout/pull/2459)
- upgrade module to esm and update dependencies by [@&#8203;aiqiaoy](https://github.com/aiqiaoy) in [#&#8203;2463](https://github.com/actions/checkout/pull/2463)
- Bump the minor-npm-dependencies group across 1 directory with 3 updates by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;2462](https://github.com/actions/checkout/pull/2462)

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yMzMuNCIsInVwZGF0ZWRJblZlciI6IjQzLjIzMy40IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJhY3Rpb24iLCJhdXRvbWVyZ2UiLCJkZXBzIl19-->

Reviewed-on: #82
Reviewed-by: t.behrendt <2+t.behrendt@noreply.localhost>
Co-authored-by: Renovate Bot <renovate@t00n.de>
Co-committed-by: Renovate Bot <renovate@t00n.de>
2026-06-27 14:12:00 +02:00
12 changed files with 1957 additions and 4601 deletions
+7
View File
@@ -0,0 +1,7 @@
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
+1 -1
View File
@@ -17,7 +17,7 @@ jobs:
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
fetch-depth: 0
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
+4 -4
View File
@@ -8,7 +8,7 @@ jobs:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version-file: .nvmrc
@@ -24,7 +24,7 @@ jobs:
name: Check Dist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version-file: .nvmrc
@@ -43,7 +43,7 @@ jobs:
name: Dry-Run
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
fetch-depth: 0
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
@@ -68,7 +68,7 @@ jobs:
name: Dry-Run Prerelease
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
fetch-depth: 0
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
-8
View File
@@ -1,8 +0,0 @@
{
"semi": true,
"trailingComma": "es5",
"singleQuote": false,
"printWidth": 100,
"tabWidth": 2,
"useTabs": false
}
+46 -82
View File
File diff suppressed because one or more lines are too long
-13
View File
@@ -1,13 +0,0 @@
module.exports = {
preset: "ts-jest",
testEnvironment: "node",
roots: ["<rootDir>/src"],
testMatch: ["**/*.spec.ts"],
moduleNameMapper: {
"^@actions/core$": "<rootDir>/src/__mocks__/actions-core.ts",
},
transform: {
"^.+\\.ts$": "ts-jest",
},
moduleFileExtensions: ["ts", "js", "json"],
};
+1851 -4467
View File
File diff suppressed because it is too large Load Diff
+8 -9
View File
@@ -4,21 +4,20 @@
"main": "src/index.ts",
"scripts": {
"typecheck": "tsc --noEmit",
"build": "esbuild src/index.ts --bundle --outfile=dist/index.js --platform=node --target=node24 --minify",
"test": "jest",
"format": "prettier --write src/**/*.ts"
"build": "rolldown -c",
"test": "vitest",
"format": "oxfmt --write src/**/*.ts"
},
"author": "Timo Behrendt <t.behrendt@t00n.de>",
"license": "MIT",
"devDependencies": {
"@types/conventional-commits-parser": "5.0.2",
"@types/jest": "30.0.0",
"@types/node": "24.13.2",
"esbuild": "0.28.1",
"jest": "30.4.2",
"prettier": "3.8.4",
"ts-jest": "29.4.11",
"typescript": "5.9.3"
"@vitest/coverage-v8": "4.1.10",
"oxfmt": "0.59.0",
"rolldown": "1.2.0",
"typescript": "5.9.3",
"vitest": "4.1.10"
},
"dependencies": {
"@actions/core": "3.0.1",
+12
View File
@@ -0,0 +1,12 @@
import { defineConfig } from "rolldown/config";
export default defineConfig({
input: "src/index.ts",
output: {
file: "dist/index.js",
format: "esm",
minify: true,
},
platform: "node",
treeshake: true,
});
-5
View File
@@ -1,5 +0,0 @@
export const getInput = jest.fn(() => "");
export const info = jest.fn();
export const warning = jest.fn();
export const setOutput = jest.fn();
export const setFailed = jest.fn();
+12 -12
View File
@@ -1,22 +1,24 @@
import { afterEach, beforeEach, describe, expect, it, vi, type MockedFunction } from "vitest";
import {
IncrementType,
Tag,
GitService,
CoreService,
ConventionalCommitAnalyzer,
TagService,
TagIncrementer,
LocalGitService,
CoreService,
GitService,
IncrementType,
LocalCoreService,
LocalGitService,
Tag,
TagIncrementer,
TagService,
} from "./main";
// Mock child_process.execSync
jest.mock("child_process", () => ({
execSync: jest.fn(),
vi.mock("child_process", () => ({
execSync: vi.fn(),
}));
import { execSync } from "child_process";
const mockExecSync = execSync as jest.MockedFunction<typeof execSync>;
const mockExecSync = execSync as MockedFunction<typeof execSync>;
// Mock interfaces for testing
class MockGitService implements GitService {
@@ -439,8 +441,6 @@ describe("LocalCoreService", () => {
localCoreService = new LocalCoreService();
});
// @actions/core is mocked via jest.config.js moduleNameMapper
it("should have all required methods", () => {
expect(typeof localCoreService.getInput).toBe("function");
expect(typeof localCoreService.info).toBe("function");
+16
View File
@@ -0,0 +1,16 @@
import { defineConfig } from "vitest/config";
export default defineConfig({
test: {
environment: "node",
include: ["src/**/*.{spec,test}.ts"],
coverage: {
enabled: true,
provider: "v8",
include: ["src/**/*.ts"],
exclude: ["src/**/*.{spec,test}.ts"],
reporter: ["lcov"],
reportsDirectory: "coverage",
},
},
});