Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Bump diff from 7.0.0 to 8.0.1#632

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
macbre merged 1 commit intodevelfromdependabot/npm_and_yarn/diff-8.0.1
May 14, 2025

Conversation

@dependabot
Copy link
Contributor

@dependabotdependabotbot commented on behalf ofgithubMay 14, 2025

Bumpsdiff from 7.0.0 to 8.0.1.

Changelog

Sourced fromdiff's changelog.

8.0.1

  • #610Fixes types fordiffJson which were broken by 8.0.0. The new bundled types in 8.0.0 only alloweddiffJson 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

  • #580Multiple tweaks todiffSentences:
    • 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 indiffWords 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 athttps://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 themerge function. Previously JsDiff included an undocumented function calledmerge 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 wasunclear 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:
    • thediff 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 foroptions arguments to diffing and patch-generation functions. (There are now different exported options types for abortable calls - ones with atimeout ormaxEditLength that may give a result ofundefined - and non-abortable calls.) See the TypeScript section of the README for some usage tips.

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

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

    • TheignoreWhitespace option fordiffWords is no longer included in the type declarations. The effect of passingignoreWhitespace: true has always been to makediffWords just calldiffWordsWithSpace 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 compatability, but TypeScript applications will now see a type error if they try to passignoreWhitespace: true todiffWords and should change their code to calldiffWordsWithSpace 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 usedArray.map which was added in ES5.)

  • #601 -diffJson'sstringifyReplacer option behaves more likeJSON.stringify'sreplacer argument now. In particular:
    • Each key/value pair now gets passed through the replacer once instead of twice
    • Thekey passed to the replacer when the top-level object is passed in asvalue is now"" (previously, wasundefined), and thekey 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 ofJSON.stringify.
  • #602 -diffing functions now consistently returnundefined when called in async mode (i.e. with a callback). Previously, there was an odd quirk where they would returntrue if the strings being diffed were equal andundefined otherwise.
Commits

Dependabot compatibility score

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)

Bumps [diff](https://github.com/kpdecker/jsdiff) from 7.0.0 to 8.0.1.- [Changelog](https://github.com/kpdecker/jsdiff/blob/master/release-notes.md)- [Commits](kpdecker/jsdiff@7.0.0...v8.0.1)---updated-dependencies:- dependency-name: diff  dependency-version: 8.0.1  dependency-type: direct:production  update-type: version-update:semver-major...Signed-off-by: dependabot[bot] <support@github.com>
@dependabotdependabotbot added dependenciesPull requests that update a dependency file javascriptPull requests that update Javascript code labelsMay 14, 2025
@dependabotdependabotbot mentioned this pull requestMay 14, 2025
@socket-security
Copy link

Review the following changes in direct dependencies. Learn more aboutSocket for GitHub.

DiffPackageSupply Chain
Security
VulnerabilityQualityMaintenanceLicense
Updateddiff@​7.0.0 ⏵ 8.0.1100+110010092100

View full report

@macbremacbre merged commit1b8ddcc intodevelMay 14, 2025
7 checks passed
@macbremacbre deleted the dependabot/npm_and_yarn/diff-8.0.1 branchMay 14, 2025 21:12
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

dependenciesPull requests that update a dependency filejavascriptPull requests that update Javascript code

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@macbre

[8]ページ先頭

©2009-2025 Movatter.jp