Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sinon

Package Overview
Dependencies
Maintainers
4
Versions
208
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sinon - npm Package Compare versions

Comparing version 11.1.2 to 12.0.0

CHANGES.md

2

lib/sinon/promise.js

@@ -11,3 +11,3 @@ "use strict";

/**
* Returns a fake for a given function or undefined. If no functino is given, a
* Returns a fake for a given function or undefined. If no function is given, a
* new fake is returned. If the given function is already a fake, it is

@@ -14,0 +14,0 @@ * returned as is. Otherwise the given function is wrapped in a new fake.

@@ -123,12 +123,12 @@ "use strict";

return (format || "").replace(/%(.)/g, function (match, specifyer) {
formatter = proxyApi.formatters[specifyer];
return (format || "").replace(/%(.)/g, function (match, specifier) {
formatter = proxyApi.formatters[specifier];
if (typeof formatter === "function") {
return String(formatter(spyInstance, args));
} else if (!isNaN(parseInt(specifyer, 10))) {
return sinonFormat(args[specifyer - 1]);
} else if (!isNaN(parseInt(specifier, 10))) {
return sinonFormat(args[specifier - 1]);
}
return `%${specifyer}`;
return `%${specifier}`;
});

@@ -135,0 +135,0 @@ },

@@ -75,8 +75,10 @@ "use strict";

) {
if (calledArgs[j]) {
calledArgs[j] = quoteStringValue(calledArgs[j]);
var calledArg = calledArgs[j];
var expectedArg = expectedArgs[j];
if (calledArg) {
calledArg = quoteStringValue(calledArg);
}
if (expectedArgs[j]) {
expectedArgs[j] = quoteStringValue(expectedArgs[j]);
if (expectedArg) {
expectedArg = quoteStringValue(expectedArg);
}

@@ -87,7 +89,7 @@

var calledArgMessage =
j < calledArgs.length ? sinonFormat(calledArgs[j]) : "";
if (match.isMatcher(expectedArgs[j])) {
j < calledArgs.length ? sinonFormat(calledArg) : "";
if (match.isMatcher(expectedArg)) {
message += colorSinonMatchText(
expectedArgs[j],
calledArgs[j],
expectedArg,
calledArg,
calledArgMessage

@@ -97,5 +99,3 @@ );

var expectedArgMessage =
j < expectedArgs.length
? sinonFormat(expectedArgs[j])
: "";
j < expectedArgs.length ? sinonFormat(expectedArg) : "";
var diff = jsDiff.diffJson(

@@ -102,0 +102,0 @@ calledArgMessage,

@@ -111,3 +111,3 @@ "use strict";

if the sorce has an Accessor property copy over the accessor functions (get and set)
data properties has writable attribute where as acessor property don't
data properties has writable attribute where as accessor property don't
REF: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#properties

@@ -114,0 +114,0 @@ */

@@ -18,3 +18,3 @@ {

],
"version": "11.1.2",
"version": "12.0.0",
"homepage": "https://sinonjs.org/",

@@ -47,6 +47,6 @@ "author": "Christian Johansen",

"check-dependencies": "dependency-check package.json --no-dev --ignore-module esm",
"build": "node ./build.js",
"build": "node ./build.cjs",
"build-docs": "cd docs; bundle exec jekyll build",
"serve-docs": "cd docs; bundle exec jekyll serve --incremental --verbose",
"lint": "eslint '**/*.{js,mjs}'",
"lint": "eslint '**/*.{js,cjs,mjs}'",
"pretest-webworker": "npm run build",

@@ -60,2 +60,3 @@ "prebuild": "rimraf pkg && npm run check-dependencies",

"preversion": "./scripts/preversion.sh",
"version": "changes --commits --footer",
"postversion": "./scripts/postversion.sh"

@@ -78,3 +79,3 @@ },

"@sinonjs/commons": "^1.8.3",
"@sinonjs/fake-timers": "^7.1.2",
"@sinonjs/fake-timers": "^8.1.0",
"@sinonjs/samsam": "^6.0.2",

@@ -90,2 +91,3 @@ "diff": "^5.0.0",

"@sinonjs/referee": "^8.0.2",
"@studio/changes": "^2.2.0",
"babel-plugin-istanbul": "^6.0.0",

@@ -123,2 +125,7 @@ "babelify": "^10.0.0",

"module": "./pkg/sinon-esm.js",
"exports": {
"require": "./pkg/sinon.cjs",
"import": "./pkg/sinon-esm.js"
},
"type": "module",
"cdn": "./pkg/sinon.js",

@@ -125,0 +132,0 @@ "jsdelivr": "./pkg/sinon.js",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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