Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
c807a34
chore: use pnpm
phanect Mar 6, 2025
faf96d9
chore: apply latest `@phanect/configs` to tsconfigs
phanect Mar 6, 2025
de88615
chore: switch back from Biome to ESLint
phanect Mar 6, 2025
d34bc2b
fix: place `type` before others
phanect Jun 4, 2025
c859ec2
style: fix ESLint warnings & errors
phanect Mar 6, 2025
6564831
feat: drop Node.js 18 and add Node.js 24 support
phanect Jun 5, 2025
9e1b880
chore: fix typo in .npmignore
phanect Oct 11, 2025
a296b90
chore: migrate to mise
phanect Jun 4, 2025
57137c8
chore: replace unbuild with tsdown
phanect Mar 6, 2025
f8fe270
chore: add and update other project configs
phanect Oct 11, 2025
0116885
doc: add `repository` to package.json
phanect Oct 11, 2025
011e360
doc: add dev doc to README
phanect Oct 11, 2025
5e14b65
doc: remove unnecessary comment
phanect Oct 11, 2025
8a0a3f2
ci: upgrade `actions/checkout` to v5.0.0
phanect Oct 11, 2025
f8662b2
ci: extract build process
phanect Oct 11, 2025
85438d9
ci: add missing permission
phanect Oct 11, 2025
21da38e
ci: add timeout minutes
phanect Oct 11, 2025
9c4a54d
ci: add job name
phanect Oct 11, 2025
4eb1367
ci: migrate to mise
phanect Oct 11, 2025
25fcb90
ci: rename file
phanect Oct 11, 2025
73069d7
refactor: remove unnecessary `catch`
phanect Jun 5, 2025
cc4ae6a
feat: remove no longer used `cmd()`
phanect Jun 5, 2025
c7b703e
fix: typo in error message
phanect Oct 11, 2025
942ac17
doc: fix typo in JSDoc
phanect Oct 11, 2025
9c342ef
doc: change license from MIT to Apache-2.0
phanect Oct 11, 2025
b1dd581
chore: v2.0.0
phanect Oct 11, 2025
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
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
# Auto detect text files and enforce LF as linebreaks
* text=auto eol=lf
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @phanect
19 changes: 17 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,28 @@ updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "daily"
interval: "weekly"
assignees:
- "phanect"
groups:
compatible:
applies-to: "version-updates"
update-types:
- "minor"
- "patch"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
interval: "weekly"
assignees:
- "phanect"
groups:
security:
applies-to: "security-updates"
patterns:
- "*"
normal:
applies-to: "version-updates"
patterns:
- "*"
83 changes: 83 additions & 0 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: GitHub Actions

on:
pull_request:
branches:
- main
push:
branches:
- main
release:
types:
- published

permissions:
contents: read

jobs:
build-lint:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: jdx/mise-action@c37c93293d6b742fc901e1406b8f764f6fb19dac # v2.4.4
with:
install: true
cache: true

- run: mise lint
- run: mise build

- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: dist
path: dist
if-no-files-found: error
retention-days: 1
include-hidden-files: true

test:
name: test on Node.js v${{ matrix.node-version }}
runs-on: ubuntu-latest
timeout-minutes: 5
strategy:
matrix:
node-version:
- 20
- 22
- 24
env:
# Override Node.js version over mise.toml
MISE_NODE_VERSION: ${{ matrix.node-version }}
steps:

- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: jdx/mise-action@c37c93293d6b742fc901e1406b8f764f6fb19dac # v2.4.4
with:
install: true
cache: true

- run: mise test

publish:
needs:
- build-lint
- test
if: github.event_name == 'release'
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: jdx/mise-action@c37c93293d6b742fc901e1406b8f764f6fb19dac # v2.4.4
with:
install: true
cache: true

- uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
with:
name: dist
path: dist

- name: Set npm auth token
run: echo "//registry.npmjs.org/:_authToken=${{secrets.NPM_AUTH_TOKEN}}" > ~/.npmrc
- run: mise release
50 changes: 0 additions & 50 deletions .github/workflows/workflow.yaml

This file was deleted.

85 changes: 67 additions & 18 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@
#
# Project-Specific
# Generic
#

# Built files
dist/

#
# System
#

# Logs
logs/
*.log

# PIDs
*.pid
*.seed
Expand All @@ -22,24 +11,84 @@ pids
# File manager configs
.directory
Thumbs.db
*.DS_Store
.DS_Store

# Build directory
build/
dist/

# tmp files
temp/
tmp/

# Logs
logs/
*.log

# Archives
*.zip
*.tar.gz
*.tar.xz
*.tar
*.tgz

# dotenv
.env
.env.*
!.env.example

# SQLite DB
*.db
*.db-journal

# mise
mise.local.toml

#
# JavaScript
#

# NPM / Yarn
# NPM / package managers
node_modules/
.npm/
.yarn-integrity

npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*

# Lockfiles are not required for npm packages
pnpm-lock.yaml
package-lock.json
yarn.lock
bun.lockb
npm-shrinkwrap.json

# tarballs packed by `npm pack`
*.tgz

# Others
# Node.js
.node_repl_history

# TypeScript
*.tsbuildinfo

# Frameworks
.next/
.nuxt/
out/
.svelte-kit/
.astro/

# Platforms
.wrangler/
.dev.vars
worker-configuration.d.ts

.vercel/
.netlify/

# Vite
vite.config.js.timestamp-*
vite.config.ts.timestamp-*

# ESLint
.eslintcache
13 changes: 9 additions & 4 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
# TODO Remove this file if the project is not an npm package
/.github/
/.vscode/
/dist/*.d.mts
/dist/*.d.cts
/test/
src/
test/
tests/
*.config.js
*.config.mjs
*.config.ts
*.tgz
.editorconfig
.eslintrc.cjs
.gitarrtibutes
.gitattributes
.gitignore
build.config.*
tsconfig.json
8 changes: 8 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"recommendations": [
"dbaeumer.vscode-eslint",
"EditorConfig.EditorConfig",
"hverlin.mise-vscode",
"tamasfe.even-better-toml"
]
}
39 changes: 39 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"javascript.preferences.importModuleSpecifierEnding": "js",
"javascript.preferences.quoteStyle": "double",
"typescript.preferences.preferTypeOnlyAutoImports": true,

"eslint.useFlatConfig": true,
"eslint.validate": [
"javascript",
"typescript",
"javascriptreact",
"typescriptreact",
"vue",
"svelte",
"astro",
"html",
"json",
"jsonc",
"json5",
],

"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
"editor.codeActionsOnSave": {
"source.fixAll": "never"
},
"eslint.format.enable": true,
"eslint.codeActionsOnSave.mode": "problems",
"eslint.codeActionsOnSave.rules": [
"@stylistic/arrow-parens",
"@stylistic/quotes",
"@stylistic/semi",
"@stylistic/space-before-blocks",
"@stylistic/space-before-function-paren",
"@stylistic/space-in-parens"
],

"prettier.enable": false
}
7 changes: 0 additions & 7 deletions LICENSE

This file was deleted.

Loading