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(source): handle negated globs in workspace configs #139

Closed
richburdon opened this issue Jun 7, 2023 · 3 comments
Closed

feat(source): handle negated globs in workspace configs #139

richburdon opened this issue Jun 7, 2023 · 3 comments

Comments

@richburdon
Copy link

Description

No apparent way to exclude globs from sources.
Additionally excluded patterns from pnpm-workspace.yml are ignored. E.g.,

packages:
  - `packages/**/*`
  - '!packages/skipped/**/*'

Suggested Solution

Should honor exclusion globs (and provide --exclude CLI option)

Help Needed

N/A

@JamieMason
Copy link
Owner

Hey @richburdon,
It looks like currently the globs are resolved by syncpack once at a time using glob.globSync.

Syncpack does provide the Ignored version group, which the ignore patterns could be duplicated into to ignore those same packages for now. That's duplication though and it's a good idea to have the negated patterns handled so it's all done at source (I've not seen anyone doing this before when defining workspaces, hence it being missing).

We use the official glob package which npm uses internally but it doesn't support negated globs. There is an ignore option we could look into using though for any globs starting with !, rather than switching from the official package to something like globby.

Thanks for raising this.

@JamieMason JamieMason changed the title Excluded sources ignored feat(source): handle negated globs in workspace configs Jun 7, 2023
@richburdon
Copy link
Author

richburdon commented Jun 7, 2023

Thanks for the quick response.

The issue is with a tool that is generating multiple (many) temp directories that each have package.json files (this is happening inside one of the excluded pnpm package folders). So, looking for a way to exclude other named folders.

JamieMason added a commit that referenced this issue Jun 18, 2023
Closes #140

When linting semver ranges, warn on non-semver versions but don't error

Closes #139

Handle !negated globs

Closes #132

Show more detailed information about errors and warnings

Closes #111

Throw when config is invalid, instead of defaulting
@JamieMason
Copy link
Owner

Released in 10.6.1. Any problems, please let me know.

If you find syncpack useful, please star the project or help us spread the word to other Developers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants