Files
2026-02-04 01:55:00 +01:00

2.7 KiB

title, description, url
title description url
Managing dependencies Learn how to manage dependencies in your project. /docs/web/installation/dependencies

Managing dependencies

As the package manager we chose pnpm.

It is a fast, disk space efficient package manager that uses hard links and symlinks to save one version of a module only ever once on a disk. It also has a great [monorepo support](https://pnpm.io/workspaces). Of course, you can change it to use [Bun](https://bunpkg.com), [yarn](https://yarnpkg.com) or [npm](https://www.npmjs.com) with minimal effort.

Install dependency

To install a package you need to decide whether you want to install it to the root of the monorepo or to a specific workspace. Installing it to the root makes it available to all packages, while installing it to a specific workspace makes it available only to that workspace.

To install a package globally, run:

pnpm add -w <package-name>

To install a package to a specific workspace, run:

pnpm add --filter <workspace-name> <package-name>

For example:

pnpm add --filter @turbostarter/ui motion

It will install motion to the @turbostarter/ui workspace.

Remove dependency

Removing a package is the same as installing but with the remove command.

To remove a package globally, run:

pnpm remove -w <package-name>

To remove a package from a specific workspace, run:

pnpm remove --filter <workspace-name> <package-name>

Update a package

Updating is a bit easier since there is a nice way to update a package in all workspaces at once:

pnpm update -r <package-name>
When you update a package, pnpm will respect the [semantic versioning](https://docs.npmjs.com/about-semantic-versioning) rules defined in the `package.json` file. If you want to update a package to the latest version, you can use the `--latest` flag.

Renovate bot

By default, TurboStarter comes with Renovate enabled. It is a tool that helps you manage your dependencies by automatically creating pull requests to update your dependencies to the latest versions. You can find its configuration in the .github/renovate.json file. Learn more about it in the official docs.

When it creates a pull request, it is treated as a normal PR, so all tests and preview deployments will run. It is recommended to always preview and test the changes in the staging environment before merging the PR to the main branch to avoid breaking the application.