Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Generated on May 6, 2024 via pnpm

watchpack 1.7.5

Wrapper library for directory and file watching.
Package summary
Share
8
issues
8
high severity
vulnerability
1
meta
7
4
licenses
115
MIT
7
ISC
1
(MIT OR Apache-2.0)
1
BSD-3-Clause
Package created
9 Oct 2014
Version published
10 Nov 2020
Maintainers
1
Total deps
124
Direct deps
4
License
MIT

Issues

8

8 high severity issues

high
Recommendation: Upgrade to version 5.1.2 or later
via: watchpack-chokidar2@2.0.1
via: watchpack-chokidar2@2.0.1
via: watchpack-chokidar2@2.0.1
via: watchpack-chokidar2@2.0.1
via: watchpack-chokidar2@2.0.1
via: watchpack-chokidar2@2.0.1
via: watchpack-chokidar2@2.0.1
via: watchpack-chokidar2@2.0.1
Collapse
Expand

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
115 Packages, Including:
arr-diff@4.0.0
arr-flatten@1.1.0
arr-union@3.1.0
array-unique@0.3.2
assign-symbols@1.0.0
async-each@1.0.6
base@0.11.2
binary-extensions@1.13.1
binary-extensions@2.3.0
bindings@1.5.0
braces@2.3.2
braces@3.0.2
cache-base@1.0.1
chokidar@2.1.8
chokidar@3.6.0
class-utils@0.3.6
collection-visit@1.0.0
component-emitter@1.3.1
copy-descriptor@0.1.1
core-util-is@1.0.3
debug@2.6.9
decode-uri-component@0.2.2
define-property@0.2.5
define-property@1.0.0
define-property@2.0.2
expand-brackets@2.1.4
extend-shallow@2.0.1
extend-shallow@3.0.2
extglob@2.0.4
file-uri-to-path@1.0.0
fill-range@4.0.0
fill-range@7.0.1
for-in@1.0.2
fragment-cache@0.2.1
fsevents@1.2.13
fsevents@2.3.3
function-bind@1.1.2
get-value@2.0.6
has-value@0.3.1
has-value@1.0.0
has-values@0.1.4
has-values@1.0.0
hasown@2.0.2
is-accessor-descriptor@1.0.1
is-binary-path@1.0.1
is-binary-path@2.1.0
is-buffer@1.1.6
is-data-descriptor@1.0.1
is-descriptor@0.1.7
is-descriptor@1.0.3

ISC License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
Cannot
hold-liable
Must
include-copyright
include-license
7 Packages, Including:
anymatch@2.0.0
anymatch@3.1.3
glob-parent@3.1.0
glob-parent@5.1.2
graceful-fs@4.2.11
inherits@2.0.4
remove-trailing-separator@1.1.0

(MIT OR Apache-2.0)

Permissive
1 Packages, Including:
atob@2.1.2

BSD 3-Clause "New" or "Revised" License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
place-warranty
Cannot
use-trademark
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
source-map@0.5.7
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

4
All Dependencies CSV
β“˜ This is a list of watchpack 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
chokidar3.6.025.83 kBMIT
prod optional
graceful-fs4.2.119.57 kBISC
prod optional
neo-async2.6.237.74 kBMIT
prod
watchpack-chokidar22.0.1357 BMIT
prod optional
8

Visualizations

Frequently Asked Questions

What does watchpack do?

Watchpack is a powerful wrapper library used for directory and file watching. In essence, it provides a high-level API for monitoring changes in your file system. It relies on a three-tier design to ensure that only one watcher exists per directory, helping to keep the watcher count minimal. The functionality of Watchpack extends beyond merely observing changes. It can also commence watching in the past, which allows watching to begin after data has been read from the file. This utility also caters to symlink watchers, choosing not to follow symlinks directly but rather to observe them independently.

How do you use watchpack?

To utilize Watchpack in your project, you begin by installing the package via npm and then require it in your JavaScript file. The basic steps involve creating a new Watchpack instance and defining its options such as aggregateTimeout, poll, followSymlinks, and ignored. Then, you use the wp.watch() function to start watching your selected files and directories.

Here's a quick usage walkthrough in code:

// Required: Step 1 - Import Watchpack
var Watchpack = require("watchpack");

// Required: Step 2 - Create a new Watchpack instance with specified options
var wp = new Watchpack({
    aggregateTimeout: 1000,
    poll: true,
    followSymlinks: true,
    ignored: "**/.git"
});

// Required: Step 3 - Start watching your desired files and directories
wp.watch({
    files: myListOfFiles,
    directories: myListOfDirectories,
    missing: myListOfNotExistingItems,
    startTime: Date.now() - 10000
});

You can also add event listeners to your Watchpack instance to react when changes, removals, or groups of events (aggregated) occur. Additionally, facilities for pausing, closing, and retrieving aggregated info are part of the Watchpack utility.

Remember that customization options like aggregateTimeout, poll, followSymlinks, and ignored can greatly impact how Watchpack performs in your unique scenario. Ensure you understand what each of these configurations entails to utilize Watchpack to its fullest potential.

Where are the watchpack docs?

For documentation regarding the use of Watchpack, you can refer to the README document on its Github repository page - https://github.com/webpack/watchpack. The README includes a thorough explanation of watchpack's concept, its API, and usage examples. This will guide you in understanding how to integrate and customize Watchpack in your project.