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 3.2.2 to 3.2.3

5

changelog.md

@@ -0,1 +1,6 @@

## v3.2.3
* [#398](https://github.com/tschaub/gh-pages/pull/398) - Update glob-parent ([@tschaub](https://github.com/tschaub))
* [#395](https://github.com/tschaub/gh-pages/pull/395) - Switch from filenamify-url to filenamify ([@tw0517tw](https://github.com/tw0517tw))
## v3.2.2

@@ -2,0 +7,0 @@

19

lib/index.js
const findCacheDir = require('find-cache-dir');
const Git = require('./git');
const filenamify = require('filenamify-url');
const filenamify = require('filenamify');
const copy = require('./util').copy;

@@ -13,5 +13,16 @@ const getUser = require('./util').getUser;

function getCacheDir() {
return findCacheDir({name: 'gh-pages'});
/**
* Get the cache directory.
* @param {string} [optPath] Optional path.
* @returns {string} The full path to the cache directory.
*/
function getCacheDir(optPath) {
const dir = findCacheDir({name: 'gh-pages'});
if (!optPath) {
return dir;
}
return path.join(dir, filenamify(optPath));
}
exports.getCacheDir = getCacheDir;

@@ -115,3 +126,3 @@ function getRepo(options) {

repoUrl = repo;
const clone = path.join(getCacheDir(), filenamify(repo));
const clone = getCacheDir(repo);
log('Cloning %s into %s', repo, clone);

@@ -118,0 +129,0 @@ return Git.clone(repo, clone, options.branch, options);

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

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

"email-addresses": "^3.0.1",
"filenamify-url": "^1.0.0",
"filenamify": "^4.3.0",
"find-cache-dir": "^3.3.1",

@@ -43,0 +43,0 @@ "fs-extra": "^8.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