node-diff3
Advanced tools
+9
-0
@@ -19,2 +19,11 @@ # What's New | ||
| --> | ||
| ## 2.1.2 | ||
| ##### 2021-may-04 | ||
| * ([#44]) Fix "Type 'Buffer' is not generic." TypeScript error | ||
| [#44]: https://github.com/bhousel/node-diff3/issues/44 | ||
| ## 2.1.1 | ||
@@ -21,0 +30,0 @@ ##### 2021-apr-26 |
| (function (global, factory) { | ||
| typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : | ||
| typeof define === 'function' && define.amd ? define(['exports'], factory) : | ||
| (global = global || self, factory(global.Diff3 = {})); | ||
| (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Diff3 = {})); | ||
| }(this, (function (exports) { 'use strict'; | ||
@@ -394,3 +394,3 @@ | ||
| lines = lines.concat(result.ok); | ||
| } else if (result.conflict) { | ||
| } else if (result.conflict) { | ||
| conflict = true; | ||
@@ -508,3 +508,3 @@ lines.push(("<<<<<<<" + (options.label.a ? (" " + (options.label.a)) : ''))); | ||
| // Takes the output of diffPatch(), and removes extra information from it. | ||
| // Takes the output of diffPatch(), and removes extra information from it. | ||
| // It can still be used by patch(), below, but can no longer be inverted. | ||
@@ -519,8 +519,8 @@ function stripPatch(patch) { | ||
| // Takes the output of diffPatch(), and inverts the sense of it, so that it | ||
| // Takes the output of diffPatch(), and inverts the sense of it, so that it | ||
| // can be applied to buffer2 to give buffer1 rather than the other way around. | ||
| function invertPatch(patch) { | ||
| return patch.map(function (chunk) { return ({ | ||
| buffer1: chunk.buffer2, | ||
| buffer2: chunk.buffer1 | ||
| return patch.map(function (chunk) { return ({ | ||
| buffer1: chunk.buffer2, | ||
| buffer2: chunk.buffer1 | ||
| }); }); | ||
@@ -527,0 +527,0 @@ } |
+7
-7
| (function (global, factory) { | ||
| typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : | ||
| typeof define === 'function' && define.amd ? define(['exports'], factory) : | ||
| (global = global || self, factory(global.Diff3 = {})); | ||
| (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Diff3 = {})); | ||
| }(this, (function (exports) { 'use strict'; | ||
@@ -394,3 +394,3 @@ | ||
| lines = lines.concat(result.ok); | ||
| } else if (result.conflict) { | ||
| } else if (result.conflict) { | ||
| conflict = true; | ||
@@ -508,3 +508,3 @@ lines.push(`<<<<<<<${options.label.a ? ` ${options.label.a}` : ''}`); | ||
| // Takes the output of diffPatch(), and removes extra information from it. | ||
| // Takes the output of diffPatch(), and removes extra information from it. | ||
| // It can still be used by patch(), below, but can no longer be inverted. | ||
@@ -519,8 +519,8 @@ function stripPatch(patch) { | ||
| // Takes the output of diffPatch(), and inverts the sense of it, so that it | ||
| // Takes the output of diffPatch(), and inverts the sense of it, so that it | ||
| // can be applied to buffer2 to give buffer1 rather than the other way around. | ||
| function invertPatch(patch) { | ||
| return patch.map(chunk => ({ | ||
| buffer1: chunk.buffer2, | ||
| buffer2: chunk.buffer1 | ||
| return patch.map(chunk => ({ | ||
| buffer1: chunk.buffer2, | ||
| buffer2: chunk.buffer1 | ||
| })); | ||
@@ -527,0 +527,0 @@ } |
+1
-1
@@ -70,3 +70,3 @@ export interface ILCSResult { | ||
| export function patch<T>(buffer: T[], patch: IPatchRes<T>[]): Buffer<T>[]; | ||
| export function patch<T>(buffer: T[], patch: IPatchRes<T>[]): T[]; | ||
@@ -73,0 +73,0 @@ export interface IStableRegion<T> { |
+7
-7
@@ -404,3 +404,3 @@ export { | ||
| lines = lines.concat(result.ok); | ||
| } else if (result.conflict) { | ||
| } else if (result.conflict) { | ||
| conflict = true; | ||
@@ -518,3 +518,3 @@ lines.push(`<<<<<<<${options.label.a ? ` ${options.label.a}` : ''}`); | ||
| // Takes the output of diffPatch(), and removes extra information from it. | ||
| // Takes the output of diffPatch(), and removes extra information from it. | ||
| // It can still be used by patch(), below, but can no longer be inverted. | ||
@@ -529,9 +529,9 @@ function stripPatch(patch) { | ||
| // Takes the output of diffPatch(), and inverts the sense of it, so that it | ||
| // Takes the output of diffPatch(), and inverts the sense of it, so that it | ||
| // can be applied to buffer2 to give buffer1 rather than the other way around. | ||
| function invertPatch(patch) { | ||
| return patch.map(chunk => ({ | ||
| buffer1: chunk.buffer2, | ||
| buffer2: chunk.buffer1 | ||
| return patch.map(chunk => ({ | ||
| buffer1: chunk.buffer2, | ||
| buffer2: chunk.buffer1 | ||
| })); | ||
| } | ||
| } |
+6
-6
| { | ||
| "name": "node-diff3", | ||
| "version": "2.1.1", | ||
| "version": "2.1.2", | ||
| "license": "MIT", | ||
@@ -21,8 +21,8 @@ "repository": "bhousel/node-diff3", | ||
| "devDependencies": { | ||
| "@rollup/plugin-buble": "^0.21.1", | ||
| "coveralls": "^3.0.9", | ||
| "eslint": "^7.0.0", | ||
| "@rollup/plugin-buble": "^0.21.3", | ||
| "coveralls": "^3.1.0", | ||
| "eslint": "^7.25.0", | ||
| "npm-run-all": "^4.1.5", | ||
| "rollup": "^2.0.6", | ||
| "tap": "^15.0.1" | ||
| "rollup": "^2.47.0", | ||
| "tap": "^15.0.6" | ||
| }, | ||
@@ -29,0 +29,0 @@ "scripts": { |
| # Please see the documentation for all configuration options: | ||
| # https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
| version: 2 | ||
| updates: | ||
| - package-ecosystem: "npm" | ||
| directory: "/" | ||
| schedule: | ||
| interval: "daily" |
| # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node | ||
| # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | ||
| name: build | ||
| on: | ||
| push: | ||
| branches: [ main ] | ||
| pull_request: | ||
| branches: [ main ] | ||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| node-version: [10.x, 12.x, 14.x, 16.x] | ||
| steps: | ||
| - uses: actions/checkout@v2 | ||
| - name: Use Node.js ${{ matrix.node-version }} | ||
| uses: actions/setup-node@v1 | ||
| with: | ||
| node-version: ${{ matrix.node-version }} | ||
| - run: npm install | ||
| - run: npm run test |
1551
0.06%66669
-1.11%9
-18.18%