Socket
Socket
Sign inDemoInstall

moog-require

Package Overview
Dependencies
Maintainers
12
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

moog-require - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

10

index.js

@@ -8,3 +8,2 @@ var async = require('async');

module.exports = function(options) {
var self = require('moog')(options);

@@ -57,2 +56,3 @@

var projectLevelFolder = self.options.localModules + '/' + type;
var projectLevelPath = projectLevelFolder + '/index.js';

@@ -73,3 +73,5 @@ projectLevelPath = path.normalize(projectLevelPath);

if (npmPath) {
npmDefinition = require(npmPath);
// Make a shallow clone so we can be part of multiple chains
// in multiple moog objects without leakage
npmDefinition = _.clone(require(npmPath));
npmDefinition.__meta = {

@@ -110,3 +112,5 @@ npm: true,

projectLevelDefinition = projectLevelDefinition || {};
// Make a shallow clone so we can be part of multiple chains
// in multiple moog objects without leakage
projectLevelDefinition = _.clone(projectLevelDefinition || {});
projectLevelDefinition.__meta = {

@@ -113,0 +117,0 @@ dirname: path.dirname(projectLevelPath),

{
"name": "moog-require",
"version": "1.0.0",
"version": "1.0.1",
"description": "moog-require extends moog with support for type definitions in local files and npm modules.",

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

@@ -340,2 +340,4 @@ [![Build Status](https://travis-ci.org/punkave/moog-require.svg?branch=master)](https://travis-ci.org/punkave/moog-require)

1.0.1: shallowly clone the result of `require` rather than attaching `.__meta` to a potentially shared object. This allows multiple instances of `moog-require` in multiple instances of `apostrophe` to independently track where modules were loaded from.
1.0.0: `moog`, `async` and `lodash` dependencies updated to satisfy `npm audit`. Declared 1.x as this has been a stable part of Apostrophe 2.x for a long time.

@@ -342,0 +344,0 @@

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