New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@vitest/pretty-format

Package Overview
Dependencies
Maintainers
4
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vitest/pretty-format - npm Package Compare versions

Comparing version 3.0.0 to 3.0.1

58

dist/index.js

@@ -295,3 +295,3 @@ import styles from 'tinyrainbow';

var _a;
return ((_a = val == null ? void 0 : val.constructor) == null ? void 0 : _a.name) && testNode(val);
return ((_a = val == null ? undefined : val.constructor) == null ? undefined : _a.name) && testNode(val);
};

@@ -380,3 +380,3 @@ function nodeIsText(node) {

}
return { done: true, value: void 0 };
return { done: true, value: undefined };
}

@@ -620,5 +620,5 @@ };

type.$$typeof === REACT_CLIENT_REFERENCE ||
void 0 !== type.getModuleId))
? !0
: !1;
undefined !== type.getModuleId))
? true
: false;
};

@@ -761,5 +761,5 @@ reactIs_production.typeOf = typeOf;

type.$$typeof === REACT_CLIENT_REFERENCE ||
void 0 !== type.getModuleId))
? !0
: !1;
undefined !== type.getModuleId))
? true
: false;
};

@@ -814,5 +814,5 @@ reactIs_development$1.typeOf = typeOf;

function v(a){if("object"===typeof a&&null!==a){var r=a.$$typeof;switch(r){case b:switch(a=a.type,a){case d:case f:case e:case m:case n:return a;default:switch(a=a&&a.$$typeof,a){case k:case h:case l:case q:case p:case g:return a;default:return r}}case c:return r}}}reactIs_production_min.ContextConsumer=h;reactIs_production_min.ContextProvider=g;reactIs_production_min.Element=b;reactIs_production_min.ForwardRef=l;reactIs_production_min.Fragment=d;reactIs_production_min.Lazy=q;reactIs_production_min.Memo=p;reactIs_production_min.Portal=c;reactIs_production_min.Profiler=f;reactIs_production_min.StrictMode=e;reactIs_production_min.Suspense=m;
reactIs_production_min.SuspenseList=n;reactIs_production_min.isAsyncMode=function(){return !1};reactIs_production_min.isConcurrentMode=function(){return !1};reactIs_production_min.isContextConsumer=function(a){return v(a)===h};reactIs_production_min.isContextProvider=function(a){return v(a)===g};reactIs_production_min.isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===b};reactIs_production_min.isForwardRef=function(a){return v(a)===l};reactIs_production_min.isFragment=function(a){return v(a)===d};reactIs_production_min.isLazy=function(a){return v(a)===q};reactIs_production_min.isMemo=function(a){return v(a)===p};
reactIs_production_min.SuspenseList=n;reactIs_production_min.isAsyncMode=function(){return false};reactIs_production_min.isConcurrentMode=function(){return false};reactIs_production_min.isContextConsumer=function(a){return v(a)===h};reactIs_production_min.isContextProvider=function(a){return v(a)===g};reactIs_production_min.isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===b};reactIs_production_min.isForwardRef=function(a){return v(a)===l};reactIs_production_min.isFragment=function(a){return v(a)===d};reactIs_production_min.isLazy=function(a){return v(a)===q};reactIs_production_min.isMemo=function(a){return v(a)===p};
reactIs_production_min.isPortal=function(a){return v(a)===c};reactIs_production_min.isProfiler=function(a){return v(a)===f};reactIs_production_min.isStrictMode=function(a){return v(a)===e};reactIs_production_min.isSuspense=function(a){return v(a)===m};reactIs_production_min.isSuspenseList=function(a){return v(a)===n};
reactIs_production_min.isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===d||a===f||a===e||a===m||a===n||a===t||"object"===typeof a&&null!==a&&(a.$$typeof===q||a.$$typeof===p||a.$$typeof===g||a.$$typeof===h||a.$$typeof===l||a.$$typeof===u||void 0!==a.getModuleId)?!0:!1};reactIs_production_min.typeOf=v;
reactIs_production_min.isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===d||a===f||a===e||a===m||a===n||a===t||"object"===typeof a&&null!==a&&(a.$$typeof===q||a.$$typeof===p||a.$$typeof===g||a.$$typeof===h||a.$$typeof===l||a.$$typeof===u||undefined!==a.getModuleId)?true:false};reactIs_production_min.typeOf=v;
return reactIs_production_min;

@@ -1139,3 +1139,3 @@ }

const { props } = element;
return Object.keys(props).filter((key) => key !== "children" && props[key] !== void 0).sort();
return Object.keys(props).filter((key) => key !== "children" && props[key] !== undefined).sort();
}

@@ -1170,3 +1170,3 @@ const serialize$1 = (element, config, indentation, depth, refs, printer) => ++depth > config.maxDepth ? printElementAsLeaf(getType(element), config) : printElement(

const { props } = object;
return props ? Object.keys(props).filter((key) => props[key] !== void 0).sort() : [];
return props ? Object.keys(props).filter((key) => props[key] !== undefined).sort() : [];
}

@@ -1242,3 +1242,3 @@ const serialize = (object, config, indentation, depth, refs, printer) => ++depth > config.maxDepth ? printElementAsLeaf(object.type, config) : printElement(

}
if (val === void 0) {
if (val === undefined) {
return "undefined";

@@ -1455,3 +1455,3 @@ }

callToJSON: true,
compareKeys: void 0,
compareKeys: undefined,
escapeRegex: false,

@@ -1475,3 +1475,3 @@ escapeString: true,

}
if (options.min && options.indent !== void 0 && options.indent !== 0) {
if (options.min && options.indent !== undefined && options.indent !== 0) {
throw new Error(

@@ -1503,26 +1503,26 @@ 'pretty-format: Options "min" and "indent" cannot be used together.'

function getPrintFunctionName(options) {
return (options == null ? void 0 : options.printFunctionName) ?? DEFAULT_OPTIONS.printFunctionName;
return (options == null ? undefined : options.printFunctionName) ?? DEFAULT_OPTIONS.printFunctionName;
}
function getEscapeRegex(options) {
return (options == null ? void 0 : options.escapeRegex) ?? DEFAULT_OPTIONS.escapeRegex;
return (options == null ? undefined : options.escapeRegex) ?? DEFAULT_OPTIONS.escapeRegex;
}
function getEscapeString(options) {
return (options == null ? void 0 : options.escapeString) ?? DEFAULT_OPTIONS.escapeString;
return (options == null ? undefined : options.escapeString) ?? DEFAULT_OPTIONS.escapeString;
}
function getConfig(options) {
return {
callToJSON: (options == null ? void 0 : options.callToJSON) ?? DEFAULT_OPTIONS.callToJSON,
colors: (options == null ? void 0 : options.highlight) ? getColorsHighlight() : getColorsEmpty(),
compareKeys: typeof (options == null ? void 0 : options.compareKeys) === "function" || (options == null ? void 0 : options.compareKeys) === null ? options.compareKeys : DEFAULT_OPTIONS.compareKeys,
callToJSON: (options == null ? undefined : options.callToJSON) ?? DEFAULT_OPTIONS.callToJSON,
colors: (options == null ? undefined : options.highlight) ? getColorsHighlight() : getColorsEmpty(),
compareKeys: typeof (options == null ? undefined : options.compareKeys) === "function" || (options == null ? undefined : options.compareKeys) === null ? options.compareKeys : DEFAULT_OPTIONS.compareKeys,
escapeRegex: getEscapeRegex(options),
escapeString: getEscapeString(options),
indent: (options == null ? void 0 : options.min) ? "" : createIndent((options == null ? void 0 : options.indent) ?? DEFAULT_OPTIONS.indent),
maxDepth: (options == null ? void 0 : options.maxDepth) ?? DEFAULT_OPTIONS.maxDepth,
maxWidth: (options == null ? void 0 : options.maxWidth) ?? DEFAULT_OPTIONS.maxWidth,
min: (options == null ? void 0 : options.min) ?? DEFAULT_OPTIONS.min,
plugins: (options == null ? void 0 : options.plugins) ?? DEFAULT_OPTIONS.plugins,
printBasicPrototype: (options == null ? void 0 : options.printBasicPrototype) ?? true,
indent: (options == null ? undefined : options.min) ? "" : createIndent((options == null ? undefined : options.indent) ?? DEFAULT_OPTIONS.indent),
maxDepth: (options == null ? undefined : options.maxDepth) ?? DEFAULT_OPTIONS.maxDepth,
maxWidth: (options == null ? undefined : options.maxWidth) ?? DEFAULT_OPTIONS.maxWidth,
min: (options == null ? undefined : options.min) ?? DEFAULT_OPTIONS.min,
plugins: (options == null ? undefined : options.plugins) ?? DEFAULT_OPTIONS.plugins,
printBasicPrototype: (options == null ? undefined : options.printBasicPrototype) ?? true,
printFunctionName: getPrintFunctionName(options),
spacingInner: (options == null ? void 0 : options.min) ? " " : "\n",
spacingOuter: (options == null ? void 0 : options.min) ? "" : "\n"
spacingInner: (options == null ? undefined : options.min) ? " " : "\n",
spacingOuter: (options == null ? undefined : options.min) ? "" : "\n"
};

@@ -1529,0 +1529,0 @@ }

{
"name": "@vitest/pretty-format",
"type": "module",
"version": "3.0.0",
"version": "3.0.1",
"description": "Fork of pretty-format with support for ESM",

@@ -6,0 +6,0 @@ "license": "MIT",

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc