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

fix: reduce deprecated api and node warnings #183

Merged
merged 5 commits into from
Nov 30, 2023

Conversation

himself65
Copy link
Contributor

@himself65 himself65 commented Nov 27, 2023

Fix the warning on node.js 20

You did not run Node.js with the `--conditions react-server` flag. Any "react-server" override will only work with ESM imports.

Upstream: nodejs/node#50885

And deprecated API on node.js 18

(node:14372) DeprecationWarning: Obsolete loader hook(s) supplied and will be ignored: getSource, transformSource

Copy link

vercel bot commented Nov 27, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
waku ✅ Ready (Inspect) Visit Preview Nov 30, 2023 6:41am

Copy link

codesandbox-ci bot commented Nov 27, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 955202f:

Sandbox Source
Vanilla Typescript Configuration
React Configuration
React TypeScript Configuration

@dai-shi
Copy link
Owner

dai-shi commented Nov 27, 2023

I understand the Node 18 warning, but how the Node 20 warning happens? Are we not use ESM imports?

@himself65
Copy link
Contributor Author

I understand the Node 18 warning, but how the Node 20 warning happens? Are we not use ESM imports?

This is complex. i read the nodejs source code. Reason is conditions will not pass to the esm module in worker thread. BUT, cjs will. So in the first time, require(react) is in correct condition(used in webpack source code). Second time when you import react-server-webpack, it’s not react-server condition actually

Copy link
Owner

@dai-shi dai-shi left a comment

Choose a reason for hiding this comment

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

The change looks good to me. My hesitation is that I will not be able to remember that this change is just about reducing warnings.
Can you add source code comments which include the link to this PR?

e2e/counter.spec.ts Outdated Show resolved Hide resolved
e2e/utils.ts Show resolved Hide resolved
@dai-shi
Copy link
Owner

dai-shi commented Nov 28, 2023

https://github.com/dai-shi/waku/actions/runs/7012521326/job/19077187950?pr=183
Do you know why CI timeouts sometimes?

@himself65
Copy link
Contributor Author

dai-shi/waku/actions/runs/7012521326/job/19077187950?pr=183 Do you know why CI timeouts sometimes?

There might be some flaky. or in some cases, CI is slower than usual cause the build is overdue. Let me debug it

@himself65
Copy link
Contributor Author

could you run that again with debug log?

I will go to dinner now. do this later

@himself65
Copy link
Contributor Author

Will rebase this later

Copy link
Owner

@dai-shi dai-shi left a comment

Choose a reason for hiding this comment

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

LGTM

@dai-shi dai-shi merged commit 476fd2a into dai-shi:main Nov 30, 2023
9 checks passed
@himself65 himself65 deleted the himself65/loader branch November 30, 2023 15:53
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.

2 participants