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

change setNodeEnv code to avoid warnings when using the Cloudflare adapter #686

Merged
merged 1 commit into from
Dec 29, 2024

Conversation

dario-piotrowicz
Copy link
Contributor

This is a quick change to avoid warnings such as:
Screenshot 2024-12-27 at 18 20 06
when using the Cloudflare adapter

I am not a huge fan of this change but, for a quick fix which doesn't require too much refactoring in the aws package, I think it's either this or patching the aws code on the Cloudflare adapter (as I've done in opennextjs/opennextjs-cloudflare#211).

(A more proper fix would be to make the aws code configurable so that when used by the Cloudflare adapter the setNodeEnv is either never called, thus three shaken away, or becomes a no-op function, but that as I referred to before would be a much bigger change, which might not be worth it right now)

Copy link

changeset-bot bot commented Dec 28, 2024

⚠️ No Changeset found

Latest commit: 716436e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@dario-piotrowicz dario-piotrowicz force-pushed the dario/setNodeEnv-warning-fix branch from ba5fef3 to 060921e Compare December 28, 2024 14:42
Copy link

pkg-pr-new bot commented Dec 28, 2024

Open in Stackblitz

pnpm add https://pkg.pr.new/@opennextjs/aws@686

commit: 716436e

Copy link
Contributor

github-actions bot commented Dec 28, 2024

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 23.25% 1761 / 7571
🔵 Statements 23.25% 1761 / 7571
🔵 Functions 56.83% 104 / 183
🔵 Branches 71.33% 448 / 628
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/open-next/src/adapters/util.ts 0% 100% 100% 0% 3-41
Generated in workflow #847 for commit 716436e by the Vitest Coverage Report Action

@dario-piotrowicz dario-piotrowicz force-pushed the dario/setNodeEnv-warning-fix branch from 060921e to 716436e Compare December 28, 2024 14:44
Copy link
Contributor

@conico974 conico974 left a comment

Choose a reason for hiding this comment

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

LGTM
Not a big fan of this change either to be honest. We need to find a better way of defining this (or delegate it to the platform itself).
Order of import can cause this issue #624

@dario-piotrowicz
Copy link
Contributor Author

LGTM Not a big fan of this change either to be honest. We need to find a better way of defining this (or delegate it to the platform itself). Order of import can cause this issue #624

thanks 🙂

yeah I agree it does feel like this could be improved 😕

@dario-piotrowicz dario-piotrowicz merged commit 4ac8cf3 into main Dec 29, 2024
3 checks passed
@dario-piotrowicz dario-piotrowicz deleted the dario/setNodeEnv-warning-fix branch December 29, 2024 21:26
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.

3 participants