fix(wbfy): exclude framework workspace app dirs from the root tsconfig#1062
Merged
Conversation
The root tsconfig's managed includes deliberately omit framework `app/**` directories because framework packages (Next.js/Blitz/vinext) own their tsconfig and shim bare imports such as `next/navigation` through package-local `paths`. However, a repo-authored broad include glob (e.g. `e2e/**/*`) could still drag a framework workspace's app sources into the root project, where they fail type checking under the root compiler options. Add those app directories to the root tsconfig `exclude` so the root project never type-checks them regardless of how broad the repo's include globs are, and recognize vinext (the org's Next.js-equivalent framework) alongside Next.js and Blitz.
Contributor
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
…anifests Address review findings on the framework-workspace app exclusion: - The root project includes `<workspace>/src/**/*`, so a framework workspace using the `src/app` layout still leaked its app sources into the root project. Exclude both `app` and `src/app` for framework workspaces. - `dependsOnFramework` accessed manifest properties outside its try/catch, so a workspace `package.json` that parses to a non-object (e.g. a file containing `null`) crashed the run. Guard the access and return false, matching wbfy's existing tolerance of malformed manifests.
…or vinext Address the second review round: - A framework workspace's generated app exclude survived after the workspace was removed from the monorepo, since stale-entry cleanup only pruned test/fixtures entries. Remove orphaned `<workspace>/app` and `<workspace>/src/app` excludes whose workspace prefix is now stale, mirroring the test/fixtures handling. - generateTsconfig now skips standard generation for vinext workspaces too, so the org's Next.js-equivalent framework owns its tsconfig like Next/Blitz instead of having standard includes merged in.
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.
Why
wbfy's root
tsconfig.jsondeliberately keeps frameworkapp/**directories out of its managedincludeentries, because framework packages (Next.js/Blitz/vinext) own their tsconfig and shim bare imports such asnext/navigationthrough package-localpaths. Type-checking those app sources under the root compiler options produces false errors.That intent was only enforced by omitting
app/**from the includes. A repo-authored broad include glob (e.g. a fixture repo whose root tsconfig hasinclude: ["e2e/**/*"]) still drags the framework workspace's app sources into the root project, breakingtsc/type-aware lint:This surfaced when applying wbfy to
vinext-progress, whose e2e fixture is avinextapp workspace.What
buildRootJsonObjnow adds every framework workspace'sappdirectory to the root tsconfigexclude, so the root project never type-checks it regardless of how broad the repo's include globs are.next,blitz, andvinext(the org's Next.js-equivalent framework).appdir is excluded while a plain workspace's is not.All 274 wbfy tests pass;
bun verifyis clean.🤖 Generated with Claude Code