Changelog
ShipSaaS receives regular updates, bringing new features, bug fixes, and security patches. This document explains how to synchronize your project with the official codebase.
[!NOTE] The more customizations you make to your project, the more conflicts you might encounter when merging updates. Before merging, always commit all your current work and keep your Git working directory clean.
1. Pull the Latest Template Code
Section titled “1. Pull the Latest Template Code”If you started your project by cloning the official GitHub repository, you can add the official repository as an upstream remote to pull the latest changes directly:
# Add the official repository as an upstream remotegit remote add upstream https://github.com/ShipSaaS/shipsaas.git
# Fetch the latest changes from upstreamgit fetch upstream
# Create a temporary branch for the update to prevent breaking your main branchgit checkout -b update-template
# Merge the upstream changes into the temporary branch (resolve conflicts carefully in your editor if necessary)git merge upstream/main2. Update Project Dependencies
Section titled “2. Update Project Dependencies”Newer versions of the template might introduce new dependencies or upgrade existing packages. After the merge is complete, please run:
bun install3. Upgrade Database Schema
Section titled “3. Upgrade Database Schema”If the update includes changes to the database schema.ts file, you need to re-generate and apply database migrations:
3.1 Generate New Migration Files
Section titled “3.1 Generate New Migration Files”bun run db:generate3.2 Apply Migrations to the Database
Section titled “3.2 Apply Migrations to the Database”# Apply migrations to your locally emulated D1 databasebun run db:migrate:local
# Apply migrations to your remote D1 database on Cloudflarebun run db:migrate:remote4. Merge and Push to Your Repository
Section titled “4. Merge and Push to Your Repository”Once testing and conflict resolution are fully completed locally, you can merge the update branch back into your main branch and push it to your private GitHub repository:
# Switch back to the main branchgit checkout main
# Merge the conflict-resolved update branchgit merge update-template
# Push to your own origin repositorygit push origin main5. Verification & Testing
Section titled “5. Verification & Testing”After upgrading, please ensure you run the following local commands to verify that the project builds and runs correctly:
# Start the development server to test page functionalitybun run dev
# Run code checking and formattingbun run lintbun run format
# Run production bundle build testbun run build