Atlas bumps a JavaScript library to a new major version and repairs the breakage it causes, without guessing at what broke. Atlas drives pnpm through the bash tool and captures the full output, fetches the library's release notes with webfetch so the real breaking changes are in context before any editing starts, then lets the build and vitest enumerate the failures rather than predicting them. Each failing callsite is fixed with the edit tool, using the lsp tool's goToDefinition operation to inspect the new signatures inside node_modules, and the whole diff is reviewed before the commit.
How does Atlas upgrade a JavaScript dependency and capture what broke?
Atlas runs the pnpm upgrade through the bash tool and captures the full output. If that output exceeds the tool's limits it is saved to a file you can read, so the 1 peer dependency warning buried in a noisy pnpm resolution log is not lost, and it usually predicts the next failure.
The upgrade itself is one command, but the information in its output is what the rest of the workflow depends on. pnpm reports peer dependency conflicts, deprecated transitive packages, and lockfile changes, and any of those can explain a failure that appears three steps later. Atlas captures all of it. Run atlas where your package.json lives so Atlas can map your modules, npm scripts, and bundler config, then have it run the pnpm upgrade. The pnpm-lock.yaml diff that results is part of the review surface: Atlas computes a unified diff for every file edit and surfaces it for approval before writing.
Why fetch the release notes before fixing JavaScript breakage?
Atlas fetches the library's release notes with the webfetch tool so the breaking changes are in context before you start editing. A major version bump in a JavaScript package usually renames 2 or 3 exports and changes one option object shape, and the changelog says exactly which.
Without the release notes, an agent fixing a JavaScript build error will invent a plausible migration. It will guess that the renamed export is now a default export, or that the options object gained a nested key. Sometimes it is right. When it is wrong, the code compiles under vitest and fails at runtime. Atlas fetches the actual release notes with webfetch, which negotiates format so the page arrives as markdown or text rather than rendered HTML, and every webfetch call sits behind a permission prompt with the URL as the pattern. The fixes then match the documented breaking changes instead of a guess.
How does Atlas find every JavaScript callsite the upgrade broke?
Atlas builds or typechecks with the bash tool and lets the compiler enumerate the breakage rather than predicting it. In a 2026 JavaScript project that means running the build script and vitest, then reading the real errors, because a tool that guesses at the blast radius of a major bump always guesses low.
The build is the authority on what broke, and vitest is the authority on what broke at runtime. Atlas runs both through the bash tool and reads the actual errors: the import that no longer resolves in src/lib/client.js, the option key the new version rejects, the callback signature that gained an argument. For each error, Atlas uses the lsp tool's goToDefinition operation to inspect the new signature inside the upgraded package under node_modules, so the fix is written against the shipped code rather than the remembered API. Atlas also searches code with hybrid semantic and keyword retrieval fused by reciprocal rank fusion, so finding every consumer of the changed export across src/ is a query, not a manual sweep.
How does Atlas fix each broken JavaScript callsite safely?
Atlas fixes each error with the edit tool, whose replacer cascade requires an exact-enough oldString and refuses ambiguous multi-match replacements. A JavaScript file importing the renamed export in 4 places gets an explicit replaceAll, and a single ambiguous occurrence becomes an error rather than a wrong edit.
Mechanical repairs across a JavaScript upgrade are exactly where a careless agent does damage: the same identifier appears in an import, a JSDoc comment, a test fixture, and an unrelated variable name. The Atlas edit tool refuses to guess. Where every occurrence in a file must change, replaceAll is correct and explicit. Where one must, edit demands enough context to be unambiguous. Every change arrives as a unified diff Atlas surfaces for approval before writing, and Atlas snapshots file changes as git patches so an upgrade that went sideways can be diffed and rolled back rather than reconstructed from memory.
How do I verify a JavaScript dependency upgrade is complete?
Atlas re-runs the build and the tests with the bash tool until clean, then reviews the whole diff before committing. A complete JavaScript upgrade is 4 things: a green vitest run, a successful build, prettier over the touched files, and a pnpm-lock.yaml change that matches the package.json bump exactly.
Completeness in a JavaScript upgrade has three proofs. The build compiles, which means no import or type reference still points at the old API. vitest is green, which means the runtime behavior the tests cover survived the bump. And the diff reads as an upgrade: package.json and pnpm-lock.yaml changed together, the callsite edits are all explicable by a documented breaking change from the release notes, and prettier introduced no unrelated churn. Atlas reads git branches, status, and diffs, and can stage and create commits on your behalf once those three proofs hold.
Step by step
- 01Run atlas where your package.json lives so Atlas can map your modules, npm scripts, and bundler config.
- 02Run the pnpm upgrade through the bash tool and capture the full output; if it exceeds the limits it is saved to a file you can read.
- 03Fetch the library's release notes with webfetch so the breaking changes are in context before you start editing; approve the URL in the permission prompt.
- 04Build or typecheck with the bash tool and let the compiler enumerate the breakage, rather than predicting which JavaScript files will fail.
- 05Fix each error with the edit tool, using the lsp tool's goToDefinition operation to inspect the new signatures inside the upgraded package under node_modules.
- 06Run vitest with the bash tool to catch the runtime breakage the build never sees, such as a changed option object shape.
- 07Re-run the build and vitest until clean, then run prettier on the touched files so the diff carries no formatting churn.
- 08Review the whole diff, including package.json and pnpm-lock.yaml, before letting Atlas stage and create the commit.
Frequently asked questions
- how to upgrade a major JavaScript dependency and fix everything it breaks
- Run the pnpm upgrade through Atlas's bash tool, fetch the release notes with webfetch so the breaking changes are in context, then build and run vitest to let the tooling enumerate the breakage. Fix each callsite with the edit tool, using the lsp tool's goToDefinition to check the new signatures.
- why does my AI agent guess wrong when migrating a JavaScript package
- Because it is migrating from memory. Atlas fetches the library's release notes with webfetch first, so the fixes are written against the documented breaking changes. Without the changelog, a plausible-looking migration can compile and still fail at runtime under vitest.
- how do I see the full pnpm install output in Atlas
- Atlas runs the pnpm upgrade through the bash tool and captures the full output. If the output exceeds the tool's limits, it is saved to a file whose path Atlas reports, so a long resolution log across a monorepo can still be read in full.
- does Atlas check the new API signatures inside node_modules
- Yes. Atlas uses the lsp tool's goToDefinition operation to inspect the new signatures in the upgraded package, so each edit is written against the code that actually shipped rather than the version of the API the model remembers.
- how does Atlas avoid a wrong find and replace during a JavaScript upgrade
- The Atlas edit tool's replacer cascade requires an exact-enough oldString and refuses ambiguous multi-match replacements. Where every occurrence of a renamed export in a file must change, replaceAll is explicit. Where one must, edit demands disambiguating context instead of guessing.
- can I roll back a dependency upgrade Atlas made
- Atlas snapshots file changes as git patches so edits can be diffed and rolled back. An upgrade that touched package.json, pnpm-lock.yaml, and a dozen files under src/ can be reverted from the snapshot rather than reconstructed by hand.
- what proves a JavaScript dependency upgrade is finished
- Three things: the build compiles, vitest is green, and the diff reads as an upgrade with package.json and pnpm-lock.yaml changed together and prettier introducing no unrelated churn. Atlas re-runs the build and tests through bash until all three hold.
- atlas JavaScript project setup
- Run atlas where your package.json lives. Atlas maps your modules, npm scripts, and bundler config, and can modernize callbacks to async/await or add tests, with each diff reviewed before it is written. Installs run through pnpm, tests through vitest, formatting through prettier.
Try Atlas in your terminal
The terminal-native AI coding agent. Free core, single binary.
Install AtlasRelated guides
Upgrade a Dependency and Fix the Breakage with Atlas (2026 Workflow)
How to upgrade a dependency and fix the breakage with Atlas in 2026: bash drives the package manager, webfetch pulls the release notes, edit fixes each compiler error.
Atlas for JavaScript in 2026
In 2026, Atlas empowers JavaScript developers with a terminal-native AI coding agent. It indexes code by AST, uses local embeddings, and offers permission-gated tools for safe, efficient development.
Research a Third-Party API Before Integrating It in JavaScript with Atlas (2026)
Atlas uses websearch and webfetch to pull live API docs into context before you write JavaScript, so your Node or browser integration matches the real endpoints in 2026.
Onboard to an Unfamiliar JavaScript Codebase with Atlas in 2026
Onboard to an unfamiliar JavaScript codebase in 2026. Atlas maps package.json, npm scripts, and bundler config with codebase_search, glob, read, and lsp.
Run Atlas Headless in CI in a JavaScript Project (2026)
Run Atlas non-interactively in a JavaScript pipeline. `atlas run` sends one prompt, streams events to stdout, supports --format json, and exits when the session goes idle.
Migrate a deprecated API across every callsite in JavaScript with Atlas (2026)
How Atlas migrates a deprecated JavaScript API across every callsite in 2026: lsp findReferences enumerates callers, todowrite tracks them, apply_patch migrates each one.
Audit a JavaScript Repo with Parallel Subagents in 2026
In 2026, JavaScript developers use Atlas to sweep entire repositories for code issues. Leverage parallel subagents to audit pnpm projects, vitest configurations, and prettier formatting without blowing your main context
Write Unit Tests for Untested JavaScript Code with Atlas (2026)
Atlas enumerates a JavaScript module's exports with the lsp tool, copies your existing vitest conventions, writes the spec file, and runs vitest with the bash tool.