Why can't symbolic keys be stringified?
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 2.8k
- Forks
- 99
- Avg merge
- 3d 7h
- Merged PRs (30d)
- 17
Description
Hi,
I'm using SvelteKit together with Prisma with computed fields. Results cannot be stringified and sent to the client (in load for example), because that throws this error:
Cannot stringify POJOs with symbolic keys
Interestingly, if I just comment out those checks here and here, it works just fine. Is there a reason for this check and some edge cases I haven't yet ran into?
Thanks in advance.
For anyone wanting to test, here's a patchfile for yarn patch: devalue-npm-4.3.2-e483100d94.patch
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the symbolic-key checks in src/stringify.js at lines 144-149 and src/uneval.js at lines 92-97, then reproduce the SvelteKit and Prisma computed-fields case described in the issue. Determine why the checks exist and document or test the edge cases involved; done means the behavior and any safe supported outcome are clear.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100