Skip to content

Commit aeb2543

Browse files
committed
refactor(tooling): replace vite-plus with mise
1 parent 88f9474 commit aeb2543

32 files changed

Lines changed: 604 additions & 920 deletions

‎.github/actions/setup-node/action.yml‎

Lines changed: 0 additions & 31 deletions
This file was deleted.

‎.github/actions/setup/action.yml‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# This is the composite action:
2+
# https://docs.github.com/en/actions/creating-actions/creating-actions/creating-a-composite-action
3+
4+
name: Setup tools and dependencies
5+
description: Install the pinned development tools and project dependencies
6+
7+
inputs:
8+
run-install:
9+
description: 'Whether to run `pnpm install`'
10+
required: false
11+
default: 'true'
12+
13+
runs:
14+
using: composite
15+
steps:
16+
- name: Setup tools
17+
uses: jdx/mise-action@c2a87611a18de5b3828c5652fe268e992400cb5c # v4.3.0
18+
with:
19+
version: 2026.9.0
20+
21+
- name: Install dependencies
22+
if: ${{ inputs.run-install == 'true' }}
23+
run: pnpm install --frozen-lockfile
24+
shell: bash

‎.github/copilot-instructions.md‎

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ Gitify is a multi-forge notification client — an Electron desktop app that sur
66

77
## Prerequisites and Setup
88

9-
- **Node.js**: `>=24` (`.nvmrc` pins `24.18.0`). Use `nvm use` to activate the right version.
10-
- **Install pnpm globally**: `npm install -g pnpm`
9+
- **Development tools**: Install [mise](https://mise.jdx.dev/), then run `mise install` to activate the Node.js and pnpm versions pinned in `mise.toml`.
1110
- **Bootstrap the repository**: `pnpm install` — takes up to a minute on a clean install. NEVER CANCEL. Set timeout to 5+ minutes.
1211

1312
## Key Commands
@@ -17,7 +16,7 @@ Gitify is a multi-forge notification client — an Electron desktop app that sur
1716
| `pnpm dev` | Vite dev server + GraphQL codegen watch (main development loop) | ~10s to start |
1817
| `pnpm build` | Production build for all Electron targets (main, preload, renderer, shared) | ~30s clean |
1918
| `pnpm test` | Run full Vitest suite with coverage | ~15s |
20-
| `pnpm check` | oxlint + oxfmt + type-check (unified via vite-plus) | <5s |
19+
| `pnpm check` | Oxlint + Oxfmt + type-check | <5s |
2120
| `pnpm check:fix` | Same as check but auto-fixes formatting and lint | <5s |
2221
| `pnpm tsc --noEmit` | TypeScript-only type-check | ~5s |
2322

@@ -26,7 +25,7 @@ Gitify is a multi-forge notification client — an Electron desktop app that sur
2625
## Development Workflow
2726

2827
- **Day-to-day development**: `pnpm dev` — starts both the Vite dev server and GraphQL codegen watcher concurrently. Leave running while developing.
29-
- **Full build**: `pnpm build` — builds all targets via `vp build`. Output goes to `build/` (subdirectories: `main/`, `preload/`, `renderer/`, `shared/`).
28+
- **Full build**: `pnpm build` — builds all targets via Vite. Output goes to `build/` (subdirectories: `main/`, `preload/`, `renderer/`, `shared/`).
3029
- **Run the Electron app**: `pnpm start` — runs `pnpm build` then `pnpm dev`. Will fail in headless/container environments due to Electron sandbox restrictions (this is expected and normal).
3130

3231
## Validation
@@ -40,7 +39,7 @@ After making changes, validate in this order:
4039

4140
**Snapshot test failures**: Run `pnpm test -u` to regenerate after legitimate UI changes.
4241

43-
**Pre-commit**: Husky runs `vp staged` automatically on `git commit`. Manual equivalent: `pnpm check && pnpm test`.
42+
**Pre-commit**: Husky runs lint-staged automatically on `git commit`. Manual equivalent: `pnpm check && pnpm test`.
4443

4544
## File Map
4645

@@ -62,8 +61,12 @@ After making changes, validate in this order:
6261

6362
### Configuration
6463

65-
- `vite.config.mts` — Primary build config; also hosts `lint`, `fmt`, and `staged` blocks used by `pnpm check` and Husky
64+
- `vite.config.mts` — Vite build and development configuration
6665
- `vitest.config.mts` — Test configuration (Vitest projects: happy-dom for renderer/preload, node for main/shared)
66+
- `.oxlintrc.json` — Oxlint configuration
67+
- `.oxfmtrc.jsonc` — Oxfmt configuration
68+
- `lint-staged.config.mjs` — Pre-commit checks for staged files
69+
- `mise.toml` — Node.js and pnpm version pins
6770
- `tsconfig.json` — TypeScript configuration
6871
- `tailwind.config.mts` — Tailwind CSS configuration
6972
- `package.json` — Scripts and dependency versions
@@ -83,7 +86,7 @@ Requires a prior `pnpm build` and platform-specific tooling:
8386
## Constraints and Gotchas
8487

8588
- **Electron won't start in CI/containers**: Sandbox restrictions make `pnpm start` / `pnpm dev` fail headlessly. This is expected — test logic; don't try to fix the launch.
86-
- **Node version is strict**: `>=24` required. Check `.nvmrc` and run `nvm use` if commands behave oddly.
89+
- **Node version is strict**: `>=24` required. Run `mise install` if commands use the wrong Node.js or pnpm version.
8790
- **Snapshot drift on non-UTC machines**: Some snapshot tests encode relative dates. Tests may fail locally if your timezone differs from UTC. The test setup stubs `TZ=UTC` via `vi.stubEnv`.
8891
- **Lint warnings are OK**: The codebase has pre-existing lint warnings. Only new errors block CI.
8992
- **GraphQL codegen**: Running `pnpm dev` auto-watches for schema changes. If you edit `.graphql` files manually, re-run `pnpm codegen` to regenerate `graphql/generated/graphql.ts`.
@@ -102,9 +105,10 @@ This is a notification _viewer_, not a full forge client. Keep changes:
102105
- **Electron 43+** — desktop app host
103106
- **React 19+** — UI
104107
- **TypeScript 5+** — language
105-
- **pnpm 10+** — package manager
106-
- **Vite + vite-plus** — unified build, dev, lint (`oxlint`), format (`oxfmt`), and test toolchain. The `vp` CLI drives all tooling.
107-
- **Vitest** — test runner (via `vp test`); `@testing-library/jest-dom` provides DOM matchers
108+
- **pnpm 11+** — package manager
109+
- **Vite** — development server and build tool
110+
- **Vitest** — test runner; `@testing-library/jest-dom` provides DOM matchers
111+
- **Oxlint and Oxfmt** — linting and formatting
108112
- **Tailwind CSS v4** — styling
109113
- **Zustand** — client state management
110114
- **TanStack Query** — server state / notification fetching

‎.github/workflows/build.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ jobs:
4848
with:
4949
persist-credentials: false
5050

51-
- name: Setup Node.js
52-
uses: ./.github/actions/setup-node
51+
- name: Setup tools and dependencies
52+
uses: ./.github/actions/setup
5353

5454
- name: Build application
5555
run: pnpm build

‎.github/workflows/lint.yml‎

Lines changed: 3 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ permissions: {}
77

88
jobs:
99
lint-code:
10-
name: Lint Code [vite-plus]
10+
name: Lint Code
1111
runs-on: ubuntu-latest
1212
permissions:
1313
contents: read
@@ -18,8 +18,8 @@ jobs:
1818
with:
1919
persist-credentials: false
2020

21-
- name: Setup Node.js
22-
uses: ./.github/actions/setup-node
21+
- name: Setup tools and dependencies
22+
uses: ./.github/actions/setup
2323

2424
- name: Run lint and format checks
2525
run: pnpm check
@@ -39,34 +39,3 @@ jobs:
3939

4040
- name: GitHub Actions linter
4141
uses: docker://rhysd/actionlint:1.7.12@sha256:b1934ee5f1c509618f2508e6eb47ee0d3520686341fec936f3b79331f9315667
42-
43-
vite-toolchain-drift:
44-
name: Check vite-plus/vite/vitest drift [vp migrate]
45-
runs-on: ubuntu-latest
46-
permissions:
47-
contents: read
48-
49-
steps:
50-
- name: Checkout
51-
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
52-
with:
53-
persist-credentials: false
54-
55-
- name: Setup Node.js
56-
uses: ./.github/actions/setup-node
57-
58-
# Fails if vite-plus, vite, vitest, or the @vitest/* family have drifted
59-
# out of the alignment vp migrate expects (e.g. a raw version pin
60-
# instead of a catalog: reference, or a version vite-plus does not
61-
# bundle). Complements the Renovate `vite monorepo` packageRules group,
62-
# which prevents a *Renovate* PR from splitting these updates, by also
63-
# catching drift introduced by a manual edit. See
64-
# openspec/changes/fix-vite-plus-dependency-drift.
65-
- name: Run vp migrate and check for drift
66-
run: |
67-
pnpm exec vp migrate --no-interactive
68-
if ! git diff --quiet; then
69-
echo "::error::vp migrate produced changes. This means vite-plus, vite, vitest, or the @vitest/* family have drifted out of alignment. Run 'pnpm exec vp migrate' locally and commit the result."
70-
git diff
71-
exit 1
72-
fi

‎.github/workflows/publish.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ jobs:
6666
with:
6767
persist-credentials: false
6868

69-
- name: Setup Node.js
70-
uses: ./.github/actions/setup-node
69+
- name: Setup tools and dependencies
70+
uses: ./.github/actions/setup
7171

7272
- name: Build application
7373
run: pnpm build

‎.github/workflows/renovate-vite-migrate.yml‎

Lines changed: 0 additions & 65 deletions
This file was deleted.

‎.github/workflows/renovate.yml‎

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,19 @@ jobs:
2323
persist-credentials: false
2424
sparse-checkout: |
2525
renovate.json
26+
mise.toml
2627
.github
2728
28-
- uses: ./.github/actions/setup-node
29+
- name: Setup tools
30+
uses: ./.github/actions/setup
2931
with:
3032
run-install: 'false'
3133

32-
- name: Install Renovate
33-
run: pnpm install --global renovate
34-
3534
- name: Validate Renovate config
36-
run: renovate-config-validator
35+
run: >-
36+
pnpm dlx --package renovate@latest
37+
--allow-build=core-js-pure
38+
--allow-build=dtrace-provider
39+
--allow-build=protobufjs
40+
--allow-build=re2
41+
renovate-config-validator

‎.github/workflows/test.yml‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ jobs:
2121
with:
2222
persist-credentials: false
2323

24-
- name: Setup Node.js
25-
uses: ./.github/actions/setup-node
24+
- name: Setup tools and dependencies
25+
uses: ./.github/actions/setup
2626

2727
- name: Check TypeScript
2828
run: pnpm tsc --noEmit
@@ -59,8 +59,8 @@ jobs:
5959
with:
6060
persist-credentials: false
6161

62-
- name: Setup Node.js
63-
uses: ./.github/actions/setup-node
62+
- name: Setup tools and dependencies
63+
uses: ./.github/actions/setup
6464

6565
- name: Run visual regression tests
6666
# The job already runs in the pinned image, so the script runs vitest
@@ -95,8 +95,8 @@ jobs:
9595
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
9696
persist-credentials: false
9797

98-
- name: Setup Node.js
99-
uses: ./.github/actions/setup-node
98+
- name: Setup tools and dependencies
99+
uses: ./.github/actions/setup
100100

101101
- name: Download a single artifact
102102
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1

‎.husky/pre-commit‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
pnpm exec vp staged
1+
pnpm exec lint-staged

0 commit comments

Comments
 (0)