🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

yeoman-environment

Package Overview
Dependencies
Maintainers
7
Versions
129
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yeoman-environment - npm Package Compare versions

Comparing version

to
2.3.1

23

lib/environment.js

@@ -35,2 +35,21 @@ 'use strict';

/**
* Wrap callback so it can't get called twice
*/
const callbackWrapper = (generator, done) => {
if (!done) {
return _.noop();
}
let callbackHandled = false;
const callback = err => {
if (!callbackHandled) {
callbackHandled = true;
done(err);
}
};
// If error was thrown, make sure it is handled and only once
generator.on('error', callback);
return callback;
};
/**
* `Environment` object is responsible of handling the lifecyle and bootstrap

@@ -457,3 +476,5 @@ * of generators in a specific environment (your app).

return generator.run(done);
const _callbackWrapper = callbackWrapper(generator, done);
return generator.run(_callbackWrapper);
}

@@ -460,0 +481,0 @@

2

package.json
{
"name": "yeoman-environment",
"version": "2.3.0",
"version": "2.3.1",
"description": "Handles the lifecyle and bootstrapping of generators in a specific environment",

@@ -5,0 +5,0 @@ "homepage": "http://yeoman.io",