Skip to content

Commit 8da9fcf

Browse files
authored
Maintenance (#900)
1 parent 3dfa0bf commit 8da9fcf

32 files changed

Lines changed: 1057 additions & 1402 deletions

.github/workflows/cicd.yml

Lines changed: 38 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,28 @@ on:
66
- main
77
pull_request:
88

9+
permissions:
10+
contents: read
11+
912
jobs:
1013
lint:
11-
runs-on: ubuntu-latest
14+
runs-on: ubuntu-24.04-arm
1215

1316
steps:
14-
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
15-
16-
- uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6
17+
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6
1718
with:
18-
node-version: 24
19+
persist-credentials: false
1920

20-
- run: corepack enable
21+
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
22+
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6
23+
with:
24+
node-version: 25
2125

2226
- name: find pnpm cache path
2327
id: cache
24-
run: echo "path=$(pnpm store path)" >> $GITHUB_OUTPUT
28+
run: echo "path=$(pnpm store path)" >> "$GITHUB_OUTPUT"
2529

26-
- uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
30+
- uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
2731
with:
2832
path: ${{ steps.cache.outputs.path }}
2933
key: v1-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
@@ -36,7 +40,7 @@ jobs:
3640
- run: node --run lint
3741

3842
fmt:
39-
runs-on: ubuntu-latest
43+
runs-on: ubuntu-24.04-arm
4044

4145
steps:
4246
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
@@ -48,22 +52,23 @@ jobs:
4852
- run: biome check
4953

5054
typecheck:
51-
runs-on: ubuntu-latest
55+
runs-on: ubuntu-24.04-arm
5256

5357
steps:
54-
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
55-
56-
- uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6
58+
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6
5759
with:
58-
node-version: 24
60+
persist-credentials: false
5961

60-
- run: corepack enable
62+
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
63+
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6
64+
with:
65+
node-version: 25
6166

6267
- name: find pnpm cache path
6368
id: cache
64-
run: echo "path=$(pnpm store path)" >> $GITHUB_OUTPUT
69+
run: echo "path=$(pnpm store path)" >> "$GITHUB_OUTPUT"
6570

66-
- uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
71+
- uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
6772
with:
6873
path: ${{ steps.cache.outputs.path }}
6974
key: v1-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
@@ -76,22 +81,23 @@ jobs:
7681
- run: node --run typecheck
7782

7883
test:
79-
runs-on: ubuntu-latest
84+
runs-on: ubuntu-24.04-arm
8085

8186
steps:
82-
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
83-
84-
- uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6
87+
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6
8588
with:
86-
node-version: 24
89+
persist-credentials: false
8790

88-
- run: corepack enable
91+
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
92+
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6
93+
with:
94+
node-version: 25
8995

9096
- name: find pnpm cache path
9197
id: cache
92-
run: echo "path=$(pnpm store path)" >> $GITHUB_OUTPUT
98+
run: echo "path=$(pnpm store path)" >> "$GITHUB_OUTPUT"
9399

94-
- uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
100+
- uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
95101
with:
96102
path: ${{ steps.cache.outputs.path }}
97103
key: v1-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
@@ -106,7 +112,7 @@ jobs:
106112
NODE_ENV: test
107113

108114
build:
109-
runs-on: ubuntu-latest
115+
runs-on: ubuntu-24.04-arm
110116
permissions:
111117
contents: read
112118
packages: write
@@ -115,37 +121,35 @@ jobs:
115121
steps:
116122
- name: Docker meta
117123
id: meta
118-
uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 # v5
124+
uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # v5
119125
with:
120126
images: |
121127
ghcr.io/${{ github.repository }}
122128
tags: |
123129
type=raw,value={{sha}}
124130
type=raw,value=latest
125131
126-
- name: Set up depot
127-
uses: depot/setup-action@b0b1ea4f69e92ebf5dea3f8713a1b0c37b2126a5 # v1
128-
129132
- name: Login to GHCR
130133
if: github.ref == 'refs/heads/main'
131-
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3
134+
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3
132135
with:
133136
registry: ghcr.io
134137
username: ${{ github.actor }}
135138
password: ${{ secrets.GITHUB_TOKEN }}
136139

137140
- name: Build and maybe Push Docker image
138-
uses: depot/build-push-action@9785b135c3c76c33db102e45be96a25ab55cd507 # v1
141+
uses: docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25 # v5
139142
with:
140-
project: ks849krng9
141143
push: ${{ github.ref == 'refs/heads/main' }}
142144
tags: ${{ steps.meta.outputs.tags }}
143145
labels: ${{ steps.meta.outputs.labels }}
146+
#cache-from: type=gha
147+
#cache-to: type=gha,mode=max
144148

145149
deploy:
146150
if: github.ref == 'refs/heads/main'
147151
needs: [lint, test, typecheck, build]
148-
runs-on: ubuntu-latest
152+
runs-on: ubuntu-24.04-arm
149153
environment:
150154
name: prod
151155
url: https://arm.haglund.dev/api

Dockerfile

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:24-alpine as base
1+
FROM node:25-alpine AS base
22

33
WORKDIR /app
44

@@ -11,19 +11,22 @@ ENV NODE_ENV=production
1111
ENV NODE_COMPILE_CACHE=/node-cc
1212
RUN mkdir -p $NODE_COMPILE_CACHE
1313

14-
FROM base as base_deps
14+
FROM base AS base_deps
1515

1616
ENV CI=1
1717

1818
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
1919

20+
RUN npm i -g npm@latest
21+
RUN npm i -g --force corepack@latest
2022
RUN corepack enable
2123
RUN corepack prepare --activate
2224

2325
# Install dependencies
24-
RUN pnpm install --frozen-lockfile --ignore-scripts
26+
RUN --mount=type=cache,id=pnpm,target=/pnpm/store \
27+
pnpm install --frozen-lockfile --ignore-scripts
2528

26-
FROM base_deps as build
29+
FROM base_deps AS build
2730

2831
COPY tsconfig.json tsdown.config.ts ./
2932
COPY src/ src/

biome.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://biomejs.dev/schemas/2.0.5/schema.json",
2+
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
33
"vcs": {
44
"enabled": true,
55
"clientKind": "git",

eslint.config.js

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

eslint.config.ts

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
import antfu from "@antfu/eslint-config"
2+
3+
export default antfu({
4+
ignores: ["**/*.json"],
5+
markdown: false,
6+
stylistic: false,
7+
jsonc: false,
8+
jsx: false,
9+
pnpm: false,
10+
toml: false,
11+
test: { overrides: { "test/no-import-node-test": "off" } },
12+
typescript: {
13+
tsconfigPath: "tsconfig.json",
14+
ignoresTypeAware: ["copy.ts", "*.config.*"],
15+
16+
overridesTypeAware: {
17+
"ts/no-floating-promises": [
18+
"error",
19+
{
20+
allowForKnownSafeCalls: [
21+
{ from: "package", package: "node:test", name: ["describe", "it", "test"] },
22+
],
23+
},
24+
],
25+
},
26+
27+
overrides: {
28+
"no-console": "off",
29+
"antfu/no-top-level-await": "off",
30+
"import/consistent-type-specifier-style": ["error", "prefer-top-level"],
31+
"node/prefer-global/process": "off",
32+
"ts/consistent-type-definitions": "off",
33+
"ts/consistent-type-imports": [
34+
"error",
35+
{ fixStyle: "inline-type-imports", disallowTypeAnnotations: false },
36+
],
37+
"ts/no-unsafe-argument": "off",
38+
"ts/no-unsafe-assignment": "off",
39+
"ts/no-use-before-define": "off",
40+
"unused-imports/no-unused-vars": "off",
41+
42+
"perfectionist/sort-imports": [
43+
"error",
44+
{
45+
type: "natural",
46+
internalPattern: ["^@/", "^~/", "^#[a-zA-Z0-9-]+/"],
47+
newlinesBetween: "always",
48+
groups: [
49+
["builtin", "builtin-type"],
50+
["external", "external-type"],
51+
["internal", "internal-type"],
52+
["parent", "parent-type"],
53+
["sibling", "sibling-type"],
54+
["index", "index-type"],
55+
"object",
56+
"unknown",
57+
],
58+
},
59+
],
60+
},
61+
},
62+
})

mise.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
[tools]
2-
node = "24"
2+
node = "25"

package.json

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
"private": true,
77
"license": "AGPL-3.0-only",
88
"homepage": "https://arm.haglund.dev/docs",
9-
"packageManager": "pnpm@10.18.1",
9+
"packageManager": "pnpm@10.26.2",
1010
"engines": {
11-
"node": "^24"
11+
"node": "^25"
1212
},
1313
"simple-git-hooks": {
1414
"pre-commit": "node_modules/.bin/nano-staged"
@@ -34,28 +34,28 @@
3434
"prepare": "simple-git-hooks"
3535
},
3636
"devDependencies": {
37-
"@antfu/eslint-config": "5.4.1",
38-
"@biomejs/biome": "2.2.5",
39-
"@tsconfig/node24": "24.0.1",
40-
"@tsconfig/strictest": "2.0.6",
37+
"@antfu/eslint-config": "6.7.3",
38+
"@biomejs/biome": "2.3.10",
39+
"@tsconfig/node24": "24.0.3",
40+
"@tsconfig/strictest": "2.0.8",
4141
"@types/json-schema": "7.0.15",
42-
"@types/node": "24.7.0",
43-
"@typescript/native-preview": "7.0.0-dev.20251008.1",
44-
"@vitest/coverage-v8": "4.0.0-beta.17",
42+
"@types/node": "25.0.3",
43+
"@typescript/native-preview": "7.0.0-dev.20251230.1",
44+
"@vitest/coverage-v8": "4.0.16",
4545
"db0": "0.3.4",
46-
"eslint": "9.37.0",
47-
"h3": "2.0.1-rc.2",
48-
"kysely": "0.28.7",
46+
"eslint": "9.39.2",
47+
"h3": "2.0.1-rc.6",
48+
"kysely": "0.28.9",
4949
"kysely-db0": "0.1.0-beta.0",
50-
"mentoss": "0.11.0",
50+
"mentoss": "0.12.0",
5151
"nano-staged": "0.8.0",
5252
"onchange": "7.1.0",
53-
"pino": "10.0.0",
54-
"pino-pretty": "13.1.1",
53+
"pino": "10.1.0",
54+
"pino-pretty": "13.1.3",
5555
"simple-git-hooks": "2.13.1",
56-
"tsdown": "0.15.6",
57-
"valibot": "1.1.0",
58-
"vitest": "4.0.0-beta.17",
59-
"xior": "0.7.8"
56+
"tsdown": "0.18.3",
57+
"valibot": "1.2.0",
58+
"vitest": "4.0.16",
59+
"xior": "0.8.2"
6060
}
6161
}

0 commit comments

Comments
 (0)