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

metalsmith-downloader

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

metalsmith-downloader - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

16

index.js

@@ -26,2 +26,3 @@ /**

var request = require('request');
var crypto = require('crypto');
var queue = require('queue');

@@ -119,2 +120,8 @@

function sha1Hash(data) {
var hash = crypto.createHash('sha1');
hash.update(data);
return hash.digest('hex');
}
function createProcessFile(options) {

@@ -129,2 +136,8 @@ var incremental = options.incremental;

if (cacheDir) {
// If we are using a cache dir we need to add a hash of source URL to path,
// otherwise we cannot detect if the source URL has changed at some point.
filepath = path.resolve(cacheDir, sha1Hash(contentsUrl), filename);
}
return checkFileExists(filepath)

@@ -147,4 +160,3 @@ .then(function(exists) {

if (file.mode) {
// FIXME: Shouldn't this affect filepath and not filename?
return chmodFile(filename, file.mode);
return chmodFile(filepath, file.mode);
}

@@ -151,0 +163,0 @@

2

package.json
{
"name": "metalsmith-downloader",
"version": "0.2.0",
"version": "0.2.1",
"description": "Download assets dynamically in your Metalsmith build",

@@ -5,0 +5,0 @@ "main": "index.js",

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