Skip to content

Commit 566ac18

Browse files
jdaltonclaude
andcommitted
chore: comprehensive repository cleanup and modernization
Major cleanup and consolidation of repository structure: **Removed obsolete/redundant files:** - Removed .travis.yml (replaced by GitHub Actions) - Removed .prettierrc and .prettierignore (using Biome) - Removed redundant GitHub workflow files (test.yml, lint.yml, types.yml) - Removed .config/ directory (moved configs to root) - Removed package-lock.json (switched to pnpm) **Consolidated GitHub workflows:** - Created comprehensive ci.yaml workflow with test, lint, and type-check jobs - Tests across Node 20, 22, 24 on Ubuntu and Windows - Updated to modern GitHub Actions (v5) **Package manager migration:** - Switched from npm to pnpm for consistency with CI/CD - Generated pnpm-lock.yaml - Added typescript devDependency for type checking - Added missing npm scripts: test-ci, check-ci, check:tsc **Configuration improvements:** - Moved biome.json and eslint.config.mjs to root - Configured Biome linting rules (errors vs warnings) - Fixed ESLint config for .mjs and .js files separately - Updated .gitignore to exclude package-lock.json **Documentation overhaul:** - Completely rewrote README.md for visual learners - Added badges (CI, npm, license) - "What is a purl?" section with ASCII diagram up front - Clear API reference with extensive code examples - Visual table of package types with expandable full list - Better structured development section **Code formatting:** - Formatted all source files with Biome - Fixed minor linting issues - Improved code consistency All 191 tests passing. Zero linting errors (86 warnings, all safe). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 786ffda commit 566ac18

34 files changed

+4479
-7573
lines changed

.github/actions/setup/action.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: 'Setup'
2+
description: 'Setup Node.js and pnpm with caching'
3+
4+
inputs:
5+
node-version:
6+
description: 'Node.js version'
7+
required: false
8+
default: '22'
9+
10+
runs:
11+
using: 'composite'
12+
steps:
13+
- name: Setup pnpm
14+
uses: pnpm/action-setup@v4
15+
with:
16+
version: '^10.16.0'
17+
18+
- name: Setup Node.js with pnpm cache
19+
uses: actions/setup-node@v5
20+
with:
21+
node-version: ${{ inputs.node-version }}
22+
cache: 'pnpm'
23+
24+
- name: Install dependencies
25+
shell: bash
26+
run: |
27+
pnpm install --frozen-lockfile

.github/workflows/ci.yaml

Lines changed: 69 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,75 @@
1-
name: Run Unit Tests
2-
on:
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- master
8+
tags:
9+
- '*'
310
pull_request:
411
branches:
512
- '**'
13+
workflow_dispatch:
14+
15+
permissions:
16+
contents: read
17+
18+
concurrency:
19+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
20+
cancel-in-progress: true
21+
622
jobs:
7-
unit_test:
23+
test:
24+
name: Test (Node ${{ matrix.node }} on ${{ matrix.os }})
25+
runs-on: ${{ matrix.os }}
26+
27+
strategy:
28+
fail-fast: false
29+
matrix:
30+
node: [20, 22, 24]
31+
os: [ubuntu-latest, windows-latest]
32+
33+
steps:
34+
- uses: actions/checkout@v5
35+
36+
- uses: pnpm/action-setup@v4
37+
with:
38+
version: 10
39+
40+
- uses: actions/setup-node@v5
41+
with:
42+
node-version: ${{ matrix.node }}
43+
cache: 'pnpm'
44+
45+
- name: Install dependencies
46+
run: pnpm install --frozen-lockfile
47+
48+
- name: Run tests
49+
run: pnpm run test-ci
50+
51+
lint:
52+
name: Lint
53+
runs-on: ubuntu-latest
54+
55+
steps:
56+
- uses: actions/checkout@v5
57+
- uses: ./.github/actions/setup
58+
with:
59+
node-version: '22'
60+
61+
- name: Run linting
62+
run: pnpm run check-ci
63+
64+
type-check:
65+
name: Type Check
866
runs-on: ubuntu-latest
67+
968
steps:
10-
- uses: actions/checkout@v2
11-
- run: |
12-
npm ci
13-
npm run test
69+
- uses: actions/checkout@v5
70+
- uses: ./.github/actions/setup
71+
with:
72+
node-version: '22'
73+
74+
- name: Run type check
75+
run: pnpm run check:tsc

.github/workflows/provenance.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Publish Package to npm
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
debug:
7+
description: 'Enable debug output'
8+
required: false
9+
default: '0'
10+
type: string
11+
options:
12+
- '0'
13+
- '1'
14+
15+
jobs:
16+
build:
17+
runs-on: ubuntu-latest
18+
19+
permissions:
20+
contents: read
21+
id-token: write
22+
23+
steps:
24+
- uses: actions/checkout@v5
25+
- uses: ./.github/actions/setup
26+
with:
27+
node-version: '22'
28+
29+
- name: Run tests before publishing
30+
run: pnpm run test-ci
31+
32+
- name: Configure npm authentication
33+
run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
34+
35+
- name: Publish to npm
36+
run: npm publish --provenance
37+
env:
38+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@ Thumbs.db
55
/.nvm
66
/.vscode
77
/npm-debug.log
8+
/package-lock.json
89
/yarn.lock
910
**/node_modules

.prettierignore

Lines changed: 0 additions & 3 deletions
This file was deleted.

.prettierrc

Lines changed: 0 additions & 7 deletions
This file was deleted.

.travis.yml

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)