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(forge): add filtering to workspace() #78

Merged
merged 2 commits into from
Feb 28, 2025

Conversation

tugrulates
Copy link
Member

No description provided.

@Copilot Copilot bot review requested due to automatic review settings February 28, 2025 10:04
@github-actions github-actions bot added the forge label Feb 28, 2025

Choose a reason for hiding this comment

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

PR Overview

This PR adds filtering functionality to the workspace() function, allowing packages to be selectively returned based on glob pattern matching against their name or directory. Key changes include:

  • Extending package options to include a "filter" field with accompanying documentation.
  • Modifying the workspace() function to filter packages using glob patterns.
  • Updating CLI commands and tests to use the new filter option.

Reviewed Changes

File Description
tool/forge/package.ts Added "filter" option to PackageOptions and integrated glob pattern filtering in workspace().
tool/forge/package.test.ts Updated tests to validate the filtering behavior and adjusted usage of repository directory.
tool/forge/cli.ts Revised CLI command actions to propagate filter parameters to workspace().

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

tool/forge/cli.ts:36

  • [nitpick] Consider renaming the rest parameter 'filter' to a more descriptive name (e.g. 'patterns' or 'packageFilters') to reduce potential confusion with the built-in Array.filter method.
.action(async (options, ...filter) => {
@tugrulates tugrulates merged commit 71488b0 into main Feb 28, 2025
10 checks passed
@tugrulates tugrulates deleted the feat/forge/workspace-filter branch February 28, 2025 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant