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

This file was deleted.

91 changes: 23 additions & 68 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,83 +23,38 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: pnpm/action-setup@d9184bf108216479bc5a137cc391f4d7b14c870b # v6.1.0
with:
version: 12.3.4
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24
node-version: 26
registry-url: https://registry.npmjs.org/
package-manager-cache: false
cache: pnpm

- name: Setup git
- name: Bump and push version
if: inputs.upgrade != 'existing'
run: |-
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
pnpm version ${{ inputs.upgrade }} -m "chore: release %s"
git push --follow-tags

- name: Bump version
if: inputs.upgrade != 'existing'
run: npm version ${{ inputs.upgrade }}

- name: Push version
if: inputs.upgrade != 'existing'
run: |-
git push
git push --tags

- run: npm publish
- run: pnpm publish

- name: Prepare build
run: npm i -g pkg

- name: Build
run: pkg --out-path build .

- name: Get version and package name
id: get_info
- name: Build and create release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |-
version=$(node -p "require('./package.json').version")
echo $version
echo "::set-output name=version::$version"
name=$(node -p "require('./package.json').name")
echo $name
echo "::set-output name=name::$name"

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ steps.get_info.outputs.version }}
release_name: Release v${{ steps.get_info.outputs.version }}
draft: false
prerelease: false

- name: Upload Linux Binary
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./build/${{ steps.get_info.outputs.name }}-linux
asset_name: ${{ steps.get_info.outputs.name }}-linux
asset_content_type: application/x-executable

- name: Upload MacOS Binary
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./build/${{ steps.get_info.outputs.name }}-macos
asset_name: ${{ steps.get_info.outputs.name }}-macos
asset_content_type: application/x-mach-binary

- name: Upload Windows Binary
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./build/${{ steps.get_info.outputs.name }}-win.exe
asset_name: ${{ steps.get_info.outputs.name }}-win.exe
asset_content_type: application/x-dosexec
version=$(node -p "require('./package.json').version")
pnpm add --global pkg
pnpm build
pkg --out-path build dist/index.js

gh release create "v$version" \
--title "Release v$version" \
--notes "Release v$version" \
"./build/$name-linux" \
"./build/$name-macos" \
"./build/$name-win.exe"
17 changes: 9 additions & 8 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
name: "Stale"
on:
schedule:
- cron: "0 0 * * *"
- cron: "0 0 * * *"

permissions:
contents: write
issues: write
pull-requests: write

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: "Marked as stale for no activity in the past 60 days. In 7 days it will be closed unless new activity."
stale-pr-message: "Marked as stale for no activity in the past 60 days. In 7 days it will be closed unless new activity."
exempt-issue-labels: "no-stale"
exempt-pr-labels: "no-stale"
- uses: actions/stale@4391f3da665fdf50b6810c1a66712fb9ba21aa93 # v11.0.0
with:
delete-branch: true
49 changes: 20 additions & 29 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,46 +1,37 @@
name: Test

on: [push, pull_request]
on:
push:
branches: [master, main]
pull_request:

concurrency:
group: test-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
test:
name: Test
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macOS-latest]
node: [18, 20]
node: [24, 26]

steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Use Node.js ${{matrix.node}}
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
- uses: pnpm/action-setup@d9184bf108216479bc5a137cc391f4d7b14c870b # v6.1.0
with:
node-version: ${{ matrix.node }}
- name: npm install and test
run: |
npm install
npm test
env:
CI: true

coverage:
name: Coverage (Coveralls)
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
version: 12.3.4
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 20
- run: |
npm install
npm test
env:
CI: true
- name: Coveralls
if: success()
uses: coverallsapp/github-action@8d6379e14d29928660c4ba802d8e85393440b329 # v2.3.8
with:
github-token: ${{secrets.GITHUB_TOKEN}}
node-version: ${{ matrix.node }}
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm run lint
- run: pnpm test
12 changes: 7 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# MacOS
.DS_STORE

# Node, npm & CI
# Node
node_modules
coverage
.nyc_output
build
dist
*.tsbuildinfo

# Build
build
# Test-generated certificate directories
test/custom-folder/
test/custom\ folder/
7 changes: 7 additions & 0 deletions .oxfmtrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"$schema": "./node_modules/oxfmt/configuration_schema.json",
"semi": false,
"arrowParens": "avoid",
"singleQuote": false,
"sortImports": true
}
18 changes: 18 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Contributing

Thanks for reading this document!

Contributions are welcome, but I have little time to invest in this project. I ask you to test the change extensively to make my review as easier and possible, and I apologize in advance if it will take me some time to review it.

## Helpful commands

```sh
# install dependencies
pnpm install

# type checking and style fixes
pnpm lint

# run tests
pnpm test
```
Loading
Loading