Skip to content

Bump @mjackson/headers from 0.9.0 to 0.10.0 - #12

Merged
github-actions[bot] merged 1 commit into
mainfrom
dependabot/npm_and_yarn/mjackson/headers-0.10.0
Feb 3, 2025
Merged

Bump @mjackson/headers from 0.9.0 to 0.10.0#12
github-actions[bot] merged 1 commit into
mainfrom
dependabot/npm_and_yarn/mjackson/headers-0.10.0

Conversation

@dependabot

@dependabotdependabotBot commented on behalf of githubFeb 3, 2025

Copy link
Copy Markdown
Contributor

Bumps @mjackson/headers from 0.9.0 to 0.10.0.

Release notes

Sourced from @​mjackson/headers's releases.

headers v0.10.0

This release contains several improvements to Cookie that bring it more in line with other headers like Accept, AcceptEncoding, and AcceptLanguage.

  • BREAKING CHANGE: cookie.names() and cookie.values() are now getters that return string[] instead of methods that return IterableIterator<string>
  • BREAKING CHANGE: cookie.forEach() calls its callback with (name, value, cookie) instead of (value, name, map)
  • BREAKING CHANGE: cookie.delete(name) returns void instead of boolean
// beforeletcookieNames=Array.from(headers.cookie.names());// afterletcookieNames=headers.cookie.names;

Additionally, this release adds support for the If-None-Match header. This is useful for conditional GET requests where you want to return a response with content only if the ETag has changed.

import{SuperHeaders}from'@mjackson/headers';functionrequestHandler(request: Request): Promise<Response>{letresponse=awaitcallDownstreamService(request);if(request.method==='GET'&&response.headers.has('ETag')){letheaders=newSuperHeaders(request.headers);if(headers.ifNoneMatch.matches(response.headers.get('ETag'))){returnnewResponse(null,{status: 304});}}returnresponse;}

Changelog

Sourced from @​mjackson/headers's changelog.

v0.10.0 (2025-01-27)

This release contains several improvements to Cookie that bring it more in line with other headers like Accept, AcceptEncoding, and AcceptLanguage.

  • BREAKING CHANGE: cookie.names() and cookie.values() are now getters that return string[] instead of methods that return IterableIterator<string>
  • BREAKING CHANGE: cookie.forEach() calls its callback with (name, value, cookie) instead of (value, name, map)
  • BREAKING CHANGE: cookie.delete(name) returns void instead of boolean
// beforeletcookieNames=Array.from(headers.cookie.names());// afterletcookieNames=headers.cookie.names;

Additionally, this release adds support for the If-None-Match header. This is useful for conditional GET requests where you want to return a response with content only if the ETag has changed.

import{SuperHeaders}from'@mjackson/headers';functionrequestHandler(request: Request): Promise<Response>{letresponse=awaitcallDownstreamService(request);if(request.method==='GET'&&response.headers.has('ETag')){letheaders=newSuperHeaders(request.headers);if(headers.ifNoneMatch.matches(response.headers.get('ETag'))){returnnewResponse(null,{status: 304});}}returnresponse;}

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [@mjackson/headers](https://github.com/mjackson/remix-the-web/tree/HEAD/packages/headers) from 0.9.0 to 0.10.0.
- [Release notes](https://github.com/mjackson/remix-the-web/releases)
- [Changelog](https://github.com/mjackson/remix-the-web/blob/main/packages/headers/CHANGELOG.md)
- [Commits](https://github.com/mjackson/remix-the-web/commits/headers@0.10.0/packages/headers)
---
updated-dependencies:
- dependency-name: "@mjackson/headers"
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
@dependabotdependabotBot added dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code labels Feb 3, 2025
@dependabot
dependabotBot requested a review from sergiodxaFebruary 3, 2025 05:46
@github-actions
github-actionsBot merged commit 58601df into mainFeb 3, 2025
@github-actions
github-actionsBot deleted the dependabot/npm_and_yarn/mjackson/headers-0.10.0 branch February 3, 2025 05:46
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependenciesPull requests that update a dependency filejavascriptPull requests that update Javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@sergiodxa