Skip to content

chore(tsconfig): Restructure tsconfig files#2055

Merged
Tobbe merged 3 commits into
mainfrom
tobbe-chore-update-tsconfig-exclude
Jul 7, 2026
Merged

chore(tsconfig): Restructure tsconfig files#2055
Tobbe merged 3 commits into
mainfrom
tobbe-chore-update-tsconfig-exclude

Conversation

@Tobbe

@Tobbe Tobbe commented Jul 7, 2026

Copy link
Copy Markdown
Member
  • Almost 30 files no longer need custom "exclude" rules
  • More config is consolidated in base config files for easier updating in the future

@netlify

netlify Bot commented Jul 7, 2026

Copy link
Copy Markdown

Deploy Preview for cedarjs ready!

Name Link
🔨 Latest commit 2a191eb
🔍 Latest deploy log https://app.netlify.com/projects/cedarjs/deploys/6a4cb80c73f8d8000891f14e
😎 Deploy Preview https://deploy-preview-2055--cedarjs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions github-actions Bot added this to the chore milestone Jul 7, 2026
@nx-cloud

nx-cloud Bot commented Jul 7, 2026

Copy link
Copy Markdown

🤖 Nx Cloud AI Fix

Ensure the fix-ci command is configured to always run in your CI pipeline to get automatic fixes in future runs. For more information, please see https://nx.dev/ci/features/self-healing-ci


View your CI Pipeline Execution ↗ for commit 2a191eb

Command Status Duration Result
nx run-many -t build:pack --exclude create-ceda... ✅ Succeeded 5s View ↗
nx run-many -t build ✅ Succeeded 3m 11s View ↗

💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗


☁️ Nx Cloud last updated this comment at 2026-07-07 14:07:04 UTC

@Tobbe

Tobbe commented Jul 7, 2026

Copy link
Copy Markdown
Member Author

@greptile-apps can you please review this please?

@greptile-apps

greptile-apps Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR reorganizes TypeScript config inheritance across the monorepo. The main changes are:

  • Adds shared build-only base configs for ESM and CJS packages.
  • Moves broad test exclusion out of the general base config.
  • Removes repeated package-level exclude lists.
  • Moves several fixtures under __tests__/__fixtures__ and updates test imports.

Confidence Score: 4/5

The changed config is mostly safe, but root or package typechecks may now include tests unexpectedly.

  • Build configs keep tests excluded.
  • Broad package projects can now pull in __tests__ files through the general base config.
  • Fixture moves and import updates are aligned with the new paths.

tsconfig.base.json

Important Files Changed

Filename Overview
tsconfig.base.json Changes the general base exclusions so non-build package projects can now include __tests__ files.
tsconfig.build.base.json Adds a build-specific base config that keeps tests excluded from build projects.
tsconfig.cjs-build-base.json Adds a CJS build base that layers CommonJS syntax settings on top of the build base.
packages/adapters/fastify/web/tsconfig.json Moves the Fastify web adapter package to the new CJS build base.
packages/adapters/fastify/web/src/resolveOptions.test.ts Updates the fixture path to the relocated Fastify web test fixture directory.
packages/adapters/fastify/web/src/web.test.ts Updates the fixture path to the relocated Fastify web test fixture directory.
packages/adapters/fastify/web/src/webFallback.test.ts Updates the fallback fixture path to the relocated Fastify web test fixture directory.
packages/graphql-server/src/plugins/tests/useRedwoodDirective.test.ts Updates plugin test fixture imports to the new local fixture location.
packages/graphql-server/src/plugins/tests/useRedwoodGlobalContextSetter.test.ts Updates plugin test fixture imports to the new local fixture location.
packages/graphql-server/src/plugins/tests/useRedwoodLogger.test.ts Updates plugin test fixture imports to the new local fixture location.
packages/graphql-server/src/plugins/tests/useRedwoodPopulateContext.test.ts Updates plugin test fixture imports to the new local fixture location.
packages/realtime/src/graphql/plugins/tests/useCedarRealtime.test.ts Updates realtime test fixture imports to the relocated fixture directory.
packages/record/src/redwoodrecord/tests/Core.test.js Updates the record datamodel fixture import to the relocated fixture directory.
packages/record/src/redwoodrecord/tests/RedwoodRecord.test.js Updates the record datamodel fixture import to the relocated fixture directory.
packages/record/src/redwoodrecord/tests/Reflection.test.js Updates the record datamodel fixture import to the relocated fixture directory.
packages/record/src/redwoodrecord/tests/RelationProxy.test.js Updates the record datamodel fixture import to the relocated fixture directory.

Comments Outside Diff (1)

  1. tsconfig.base.json, line 1328-1334 (link)

    P2 Root Typecheck Includes Tests

    When the repository or an editor loads package tsconfig.json files that still extend the general base and use broad includes like include: ["."], this change pulls __tests__ files into those projects for the first time. Test files can use test-only globals, fixture imports, or dependencies that are not valid for the package project, so a root tsc --build tsconfig.json or package-level typecheck can fail even though build configs still exclude tests.

Reviews (1): Last reviewed commit: "update .gitignore with the new path" | Re-trigger Greptile

@Tobbe Tobbe merged commit 58d6a01 into main Jul 7, 2026
79 of 83 checks passed
@Tobbe Tobbe deleted the tobbe-chore-update-tsconfig-exclude branch July 7, 2026 18:59
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown

The changes in this PR are now available on npm.

Try them out by running yarn cedar upgrade -t 5.0.0-canary.2599

Or try it in a new app with yarn dlx create-cedar-app@5.0.0-canary.2599

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