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: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://raw.githubusercontent.com/devcontainers/spec/main/schemas/devContainer.base.schema.json",
"name": "default",
"image": "node:20-bookworm",
"image": "node:24-bookworm",
"features": {
"ghcr.io/devcontainers/features/github-cli:1": {},
"ghcr.io/devcontainers/features/sshd:1": {}
Expand Down
13 changes: 11 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,27 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- {uses: actions/setup-node@v4, with: {node-version: 20, cache: 'npm'}}
- {uses: actions/setup-node@v4, with: {node-version-file: ./package.json, cache: 'npm'}}
- run: npm install
- run: npm run lint

jest:
name: Run unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- {uses: actions/setup-node@v4, with: {node-version-file: ./package.json, cache: 'npm'}}
- run: npm install
- run: npm run test

dist-built:
name: Check distributive built state
runs-on: ubuntu-latest
outputs:
dist-changed: ${{ steps.state.outputs.changed }}
steps:
- uses: actions/checkout@v5
- {uses: actions/setup-node@v4, with: {node-version: 20, cache: 'npm'}}
- {uses: actions/setup-node@v4, with: {node-version-file: ./package.json, cache: 'npm'}}
- run: npm install
- run: npm run build
- uses: actions/upload-artifact@v4
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
.DEFAULT_GOAL := build
.MAIN := build

NODE_IMAGE = node:20-alpine
NODE_IMAGE = node:24-alpine
RUN_ARGS = --rm -v "$(shell pwd):/src:rw" \
-t --workdir "/src" \
-u "$(shell id -u):$(shell id -g)" \
Expand Down
6 changes: 3 additions & 3 deletions dist/index.js

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions dist/package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 27 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import {defineConfig} from "eslint/config";
import globals from "globals";
import path from "node:path";
import {fileURLToPath} from "node:url";
import js from "@eslint/js";
import {FlatCompat} from "@eslint/eslintrc";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});

export default defineConfig([{
extends: compat.extends("eslint:recommended"),
languageOptions: {
globals: {
...globals.commonjs,
...globals.node,
},
ecmaVersion: 2020,
sourceType: "module",
},
rules: {},
}]);
13 changes: 13 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// See: https://jestjs.io/docs/configuration

/** @returns {Promise<import('jest').Config>} */
export default async () => {
return {
clearMocks: true,
moduleFileExtensions: ['js'],
testEnvironment: 'node',
testMatch: ['**/*.test.js'],
testPathIgnorePatterns: ['/dist/', '/node_modules/'],
verbose: true,
};
};
Loading