Comparing version 2.2.1 to 2.3.0
@@ -65,3 +65,8 @@ 'use strict'; | ||
cli.on('require', function(name) { | ||
log.info('Requiring external module', ansi.magenta(name)); | ||
// This is needed because interpret needs to stub the .mjs extension | ||
// Without the .mjs require hook, rechoir blows up | ||
// However, we don't want to show the mjs-stub loader in the logs | ||
if (path.basename(name, '.js') !== 'mjs-stub') { | ||
log.info('Requiring external module', ansi.magenta(name)); | ||
} | ||
}); | ||
@@ -68,0 +73,0 @@ |
@@ -14,5 +14,7 @@ 'use strict'; | ||
var ansi = require('../../shared/ansi'); | ||
var exit = require('../../shared/exit'); | ||
var logEvents = require('./log/events'); | ||
var logTasksSimple = require('./log/tasks-simple'); | ||
var registerExports = require('../../shared/register-exports'); | ||
var requireOrImport = require('../../shared/require-or-import'); | ||
@@ -29,16 +31,21 @@ function execute(opts, env, config) { | ||
// This is what actually loads up the gulpfile | ||
var exported = require(env.configPath); | ||
log.info('Using gulpfile', ansi.magenta(tildify(env.configPath))); | ||
requireOrImport(env.configPath, function(err, exported) { | ||
// Before import(), if require() failed we got an unhandled exception on the module level. | ||
// So console.error() & exit() were added here to mimic the old behavior as close as possible. | ||
if (err) { | ||
console.error(err); | ||
exit(1); | ||
} | ||
var gulpInst = require(env.modulePath); | ||
logEvents(gulpInst); | ||
log.info('Using gulpfile', ansi.magenta(tildify(env.configPath))); | ||
registerExports(gulpInst, exported); | ||
var gulpInst = require(env.modulePath); | ||
logEvents(gulpInst); | ||
// Always unmute stdout after gulpfile is required | ||
stdout.unmute(); | ||
registerExports(gulpInst, exported); | ||
process.nextTick(function() { | ||
// Always unmute stdout after gulpfile is required | ||
stdout.unmute(); | ||
var tree; | ||
if (opts.tasksSimple) { | ||
@@ -45,0 +52,0 @@ return logTasksSimple(env, gulpInst); |
@@ -19,2 +19,3 @@ 'use strict'; | ||
var copyTree = require('../../shared/log/copy-tree'); | ||
var requireOrImport = require('../../shared/require-or-import'); | ||
@@ -36,12 +37,16 @@ function execute(opts, env, config) { | ||
// This is what actually loads up the gulpfile | ||
var exported = require(env.configPath); | ||
requireOrImport(env.configPath, function(err, exported) { | ||
// Before import(), if require() failed we got an unhandled exception on the module level. | ||
// So console.error() & exit() were added here to mimic the old behavior as close as possible. | ||
if (err) { | ||
console.error(err); | ||
exit(1); | ||
} | ||
registerExports(gulpInst, exported); | ||
registerExports(gulpInst, exported); | ||
// Always unmute stdout after gulpfile is required | ||
stdout.unmute(); | ||
// Always unmute stdout after gulpfile is required | ||
stdout.unmute(); | ||
process.nextTick(function() { | ||
var tree; | ||
if (opts.tasksSimple) { | ||
@@ -48,0 +53,0 @@ return logTasksSimple(gulpInst.tree()); |
@@ -20,2 +20,3 @@ 'use strict'; | ||
var getTask = require('../^4.0.0/log/get-task'); | ||
var requireOrImport = require('../../shared/require-or-import'); | ||
@@ -37,12 +38,16 @@ function execute(opts, env, config) { | ||
// This is what actually loads up the gulpfile | ||
var exported = require(env.configPath); | ||
requireOrImport(env.configPath, function(err, exported) { | ||
// Before import(), if require() failed we got an unhandled exception on the module level. | ||
// So console.error() & exit() were added here to mimic the old behavior as close as possible. | ||
if (err) { | ||
console.error(err); | ||
exit(1); | ||
} | ||
registerExports(gulpInst, exported); | ||
registerExports(gulpInst, exported); | ||
// Always unmute stdout after gulpfile is required | ||
stdout.unmute(); | ||
// Always unmute stdout after gulpfile is required | ||
stdout.unmute(); | ||
process.nextTick(function() { | ||
var tree; | ||
if (opts.tasksSimple) { | ||
@@ -49,0 +54,0 @@ tree = gulpInst.tree(); |
@@ -20,2 +20,3 @@ 'use strict'; | ||
var getTask = require('./log/get-task'); | ||
var requireOrImport = require('../../shared/require-or-import'); | ||
@@ -37,12 +38,16 @@ function execute(opts, env, config) { | ||
// This is what actually loads up the gulpfile | ||
var exported = require(env.configPath); | ||
requireOrImport(env.configPath, function(err, exported) { | ||
// Before import(), if require() failed we got an unhandled exception on the module level. | ||
// So console.error() & exit() were added here to mimic the old behavior as close as possible. | ||
if (err) { | ||
console.error(err); | ||
exit(1); | ||
} | ||
registerExports(gulpInst, exported); | ||
registerExports(gulpInst, exported); | ||
// Always unmute stdout after gulpfile is required | ||
stdout.unmute(); | ||
// Always unmute stdout after gulpfile is required | ||
stdout.unmute(); | ||
process.nextTick(function() { | ||
var tree; | ||
if (opts.tasksSimple) { | ||
@@ -49,0 +54,0 @@ tree = gulpInst.tree(); |
{ | ||
"name": "gulp-cli", | ||
"version": "2.2.1", | ||
"version": "2.3.0", | ||
"description": "Command line interface for gulp", | ||
@@ -42,3 +42,3 @@ "author": "Gulp Team <team@gulpjs.com> (https://gulpjs.com/)", | ||
"gulplog": "^1.0.0", | ||
"interpret": "^1.1.0", | ||
"interpret": "^1.4.0", | ||
"isobject": "^3.0.1", | ||
@@ -51,3 +51,3 @@ "liftoff": "^3.1.0", | ||
"semver-greatest-satisfied-range": "^1.1.0", | ||
"v8flags": "^3.0.1", | ||
"v8flags": "^3.2.0", | ||
"yargs": "^7.1.0" | ||
@@ -67,3 +67,4 @@ }, | ||
"nyc": "^13.3.0", | ||
"rimraf": "^2.6.1" | ||
"rimraf": "^2.6.1", | ||
"semver": "^5.7.1" | ||
}, | ||
@@ -70,0 +71,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
60907
42
1403
19
13
2
Updatedinterpret@^1.4.0
Updatedv8flags@^3.2.0