Back to Explore

jshttp/vary

GitHub
1 watchersOpen source

Last release:

“vary” is a Node.js module that helps manage the HTTP Vary response header. It provides functions to add one or more fields to res.Vary, appending them if needed, useful for applications that vary responses based on request headers like User-Agent.

Project status

  • Maintenance status: The project appears in a quiet, maintenance mode as far as published updates go, with the latest tagged update shown being v1.1.2 (2017-09-24). However, the upstream push date is 2026-04-02, indicating some recent activity even though no newer tagged updates are listed here.
  • Apparent update cadence: After v1.1.2 (2017), there are no further documented tagged updates in the provided history, suggesting a long pause in official versioned changes (about 8.5 years relative to today, 2026-06-09).

AI summary generated

AI-generated from public sources. May be inaccurate. Report

Recent updates

  • v1.1.2

    Release 1.1.2 is primarily a performance-focused change, described in the notes as faster HTTP header token parsing. The code diff shows the optimization is implemented by rewriting the internal `parse()` logic in `index.js` to avoid regex-based splitting, along with adding benchmark tooling and some CI/dev dependency updates.

  • v1.1.1

    Release v1.1.1 makes a small performance-focused change by hoisting the regular expression used to parse comma-separated Vary header values. The functional behavior of Vary header manipulation appears unchanged in the main implementation file (index.js), with the rest of the diff largely consisting of formatting and tooling updates.

  • v1.1.0

    Release 1.1.0 tightens validation of the `field` argument passed to `vary.append(header, field)`. It now enforces RFC 7230 `field-name` token characters and throws a `TypeError` when invalid characters are present.

    Breaking
  • v1.0.1

    Release v1.0.1 refactors vary header manipulation with performance-oriented code changes and adds stricter runtime behavior by enabling strict mode. Functionally, it prevents setting the HTTP Vary header when the computed value is empty, addressing cases like an empty provided field.

  • v1.0.0

    v1.0.0 refactors the `vary` module to add a new low-level helper, `vary.append(header, field)`, and extends `vary(res, field)` to accept a comma-separated Vary header string as input. The release notes mention these features and the move to the `jshttp` GitHub organization, and the diff also updates tests and development tooling accordingly.

    BreakingFeatures
  • v0.1.0

    This release adds support for specifying multiple fields to set in the HTTP `Vary` response header. Instead of only adding a single header value, `vary` can now accept an array of field names and will update `Vary` accordingly.

    Features
  • v0.0.0

    This is the initial release (v0.0.0) of the project. There are no release notes indicating any features, fixes, security updates, or breaking changes beyond the fact that it is being published for the first time.