Socket
Socket
Sign inDemoInstall

@parcel/watcher

Package Overview
Dependencies
22
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.3.0-alpha.0 to 2.3.0-alpha.1

26

package.json
{
"name": "@parcel/watcher",
"version": "2.3.0-alpha.0",
"version": "2.3.0-alpha.1",
"main": "index.js",

@@ -67,15 +67,15 @@ "types": "index.d.ts",

"optionalDependencies": {
"@parcel/watcher-darwin-x64": "2.3.0-alpha.0",
"@parcel/watcher-darwin-arm64": "2.3.0-alpha.0",
"@parcel/watcher-win32-x64": "2.3.0-alpha.0",
"@parcel/watcher-win32-arm64": "2.3.0-alpha.0",
"@parcel/watcher-win32-ia32": "2.3.0-alpha.0",
"@parcel/watcher-linux-x64-glibc": "2.3.0-alpha.0",
"@parcel/watcher-linux-x64-musl": "2.3.0-alpha.0",
"@parcel/watcher-linux-arm64-glibc": "2.3.0-alpha.0",
"@parcel/watcher-linux-arm64-musl": "2.3.0-alpha.0",
"@parcel/watcher-linux-arm-glibc": "2.3.0-alpha.0",
"@parcel/watcher-android-arm64": "2.3.0-alpha.0",
"@parcel/watcher-freebsd-x64": "2.3.0-alpha.0"
"@parcel/watcher-darwin-x64": "2.3.0-alpha.1",
"@parcel/watcher-darwin-arm64": "2.3.0-alpha.1",
"@parcel/watcher-win32-x64": "2.3.0-alpha.1",
"@parcel/watcher-win32-arm64": "2.3.0-alpha.1",
"@parcel/watcher-win32-ia32": "2.3.0-alpha.1",
"@parcel/watcher-linux-x64-glibc": "2.3.0-alpha.1",
"@parcel/watcher-linux-x64-musl": "2.3.0-alpha.1",
"@parcel/watcher-linux-arm64-glibc": "2.3.0-alpha.1",
"@parcel/watcher-linux-arm64-musl": "2.3.0-alpha.1",
"@parcel/watcher-linux-arm-glibc": "2.3.0-alpha.1",
"@parcel/watcher-android-arm64": "2.3.0-alpha.1",
"@parcel/watcher-freebsd-x64": "2.3.0-alpha.1"
}
}

@@ -10,3 +10,3 @@ # @parcel/watcher

- **Native** - implemented in C++ for performance and low-level integration with the operating system.
- **Cross platform** - includes backends for macOS, Linux, Windows, and Watchman.
- **Cross platform** - includes backends for macOS, Linux, Windows, FreeBSD, and Watchman.
- **Performant** - events are throttled in C++ so the JavaScript thread is not overwhelmed during large filesystem changes (e.g. `git checkout` or `npm install`).

@@ -68,2 +68,3 @@ - **Scalable** - tens of thousands of files can be watched or queried at once with good performance.

- [ReadDirectoryChangesW](https://msdn.microsoft.com/en-us/library/windows/desktop/aa365465%28v%3Dvs.85%29.aspx) on Windows
- [kqueue](https://man.freebsd.org/cgi/man.cgi?kqueue) on FreeBSD, or as an alternative to FSEvents on macOS

@@ -94,3 +95,3 @@ You can specify the exact backend you wish to use by passing the `backend` option. If that backend is not available on the current platform, the default backend will be used instead. See below for the list of backend names that can be passed to the options.

- [Watchman](https://facebook.github.io/watchman/) if installed
- [fts](http://man7.org/linux/man-pages/man3/fts.3.html) (brute force) on Linux
- [fts](http://man7.org/linux/man-pages/man3/fts.3.html) (brute force) on Linux and FreeBSD
- [FindFirstFile](https://docs.microsoft.com/en-us/windows/desktop/api/fileapi/nf-fileapi-findfirstfilea) (brute force) on Windows

@@ -109,6 +110,24 @@

- `ignore` - an array of paths or glob patterns to ignore. uses [`is-glob`](https://github.com/micromatch/is-glob) to distinguish paths from globs. glob patterns are parsed with [`micromatch`](https://github.com/micromatch/micromatch) (see [features](https://github.com/micromatch/micromatch#matching-features)).
- paths can be relative or absolute and can either be files or directories. No events will be emitted about these files or directories or their children.
- paths can be relative or absolute and can either be files or directories. No events will be emitted about these files or directories or their children.
- glob patterns match on relative paths from the root that is watched. No events will be emitted for matching paths.
- `backend` - the name of an explicitly chosen backend to use. Allowed options are `"fs-events"`, `"watchman"`, `"inotify"`, `"windows"`, or `"brute-force"` (only for querying). If the specified backend is not available on the current platform, the default backend will be used instead.
- `backend` - the name of an explicitly chosen backend to use. Allowed options are `"fs-events"`, `"watchman"`, `"inotify"`, `"kqueue"`, `"windows"`, or `"brute-force"` (only for querying). If the specified backend is not available on the current platform, the default backend will be used instead.
## WASM
The `@parcel/watcher-wasm` package can be used in place of `@parcel/watcher` on unsupported platforms. It relies on the Node `fs` module, so in non-Node environments such as browsers, an `fs` polyfill will be needed. The `@parcel/watcher-wasm` package is published as an ESM-only module.
The WASM API is identical, except you must initialize it first.
```js
import init, {subscribe} from '@parcel/watcher-wasm';
// Load and initialize the WASM module.
await init();
// Use the module as documented above.
subscribe(/* ... */);
```
By default, `init` loads the WASM file relative to its JavaScript, but you can pass a URL to the `watcher.wasm` file if you are hosting it elsewhere.
## Who is using this?

@@ -121,2 +140,3 @@

- [Nx](https://nx.dev)
- [Nuxt](https://nuxt.com)

@@ -123,0 +143,0 @@ ## License

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