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.1.0 to 1.1.1

15

index.js

@@ -7,2 +7,4 @@ var async = require('async');

var glob = require('glob');
var importFresh = require('import-fresh');
var resolveFrom = require('resolve-from');

@@ -28,3 +30,3 @@ module.exports = function(options) {

}
var bundle = require(bundlePath);
var bundle = importFresh(bundlePath);
if (!bundle.moogBundle) {

@@ -66,3 +68,3 @@ throw 'The configured bundle ' + bundleName + ' does not export a moogBundle property.';

if (fs.existsSync(projectLevelPath)) {
projectLevelDefinition = self.root.require(projectLevelPath);
projectLevelDefinition = importFresh(resolveFrom(path.dirname(self.root.filename), projectLevelPath));
}

@@ -79,5 +81,3 @@

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

@@ -118,5 +118,4 @@ npm: true,

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

@@ -123,0 +122,0 @@ dirname: path.dirname(projectLevelPath),

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

@@ -9,5 +9,7 @@ "main": "index.js",

"glob": "^7.1.3",
"import-fresh": "^3.0.0",
"lodash": "^4.0.0",
"moog": "^1.0.0",
"resolve": "^1.7.1"
"resolve": "^1.7.1",
"resolve-from": "^4.0.0"
},

@@ -14,0 +16,0 @@ "devDependencies": {

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

1.1.1: use `importFresh` to avoid bugs when two instances of `moog-require` are
loading the same module definitions. Previously if modules created by
the two instances later modified sub-properties of `options`, they would
inadvertently share values. This fix is critical for both `apostrophe-monitor`
and `apostrophe-multisite`.
1.1.0: support for the `nestedModuleSubdirs` option.

@@ -353,0 +359,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