Skip to content

feat: add registerDeprecated for Deprecation and Sunset headers - #93

Merged
naile merged 3 commits into
masterfrom
naile/deprecation-headers
Nov 7, 2026
Merged

naile merged 3 commits into
masterfrom
naile/deprecation-headers

Conversation

@naile

@naile naile commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add registerDeprecated(router, route, options), which marks routes as deprecated
  • Set the RFC 9745 Deprecation, RFC 8594 Sunset and Link: rel="successor-version" headers
  • Pass each call to an onCall callback, so services can record it in their own logs or metrics
  • Document it in the readme

Motivation

tibber-onboarding and tibber-timeseries and probably more each wrote their own copy of this helper, and tibber-customer needs one next. With it here, every Express service shares one implementation and common response shape according to RFC specs.

Verification

  • yarn test (unit tests and lint)
  • yarn test:consumer 4.17.0 ^5.0.0

@naile
naile marked this pull request as ready for review November 7, 2026 08:38
@naile
naile requested a review from a team as a code owner November 7, 2026 08:38
@naile
naile merged commit 13f5bca into master Nov 7, 2026
1 check passed
tibbercom-builduser pushed a commit that referenced this pull request Nov 7, 2026
# [4.2.0](v4.1.4...v4.2.0) (2026-11-07)

### Features

* add registerDeprecated for Deprecation and Sunset headers ([#93](#93)) ([13f5bca](13f5bca))
@tibbercom-builduser

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 4.2.0 🎉

The release is available on GitHub release

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.

2 participants