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

Regression in glob pattern handling after switching from globby to tinyglobby #1297

Open
paulobmarcos opened this issue Feb 14, 2025 · 0 comments

Comments

@paulobmarcos
Copy link

Issue

Since upgrading from tsup 8.2.4 to 8.3.0, glob patterns that previously worked have stopped functioning as expected. Specifically, patterns that use an exclusion followed by an explicit inclusion no longer behave correctly after tsup switched from globby to tinyglobby.

Before, we could exclude all directories starting with a directory prefix and specifically opt out of one. Here is an example:

[
  "!src/**/dir-prefix*/**/*",
  "src/dir-prefix-special/**/*"
]

This would correctly ignore any directory matching dir-prefix* while still including the dir-prefix-special directory.

However, from 8.3.0 onwards, the same set of patterns fails to ignore dir-prefix-special directory from the exclusion list.

Steps to reproduce

  1. Create a project with tsup 8.2.4 (or any version < 8.3.0).
  2. Add a directory structure that has src/dir-prefix-foo and src/dir-prefix-special.
  3. Configure the tsup config with the following entry patterns:
entry: [
  "!src/**/dir-prefix*/**/*",
  "src/dir-prefix-special/**/*"
],
  1. Run tsup and notice that dir-prefix-foo is ignored while dir-prefix-special is included.
  2. Upgrade tsup to 8.3.0 or above.
  3. Run the same build configuration. Observe that dir-prefix-special is now also ignored when it should be included.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant