-
Notifications
You must be signed in to change notification settings - Fork 54
chore: bump dojo.c + fix node worker #447
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThis update introduces a changeset for patch-level version bumps across multiple Changes
Sequence Diagram(s)No sequence diagram is generated since the changes are limited to version bumps, formatting, and minor refactoring without affecting control flow or introducing new features. Possibly related PRs
Poem
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (3)
.changeset/pretty-waves-listen.md (1)
15-15
: Refine the changeset summary for clarity.The summary "chore: bump dojo.c + fix node worker" is generic. Consider specifying the updated
dojo.c
commit hash and a concise description of the Node worker fix to improve traceability.examples/example-node-worker/package.json (1)
8-8
: Ensure Node flag compatibility and clean up script.
The--experimental-transform-types
flag is experimental (Node 20+)—verify your CI and deployment environments support it or consider using a stable loader likets-node/esm
. Also remove the trailing space aftermain.ts
to avoid shell parsing issues.examples/example-node-worker/main.ts (1)
18-23
: Avoid@ts-ignore
by augmenting global types.
Suppressing TS errors forglobal.Websocket
can be replaced by a.d.ts
declaration (e.g.declare global { var Websocket: typeof ws.w3cwebsocket }
) to improve type safety.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
.changeset/pretty-waves-listen.md
(1 hunks)examples/example-node-worker/main.ts
(3 hunks)examples/example-node-worker/package.json
(1 hunks)examples/example-node-worker/src/typescript/models.gen.ts
(1 hunks)examples/example-node-worker/tsconfig.json
(1 hunks)packages/torii-wasm/dojo.c
(1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
examples/example-node-worker/src/typescript/models.gen.ts (1)
packages/sdk/src/internal/types.ts (1)
SchemaType
(51-71)
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: build
- GitHub Check: check
🔇 Additional comments (15)
.changeset/pretty-waves-listen.md (1)
2-12
:✅ Verification successful
Verify package list completeness.
Ensure that the patch bump in this changeset covers exactly the packages whose versions were updated. Confirm that no package is omitted or unintentionally included.
🏁 Script executed:
#!/bin/bash # Verify version bumps in package.json for the listed packages for pkg in torii-wasm core create-burner create-dojo predeployed-connector react sdk state torii-client utils utils-wasm; do pkg_file=$(fd -e json "\"name\": \"@dojoengine/$pkg\"" .) echo "Checking $pkg_file" grep -n '"version":' "$pkg_file" doneLength of output: 3013
Additional check for package manifests—listing all
@dojoengine/*
entries and their versions:
🏁 Script executed:
#!/bin/bash # Find every package.json with a @dojoengine package name and show its version echo "Scanning for @dojoengine packages in package.json files..." for file in $(rg -l '"name": "@dojoengine/' -g '*/package.json'); do echo "File: $file" grep -n '"name": "@dojoengine/' "$file" grep -n '"version":' "$file" echo doneLength of output: 328
Let's locate every
@dojoengine
package manifest and list its version to ensure the changeset is complete:
🏁 Script executed:
#!/bin/bash echo "Scanning all package.json files for @dojoengine packages..." find . -type f -name package.json | while read file; do if grep -q '"name": "@dojoengine/' "$file"; then echo "File: $file" grep -n '"name": "@dojoengine/' "$file" grep -n '"version":' "$file" echo fi doneLength of output: 5910
Changeset package list verified.
All 11
@dojoengine/*
packages inpackages/
have a matching patch bump in.changeset/pretty-waves-listen.md
, and no additional or missing packages were found. No further action needed.packages/torii-wasm/dojo.c (1)
1-1
:✅ Verification successful
Verify the updated subproject commit hash
Ensure the new commitd7a863401b44ae9cb03c574efbaf2cd77d661ec3
actually exists in thedojo.c
repository and that the submodule pointer has been updated correctly.
🏁 Script executed:
#!/bin/bash # Verify the referenced commit exists in the dojo.c remote repository git ls-remote https://github.com/dojoengine/dojo.c.git \ | grep d7a863401b44ae9cb03c574efbaf2cd77d661ec3Length of output: 265
🏁 Script executed:
#!/bin/bash # Check the submodule commit pointer for dojo.c in the current branch git ls-tree HEAD packages/torii-wasm/dojo.cLength of output: 127
Submodule commit hash verified
The new commitd7a863401b44ae9cb03c574efbaf2cd77d661ec3
exists in the dojo.c remote repository and the submodule pointer inpackages/torii-wasm/dojo.c
is correctly set to that commit.examples/example-node-worker/tsconfig.json (1)
14-14
: Confirm removal ofallowImportingTsExtensions
.
Dropping this option requires that.ts
imports resolve correctly under--experimental-transform-types
. Validate all module imports succeed in the example environment.examples/example-node-worker/main.ts (2)
8-8
: Use type-only import forStandardizedQueryResult
.
This ensures it’s elided at runtime and avoids unnecessary module loading.
40-42
: VerifySigningKey
constructor adoption.
ReplacingSigningKey.fromSecretScalar
withnew SigningKey(env.SECRET_KEY)
matches the updated API. Ensure this yields identical key derivation and consider adding error handling for invalid secrets.examples/example-node-worker/src/typescript/models.gen.ts (10)
3-8
: Approvestarknet
imports.
The addition oftype BigNumberish
alongsideCairoCustomEnum
,CairoOption
, andCairoOptionVariant
imports is correct and supports typed numeric fields.
11-34
: Approve generated model interfaces.
The interfaces forDirectionsAvailable
,DirectionsAvailableValue
,Moves
, andMovesValue
accurately reflect the schema definitions.
36-42
: ApprovePosition
andVec2
interfaces.
ThePosition
andVec2
interfaces align with the underlying model structure.
54-56
: Auto-generatedPositionValue
interface matches the schema; no manual changes needed.
58-62
: TheVec2
interface is correct and requires no adjustments.
65-68
: TheMoved
interface aligns with the model definition.
71-73
: TheMovedValue
interface is correctly generated.
75-79
: Direction enum and related types look consistent with the schema.
81-85
:SchemaType
extension properly includes all namespace entries.
96-107
: Theschema
constant entries mirror the interfaces; only thePositionCount
andPositionCountValue
typos need correction as flagged above.Also applies to: 108-117, 118-123, 124-128, 129-132, 133-136, 137-139, 140-142, 143-146, 147-155, 156-163
export interface PositionCountValue { | ||
positition: Array<[BigNumberish, BigNumberish]>; | ||
positition: Array<[BigNumberish, BigNumberish]>; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo in PositionCountValue
property name.
The field positition
is misspelled; it should be position
for consistency.
--- a/examples/example-node-worker/src/typescript/models.gen.ts
+++ b/examples/example-node-worker/src/typescript/models.gen.ts
@@ -49,3 +49,3 @@ export interface PositionCountValue {
- positition: Array<[BigNumberish, BigNumberish]>;
+ position: Array<[BigNumberish, BigNumberish]>;
}
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
export interface PositionCountValue { | |
positition: Array<[BigNumberish, BigNumberish]>; | |
positition: Array<[BigNumberish, BigNumberish]>; | |
} | |
export interface PositionCountValue { | |
position: Array<[BigNumberish, BigNumberish]>; | |
} |
🤖 Prompt for AI Agents
In examples/example-node-worker/src/typescript/models.gen.ts at lines 49 to 51,
the property name `positition` in the `PositionCountValue` interface is
misspelled. Rename the property from `positition` to `position` to correct the
typo and maintain consistency.
export interface PositionCount { | ||
identity: string; | ||
positition: Array<[BigNumberish, BigNumberish]>; | ||
identity: string; | ||
positition: Array<[BigNumberish, BigNumberish]>; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo in PositionCount
property name.
The interface declares positition
but should be position
to match usage (m.position
) and the schema.
--- a/examples/example-node-worker/src/typescript/models.gen.ts
+++ b/examples/example-node-worker/src/typescript/models.gen.ts
@@ -43,3 +43,3 @@ export interface PositionCount {
identity: string;
- positition: Array<[BigNumberish, BigNumberish]>;
+ position: Array<[BigNumberish, BigNumberish]>;
}
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
export interface PositionCount { | |
identity: string; | |
positition: Array<[BigNumberish, BigNumberish]>; | |
identity: string; | |
positition: Array<[BigNumberish, BigNumberish]>; | |
} | |
export interface PositionCount { | |
identity: string; | |
position: Array<[BigNumberish, BigNumberish]>; | |
} |
🤖 Prompt for AI Agents
In examples/example-node-worker/src/typescript/models.gen.ts around lines 43 to
46, the interface PositionCount has a typo in the property name 'positition'.
Rename this property to 'position' to match the expected usage and schema
consistency.
Closes #
Introduced changes
Checklist
Summary by CodeRabbit
Chores
Style
Bug Fixes