Skip to content

feat: new util stringifyParams#44

Merged
fratzinger merged 2 commits into
mainfrom
feat/new-util-stringify-params
Jul 2, 2026
Merged

feat: new util stringifyParams#44
fratzinger merged 2 commits into
mainfrom
feat/new-util-stringify-params

Conversation

@fratzinger

Copy link
Copy Markdown
Member

This pull request introduces several new utility functions to the src/common directory, improves test organization, and refactors the cache hook to use a safer and more robust parameter stringification strategy. It also updates documentation and dependency management to reflect these changes.

New utility functions and testing improvements:

  • Added new utilities: hasOwnProperty, toArray, early, and isPlainObject in src/common, each with in-source Vitest tests for improved maintainability and coverage. [1] [2] [3] [4]
  • Moved the clone utility's tests into in-source Vitest blocks and removed the separate test file, streamlining test code and reducing file clutter. [1] [2]

Cache hook improvements:

  • Replaced the custom stableStringify function with the new stringifyParams utility (which uses safe-stable-stringify) for serializing cache keys, making cache key generation crash-safe and more robust to edge cases like circular references and non-JSON values. Updated documentation and type hints accordingly. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]

Internal codebase refactoring:

  • Updated all hooks that previously imported toArray from internal.utils to now import it from the new common location, reflecting its promotion to a public utility. [1] [2] [3] [4]

Documentation and dependency updates:

  • Added a new CLAUDE.md file detailing the project's structure, conventions, and commands, providing clear guidance for contributors.
  • Added the safe-stable-stringify dependency and updated pnpm-lock.yaml accordingly. [1] [2] [3] [4]

These changes improve utility discoverability, make the codebase more robust and maintainable, and enhance documentation for current and future contributors.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 2, 2026

Copy link
Copy Markdown

Deploying feathers-utils with  Cloudflare Pages  Cloudflare Pages

Latest commit: 5ebecdb
Status: ✅  Deploy successful!
Preview URL: https://c41aa884.feathers-utils.pages.dev
Branch Preview URL: https://feat-new-util-stringify-para.feathers-utils.pages.dev

View logs

@fratzinger fratzinger merged commit 41bb820 into main Jul 2, 2026
9 checks passed
@fratzinger fratzinger deleted the feat/new-util-stringify-params branch July 2, 2026 08:05
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.

1 participant