-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 #3030 and run relateive test in edge-runtime #3036
base: main
Are you sure you want to change the base?
Conversation
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. |
New dependencies detected. Learn more about Socket for GitHub ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a PR description and some comments about the change in hash
? It's important for others to understand the approach and grab the context when they read the code later unless directly by reading the code
Co-authored-by: Toru Kobayashi <[email protected]>
@@ -167,7 +167,8 @@ | |||
"trailingComma": "none" | |||
}, | |||
"dependencies": { | |||
"@edge-runtime/jest-environment": "^3.0.4", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be dev dependency
"dequal": "^2.0.3", | ||
"use-sync-external-store": "^1.2.0" | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we keep the trailign line break for each file?
This pr intends to fix the inconsistent behavoir of swr's
hash
in edge-runtime dev mode.The reason for this problem is because we're using
node.js
to simulate theedge-runtime
for local developmentThe global
Array
andObject
of edge-runtime are injected fromnode.js
and the JS engine does not use global Array/Object constructor while building an array/object literal.Then in dev mode
So we need find alternative to determine whether a key is an array or a
plain object