Skip to content

Conversation

@damusix
Copy link
Contributor

@damusix damusix commented Dec 28, 2025

@logosdx/hooks - Initial Beta Release

A lightweight, type-safe hook system for extending function behavior with before/after/error extension points.

  • HookEngine class with make(), wrap(), extend(), and clear() methods
  • Extension options: once, ignoreOnFail
  • Context API: setArgs, setResult, returnEarly, fail, removeHook
  • HookError class and isHookError() type guard
  • Comprehensive test suite (45 tests)
  • Full JSDoc documentation

@logosdx/fetch - Major Changes

Breaking Changes

.headers and .params getters now return lowercase method keys

Method keys in the headers/params getters are now normalized to lowercase.

Before:

const { POST: postHeaders } = api.headers;
const { GET: getParams } = api.params;

After:

const { post: postHeaders } = api.headers;
const { get: getParams } = api.params;

Migration: Update any code accessing method-specific headers/params via the getters to use lowercase method names.

Added

  • feat(fetch): Add PropertyStore for unified header/param management with method-specific overrides
  • feat(fetch): Add predicate function support to invalidatePath() for custom cache key matching
  • feat(fetch): Add endpointSerializer and requestSerializer for customizable cache/dedupe keys
  • feat(fetch): Export ResiliencePolicy, DedupePolicy, CachePolicy, RateLimitPolicy classes

Changed

  • refactor(fetch): Internal refactor to use PropertyStore for headers/params (API unchanged)
  • refactor(fetch): Normalize HTTP methods to lowercase internally for consistent storage

damusix and others added 9 commits December 27, 2025 20:26
A lightweight, type-safe hook system for extending function behavior
with before/after/error extension points.

- HookEngine class with make(), wrap(), extend(), and clear() methods
- Extension options: once, ignoreOnFail
- Context API: setArgs, setResult, returnEarly, fail, removeHook
- HookError class and isHookError() type guard
- Comprehensive test suite (45 tests)
- Full JSDoc documentation
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Automates the full release flow:
- Reads session reports for changeset context
- Invokes changeset-writer and git-committer skills
- Pushes branch, creates PR, waits for CI
- Merges feature PR and Version Packages PR
- Merges master to release branch for publish

Includes zx script (.claude/skills/release-workflow/release.mjs)
that handles all git/github automation with proper CI waiting.
A lightweight, type-safe hook system for extending function behavior
with before/after/error extension points.

- HookEngine class with make(), wrap(), extend(), and clear() methods
- Extension options: once, ignoreOnFail
- Context API: setArgs, setResult, returnEarly, fail, removeHook
- HookError class and isHookError() type guard
- Comprehensive test suite (45 tests)
- Full JSDoc documentation
BREAKING CHANGE: `.headers` and `.params` getters now return lowercase
method keys (e.g., `post` instead of `POST`).

- Add PropertyStore for unified header/param management with method overrides
- Add predicate function support to invalidatePath() for custom key matching
- Add endpointSerializer and requestSerializer for customizable cache keys
- Export ResiliencePolicy, DedupePolicy, CachePolicy, RateLimitPolicy
- Refactor engine.ts to use composition via PropertyStore and policies
- Normalize HTTP methods to lowercase internally for consistent storage
- Add comprehensive tests for PropertyStore (36) and serializers (22)
@damusix damusix changed the title feat(hooks): initial beta release of @logosdx/hooks feat: @logosdx/hooks initial release + @logosdx/fetch PropertyStore & policies Jan 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants