Skip to content

Commit a568bee

Browse files
philipbrembeckdependabot[bot]kodiakhq[bot]
authored
Release (#1050)
* build(deps): bump next-intl from 4.4.0 to 4.5.8 Bumps [next-intl](https://github.com/amannn/next-intl) from 4.4.0 to 4.5.8. - [Release notes](https://github.com/amannn/next-intl/releases) - [Changelog](https://github.com/amannn/next-intl/blob/main/CHANGELOG.md) - [Commits](amannn/next-intl@v4.4.0...v4.5.8) --- updated-dependencies: - dependency-name: next-intl dependency-version: 4.5.8 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * build(deps): bump next from 16.0.10 to 16.1.7 Bumps [next](https://github.com/vercel/next.js) from 16.0.10 to 16.1.7. - [Release notes](https://github.com/vercel/next.js/releases) - [Changelog](https://github.com/vercel/next.js/blob/canary/release.js) - [Commits](vercel/next.js@v16.0.10...v16.1.7) --- updated-dependencies: - dependency-name: next dependency-version: 16.1.7 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> * build(deps): bump azure/setup-kubectl from 4 to 5 Bumps [azure/setup-kubectl](https://github.com/azure/setup-kubectl) from 4 to 5. - [Release notes](https://github.com/azure/setup-kubectl/releases) - [Changelog](https://github.com/Azure/setup-kubectl/blob/main/CHANGELOG.md) - [Commits](Azure/setup-kubectl@v4...v5) --- updated-dependencies: - dependency-name: azure/setup-kubectl dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * build(deps): bump next from 16.1.7 to 16.2.3 Bumps [next](https://github.com/vercel/next.js) from 16.1.7 to 16.2.3. - [Release notes](https://github.com/vercel/next.js/releases) - [Changelog](https://github.com/vercel/next.js/blob/canary/release.js) - [Commits](vercel/next.js@v16.1.7...v16.2.3) --- updated-dependencies: - dependency-name: next dependency-version: 16.2.3 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> * build(deps): bump next-intl from 4.5.8 to 4.9.1 Bumps [next-intl](https://github.com/amannn/next-intl) from 4.5.8 to 4.9.1. - [Release notes](https://github.com/amannn/next-intl/releases) - [Changelog](https://github.com/amannn/next-intl/blob/main/CHANGELOG.md) - [Commits](amannn/next-intl@v4.5.8...v4.9.1) --- updated-dependencies: - dependency-name: next-intl dependency-version: 4.9.1 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> * chore: modernise dependency stack and trim unused packages - Remove unused dependencies: @ducanh2912/next-pwa (service worker was fully commented out), prom-client, jest-worker, nookies, million, eslint-config-sznm (not imported in eslint config) - Replace nookies setCookie with a native document.cookie one-liner - Remove million compiler wrapper from next.config.ts; Next 16 + React 19 provide equivalent optimisation built-in - Update all remaining packages to their latest compatible versions (next, react/react-dom stable, sass, sharp, playwright, testing-library, jest 30, typescript-eslint, eslint 9.x latest, quagga2, etc.) - Add scoped pnpm overrides to patch transitive dep versions that upstream packages have not yet bumped (flatted, minimatch, picomatch, brace-expansion, js-yaml, babel helpers, form-data, qs, diff) - Add coverage/** to eslint ignores - Remove staging branch trigger and staging/e2e jobs from build workflow; the target deployment no longer exists * fix: pnpm version pin * build(deps): bump pnpm/action-setup from 4 to 5 Bumps [pnpm/action-setup](https://github.com/pnpm/action-setup) from 4 to 5. - [Release notes](https://github.com/pnpm/action-setup/releases) - [Commits](pnpm/action-setup@v4...v5) --- updated-dependencies: - dependency-name: pnpm/action-setup dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * build(deps): bump docker/metadata-action from 5.10.0 to 6.0.0 Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 5.10.0 to 6.0.0. - [Release notes](https://github.com/docker/metadata-action/releases) - [Commits](docker/metadata-action@c299e40...030e881) --- updated-dependencies: - dependency-name: docker/metadata-action dependency-version: 6.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * build(deps): bump docker/build-push-action from 6.18.0 to 7.0.0 Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.18.0 to 7.0.0. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](docker/build-push-action@2634353...d08e5c3) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-version: 7.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * build(deps): bump docker/login-action from 3.6.0 to 4.0.0 Bumps [docker/login-action](https://github.com/docker/login-action) from 3.6.0 to 4.0.0. - [Release notes](https://github.com/docker/login-action/releases) - [Commits](docker/login-action@5e57cd1...b45d80f) --- updated-dependencies: - dependency-name: docker/login-action dependency-version: 4.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * chore: update TypeScript to 6.0.3 and align tsconfig - Bump TypeScript 5.7.3 → 6.0.3 - Replace deprecated target 'ES5' with 'ES2017' (Next.js handles browser transpilation; ES5 output is not needed) - Remove deprecated standalone 'baseUrl'; paths alias @/* resolves correctly from tsconfig location without it * build(deps-dev): bump typescript-eslint from 8.58.2 to 8.59.1 Bumps [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) from 8.58.2 to 8.59.1. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.59.1/packages/typescript-eslint) --- updated-dependencies: - dependency-name: typescript-eslint dependency-version: 8.59.1 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * build(deps): bump next-intl from 4.9.1 to 4.11.0 Bumps [next-intl](https://github.com/amannn/next-intl) from 4.9.1 to 4.11.0. - [Release notes](https://github.com/amannn/next-intl/releases) - [Changelog](https://github.com/amannn/next-intl/blob/main/CHANGELOG.md) - [Commits](amannn/next-intl@v4.9.1...v4.11.0) --- updated-dependencies: - dependency-name: next-intl dependency-version: 4.11.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * perf!: Change runtime to bun, exchange ESLint & Prettier with Ultracite (#1049) * perf!: Change runtime to bun, exchange ESLint & Prettier with Ultracite Switch project tooling to Bun and Biome (Ultracite): update CI to use Bun, replace pnpm install/test/lint steps, and run Bun-based build/tests. Update Dockerfile to use bun base for installs and build, adjust VS Code settings to prefer Biome formatting, and update AGENTS.md with Bun/Utracite commands and guidance. Add biome.jsonc and bun.lock, and remove legacy pnpm/Jest/ESLint config files to complete the migration. * fix: address Sourcery review feedback and tighten migration - Replace document.cookie inline write with setLocaleCookie() helper (validates locale, sanitizes value, adds SameSite=Lax) - Align all target=_blank links to rel='noopener noreferrer' - Remove duplicate onClick from oledmode checkbox (keep onChange only) - Add tsconfig.test.json with bun-types for test type coverage - Fix empty product fixture type error caught by tsc test check - Replace stale eslint-disable comments with biome-ignore equivalents - Remove duplicate helpModal JSX prop (Biome useSortedAttributes bug) - Fix duplicate start_url keys in webmanifest files - Set turbopack.root to silence multiple-lockfiles warning * chore: Exclude agent documents from git * fix(types): include bun-types/test-globals for describe/test/expect globals * chore: add husky pre-commit hook with lint-staged + biome * fix(husky): pre-commit hook runs bun run check, not lint-staged * fix: remove separator scripts from package.json, source locales from routing config - Remove ---/=== separator pseudo-scripts (confuse tooling) - locale-cookie.ts now imports routing.locales from @/i18n/routing instead of maintaining a duplicate hardcoded list - Add Secure cookie flag in production over HTTPS --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
1 parent 8be5122 commit a568bee

74 files changed

Lines changed: 1742 additions & 8230 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/pr.yml

Lines changed: 6 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -5,34 +5,9 @@ jobs:
55
runs-on: ubuntu-latest
66
steps:
77
- uses: actions/checkout@v6
8-
- uses: pnpm/action-setup@v6
9-
with:
10-
version: 10.19.0
11-
- uses: actions/setup-node@v6
12-
with:
13-
node-version: "20.x"
14-
cache: "pnpm"
15-
cache-dependency-path: "**/pnpm-lock.yaml"
16-
- run: pnpm install
17-
- run: pnpm run lint
18-
- run: pnpm run type-check
19-
- run: pnpm run test
20-
- run: pnpm run build
21-
legacy_peer_deps_build:
22-
runs-on: ubuntu-latest
23-
needs: regular_build
24-
if: ${{ always() && needs.regular_build.result == 'failure' }}
25-
steps:
26-
- uses: actions/checkout@v6
27-
- uses: pnpm/action-setup@v6
28-
with:
29-
version: 9.12.1
30-
- uses: actions/setup-node@v6
31-
with:
32-
node-version: "20.x"
33-
cache: "pnpm"
34-
- run: pnpm install --no-strict-peer-dependencies
35-
- run: pnpm run lint
36-
- run: pnpm run type-check
37-
- run: pnpm run test
38-
- run: pnpm run build
8+
- uses: oven-sh/setup-bun@v2
9+
- run: bun install
10+
- run: bun run lint
11+
- run: bun run type-check
12+
- run: bun test src/components
13+
- run: bun run build

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ next-env.d.ts
4242
test-results/
4343
playwright-report/
4444

45-
# mcp
45+
# agents
4646
.cursor/
4747
.pi-lens/
48+
docs/agents/*

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
bun run check

.vscode/settings.json

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
{
22
"editor.codeActionsOnSave": {
3-
"source.fixAll.eslint": "always"
3+
"source.fixAll.eslint": "always",
4+
"source.fixAll.biome": "explicit",
5+
"source.organizeImports.biome": "explicit"
46
},
57
"editor.formatOnSave": true,
68
"eslint.validate": [
@@ -26,5 +28,52 @@
2628
"explorer.fileNesting.patterns": {
2729
"AGENTS.md": "CLAUDE.md",
2830
"*.component.ts": "$(capture).component.html, $(capture).component.spec.ts, $(capture).component.css, $(capture).component.scss, $(capture).component.sass, $(capture).component.less"
31+
},
32+
"editor.defaultFormatter": "esbenp.prettier-vscode",
33+
"editor.formatOnPaste": true,
34+
"emmet.showExpandedAbbreviation": "never",
35+
"js/ts.tsdk.path": "node_modules/typescript/lib",
36+
"js/ts.tsdk.promptToUseWorkspaceVersion": true,
37+
"[css]": {
38+
"editor.defaultFormatter": "biomejs.biome"
39+
},
40+
"[graphql]": {
41+
"editor.defaultFormatter": "biomejs.biome"
42+
},
43+
"[html]": {
44+
"editor.defaultFormatter": "biomejs.biome"
45+
},
46+
"[javascript]": {
47+
"editor.defaultFormatter": "biomejs.biome"
48+
},
49+
"[javascriptreact]": {
50+
"editor.defaultFormatter": "biomejs.biome"
51+
},
52+
"[json]": {
53+
"editor.defaultFormatter": "biomejs.biome"
54+
},
55+
"[jsonc]": {
56+
"editor.defaultFormatter": "biomejs.biome"
57+
},
58+
"[markdown]": {
59+
"editor.defaultFormatter": "biomejs.biome"
60+
},
61+
"[mdx]": {
62+
"editor.defaultFormatter": "biomejs.biome"
63+
},
64+
"[svelte]": {
65+
"editor.defaultFormatter": "biomejs.biome"
66+
},
67+
"[typescript]": {
68+
"editor.defaultFormatter": "biomejs.biome"
69+
},
70+
"[typescriptreact]": {
71+
"editor.defaultFormatter": "biomejs.biome"
72+
},
73+
"[vue]": {
74+
"editor.defaultFormatter": "biomejs.biome"
75+
},
76+
"[yaml]": {
77+
"editor.defaultFormatter": "biomejs.biome"
2978
}
3079
}

AGENTS.md

Lines changed: 139 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,20 @@
33
## Development Commands
44

55
```bash
6-
# Package manager: pnpm is required (enforced via preinstall script)
7-
pnpm install # Install dependencies
8-
pnpm dev # Start development server with Turbopack
9-
pnpm build # Build for production
10-
pnpm start # Start production server on port 1030
11-
pnpm stage # Start staging server on port 1031
6+
# Package manager: bun
7+
bun install # Install dependencies
8+
bun run dev # Start development server with Turbopack
9+
bun run build # Build for production
10+
bun run start # Start production server on port 1030
11+
bun run stage # Start staging server on port 1031
1212

1313
# Quality assurance
14-
pnpm lint # Run ESLint
15-
pnpm lint:fix # Auto-fix ESLint issues
16-
pnpm type-check # Run TypeScript type checking
14+
bun run check # Run Linter, Formatter, Unit Tests and Type Checker concurrently
15+
bun run lint:fix # Auto-fix Biome issues
16+
bun run type-check # Run TypeScript type checking
1717

1818
# Testing
19-
pnpm test # Run Jest unit tests
20-
pnpm test:watch # Run Jest in watch mode
21-
pnpm test:coverage # Run tests with coverage report
22-
pnpm test:e2e # Run Playwright end-to-end tests
19+
bun run test:e2e # Run Playwright end-to-end tests
2320
```
2421

2522
## Project Architecture
@@ -31,8 +28,8 @@ pnpm test:e2e # Run Playwright end-to-end tests
3128
- **Styling**: SCSS with modular structure
3229
- **Internationalization**: next-intl for multi-language support
3330
- **Performance**: Million.js compiler optimization
34-
- **Testing**: Jest for unit tests, Playwright for E2E
35-
- **Package Manager**: pnpm (enforced)
31+
- **Testing**: Bun test runner for unit tests, Playwright for E2E
32+
- **Package Manager**: bun
3633

3734
### Key Directory Structure
3835

@@ -77,10 +74,10 @@ src/
7774

7875
### Code Quality Requirements
7976

80-
- All utility functions must have 100% test coverage using Jest
77+
- All utility functions must have 100% test coverage using Bun test runner
8178
- TypeScript is mandatory with proper type definitions in models/ folders
8279
- Follow conventional commits specification for commit messages
83-
- Use ESLint configuration (includes Next.js and custom rules)
80+
- Use Biome for linting and formatting
8481

8582
### Testing Strategy
8683

@@ -101,3 +98,128 @@ src/
10198
- Add translations to ALL language files in locales/ when adding new strings
10299
- Use next-intl translation keys consistently
103100
- Follow existing key structure conventions
101+
102+
103+
# Ultracite Code Standards
104+
105+
This project uses **Ultracite**, a zero-config preset that enforces strict code quality standards through automated formatting and linting.
106+
107+
## Quick Reference
108+
109+
- **Format code**: `bun x ultracite fix`
110+
- **Check for issues**: `bun x ultracite check`
111+
- **Diagnose setup**: `bun x ultracite doctor`
112+
113+
Biome (the underlying engine) provides robust linting and formatting. Most issues are automatically fixable.
114+
115+
---
116+
117+
## Core Principles
118+
119+
Write code that is **accessible, performant, type-safe, and maintainable**. Focus on clarity and explicit intent over brevity.
120+
121+
### Type Safety & Explicitness
122+
123+
- Use explicit types for function parameters and return values when they enhance clarity
124+
- Prefer `unknown` over `any` when the type is genuinely unknown
125+
- Use const assertions (`as const`) for immutable values and literal types
126+
- Leverage TypeScript's type narrowing instead of type assertions
127+
- Use meaningful variable names instead of magic numbers - extract constants with descriptive names
128+
129+
### Modern JavaScript/TypeScript
130+
131+
- Use arrow functions for callbacks and short functions
132+
- Prefer `for...of` loops over `.forEach()` and indexed `for` loops
133+
- Use optional chaining (`?.`) and nullish coalescing (`??`) for safer property access
134+
- Prefer template literals over string concatenation
135+
- Use destructuring for object and array assignments
136+
- Use `const` by default, `let` only when reassignment is needed, never `var`
137+
138+
### Async & Promises
139+
140+
- Always `await` promises in async functions - don't forget to use the return value
141+
- Use `async/await` syntax instead of promise chains for better readability
142+
- Handle errors appropriately in async code with try-catch blocks
143+
- Don't use async functions as Promise executors
144+
145+
### React & JSX
146+
147+
- Use function components over class components
148+
- Call hooks at the top level only, never conditionally
149+
- Specify all dependencies in hook dependency arrays correctly
150+
- Use the `key` prop for elements in iterables (prefer unique IDs over array indices)
151+
- Nest children between opening and closing tags instead of passing as props
152+
- Don't define components inside other components
153+
- Use semantic HTML and ARIA attributes for accessibility:
154+
- Provide meaningful alt text for images
155+
- Use proper heading hierarchy
156+
- Add labels for form inputs
157+
- Include keyboard event handlers alongside mouse events
158+
- Use semantic elements (`<button>`, `<nav>`, etc.) instead of divs with roles
159+
160+
### Error Handling & Debugging
161+
162+
- Remove `console.log`, `debugger`, and `alert` statements from production code
163+
- Throw `Error` objects with descriptive messages, not strings or other values
164+
- Use `try-catch` blocks meaningfully - don't catch errors just to rethrow them
165+
- Prefer early returns over nested conditionals for error cases
166+
167+
### Code Organization
168+
169+
- Keep functions focused and under reasonable cognitive complexity limits
170+
- Extract complex conditions into well-named boolean variables
171+
- Use early returns to reduce nesting
172+
- Prefer simple conditionals over nested ternary operators
173+
- Group related code together and separate concerns
174+
175+
### Security
176+
177+
- Add `rel="noopener"` when using `target="_blank"` on links
178+
- Avoid `dangerouslySetInnerHTML` unless absolutely necessary
179+
- Don't use `eval()` or assign directly to `document.cookie`
180+
- Validate and sanitize user input
181+
182+
### Performance
183+
184+
- Avoid spread syntax in accumulators within loops
185+
- Use top-level regex literals instead of creating them in loops
186+
- Prefer specific imports over namespace imports
187+
- Avoid barrel files (index files that re-export everything)
188+
- Use proper image components (e.g., Next.js `<Image>`) over `<img>` tags
189+
190+
### Framework-Specific Guidance
191+
192+
**Next.js:**
193+
- Use Next.js `<Image>` component for images
194+
- Use `next/head` or App Router metadata API for head elements
195+
- Use Server Components for async data fetching instead of async Client Components
196+
197+
**React 19+:**
198+
- Use ref as a prop instead of `React.forwardRef`
199+
200+
**Solid/Svelte/Vue/Qwik:**
201+
- Use `class` and `for` attributes (not `className` or `htmlFor`)
202+
203+
---
204+
205+
## Testing
206+
207+
- Write assertions inside `it()` or `test()` blocks
208+
- Avoid done callbacks in async tests - use async/await instead
209+
- Don't use `.only` or `.skip` in committed code
210+
- Keep test suites reasonably flat - avoid excessive `describe` nesting
211+
212+
## When Biome Can't Help
213+
214+
Biome's linter will catch most issues automatically. Focus your attention on:
215+
216+
1. **Business logic correctness** - Biome can't validate your algorithms
217+
2. **Meaningful naming** - Use descriptive names for functions, variables, and types
218+
3. **Architecture decisions** - Component structure, data flow, and API design
219+
4. **Edge cases** - Handle boundary conditions and error states
220+
5. **User experience** - Accessibility, performance, and usability considerations
221+
6. **Documentation** - Add comments for complex logic, but prefer self-documenting code
222+
223+
---
224+
225+
Most formatting and common issues are automatically fixed by Biome. Run `bun x ultracite fix` before committing to ensure compliance.

Dockerfile

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,12 @@
1-
FROM node:20-alpine AS base
1+
FROM oven/bun:1-alpine AS base
22

33
# Install dependencies only when needed
44
FROM base AS deps
5-
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
6-
RUN apk add --no-cache libc6-compat
75
WORKDIR /app
86

9-
# Install dependencies based on the preferred package manager
10-
COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* ./
11-
RUN \
12-
if [ -f yarn.lock ]; then yarn --frozen-lockfile; \
13-
elif [ -f package-lock.json ]; then npm ci; \
14-
elif [ -f pnpm-lock.yaml ]; then npm i -g corepack@latest && corepack enable pnpm && pnpm i --frozen-lockfile; \
15-
else echo "Lockfile not found." && exit 1; \
16-
fi
7+
# Install dependencies based on bun lockfile
8+
COPY package.json bun.lock ./
9+
RUN bun install --frozen-lockfile
1710

1811

1912
# Rebuild the source code only when needed
@@ -27,15 +20,10 @@ COPY . .
2720
# Uncomment the following line in case you want to disable telemetry during the build.
2821
ENV NEXT_TELEMETRY_DISABLED 1
2922

30-
RUN \
31-
if [ -f yarn.lock ]; then yarn run build; \
32-
elif [ -f package-lock.json ]; then npm run build; \
33-
elif [ -f pnpm-lock.yaml ]; then npm i -g corepack@latest && corepack enable pnpm && pnpm run build; \
34-
else echo "Lockfile not found." && exit 1; \
35-
fi
23+
RUN bun run build
3624

3725
# Production image, copy all the files and run next
38-
FROM base AS runner
26+
FROM node:20-alpine AS runner
3927
WORKDIR /app
4028

4129
ENV NODE_ENV production
@@ -64,4 +52,4 @@ ENV PORT 3000
6452

6553
# server.js is created by next build from the standalone output
6654
# https://nextjs.org/docs/pages/api-reference/next-config-js/output
67-
CMD HOSTNAME="0.0.0.0" node server.js
55+
CMD HOSTNAME="0.0.0.0" node server.js

0 commit comments

Comments
 (0)