[pull] main from tinacms:main#210
Merged
Merged
Conversation
…cate content-repo writes) (#6738) Closes [tinacms/tinacloud#3295](tinacms/tinacloud#3295). ## Before When a project sets `localContentPath` to point at a sibling content repo, every `tinacms dev` and `tinacms build` writes the generated artifacts (`_schema.json`, `_graphql.json`, `_lookup.json`, `tina-lock.json`) **twice**: once to the generator's `tina/__generated__/`, and again to the content repo. Editors then see a `tina/` folder full of build output land in their content repo on every commit. The content repo also has to *already contain* a `tina/` folder or the CLI errors out — so editors can't keep their content repo clean even if they wanted to. ## After Generated artifacts go only to the generator's `tina/__generated__/`. The content repo is pure content; no `tina/` folder required, no build output committed, no duplicate `tina-lock.json`. Two pieces make that work: - The duplicate-write branches in `Codegen` and `DevCommand` are gone. - `FilesystemBridge` routes any path starting with `tina/__generated__/` or `.tina/__generated__/` to `rootPath` (the generator); everything else still uses `outputPath` (the content root). Without this, schema/graphql/lookup reads after the duplicate-write removal would `ENOENT` on the content side. ## Testing I had my whole regular setup locally; - [ ] tinacloud running locally on main branch - [ ] created a seperate content repo project pointing to SSW.Rules.Josh and SSW.Rules.Content.Test.JB - [ ] SSW.Rules.Josh had tina config file ovverides pointing to the local instance of TinaCloud + .env set up - [ ] ran pnpm dev and pnpm build locally to ensure that tina files are only written to generator repo - [ ] deployed to vercel and tested editing - [ ] SSW.Rules.Josh is using the tagged tina versions (check out its repo if u want) <img width="767" height="699" alt="Screenshot 2026-05-06 at 4 30 33 pm" src="https://github.com/user-attachments/assets/a81d5e1d-0d5e-4e6d-af8f-21d72cfb7a42" /> **Figure: my deployed site url** --- ## A bit more **Public-API changes** (covered in the changeset migration notes): - \`ConfigManager.generatedFolderPathContentRepo\` removed — use \`generatedFolderPath\`. - \`ConfigManager.getTinaFolderPath\`'s \`isContentRoot\` option removed. - \`FilesystemBridge\` routing for \`tina/__generated__/\` resolves to \`rootPath\` in multi-repo setups (custom bridge subclasses may need updates). - Existing multi-repo users will have a stale \`tina/\` folder in their content repo after upgrade — safe to delete. **Bonus fix rolled in.** Generated \`client.ts\` / \`database-client.ts\` now import \`./types\` (extensionless) for TS projects instead of \`./types.ts\` — avoids requiring \`allowImportingTsExtensions: true\` in consumer tsconfigs (broke under Next.js 15.5+ defaults). JS projects still import \`./types.js\` (Node ESM requires it). --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )