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

feat: support additional watchlist #208

Closed
wants to merge 8 commits into from

Conversation

boxizen
Copy link
Contributor

@boxizen boxizen commented Mar 22, 2023

closes #181

This change adds additional files to the watchlist via adding the add parameter.

src/watch/index.ts Outdated Show resolved Hide resolved
@@ -35,6 +35,10 @@ const flags = {
type: [String],
description: 'Paths & globs to exclude from being watched',
},
add: {
Copy link
Owner

Choose a reason for hiding this comment

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

Rename to include.

Can you also add an exclude flag that's identical to ignore?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Modified, see if it meets expectations, and I also added the noIgnore flag, otherwise some requirements may not be met, such as hidden file .env

@privatenumber
Copy link
Owner

Thanks for the PR. Can you add a test?

src/watch/index.ts Outdated Show resolved Hide resolved
@@ -35,6 +40,14 @@ const flags = {
type: [String],
description: 'Paths & globs to exclude from being watched',
},
include: {
type: [String],
description: 'Additional paths in the watchlist',
Copy link
Owner

Choose a reason for hiding this comment

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

Follow same format as exclude

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

ignored: [
// Hidden directories like .git
'**/.*/**',
ignored: !argv.flags.noIgnore
Copy link
Owner

Choose a reason for hiding this comment

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

I think this is a pretty big foot-gun that leads devs into watching a ton of files.

Supporting watching .env is a good example, but we'll need to think of a better way to make these exceptions. Ideally via --include.

I don't want it to block this PR so can you file a new issue for discussion or open a PR with a proposal?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, I have removed ignored tag and used include to filter the list of ignore.

Copy link
Owner

Choose a reason for hiding this comment

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

Currently, I don't have the capacity to test and review that functionality.

I don't want it to block this PR so can you file a new issue for discussion or open a PR with a proposal?

Copy link
Contributor Author

@boxizen boxizen Mar 23, 2023

Choose a reason for hiding this comment

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

Got it, I'll revert unnecessary changes asap, add a test and file a new issue.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I updated this pr and opened a new issue #210.

@rgigger

This comment was marked as off-topic.

@jbhurruth
Copy link

@privatenumber, Is this likely to be merged? It looks like your comments were addressed.

@itaikeren
Copy link

Hey @privatenumber!
What is the status of this one?
Looks like there are no blockers to merge this one 🙏

@privatenumber
Copy link
Owner

Sorry but unless this request is coming from a sponsor, this project is just something I work on for fun when I have a few min to spare, and I haven't had time to review this again. Hope to revisit in a few weeks when I wrap up my current project.

@zommerfelds
Copy link

zommerfelds commented May 20, 2024

Why was this closed? Was there a concern with the content or some other reason? (It does say "PR welcome" in #181)

I was about to open a new one for this feature (master...zommerfelds:tsx:master), but then I noticed this existed already.

@privatenumber
Copy link
Owner

When I changed the default branch on the repo, it unexpectedly closed all PRs. Feel free to re-open.

@zommerfelds
Copy link

@boxizen are you interested in changing this PR to point to the master branch and re-opening? I think this looks pretty much ready to be merged. I tried to create a separate PR but didn't have access.

@boxizen
Copy link
Contributor Author

boxizen commented May 25, 2024

@boxizen are you interested in changing this PR to point to the master branch and re-opening? I think this looks pretty much ready to be merged. I tried to create a separate PR but didn't have access.

Of course, I'd be happy to do that. #561

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add files to be watched
6 participants