Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,8 @@
"miniplex": "0.10.5",
"miniplex-react": "0.4.1"
},
"changesets": []
"changesets": [
"heavy-books-float",
"wise-islands-exercise"
]
}
8 changes: 8 additions & 0 deletions packages/miniplex-react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 1.0.0-next.0

### Patch Changes

- Updated dependencies [b8b2c9b]
- Updated dependencies [4d9e51b]
- [email protected]

## 0.4.1

### Patch Changes
Expand Down
6 changes: 3 additions & 3 deletions packages/miniplex-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"hooks"
],
"sideEffects": false,
"version": "0.4.1",
"version": "1.0.0-next.0",
"main": "dist/miniplex-react.cjs.js",
"module": "dist/miniplex-react.esm.js",
"types": "dist/miniplex-react.cjs.d.ts",
Expand All @@ -28,7 +28,7 @@
],
"license": "MIT",
"devDependencies": {
"miniplex": "^0.10.0",
"miniplex": "^0.11.0-next.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand All @@ -37,7 +37,7 @@
"react-merge-refs": "^1.1.0"
},
"peerDependencies": {
"miniplex": ">=0.9.0",
"miniplex": ">=0.11.0-next.0",
"react": ">=16.8"
}
}
26 changes: 26 additions & 0 deletions packages/miniplex/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,31 @@
# miniplex

## 0.11.0-next.0

### Minor Changes

- b8b2c9b: **Breaking Change:** The API signature of `createEntity` has been simplified in order to improve clarity of the API and reduce complexity in both implementation and types. `createEntity` now only supports a single argument, which _must_ satisfy the world's entity type.

This will only affect you if you have been using `createEntity` with more than one argument in order to compose entities from partial entities, like so:

```js
const entity = createEntity(position(0, 0), velocity(1, 1), health(100))
```

This always had the issue of `createEntity` not checking the initial state of the entity against the world's entity type. Theoretically, the library could invest some additional effort into complex type assembly to ensure that the entity is valid, but there are enough object composition tools available already, so it felt like an unneccessary duplication.

Instead, composition is now deferred into userland, where one of the most simple tools is the spread operator:

```js
const entity = createEntity({
...position(0, 0),
...velocity(1, 1),
...health(100)
})
```

- 4d9e51b: **Breaking Change:** Removed the `EntityID` and `ComponentData` types.

## 0.10.5

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/miniplex/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"state-management"
],
"sideEffects": false,
"version": "0.10.5",
"version": "0.11.0-next.0",
"main": "dist/miniplex.cjs.js",
"module": "dist/miniplex.esm.js",
"types": "dist/miniplex.cjs.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.