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

proxyquire

Package Overview
Dependencies
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

proxyquire - npm Package Compare versions

Comparing version 0.3.2 to 0.3.3

test/proxyquire-windowspaths.js

2

package.json
{
"name": "proxyquire",
"version": "0.3.2",
"version": "0.3.3",
"description": "Proxies nodejs require in order to allow overriding dependencies during testing.",

@@ -5,0 +5,0 @@ "main": "proxyquire.js",

@@ -0,1 +1,2 @@

'use strict';
/*jshint laxbreak:true*/

@@ -25,2 +26,6 @@

function escapeBackslashes(value) {
return value.replace(/\\/g, '\\\\');
}
function getTmpDir () {

@@ -179,4 +184,2 @@ var defaultTmp = '/tmp'

/**

@@ -205,8 +208,8 @@ * Resolves specified module and overrides dependencies with specified stubs.

, mdlProxyCode =
[ 'var __dirname = "' + path.dirname(resolvedFile) + '"; '
, 'var __filename = "' + resolvedFile + '"; '
[ 'var __dirname = "' + escapeBackslashes(path.dirname(resolvedFile)) + '"; '
, 'var __filename = "' + escapeBackslashes(resolvedFile) + '"; '
, 'function require(mdl) { '
, 'return module'
, '.require("' , __filename, '")'
, '._require(mdl, "' + resolvedProxy + '", __dirname); '
, '.require("' , escapeBackslashes(__filename), '")'
, '._require(mdl, "' + escapeBackslashes(resolvedProxy) + '", __dirname); '
, '} '

@@ -213,0 +216,0 @@ , originalCode

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