forked from kpdecker/jsdiff
-
Notifications
You must be signed in to change notification settings - Fork 0
Update to latest JSDiff #1
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Conversation
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
* Upgrade json5 * Upgrade express * Upgrade decode-uri-component * Upgrade engine.io * Upgrade loader-utils * Upgrade socket.io-parser * Upgrade grunt * Upgrade karma * Upgrade browserslist * Upgrade handlebars * Upgrade ssri * Upgrade y18n * Upgrade elliptic
Bumps [karma](https://github.com/karma-runner/karma) from 5.1.1 to 6.3.16. - [Release notes](https://github.com/karma-runner/karma/releases) - [Changelog](https://github.com/karma-runner/karma/blob/master/CHANGELOG.md) - [Commits](karma-runner/karma@v5.1.1...v6.3.16) --- updated-dependencies: - dependency-name: karma dependency-type: direct:development ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
As @paultinker notes in #413, version 5.1.0 of jsdiff was released to npm last year, but the package.json in the repo still says we're on 5.0.0. Let's update the repo!
Bumps [qs](https://github.com/ljharb/qs) from 6.7.0 to 6.11.0. - [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md) - [Commits](ljharb/qs@v6.7.0...v6.11.0) --- updated-dependencies: - dependency-name: qs dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Mark Amery <[email protected]>
Use the standard BSD 3-Clause license
* Document diffJson() options * Tweaks: fix run-on sentences; backtick JSON.stringify; name the JSON.stringify parameter this is similar to * Add full stop * Correct docs about how stringifyReplacer & undefinedReplacement interact --------- Co-authored-by: Mark Amery <[email protected]>
* Fix exports field in `package.json` * Use exports syntax for both new and old versions of Node --------- Co-authored-by: Mark Amery <[email protected]>
…d first (#431) Resolves #362 (comment) Resolves #237 Resolves #327
Fixes #228 Co-authored-by: Cinedin <[email protected]>
…ormance in some cases (#411)
…GitHub, relating to the 5.1.0 release (#443)
* Basic option for ignoring CR when doing linediff * Add tests for supporting `stripTrailingCr` in createPatch * Update documentation for createPatch * Improve english of README changes * Only remove one \r to match GNU diff behaviour * Fix the same bad english in other place in README
…th unified diffs (#435) * Add test of vertical tab handling * Stop treating stuff like vertical tabs as line breaks when dealing with unified diffs * Add release notes * Add a consistency test
* Fix a trivial code formatting inconsistency * Add test showing patch from bug #177 is handled correctly now
…ers's paper (#440) * Fix core algorithm implementation being mirrored relative to the Myers algorithm It makes it harder than it needs to be to reason about the algorithm when everything is flipped relative to Myers' paper. In Myers' paper, we keep track in an array of the index each diagonal has reached in the old string, and positive diagonal numbers represent diagonals where we have done more deletions than insertions. In JsDiff as it exists on master, we keep track in an array of the index each diagonal has reached in the NEW string, and positive diagonal numbers represent diagonals where we have done more insertions than deletions. Everything is mirrored, and this also causes an actual behaviour mismatch between JsDiff and an accurate Myers diff implementation - namely that when we diff e.g. 'abcd' against 'acbd' we output a diff that does an insertion and then later a deletion, rather than a deletion first and an insertion later like it should be. This patch makes the code in base.js be a closer match to what's in Myers's paper, which should make comparing this to other implementations or adding any of the optimizations proposed in Myers's paper easier. For now, this DOESN'T change any behaviour (I've added a hack, noted with a TODO, to ensure this) although it'll now be straightforward to fix the bug mentioned above. * Fix comment
… same, like the Myers diff paper does (#439) * Add test for Unix diff-style ordering of deletions & insertions * Tweak base.js to prefer extending paths that have previously done more deletions * Remove now-redundant code to flip the order of immediately consecutive add and remove operations * Fix existing tests * add release notes
…edge of the graph (#448) * Speed up algorithm by not considering diagonals that take us off the edge of the graph * Note deviations from Myers diff in the README * Add release notes * Use capitalisation 'jsdiff', which seems most common
* Support `Object.create(null)` in JSON diffing * Eliminate unnecessary variables --------- Co-authored-by: Mark Amery <[email protected]>
* Refactor tokenization logic in diffWords * Add test * Tweak handling of Unix newlines for clarity Previously the behaviour was kinda correct by coincidence; a \n without a \r was treated as a punctuation mark by the regex
Bumps [ip](https://github.com/indutny/node-ip) from 1.1.5 to 1.1.9. - [Commits](indutny/node-ip@v1.1.5...v1.1.9) --- updated-dependencies: - dependency-name: ip dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…500) * [fix] str.split can not handle surrogate pair, replaced with Array.from * Add some docs * Add release notes * Add unit test of new behaviour --------- Co-authored-by: 星星 <[email protected]>
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.4 to 1.15.6. - [Release notes](https://github.com/follow-redirects/follow-redirects/releases) - [Commits](follow-redirects/follow-redirects@v1.15.4...v1.15.6) --- updated-dependencies: - dependency-name: follow-redirects dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Upgrade chai a bit * Bump rollup one major version (doesn't break anything yet) * Bump rollup to 3.0.0 and tweak stuff to make the error messages go away * Bump rollup to latest
* Remove 'strict' option; make strict mode always-on * Support multi-file patches with no 'Index: ' or 'diff ' line but with a ============== line * Fix wrong line numbers in a patch in the tests * Fix wrong line numbers in another patch in the tests * Fix wrong line numbers in another test * Fix wrong line numbers in another test * Fix wrong line numbers in another test * Fix wrong line numbers in another test * Fix wrong line numbers in another test * Fix wrong line numbers in another test * Fix wrong line numbers in another test * Fix wrong line numbers in another test * Fix wrong line numbers in another test * Fix wrong line numbers in another test * Fix wrong line numbers in another test * Fix wrong line numbers in another test * Fix wrong line numbers in another test * Fix wrong line numbers in another test * Fix wrong line numbers in another test * Fix wrong line numbers in another test * Fix wrong line numbers in another test * Fix wrong line numbers in another test * Fix wrong line numbers in another test (but it still fails - interesting) * Fix wrong line numbers in another test * Fix wrong line numbers in another test * Fix wrong line numbers in another test * Fix wrong line numbers in another test * Fix wrong line numbers in another test * Fix wrong line numbers in another test * Fix wrong line numbers in another test * Remove a failing test whose intention I can't make sense of. What does the 'leading section' even mean here? * Add release notes
…ease a bit (#510) * Tweak CONTRIBUTING.md to use the 'release' task, which includes a license in diff.js and diff.min.js (omitted in v5.2.0 by mistake) * Delete pointless/unused 'version' Grunt task There's no reference to this in any docs and as far as I can tell there's no reason I'd ever want to run it. * Flesh out docs on how to do a release a bit more * Flesh out reminder even more, for the sake of future idiots (e.g. me)
…irrelevant on master) (#509)
Bumps [webpack-dev-middleware](https://github.com/webpack/webpack-dev-middleware) from 7.0.0 to 7.1.1. - [Release notes](https://github.com/webpack/webpack-dev-middleware/releases) - [Changelog](https://github.com/webpack/webpack-dev-middleware/blob/master/CHANGELOG.md) - [Commits](webpack/webpack-dev-middleware@v7.0.0...v7.1.1) --- updated-dependencies: - dependency-name: webpack-dev-middleware dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [express](https://github.com/expressjs/express) from 4.18.3 to 4.19.2. - [Release notes](https://github.com/expressjs/express/releases) - [Changelog](https://github.com/expressjs/express/blob/master/History.md) - [Commits](expressjs/express@4.18.3...4.19.2) --- updated-dependencies: - dependency-name: express dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…gs (#518) * Remove linedelimiters * Add a util for converting patches between Windows & Unix line endings * Add some more utils * Remove lingering linedelimiters references * Fix linting errors * Add patch line ending autoconversion and tests thereof * Document autoConvertLineEndings * Add release notes * Add a failing test I need to fix * Add stubs of more necessary tests * More tests, fix a test name * Make a test pass; fix some test names * Get tests passing * Improve coverage * Add another test to get over the coverage threshold * Remove meaningless/inappropriate 'Create patch' comment - both from original location and places I dumbly copied it to
* Support callback option in structuredPatch * Test callback in structuredPatch * Add test of callback option to createPatch * Add callback support to createPatch * Add one more test to get over the coverage threshold * Update README * Support passing function as 'options' argument as with existing methods * Add release notes * Add more tests to meet coverage threshold
Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3. - [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md) - [Commits](micromatch/braces@3.0.2...3.0.3) --- updated-dependencies: - dependency-name: braces dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Fix patch parser, making most tests pass (but why do I have a weird new failure?...) * Fix bug I introduced, caught by test failure * Fix bugs with my tests * Remove mention of leadingGarbage (introduced by cherry-picking changes from #522) * Improve test coverage * Add release notes
* Add ignoreNewlineAtEof * Document new option * Add release notes
* Add stubs of three new tests * Flesh out one test * Add more stubs * First draft of new applyPatch; seems to be fucked currently * Fix some bugs in my work * Fix more bugs * Fix another bug * Fix another bug * Fix a bad test * Fix another bug * Fix a test bug * Make distance-iterator behaviour match its documentation * More tests * New test * rearrange planned tests a bit * Add a test * Add failing test - a bug, I think? * Fix bug and fix test * Add another test case * Add more tests * Delete redundant test * Add another test * Add another test * Placate eslint * Add a silly additional test to placate istanbul * Fix something silly I did, and further improve coverage metric in doing so * Add more tests to pump up coverage metric further * Eliminate for...of loops to placate the coverage checker * Add yet more tests to reach 100% coverage * Add docs * Tweak docs * Tweak docs * Add release notes
* Add (failing) test case from #531 * Fix test I just added (the test itself, not the jsdiff behaviour) * Fix the new test (but make an old one fail as a side effect) * Stop allowing newlineIsToken to be passed to patch-generation functions (... and causing them to generate patches that can't be applied) * Remove impossible case to placate the coverage checker * Add release notes
…oke in (pre-release) changes to applyPatch (#536) * Add test showing broken newline-at-EOF handling in applyPatch * Fix newline-at-EOF behaviour in applyPatch
* Add Intl.Segmenter support and some initial tests. (Missing docs, coverage, release notes.) * Get to 100% coverage * Document intlSegmenter * Improve docs * Add release notes
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.
No description provided.