Skip to content
Open
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
2 changes: 0 additions & 2 deletions .eslintignore

This file was deleted.

36 changes: 0 additions & 36 deletions .eslintrc.cjs

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/build-and-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ jobs:

steps:
- name: Checkout Repository
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Set up Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: '18.x.x'
node-version: '22.13.0'

- name: Install Dependencies
run: npm ci
Expand Down
27 changes: 8 additions & 19 deletions .github/workflows/eslint-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,35 +7,24 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Set up Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: '18.x.x'
node-version: '22.13.0'

- name: Install Dependencies
run: npm install
run: npm ci

- name: Run ESLint
id: eslint
continue-on-error: true
run: |
ESLINT_OUTPUT=$(npx eslint . --ext .js,.jsx,.ts,.tsx)
echo "::set-output name=result::$ESLINT_OUTPUT"
if [ -z "$ESLINT_OUTPUT" ]; then
echo "ESLint found no issues :white_check_mark:"
echo "::set-output name=status::success"
else
echo "$ESLINT_OUTPUT"
echo "::set-output name=status::failure"
exit 1
fi
run: npx eslint .

- name: Success Message
if: steps.eslint.outputs.status == 'success'
run: echo "ESLint check passed successfully!"
if: success()
run: echo "ESLint check passed successfully."

- name: Failure Message
if: failure()
run: echo "ESLint check failed. Please fix the issues."
run: echo "ESLint check failed. Please fix the issues."
12 changes: 8 additions & 4 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,24 @@ on:
jobs:
testing:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: ['22.13.0', '24.0.0']

steps:
- name: Checkout Repository
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Set up Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: '18.x.x'
node-version: ${{ matrix.node-version }}

- name: Install dependencies
run: npm ci

- name: Run unit tests
run: npm run unit:test
env:
CI: true
CI: true
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
# 6.0.0

_Breaking Changes:_

- Dropped support for Node.js 18, Node.js 20, and early Node.js 22 releases. Supported runtimes are now Node.js 22.13.0 or newer on the 22.x line, and Node.js 24.x.

_Dependency Updates:_

- Updated `multer` to the current 2.x release line and `uuid` to the current 14.x release line.
- Updated direct production dependencies including `dotenv`, `express`, `express-rate-limit`, `https-proxy-agent`, `puppeteer`, and `zod` to their current major release lines.
- Updated direct development tooling including ESLint, Jest, and lint-staged to their current major release lines.
- Kept `jsdom` on the latest 24.x release because the current 29.x line introduces ESM-only transitive modules that are not compatible with the existing Jest runtime setup.
- Refreshed compatible production and development dependency ranges and lockfile resolutions so `npm audit` reports no known vulnerabilities.

_Maintenance:_

- Updated GitHub Actions to current action versions.
- Migrated ESLint configuration to the flat config format required by current ESLint releases.
- Added unit-test CI coverage for the minimum supported Node.js versions.
- Regenerated distribution bundles under the minimum supported Node.js version.

# 5.1.0

_New Features:_
Expand Down
4 changes: 2 additions & 2 deletions dist/index.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.esm.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.esm.js.map

Large diffs are not rendered by default.

62 changes: 62 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
import os from 'node:os';

import js from '@eslint/js';
import eslintConfigPrettier from 'eslint-config-prettier';
import importPlugin from 'eslint-plugin-import-x';
import prettierPlugin from 'eslint-plugin-prettier';
import globals from 'globals';

export default [
{
linterOptions: {
reportUnusedDisableDirectives: false
}
},
{
ignores: ['node_modules/**', 'dist/**']
},
js.configs.recommended,
eslintConfigPrettier,
{
files: ['**/*.{js,cjs,mjs}'],
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
globals: {
...globals.browser,
...globals.node,
...globals.es2021
}
},
plugins: {
import: importPlugin,
prettier: prettierPlugin
},
rules: {
'no-unused-vars': 0,
'no-useless-assignment': 0,
'import/no-cycle': ['error', { ignoreExternal: true }],
'import/no-unresolved': ['error', { ignore: ['^uuid$'] }],
'prettier/prettier': [
'error',
{
endOfLine: os.EOL === '\r\n' ? 'crlf' : 'lf'
}
]
}
},
{
files: ['**/*.cjs'],
languageOptions: {
sourceType: 'commonjs'
}
},
{
files: ['**/*.test.js', '**/*.spec.js'],
languageOptions: {
globals: {
...globals.jest
}
}
}
];
4 changes: 1 addition & 3 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
export default {
testEnvironment: 'jest-environment-node',
testMatch: ['**/tests/unit/**/*.test.js'],
transform: {
// '^.+\\.test.js?$': 'babel-jest'
}
transform: {}
};
2 changes: 1 addition & 1 deletion lib/server/rate_limit.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ See LICENSE file in root for details.

*******************************************************************************/

import rateLimit from 'express-rate-limit';
import { rateLimit } from 'express-rate-limit';

import { log } from '../logger.js';

Expand Down
Loading