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

broccoli-caching-writer

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

broccoli-caching-writer - npm Package Compare versions

Comparing version 0.2.2 to 0.3.0

24

index.js
var fs = require('fs');
var path = require('path');
var mkdirp = require('mkdirp')
var walkSync = require('walk-sync');
var quickTemp = require('quick-temp')

@@ -46,3 +47,3 @@ var Writer = require('broccoli-writer');

helpers.copyRecursivelySync(self.getCacheDir(), destDir);
linkFromCache(self.getCacheDir(), destDir);
})

@@ -62,2 +63,23 @@ };

function linkFromCache(srcDir, destDir) {
var files = walkSync(srcDir);
var length = files.length;
var file;
for (var i = 0; i < length; i++) {
file = files[i];
var srcFile = path.join(srcDir, file);
var stats = fs.statSync(srcFile);
if (stats.isDirectory()) { continue; }
if (!stats.isFile()) { throw new Error('Can not link non-file.'); }
destFile = path.join(destDir, file);
mkdirp.sync(path.dirname(destFile));
fs.linkSync(srcFile, destFile);
}
}
function keysForTree (fullPath, options) {

@@ -64,0 +86,0 @@ options = options || {}

6

package.json
{
"name": "broccoli-caching-writer",
"version": "0.2.2",
"version": "0.3.0",
"description": "Broccoli plugin that allows simple caching (while still allowing N:N) based on the input tree hash.",

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

"broccoli-kitchen-sink-helpers": "~0.2.0",
"rimraf": "~2.2.6",
"mkdirp": "~0.4.0",
"quick-temp": "~0.1.2"
"quick-temp": "~0.1.2",
"walk-sync": "~0.1.2"
},

@@ -27,0 +27,0 @@ "devDependencies": {

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