Skip to content

Comments

Update: Extract ServerUtils static methods into lib/utils/ individual files (fixes #55)#56

Merged
taylortom merged 1 commit intomasterfrom
issue/55
Feb 21, 2026
Merged

Update: Extract ServerUtils static methods into lib/utils/ individual files (fixes #55)#56
taylortom merged 1 commit intomasterfrom
issue/55

Conversation

@taylortom
Copy link
Collaborator

Summary

  • Extract 5 pure utility functions (getAllRoutes, generateRouterMap, addExistenceProps, mapHandler, cacheRouteConfig) from ServerUtils static class into individual files under lib/utils/
  • Add barrel file lib/utils.js and export utilities as named exports from index.js
  • Update Router.js to import addExistenceProps, cacheRouteConfig, generateRouterMap directly instead of via ServerUtils
  • Remove deprecated static wrapper methods from ServerUtils class (breaking)
  • Bump adapt-authoring-core to ^2.0.0
  • Add 5 new test files, 114 tests all passing
  • Remaining class methods (addErrorHandler, apiNotFoundHandler, methodNotAllowedHandler, genericErrorHandler, rootNotFoundHandler, debugRequestTime, handleInternalRoutes) stay on ServerUtils as they're coupled to App.instance

Test plan

  • All 114 tests pass (npm test)
  • Integration test with full AAT stack

🤖 Generated with Claude Code

…al files (fixes #55)

- Extract getAllRoutes, generateRouterMap, addExistenceProps, mapHandler,
  cacheRouteConfig into lib/utils/
- Add barrel file lib/utils.js re-exporting all utilities
- Export utility functions as named exports from index.js
- Update Router.js to import extracted utilities directly
- Remove deprecated static methods from ServerUtils class (breaking)
- Bump adapt-authoring-core dependency to ^2.0.0
- Add 5 new test files (utils-getAllRoutes, utils-generateRouterMap,
  utils-addExistenceProps, utils-mapHandler, utils-cacheRouteConfig)
- Remove extracted method tests from ServerUtils.spec.js
- 114 tests pass

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@taylortom taylortom changed the title Breaking: Extract ServerUtils static methods into lib/utils/ individual files (fixes #55) Update: Extract ServerUtils static methods into lib/utils/ individual files (fixes #55) Feb 21, 2026
@taylortom taylortom merged commit 6c083a3 into master Feb 21, 2026
2 checks passed
@taylortom taylortom deleted the issue/55 branch February 21, 2026 15:47
github-actions bot pushed a commit that referenced this pull request Feb 21, 2026
# [2.0.0](v1.4.2...v2.0.0) (2026-02-21)

### Breaking

* Extract ServerUtils static methods into lib/utils/ individual files (fixes #55) ([d7c7c11](d7c7c11)), closes [#55](#55)

### Update

* Extract ServerUtils static methods into lib/utils/ individual files (fixes #55) (#56) ([6c083a3](6c083a3)), closes [#55](#55) [#56](#56)
@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