equal Hard Erroring on Proxies
- Dominant language
- TypeScript
- Stars
- 91
- Forks
- 15
- PR merge metrics
- No merged PRs in 30d
Description
I discovered this from [Apollo Client](https://github.com/apollographql/apollo-client).
In some cases, the parameters passed to the `equal` method are wrapped in Proxies. If the wrapped value is an object with a nested array, it hard errors on [this specific line](https://github.com/benjamn/wryware/blob/main/packages/equality/src/equality.ts#L188) with the following error:
`TypeError: 'get' on proxy: property 'nestedArrayPropertyName' is a read-only and non-configurable data property on the proxy target but the proxy did not return its actual value (expected '[object Array]' but got '[object Array]')`
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at packages/equality/src/equality.ts around line 188 and reproduce the failure with a Proxy-wrapped object containing a nested array, using the Apollo Client report as context. The work is done when equal no longer hard-errors on this case and the behavior is covered by regression coverage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100