react-diff-viewer-continued 3.2.3 → 3.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,34 @@
1
+ {
2
+ "files": [
3
+ "README.md"
4
+ ],
5
+ "imageSize": 100,
6
+ "commit": false,
7
+ "commitConvention": "angular",
8
+ "contributors": [
9
+ {
10
+ "login": "ericmorgan1",
11
+ "name": "Eric M.",
12
+ "avatar_url": "https://avatars.githubusercontent.com/u/10346191?v=4",
13
+ "profile": "https://github.com/ericmorgan1",
14
+ "contributions": [
15
+ "code"
16
+ ]
17
+ },
18
+ {
19
+ "login": "spyroid",
20
+ "name": "Andrei Kovalevsky",
21
+ "avatar_url": "https://avatars.githubusercontent.com/u/844495?v=4",
22
+ "profile": "https://github.com/spyroid",
23
+ "contributions": [
24
+ "code"
25
+ ]
26
+ }
27
+ ],
28
+ "contributorsPerLine": 7,
29
+ "skipCi": true,
30
+ "repoType": "github",
31
+ "repoHost": "https://github.com",
32
+ "projectName": "react-diff-viewer-continued",
33
+ "projectOwner": "Aeolun"
34
+ }
@@ -16,7 +16,7 @@ jobs:
16
16
  uses: actions/setup-node@v3
17
17
  with:
18
18
  node-version: 'lts/*'
19
- - uses: pnpm/action-setup@v2.2.2
19
+ - uses: pnpm/action-setup@v2.2.4
20
20
  with:
21
21
  version: latest
22
22
  - name: Install dependencies
@@ -16,7 +16,7 @@ jobs:
16
16
  uses: actions/setup-node@v3
17
17
  with:
18
18
  node-version: 'lts/*'
19
- - uses: pnpm/action-setup@v2.2.2
19
+ - uses: pnpm/action-setup@v2.2.4
20
20
  with:
21
21
  version: latest
22
22
  - name: Install dependencies
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [3.2.4](https://github.com/aeolun/react-diff-viewer-continued/compare/v3.2.3...v3.2.4) (2022-12-23)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * to deploy previous fixes ([06d8361](https://github.com/aeolun/react-diff-viewer-continued/commit/06d83614204d0c48c3ac654b06c43ba42f679c56))
7
+
1
8
  ## [3.2.3](https://github.com/aeolun/react-diff-viewer-continued/compare/v3.2.2...v3.2.3) (2022-11-11)
2
9
 
3
10
 
package/README.md CHANGED
@@ -1,12 +1,18 @@
1
1
  <img src='https://github.com/Aeolun/react-diff-viewer-continued/raw/master/logo_dark.png' width="100%" alt='React Diff Viewer' />
2
+
2
3
  <br/>
3
4
 
4
- [![npm version](https://badge.fury.io/js/react-diff-viewer-continued.svg)](https://badge.fury.io/js/react-diff-viewer-continued)
5
+ <!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
6
+ [![All Contributors](https://img.shields.io/badge/all_contributors-2-orange.svg?style=flat)](#contributors)
7
+ <!-- ALL-CONTRIBUTORS-BADGE:END -->
8
+
9
+ [![npm version](https://img.shields.io/npm/v/react-diff-viewer-continued)](https://www.npmjs.com/package/react-diff-viewer-continued)
10
+ [![npm downloads](https://img.shields.io/npm/dw/react-diff-viewer-continued)](https://www.npmjs.com/package/react-diff-viewer-continued)
5
11
  [![GitHub license](https://img.shields.io/github/license/aeolun/react-diff-viewer-continued.svg)](https://github.com/aeolun/react-diff-viewer-continued/blob/master/LICENSE)
6
12
 
7
13
  A simple and beautiful text diff viewer component made with [Diff](https://github.com/kpdecker/jsdiff) and [React](https://reactjs.org).
8
14
 
9
- Inspired from Github diff viewer, it includes features like split view, inline view, word diff, line highlight and more. It is highly customizable and it supports almost all languages.
15
+ Inspired by the Github diff viewer, it includes features like split view, inline view, word diff, line highlight and more. It is highly customizable and it supports almost all languages.
10
16
 
11
17
  Most credit goes to [Pranesh Ravi](https://praneshravi.in) who created the [original diff viewer](https://github.com/praneshr/react-diff-viewer). I've just made a few modifications and updated the dependencies so they work with modern stacks.
12
18
 
@@ -362,6 +368,32 @@ pnpm start:examples
362
368
 
363
369
  Check package.json for more build scripts.
364
370
 
371
+ ## Contributors
372
+
373
+ <!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
374
+ <!-- prettier-ignore-start -->
375
+ <!-- markdownlint-disable -->
376
+ <table>
377
+ <tbody>
378
+ <tr>
379
+ <td align="center"><a href="https://github.com/ericmorgan1"><img src="https://avatars.githubusercontent.com/u/10346191?v=4?s=100" width="100px;" alt="Eric M."/><br /><sub><b>Eric M.</b></sub></a><br /><a href="https://github.com/Aeolun/react-diff-viewer-continued/commits?author=ericmorgan1" title="Code">💻</a></td>
380
+ <td align="center"><a href="https://github.com/spyroid"><img src="https://avatars.githubusercontent.com/u/844495?v=4?s=100" width="100px;" alt="Andrei Kovalevsky"/><br /><sub><b>Andrei Kovalevsky</b></sub></a><br /><a href="https://github.com/Aeolun/react-diff-viewer-continued/commits?author=spyroid" title="Code">💻</a></td>
381
+ </tr>
382
+ </tbody>
383
+ </table>
384
+
385
+ <!-- markdownlint-restore -->
386
+ <!-- prettier-ignore-end -->
387
+
388
+ <!-- ALL-CONTRIBUTORS-LIST:END -->
389
+ <!-- prettier-ignore-start -->
390
+ <!-- markdownlint-disable -->
391
+
392
+ <!-- markdownlint-restore -->
393
+ <!-- prettier-ignore-end -->
394
+
395
+ <!-- ALL-CONTRIBUTORS-LIST:END -->
396
+
365
397
  ## License
366
398
 
367
399
  MIT
@@ -193,7 +193,6 @@ const computeLineInformation = (oldString, newString, disableWordDiff = false, l
193
193
  ...getLineInformation(value, index, added, removed),
194
194
  ];
195
195
  });
196
- console.log(lineInformation);
197
196
  return {
198
197
  lineInformation,
199
198
  diffLines,
package/lib/index.js CHANGED
@@ -236,7 +236,7 @@ class DiffViewer extends React.Component {
236
236
  */
237
237
  this.renderDiff = () => {
238
238
  const { oldValue, newValue, splitView, disableWordDiff, compareMethod, linesOffset, } = this.props;
239
- const { lineInformation, diffLines } = (0, compute_lines_1.computeLineInformation)(oldValue, newValue, disableWordDiff, compute_lines_1.DiffMethod.CHARS, linesOffset);
239
+ const { lineInformation, diffLines } = (0, compute_lines_1.computeLineInformation)(oldValue, newValue, disableWordDiff, compareMethod, linesOffset);
240
240
  const extraLines = this.props.extraLinesSurroundingDiff < 0
241
241
  ? 0
242
242
  : this.props.extraLinesSurroundingDiff;
@@ -253,7 +253,6 @@ class DiffViewer extends React.Component {
253
253
  (currentPosition > extraLines ||
254
254
  typeof diffBlockStart === 'undefined') &&
255
255
  !this.state.expandedBlocks.includes(diffBlockStart)) {
256
- console.log('skipping', line);
257
256
  skippedLines.push(i + 1);
258
257
  // show skipped line indicator only if there is more than one line to hide
259
258
  if (i === lineInformation.length - 1 && skippedLines.length > 1) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-diff-viewer-continued",
3
- "version": "3.2.3",
3
+ "version": "3.2.4",
4
4
  "private": false,
5
5
  "description": "Continuation of a simple and beautiful text diff viewer component made with diff and React",
6
6
  "keywords": [