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

merger-js

Package Overview
Dependencies
Maintainers
1
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

merger-js - npm Package Compare versions

Comparing version 3.0.3 to 3.0.4

9

CHANGELOG.md

@@ -5,4 +5,11 @@ # CHANGELOG

#### *V3.0.3 - 07/05/2018
#### *V3.0.4 - 22/05/2018
- Solved a bug where, if the minification build configuration were turned off, it wouldn't merge the file correctly;
- Some minor dependency security fixes.
 
#### V3.0.3 - 07/05/2018
- Made extension names, on the CLI's add files to the merger-config prompt, optional. If the user is on the file's directory he only needs to input the file name;

@@ -9,0 +16,0 @@ - If there's only one source file on the merger-config, MergerJS will choose that one on build by default, removing the need to choose a file;

3

modules/build.js

@@ -15,3 +15,3 @@ 'use strict'

// Read all the data:
// Read all the data from each file (with file names):
async.eachSeries(buildOrder, (file, callback) => {

@@ -31,2 +31,3 @@ fs.readFile(path.join(path.dirname(sourceFile.source), file), 'utf-8', (err, data) => {

const buildName = sourceFile.output.name;
console.debug(data);
fs.writeFile(path.join(buildPath, buildName), data, 'utf-8', (err) => {

@@ -33,0 +34,0 @@ if (err) {

@@ -5,7 +5,7 @@ 'use strict'

module.exports = (code, callback) => {
module.exports = (allCode, callback) => {
if (global.config.uglify) {
let minifiedCode = uglify.minify(code, global.minifyOptions);
let minifiedCode = uglify.minify(allCode, global.minifyOptions);
if (minifiedCode.error) {
let err = minifiedCode.error;
let err = minifiedCode.error;
notify(`Build error on the file ${err.filename}, line ${err.line}, col ${err.col}.`, err.message);

@@ -16,5 +16,12 @@ return console.error(' Error:\n ', err);

console.warn('\n Warnings: \n ', minifiedCode.warnings);
return callback(minifiedCode.code);
} else {
let nonMinifiedCode = '';
for (let fileName in allCode) {
nonMinifiedCode += allCode[fileName];
}
return callback(nonMinifiedCode);
}
return callback(code);
}
{
"name": "merger-js",
"displayName": "MergerJS",
"version": "3.0.3",
"version": "3.0.4",
"description": "Yet another light weight and simple cross-platform build tool for JavaScript files, with CLI tooling, file imports, auto build capabilities and native OS notifications.",

@@ -53,4 +53,4 @@ "readme": "https://github.com/joao-neves95/merger-js/blob/master/README.md",

"devDependencies": {
"snyk": "^1.71.0"
"snyk": "^1.80.1"
}
}

@@ -121,2 +121,4 @@ # MergerJS

- ```merger update```: Update MergerJS. Same as ```npm install merger-js -g```
 

@@ -123,0 +125,0 @@

# TODO:
- Add remove (source file) to the CLI;
- Add more validation to the CLI.
- Remove last if from selectSourceFilePrompt.js;
- Redo the CLI's merger set command Key logic (minify, mnfy, autobuild, etc.) with a switch statement;
- Add remove (source file) command to the CLI;
- Add more validation and error handling to the CLI.
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