Socket
Socket
Sign inDemoInstall

tree-sync

Package Overview
Dependencies
31
Maintainers
3
Versions
16
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.2 to 1.1.3

5

index.js

@@ -53,2 +53,3 @@ 'use strict';

var pathname = patch[1];
var entry = patch[2];

@@ -60,5 +61,5 @@ var inputFullpath = this._input + '/' + pathname;

case 'create' :
return fs.writeFileSync(outputFullpath, fs.readFileSync(inputFullpath));
return fs.writeFileSync(outputFullpath, fs.readFileSync(inputFullpath), { mode: entry.mode });
case 'change' :
return fs.writeFileSync(outputFullpath, fs.readFileSync(inputFullpath));
return fs.writeFileSync(outputFullpath, fs.readFileSync(inputFullpath), { mode: entry.mode });
case 'mkdir' :

@@ -65,0 +66,0 @@ try {

6

package.json
{
"name": "tree-sync",
"version": "1.1.2",
"version": "1.1.3",
"description": "",

@@ -13,2 +13,5 @@ "main": "index.js",

},
"files": [
"index.js"
],
"repository": {

@@ -22,2 +25,3 @@ "type": "git",

"fs-tree-diff": "^0.5.0",
"debug": "^2.2.0",
"mkdirp": "^0.5.1",

@@ -24,0 +28,0 @@ "quick-temp": "^0.1.5",

# TreeSync [![Build Status](https://travis-ci.org/stefanpenner/tree-sync.svg?branch=master)](https://travis-ci.org/stefanpenner/tree-sync) [![Build status](https://ci.appveyor.com/api/projects/status/7136sbfmybx6q7w2?svg=true)](https://ci.appveyor.com/project/embercli/tree-sync)
A module for repeated efficient synchronizing two directories.
```js
// input/a/{a.js,b.js}
// output/
var tree = new TreeSync('input', 'output')
tree.sync();
// output is now contains copies of everything that is in input
fs.unlink('/input/a/b/js');
// input / output have diverged
tree.sync();
// difference is calculated and efficient patch to update `output` is created and applied
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc