Repository navigation
Update dependency highlight-words-core to v2 - #574
Merged
Merged
Conversation
Deploying react-components with
|
| Latest commit: |
9ac4bc0
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://0d19db50.react-components-9pg.pages.dev |
| Branch Preview URL: | https://renovate-highlight-words-cor.react-components-9pg.pages.dev |
renovate
Bot
force-pushed
the
renovate/highlight-words-core-2.x
branch
7 times, most recently
from
October 18, 2026 18:35
7b65d89 to
ca254b3
Compare
renovate
Bot
force-pushed
the
renovate/highlight-words-core-2.x
branch
from
October 19, 2026 07:29
ca254b3 to
9ac4bc0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR contains the following updates:
1.2.3→2.0.0Release Notes
bvaughn/highlight-words-core (highlight-words-core)
v2.0.0Compare Source
Breaking changes
autoEscapenow defaults totrue). To match patterns, passRegExpsearch words, or setautoEscape: falsefor trusted input only.findChunksandcombineChunksno longer include ahighlightproperty in the chunks they return;findAllandfillInChunks(which return the final chunks) still do. CustomfindChunksfunctions return{ start, end, searchIndex }.findChunksfunctions must include asearchIndex(the index withinsearchWordsof the search word that matched) in each chunk they return.findChunksfunctions receivesearchWordsas aReadonlyArray; TypeScript functions that declare it as a mutable array (e.g.string[]) must update their parameter type.Chunkis now a union ofHighlightedChunk(highlight: true, with a requiredsearchIndex) andNonHighlightedChunk(highlight: false, with nosearchIndex). TypeScript code must checkchunk.highlightbefore readingchunk.searchIndex, and code that builds chunks with ahighlightvalue typed asbooleanmust use a literaltrueorfalseinstead.combineChunksno longer sorts the array passed to it in place, and always returns new chunk objects.??and object spread) instead of being compiled to ES5. Older environments and bundlers that can't parse it (e.g. webpack 4) need to transpile the package.exports, so only the package root (highlight-words-core) can be imported. Deep imports (e.g.highlight-words-core/dist/index.js) and the previously publishedsrc/*.jsfiles are no longer available.autoEscapeisfalse, string search words that aren't valid regular expressions (e.g."(a") are matched literally instead of throwing an error.sanitizefunction changes the text, it is applied to each character separately (so that matches can be mapped back to the original text). Sanitizers that depend on context will give different results; for example,toLowerCase()turns a final"Σ"into"ς"when applied to a whole word, but into"σ"when applied to the character alone.New features
searchWordscan includeRegExpobjects, which are used as-is (with their own flags).searchWordscan be a readonly array (e.g.["a", "b"] as const).searchIndexproperty: the index (withinsearchWords) of the search word that matched.HighlightedChunkandNonHighlightedChunktypes are exported.Bug fixes
sanitizefunction changes its length (e.g.latinize("Æ")is"AE").findChunksthat extend outside of the text (or whose end is before their start) no longer produce invalid or overlapping chunks.nullorundefined)textToHighlightis no longer searched as e.g. the string"undefined".nullorundefined)searchWordsno longer throw an error; nothing is highlighted.0) are matched as strings, rather than being skipped if falsy.Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.