fix(core): treat a root tsconfig change as a global trigger - #98
Draft
shaharkazaz wants to merge 1 commit into
Draft
shaharkazaz wants to merge 1 commit into
shaharkazaz wants to merge 1 commit into
Conversation
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.
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This was referenced Sep 22, 2026
Contributor
📦 Preview Release AvailableA preview release has been published for commit 275ca27. Installationnpm install https://github.com/frontops-dev/domino/releases/download/pr-98-275ca27/front-ops-domino-2.0.2.tgzRunning the previewnpx https://github.com/frontops-dev/domino/releases/download/pr-98-275ca27/front-ops-domino-2.0.2.tgz affectedDetails |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
A change to the workspace-root
tsconfig.base.jsonrewrites path aliases for the whole workspace, and Domino's module resolution reads that file, yet it was an unowned asset: it affected nothing unless asharedGlobalspattern happened to list it.Solution
A changed workspace-root
tsconfig.base.jsonis now a global trigger in every workspace type, reported with the labelrootTsConfig.libs/x/tsconfig.jsonstays an ordinary project-owned file.resolve_options.rs(ROOT_TSCONFIG_FILE), so the trigger can never drift from what resolution reads.sharedGlobals/globalDependenciesalready 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.rsonly ever joinstsconfig.base.json), and solution-style roottsconfig.jsonfiles 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_TSCONFIGlabel.src/core.rs(step 1b): root-tsconfig triggers are appended after the config-derived ones, outside thenamedInputsblock, so generic workspaces get them too.src/semantic/resolve_options.rs,src/semantic/mod.rs: sharedROOT_TSCONFIG_FILE.src/report.rs: the global banner and the collapsed-group label no longer attribute a root-tsconfig-only run to NxnamedInputs(a generic workspace has nonx.json). The tool wording now comes from the first non-root-tsconfig trigger, with neutral wording when only the root tsconfig fired.Testing
test_root_tsconfig_change_affects_all_projectsfailed withleft: []; 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.libs/lib-a/tsconfig.jsonaffects only lib-a; a generic (non-Nx) workspace whose project names differ from their import specifiers;sharedGlobals+ root change reports exactly one trigger.Non-Nx workspaces
This deliberately widens Turbo and generic workspaces: an edit to the root
tsconfig.base.jsonnow marks every project there too, even whereturbo runwould 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
tsconfig.base.jsonextendsalters resolution but does not trigger.Breaking changes
None in API. Behaviour: root
tsconfig.base.jsonedits now mark all projects in every workspace type.