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

pathwatcher

Package Overview
Dependencies
Maintainers
4
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 2.0.2 to 2.0.3

10

lib/directory.js

@@ -22,5 +22,11 @@ (function() {

function Directory(path, symlink) {
this.path = path;
function Directory(directoryPath, symlink) {
this.symlink = symlink != null ? symlink : false;
if (directoryPath) {
directoryPath = path.normalize(directoryPath);
if (directoryPath.length > 1 && directoryPath[directoryPath.length - 1] === path.sep) {
directoryPath = directoryPath.substring(0, directoryPath.length - 1);
}
}
this.path = directoryPath;
this.on('first-contents-changed-subscription-will-be-added', (function(_this) {

@@ -27,0 +33,0 @@ return function() {

11

lib/file.js

@@ -28,8 +28,11 @@ (function() {

function File(path, symlink) {
this.path = path;
function File(filePath, symlink) {
this.symlink = symlink != null ? symlink : false;
if (fs.isDirectorySync(this.path)) {
throw new Error("" + this.path + " is a directory");
if (fs.isDirectorySync(filePath)) {
throw new Error("" + filePath + " is a directory");
}
if (filePath) {
filePath = path.normalize(filePath);
}
this.path = filePath;
this.cachedContents = null;

@@ -36,0 +39,0 @@ this.handleEventSubscriptions();

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

"description": "Watch files and directories for changes",
"version": "2.0.2",
"version": "2.0.3",
"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