Skip to content

fix(named-inputs): match everything under a glob-free fileset path - #99

Draft
shaharkazaz wants to merge 1 commit into
fix/root-tsconfig-global-triggerfrom
fix/glob-free-named-input-paths
Draft

shaharkazaz wants to merge 1 commit into
fix/root-tsconfig-global-triggerfrom
fix/glob-free-named-input-paths

Conversation

@shaharkazaz

Copy link
Copy Markdown
Collaborator

Stacked on #98. Review only this branch's commit.

Problem

{workspaceRoot}/config compiled to a glob::Pattern matching only a file literally named config, not anything inside it; the trailing-slash form {workspaceRoot}/config/ matched nothing at all. So a sharedGlobals entry pointing at a directory silently never fired.

Solution

A glob-free entry now compiles to the literal and <path>/** (after stripping a trailing /), in both the Nx namedInputs path and the Turborepo globalDependencies path. Glob syntax includes braces, so {a,b} is never widened into a directory prefix. An empty path ({workspaceRoot}/) is skipped rather than widened to every file.

The code comment records two divergences from Nx that are left deliberately:

Key changes

  • src/named_inputs.rs: compile_global_pattern, has_glob_syntax, and GlobalPattern::directory: Option<Pattern>; matches_global_pattern ORs the directory pattern in.

Testing

  • Red first: the three glob-free tests (Nx dir form, trailing slash, Turbo) failed at their first config/app.json assertion. The brace-set test was mutation-checked (fails with {/} removed from the glob-syntax set).
  • Sibling paths (config.json, configs/app.json) do not match; an empty path matches nothing.
  • Full suite, fmt and clippy pass on this branch alone.

Non-Nx workspaces

Turbo globalDependencies get the same expansion, and that matches Turborepo's own behaviour: its globwalk expands a metacharacter-free pattern that names a directory to dir/** (add_doublestar_to_dir in crates/turborepo-globwalk, mirrored in turborepo-scm). Rush and generic workspaces have no global-input config, so they are unaffected.

Breaking changes

None. Glob-free directory entries that previously matched nothing now match the directory's contents.

Sources

{workspaceRoot}/config compiled to a pattern matching only a file literally named config, and the trailing-slash form matched nothing. Both Nx (a fileset entry with no glob syntax is the path or everything under it) and Turborepo (globwalk's add_doublestar_to_dir expands a metacharacter-free directory pattern to dir/**) read such an entry as a directory. The Nx namedInputs and turbo globalDependencies paths now compile a glob-free entry to the literal plus <path>/**. An empty path is skipped rather than widened. The comment records two divergences left deliberately: * crossing / (glob crate), and Nx's ! handling.
@coderabbitai

coderabbitai Bot commented Sep 22, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

📦 Preview Release Available

A preview release has been published for commit fb1f42a.

Installation

npm install https://github.com/frontops-dev/domino/releases/download/pr-99-fb1f42a/front-ops-domino-2.0.2.tgz

Running the preview

npx https://github.com/frontops-dev/domino/releases/download/pr-99-fb1f42a/front-ops-domino-2.0.2.tgz affected

Details

This branch has not been deployed

No deployments
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

Successfully merging this pull request may close these issues.

1 participant