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

use named exports #254

Merged
merged 1 commit into from
Sep 19, 2023
Merged

use named exports #254

merged 1 commit into from
Sep 19, 2023

Conversation

gurgunday
Copy link
Member

Closes #253

Checklist

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.

Why did you remove the signer exports?

@gurgunday
Copy link
Member Author

gurgunday commented Sep 19, 2023

Because they were created for destructuring purposes but named exports are defaulted to when they can't be found

const { sign } = require("./plugin");
const { fastifyCookie } = require("./plugin");
const fastifyCookie2 = require("./plugin");

console.log(sign); // [Function: sign]
console.log(fastifyCookie.sign); // [Function: sign]
console.log(fastifyCookie2.sign); // [Function: sign]

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.

Ok. Too much circularity :D

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

@Uzlopak Uzlopak merged commit 56f77be into fastify:master Sep 19, 2023
15 checks passed
@gurgunday gurgunday deleted the exports branch September 19, 2023 19:58
@gajus
Copy link

gajus commented Sep 19, 2023

Thank you

renovate bot referenced this pull request in specfy/specfy 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
[https://github.com/fastify/fastify-cookie/pull/255](https://togithub.com/fastify/fastify-cookie/pull/255)
- refactor(signer): add `u` unicode flag to regex by
[@&#8203;Fdawgs](https://togithub.com/Fdawgs) in
[https://github.com/fastify/fastify-cookie/pull/256](https://togithub.com/fastify/fastify-cookie/pull/256)
- chore(deps-dev): bump sinon from 16.1.3 to 17.0.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/fastify/fastify-cookie/pull/257](https://togithub.com/fastify/fastify-cookie/pull/257)
- chore(package): explicitly declare js module type by
[@&#8203;Fdawgs](https://togithub.com/Fdawgs) in
[https://github.com/fastify/fastify-cookie/pull/258](https://togithub.com/fastify/fastify-cookie/pull/258)
- refactor(plugin): replace `typeof` undefined check by
[@&#8203;Fdawgs](https://togithub.com/Fdawgs) in
[https://github.com/fastify/fastify-cookie/pull/259](https://togithub.com/fastify/fastify-cookie/pull/259)
- Go back to use our own cookie implementation by
[@&#8203;mcollina](https://togithub.com/mcollina) in
[https://github.com/fastify/fastify-cookie/pull/260](https://togithub.com/fastify/fastify-cookie/pull/260)
- feat: add partitioned by
[@&#8203;gurgunday](https://togithub.com/gurgunday) in
[https://github.com/fastify/fastify-cookie/pull/261](https://togithub.com/fastify/fastify-cookie/pull/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
[https://github.com/fastify/fastify-cookie/pull/248](https://togithub.com/fastify/fastify-cookie/pull/248)
- chore(deps-dev): bump tsd from 0.28.1 to 0.29.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/fastify/fastify-cookie/pull/249](https://togithub.com/fastify/fastify-cookie/pull/249)
- perf: use `node:` prefix for builtins by
[@&#8203;gurgunday](https://togithub.com/gurgunday) in
[https://github.com/fastify/fastify-cookie/pull/250](https://togithub.com/fastify/fastify-cookie/pull/250)
- chore(deps-dev): bump sinon from 15.2.0 to 16.0.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/fastify/fastify-cookie/pull/252](https://togithub.com/fastify/fastify-cookie/pull/252)
- use named exports by
[@&#8203;gurgunday](https://togithub.com/gurgunday) in
[https://github.com/fastify/fastify-cookie/pull/254](https://togithub.com/fastify/fastify-cookie/pull/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.

ESM imports are failing
4 participants