This is correct. Function returns true in both original and serialized code.
Output in Node v20.0.0 (and latest v20.8.0):
export default ((search, url) => () => search === url.searchParams)(
new URLSearchParams("x=1&y=2"),
new URL("http://foo.com/?x=1&y=2")
);
The exported function here returns false (incorrect).
The problem is due to removal of the Symbol(context) property on URLs in Node v20.0.0, which Livepack relies on to link URLs and their URLSearchParams.
Input:
Output in Node v18.18.0:
This is correct. Function returns
true
in both original and serialized code.Output in Node v20.0.0 (and latest v20.8.0):
The exported function here returns
false
(incorrect).The problem is due to removal of the
Symbol(context)
property onURL
s in Node v20.0.0, which Livepack relies on to linkURL
s and theirURLSearchParams
.