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

require-plus

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

require-plus - npm Package Compare versions

Comparing version 1.3.1 to 1.4.0

2

changelog.md
##Changelog
>1.4.0 - removed delete require.cache[__filename] as was losing reference to real base directory to resolve from, cleaned up linting and tidied up dependencies
>1.3.1 - fixed bug that was hiding error from try catch, required modules were not resolving due to missing dependencies

@@ -4,0 +6,0 @@

9

lib/index.js

@@ -6,3 +6,2 @@ //Load modules

var Fs = require('fs');
var PathIsAbsolute = require('path-is-absolute');

@@ -19,3 +18,3 @@ var Hoek = require('hoek');

var parentDir = Path.dirname(module.parent.filename);
delete require.cache[__filename];
// delete require.cache[__filename];

@@ -34,7 +33,7 @@

this.base = this.check(this.settings.directory[i]);
this.base = this.resolveRoot(this.settings.directory[i]);
this.load(root, this.base);
}
} else {
this.base = this.check(this.settings.directory);
this.base = this.resolveRoot(this.settings.directory);
this.load(root, this.base);

@@ -45,3 +44,3 @@ }

internals.RequirePlus.prototype.check = function (path) {
internals.RequirePlus.prototype.resolveRoot = function (path) {

@@ -48,0 +47,0 @@ var newPath;

{
"name": "require-plus",
"version": "1.3.1",
"version": "1.4.0",
"description": "better require for directories",

@@ -24,9 +24,9 @@ "main": "lib/index.js",

"devDependencies": {
"code": "^1.4.0",
"lab": "^5.9.0"
"code": "1.x.x",
"lab": "5.x.x"
},
"dependencies": {
"hoek": "^2.13.0",
"path-is-absolute": "^1.0.0"
"hoek": "2.x.x",
"path-is-absolute": "1.x.x"
}
}

@@ -10,7 +10,5 @@ # require-plus

Node module for requiring a directory tree, it will throw if not a valid directory and it will also throw if the object is not exported properly or cannot be required by require.
##Installation

@@ -17,0 +15,0 @@

@@ -10,16 +10,63 @@

{ method: 'GET', path: '/', config: {} },
{ method: 'GET', path: '/admin/routes', config: {} },
{ method: 'GET', path: '/admin/collectionNames', config: {} },
{ method: 'GET', path: '/admin/config', config: {} },
{ method: 'GET', path: '/admin/node', config: { } },
{ method: 'GET', path: '/admin/versions', config: {} },
{ method: 'GET', path: '/admin/schemas/{schemaName}/{recType?}', config: {} },
{ method: 'GET', path: '/admin/schemas', config: {} },
{ method: 'POST', path: '/admin/schemas', config: {} },
{ method: 'GET', path: '/admin/schemas/list', config: {} },
{ method: 'GET', path: '/admin/methods/{methodParent?}', config: {} },
{ method: 'GET', path: '/admin/methods/{methodParent}/{methodName}', config: {} }
{
method: 'GET',
path: '/',
config: {}
},
{
method: 'GET',
path: '/admin/routes',
config: {}
},
{
method: 'GET',
path: '/admin/collectionNames',
config: {}
},
{
method: 'GET',
path: '/admin/config',
config: {}
},
{
method: 'GET',
path: '/admin/node',
config: { }
},
{
method: 'GET',
path: '/admin/versions',
config: {}
},
{
method: 'GET',
path: '/admin/schemas/{schemaName}/{recType?}',
config: {}
},
{
method: 'GET',
path: '/admin/schemas',
config: {}
},
{
method: 'POST',
path: '/admin/schemas',
config: {}
},
{
method: 'GET',
path: '/admin/schemas/list',
config: {}
},
{
method: 'GET',
path: '/admin/methods/{methodParent?}',
config: {}
},
{
method: 'GET',
path: '/admin/methods/{methodParent}/{methodName}',
config: {}
}
];

@@ -79,3 +79,3 @@ // Load modules

var plus = new Plus({
directory: ['./fixtures']
directory: ['./fixtures']
});

@@ -92,4 +92,4 @@

var plus = new Plus({
directory: ['./fixtures'],
blacklist: ['node', 'webstorm']
directory: ['./fixtures'],
blacklist: ['node', 'webstorm']
});

@@ -96,0 +96,0 @@ expect(plus.moduleSet.node).to.not.exist();

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