Skip to content

Comments

Breaking: Extract AbstractApiUtils methods to individual utility files (fixes #71)#72

Merged
taylortom merged 7 commits intomasterfrom
issue/71
Feb 22, 2026
Merged

Breaking: Extract AbstractApiUtils methods to individual utility files (fixes #71)#72
taylortom merged 7 commits intomasterfrom
issue/71

Conversation

@taylortom
Copy link
Collaborator

Summary

  • Extracts all 5 AbstractApiUtils static methods (httpMethodToAction, httpMethodToDBFunction, argsFromReq, generateApiMetadata, stringifyValues) into individual files under lib/utils/
  • AbstractApiUtils retained with deprecated delegation stubs for backwards compatibility
  • Internal consumer AbstractApiModule updated to import directly from lib/utils/
  • New named exports added to index.js for direct access
  • 37 new unit tests (73 total, all passing)
  • Core dependency bumped to ^2.0.0

Test plan

  • All 73 tests pass (36 existing + 37 new)
  • Existing AbstractApiUtils tests still pass via deprecated stubs
  • New tests cover each utility function individually

🤖 Generated with Claude Code

taylortom and others added 4 commits February 21, 2026 17:08
fixes #71)

Move all five static methods (httpMethodToAction, httpMethodToDBFunction,
argsFromReq, generateApiMetadata, stringifyValues) into lib/utils/ as
standalone functions. AbstractApiUtils retained with deprecated delegation
stubs for backwards compatibility. Internal consumer AbstractApiModule
updated to import directly from utils.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
argsFromReq and httpMethodToDBFunction are only used internally by
AbstractApiModule and have no external consumers. Remove them from
the package exports. generateApiMetadata, httpMethodToAction and
stringifyValues are retained as they have external consumers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
httpMethodToAction is only used internally with no external consumers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
taylortom and others added 3 commits February 22, 2026 18:27
stringifyValues is a generic pure function with no API-specific logic.
A deprecated re-export from core is kept for backwards compatibility.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
No longer needed now that stringifyValues has moved to core.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ce method

generateApiMetadata is now an instance method on AbstractApiModule.
AbstractApiUtils has no remaining consumers and is deleted.
generateApiMetadata remains as an internal utility function for testability.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@taylortom taylortom merged commit f014bef into master Feb 22, 2026
1 of 2 checks passed
@taylortom taylortom deleted the issue/71 branch February 22, 2026 19:29
@github-actions
Copy link

🎉 This PR is included in version 2.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant