Skip to content
Source
Sign inSign up
TanStack/intent

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

Closedviclafouch(GitHub profile, opens in a new tab) opened this issue 1 comment

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().

  1. More precise trigger: Git drops the matches only when one include precedes the exclude, and only for some nested paths (packages/x/** works, packages/hooks/src/** does not). Two includes, or the exclude first, return the right files. list([pattern]) in review passes exactly one include. Fix in #302.

Sign in to join this conversation.