Package Exports
- @r18/upgrade
Readme
turborepo-template-upgrade 
Seamlessly keep your repo in sync with turborepo-template.
<<<<<<< ours
=======
Now it is super easy to use this template. Just run
pnpm create r18and provide your project name. That's it, we will automatically load the template and initiate rebranding.
Exciting news! We've launched a new course to help you master this template: Craft Next Gen UI Libraries for React 18 and Next.js 14
theirs
π Purpose
turborepo-template-upgrade is a small utility built for repositories that were bootstrapped using react18-tools/turborepo-template.
Instead of manually copy-pasting template updates (bug fixes, CI improvements, tooling upgrades), this package provides:
- One command upgrade β pull changes from the template into your repo.
- Safe patching β applies diffs instead of overwriting.
- Smart conflict resolution β especially for root
package.jsonfile.
π¦ Installation
You donβt need to add this as a runtime dependency. Use it as a dev tool:
npm install -D turborepo-template-upgrade
# or
yarn add -D turborepo-template-upgradeβ‘ Usage
Inside a repo created with turborepo-template:
npx turborepo-template-upgradeThis will:
- Fetch the latest changes from the template repo.
- Compute a
git diffsince your last upgrade. - Apply the patch on top of your repo.
- Attempt to auto-resolve
package.jsonconflicts. - Store the last applied commit in
.turborepo-template.lst.
If there are remaining conflicts, youβll see them in .template.patch.
π§© Conflict Resolution
<<<<<<< ours
package.jsonmerges are handled automatically:- Keeps your dependencies.
- Brings in template upgrades.
Deduplicates versions.
You can also start by running
pnpm dlx create-turbo@latest --example https://github.com/react18-tools/turborepo-template/in command line interface.
What's Different from Turborepo official templates?
theirs
- For other files, standard
git apply --3wayconflict markers may appear.
π Example Workflow
# 1. Upgrade
npx turborepo-template-upgrade
# 2. Review conflicts (if any)
git status
cat .template.patch
# 3. Commit changes
git add .
git commit -m "chore: upgrade template"π How It Works
- Template repo is added as a Git remote (
template). - Last applied commit hash is tracked in
.turborepo-template.lst. git diffbetween last applied commit βtemplate/main.- Patch applied locally with
git apply --3way.
π Acknowledgments
Thanks to the react18-tools community for shaping the turborepo ecosystem.
License
This library is licensed under the MPL-2.0 open-source license.
Please enroll in our courses or sponsor our work.
with π by Mayank Kumar Chaudhari