Skip to content
Source
Sign inSign up

Open update pull requests

Software factory / Runs

Open update pull requests

Some dependencies of your repository are old, and you want pull requests that update them now. Check the dependencies, then open one pull request for each update group, with the lockfile done.

6 min read

You need:

  • Write access to the repository.
  • A package.json at the root of the default branch. The Dependencies tab shows only then.

1. Check now

  1. Open the Dependencies tab of the repository (/@<owner>/<repo>/dependencies).
  2. Click Check now.
  3. Wait for the notice. It says "Checked:" and the number of update groups, or "Checked: no update needs a pull request."

A check only builds the plan: the list of updates, in groups. It changes no branch and opens no pull request.

2. Read the plan

The table has one row for each dependency of the default branch. The Update column says Patch, Minor or Major when the check found an update. The State column says what happens to the dependency, with the reason.

Under Update groups, each group is one pull request:

  • One pull request for all minor and patch updates, from the branch factory/deps/minor-patch.
  • One pull request for each major update, from the branch factory/deps/major/<name>.

Two more kinds of group show here only after you click their buttons: Update one dependency and Sync versions across packages.

For each column and each state, see Dependencies reference.

3. Open the update pull requests

  • To update one group, click Update on its row.
  • To update every group, click Update all at the top of the tab.

The notice says "Started" and the number of update runs. Each run does these steps, with no model:

  1. It changes the version ranges of the group in each package.json. It keeps the rest of the file as it is.
  2. It installs with the package manager of your lockfile, with package scripts off. This updates the lockfile. npm, pnpm, yarn and bun are supported.
  3. It opens the pull request of the group as the bot, or pushes a new version of the open one.

Update starts no run while a run of the group is queued or running. It also starts no run when the pull request of the group is open with the same updates.

Note

If the install fails, the group shows Failed, with the end of the install output. Nothing is pushed.

Done

Each group has its pull request, and the group shows Pull request open. The pull request body lists each update and the install command. Then the CI of the pull request runs your checks.

To read the pull request before you merge it, see Review a dependency pull request.

Update one dependency

One dependency has a new version, and you want it now in every package. You do not want to wait for its group, or take the other updates of the group.

Bump opens one pull request that updates only this dependency. You need write access.

  1. In the dependency table, find the row of the dependency.
  2. In the Update column, click Bump. The button shows when the dependency has an update.
  3. Wait for the notice. It says "Started 1 update run."

What you get:

  • One pull request from the branch factory/deps/dep/<name>. Under Update groups, it shows as "Update of ".
  • In each package.json, the dependency moves to its newest usable version. See Which versions count.
  • Each range keeps its prefix: ^1.2.3 becomes ^1.4.0, and ~1.2.3 becomes ~1.4.0.
  • With a No major updates rule, each range stays in its own major version.

A dependency with an Ignore this dependency rule has no Bump button. If no range can move, the notice gives the reason, for example "Every range of "react" is at its newest allowed version." No run starts.

Sync versions across packages

In a monorepo, two packages can use different versions of one dependency. For example, one package.json has ^1.2.0 and one has ^1.4.1. The Range column of that dependency then shows a Mismatch badge.

Sync versions moves each of these dependencies up to the highest version that your repository already uses. It asks the npm registry nothing, and it never goes past that version. You need write access.

  1. At the top of the tab, find Sync versions. The button shows when a row has Mismatch.
  2. Click Sync versions.
  3. Wait for the notice. It says "Started 1 update run."

What you get:

  • One pull request from the branch factory/deps/sync, with the title deps: sync the versions of N dependencies. For one dependency, the title has its name.
  • Under Update groups, the pull request shows as "Sync versions".
  • In the example, ^1.2.0 becomes ^1.4.1.
  • Each range keeps its prefix. ^1.4.1 and ~1.4.1 count as the same version, so they show no Mismatch and get no change.
  • A dependency with an Ignore this dependency rule keeps its ranges, and never shows Mismatch.

If every dependency has the same version in all packages, the notice says "Each dependency has the same version in every package.json." No run starts.

How Bump and Sync versions run

  • The click builds the update from the tip of the default branch. You do not need Check now first.
  • The run does the same steps as the other groups: it changes the ranges, installs, and opens or updates the pull request as the bot.
  • While the run is queued or running, its button is off.
  • Update all and auto-update never start a Bump or a Sync versions run. Only a person or a tool starts them.

From src

src deps check
src deps update
src deps update major/@types/node
src deps update dep/react
src deps update sync
  • src deps check prints the commit that it checked and the number of update groups. It starts no run.
  • src deps update prints the id of each run that it started. With no group, it updates every group of the plan. It never starts dep/<name> or sync. Read a run with src factory run <run id>.
  • src deps update dep/<name> and src deps update sync build their group from the tip of the default branch. You do not need src deps check first.

REST and MCP have the same features. See From src, REST or MCP.