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

Cloudflare adapter update for node:crypto #8784

Closed
1 task done
jadbox opened this issue Oct 9, 2023 · 2 comments · Fixed by #8788
Closed
1 task done

Cloudflare adapter update for node:crypto #8784

jadbox opened this issue Oct 9, 2023 · 2 comments · Fixed by #8788
Labels
needs triage Issue needs to be triaged

Comments

@jadbox
Copy link
Contributor

jadbox commented Oct 9, 2023

Astro Info

Cloudflare now has initial support for node:crypto package. See:
https://developers.cloudflare.com/workers/platform/changelog/#2023-04-28

If this issue only occurs in one browser, which browser is a problem?

all

Describe the Bug

The package node:crypto should be allowlisted in the Cloudflare adapter excludes list. Note, it may be preferable to allowlist all of node:* packages as the module support changes very frequently, and each time the adapter requires an update and waiting period on a new release.

What's the expected result?

Build fail for node:crypto but it's allowed now by wrangler

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-ig3cma?file=src%2Fpages%2Findex.astro

Participation

  • I am willing to submit a pull request for this issue.
@jadbox
Copy link
Contributor Author

jadbox commented Oct 9, 2023

PR for fix with additional future proofing for future upstream issues: #8787

@alexanderniebuhr
Copy link
Member

@jadbox thank you for your contribution! Just a note, node:crypto is only supported since 14th September, while it is some time, it is not as long as you linked.

Note, it may be preferable to allowlist all of node:* packages as the module support changes very frequently, and each time the adapter requires an update and waiting period on a new release.

I'm still against this. I laid out multiple times before, why I don't think it is a good idea to allowlist the node:* wildcard. I think it is more likely that we would go for the settings override solution, than for the wildcard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage Issue needs to be triaged
Projects
None yet
2 participants