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

amend

Package Overview
Dependencies
Maintainers
1
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

amend - npm Package Compare versions

Comparing version 0.3.0-beta-13 to 0.3.0-beta-14

36

browserify.js

@@ -0,1 +1,4 @@

var R = require('ramda')
var normalize = require('path').normalize;
function isLocal(path) {

@@ -13,3 +16,3 @@ return path[0] === '.';

module.exports = function(b, opts) {
function addAmendModule(b, opts, nodeModule) {
function shouldInclude(key, path) {

@@ -23,9 +26,32 @@ var includeExternal = opts.includeExternal || [];

var bundleExternal = opts.bundleExternal !== false;
var modules = opts.modules;
var modules = opts.config.modules;
var parents = opts.config.parents || [];
parents.forEach(function(p) {
addParent(b, opts, p);
})
Object.keys(modules).forEach(function(key) {
var path = getRequrePath(modules[key]);
if (shouldInclude(key, path)) {
b.require(path);
var modulePath = getRequrePath(modules[key]);
if (shouldInclude(key, modulePath)) {
if (nodeModule) {
modulePath = normalize([ nodeModule, modulePath ].join('/'))
}
b.require(modulePath);
}
});
}
function addParent(b, opts, parentConf) {
var base = process.cwd();
var configFilePath = [ parentConf.nodeModule, parentConf.configFile ].join('/');
var p = require(configFilePath);
var parentOpts = R.assoc('config', p, opts)
b.require(configFilePath)
addAmendModule(b, parentOpts, parentConf.nodeModule)
}
module.exports = function(b, opts) {
addAmendModule(b, opts)
};

20

dist/load-config.js
// Generated by CoffeeScript 1.10.0
var Container, clearCache, evaluateType, getFullPath, getPath, isRelative, populateContainer;
var Container, clearCache, evaluateType, getFullPath, getPath, isRelative, joinPaths, normalize, populateContainer;
Container = require('./container');
normalize = require('path').normalize;
isRelative = function(path) {

@@ -10,9 +12,17 @@ return path.indexOf('.') === 0;

joinPaths = function(arr) {
return arr.join('/');
};
getFullPath = function(path, basePath) {
if (typeof window !== "undefined" && window !== null) {
return path;
if (isRelative(path) && basePath !== '') {
return normalize(joinPaths([basePath, path]));
} else {
return path;
}
} else if (isRelative(path)) {
return [basePath, path].join('/');
return joinPaths([basePath, path]);
} else {
return [basePath, 'node_modules', path].join('/');
return joinPaths([basePath, 'node_modules', path]);
}

@@ -87,3 +97,3 @@ };

var parentModules;
parentModules = require([p.nodeModule, p.configFile].join('/'));
parentModules = require(joinPaths([p.nodeModule, p.configFile]));
return populateContainer(di, parentModules.modules, p.nodeModule);

@@ -90,0 +100,0 @@ });

{
"name": "amend",
"version": "0.3.0-beta-13",
"version": "0.3.0-beta-14",
"description": "Dependency injection module and IoC container.",

@@ -38,3 +38,6 @@ "main": "index.js",

"author": "Ludwig Magnusson",
"license": "ISC"
"license": "ISC",
"dependencies": {
"ramda": "^0.17.1"
}
}

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