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
12 changes: 9 additions & 3 deletions .claude/skills/add-helper/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ name/behavior first if it wasn't already specified.
caution. `array`/`object` having *intentionally duplicated* `compact`/`equalsShallow` is the
one deliberate exception — see `AGENTS.md`.

## 2. Create the four files
## 2. Create the files

Follow `CONTRIBUTING.md`'s "Creating a new helper" section (Steps 1–3) for the exact file
Follow `CONTRIBUTING.md`'s "Creating a new helper" section (Steps 1–3, 5) for the exact file
templates:

- `helpers/<category>/<name>.ts` — implementation + LGPL-3.0-or-later license header + JSDoc
Expand All @@ -41,6 +41,10 @@ templates:
- `helpers/<category>/<name>.example.ts` — a `HelperExamples` default export (see
`scripts/examples/types.ts`) with ≥2 examples, each with a `title`, `description`, `code`
string, and a throwing `assert()`
- `helpers/<category>/<name>.bench.ts` — **optional**; match the category's own convention rather
than guessing: `ls helpers/<category>/*.bench.ts | wc -l` vs. the function count tells you
whether that category typically has one or typically doesn't. `vitest bench` supports async
callbacks, so a helper that `await`s real work isn't a reason to skip it.

Do **not** hand-edit `helpers/<category>/index.ts` — it's generated at build time and
gitignored; the build discovers new files automatically.
Expand All @@ -56,7 +60,9 @@ pnpm typecheck && pnpm lint && pnpm test:coverage && pnpm build && pnpm coherenc
```

All must pass. Check `pnpm test:coverage`'s per-file output for the new files specifically —
100% on the aggregate can hide a gap in exactly the file just added.
100% on the aggregate can hide a gap in exactly the file just added. If a `.bench.ts` was added,
also run `npx vitest bench helpers/<category>/<name>.bench.ts --run` to confirm it executes
cleanly (`pnpm bench` on its own runs the *entire* suite, slow and unnecessary for one file).

## 4. Commit

Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -281,9 +281,13 @@ jobs:
- name: Package build metadata for website
if: ${{ !inputs.dry-run }}
run: |
# Package all meta/ directories for the website to consume
# Package all meta/ directories plus each category's llms.txt for the website to
# consume — llms.txt lives at build/<category>/llms.txt, outside meta/, so it needs
# its own match; without it, generate-typescript-docs.js silently skips regenerating
# llms-full.txt (warns "not found", never fails the workflow) and the site keeps
# serving whatever version it last had, indefinitely.
cd build
find . -path '*/meta/*.json' | tar -czf /tmp/build-meta.tar.gz -T -
find . \( -path '*/meta/*.json' -o -name 'llms.txt' \) | tar -czf /tmp/build-meta.tar.gz -T -
echo "📦 Packaged build metadata ($(du -h /tmp/build-meta.tar.gz | cut -f1))"

- name: Create verified tag and GitHub Release
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
persist-credentials: false

- name: Run analysis
uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a
uses: ossf/scorecard-action@2d1146689b8cda280b9bc96326124645441f03bc
with:
results_file: results.sarif
results_format: sarif
Expand All @@ -39,6 +39,6 @@ jobs:
retention-days: 5

- name: Upload to code-scanning
uses: github/codeql-action/upload-sarif@7188fc363630916deb702c7fdcf4e481b751f97a
uses: github/codeql-action/upload-sarif@e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81
with:
sarif_file: results.sarif
2 changes: 1 addition & 1 deletion .template/bundle/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@helpers4/all",
"version": "{{version}}",
"description": "Complete collection of helpers4 utilities - all categories in one convenient package.",
"author": "baxyz <baxy@etik.com>",
"author": "baxyz <craft@baxyz.dev>",
"license": "LGPL-3.0",
"homepage": "https://helpers4.dev/typescript/",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion .template/category/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@helpers4/{{category}}",
"version": "{{version}}",
"description": "A set of helpers in TS/JS, compatible with tree-shaking, for {{category}}.",
"author": "baxyz <baxy@etik.com>",
"author": "baxyz <craft@baxyz.dev>",
"license": "LGPL-3.0",
"homepage": "https://helpers4.dev/typescript/categories/{{category}}/",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ helpers/
config.json # Category metadata
```

Categories: `array`, `ci`, `color`, `commit`, `date`, `function`, `guard`, `id`, `markdown`, `node`, `number`, `object`, `observable`, `promise`, `string`, `type`, `url`, `version`.
Categories: `array`, `ci`, `color`, `commit`, `date`, `function`, `guard`, `id`, `map`, `markdown`, `node`, `number`, `object`, `observable`, `promise`, `set`, `string`, `type`, `url`, `version`.

## Creating a new helper

Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,22 @@ Install only what you need, or grab everything at once:
| Package | Description | Install |
|---------|-------------|---------|
| [`@helpers4/all`](https://www.npmjs.com/package/@helpers4/all) | Complete collection — all categories in one package | `npm i @helpers4/all` |
| [`@helpers4/array`](https://www.npmjs.com/package/@helpers4/array) | Array operations, chunking, comparison, and manipulation | `npm i @helpers4/array` |
| [`@helpers4/array`](https://www.npmjs.com/package/@helpers4/array) | Array operations, chunking, comparison, manipulation, and async iteration | `npm i @helpers4/array` |
| [`@helpers4/ci`](https://www.npmjs.com/package/@helpers4/ci) | CI/CD workflow status formatting for PR comments and pipeline reports | `npm i @helpers4/ci` |
| [`@helpers4/color`](https://www.npmjs.com/package/@helpers4/color) | Color conversion and validation utilities | `npm i @helpers4/color` |
| [`@helpers4/commit`](https://www.npmjs.com/package/@helpers4/commit) | Conventional Commits parsing, validation, and analysis | `npm i @helpers4/commit` |
| [`@helpers4/date`](https://www.npmjs.com/package/@helpers4/date) | Date utilities, comparison, and validation | `npm i @helpers4/date` |
| [`@helpers4/function`](https://www.npmjs.com/package/@helpers4/function) | Function composition and utility wrappers | `npm i @helpers4/function` |
| [`@helpers4/guard`](https://www.npmjs.com/package/@helpers4/guard) | Runtime type guard utilities | `npm i @helpers4/guard` |
| [`@helpers4/id`](https://www.npmjs.com/package/@helpers4/id) | Unique identifier generation (UUID v7, etc.) | `npm i @helpers4/id` |
| [`@helpers4/map`](https://www.npmjs.com/package/@helpers4/map) | Native `Map` manipulation utilities | `npm i @helpers4/map` |
| [`@helpers4/markdown`](https://www.npmjs.com/package/@helpers4/markdown) | Markdown formatting and escaping utilities | `npm i @helpers4/markdown` |
| [`@helpers4/node`](https://www.npmjs.com/package/@helpers4/node) | Node.js runtime utilities (Buffer, etc.) | `npm i @helpers4/node` |
| [`@helpers4/number`](https://www.npmjs.com/package/@helpers4/number) | Numeric operations and formatting | `npm i @helpers4/number` |
| [`@helpers4/object`](https://www.npmjs.com/package/@helpers4/object) | Object manipulation, deep comparison, and merging | `npm i @helpers4/object` |
| [`@helpers4/observable`](https://www.npmjs.com/package/@helpers4/observable) | RxJS Observable helpers and operators | `npm i @helpers4/observable` |
| [`@helpers4/promise`](https://www.npmjs.com/package/@helpers4/promise) | Promise utilities, retry, delay, and error handling | `npm i @helpers4/promise` |
| [`@helpers4/promise`](https://www.npmjs.com/package/@helpers4/promise) | Promise utilities — retry, delay, concurrency limiting, mutex/semaphore, and error handling | `npm i @helpers4/promise` |
| [`@helpers4/set`](https://www.npmjs.com/package/@helpers4/set) | Native `Set` manipulation utilities | `npm i @helpers4/set` |
| [`@helpers4/string`](https://www.npmjs.com/package/@helpers4/string) | String manipulation — capitalize, slugify, camelCase, etc. | `npm i @helpers4/string` |
| [`@helpers4/type`](https://www.npmjs.com/package/@helpers4/type) | Compile-time TypeScript utility types | `npm i @helpers4/type` |
| [`@helpers4/url`](https://www.npmjs.com/package/@helpers4/url) | URL parsing, manipulation, and normalization | `npm i @helpers4/url` |
Expand Down
Loading
Loading