Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .eslintignore

This file was deleted.

2 changes: 1 addition & 1 deletion .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
packageRules: [
{
packageNames: ["node"],
allowedVersions: "<=22",
allowedVersions: "<=24",
rangeStrategy: "replace",
},
{
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: 22
node-version: 24

- run: corepack enable

Expand All @@ -33,7 +33,7 @@ jobs:
- name: Install dependencies
run: pnpm install --frozen-lockfile

- run: pnpm lint
- run: node --run lint

fmt:
runs-on: ubuntu-latest
Expand All @@ -55,7 +55,7 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: 22
node-version: 24

- run: corepack enable

Expand All @@ -73,7 +73,7 @@ jobs:
- name: Install dependencies
run: pnpm install --frozen-lockfile

- run: pnpm typecheck
- run: node --run typecheck

test:
runs-on: ubuntu-latest
Expand All @@ -83,7 +83,7 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: 22
node-version: 24

- run: corepack enable

Expand All @@ -101,7 +101,7 @@ jobs:
- name: Install dependencies
run: pnpm install --frozen-lockfile

- run: pnpm test
- run: node --run test
env:
NODE_ENV: test

Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
.idea/
.env
coverage/
db/*.sqlite3*
dist/
sqlite/
redoc-static.html

# Logs
Expand Down
3 changes: 0 additions & 3 deletions .npmrc

This file was deleted.

20 changes: 8 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:22-alpine as base
FROM node:24-alpine as base

WORKDIR /app

Expand All @@ -15,35 +15,31 @@ FROM base as base_deps

ENV CI=1

COPY .npmrc package.json pnpm-lock.yaml ./
COPY patches/ patches/
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./

RUN corepack enable
RUN corepack prepare --activate

# Install dependencies
RUN --mount=type=cache,id=pnpm,target=/pnpm/store \
pnpm install --frozen-lockfile
RUN pnpm install --frozen-lockfile --ignore-scripts

FROM base_deps as build

COPY knexfile.js tsconfig.json tsup.config.ts ./
COPY tsconfig.json tsdown.config.ts ./
COPY src/ src/

RUN pnpm run build
RUN node --run build

FROM base_deps AS docs

COPY docs/openapi.yaml docs/openapi.yaml

RUN --mount=type=cache,id=pnpm,target=/pnpm/store \
pnpm run docs
RUN node --run docs

FROM base

COPY .npmrc knexfile.js package.json pnpm-lock.yaml ./
COPY package.json pnpm-lock.yaml ./
COPY src/ src/
COPY migrations/ migrations/

COPY --from=build /app/dist dist/
COPY --from=docs /app/redoc-static.html .
Expand All @@ -54,4 +50,4 @@ ENV NODE_OPTIONS="--enable-source-maps"
# Warnings disabled, we know what we're doing and they're annoying
ENV NODE_NO_WARNINGS=1

CMD ["node", "dist/index.js"]
CMD ["node", "--run", "start"]
23 changes: 10 additions & 13 deletions biome.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,24 @@
{
"$schema": "https://biomejs.dev/schemas/1.8.0/schema.json",
"$schema": "https://biomejs.dev/schemas/2.0.5/schema.json",
"vcs": {
"enabled": true,
"clientKind": "git",
"defaultBranch": "main",
"useIgnoreFile": true
},
"formatter": {
"lineEnding": "lf",
"indentStyle": "tab",
"lineWidth": 90,
"formatWithErrors": true
},
"organizeImports": {
"enabled": false
},
"javascript": {
"formatter": {
"quoteStyle": "double",
"semicolons": "asNeeded"
}
},
"linter": {
"enabled": false
},
"vcs": {
"enabled": true,
"clientKind": "git",
"defaultBranch": "main",
"useIgnoreFile": true
}

"assist": { "actions": { "source": { "organizeImports": "off" } } },
"linter": { "enabled": false }
}
File renamed without changes.
68 changes: 44 additions & 24 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,45 +1,65 @@
import antfu from "@antfu/eslint-config"

const sortImports = {
"perfectionist/sort-imports": [
"error",
{
type: "natural",
internalPattern: ["^@/", "^~/", "^#[a-zA-Z0-9-]+/"],
newlinesBetween: "always",
groups: [
["builtin", "builtin-type"],
["external", "external-type"],
["internal", "internal-type"],
["parent", "parent-type"],
["sibling", "sibling-type"],
["index", "index-type"],
"object",
"unknown",
],
},
],
}

export default antfu({
ignores: ["**/*.json"],
markdown: false,
stylistic: false,
jsonc: false,
jsx: false,
toml: false,
yaml: false,
test: { overrides: { "test/no-import-node-test": "off" } },
typescript: {
tsconfigPath: "tsconfig.json",
overrides: {
"no-console": "off",
"ts/no-use-before-define": "off",
"ts/consistent-type-definitions": "off",
"ts/consistent-type-imports": ["error", { fixStyle: "inline-type-imports" }],
"ts/no-unsafe-argument": "off",
"ts/no-unsafe-assignment": "off",
"node/prefer-global/process": "off",
"antfu/no-top-level-await": "off",
"import/consistent-type-specifier-style": "off",
ignoresTypeAware: ["copy.ts", "*.config.*"],

"perfectionist/sort-imports": [
overridesTypeAware: {
"ts/no-floating-promises": [
"error",
{
type: "natural",
internalPattern: ["^@/", "^~/", "^#[a-zA-Z0-9-]+/"],
newlinesBetween: "always",
groups: [
["builtin", "builtin-type"],
["external", "external-type"],
["internal", "internal-type"],
["parent", "parent-type"],
["sibling", "sibling-type"],
["index", "index-type"],
"object",
"unknown",
allowForKnownSafeCalls: [
{ from: "package", package: "node:test", name: ["describe", "it", "test"] },
],
},
],
},

overrides: {
"no-console": "off",
"antfu/no-top-level-await": "off",
"import/consistent-type-specifier-style": ["error", "prefer-top-level"],
"node/prefer-global/process": "off",
"ts/consistent-type-definitions": "off",
"ts/consistent-type-imports": [
"error",
{ fixStyle: "inline-type-imports", disallowTypeAnnotations: false },
],
"ts/no-unsafe-argument": "off",
"ts/no-unsafe-assignment": "off",
"ts/no-use-before-define": "off",
"unused-imports/no-unused-vars": "off",

...sortImports,
},
},
})
20 changes: 0 additions & 20 deletions knexfile.js

This file was deleted.

20 changes: 0 additions & 20 deletions migrations/20190611171759_create_tables.js

This file was deleted.

25 changes: 0 additions & 25 deletions migrations/20221230042725_anime-lists.js

This file was deleted.

10 changes: 0 additions & 10 deletions migrations/20240616234100_wal.js

This file was deleted.

15 changes: 0 additions & 15 deletions migrations/20240617000000_special_dbs.js

This file was deleted.

2 changes: 2 additions & 0 deletions mise.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[tools]
node = "24"
Loading