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

@hapi/shot

Package Overview
Dependencies
Maintainers
6
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hapi/shot - npm Package Compare versions

Comparing version 6.0.0-beta.0 to 6.0.0-beta.1

20

lib/request.js
'use strict';
const Events = require('events');
const Stream = require('stream');

@@ -60,5 +61,3 @@ const Url = require('url');

// NOTE connection is deprecated in favor of socket as of node v13
this.socket = this.connection = {
remoteAddress: options.remoteAddress ?? '127.0.0.1'
};
this.socket = this.connection = new internals.MockSocket(options);

@@ -155,1 +154,16 @@ let payload = options.payload ?? null;

internals.Request.prototype[Symbols.injection] = true;
internals.MockSocket = class MockSocket extends Events.EventEmitter {
constructor({ remoteAddress }) {
super();
this.remoteAddress = remoteAddress ?? '127.0.0.1';
}
// Net.Socket APIs used by hapi
end() {}
setTimeout() {}
};

2

package.json
{
"name": "@hapi/shot",
"description": "Injects a fake HTTP request/response into a node HTTP server",
"version": "6.0.0-beta.0",
"version": "6.0.0-beta.1",
"repository": "git://github.com/hapijs/shot",

@@ -6,0 +6,0 @@ "main": "lib/index.js",

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