pretty-format
Advanced tools
Comparing version 20.0.3 to 20.1.0-alpha.1
@@ -19,12 +19,18 @@ 'use strict'; | ||
const style = require('ansi-styles'); /** | ||
* Copyright (c) 2014-present, 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. | ||
* | ||
* | ||
*/ | ||
var _ansiStyles = require('ansi-styles');var _ansiStyles2 = _interopRequireDefault(_ansiStyles); | ||
var _asymmetric_matcher = require('./plugins/asymmetric_matcher');var _asymmetric_matcher2 = _interopRequireDefault(_asymmetric_matcher); | ||
var _convert_ansi = require('./plugins/convert_ansi');var _convert_ansi2 = _interopRequireDefault(_convert_ansi); | ||
var _html_element = require('./plugins/html_element');var _html_element2 = _interopRequireDefault(_html_element); | ||
var _immutable_plugins = require('./plugins/immutable_plugins');var _immutable_plugins2 = _interopRequireDefault(_immutable_plugins); | ||
var _react_element = require('./plugins/react_element');var _react_element2 = _interopRequireDefault(_react_element); | ||
var _react_test_component = require('./plugins/react_test_component');var _react_test_component2 = _interopRequireDefault(_react_test_component);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };} /** | ||
* Copyright (c) 2014-present, 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. | ||
* | ||
* | ||
*/ | ||
@@ -43,3 +49,2 @@ | ||
const toString = Object.prototype.toString; | ||
@@ -792,3 +797,2 @@ const toISOString = Date.prototype.toISOString; | ||
callToJSON: true, | ||
edgeSpacing: '\n', | ||
escapeRegex: false, | ||
@@ -801,3 +805,2 @@ highlight: false, | ||
printFunctionName: true, | ||
spacing: '\n', | ||
theme: { | ||
@@ -888,3 +891,3 @@ comment: 'gray', | ||
if (opts.highlight) { | ||
const color = colors[key] = style[opts.theme[key]]; | ||
const color = colors[key] = _ansiStyles2.default[opts.theme[key]]; | ||
if ( | ||
@@ -967,10 +970,10 @@ !color || | ||
prettyFormat.plugins = { | ||
AsymmetricMatcher: require('./plugins/AsymmetricMatcher'), | ||
ConvertAnsi: require('./plugins/ConvertAnsi'), | ||
HTMLElement: require('./plugins/HTMLElement'), | ||
Immutable: require('./plugins/ImmutablePlugins'), | ||
ReactElement: require('./plugins/ReactElement'), | ||
ReactTestComponent: require('./plugins/ReactTestComponent') }; | ||
AsymmetricMatcher: _asymmetric_matcher2.default, | ||
ConvertAnsi: _convert_ansi2.default, | ||
HTMLElement: _html_element2.default, | ||
Immutable: _immutable_plugins2.default, | ||
ReactElement: _react_element2.default, | ||
ReactTestComponent: _react_test_component2.default }; | ||
module.exports = prettyFormat; |
{ | ||
"name": "pretty-format", | ||
"version": "20.0.3", | ||
"version": "20.1.0-alpha.1", | ||
"repository": { | ||
@@ -11,3 +11,2 @@ "type": "git", | ||
"main": "build/index.js", | ||
"browser": "build-es5/index.js", | ||
"author": "James Kyle <me@thejameskyle.com>", | ||
@@ -14,0 +13,0 @@ "dependencies": { |
@@ -9,3 +9,4 @@ /** | ||
const util = require('util'); | ||
import util from 'util'; | ||
const chalk = require('chalk'); | ||
@@ -16,3 +17,3 @@ const React = require('react'); | ||
const prettyFormat = require('../build'); | ||
const ReactTestComponent = require('../build/plugins/ReactTestComponent'); | ||
const ReactTestComponent = require('../build/plugins/react_test_component'); | ||
const worldGeoJson = require('./world.geo.json'); | ||
@@ -19,0 +20,0 @@ |
@@ -21,3 +21,3 @@ # pretty-format | ||
var obj = { property: {} }; | ||
const obj = {property: {}}; | ||
obj.circularReference = obj; | ||
@@ -34,3 +34,3 @@ obj[Symbol('foo')] = 'foo'; | ||
```js | ||
``` | ||
Object { | ||
@@ -105,3 +105,3 @@ "property": Object {}, | ||
return 'Foo: ' + print(val.foo); | ||
} | ||
}, | ||
}; | ||
@@ -112,3 +112,3 @@ | ||
prettyFormat(obj, { | ||
plugins: [fooPlugin] | ||
plugins: [fooPlugin], | ||
}); | ||
@@ -133,3 +133,3 @@ // Foo: Object { | ||
prettyFormat(renderer.create(element).toJSON(), { | ||
plugins: [reactTestPlugin, reactElementPlugin] | ||
plugins: [reactTestPlugin, reactElementPlugin], | ||
}); | ||
@@ -136,0 +136,0 @@ // <h1> |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 6 instances in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 14 instances in 1 package
7
328179
21
2651
2