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

basisjs-tools-build

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

basisjs-tools-build - npm Package Compare versions

Comparing version 1.11.4 to 1.12.0

lib/common/isChildProcess.js

7

HISTORY.md

@@ -0,1 +1,8 @@

## 1.12.0 (November 8, 2017)
- Replaced `uglify-js` to `uglify-es`
- Added posibility to config JavaScript minifier with `--js-pack-config` CLI option or `jsPackConfig` field in config file
- Fixed exception handling when command run in child process and exception is connected with dependencies
- Update dependencies
## 1.11.4 (September 20, 2017)

@@ -2,0 +9,0 @@

@@ -118,2 +118,14 @@ var path = require('path');

.option('--js-pack', 'Compress JavaScript')
.option('--js-pack-config <config>', 'Options for minifier (uglify-es is used for now)', function(config){
if (typeof config === 'string')
try {
return JSON.parse(config);
} catch(e) {
return null;
}
else if (config && typeof config === 'object' && config.constructor === Object)
return config;
return null;
}, null)
.option('--js-pack-cmd <string>', 'Command to launch JavaScript packer, should accept input in stdio and output result in stdout (`google-closure-compiler --charset UTF-8` by default)')

@@ -120,0 +132,0 @@

11

lib/build/index.js

@@ -0,1 +1,2 @@

var isChildProcess = require('../common/isChildProcess'); // should go first since handle uncaught exceptions
var fs = require('fs');

@@ -11,13 +12,3 @@ var path = require('path');

var utils = require('../common/utils');
var isChildProcess = typeof process.send == 'function'; // child process has send method
if (isChildProcess)
process.on('uncaughtException', function(error){
process.send({
errorType: 'Exception',
error: String(error)
});
process.exit(2);
});
//

@@ -24,0 +15,0 @@ // launched by another module

@@ -154,3 +154,14 @@ var exec = require('child_process').exec;

flow.console.log('Compress ' + file.relOutputFilename);
file.outputContent = require('uglify-js').minify(file.outputContent).code;
var config = flow.options.jsPackConfig || { compress: { ecma: 5 }, output: { ecma: 5 } };
var result = require('uglify-es').minify(file.outputContent, config);
var error = result.error;
if (error)
return flow.warn({
fatal: true,
message: file.relOutputFilename + ':' + error.line + ':' + error.col + ' compression error:\n' + error.message
});
file.outputContent = result.code;
}

@@ -0,1 +1,2 @@

var isChildProcess = require('../common/isChildProcess'); // should go first since handle uncaught exceptions
var fs = require('fs');

@@ -8,14 +9,4 @@ var path = require('path');

var command = require('./command');
var isChildProcess = typeof process.send == 'function'; // child process has send method
if (isChildProcess)
process.on('uncaughtException', function(error){
process.send({
errorType: 'Exception',
error: String(error)
});
process.exit(2);
});
//

@@ -22,0 +13,0 @@ // export

@@ -0,1 +1,2 @@

var isChildProcess = require('../common/isChildProcess'); // should go first since handle uncaught exceptions
var fs = require('fs');

@@ -9,14 +10,4 @@ var path = require('path');

var chalk = require('chalk');
var isChildProcess = typeof process.send == 'function'; // child process has send method
if (isChildProcess)
process.on('uncaughtException', function(error){
process.send({
errorType: 'Exception',
error: String(error)
});
process.exit(2);
});
//

@@ -23,0 +14,0 @@ // launched by another module

{
"name": "basisjs-tools-build",
"title": "Basis.js build tools",
"version": "1.11.4",
"version": "1.12.0",
"homepage": "https://github.com/basisjs/basisjs-tools",

@@ -43,11 +43,11 @@ "description": "Build tools for basis.js framework",

"basisjs-tools-config": "~1.1.0",
"chalk": "^1.1.3",
"chalk": "^2.3.0",
"clap": "^1.2.3",
"es6-promise-polyfill": "^1.2.0",
"fixed-width-string": "^1.0.0",
"mime": "~1.4.0",
"mime": "~2.0.3",
"minimatch": "^3.0.2",
"resolve": "^1.1.7",
"seedrandom": "~2.4.2",
"uglify-js": "^3.0.28"
"uglify-es": "~3.1.8"
},

@@ -54,0 +54,0 @@ "devDependencies": {

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