Socket
Socket
Sign inDemoInstall

jest-diff

Package Overview
Dependencies
12
Maintainers
4
Versions
229
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 20.1.0-delta.4 to 20.1.0-delta.5

30

build/diff_strings.js

@@ -18,11 +18,11 @@ 'use strict';

var _constants = require('./constants.js');function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
const DIFF_CONTEXT = 5; /**
* Copyright (c) 2014, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/
const DIFF_CONTEXT_DEFAULT = 5; /**
* Copyright (c) 2014, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/

@@ -37,2 +37,3 @@

const getColor = (added, removed) =>

@@ -99,4 +100,9 @@ added ? _chalk2.default.red : removed ? _chalk2.default.green : _chalk2.default.dim;

const structuredPatch = (a, b) => {
const options = { context: DIFF_CONTEXT };
const structuredPatch = (a, b, contextLines) => {
const options = {
context:
typeof contextLines === 'number' && contextLines >= 0 ?
contextLines :
DIFF_CONTEXT_DEFAULT };
let isDifferent = false;

@@ -147,3 +153,3 @@ // Make sure the strings end with a newline.

options && options.expand === false ?
structuredPatch(a, b) :
structuredPatch(a, b, options && options.contextLines) :
diffLines(a, b);

@@ -150,0 +156,0 @@

8

package.json
{
"name": "jest-diff",
"version": "20.1.0-delta.4",
"version": "20.1.0-delta.5",
"repository": {

@@ -13,6 +13,6 @@ "type": "git",

"diff": "^3.2.0",
"jest-get-type": "20.1.0-delta.4",
"jest-matcher-utils": "20.1.0-delta.4",
"pretty-format": "20.1.0-delta.4"
"jest-get-type": "20.1.0-delta.5",
"jest-matcher-utils": "20.1.0-delta.5",
"pretty-format": "20.1.0-delta.5"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc