Commit 549ab4a
committed
perf(devframe): replace destr with local safe-parse
Storage's only JSON parsing need is reading back its own previously
written state (node/storage.ts), where destr's lenient (non-strict)
handling of bare keywords/quoted strings never applies - the file is
always a JSON object literal. Inline a ~15-line JSON.parse + reviver
that mirrors destr's core __proto__/constructor.prototype
prototype-pollution guard, and drop the ~36 KB destr runtime
dependency.
@devframes/hub also depends on destr (client/remote.ts) - left alone
in this PR per the plan's decided scope.1 parent 97cbe1d commit 549ab4a
3 files changed
Lines changed: 15 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
99 | 98 | | |
100 | 99 | | |
101 | 100 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
| |||
13 | 12 | | |
14 | 13 | | |
15 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
16 | 29 | | |
17 | 30 | | |
18 | 31 | | |
| |||
22 | 35 | | |
23 | 36 | | |
24 | 37 | | |
25 | | - | |
| 38 | + | |
26 | 39 | | |
27 | 40 | | |
28 | 41 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments