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
8 changes: 0 additions & 8 deletions .eslintrc.js

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
run: |
npm run format:check

- name: ESLint checks
- name: Oxlint checks
run: |
npm run lint:check

Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
25
26
7 changes: 7 additions & 0 deletions .oxlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"plugins": ["typescript"],
"categories": {
"correctness": "error"
}
}
22 changes: 11 additions & 11 deletions apps/node-fastify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"dev": "tsx --watch ./src/server.ts | pino-pretty",
"build": "tsc -p tsconfig.json",
"start": "NODE_ENV=production node dist/server.js",
"lint": "eslint 'src/**'",
"lint:check": "eslint 'src/**'",
"lint": "oxlint src",
"lint:check": "oxlint src",
"format": "prettier --write src/**",
"format:check": "prettier src/**",
"typecheck": "tsc --noEmit",
Expand All @@ -18,17 +18,17 @@
"author": "Supabase",
"license": "Apache-2.0",
"dependencies": {
"@fastify/autoload": "^6.3.1",
"@fastify/autoload": "^6.5.0",
"@fastify/type-provider-typebox": "^6.1.0",
"@sentry/node": "^10.56.0",
"dotenv": "^18.0.0",
"fastify": "^5.8.5",
"orb-sync-lib": "*",
"fastify-metrics": "^13.2.0"
"@sentry/node": "^10.75.0",
"dotenv": "^18.0.1",
"fastify": "^5.12.5",
"fastify-metrics": "^14.1.0",
"orb-sync-lib": "*"
},
"devDependencies": {
"pino-pretty": "^13.1.3",
"tsx": "^4.22.4",
"vitest": "4.1.11"
"tsx": "^4.23.13",
"vitest": "5.0.1"
}
}
}
15 changes: 10 additions & 5 deletions apps/node-fastify/src/prometheus.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
import client from 'prom-client';
import client from '@prometheus-io/client';

// Avoid duplicate metric registration across test runs or multiple app instances
function getOrCreateCounter(config: { name: string; help: string; labelNames?: string[] }) {
function getOrCreateCounter<T extends string = string>(config: { name: string; help: string; labelNames?: T[] }): client.Counter<T> {
const existing = client.register.getSingleMetric(config.name);
return (existing as client.Counter) ?? new client.Counter(config);
return (existing as client.Counter<T>) ?? new client.Counter<T>(config);
}

function getOrCreateHistogram(config: { name: string; help: string; labelNames?: string[]; buckets?: number[] }) {
function getOrCreateHistogram<T extends string = string>(config: {
name: string;
help: string;
labelNames?: T[];
buckets?: number[];
}): client.Histogram<T> {
const existing = client.register.getSingleMetric(config.name);
return (existing as client.Histogram) ?? new client.Histogram(config);
return (existing as client.Histogram<T>) ?? new client.Histogram<T>(config);
}

function getOrCreateGauge(config: { name: string; help: string; labelNames?: string[] }) {
Expand Down
4 changes: 2 additions & 2 deletions docker/Dockerfile.node-fastify
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Build step
FROM node:25-alpine
FROM node:26-alpine
WORKDIR /app
COPY . .
RUN npm ci
RUN npm run build
RUN npm prune --production

## Build step complete, copy to working image
FROM node:25-alpine
FROM node:26-alpine
WORKDIR /app
ENV NODE_ENV=production
COPY --from=0 /app/apps/node-fastify .
Expand Down
21 changes: 0 additions & 21 deletions eslint.config.mjs

This file was deleted.

Loading
Loading