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

export integrated cookie functionality #263

Merged
merged 5 commits into from Nov 25, 2023
Merged

Conversation

Uzlopak
Copy link
Contributor

@Uzlopak Uzlopak commented Nov 14, 2023

This way we can use it in fastify/secure-session and co instead of the cookie package.

Checklist

Copy link
Member

@gurgunday gurgunday left a comment

Choose a reason for hiding this comment

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

Great, thanks

cookie.js Show resolved Hide resolved
plugin.js Outdated Show resolved Hide resolved
@Uzlopak
Copy link
Contributor Author

Uzlopak commented Nov 15, 2023

@mcollina PTAL

@mcollina
Copy link
Member

Plase require the entrypoint file in

const cookie = require('../cookie')
.

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.

If the other module is going to use @fastify/cookie to manage cookies, why do we need to export the underlying tooling?

@Uzlopak
Copy link
Contributor Author

Uzlopak commented Nov 20, 2023

@mcollina
PTAL

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.

Can you document it in the README?

README.md Outdated
@@ -11,6 +11,8 @@ This plugin's cookie parsing works via Fastify's `onRequest` hook. Therefore,
you should register it prior to any other `onRequest` hooks that will depend
upon this plugin's actions.

It is also possible to import the low-level cookie parsing and serialization functions.
Copy link
Member

Choose a reason for hiding this comment

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

Maybe add a link here to the header section regarding the import?

@Uzlopak
Copy link
Contributor Author

Uzlopak commented Nov 25, 2023

@mcollina PTAL

@gurgunday
Thank you for your work.

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

@mcollina mcollina merged commit 0c7351c into master Nov 25, 2023
21 checks passed
@gurgunday gurgunday deleted the export-integrated-cookie branch November 25, 2023 14:55
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

5 participants