Skip to content

[SDK-764] Allow rollbar 4.x as a peer dependency - #174

Merged
brianr merged 1 commit into
mainfrom
peer-deps/rollbar-4
Oct 6, 2026
Merged

brianr merged 1 commit into
mainfrom
peer-deps/rollbar-4

Conversation

@devtools-agent

@devtools-agent devtools-agent Bot commented Oct 6, 2026

Copy link
Copy Markdown

Description of the change

Adds ^4.0.0 to the rollbar peer dependency range, in package.json and in the root package entry of package-lock.json. Same shape as #132, which added 3.x.

-    "rollbar": "^2.26.4 || ^3.0.0-alpha.3"
+    "rollbar": "^2.26.4 || ^3.0.0-alpha.3 || ^4.0.0"

rollbar.js 4.0.0 is being prepared in rollbar/rollbar.js#1505. Its only breaking change is dropping Node 18 support (rollbar/rollbar.js#1481). Nothing in the browser/React API this package uses changes. Under the current range, npm 7+ rejects rollbar@4 alongside @rollbar/react@1.1.0 with ERESOLVE. That rejection also fails the React examples in rollbar.js's own CI on the release PR.

The rollbar devDependency stays at ^3.1.0 because 4.0.0 isn't on npm yet. It can move once rollbar.js publishes. Users only get the wider range when a new @rollbar/react is published; this PR doesn't bump the version.

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Maintenance
  • New release

Related issues

Validation

  • npm ci with the updated lockfile succeeds on Node 24 / npm 11, so the lockfile is consistent.
  • npm test: 13/13 pass. npm run lint and npm run build are clean.
  • semver.satisfies against the new range: 2.26.4, 3.1.0, 4.0.0 and 4.3.2 are accepted; 2.26.3 and 5.0.0 are rejected.
  • End-to-end install in a fresh project with npm's default strict peer resolution, using react@18, prop-types and the rollbar 4.0.0 tarball built from Release 4.0.0 rollbar.js#1505:
    • @rollbar/react@1.1.0 from npm fails with ERESOLVE ... peer rollbar@"^2.26.4 || ^3.0.0-alpha.3".
    • This branch, via npm pack, installs cleanly and resolves rollbar@4.0.0.

Checklists

Development

  • Lint rules pass locally
  • The code changed/added as part of this pull request has been covered with tests (metadata-only change, nothing to test)
  • All tests related to the changed code pass in development

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@linear-code

linear-code Bot commented Oct 6, 2026

Copy link
Copy Markdown

SDK-764

@brianr
brianr marked this pull request as ready for review October 6, 2026 05:44
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-06T05:46:22.361910Z bc67f31 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

devtools-agent Bot pushed a commit to rollbar/rollbar.js that referenced this pull request Oct 6, 2026
@rollbar/react@1.1.0, the latest on npm, declares a rollbar peer range of
"^2.26.4 || ^3.0.0-alpha.3", so npm install in the React examples fails
with ERESOLVE against rollbar 4.0.0. That broke Validate examples and
Build example apps for browser tests on every CI leg.

Override @rollbar/react's rollbar dependency to the example's own
rollbar ($rollbar, i.e. the local tarball) so npm resolves a single
rollbar@4.0.0. The real fix is rollbar/rollbar-react#174 plus a new
@rollbar/react release; these overrides can be dropped once that ships.

Linear: SDK-764

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@devtools-agent devtools-agent Bot mentioned this pull request Oct 6, 2026
1 task done
@rollbar-circleci-machine

Copy link
Copy Markdown
Contributor

AI Agent Review LGTM (openai, openai-astra)

LGTM. No blocking findings were found.

Review: allow rollbar 4.x as a peer dependency

The change is small and consistent with itself. package.json:110 and the root entry at package-lock.json:65 both now read "rollbar": "^2.26.4 || ^3.0.0-alpha.3 || ^4.0.0". The lockfile root entry matches the manifest, so the lockfile hasn't drifted.

How this package touches the peer:

  • Runtime: src/provider.js:5,63,69 imports the default export and calls new ctor(options). src/utils.js:24-26 spots an existing instance by instance.options.accessToken. src/history-context.js:8-11,37 checks for and calls rollbar.configure(...). The src/hooks/use-rollbar-logs.js helpers call level methods on the instance.
  • Types: index.d.ts:8,29,50-58,69-70 uses the default export plus the Rollbar.Configuration and Rollbar.Callback namespace types.

Not verified (no findings raised): the installed rollbar is 3.1.0 (node_modules/rollbar/package.json:3). No rollbar 4.x copy is available, so I couldn't confirm that 4.x keeps the same default export, options.accessToken, configure(), or Rollbar.Configuration/Rollbar.Callback type surface. I'm not claiming any incompatibility.

Test coverage note: nothing in this repo runs against rollbar 4.x:

  • The devDependency is still rollbar: ^3.1.0 (package.json:97, package-lock.json:52).
  • Every example pins rollbar: ^3.1.0 (for example examples/typescript/package.json:12 and examples/nextjs/package.json:18).
  • .github/workflows/ci.yaml:19-28 varies only the Node/npm versions, not the rollbar version.

The typecheck, unit tests and example tests therefore still run only against 3.x, and the 4.x support this PR advertises isn't checked automatically. Consider bumping the devDependency to 4.x, or adding a CI job that installs rollbar@4 and runs npm run typecheck and npm test, before or after merging.

This PR doesn't show whether any tests passed.

@brianr
brianr merged commit 0cc07e4 into main Oct 6, 2026
4 checks passed
@devtools-agent devtools-agent Bot mentioned this pull request Oct 8, 2026
1 task done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants