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(watch): --include & --exclude CLI flags #561

Closed
wants to merge 9 commits into from

Conversation

boxizen
Copy link
Contributor

@boxizen boxizen commented May 25, 2024

closes #181

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

const file = 'file';
const value = 'test';
const append = `${value}append`;
const fixture = await createFixture({
Copy link
Owner

Choose a reason for hiding this comment

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

Use the await using syntax so you can remove the fixture.rm() below

expect(tsxProcessResolved.stdout).not.toMatch(`current date: ${value}`);
expect(tsxProcessResolved.stderr).toBe('');
}, 10_000);
});
Copy link
Owner

Choose a reason for hiding this comment

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

Can you add a test for exclude?

}
});
`.trim(),
[file]: `${value}`,
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
[file]: `${value}`,
[file]: value,

const append = `${value}append`;
const fixture = await createFixture({
[entryFile]: `
import fs from 'fs';
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
import fs from 'fs';
import fs from 'fs/promises';

const entryFile = 'index.js';
const file = 'file';
const value = 'test';
const append = `${value}append`;
Copy link
Owner

Choose a reason for hiding this comment

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

I see you're trying to couple these together via variables but I think the test will be much more readable if you just hard-code them

@privatenumber privatenumber changed the title feat: support additional watchlist feat(watch): --include & --exclude CLI flags May 27, 2024
@mdmower-csnw
Copy link
Contributor

mdmower-csnw commented Jul 1, 2024

@boxizen @privatenumber - I'm interested in these changes. Is there any way I could help here? I cannot push directly to this branch since it is on boxizen's repo, but I could create a new branch that continues from this one if boxizen doesn't have time. The code review comments all look easy enough to address (also, TIL that TS5.2 already introduced support for using declarations!). Thanks and let me know how I could help.

@privatenumber
Copy link
Owner

Closing as it was implemented via #625

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 22, 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
3 participants