Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace parcel watcher with chokidar #5932

Merged
merged 1 commit into from
Nov 22, 2023
Merged

Conversation

AlexandreSi
Copy link
Collaborator

@AlexandreSi AlexandreSi commented Nov 21, 2023

Following issues building Desktop app with parcel watcher (See #5920), this PR brings back chokidar.

It also reduces unnecessary redefinitions of the watcher.
Now editors have to register themselves in order to get the information about when a resource has been changed.

Note: It is done using componentDidMount and componentWillUnmount but it can replaced with a single React.useEffect with a tidying function when the component is transformed into a functional component.

Copy link
Collaborator

@ClementPasteau ClementPasteau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fine for now!

.on('unlink', fileWiseCallback)
.on('add', fileWiseCallback);

subscriptionCancelers[newSubscriptionId] = () => watcher.unwatch(folderPath);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just to check, this function is not async?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope!

Copy link
Owner

@4ian 4ian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll bring back @parcel/watcher later with #5920

@4ian 4ian added this to the Next release milestone Nov 21, 2023
@AlexandreSi AlexandreSi merged commit 1ac248b into master Nov 22, 2023
6 checks passed
@AlexandreSi AlexandreSi deleted the remove-parcel-watcher branch November 22, 2023 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants