navigation
navigation copied to clipboard
fix: remove reliance on top level await and external polyfill/helper
This PR reworks the serialization code to use JSON.stringify
and JSON.parse
instead of structured clone and a third-party serialization polyfill/helper. A new function called configureSerialization(...)
has been added to provide developers with a way to plug back in the more advanced serialization approach if they want/need it for their app.
Checklist
- [ ] run
yarn build
- [ ] tests and/or benchmarks are included
- [ ] documentation is changed or added
- [x] commit message and code follows the Developer's Certification of Origin and the Code of conduct
Issues
- Fixes #32
Notes
A couple of critical things are left undone. I'm looking for some help/feedback on:
- I am still unable to run the build on Windows out-of-the-box, so I didn't verify by running the build or tests. We'll see what happens with CI.
- I didn't make changes to the custom build scripts for rollup, etc. There was a lot of code there and I'm not very familiar with custom rollup solutions in general. Perhaps someone else can remove the vestiges of the old polyfill system that are still there.
- Please let me know where you want me to document
configureSerialization(...)
and I'll amend this PR with that (assuming you support the approach I took).