Skip to content
Merged
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
3 changes: 2 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ max_line_length = 120
indent_size = 2
insert_final_newline = true

[*.{json,jsonc,md,yml}]
[*.{json,jsonc,md,yml,yaml}]
indent_style = space
indent_size = 2
insert_final_newline = true
32 changes: 32 additions & 0 deletions .github/workflows/build-and-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Build and Test

on:
# push:
# branches:
# - master
pull_request:
branches:
- master
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v5

- name: Install pnpm
uses: pnpm/action-setup@v4

- name: Set up Node.js
uses: actions/setup-node@v5
with:
node-version: "lts/*"
cache: "pnpm"

- name: Install dependencies in CI mode
run: pnpm run ci

- name: Build
run: pnpm run build
44 changes: 44 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Publish

on:
release:
types: [published]

jobs:
publish:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v5

- name: Install pnpm
uses: pnpm/action-setup@v4

- name: Set up Node.js
uses: actions/setup-node@v5
with:
node-version: "lts/*"
cache: "pnpm"
registry-url: "https://registry.npmjs.org"

- name: Install dependencies in CI mode
run: pnpm run ci

- name: Build
run: pnpm run build

- name: Configure npm auth
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
cat <<'EOF' > ~/.npmrc
@ulfsoft:registry=https://registry.npmjs.org/
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
provenance=true
EOF

- name: Publish package
env:
GIT_REF: ${{ github.ref }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: pnpm publish --access public --no-git-checks --tag ${GIT_REF}
27 changes: 21 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,24 @@
node_modules
.DS_Store
# build output
dist/

# generated types
.astro/

# dependencies
node_modules/

*-lock.*
*.lock
# logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*

*.log
# environment variables
.env
.env.production

# macOS-specific files
.DS_Store

dist
# jetbrains setting folder
.idea/
25 changes: 13 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,29 @@
"description": "A toolkit for building resilient and scalable applications.",
"private": false,
"type": "module",
"main": "dist/index.cjs",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"exports": {
".": {
"import": "./dist/index.mjs",
"require": "./dist/index.cjs",
"types": "./dist/index.d.ts"
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"require": "./dist/index.cjs"
}
},
"sideEffects": false,
"files": [
"dist"
],
"scripts": {
"build": "tsc -p tsconfig.json",
"build:watch": "tsc -w -p tsconfig.json",
"build": "rimraf dist && tsup src/index.ts --dts --format esm,cjs --out-dir dist",
"build:watch": "tsup src/index.ts --dts --format esm,cjs --out-dir dist --watch",
"typecheck": "tsc --noEmit -p tsconfig.json",
"clean": "rimraf dist",
"lint": "biome check .",
"prepare": "pnpm build",
"test": "pnpm vitest --run",
"test": "vitest --run",
"format": "biome format . --write",
"prepublishOnly": "pnpm run build && pnpm run typecheck"
"ci": "pnpm install && pnpm run lint && pnpm run typecheck && pnpm run test"
},
"publishConfig": {
"access": "public"
Expand All @@ -46,10 +46,11 @@
"url": "https://ulfsoft.com"
},
"license": "Apache-2.0",
"packageManager": "pnpm@10.13.1",
"packageManager": "pnpm@10.18.0",
"devDependencies": {
"@biomejs/biome": "2.2.4",
"rimraf": "^6.0.1",
"tsup": "^8.3.0",
"typescript": "^5.6.3",
"vitest": "^3.2.4"
}
Expand Down
Loading