Skip to content

Commit 3f022d3

Browse files
committed
fix ESM crash on startup, move to Node 24 and update dependencies
uuid 13 is ESM-only and could not be required from the CommonJS build on Node 18, crashing the container on startup. - replace uuid with crypto.randomUUID - replace archiver + archiver-zip-encrypted with @zip.js/zip.js (AES-256, streaming), implement decompressFile - Node 18 -> 24 in Dockerfile and CI - update all dependencies, regenerate package-lock, remove yarn.lock - migrate to ESLint 10 flat config, TypeScript 6 - bump GitHub Actions to current majors - version 1.1.0
1 parent a2fb149 commit 3f022d3

19 files changed

Lines changed: 3266 additions & 10020 deletions

.eslintignore

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

.eslintrc.js

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

.github/workflows/docker-publish.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,17 @@ jobs:
2020

2121
steps:
2222
- name: Checkout repository
23-
uses: actions/checkout@v3
23+
uses: actions/checkout@v7
2424
- name: Log in to the Container registry
25-
uses: docker/login-action@v2
25+
uses: docker/login-action@v4
2626
with:
2727
registry: ${{ env.REGISTRY }}
2828
username: ${{ github.actor }}
2929
password: ${{ secrets.GITHUB_TOKEN }}
3030

3131
- name: Extract metadata (tags, labels) for Docker
3232
id: meta
33-
uses: docker/metadata-action@v4
33+
uses: docker/metadata-action@v6
3434
with:
3535
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
3636
tags: |
@@ -43,7 +43,7 @@ jobs:
4343
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
4444
4545
- name: Build and push Docker image
46-
uses: docker/build-push-action@v4
46+
uses: docker/build-push-action@v7
4747
with:
4848
context: .
4949
push: ${{ github.event_name != 'pull_request' }}

.github/workflows/test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ jobs:
1212

1313
steps:
1414
- name: Checkout repository
15-
uses: actions/checkout@v3
15+
uses: actions/checkout@v7
1616

1717
- name: Set up Node.js
18-
uses: actions/setup-node@v3
18+
uses: actions/setup-node@v7
1919
with:
20-
node-version: '18'
20+
node-version: '24'
2121
cache: 'npm'
2222

2323
- name: Install dependencies

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Build stage
2-
FROM node:18-slim AS build
2+
FROM node:24-slim AS build
33

44
# Set working directory
55
WORKDIR /app
@@ -14,7 +14,7 @@ RUN npm ci --ignore-scripts
1414
RUN npx tsc -p ./tsconfig.json
1515

1616
# Production stage
17-
FROM node:18-slim
17+
FROM node:24-slim
1818

1919
# Set working directory
2020
WORKDIR /app

eslint.config.mjs

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import js from '@eslint/js';
2+
import globals from 'globals';
3+
import tseslint from 'typescript-eslint';
4+
5+
export default tseslint.config(
6+
{
7+
ignores: ['dist/', 'node_modules/', 'coverage/', 'tmp/', 'temp/', 'backups/', 'jest.config.js', 'eslint.config.mjs'],
8+
},
9+
js.configs.recommended,
10+
tseslint.configs.recommended,
11+
{
12+
languageOptions: {
13+
globals: { ...globals.node, ...globals.jest },
14+
},
15+
rules: {
16+
'no-console': 'warn',
17+
'@typescript-eslint/explicit-function-return-type': 'off',
18+
'@typescript-eslint/no-explicit-any': 'warn',
19+
'@typescript-eslint/no-unused-vars': [
20+
'error',
21+
{
22+
argsIgnorePattern: '^_',
23+
varsIgnorePattern: '^_',
24+
},
25+
],
26+
semi: ['error', 'always'],
27+
quotes: ['warn', 'single', { avoidEscape: true }],
28+
},
29+
},
30+
);

jest.config.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
module.exports = {
2-
preset: "ts-jest",
2+
transform: {
3+
"^.+\\.ts$": [
4+
"ts-jest",
5+
{ tsconfig: { rootDir: ".", types: ["node", "jest"] } },
6+
],
7+
},
38
testEnvironment: "node",
49
roots: ["<rootDir>/src", "<rootDir>/tests"],
510
testMatch: ["**/*.test.ts"],

0 commit comments

Comments
 (0)