Skip to content

[pull] main from tinacms:main#210

Merged
pull[bot] merged 1 commit into
code:mainfrom
tinacms:main
May 8, 2026
Merged

[pull] main from tinacms:main#210
pull[bot] merged 1 commit into
code:mainfrom
tinacms:main

Conversation

@pull
Copy link
Copy Markdown

@pull pull Bot commented May 8, 2026

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 : )

…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>
@pull pull Bot locked and limited conversation to collaborators May 8, 2026
@pull pull Bot added the ⤵️ pull label May 8, 2026
@pull pull Bot merged commit 4d0c37a into code:main May 8, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant