@parcel/watcher
Advanced tools
+14
-14
| { | ||
| "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" | ||
| } | ||
| } |
+8
-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. |
+5
-4
@@ -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
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
130794
1.03%