Repository navigation
filter-files: ignore empty entries in comma-separated inputs - #484
Merged
Merged
Conversation
A comma-separated `globs` (or `files`/`extensions`) input with an empty entry, such as `a,,b` or a trailing `, `, produced an empty pattern that made picomatch throw "Expected pattern to be a non-empty string". Drop empty entries after trimming. Multiline input already dropped blank lines; add regression tests covering that too. Issue: FEI-5485 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017Rd4bUMPhXqR6j4kyG5QUk
🦋 Changeset detectedLatest commit: e868cc6 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
There was a problem hiding this comment.
Commented — medium-importance findings found; nothing blocks.
Lower-confidence observations (3; top: `.changeset/filter-files-empty-entries.md:5` suggestion (non-blocking, documentation): The changeset attributes the picomatch crash to all three inputs, but only `globs` reaches picomatch — the `extensions`...)
.changeset/filter-files-empty-entries.md:5suggestion (non-blocking, documentation): The changeset attributes the picomatch crash to all three inputs, but onlyglobsreaches picomatch — theextensionsbug was a silent over-match. (documentation)actions/filter-files/index.ts:82suggestion (non-blocking): The single-entry fast path still returnsrawuntrimmed, so parseList now trims in two of its three branches and a lone padded entry like" a/** "silently matches nothing. (holistic)actions/filter-files/filter-files.test.ts:280nitpick (non-blocking): Everyit.eachcallback in this repo that discards a leading description column names it —actions/fix-workflows/allowed-runs-on.test.ts:61])("returns no values for %s", (_name, text) => {,actions/fix-workflows/index.test.ts:78])("%s", (_name, yaml) => {,workflows/review/eval/extract-json.test.ts:82])("throws on %s", (_label, text) => {— 15 occurrences, all_nameor_label, none bare. (conventions)
review details
review-v1.25.0 | schema 2 | depth full | re-review scoped blocking-medium | enable holistic,completeness,test-adequacy,first-principles,conventions,documentationreview fingerprint
pr-reviewer:rereview v=1 depth=full verdict=COMMENT anchor-draft=false hunks=eyIuY2hhbmdlc2V0L2ZpbHRlci1maWxlcy1lbXB0eS1lbnRyaWVzLm1kIjpbIjc5NDc2YTVhM2IzMTk0ZWEiXSwiYWN0aW9ucy9maWx0ZXItZmlsZXMvZmlsdGVyLWZpbGVzLnRlc3QudHMiOlsiNjdkOTFjYTM0Mjg5NGJlNSJdLCJhY3Rpb25zL2ZpbHRlci1maWxlcy9pbmRleC50cyI6WyIxY2Q5ZTk3Zjk0Y2IyZWZiIl19Add regression tests for empty entries in a comma-separated `extensions`
input, which previously matched every file because `endsWith("")` is
always true. Correct the changeset: only `globs` crashed picomatch, while
`extensions` silently over-matched. Name the discarded `it.each`
description parameter `_name`, matching the rest of the repo.
Issue: FEI-5485
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017Rd4bUMPhXqR6j4kyG5QUk
Contributor
Guidance for reviewersTriage notes for reviewers: risky files by owning team, repeated changes, and files excluded from review. github-actions (1 file)
review detailsreview-v1.25.0 | schema 2 | depth full | re-review scoped blocking-medium | enable holistic,completeness,test-adequacy,first-principles,conventions,documentation |
Contributor
There was a problem hiding this comment.
Approved — no blocking issues found.
Note: divergence tripwire re-armed a full review (unreviewed share 0.67).
review details
review-v1.25.0 | schema 2 | depth full | re-review scoped blocking-medium | enable holistic,completeness,test-adequacy,first-principles,conventions,documentationreview fingerprint
pr-reviewer:rereview v=1 depth=full verdict=APPROVE anchor-draft=false hunks=eyIuY2hhbmdlc2V0L2ZpbHRlci1maWxlcy1lbXB0eS1lbnRyaWVzLm1kIjpbImY4M2RjMmI0ZjQ1MGJlNGIiXSwiYWN0aW9ucy9maWx0ZXItZmlsZXMvZmlsdGVyLWZpbGVzLnRlc3QudHMiOlsiMjVhZjk2ZmQwNDEwODY2OCJdLCJhY3Rpb25zL2ZpbHRlci1maWxlcy9pbmRleC50cyI6WyIxY2Q5ZTk3Zjk0Y2IyZWZiIl19
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Posted by Claude on behalf of Jeff.
Summary
filter-filescrashed withTypeError: Expected pattern to be a non-empty stringfrom picomatch when a list input contained an empty entry.The ticket describes the crash for a multiline
globsinput with a trailing newline. On currentmainthat case no longer crashes: the 2.0.0 comment-line filtering already drops blank and whitespace-only lines. The same crash still happens for comma-separated input with an empty entry, e.g.a/**,,b/**,a/**,b/**,or, a/**. The same parsing is used for thefilesandextensionsinputs, so they had the same bug.This PR:
parseList.filter-filespatch changeset.Test plan
pnpm test(all 2558 tests pass)pnpm lintpnpm typecheckIssue: FEI-5485
Generated by Claude Code