Skip to content

maintainer review: a source matches no file when the node_modules exclude comes after it #301

Description

@viclafouch

In review, list() passes the skill sources before dependencyExclude. In that order, git ls-files returns nothing for most sources, so a valid source matches no file and maintainer check cannot pass.

git init -q repro && cd repro
mkdir -p packages/hooks/src packages/hooks/node_modules/dep
echo x > packages/hooks/src/index.ts
echo x > packages/hooks/node_modules/dep/index.js
echo node_modules > .gitignore
git add -A && git commit -qm init

X=':(top,exclude,glob)**/node_modules/**'
git ls-files -- ':(top,glob)packages/hooks/src/**' "$X"   # nothing
git ls-files -- "$X" ':(top,glob)packages/hooks/src/**'   # packages/hooks/src/index.ts

Same result on Git 2.43 (Ubuntu 24.04), 2.49 and 2.54, with @tanstack/intent 0.5.0. git diff is not affected.

Fix: pass dependencyExclude before the patterns in list().

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions