Skip to content

Conversation

greg2012201
Copy link
Contributor

@greg2012201 greg2012201 commented Sep 5, 2023

Hi,

I've added support for middleware. Both the setCookie and getCookie functions now include a guard statement responsible for detecting middleware context. If the guard detects middleware context, methods attached to res.cookies will be called. I had to install Next v13 as a devDependency because both the NextResponse and NextRequest types were too complex to rewrite, and I needed to import those types directly..

I would appreciate a code review, and I would be grateful if my changes could be considered for merging.

This pr refers to #12

@andreizanik andreizanik merged commit 8f0f95c into andreizanik:master Sep 10, 2023
@andreizanik
Copy link
Owner

Thanks for your PR

kodiakhq bot referenced this pull request in weareinreach/InReach Sep 11, 2023
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [cookies-next](https://togithub.com/andreizanik/cookies-next) | [`3.0.0` -> `4.0.0`](https://renovatebot.com/diffs/npm/cookies-next/3.0.0/4.0.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/cookies-next/4.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/cookies-next/4.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/cookies-next/3.0.0/4.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/cookies-next/3.0.0/4.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>andreizanik/cookies-next (cookies-next)</summary>

### [`v4.0.0`](https://togithub.com/andreizanik/cookies-next/releases/tag/v4.0.0)

[Compare Source](https://togithub.com/andreizanik/cookies-next/compare/v3.0.0...v4.0.0)

#### What's Changed

-   Add Prettier config by [@&#8203;greg2012201](https://togithub.com/greg2012201) in [https://github.com/andreizanik/cookies-next/pull/48](https://togithub.com/andreizanik/cookies-next/pull/48)
-   Middleware support by [@&#8203;greg2012201](https://togithub.com/greg2012201) in [https://github.com/andreizanik/cookies-next/pull/51](https://togithub.com/andreizanik/cookies-next/pull/51)

**Full Changelog**: andreizanik/cookies-next@v3.0.0...v4.0.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/weareinreach/InReach).



PR-URL: #760
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants