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

@tapjs/intercept

Package Overview
Dependencies
Maintainers
2
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tapjs/intercept - npm Package Compare versions

Comparing version 1.0.3 to 1.1.0

2

dist/commonjs/index.d.ts

@@ -22,2 +22,3 @@ import { TapPlugin, TestBase } from '@tapjs/core';

args: OverloadParams<F>;
receiver: any;
at?: CallSiteLike;

@@ -141,2 +142,3 @@ stack?: string;

export interface InterceptResultBase {
receiver: any;
at?: CallSiteLike;

@@ -143,0 +145,0 @@ stack?: string;

@@ -97,2 +97,3 @@ "use strict";

resList.push({
receiver: this,
type: 'get',

@@ -141,2 +142,3 @@ at: (0, stack_1.at)(interceptor.get),

resList.push({
receiver: this,
type: 'set',

@@ -233,2 +235,3 @@ at: (0, stack_1.at)(interceptor.set),

const res = {
receiver: this,
args,

@@ -235,0 +238,0 @@ at: (0, stack_1.at)(wrapped),

@@ -22,2 +22,3 @@ import { TapPlugin, TestBase } from '@tapjs/core';

args: OverloadParams<F>;
receiver: any;
at?: CallSiteLike;

@@ -141,2 +142,3 @@ stack?: string;

export interface InterceptResultBase {
receiver: any;
at?: CallSiteLike;

@@ -143,0 +145,0 @@ stack?: string;

@@ -94,2 +94,3 @@ import { plugin as TeardownPlugin } from '@tapjs/after';

resList.push({
receiver: this,
type: 'get',

@@ -138,2 +139,3 @@ at: at(interceptor.get),

resList.push({
receiver: this,
type: 'set',

@@ -230,2 +232,3 @@ at: at(interceptor.set),

const res = {
receiver: this,
args,

@@ -232,0 +235,0 @@ at: at(wrapped),

8

package.json
{
"name": "@tapjs/intercept",
"version": "1.0.3",
"version": "1.1.0",
"description": "a built-in tap extension for t.intercept() and t.capture()",

@@ -44,7 +44,7 @@ "type": "module",

"peerDependencies": {
"@tapjs/core": "1.0.3"
"@tapjs/core": "1.1.0"
},
"dependencies": {
"@tapjs/after": "1.0.3",
"@tapjs/stack": "1.0.0"
"@tapjs/after": "1.0.4",
"@tapjs/stack": "1.1.0"
},

@@ -51,0 +51,0 @@ "engines": {

@@ -73,5 +73,5 @@ # `@tapjs/intercept`

t.match(results(), [
{ type: 'get', value: '1.2.3', success: true },
{ type: 'set', value: '2.4.6', success: false },
{ type: 'get', value: '1.2.3', success: true },
{ receiver: process, type: 'get', value: '1.2.3', success: true },
{ receiver: process, type: 'set', value: '2.4.6', success: false },
{ receiver: process, type: 'get', value: '1.2.3', success: true },
])

@@ -92,4 +92,5 @@ })

The `results()` method will return an array of objects with
an `args` array, an `at` CallSiteLike object, and either
The `results()` method will return an array of objects with a
`receiver` property indicating the `this`-context of the method
call, an `args` array, an `at` CallSiteLike object, and either
`threw: true` or `returned: <value>`.

@@ -111,2 +112,3 @@

- `receiver` the object where the set/get is happening
- `type` 'get' for get operations, 'set' for set operations

@@ -113,0 +115,0 @@ - `value` The value that was returned by a get, or set in a

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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