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

npm-registry-mock

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

npm-registry-mock - npm Package Compare versions

Comparing version 0.3.0 to 0.4.0

fixtures/request.json

6

index.js

@@ -0,1 +1,3 @@

var path = require('path')
var hock = require("hock")

@@ -22,3 +24,3 @@ var predefinedMocks = require("./lib/predefines.js").predefinedMocks

if (isTarball) {
var target = __dirname + "/fixtures/" + route;
var target = __dirname + path.sep + "fixtures" + route.replace(/\//g, path.sep);
if (customTarget && typeof customTarget == 'string')

@@ -30,3 +32,3 @@ target = customTarget

if (!customTarget) {
var res = require("./fixtures/" + route)
var res = require(__dirname + path.sep + "fixtures" + route.replace(/\//g, path.sep))
res = JSON.stringify(res).replace(/http:\/\/registry\.npmjs\.org/ig, 'http://localhost:' + port)

@@ -33,0 +35,0 @@ }

@@ -7,4 +7,11 @@ var predefinedMocks = exports.predefinedMocks = {

"/underscore/-/underscore-1.3.1.tgz": [200],
"/underscore/-/underscore-1.5.1.tgz": [200]
"/underscore/-/underscore-1.5.1.tgz": [200],
"/request": [200],
"/request/latest": [200],
"/request/0.9.0": [200],
"/request/-/request-0.9.0.tgz": [200],
"/request/-/request-0.9.5.tgz": [200],
"/request/-/request-2.27.0.tgz": [200],
}
}
{
"name": "npm-registry-mock",
"version": "0.3.0",
"version": "0.4.0",
"description": "mock the npm registry",

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

@@ -9,4 +9,9 @@ [![Build Status](https://travis-ci.org/robertkowalski/npm-registry-mock.png?branch=master)](https://travis-ci.org/robertkowalski/npm-registry-mock)

Currently mocked packages are `underscore` at 1.3.1 and 1.5.1 while version 1.5.1 is the latest in this mocked registry.
Currently mocked packages are:
`underscore` at 1.3.1 and 1.5.1 while version 1.5.1 is the latest in this mocked registry.
`request` at 0.9.0, 0.9.5 and 2.27.0 while version 2.27.0 is the latest in this mocked registry.
Installing underscore 1.3.1:

@@ -13,0 +18,0 @@

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