refactor(json): Remove expression-eval dependency #9070
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
expression-eval
dependency was deprecated in mid-2023. (Disclaimer: I'm the previous maintainer of this dependency). Much of the original code was originally from jsep, included in their codebase as part of the test suite but not as a public API. I've been informed that the deprecatedexpression-eval
dependency, and particularly its lack of apackage.json#exports
field, is causing an issue for some Pydeck users.Maintained forks of
expression-eval
exist, but I have misgivings about using these forks, or creating a new public fork. I'll share details about this elsewhere, with deckgl maintainers.Instead, I would suggest that we simply inline the code, for internal use by
@deck.gl/json
. In this PR I've made very light modifications to make stricter TypeScript checks pass, otherwise everything is the same as the last-published version. We're not using the async evaluation feature – that could be removed in a future PR, to considerably simplify the inlined code.