Socket
Socket
Sign inDemoInstall

gulp-embed-json

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-embed-json - npm Package Compare versions

Comparing version 1.3.0 to 1.4.0

package-lock.json

14

CHANGELOG.md

@@ -1,14 +0,18 @@

# 1.3.0
## 1.4.0
* [#12: Integrate CD.](https://github.com/haensl/gulp-embed-json/issues/12)
* [#11: Update dependencies.](https://github.com/haensl/gulp-embed-json/issues/11)
## 1.3.0
* [#9: Use embed-json to avoid side effects of cheerio.](https://github.com/haensl/gulp-embed-json/issues/9)
# 1.2.1
## 1.2.1
* [#7: Fix error unit tests.](https://github.com/haensl/gulp-embed-json/issues/7)
# 1.2.0
## 1.2.0
* [#4: Add pre-commit hooks.](https://github.com/haensl/gulp-embed-json/issues/4)
# 1.1.0
## 1.1.0
* [#2: Add option to minify.](https://github.com/haensl/gulp-embed-json/issues/2)
# 1.0.0
## 1.0.0
* Initial project release.
const through = require('through2');
const embedJson = require('embed-json');
const gutil = require('gulp-util');
const PluginError = require('plugin-error');
const fs = require('fs');

@@ -24,3 +24,3 @@ const path = require('path');

if (file.isStream()) {
return callback(new gutil.PluginError(PLUGIN_NAME, 'Streams are not supported.'));
return callback(new PluginError(PLUGIN_NAME, 'Streams are not supported.'));
}

@@ -31,5 +31,5 @@

if (typeof options.root !== 'string') {
return callback(new gutil.PluginError(PLUGIN_NAME, 'Invalid option: root must be a string'));
return callback(new PluginError(PLUGIN_NAME, 'Invalid option: root must be a string'));
} else if (!fs.existsSync(options.root)) {
return callback(new gutil.PluginError(PLUGIN_NAME, `Invalid option: root path ${options.root} does not exist`));
return callback(new PluginError(PLUGIN_NAME, `Invalid option: root path ${options.root} does not exist`));
}

@@ -43,11 +43,11 @@

|| options.mimeTypes.some((type) => typeof type !== 'string')) {
return callback(new gutil.PluginError(PLUGIN_NAME, 'Invalid option: mimeTypes must be string or Array<string>.'));
return callback(new PluginError(PLUGIN_NAME, 'Invalid option: mimeTypes must be string or Array<string>.'));
}
if (typeof options.minify !== 'boolean') {
return callback(new gutil.PluginError(PLUGIN_NAME, 'Invalid option: minify must be a boolean.'));
return callback(new PluginError(PLUGIN_NAME, 'Invalid option: minify must be a boolean.'));
}
if (typeof options.encoding !== 'string') {
return callback(new gutil.PluginError(PLUGIN_NAME, 'Invalid option: encoding must be a string.'));
return callback(new PluginError(PLUGIN_NAME, 'Invalid option: encoding must be a string.'));
}

@@ -58,3 +58,3 @@

} catch (err) {
return callback(new gutil.PluginError(PLUGIN_NAME, err));
return callback(new PluginError(PLUGIN_NAME, err));
}

@@ -61,0 +61,0 @@

{
"name": "gulp-embed-json",
"version": "1.3.0",
"version": "1.4.0",
"description": "Gulp plugin to inline/embed JSON data into HTML files.",

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

"tdd": "mocha --watch",
"lint": "eslint ./**/*.js",
"prepush": "npm-run-all lint test"
"lint": "eslint -c .eslintrc.json **/*.js",
"prepush": "npm test && npm run lint",
"precommit": "npm test && npm run lint"
},

@@ -32,3 +33,4 @@ "engines": {

"email": "h.p.dietz@gmail.com",
"twitter": "@h_p_d"
"twitter": "@h_p_d",
"url": "https://hpdietz.com"
},

@@ -41,14 +43,13 @@ "license": "MIT",

"dependencies": {
"embed-json": "^1.1.0",
"gulp-util": "^3.0.8",
"through2": "^2.0.3"
"embed-json": "^1.1.2",
"plugin-error": "^1.0.1",
"through2": "^2.0.5"
},
"devDependencies": {
"chai": "^4.1.2",
"eslint": "^4.18.2",
"gulp": "^3.9.1",
"chai": "^4.2.0",
"eslint": "^4.19.1",
"gulp": "^4.0.0",
"husky": "^0.14.3",
"mocha": "^4.1.0",
"npm-run-all": "^4.1.2"
"mocha": "^4.1.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