refactor(trailing-node): remove @remirror/core-helpers
#2245
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.
Description
Replace use of
includes()
anduniqueArray()
with equivalent code that relies on standard built-in objects, allowing us to avoid importing the rest of@remirror/core-helpers
, whichprosemirror-trailing-node
does not needBackground and Context
@remirror/core-helpers
importsthrottle-debounce
, which, while licensed under MIT, is a fork ofjquery-throttle-debounce
, which is dual-licensed under MIT and GPL. There is significant legal ambiguity whether dependents are free to comply with just one of the licenses, or compliance with both licenses is needed, especially since the author ofjquery-throttle-debounce
did not explicitly state in no uncertain terms what is acceptable, and what is not.Given that
prosemirror-trailing-node
does not actually need throttling or debouncing, and the helper functions needed are relatively trivial to implement (at least in the context of this particular package), and given that there are other packages outside of Remirror that depend on this package (eg,@tiptap/pm
), this PR has been made to help dependents avoid this legal ambiguityChecklist
pnpm fix
completed successfully.pnpm test
.Footnote
This contribution has been made through the course of work done for @opengovsg