Skip to content

fix(wbfy): exclude framework workspace app dirs from the root tsconfig#1062

Merged
exKAZUu merged 3 commits into
mainfrom
fix-framework-workspace-app-tsconfig-exclude
Jul 22, 2026
Merged

fix(wbfy): exclude framework workspace app dirs from the root tsconfig#1062
exKAZUu merged 3 commits into
mainfrom
fix-framework-workspace-app-tsconfig-exclude

Conversation

@exKAZUu

@exKAZUu exKAZUu commented Jul 22, 2026

Copy link
Copy Markdown
Member

Why

wbfy's root tsconfig.json deliberately keeps framework app/** directories out of its managed include entries, because framework packages (Next.js/Blitz/vinext) own their tsconfig and shim bare imports such as next/navigation through package-local paths. 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 has include: ["e2e/**/*"]) still drags the framework workspace's app sources into the root project, breaking tsc/type-aware lint:

e2e/fixture/app/page.tsx: error TS2307: Cannot find module 'next/form' ...
e2e/fixture/app/PushButton.tsx: error TS2305: Module '"next/navigation"' has no exported member 'useRouter'.

This surfaced when applying wbfy to vinext-progress, whose e2e fixture is a vinext app workspace.

What

  • buildRootJsonObj now adds every framework workspace's app directory to the root tsconfig exclude, so the root project never type-checks it regardless of how broad the repo's include globs are.
  • Framework detection covers next, blitz, and vinext (the org's Next.js-equivalent framework).
  • Added a test asserting a framework workspace's app dir is excluded while a plain workspace's is not.

All 274 wbfy tests pass; bun verify is clean.

🤖 Generated with Claude Code

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.
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

exKAZUu added 2 commits July 22, 2026 20:30
…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.
@exKAZUu
exKAZUu merged commit fcc4f5f into main Jul 22, 2026
6 checks passed
@exKAZUu
exKAZUu deleted the fix-framework-workspace-app-tsconfig-exclude branch July 22, 2026 11:44
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