Skip to content

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jan 20, 2026

Bumps diff to 5.2.2 and updates ancestor dependencies diff, npm and sinon. These dependencies need to be updated together.

Updates diff from 5.2.0 to 5.2.2

Changelog

Sourced from diff's changelog.

Release Notes

8.0.3

  • #631 - fix support for using an Intl.Segmenter with diffWords. This has been almost completely broken since the feature was added in v6.0.0, since it would outright crash on any text that featured two consecutive newlines between a pair of words (a very common case).
  • #635 - small tweaks to tokenization behaviour of diffWords when used without an Intl.Segmenter. Specifically, the soft hyphen (U+00AD) is no longer considered to be a word break, and the multiplication and division signs (× and ÷) are now treated as punctuation instead of as letters / word characters.
  • #641 - the format of file headers in createPatch etc. patches can now be customised somewhat. It now takes a headerOptions option that can be used to disable the file headers entirely, or omit the Index: line and/or the underline. In particular, this was motivated by a request to make jsdiff patches compatible with react-diff-view, which they now are if produced with headerOptions: FILE_HEADERS_ONLY.
  • #647 and #649 - fix denial-of-service vulnerabilities in parsePatch whereby adversarial input could cause a memory-leaking infinite loop, typically crashing the calling process. Also fixed ReDOS vulnerabilities whereby adversarially-crafted patch headers could take cubic time to parse. Now, parsePatch should reliably take linear time. (Handling of headers that include the line break characters \r, \u2028, or \u2029 in non-trailing positions is also now more reasonable as side effect of the fix.)

8.0.2

  • #616 Restored compatibility of diffSentences with old Safari versions. This was broken in 8.0.0 by the introduction of a regex with a lookbehind assertion; these weren't supported in Safari prior to version 16.4.
  • #612 Improved tree shakeability by marking the built CJS and ESM packages with sideEffects: false.

8.0.1

  • #610 Fixes types for diffJson which were broken by 8.0.0. The new bundled types in 8.0.0 only allowed diffJson to be passed string arguments, but it should've been possible to pass either strings or objects (and now is). Thanks to Josh Kelley for the fix.

8.0.0

  • #580 Multiple tweaks to diffSentences:
    • tokenization no longer takes quadratic time on pathological inputs (reported as a ReDOS vulnerability by Snyk); is now linear instead
    • the final sentence in the string is now handled the same by the tokenizer regardless of whether it has a trailing punctuation mark or not. (Previously, "foo. bar." tokenized to ["foo.", " ", "bar."] but "foo. bar" tokenized to ["foo.", " bar"] - i.e. whether the space between sentences was treated as a separate token depended upon whether the final sentence had trailing punctuation or not. This was arbitrary and surprising; it is no longer the case.)
    • in a string that starts with a sentence end, like "! hello.", the "!" is now treated as a separate sentence
    • the README now correctly documents the tokenization behaviour (it was wrong before)
  • #581 - fixed some regex operations used for tokenization in diffWords taking O(n^2) time in pathological cases
  • #595 - fixed a crash in patch creation functions when handling a single hunk consisting of a very large number (e.g. >130k) of lines. (This was caused by spreading indefinitely-large arrays to .push() using .apply or the spread operator and hitting the JS-implementation-specific limit on the maximum number of arguments to a function, as shown at https://stackoverflow.com/a/56809779/1709587; thus the exact threshold to hit the error will depend on the environment in which you were running JsDiff.)
  • #596 - removed the merge function. Previously JsDiff included an undocumented function called merge that was meant to, in some sense, merge patches. It had at least a couple of serious bugs that could lead to it returning unambiguously wrong results, and it was difficult to simply "fix" because it was unclear precisely what it was meant to do. For now, the fix is to remove it entirely.
  • #591 - JsDiff's source code has been rewritten in TypeScript. This change entails the following changes for end users:
    • the diff package on npm now includes its own TypeScript type definitions. Users who previously used the @types/diff npm package from DefinitelyTyped should remove that dependency when upgrading JsDiff to v8.

      Note that the transition from the DefinitelyTyped types to JsDiff's own type definitions includes multiple fixes and also removes many exported types previously used for options arguments to diffing and patch-generation functions. (There are now different exported options types for abortable calls - ones with a timeout or maxEditLength that may give a result of undefined - and non-abortable calls.) See the TypeScript section of the README for some usage tips.

    • The Diff object is now a class. Custom extensions of Diff, as described in the "Defining custom diffing behaviors" section of the README, can therefore now be done by writing a class CustomDiff extends Diff and overriding methods, instead of the old way based on prototype inheritance. (I think code that did things the old way should still work, though!)

    • diff/lib/index.es6.js and diff/lib/index.mjs no longer exist, and the ESM version of the library is no longer bundled into a single file.

    • The ignoreWhitespace option for diffWords is no longer included in the type declarations. The effect of passing ignoreWhitespace: true has always been to make diffWords just call diffWordsWithSpace instead, which was confusing, because that behaviour doesn't seem properly described as "ignoring" whitespace at all. The property remains available to non-TypeScript applications for the sake of backwards compatibility, but TypeScript applications will now see a type error if they try to pass ignoreWhitespace: true to diffWords and should change their code to call diffWordsWithSpace instead.

    • JsDiff no longer purports to support ES3 environments. (I'm pretty sure it never truly did, despite claiming to in its README, since even the 1.0.0 release used Array.map which was added in ES5.)

  • #601 - diffJson's stringifyReplacer option behaves more like JSON.stringify's replacer argument now. In particular:
    • Each key/value pair now gets passed through the replacer once instead of twice
    • The key passed to the replacer when the top-level object is passed in as value is now "" (previously, was undefined), and the key passed with an array element is the array index as a string, like "0" or "1" (previously was whatever the key for the entire array was). Both the new behaviours match that of JSON.stringify.
  • #602 - diffing functions now consistently return undefined when called in async mode (i.e. with a callback). Previously, there was an odd quirk where they would return true if the strings being diffed were equal and undefined otherwise.

7.0.0

Just a single (breaking) bugfix, undoing a behaviour change introduced accidentally in 6.0.0:

  • #554 diffWords treats numbers and underscores as word characters again. This behaviour was broken in v6.0.0.

... (truncated)

Commits

Updates diff from 4.0.2 to 4.0.4

Changelog

Sourced from diff's changelog.

Release Notes

8.0.3

  • #631 - fix support for using an Intl.Segmenter with diffWords. This has been almost completely broken since the feature was added in v6.0.0, since it would outright crash on any text that featured two consecutive newlines between a pair of words (a very common case).
  • #635 - small tweaks to tokenization behaviour of diffWords when used without an Intl.Segmenter. Specifically, the soft hyphen (U+00AD) is no longer considered to be a word break, and the multiplication and division signs (× and ÷) are now treated as punctuation instead of as letters / word characters.
  • #641 - the format of file headers in createPatch etc. patches can now be customised somewhat. It now takes a headerOptions option that can be used to disable the file headers entirely, or omit the Index: line and/or the underline. In particular, this was motivated by a request to make jsdiff patches compatible with react-diff-view, which they now are if produced with headerOptions: FILE_HEADERS_ONLY.
  • #647 and #649 - fix denial-of-service vulnerabilities in parsePatch whereby adversarial input could cause a memory-leaking infinite loop, typically crashing the calling process. Also fixed ReDOS vulnerabilities whereby adversarially-crafted patch headers could take cubic time to parse. Now, parsePatch should reliably take linear time. (Handling of headers that include the line break characters \r, \u2028, or \u2029 in non-trailing positions is also now more reasonable as side effect of the fix.)

8.0.2

  • #616 Restored compatibility of diffSentences with old Safari versions. This was broken in 8.0.0 by the introduction of a regex with a lookbehind assertion; these weren't supported in Safari prior to version 16.4.
  • #612 Improved tree shakeability by marking the built CJS and ESM packages with sideEffects: false.

8.0.1

  • #610 Fixes types for diffJson which were broken by 8.0.0. The new bundled types in 8.0.0 only allowed diffJson to be passed string arguments, but it should've been possible to pass either strings or objects (and now is). Thanks to Josh Kelley for the fix.

8.0.0

  • #580 Multiple tweaks to diffSentences:
    • tokenization no longer takes quadratic time on pathological inputs (reported as a ReDOS vulnerability by Snyk); is now linear instead
    • the final sentence in the string is now handled the same by the tokenizer regardless of whether it has a trailing punctuation mark or not. (Previously, "foo. bar." tokenized to ["foo.", " ", "bar."] but "foo. bar" tokenized to ["foo.", " bar"] - i.e. whether the space between sentences was treated as a separate token depended upon whether the final sentence had trailing punctuation or not. This was arbitrary and surprising; it is no longer the case.)
    • in a string that starts with a sentence end, like "! hello.", the "!" is now treated as a separate sentence
    • the README now correctly documents the tokenization behaviour (it was wrong before)
  • #581 - fixed some regex operations used for tokenization in diffWords taking O(n^2) time in pathological cases
  • #595 - fixed a crash in patch creation functions when handling a single hunk consisting of a very large number (e.g. >130k) of lines. (This was caused by spreading indefinitely-large arrays to .push() using .apply or the spread operator and hitting the JS-implementation-specific limit on the maximum number of arguments to a function, as shown at https://stackoverflow.com/a/56809779/1709587; thus the exact threshold to hit the error will depend on the environment in which you were running JsDiff.)
  • #596 - removed the merge function. Previously JsDiff included an undocumented function called merge that was meant to, in some sense, merge patches. It had at least a couple of serious bugs that could lead to it returning unambiguously wrong results, and it was difficult to simply "fix" because it was unclear precisely what it was meant to do. For now, the fix is to remove it entirely.
  • #591 - JsDiff's source code has been rewritten in TypeScript. This change entails the following changes for end users:
    • the diff package on npm now includes its own TypeScript type definitions. Users who previously used the @types/diff npm package from DefinitelyTyped should remove that dependency when upgrading JsDiff to v8.

      Note that the transition from the DefinitelyTyped types to JsDiff's own type definitions includes multiple fixes and also removes many exported types previously used for options arguments to diffing and patch-generation functions. (There are now different exported options types for abortable calls - ones with a timeout or maxEditLength that may give a result of undefined - and non-abortable calls.) See the TypeScript section of the README for some usage tips.

    • The Diff object is now a class. Custom extensions of Diff, as described in the "Defining custom diffing behaviors" section of the README, can therefore now be done by writing a class CustomDiff extends Diff and overriding methods, instead of the old way based on prototype inheritance. (I think code that did things the old way should still work, though!)

    • diff/lib/index.es6.js and diff/lib/index.mjs no longer exist, and the ESM version of the library is no longer bundled into a single file.

    • The ignoreWhitespace option for diffWords is no longer included in the type declarations. The effect of passing ignoreWhitespace: true has always been to make diffWords just call diffWordsWithSpace instead, which was confusing, because that behaviour doesn't seem properly described as "ignoring" whitespace at all. The property remains available to non-TypeScript applications for the sake of backwards compatibility, but TypeScript applications will now see a type error if they try to pass ignoreWhitespace: true to diffWords and should change their code to call diffWordsWithSpace instead.

    • JsDiff no longer purports to support ES3 environments. (I'm pretty sure it never truly did, despite claiming to in its README, since even the 1.0.0 release used Array.map which was added in ES5.)

  • #601 - diffJson's stringifyReplacer option behaves more like JSON.stringify's replacer argument now. In particular:
    • Each key/value pair now gets passed through the replacer once instead of twice
    • The key passed to the replacer when the top-level object is passed in as value is now "" (previously, was undefined), and the key passed with an array element is the array index as a string, like "0" or "1" (previously was whatever the key for the entire array was). Both the new behaviours match that of JSON.stringify.
  • #602 - diffing functions now consistently return undefined when called in async mode (i.e. with a callback). Previously, there was an odd quirk where they would return true if the strings being diffed were equal and undefined otherwise.

7.0.0

Just a single (breaking) bugfix, undoing a behaviour change introduced accidentally in 6.0.0:

  • #554 diffWords treats numbers and underscores as word characters again. This behaviour was broken in v6.0.0.

... (truncated)

Commits

Updates npm from 11.3.0 to 11.7.0

Release notes

Sourced from npm's releases.

v11.7.0

11.7.0 (2025-12-09)

Features

Bug Fixes

Documentation

  • 7f2ab9d #8810 scripts: replace deprecated prepublish and install examples with prepare (Max Black)
  • 91ebab7 #8847 remove note about token create being disabled (@​owlstronaut)
  • 2030250 #8822 scripts: clarify prepare script runs with --production (Max Black)
  • 33a50d7 #8821 scripts: update npm_package_* environment variables documentation (Max Black)
  • 50508f9 #8793 package-json: add documentation for type field (#8793) (@​MaxBlack-dev, Max Black)
  • aa1dd7e #8823 scripts: document that prepare scripts run concurrently in workspaces (Max Black)
  • 3f48487 #8820 package-spec: fix alias syntax in examples (Max Black)
  • dd104da #8812 version: add note about git version requirements (Max Black)
  • 58afdcc #8792 install: clarify prerelease version range behavior (Max Black)
  • 9f818e8 #8795 npm-view: clarify object property access syntax and provide examples (Max Black)
  • 39c2f2e #8791 add examples for command line flags including --prefix (Max Black)
  • 1298530 #8790 clarify version field can be omitted in package-lock (Max Black)
  • 090b6ca #8794 npx: clarify that arguments are passed to executed command (Max Black)
  • a864f80 #8787 document gypfile field in package.json (Max Black)
  • 2fc689d #8788 add field access patterns to npm view (Max Black)
  • 4850639 #8796 package-json: add examples for replacing dependencies with forks in overrides (Max Black)
  • 4864dd4 #8798 npm-install: document engines field priority when installing packages (Max Black)
  • 95d25cd #8799 package-json: clarify repository field normalization during publish (Max Black)
  • a367f9b #8800 package-lock-json: clarify that version field may be omitted for certain dependencies (Max Black)
  • ffc9b71 #8801 npm-install: clarify --tag does not override package.json (#8801) (@​MaxBlack-dev, Max Black)
  • 73688ca #8735 clarify npm version behavior with prerelease versions (#8735) (@​yashwantbezawada)
  • 4a32606 #8785 updates the token create documentation (#8785) (@​owlstronaut, @​wraithgar)

Chores

Dependencies

v11.6.4

11.6.4 (2025-11-25)

Documentation

... (truncated)

Changelog

Sourced from npm's changelog.

11.7.0 (2025-12-09)

Features

Bug Fixes

Documentation

  • 7f2ab9d #8810 scripts: replace deprecated prepublish and install examples with prepare (Max Black)
  • 91ebab7 #8847 remove note about token create being disabled (@​owlstronaut)
  • 2030250 #8822 scripts: clarify prepare script runs with --production (Max Black)
  • 33a50d7 #8821 scripts: update npm_package_* environment variables documentation (Max Black)
  • 50508f9 #8793 package-json: add documentation for type field (#8793) (@​MaxBlack-dev, Max Black)
  • aa1dd7e #8823 scripts: document that prepare scripts run concurrently in workspaces (Max Black)
  • 3f48487 #8820 package-spec: fix alias syntax in examples (Max Black)
  • dd104da #8812 version: add note about git version requirements (Max Black)
  • 58afdcc #8792 install: clarify prerelease version range behavior (Max Black)
  • 9f818e8 #8795 npm-view: clarify object property access syntax and provide examples (Max Black)
  • 39c2f2e #8791 add examples for command line flags including --prefix (Max Black)
  • 1298530 #8790 clarify version field can be omitted in package-lock (Max Black)
  • 090b6ca #8794 npx: clarify that arguments are passed to executed command (Max Black)
  • a864f80 #8787 document gypfile field in package.json (Max Black)
  • 2fc689d #8788 add field access patterns to npm view (Max Black)
  • 4850639 #8796 package-json: add examples for replacing dependencies with forks in overrides (Max Black)
  • 4864dd4 #8798 npm-install: document engines field priority when installing packages (Max Black)
  • 95d25cd #8799 package-json: clarify repository field normalization during publish (Max Black)
  • a367f9b #8800 package-lock-json: clarify that version field may be omitted for certain dependencies (Max Black)
  • ffc9b71 #8801 npm-install: clarify --tag does not override package.json (#8801) (@​MaxBlack-dev, Max Black)
  • 73688ca #8735 clarify npm version behavior with prerelease versions (#8735) (@​yashwantbezawada)
  • 4a32606 #8785 updates the token create documentation (#8785) (@​owlstronaut, @​wraithgar)

Chores

Dependencies

11.6.4 (2025-11-25)

Documentation

... (truncated)

Commits
  • 6d1db87 chore: release 11.7.0
  • 4ebb831 fix: updates hints to use cli paradigm
  • 7f2ab9d docs(scripts): replace deprecated prepublish and install examples with prepare
  • 7896e51 fix: update the token list text
  • 91ebab7 docs: remove note about token create being disabled
  • 54929ce chore: update baseline-browser-mapping
  • 8ab8668 fix(query): support package-lock-only in workspaces
  • 0765289 fix: handle ENOTEMPTY errors in moveFile
  • 2030250 docs(scripts): clarify prepare script runs with --production
  • 33a50d7 docs(scripts): update npm_package_* environment variables documentation
  • Additional commits viewable in compare view

Updates sinon from 20.0.0 to 21.0.1

Changelog

Sourced from sinon's changelog.

21.0.1

  • 456a65c2 Update dependencies - except @​sinonjs/samsam (#2669) (Carl-Erik Kopseng)
  • f04f3eb1 Fix issue 2618 - Remove browserify in favor of esbuild (#2661) (Artur Parkhisenko)
  • 48b69df2 fix(docs): remove assert.failException from documentation (#2666) (Steffen Schroeder)
  • 13b27ccc Fix sandbox restore not handling stubbed functions (#2667) (thamion)
  • ae9e09ac Update compatibility target to ES2023 (Carl-Erik Kopseng)

    Updated compatibility target from ES2017 to ES2023 and clarified the note on breaking changes.

  • 26055043 Improve error message for immutable descriptors (#2664) (Stuart Dotson)
  • 80fa9a5b Also mirror the calledOnceWith assertion (#2660) (Benedikt Meurer)

Released by Carl-Erik Kopseng on 2025-12-19.

21.0.0

  • fd10f13f chore!: remove assert.failException property (#2659) (Morgan Roderick)

    BREAKING CHANGE: this removes assert.failException from the API

Released by Morgan Roderick on 2025-06-13.

Commits
  • a8bebe0 21.0.1
  • 456a65c Update dependencies - except @​sinonjs/samsam (#2669)
  • f04f3eb Fix issue 2618 - Remove browserify in favor of esbuild (#2661)
  • 48b69df fix(docs): remove assert.failException from documentation (#2666)
  • 13b27cc Fix sandbox restore not handling stubbed functions (#2667)
  • ae9e09a Update compatibility target to ES2023
  • 2605504 Improve error message for immutable descriptors (#2664)
  • 6d48f12 Update text to emphasise that the target is moving
  • 3d852ae Remember to quit on first error
  • 43c88c9 Add some output
  • Additional commits viewable in compare view

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    You can disable automated security fix PRs for this repo from the Security Alerts page.

Bumps [diff](https://github.com/kpdecker/jsdiff) to 5.2.2 and updates ancestor dependencies [diff](https://github.com/kpdecker/jsdiff), [npm](https://github.com/npm/cli) and [sinon](https://github.com/sinonjs/sinon). These dependencies need to be updated together.


Updates `diff` from 5.2.0 to 5.2.2
- [Changelog](https://github.com/kpdecker/jsdiff/blob/master/release-notes.md)
- [Commits](kpdecker/jsdiff@v5.2.0...v5.2.2)

Updates `diff` from 4.0.2 to 4.0.4
- [Changelog](https://github.com/kpdecker/jsdiff/blob/master/release-notes.md)
- [Commits](kpdecker/jsdiff@v5.2.0...v5.2.2)

Updates `npm` from 11.3.0 to 11.7.0
- [Release notes](https://github.com/npm/cli/releases)
- [Changelog](https://github.com/npm/cli/blob/latest/CHANGELOG.md)
- [Commits](npm/cli@v11.3.0...v11.7.0)

Updates `sinon` from 20.0.0 to 21.0.1
- [Release notes](https://github.com/sinonjs/sinon/releases)
- [Changelog](https://github.com/sinonjs/sinon/blob/main/docs/changelog.md)
- [Commits](sinonjs/sinon@v20.0.0...v21.0.1)

---
updated-dependencies:
- dependency-name: diff
  dependency-version: 5.2.2
  dependency-type: indirect
- dependency-name: diff
  dependency-version: 4.0.4
  dependency-type: indirect
- dependency-name: npm
  dependency-version: 11.7.0
  dependency-type: direct:development
- dependency-name: sinon
  dependency-version: 21.0.1
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code labels Jan 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant