All jobs

Add Dependabot to a SolidJS App

Yes. An agent reads a SolidJS app's package.json, lockfile and workflow, writes a grouped Dependabot config for npm and Actions, fixes the build check, opens a PR.

Run this on RushOpens the console with this prompt ready to send, in a Project that has your repository.

What the agent does

The agent reads the manifest and the lock before writing a line of YAML. In an app like solidjs/solid-realworld, package.json has two runtime dependencies, solid-js ^1.3.3 and marked ^0.8.0, and a development set pinned two ways: @babel/core and two Babel plugins at exactly 7.12.13, rollup at exactly 2.52.3, @rollup/plugin-babel at 5.2.0, @rollup/plugin-commonjs 21.0.0 and @rollup/plugin-node-resolve 13.0.5, beside caret ranges for babel-preset-solid, rollup-plugin-terser, rollup-plugin-delete and serve. package-lock.json is lockfileVersion 2, and the test script is the literal test, so the build is the only check: rollup.config.js bundles src/index.js to public/ with Babel's solid preset and terser when production is set.

The one workflow, .github/workflows/gh-pages.yml, runs on pushes to main and on pull requests with actions/checkout@v2, actions/setup-node@v2 on Node 14, npm install, npm run build, and deploys with peaceiris/actions-gh-pages@v3 only on a push. That is almost a check for a dependency bump already, except npm install may rewrite the lockfile instead of honouring it, so the agent changes the step to npm ci, which fails if the lock and the manifest disagree, and adds cache: npm to the setup step. The Node version stays, noted in the pull request as a separate decision.

.github/dependabot.yml gets two entries. The npm entry runs weekly with three groups, babel for @babel/* and babel-preset-solid, rollup for rollup and every @rollup/* and rollup-plugin-* package, and the rest together, so a Babel release arrives as one pull request instead of three that fail to build apart. It ignores major updates of rollup, because version 4 drops the rollup-plugin-terser the config imports and needs a config rewrite that a bump cannot do, and of marked, whose 0.x to later jump changed its API; the ignore rules carry a one-line reason each. The github-actions entry runs weekly too, so checkout@v2 and setup-node@v2 get their pull requests with the same build check.

The proof is a baseline. The agent runs npm ci and npm run build in its sandbox on the current lock and records the bundle names and sizes rollup wrote to public/, then applies the file and validates it with the schema Dependabot publishes, since a misspelled key is otherwise ignored silently. The pull request pastes the build output so the first Dependabot pull request has something to compare against, and the agent opens no bumps itself.

Start it with one API call

POST https://api.phoenix.so/o/{org}/sessions with this body:

{
  "agent": "claude",
  "input": "Add Dependabot to this SolidJS app. Read package.json, package-lock.json (the lockfileVersion and the resolved versions of solid-js, rollup and @babel/core), rollup.config.js, .prettierrc, readme.md and .github/workflows/gh-pages.yml first. Write .github/dependabot.yml with an npm entry on a weekly schedule grouped into babel (@babel/* and babel-preset-solid), rollup (rollup, @rollup/*, rollup-plugin-*) and everything else, ignoring major updates of rollup and marked with a commented reason for each, and a github-actions entry on the same schedule. Change the workflow's install step to npm ci and add npm caching to setup-node; leave the Node version and note it in the pull request. Run npm ci and npm run build to record a baseline of the bundles rollup writes, validate the Dependabot file against its schema, and open a pull request with the baseline and the validation output. Do not bump any dependency.",
  "resources": [
    {
      "url": "https://github.com/your-org/your-app"
    }
  ]
}
  1. Get an API key. In the console, open Settings, then API keys, and create a key for your org. Send it in the Authorization header as a Bearer token.
  2. Send the request. POST the body in request.json to https://api.phoenix.so/o/{org}/sessions, with your repository as the resources URL. The run starts in its own cloud sandbox.
  3. Read what came back. Follow the run on its live stream or wait for the run.completed webhook, then read the result and its trajectory.

What comes back

The pull request adds .github/dependabot.yml and changes .github/workflows/gh-pages.yml. Its description pastes the npm ci and npm run build output with the files rollup wrote to public/ and their sizes, the schema validation result, and a short list of the pins it found so a reviewer knows which groups will produce the first pull requests.

Within a week Dependabot opens one pull request per group that has updates, each built by the existing workflow on npm ci, so a bump that breaks the Solid preset or the Rollup plugin chain shows as a failed build on the pull request rather than a broken deploy. Major Rollup and marked updates do not arrive at all until someone removes the ignore rule, which is a deliberate change with its own pull request.

Before merging, a reviewer confirms the weekly day and the open pull request limit, decides whether the Node 14 runner should move to a current release in the same change or a following one, and checks that the groups match how the team wants to review updates.

Run it on every repository without Dependabot

A team with several front-end repositories starts one run per repository from its own server: one POST /o/{org}/sessions each with that repository in resources and a request_id that is a UUID v5 of its full name, so a retried call returns the run already started. Each run reads its own manifest: a Vite project gets a vite group instead of rollup, a pnpm workspace gets one entry with the workspace directories, and a repository with no build or test script gets a pull request that says the file is in place but nothing checks a bump yet.

A team that wants the file kept complete runs this prompt monthly from an automation with a schedule trigger in the Project that holds the repository: when a new workflow, a second package manifest or a Dockerfile has appeared since the last run, that run opens a pull request adding the entry; otherwise it ends without one and says what it checked.

The use case this job follows, with its automation and trigger: Upgrade dependencies weekly.

Why run it on Rush?

The file is short and the mistakes are slow to surface: a missing group sends three Babel pull requests that each fail to build until the others merge, a misspelled key is ignored without an error, and an install step that rewrites the lock makes every green check meaningless. The agent reads the lock, groups by what actually ships together, validates the file, and records the baseline build in its sandbox so the reviewer can tell a real regression from a flaky one.

The run keeps every command and its output, so the reviewer sees the build and the bundle sizes without cloning the repository or installing Node 14. Several repositories can get the file at once, each in its own sandbox, and one that already has Dependabot gets only the missing ecosystem or group with a note.

Frequently asked questions

Why ignore major Rollup updates?

rollup.config.js imports rollup-plugin-terser, which later Rollup majors replace with a different package, and the plugin chain in the config was written for version 2. A major bump would arrive as a pull request that cannot build, every week, until someone rewrites the config. The ignore rule turns that into one deliberate upgrade with a reason recorded next to it.

Why switch npm install to npm ci?

npm install may update package-lock.json to satisfy the manifest, so a workflow run can pass on versions that differ from the lock Dependabot just changed. npm ci installs exactly the lock and fails if it disagrees with package.json, which is the check a dependency bump needs.

Does the run open any upgrade pull requests?

No. It adds the configuration and the baseline; Dependabot opens the first pull requests on its schedule after the file lands on the default branch. The prompt says not to bump anything, so the lock in the pull request is unchanged.

What about the Node 14 runner?

The workflow pins Node 14 through setup-node@v2, and the github-actions entry will propose newer action versions, not a newer Node. Moving the runtime is a separate decision the pull request names, because a newer Node can change what the Rollup and Babel pins accept.

More SolidJS jobs

The same job on other stacks

Keep reading