Skip to content

fix(core): treat a root tsconfig change as a global trigger - #98

Draft
shaharkazaz wants to merge 1 commit into
fix/rename-marks-source-projectfrom
fix/root-tsconfig-global-trigger
Draft

shaharkazaz wants to merge 1 commit into
fix/rename-marks-source-projectfrom
fix/root-tsconfig-global-trigger

Conversation

@shaharkazaz

Copy link
Copy Markdown
Collaborator

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

Problem

A change to the workspace-root tsconfig.base.json rewrites path aliases for the whole workspace, and Domino's module resolution reads that file, yet it was an unowned asset: it affected nothing unless a sharedGlobals pattern happened to list it.

Solution

A changed workspace-root tsconfig.base.json is now a global trigger in every workspace type, reported with the label rootTsConfig.

  • Matched by exact root-relative path, never basename, so libs/x/tsconfig.json stays an ordinary project-owned file.
  • The filename is a constant shared with resolve_options.rs (ROOT_TSCONFIG_FILE), so the trigger can never drift from what resolution reads.
  • If sharedGlobals / globalDependencies already reported the file, no second trigger is added (one report cause).

Deviation from the plan: the plan also listed a root tsconfig.json. Resolution never reads it (resolve_options.rs only ever joins tsconfig.base.json), and solution-style root tsconfig.json files are common, so triggering on it would mark every project for a change that has no effect on Domino. It is deliberately excluded.

Key changes

  • src/named_inputs.rs: root_tsconfig_triggers + ROOT_TSCONFIG label.
  • src/core.rs (step 1b): root-tsconfig triggers are appended after the config-derived ones, outside the namedInputs block, so generic workspaces get them too.
  • src/semantic/resolve_options.rs, src/semantic/mod.rs: shared ROOT_TSCONFIG_FILE.
  • src/report.rs: the global banner and the collapsed-group label no longer attribute a root-tsconfig-only run to Nx namedInputs (a generic workspace has no nx.json). The tool wording now comes from the first non-root-tsconfig trigger, with neutral wording when only the root tsconfig fired.

Testing

  • Red first: test_root_tsconfig_change_affects_all_projects failed with left: []; the dedupe unit test and the generic-workspace test were mutation-checked (they fail with the filter / core wiring removed); the three report tests failed before the banner change.
  • Integration: root change affects all projects; nested libs/lib-a/tsconfig.json affects only lib-a; a generic (non-Nx) workspace whose project names differ from their import specifiers; sharedGlobals + root change reports exactly one trigger.
  • Full suite, fmt and clippy pass on this branch alone.

Non-Nx workspaces

This deliberately widens Turbo and generic workspaces: an edit to the root tsconfig.base.json now marks every project there too, even where turbo run would not invalidate on it. That is the intent, because Domino's own resolution depends on that file in every workspace type, but it is a behaviour change for those repos.

Known limits / follow-ups

  • A change to a file that tsconfig.base.json extends alters resolution but does not trigger.

Breaking changes

None in API. Behaviour: root tsconfig.base.json edits now mark all projects in every workspace type.

The workspace-root tsconfig.base.json feeds module resolution for every project, yet a change to it was an unowned asset that affected nothing unless a sharedGlobals pattern listed it. It is now a global trigger in every workspace type, matched by exact root-relative path so nested tsconfigs stay project-owned. The filename is shared with resolve_options so the trigger always matches what resolution reads; a root tsconfig.json is not read and so is not a trigger. When sharedGlobals already reports the file, no second trigger is added. The report banner and collapsed-group label no longer attribute a root-tsconfig-only run to Nx.
@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 275ca27.

Installation

npm install https://github.com/frontops-dev/domino/releases/download/pr-98-275ca27/front-ops-domino-2.0.2.tgz

Running the preview

npx https://github.com/frontops-dev/domino/releases/download/pr-98-275ca27/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