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

pathwatcher

Package Overview
Dependencies
Maintainers
6
Versions
130
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pathwatcher - npm Package Compare versions

Comparing version 6.3.2 to 6.4.0

124

api.json

@@ -6,3 +6,3 @@ {

"filename": "src/directory.coffee",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.3.2/src/directory.coffee#L13",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.4.0/src/directory.coffee#L13",
"sections": [

@@ -35,3 +35,3 @@ {

"sectionName": "Construction",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.3.2/src/directory.coffee#L26",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.4.0/src/directory.coffee#L26",
"visibility": "Public",

@@ -58,3 +58,3 @@ "summary": "Configures a new Directory instance, no files are accessed.",

"sectionName": "Construction",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.3.2/src/directory.coffee#L51",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.4.0/src/directory.coffee#L51",
"visibility": "Public",

@@ -81,3 +81,3 @@ "summary": "Creates the directory on disk that corresponds to `::getPath()` if\nno such directory already exists.",

"sectionName": "Event Subscription",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.3.2/src/directory.coffee#L73",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.4.0/src/directory.coffee#L73",
"visibility": "Public",

@@ -104,3 +104,3 @@ "summary": "Invoke the given callback when the directory's contents change.",

"sectionName": "Directory Metadata",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.3.2/src/directory.coffee#L95",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.4.0/src/directory.coffee#L95",
"visibility": "Public",

@@ -119,3 +119,3 @@ "summary": "",

"sectionName": "Directory Metadata",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.3.2/src/directory.coffee#L98",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.4.0/src/directory.coffee#L98",
"visibility": "Public",

@@ -134,3 +134,3 @@ "summary": "",

"sectionName": "Directory Metadata",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.3.2/src/directory.coffee#L101",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.4.0/src/directory.coffee#L101",
"visibility": "Public",

@@ -149,3 +149,3 @@ "summary": "",

"sectionName": "Directory Metadata",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.3.2/src/directory.coffee#L106",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.4.0/src/directory.coffee#L106",
"visibility": "Public",

@@ -164,3 +164,3 @@ "summary": "",

"sectionName": "Directory Metadata",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.3.2/src/directory.coffee#L110",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.4.0/src/directory.coffee#L110",
"visibility": "Public",

@@ -179,3 +179,3 @@ "summary": "",

"sectionName": "Directory Metadata",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.3.2/src/directory.coffee#L115",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.4.0/src/directory.coffee#L115",
"visibility": "Public",

@@ -188,3 +188,3 @@ "summary": "Return a {Boolean}, true if this {Directory} is the root directory\nof the filesystem, or false if it isn't. ",

"sectionName": "Managing Paths",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.3.2/src/directory.coffee#L126",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.4.0/src/directory.coffee#L126",
"visibility": "Public",

@@ -203,3 +203,3 @@ "summary": "",

"sectionName": "Managing Paths",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.3.2/src/directory.coffee#L132",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.4.0/src/directory.coffee#L132",
"visibility": "Public",

@@ -218,3 +218,3 @@ "summary": "",

"sectionName": "Managing Paths",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.3.2/src/directory.coffee#L143",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.4.0/src/directory.coffee#L143",
"visibility": "Public",

@@ -233,3 +233,3 @@ "summary": "",

"sectionName": "Managing Paths",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.3.2/src/directory.coffee#L148",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.4.0/src/directory.coffee#L148",
"visibility": "Public",

@@ -248,3 +248,3 @@ "summary": "",

"sectionName": "Traversing",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.3.2/src/directory.coffee#L205",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.4.0/src/directory.coffee#L205",
"visibility": "Public",

@@ -263,3 +263,3 @@ "summary": "Traverse to the parent directory.",

"sectionName": "Traversing",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.3.2/src/directory.coffee#L214",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.4.0/src/directory.coffee#L214",
"visibility": "Public",

@@ -286,3 +286,3 @@ "summary": "Traverse within this Directory to a child File. This method doesn't\nactually check to see if the File exists, it just creates the File object.",

"sectionName": "Traversing",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.3.2/src/directory.coffee#L224",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.4.0/src/directory.coffee#L224",
"visibility": "Public",

@@ -309,3 +309,3 @@ "summary": "Traverse within this a Directory to a child Directory. This method\ndoesn't actually check to see if the Directory exists, it just creates the\nDirectory object.",

"sectionName": "Traversing",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.3.2/src/directory.coffee#L230",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.4.0/src/directory.coffee#L230",
"visibility": "Public",

@@ -324,3 +324,3 @@ "summary": "Reads file entries in this directory from disk synchronously.",

"sectionName": "Traversing",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.3.2/src/directory.coffee#L251",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.4.0/src/directory.coffee#L251",
"visibility": "Public",

@@ -355,3 +355,3 @@ "summary": "Reads file entries in this directory from disk asynchronously.",

"sectionName": "Traversing",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.3.2/src/directory.coffee#L282",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.4.0/src/directory.coffee#L282",
"visibility": "Public",

@@ -385,3 +385,3 @@ "summary": "Determines if the given path (real or symbolic) is inside this\ndirectory. This method does not actually check if the path exists, it just\nchecks if the path is under this directory.",

"filename": "src/file.coffee",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.3.2/src/file.coffee#L18",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.4.0/src/file.coffee#L18",
"sections": [

@@ -418,3 +418,3 @@ {

"sectionName": "Construction",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.3.2/src/file.coffee#L31",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.4.0/src/file.coffee#L31",
"visibility": "Public",

@@ -441,3 +441,3 @@ "summary": "Configures a new File instance, no files are accessed.",

"sectionName": "Construction",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.3.2/src/file.coffee#L53",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.4.0/src/file.coffee#L53",
"visibility": "Public",

@@ -456,3 +456,3 @@ "summary": "Creates the file on disk that corresponds to `::getPath()` if no\nsuch file already exists.",

"sectionName": "Event Subscription",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.3.2/src/file.coffee#L71",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.4.0/src/file.coffee#L71",
"visibility": "Public",

@@ -479,3 +479,3 @@ "summary": "Invoke the given callback when the file's contents change.",

"sectionName": "Event Subscription",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.3.2/src/file.coffee#L80",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.4.0/src/file.coffee#L80",
"visibility": "Public",

@@ -502,3 +502,3 @@ "summary": "Invoke the given callback when the file's path changes.",

"sectionName": "Event Subscription",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.3.2/src/file.coffee#L89",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.4.0/src/file.coffee#L89",
"visibility": "Public",

@@ -525,3 +525,3 @@ "summary": "Invoke the given callback when the file is deleted.",

"sectionName": "Event Subscription",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.3.2/src/file.coffee#L102",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.4.0/src/file.coffee#L102",
"visibility": "Public",

@@ -564,3 +564,3 @@ "summary": "Invoke the given callback when there is an error with the watch.\nWhen your callback has been invoked, the file will have unsubscribed from\nthe file watches.",

"sectionName": "File Metadata",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.3.2/src/file.coffee#L124",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.4.0/src/file.coffee#L124",
"visibility": "Public",

@@ -579,3 +579,3 @@ "summary": "",

"sectionName": "File Metadata",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.3.2/src/file.coffee#L127",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.4.0/src/file.coffee#L127",
"visibility": "Public",

@@ -594,3 +594,3 @@ "summary": "",

"sectionName": "File Metadata",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.3.2/src/file.coffee#L130",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.4.0/src/file.coffee#L130",
"visibility": "Public",

@@ -609,3 +609,3 @@ "summary": "",

"sectionName": "File Metadata",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.3.2/src/file.coffee#L135",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.4.0/src/file.coffee#L135",
"visibility": "Public",

@@ -624,3 +624,3 @@ "summary": "",

"sectionName": "File Metadata",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.3.2/src/file.coffee#L140",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.4.0/src/file.coffee#L140",
"visibility": "Public",

@@ -639,3 +639,3 @@ "summary": "",

"sectionName": "File Metadata",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.3.2/src/file.coffee#L146",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.4.0/src/file.coffee#L146",
"visibility": "Public",

@@ -654,3 +654,3 @@ "summary": "Get the SHA-1 digest of this file",

"sectionName": "File Metadata",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.3.2/src/file.coffee#L155",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.4.0/src/file.coffee#L155",
"visibility": "Public",

@@ -669,3 +669,3 @@ "summary": "Get the SHA-1 digest of this file",

"sectionName": "File Metadata",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.3.2/src/file.coffee#L165",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.4.0/src/file.coffee#L165",
"visibility": "Public",

@@ -686,3 +686,3 @@ "summary": "Sets the file's character set encoding name.",

"sectionName": "File Metadata",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.3.2/src/file.coffee#L176",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.4.0/src/file.coffee#L176",
"visibility": "Public",

@@ -701,3 +701,3 @@ "summary": "",

"sectionName": "Managing Paths",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.3.2/src/file.coffee#L183",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.4.0/src/file.coffee#L183",
"visibility": "Public",

@@ -716,3 +716,3 @@ "summary": "",

"sectionName": "Managing Paths",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.3.2/src/file.coffee#L190",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.4.0/src/file.coffee#L190",
"visibility": "Public",

@@ -731,3 +731,3 @@ "summary": "",

"sectionName": "Managing Paths",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.3.2/src/file.coffee#L199",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.4.0/src/file.coffee#L199",
"visibility": "Public",

@@ -746,3 +746,3 @@ "summary": "",

"sectionName": "Managing Paths",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.3.2/src/file.coffee#L211",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.4.0/src/file.coffee#L211",
"visibility": "Public",

@@ -755,3 +755,3 @@ "summary": "Return the {String} filename without any directory information. ",

"sectionName": "Traversing",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.3.2/src/file.coffee#L219",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.4.0/src/file.coffee#L219",
"visibility": "Public",

@@ -764,3 +764,3 @@ "summary": "Return the {Directory} that contains this file. ",

"sectionName": "Reading and Writing",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.3.2/src/file.coffee#L255",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.4.0/src/file.coffee#L255",
"visibility": "Public",

@@ -785,5 +785,23 @@ "summary": "Reads the contents of the file.",

{
"name": "createReadStream",
"sectionName": "Reading and Writing",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.4.0/src/file.coffee#L282",
"visibility": "Public",
"summary": "",
"description": "",
"returnValues": [
{
"type": null,
"description": "Returns a stream to read the content of the file."
},
{
"type": "ReadStream",
"description": "Returns a {ReadStream} object."
}
]
},
{
"name": "write",
"sectionName": "Reading and Writing",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.3.2/src/file.coffee#L289",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.4.0/src/file.coffee#L295",
"visibility": "Public",

@@ -808,5 +826,23 @@ "summary": "Overwrites the file with the given text.",

{
"name": "createWriteStream",
"sectionName": "Reading and Writing",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.4.0/src/file.coffee#L306",
"visibility": "Public",
"summary": "",
"description": "",
"returnValues": [
{
"type": null,
"description": "Returns a stream to write content to the file."
},
{
"type": "WriteStream",
"description": "Returns a {WriteStream} object."
}
]
},
{
"name": "writeSync",
"sectionName": "Reading and Writing",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.3.2/src/file.coffee#L302",
"srcUrl": "https://github.com/atom/node-pathwatcher/blob/v6.4.0/src/file.coffee#L321",
"visibility": "Public",

@@ -813,0 +849,0 @@ "summary": "Overwrites the file with the given text.",

@@ -300,15 +300,5 @@ (function() {

return function(resolve, reject) {
var content, encoding, readStream;
var content, readStream;
content = [];
encoding = _this.getEncoding();
if (encoding === 'utf8') {
readStream = fs.createReadStream(_this.getPath(), {
encoding: encoding
});
} else {
if (iconv == null) {
iconv = require('iconv-lite');
}
readStream = fs.createReadStream(_this.getPath()).pipe(iconv.decodeStream(encoding));
}
readStream = _this.createReadStream();
readStream.on('data', function(chunk) {

@@ -338,2 +328,17 @@ return content.push(chunk);

File.prototype.createReadStream = function() {
var encoding;
encoding = this.getEncoding();
if (encoding === 'utf8') {
return fs.createReadStream(this.getPath(), {
encoding: encoding
});
} else {
if (iconv == null) {
iconv = require('iconv-lite');
}
return fs.createReadStream(this.getPath()).pipe(iconv.decodeStream(encoding));
}
};
File.prototype.write = function(text) {

@@ -354,2 +359,19 @@ return this.exists().then((function(_this) {

File.prototype.createWriteStream = function() {
var encoding, stream;
encoding = this.getEncoding();
if (encoding === 'utf8') {
return fs.createWriteStream(this.getPath(), {
encoding: encoding
});
} else {
if (iconv == null) {
iconv = require('iconv-lite');
}
stream = iconv.encodeStream(encoding);
stream.pipe(fs.createWriteStream(this.getPath()));
return stream;
}
};
File.prototype.writeSync = function(text) {

@@ -356,0 +378,0 @@ var previouslyExisted;

@@ -5,3 +5,3 @@ {

"description": "Watch files and directories for changes",
"version": "6.3.2",
"version": "6.4.0",
"licenses": [

@@ -8,0 +8,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