Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add partitioned #261

Merged
merged 10 commits into from
Nov 15, 2023
Merged

feat: add partitioned #261

merged 10 commits into from
Nov 15, 2023

Conversation

gurgunday
Copy link
Member

@gurgunday gurgunday commented Nov 8, 2023

Adds support for the non-standard Partitioned option

It was added to jshttp/cookie a few days ago

@gurgunday gurgunday requested a review from a team November 8, 2023 19:54
Copy link
Member

@jsumners jsumners left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am against adding things that do not conform to the spec.

@Uzlopak
Copy link
Contributor

Uzlopak commented Nov 8, 2023

We have to add it.

@gurgunday
Copy link
Member Author

gurgunday commented Nov 8, 2023

I am against adding things that do not conform to the spec.

I fully agree personally 😄

One of the reasons @mcollina forked cookie was to add this though

Users seem to want it

@jsumners
Copy link
Member

jsumners commented Nov 8, 2023

We have to add it.

Why? Is it at least defined in a draft?

@climba03003
Copy link
Member

climba03003 commented Nov 9, 2023

After some investigation,

Why?

Chrome started to ban / phase out third-party cookies. It can only be used with the new Partitioned attribute.
https://developer.chrome.com/docs/privacy-sandbox/third-party-cookie-phase-out/

Is it at least defined in a draft?

The Partitioned attribute is promoted by an individual draft.
Github: https://github.com/privacycg/CHIPS
DataTracker: https://datatracker.ietf.org/doc/html/draft-cutler-httpbis-partitioned-cookies#section-2.1

For my personal opinion, it seems only Google have the interest on this individual draft.
Neither Mozilla nor Apple Webkit is going to implement it in foreseeable future.
Mozilla and Apple Webkit are positive to the proposal, but still requesting some improvement or discussion before implementing the feature. We do not have a solid road map on when it would be implemented.
mozilla/standards-positions#678
WebKit/standards-positions#50

If we need to provide this option, I would mark it as Experimental because we don't know if it going to be a real standard (based on the Browser vendor interest.).

Edit(2023-11-15): update the Mozilla and Webkit position on the proposal.

Copy link
Member

@Eomm Eomm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would write in the reademe [experimental] with a reference to the @climba03003 's comment 🔝

cookie.js Show resolved Hide resolved
cookie.js Show resolved Hide resolved
Co-authored-by: James Sumners <321201+jsumners@users.noreply.github.com>
Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@marco-ippolito
Copy link

not blocking, but I strongly think it should be marked as experimental

@gurgunday
Copy link
Member Author

Agreed, will do that

README.md Outdated Show resolved Hide resolved
@gurgunday
Copy link
Member Author

Well, now I want to change parseOptions to serializationOptions because it actually seems to do nothing to change parsing behavior

@gurgunday gurgunday requested a review from a team November 12, 2023 01:45
This reverts commit ad49da2.
Copy link
Contributor

@Uzlopak Uzlopak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RSLGTM

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
gurgunday and others added 2 commits November 12, 2023 14:37
Co-authored-by: Manuel Spigolon <behemoth89@gmail.com>
@Fdawgs
Copy link
Member

Fdawgs commented Nov 14, 2023

Neither Mozilla nor Apple Webkit is going to implement it in foreseeable future.

They support the effort though:

@gurgunday
Copy link
Member Author

Oh that's useful 🙏

@climba03003
Copy link
Member

They support the effort though

Good to know that, I have updated my comment to reflect the vendor interest.

@fox1t
Copy link
Member

fox1t commented Nov 15, 2023

LGTM

@gurgunday
Copy link
Member Author

Let me add a mention to @climba03003's comment, which sums it up nicely

@mcollina mcollina merged commit 9e4652f into fastify:master Nov 15, 2023
19 checks passed
@gurgunday gurgunday deleted the add-part branch November 15, 2023 16:43
renovate bot added a commit to specfy/specfy that referenced this pull request Nov 22, 2023
[![Mend Renovate logo
banner](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@fastify/cookie](https://togithub.com/fastify/fastify-cookie) |
[`9.0.4` ->
`9.2.0`](https://renovatebot.com/diffs/npm/@fastify%2fcookie/9.0.4/9.2.0)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@fastify%2fcookie/9.2.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@fastify%2fcookie/9.2.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@fastify%2fcookie/9.0.4/9.2.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@fastify%2fcookie/9.0.4/9.2.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>fastify/fastify-cookie (@&#8203;fastify/cookie)</summary>

###
[`v9.2.0`](https://togithub.com/fastify/fastify-cookie/releases/tag/v9.2.0)

[Compare
Source](https://togithub.com/fastify/fastify-cookie/compare/v9.1.0...v9.2.0)

#### What's Changed

- chore: add `.gitattributes` file by
[@&#8203;Fdawgs](https://togithub.com/Fdawgs) in
[fastify/fastify-cookie#255
- refactor(signer): add `u` unicode flag to regex by
[@&#8203;Fdawgs](https://togithub.com/Fdawgs) in
[fastify/fastify-cookie#256
- chore(deps-dev): bump sinon from 16.1.3 to 17.0.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[fastify/fastify-cookie#257
- chore(package): explicitly declare js module type by
[@&#8203;Fdawgs](https://togithub.com/Fdawgs) in
[fastify/fastify-cookie#258
- refactor(plugin): replace `typeof` undefined check by
[@&#8203;Fdawgs](https://togithub.com/Fdawgs) in
[fastify/fastify-cookie#259
- Go back to use our own cookie implementation by
[@&#8203;mcollina](https://togithub.com/mcollina) in
[fastify/fastify-cookie#260
- feat: add partitioned by
[@&#8203;gurgunday](https://togithub.com/gurgunday) in
[fastify/fastify-cookie#261

**Full Changelog**:
fastify/fastify-cookie@v9.1.0...v9.2.0

###
[`v9.1.0`](https://togithub.com/fastify/fastify-cookie/releases/tag/v9.1.0)

[Compare
Source](https://togithub.com/fastify/fastify-cookie/compare/v9.0.4...v9.1.0)

#### What's Changed

- perf: don't initialize req.cookies before checking the header by
[@&#8203;gurgunday](https://togithub.com/gurgunday) in
[fastify/fastify-cookie#248
- chore(deps-dev): bump tsd from 0.28.1 to 0.29.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[fastify/fastify-cookie#249
- perf: use `node:` prefix for builtins by
[@&#8203;gurgunday](https://togithub.com/gurgunday) in
[fastify/fastify-cookie#250
- chore(deps-dev): bump sinon from 15.2.0 to 16.0.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[fastify/fastify-cookie#252
- use named exports by
[@&#8203;gurgunday](https://togithub.com/gurgunday) in
[fastify/fastify-cookie#254

**Full Changelog**:
fastify/fastify-cookie@v9.0.4...v9.1.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 4pm every weekday" in timezone
Europe/Paris, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

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

---

- [ ] <!-- rebase-check -->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/specfy/specfy).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy41OS44IiwidXBkYXRlZEluVmVyIjoiMzcuNTkuOCIsInRhcmdldEJyYW5jaCI6ImNob3JlL3Jlbm92YXRlQmFzZUJyYW5jaCJ9-->

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.

None yet

9 participants