gulp-embed-json
Advanced tools
Comparing version 1.3.0 to 1.4.0
@@ -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. |
16
index.js
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" | ||
} | ||
} |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
169474
5
6
4776
1
+ Addedplugin-error@^1.0.1
+ Addedansi-colors@1.1.0(transitive)
+ Addedarr-diff@4.0.0(transitive)
+ Addedarr-union@3.1.0(transitive)
+ Addedassign-symbols@1.0.0(transitive)
+ Addedextend-shallow@3.0.2(transitive)
+ Addedis-extendable@1.0.1(transitive)
+ Addedis-plain-object@2.0.4(transitive)
+ Addedisobject@3.0.1(transitive)
+ Addedplugin-error@1.0.1(transitive)
- Removedgulp-util@^3.0.8
- Removedansi-gray@0.1.1(transitive)
- Removedansi-regex@2.1.1(transitive)
- Removedansi-styles@2.2.1(transitive)
- Removedarray-differ@1.0.0(transitive)
- Removedarray-uniq@1.0.3(transitive)
- Removedbeeper@1.1.1(transitive)
- Removedchalk@1.1.3(transitive)
- Removedclone@1.0.4(transitive)
- Removedclone-stats@0.0.1(transitive)
- Removedcolor-support@1.1.3(transitive)
- Removeddateformat@2.2.0(transitive)
- Removedduplexer2@0.0.2(transitive)
- Removedescape-string-regexp@1.0.5(transitive)
- Removedfancy-log@1.3.3(transitive)
- Removedglogg@1.0.2(transitive)
- Removedgulp-util@3.0.8(transitive)
- Removedgulplog@1.0.0(transitive)
- Removedhas-ansi@2.0.0(transitive)
- Removedhas-gulplog@0.1.0(transitive)
- Removedisarray@0.0.1(transitive)
- Removedlodash._basecopy@3.0.1(transitive)
- Removedlodash._basetostring@3.0.1(transitive)
- Removedlodash._basevalues@3.0.0(transitive)
- Removedlodash._getnative@3.9.1(transitive)
- Removedlodash._isiterateecall@3.0.9(transitive)
- Removedlodash._reescape@3.0.0(transitive)
- Removedlodash._reevaluate@3.0.0(transitive)
- Removedlodash._reinterpolate@3.0.0(transitive)
- Removedlodash._root@3.0.1(transitive)
- Removedlodash.escape@3.2.0(transitive)
- Removedlodash.isarguments@3.1.0(transitive)
- Removedlodash.isarray@3.0.4(transitive)
- Removedlodash.keys@3.1.2(transitive)
- Removedlodash.restparam@3.6.1(transitive)
- Removedlodash.template@3.6.2(transitive)
- Removedlodash.templatesettings@3.1.1(transitive)
- Removedminimist@1.2.8(transitive)
- Removedmultipipe@0.1.2(transitive)
- Removedobject-assign@3.0.0(transitive)
- Removedparse-node-version@1.0.1(transitive)
- Removedreadable-stream@1.1.14(transitive)
- Removedreplace-ext@0.0.1(transitive)
- Removedsparkles@1.0.1(transitive)
- Removedstring_decoder@0.10.31(transitive)
- Removedstrip-ansi@3.0.1(transitive)
- Removedsupports-color@2.0.0(transitive)
- Removedtime-stamp@1.1.0(transitive)
- Removedvinyl@0.5.3(transitive)
Updatedembed-json@^1.1.2
Updatedthrough2@^2.0.5