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

This file was deleted.

14 changes: 7 additions & 7 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: daily
time: "04:00"
open-pull-requests-limit: 10
versioning-strategy: increase-if-necessary
- package-ecosystem: npm
directory: '/'
schedule:
interval: daily
time: '04:00'
open-pull-requests-limit: 10
versioning-strategy: increase-if-necessary
116 changes: 51 additions & 65 deletions .github/workflows/test-and-release.yml
Original file line number Diff line number Diff line change
@@ -1,70 +1,56 @@
name: Test and Release

# Run this job on all pushes and pull requests
# as well as tags with a semantic version
on:
push:
branches:
- "*"
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
pull_request: {}
push:
branches: [master]
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
pull_request: {}

jobs:
# Runs tests on all supported node versions and OSes
tests:
if: contains(github.event.head_commit.message, '[skip ci]') == false

runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [18.x, 20.x, 22.x]
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Install package
run: npm i

- name: Run unit tests
run: npm run test

# Deploys the final package to NPM
deploy:
needs: [tests]
permissions:
contents: read

# Trigger this step only when a commit on master is tagged with a version number
if: |
contains(github.event.head_commit.message, '[skip ci]') == false &&
github.event_name == 'push' &&
github.event.base_ref == 'refs/heads/master' &&
startsWith(github.ref, 'refs/tags/v')

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version-file: '.nvmrc'

- name: Install package
run: npm i

- name: Publish package to npm
run: |
npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}
npm whoami
npm publish

# Dummy job for skipped builds - without this, github reports the build as failed
skip-ci:
if: contains(github.event.head_commit.message, '[skip ci]')
runs-on: ubuntu-latest
steps:
- name: Skip build
run: echo "Build skipped!"
jobs:
tests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [22.x, 24.x]
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm

- name: Install package
run: npm ci

- name: Validate package
run: npm run check

deploy:
needs: [tests]

if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
registry-url: 'https://registry.npmjs.org'

- name: Install package
run: npm ci

- name: Publish package to npm
run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
14 changes: 14 additions & 0 deletions .oxfmtrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"$schema": "./node_modules/oxfmt/configuration_schema.json",
"printWidth": 120,
"semi": true,
"tabWidth": 4,
"useTabs": false,
"trailingComma": "none",
"singleQuote": true,
"endOfLine": "lf",
"bracketSpacing": true,
"arrowParens": "avoid",
"quoteProps": "as-needed",
"ignorePatterns": ["build/**", "node_modules/**", "package-lock.json"]
}
29 changes: 29 additions & 0 deletions .oxlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"categories": {
"correctness": "error"
},
"plugins": ["typescript", "unicorn", "oxc", "import", "promise", "node"],
"env": {
"es6": true,
"node": true
},
"ignorePatterns": ["build/**", "node_modules/**"],
"options": {
"denyWarnings": true,
"reportUnusedDisableDirectives": "error",
"typeAware": true
},
"rules": {
"eqeqeq": "error",
"no-console": "off",
"no-unused-vars": ["error", { "argsIgnorePattern": "^_" }],
"no-var": "error",
"prefer-const": "error",
"typescript/consistent-type-exports": "error",
"typescript/consistent-type-imports": "error",
"typescript/no-explicit-any": "error",
"typescript/no-floating-promises": "error",
"typescript/no-misused-promises": "error"
}
}
12 changes: 0 additions & 12 deletions .prettierrc.json

This file was deleted.

Loading