You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

@parcel/watcher

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@parcel/watcher - npm Package Compare versions

Comparing version
2.5.0
to
2.5.1
+14
-14
package.json
{
"name": "@parcel/watcher",
"version": "2.5.0",
"version": "2.5.1",
"main": "index.js",

@@ -74,16 +74,16 @@ "types": "index.d.ts",

"optionalDependencies": {
"@parcel/watcher-darwin-x64": "2.5.0",
"@parcel/watcher-darwin-arm64": "2.5.0",
"@parcel/watcher-win32-x64": "2.5.0",
"@parcel/watcher-win32-arm64": "2.5.0",
"@parcel/watcher-win32-ia32": "2.5.0",
"@parcel/watcher-linux-x64-glibc": "2.5.0",
"@parcel/watcher-linux-x64-musl": "2.5.0",
"@parcel/watcher-linux-arm64-glibc": "2.5.0",
"@parcel/watcher-linux-arm64-musl": "2.5.0",
"@parcel/watcher-linux-arm-glibc": "2.5.0",
"@parcel/watcher-linux-arm-musl": "2.5.0",
"@parcel/watcher-android-arm64": "2.5.0",
"@parcel/watcher-freebsd-x64": "2.5.0"
"@parcel/watcher-darwin-x64": "2.5.1",
"@parcel/watcher-darwin-arm64": "2.5.1",
"@parcel/watcher-win32-x64": "2.5.1",
"@parcel/watcher-win32-arm64": "2.5.1",
"@parcel/watcher-win32-ia32": "2.5.1",
"@parcel/watcher-linux-x64-glibc": "2.5.1",
"@parcel/watcher-linux-x64-musl": "2.5.1",
"@parcel/watcher-linux-arm64-glibc": "2.5.1",
"@parcel/watcher-linux-arm64-musl": "2.5.1",
"@parcel/watcher-linux-arm-glibc": "2.5.1",
"@parcel/watcher-linux-arm-musl": "2.5.1",
"@parcel/watcher-android-arm64": "2.5.1",
"@parcel/watcher-freebsd-x64": "2.5.1"
}
}

@@ -43,3 +43,7 @@ #include <unordered_set>

auto key = item.As<String>().Utf8Value();
result.emplace(key);
try {
result.emplace(key);
} catch (const std::regex_error& e) {
Error::New(env, e.what()).ThrowAsJavaScriptException();
}
}

@@ -116,2 +120,5 @@ }

backend->getEventsSince(watcher, &snapshotPath);
if (watcher->mEvents.hasError()) {
throw std::runtime_error(watcher->mEvents.getError());
}
}

@@ -118,0 +125,0 @@

@@ -86,2 +86,3 @@ #include <memory>

KqueueSubscription *sub = *it;
watchers.insert(sub->watcher);
if (flags & (NOTE_DELETE | NOTE_RENAME | NOTE_REVOKE)) {

@@ -100,4 +101,2 @@ sub->watcher->mEvents.remove(sub->path);

}
watchers.insert(sub->watcher);
}

@@ -104,0 +103,0 @@ }

@@ -81,2 +81,13 @@ #include <CoreServices/CoreServices.h>

if (eventFlags[i] & kFSEventStreamEventFlagMustScanSubDirs) {
if (eventFlags[i] & kFSEventStreamEventFlagUserDropped) {
list.error("Events were dropped by the FSEvents client. File system must be re-scanned.");
} else if (eventFlags[i] & kFSEventStreamEventFlagKernelDropped) {
list.error("Events were dropped by the kernel. File system must be re-scanned.");
} else {
list.error("Too many events. File system must be re-scanned.");
}
}
if (isDone) {

@@ -174,3 +185,5 @@ watcher->notify();

watcher->notify();
if (!since) {
watcher->notify();
}

@@ -177,0 +190,0 @@ // Stop watching if the root directory was deleted.

@@ -70,4 +70,4 @@ #include "Watcher.hh"

// We must release our lock before calling into the debouncer
// to avoid a deadlock: the debouncer thread itself will require
// our lock from its thread when calling into `triggerCallbacks`
// to avoid a deadlock: the debouncer thread itself will require
// our lock from its thread when calling into `triggerCallbacks`
// while holding its own debouncer lock.

@@ -123,3 +123,4 @@ lk.unlock();

std::unique_lock<std::mutex> lk(mMutex);
if (mCallbacks.size() > 0 && mEvents.size() > 0) {
if (mCallbacks.size() > 0 && (mEvents.size() > 0 || mEvents.hasError())) {
auto error = mEvents.getError();
auto events = mEvents.getEvents();

@@ -129,3 +130,3 @@ mEvents.clear();

for (auto it = mCallbacks.begin(); it != mCallbacks.end(); it++) {
it->tsfn.BlockingCall(new CallbackData("", events), callJSFunction);
it->tsfn.BlockingCall(new CallbackData(error, events), callJSFunction);
}

@@ -132,0 +133,0 @@ }

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet