Releases: dojoengine/dojo.js
v1.0.0-alpha.24
What's Changed
- feat: add some documentation details by @MartianGreed in #290
- feat: add docs build: by @ponderingdemocritus in #291
- feat: docs theme and build by @ponderingdemocritus in #292
- feat: optimistic example by @ponderingdemocritus in #293
- fix: create-dojo by @ponderingdemocritus in #297
- fix: prettier by @ponderingdemocritus in #298
- fix: revert by @ponderingdemocritus in #300
- fix: recs tests by @ponderingdemocritus in #301
- fix: tests, improvements by @ponderingdemocritus in #302
- feat: Torii upgrade by @ponderingdemocritus in #303
- fix: types by @ponderingdemocritus in #304
- fix: constants by @ponderingdemocritus in #305
- feat: c version by @ponderingdemocritus in #306
- fix: type build by @ponderingdemocritus in #307
Full Changelog: v1.0.0-alpha.17...v1.0.0-alpha.24
v1.0.0-alpha.17
What's Changed
- feat: draft zustand state management system by @ponderingdemocritus in #280
- feat: update for better clause by @ponderingdemocritus in #283
- feat: state fix by @ponderingdemocritus in #284
- feat: add kitchen sink example by @MartianGreed in #281
- feat: example by @ponderingdemocritus in #285
- feat: new readme by @ponderingdemocritus in #286
Full Changelog: v1.0.0-alpha.15...v1.0.0-alpha.17
v1.0.0-alpha.15
What's Changed
- feat: wasm, cleanup packages, adds event streaming by @ponderingdemocritus in #258
- fix: prettier by @ponderingdemocritus in #261
- fix: error on getEntitiesQuery by @cristianFleita in #262
- fix: set entites bug by @ponderingdemocritus in #263
- fix: separate model name and namespace on components generator by @rsodre in #265
- feat: sdk v2 by @ponderingdemocritus in #266
- fix: submodule by @ponderingdemocritus in #272
- fix: bot versioning by @ponderingdemocritus in #274
- fix: bump by @ponderingdemocritus in #276
- fix: prettier by @ponderingdemocritus in #277
- fix: lerna by @ponderingdemocritus in #278
New Contributors
- @cristianFleita made their first contribution in #262
Full Changelog: v1.0.0-alpha.6...v1.0.0-alpha.15
v1.0.0-alpha.12
What's Changed
- feat: wasm, cleanup packages, adds event streaming by @ponderingdemocritus in #258
- fix: prettier by @ponderingdemocritus in #261
- fix: error on getEntitiesQuery by @cristianFleita in #262
- fix: set entites bug by @ponderingdemocritus in #263
- fix: separate model name and namespace on components generator by @rsodre in #265
- fix: sync by @ponderingdemocritus in #264
New Contributors
- @cristianFleita made their first contribution in #262
Full Changelog: v1.0.0-alpha.6...v1.0.0-alpha.12
v1.0.0-alpha.6
What's Changed
- Nodejs wasm by @ponderingdemocritus in #257
Full Changelog: v1.0.0-alpha.5...v1.0.0-alpha.6
v1.0.0-alpha.5
What's Changed
- docs: document sozo bindgen by @MartianGreed in #251
- feat: allow wasm in nodejs by @ponderingdemocritus in #253
- fix: wasm not included in bundle by @ponderingdemocritus in #254
- fix: fix by @ponderingdemocritus in #255
- fix: wasm build issues by @ponderingdemocritus in #256
Full Changelog: v1.0.0-alpha.1...v1.0.0-alpha.5
v1.0.0-alpha.1
Full Changelog: v1.0.0-alpha.1...v1.0.0-alpha.1
v1.0.0-alpha.0
Breaking Changes
Pre-release Features
This pre-release introduces some long-awaited features for testing. More features will be added in the lead-up to v1 release. We suggest you try these and provide feedback to be added into the main release.
TLDR:
getSyncEntities
now allows passing an array of clauses for specific state and fetching sync- New React hook
useQuerySync
allows easy fetching and syncing in React apps - Breaking change in the
execute
functions - Upgrade Starknet.js to latest version (previous versions were broken with latest Katana and Torii)
Torii Client Breaking Changes
Torii client must be created as follows. You no longer pass entities as the first parameter:
const toriiClient = await torii.createClient({
rpcUrl: config.rpcUrl,
toriiUrl: config.toriiUrl,
relayUrl: "",
worldAddress: config.manifest.world.address || "",
});
Getting and syncing entities introduces a Key Clause as the final parameter. Pass an empty array if you wish to fetch everything:
const sync = await getSyncEntities(
toriiClient,
contractComponents as any,
[]
);
If you pass in a query, it must match an array of EntityKeysClause
:
export type EntityKeysClause = { HashedKeys: string[] } | { Keys: KeysClause };
export interface KeysClause {
keys: (string | null)[];
models: string[];
pattern_matching: PatternMatching;
}
{
Keys: {
keys: [BigInt(account?.account.address).toString()],
models: ["Position", "Moves", "DirectionsAvailable"],
pattern_matching: "FixedLen",
},
}
React Updates
There is a new React hook called useQuerySync
which you can use to subscribe and sync specific parts of your app. This is very useful for large apps that wish to subscribe to only specific parts:
useQuerySync(toriiClient, contractComponents as any, [
{
Keys: {
keys: [BigInt(account?.account.address).toString()],
models: ["Position", "Moves", "DirectionsAvailable"],
pattern_matching: "FixedLen",
},
},
]);
Core Updates
Dojo v1 introduces the concept of namespaces. Read full release notes here.
With the introduction of namespaces, a new field has been added to the execute functions - this allows you to specify which namespace to call:
return await provider.execute(
account,
{
contractName: "actions",
entrypoint: "spawn",
calldata: [],
},
NAMESPACE
);
What's Changed
- feat: subscription clauses by @ponderingdemocritus in #235
Full Changelog: v0.7.10-alpha.0...v1.0.0-alpha.0
v0.7.10-alpha-0
Breaking changes
This pre-release introduces some long-awaited features for testing. It allows you to sync specific parts of your world defined by Keys.
Torii Client breaking changes
Torii client must be created like the following. You now longer pass in entities as a first parameter.
const toriiClient = await torii.createClient({
rpcUrl: config.rpcUrl,
toriiUrl: config.toriiUrl,
relayUrl: "",
worldAddress: config.manifest.world.address || "",
});
Getting and syncing entities introduces a Key Clause as the final parameter. Pass an undefined
if you wish to fetch everything.
const sync = await getSyncEntities(
toriiClient,
contractComponents as any,
undefined // syncs all entities
);
If you do pass in a query it has to match a EntitiesKeyClause
.
export type EntityKeysClause = { HashedKeys: string[] } | { Keys: KeysClause };
export interface KeysClause {
keys: (string | null)[];
pattern_matching: PatternMatching;
models: string[];
}
React updates
There is a new react hook called useQuerySync
which you can use to subscribe and sync specific parts of your app. This is very useful for large apps that wish to subscribe to only specific parts.
What's Changed
- fix: docs and example by @ponderingdemocritus in #231
- fix: locked snjs by @ponderingdemocritus in #234
- fix: added SRC acronym to create-components by @rsodre in #233
Full Changelog: v0.7.9...v0.7.10-alpha.0
v0.7.9
What's Changed
- feat: test cover state & provider by @ponderingdemocritus in #230
Full Changelog: v0.7.8...v0.7.9