Socket
Socket
Sign inDemoInstall

gh-pages

Package Overview
Dependencies
Maintainers
2
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gh-pages - npm Package Compare versions

Comparing version 0.7.0 to 0.8.0

8

changelog.md

@@ -0,1 +1,9 @@

## v0.8.0
* [#38](https://github.com/tschaub/gh-pages/pull/38) - Update all dependencies 🌴 ([@tschaub](https://github.com/tschaub))
* [#39](https://github.com/tschaub/gh-pages/pull/39) - Add message option to cli. ([@markdalgleish](https://github.com/markdalgleish))
* [#37](https://github.com/tschaub/gh-pages/pull/37) - Rework callback error handling. ([@tschaub](https://github.com/tschaub))
* [#36](https://github.com/tschaub/gh-pages/pull/36) - Better error handling. ([@timaschew](https://github.com/timaschew))
* [#35](https://github.com/tschaub/gh-pages/pull/35) - Make CLI exit with error if publishing fails. ([@timaschew](https://github.com/timaschew))
## v0.7.0

@@ -2,0 +10,0 @@

34

lib/index.js

@@ -51,7 +51,7 @@ var path = require('path');

* @param {Object} config Publish options.
* @param {Function} done Callback.
* @param {Function} callback Callback.
*/
exports.publish = function publish(basePath, config, done) {
exports.publish = function publish(basePath, config, callback) {
if (typeof config === 'function') {
done = config;
callback = config;
config = {};

@@ -85,2 +85,24 @@ }

function log(message) {
if (!options.silent) {
options.logger(message);
}
}
if (!callback) {
callback = function(err) {
if (err) {
log(err.message);
}
};
}
function done(err) {
try {
callback(err);
} catch (err2) {
log('Publish callback threw: ', err2.message);
}
}
try {

@@ -110,8 +132,2 @@ if (!fs.statSync(basePath).isDirectory()) {

function log(message) {
if (!options.silent) {
options.logger(message);
}
}
git.exe(options.git);

@@ -118,0 +134,0 @@

{
"name": "gh-pages",
"version": "0.7.0",
"version": "0.8.0",
"description": "Publish to a gh-pages branch on GitHub (or any other branch on any other remote)",

@@ -25,3 +25,3 @@ "keywords": [

"scripts": {
"pretest": "eslint lib test",
"pretest": "eslint lib test bin/gh-pages",
"test": "mocha --recursive test"

@@ -32,3 +32,3 @@ },

"commander": "2.9.0",
"glob": "~4.0.2",
"glob": "~6.0.1",
"graceful-fs": "4.1.2",

@@ -35,0 +35,0 @@ "q": "1.4.1",

Sorry, the diff of this file is not supported yet

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