Skip to content

chore: bump Starknet.js to 9.4.2 - #526

Merged
MartianGreed merged 1 commit into
mainfrom
ponderingdemocritus/starknetjs-bump
Apr 22, 2026
Merged

MartianGreed merged 1 commit into
mainfrom
ponderingdemocritus/starknetjs-bump

Conversation

@ponderingdemocritus

@ponderingdemocritus ponderingdemocritus commented Apr 20, 2026 •

Copy link
Copy Markdown
Contributor

Closes #

Introduced changes

  • Bumps the workspace Starknet.js catalog to ^9.4.2, refreshes adjacent Starknet packages, and updates bun.lock.
  • Pins starknet through package-manager overrides because stable @starknet-react/core still advertises a v8 peer range.
  • Updates create-dojo generated React app dependencies, dependency docs, and adds a minor Changeset.

Checklist

  • Linked relevant issue
  • Updated relevant documentation
  • Added relevant tests
  • Add a dedicated CI job for new examples
  • Performed self-review of the code

Note

Medium Risk
Medium risk because this is a major-version upgrade of starknet and related wallet/type packages, which can introduce runtime/API incompatibilities across all consumers. Added package-manager overrides to force-install v9 may mask upstream peer-range conflicts until dependencies (notably @starknet-react/core) update.

Overview
Updates the monorepo to target Starknet.js v9.4.2 by bumping the workspace starknet catalog/ranges and refreshing adjacent Starknet ecosystem deps (@starknet-react/*, @starknet-io/*), with the corresponding bun.lock churn.

Adds package-manager overrides (root and in create-dojo generated apps, including pnpm.overrides) to pin starknet to v9 despite @starknet-react/core still declaring a v8 peer range, and updates the React app generator to include the needed Starknet React peer deps (e.g. get-starknet-core).

Introduces a changeset marking multiple @dojoengine/* packages for minor releases and updates dependency documentation to reflect the new Starknet.js baseline.

Reviewed by Cursor Bugbot for commit 197ba4e. Bugbot is set up for automated code reviews on this repo. Configure here.

Summary by CodeRabbit

  • Chores

    • Updated Starknet.js to v9.4.2 (previously v8.1.2)
    • Updated Starknet React packages to v5.0.3
    • Updated related Starknet ecosystem package versions
    • Generated client applications now include latest dependency versions
  • Documentation

    • Updated external dependency version references

@coderabbitai

coderabbitai Bot commented Apr 20, 2026 •

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

This pull request updates Starknet.js dependencies from v8 to v9 across the monorepo. Changes include updating the workspace catalog and package overrides in the root package.json, documenting the update in a Changesets entry and CLAUDE.md, and updating generated client-app templates to reference the new Starknet versions with proper override configurations.

Changes

Cohort / File(s) Summary
Configuration & Metadata
.changeset/starknet-v9-support.md, CLAUDE.md
Added Changesets entry documenting Starknet.js upgrade to v9.4.2 and updated external dependencies documentation.
Root Package Configuration
package.json
Updated workspace catalog with starknet v9.4.2, bumped @starknet-react/* packages to v5.0.3, upgraded @starknet-io/get-starknet-core to 4.0.8, and added top-level overrides forcing starknet to v9.4.2 to align with @starknet-react/core expectations.
Template Generation
packages/create-dojo/src/generators/client-app.ts
Updated generated client-app package.json to include starknet v9.4.2, bump React Starknet packages to v5.0.3, add get-starknet-core v4.0.0, and configure overrides for consistent dependency resolution.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 Ears perked with delight
Nine is the number, eight takes flight,
Starknet.js upgraded bright!
Overrides align the way,
Dependencies dance and sway,
Dojo's future burns today! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the primary change: upgrading Starknet.js to version 9.4.2 across the workspace.
Description check ✅ Passed The description covers key changes, includes a detailed overview, and acknowledges risks, but the issue reference field is empty and the checklist is only partially completed.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ponderingdemocritus/starknetjs-bump

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
packages/create-dojo/src/generators/client-app.ts (1)

44-51: Reduce version-drift risk by centralizing the new version literals.

These new dependency versions are repeated across the same function. A local constant map keeps future bumps safer and less error-prone.

♻️ Suggested refactor
 async function createPackageJson(config: ProjectConfig) {
     const { projectName, projectPath, framework, additionalDeps } = config;
     const versions = await getLatestDojoVersions();
+    const STARKNET_VERSION = "^9.4.2";
+    const STARKNET_REACT_VERSION = "^5.0.3";
+    const GET_STARKNET_CORE_VERSION = "^4.0.0";
 
     const packageJson: any = {
@@
         overrides: {
-            starknet: "^9.4.2",
+            starknet: STARKNET_VERSION,
         },
         pnpm: {
             overrides: {
-                starknet: "^9.4.2",
+                starknet: STARKNET_VERSION,
             },
         },
@@
-            starknet: "^9.4.2",
+            starknet: STARKNET_VERSION,
@@
-                "@starknet-react/chains": "^5.0.3",
-                "@starknet-react/core": "^5.0.3",
-                "get-starknet-core": "^4.0.0",
+                "@starknet-react/chains": STARKNET_REACT_VERSION,
+                "@starknet-react/core": STARKNET_REACT_VERSION,
+                "get-starknet-core": GET_STARKNET_CORE_VERSION,
             };

Also applies to: 57-57, 73-75

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/create-dojo/src/generators/client-app.ts` around lines 44 - 51, The
repeated version literal "^9.4.2" appears in multiple places (the top-level
overrides and pnpm.overrides objects, and other nearby overrides), so extract a
small local constant map (e.g., const DEP_OVERRIDES = { starknet: "^9.4.2" }) at
the top of the function and replace all inline occurrences with references to
that map (use object spread or direct assignment into overrides and
pnpm.overrides). Update any other occurrences noted (the additional overrides
blocks) to read from the same constant so future bumps require a single change.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@packages/create-dojo/src/generators/client-app.ts`:
- Around line 44-51: The repeated version literal "^9.4.2" appears in multiple
places (the top-level overrides and pnpm.overrides objects, and other nearby
overrides), so extract a small local constant map (e.g., const DEP_OVERRIDES = {
starknet: "^9.4.2" }) at the top of the function and replace all inline
occurrences with references to that map (use object spread or direct assignment
into overrides and pnpm.overrides). Update any other occurrences noted (the
additional overrides blocks) to read from the same constant so future bumps
require a single change.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 73446c4c-df56-484e-b6ee-41e0df1d15be

📥 Commits

Reviewing files that changed from the base of the PR and between 7ce1b3b and 197ba4e.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (4)
  • .changeset/starknet-v9-support.md
  • CLAUDE.md
  • package.json
  • packages/create-dojo/src/generators/client-app.ts

@MartianGreed
MartianGreed merged commit b40f13f into main Apr 22, 2026
10 of 12 checks passed
@MartianGreed
MartianGreed deleted the ponderingdemocritus/starknetjs-bump branch April 22, 2026 08:50
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.

2 participants