
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
Spy on files
@parcel/watcher for native performance, event throttling, and Watchman supportsetImmediate before emittingsetImmediateerror events
import filespy from 'filespy'
const spy = filespy(process.cwd(), {
only: ['*.[jt]sx?'],
skip: ['node_modules'],
}).on('all', (event, file, stats, cwd) => {
// "file" argument is relative to "cwd"
// "stats" is from lstat call
if (event == 'create') {
// File created.
} else if (event == 'update') {
// File changed.
} else {
// File deleted.
}
}).on('error', error => {
// Permission error or watcher failed.
}).on('ready', () => {
// Initial crawl completed. Watcher initialized.
})
spy.dirs // Set of watched directories.
spy.files // Sorted list of watched paths (even directories).
spy.skipped // Sorted list of existing paths that were skipped.
// List all watched paths within a watched directory.
// Returned paths are relative to cwd.
spy.list('foo/bar')
// Stop watching.
spy.close()
interface {
all(
event: 'create' | 'update' | 'delete',
/** Path relative to cwd */
file: string,
/** Equals null for "delete" events */
stats: fs.Stats | null, // https://nodejs.org/api/fs.html#fs_class_fs_stats
/** The root directory */
cwd: string
): void
/** Permission error or watcher failure */
error(error: Error): void
/** Directory was crawled */
crawl(dir: string, cwd: string): void
/** Watcher is ready */
ready(): void
/** File created */
create(file: string, stats: fs.Stats, cwd: string): void
/** File changed */
update(file: string, stats: fs.Stats, cwd: string): void
/** File deleted */
delete(file: string, cwd: string): void
}
Filespy mixes globbing with regular expressions, a concept borrowed from Recrawl.
/), only the basename is matched.'*.js' // matches 'a.js' and 'a/b.js'
'a/b' // identical to '**/a/b'
'/*.js' // matches 'a.js' not 'a/b.js'
'foo/' // matches 'foo/bar' and 'foo/bar/baz' etc
'*.jsx?' // matches 'a.js' and 'b.jsx'
'*.(js|ts)' // matches 'a.js' and 'b.ts'
'foo/**/bar' // matches 'foo/bar' and 'foo/a/b/c/bar' etc
FAQs
Spy on files
We found that filespy demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.