Skip to content

now that mtimes has been removed from watchpack, how do we get all changed/removed files? #4106

Open
@maxwoo-houzz

Description

@maxwoo-houzz

Feature request

What is the expected behavior?

It seems like the new version of WatchPack (v2.0.0) are getting rid of the mtimes variable. However, from my research it seems like that variable was the only way to get the list of changed files that triggered a re-compilation (source).
As such, there should be an alternative way to get this list of changed files.

What is motivation or use case for adding/changing the behavior?

Seems like a pretty useful feature for the watchRun hook, as there are already a couple people (including me) that use it.

How should this be implemented in your opinion?

Watchpack actually provides the info we need, in the variable filesModified that it passes to Watching.js. However, Watching.js doesn't use it at all. Ideally I think this variable should be provided in the watchRun hook, but it should also be fine to just store it as a property just like how it's done with removedFiles, eg in Watching.js:

this.compiler.filesModified = filesModified;

Are you willing to work on this yourself?
yes

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions