Skip to content

Migrate from previous repositories

Julien Elbaz edited this page May 2, 2022 · 4 revisions

This guide aims to ease up the transition between working with the old repositories and this mono-repository.

Some Differences

Package manager

yarn has been replaced with pnpm for performance (and other) reasons.

Be weary that pnpm is stricter and will prevent accessing transitive dependencies unless declared as regular dependencies.
A lot of third party packages and our own code had to be patched in order to work properly.

Check out the .pnpmfile.cjs file for more details.

Local packages

As the mono-repository is a pnpm workspace it will use the locally compiled version of packages instead of downloading them from the npm registry.

It means that we should not use yalc anymore. Just make sure to build the package before running the dependent (ex: build common before running lld).

Scripts relying on turborepo should do that automatically.

Changelog and Version Bumps

With the introduction of the mono-repository, it will be up to the developers to write changelogs and to classify their change using semantic versioning.

This means that when releasing new versions of packages, the version bump will be determined by what developers declared when committing their changes.

Check out this wiki page for more details.

Migration

Issues and Pull Requests

⚠️ Issues & PRs will not be ported over!

If you opened issues or pull requests before the archiving of the old repositories and you feel that they are still relevant feel free to re-open them in the ledger-live repo.

You can import your old PR branch using the migrate-branch tool as explained below.

Branches

A tool has been developed to easily pick up a branch that has been started on the old repositories and port it over to the mono-repo.

Place yourself on the target branch, and use the pnpm migrate-branch script to migrate any branch from an old repository.

Ex:

# My old branch was initiated from develop.
git checkout develop
# Migrate my old branch.
pnpm migrate-branch ledger-live-desktop my-branch
# Eventually resolve conflicts and:
# git merge --continue
Clone this wiki locally