Compare commits
No commits in common. "main" and "autoci+roblox-target" have entirely different histories.
main
...
autoci+rob
8 changed files with 42 additions and 2806 deletions
|
@ -1,4 +1,4 @@
|
||||||
name: Sync & Release
|
name: Sync
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
@ -6,11 +6,11 @@ on:
|
||||||
- cron: "10 0 * * *" # Runs at 00:10 UTC every day
|
- cron: "10 0 * * *" # Runs at 00:10 UTC every day
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
sync_and_release:
|
sync:
|
||||||
name: Sync & Release
|
name: Sync
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
container:
|
container:
|
||||||
image: ghcr.io/catthehacker/ubuntu:act-24.04
|
image: ghcr.io/catthehacker/ubuntu:act-22.04
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Repository
|
- name: Checkout Repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
@ -36,16 +36,18 @@ jobs:
|
||||||
- name: Publish Luau Target
|
- name: Publish Luau Target
|
||||||
run: pesde publish -y
|
run: pesde publish -y
|
||||||
|
|
||||||
# Much hacky, much evil
|
- name: Manifest Switcharoo
|
||||||
- name: Publish Roblox Target
|
|
||||||
run: |
|
run: |
|
||||||
mv pesde.toml pesde-luau.toml
|
mv pesde.toml pesde-luau.toml
|
||||||
mv pesde-rbx.toml pesde.toml
|
mv pesde-rbx.toml pesde.toml
|
||||||
pesde install
|
|
||||||
pesde publish -y
|
- name: Publish Roblox Target
|
||||||
|
run: pesde publish -y
|
||||||
|
|
||||||
|
- name: Manifest Switcharoo
|
||||||
|
run: |
|
||||||
mv pesde.toml pesde-rbx.toml
|
mv pesde.toml pesde-rbx.toml
|
||||||
mv pesde-luau.toml pesde.toml
|
mv pesde-luau.toml pesde.toml
|
||||||
pesde install
|
|
||||||
|
|
||||||
- name: Read Jecs Version
|
- name: Read Jecs Version
|
||||||
id: read_jecs_version
|
id: read_jecs_version
|
||||||
|
@ -54,7 +56,6 @@ jobs:
|
||||||
echo "JECS_VERSION=$version" >> $GITHUB_OUTPUT
|
echo "JECS_VERSION=$version" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Create Pull Request
|
- name: Create Pull Request
|
||||||
id: create_pull_request
|
|
||||||
uses: https://git.devmarked.win/actions/create-pull-request@7174d368c2e4450dea17b297819eb28ae93ee645
|
uses: https://git.devmarked.win/actions/create-pull-request@7174d368c2e4450dea17b297819eb28ae93ee645
|
||||||
with:
|
with:
|
||||||
title: Sync to upstream Jecs ${{ steps.read_jecs_version.outputs.JECS_VERSION }}
|
title: Sync to upstream Jecs ${{ steps.read_jecs_version.outputs.JECS_VERSION }}
|
||||||
|
|
6
.luaurc
6
.luaurc
|
@ -1,10 +1,8 @@
|
||||||
{
|
{
|
||||||
"aliases": {
|
"aliases": {
|
||||||
"jecs": "jecs",
|
"jecs": "jecs",
|
||||||
"testkit": "tools/testkit",
|
"testkit": "test/testkit",
|
||||||
"mirror": "mirror",
|
"mirror": "mirror"
|
||||||
"tools": "tools",
|
|
||||||
"addons": "addons"
|
|
||||||
},
|
},
|
||||||
"languageMode": "strict"
|
"languageMode": "strict"
|
||||||
}
|
}
|
||||||
|
|
|
@ -87,7 +87,7 @@ local function download_list(list: { { path: string, output: string } })
|
||||||
end
|
end
|
||||||
|
|
||||||
download_list({
|
download_list({
|
||||||
{ path = "jecs.luau", output = "$" },
|
{ path = "jecs.luau", output = "init.luau" },
|
||||||
{ path = ".luaurc", output = "$" },
|
{ path = ".luaurc", output = "$" },
|
||||||
{ path = "LICENSE", output = "$" },
|
{ path = "LICENSE", output = "$" },
|
||||||
{ path = "README.md", output = "$" },
|
{ path = "README.md", output = "$" },
|
||||||
|
@ -113,7 +113,7 @@ local pesde_manifest: types.pesde_manifest = {
|
||||||
repository = "https://git.devmarked.win/marked/jecs-pesde",
|
repository = "https://git.devmarked.win/marked/jecs-pesde",
|
||||||
license = manifest.package.license,
|
license = manifest.package.license,
|
||||||
includes = {
|
includes = {
|
||||||
"jecs.luau",
|
"init.luau",
|
||||||
"pesde.toml",
|
"pesde.toml",
|
||||||
"README.md",
|
"README.md",
|
||||||
"CHANGELOG.md",
|
"CHANGELOG.md",
|
||||||
|
@ -123,7 +123,7 @@ local pesde_manifest: types.pesde_manifest = {
|
||||||
|
|
||||||
target = {
|
target = {
|
||||||
environment = "luau",
|
environment = "luau",
|
||||||
lib = "jecs.luau",
|
lib = "init.luau",
|
||||||
},
|
},
|
||||||
|
|
||||||
indices = {
|
indices = {
|
||||||
|
@ -139,7 +139,7 @@ local pesde_roblox_manifest: types.pesde_manifest = {
|
||||||
repository = "https://git.devmarked.win/marked/jecs-pesde",
|
repository = "https://git.devmarked.win/marked/jecs-pesde",
|
||||||
license = manifest.package.license,
|
license = manifest.package.license,
|
||||||
includes = {
|
includes = {
|
||||||
"jecs.luau",
|
"init.luau",
|
||||||
"pesde.toml",
|
"pesde.toml",
|
||||||
"README.md",
|
"README.md",
|
||||||
"CHANGELOG.md",
|
"CHANGELOG.md",
|
||||||
|
@ -149,8 +149,8 @@ local pesde_roblox_manifest: types.pesde_manifest = {
|
||||||
|
|
||||||
target = {
|
target = {
|
||||||
environment = "roblox",
|
environment = "roblox",
|
||||||
lib = "jecs.luau",
|
lib = "init.luau",
|
||||||
build_files = { "jecs.luau" },
|
build_files = { "init.luau" },
|
||||||
},
|
},
|
||||||
|
|
||||||
indices = {
|
indices = {
|
||||||
|
|
63
CHANGELOG.md
63
CHANGELOG.md
|
@ -10,53 +10,30 @@ The format is based on [Keep a Changelog][kac], and this project adheres to
|
||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
## [0.6.0] - 2025-05-10
|
|
||||||
|
|
||||||
- `[world]`:
|
- `[world]`:
|
||||||
- Added `world:range` to restrict entity range
|
- 16% faster `world:get`
|
||||||
- Changed `world:entity` to accept the overload to create an entity at the desired id
|
- `world:has` no longer typechecks components after the 8th one.
|
||||||
- Changed `world:clear` to also look through the component record for the cleared `ID`
|
- `[typescript]`
|
||||||
- Removes the cleared ID from every entity that has it
|
|
||||||
- Changed entity ID layouts by putting the index in the lower bits, which should make every world function 1-5 nanoseconds faster
|
|
||||||
- Fixed `world:delete` not removing every pair with an unalive target
|
|
||||||
- Specifically happened when you had at least two pairs of different relations with multiple targets each
|
|
||||||
- `[hooks]`:
|
|
||||||
- Replaced `OnSet` with `OnChange`
|
|
||||||
- The former was used to detect emplace/move actions. Now the behaviour for `OnChange` is that it will run only when the value has changed
|
|
||||||
- Changed `OnAdd` to specifically run after the data has been set for non-zero-sized components. Also returns the value that the component was set to
|
|
||||||
- This should allow a more lenient window for modifying data
|
|
||||||
- Changed `OnRemove` to lazily lookup which archetype the entity will move to
|
|
||||||
- Can now have interior structural changes within `OnRemove` hooks
|
|
||||||
- Optimized `world:has` for both single component and multiple component presence.
|
|
||||||
- This comes at the cost that it cannot check the component presence for more than 4 components at a time. If this is important, consider calling to this function multiple times.
|
|
||||||
|
|
||||||
## [0.5.0] - 2024-12-26
|
- Fixed Entity type to default to `undefined | unknown` instead of just `undefined`
|
||||||
|
|
||||||
- `[world]`:
|
|
||||||
- Fixed `world:target` not giving adjacent pairs
|
|
||||||
- Added `world:each` to find entities with a specific Tag
|
|
||||||
- Added `world:children` to find children of entity
|
|
||||||
- `[query]`:
|
- `[query]`:
|
||||||
- Added `query:cached`
|
- Fixed bug where `world:clear` did not invoke `jecs.OnRemove` hooks
|
||||||
- Adds query cache that updates itself when an archetype matching the query gets created or deleted.
|
- Changed `query.__iter` to drain on iteration
|
||||||
- `[luau]`:
|
- It will initialize once wherever you left iteration off at last time
|
||||||
- Changed how entities' types are inferred with user-defined type functions
|
- Changed `query:iter` to restart the iterator
|
||||||
- Changed `Pair<First, Second>` to return `Second` if `First` is a `Tag`; otherwise, returns `First`.
|
- Removed `query:drain` and `query:next`
|
||||||
|
- If you want to get individual results outside of a for-loop, you need to call `query:iter` to initialize the iterator and then call the iterator function manually
|
||||||
## [0.4.0] - 2024-11-17
|
```lua
|
||||||
|
local it = world:query(A, B, C):iter()
|
||||||
- `[world]`:
|
local entity, a, b, c = it()
|
||||||
- Added recycling to `world:entity`
|
entity, a, b, c = it() -- get next results
|
||||||
- If you see much larger entity ids, that is because its generation has been incremented
|
```
|
||||||
- `[query]`:
|
- `[world`
|
||||||
- Removed `query:drain`
|
- Fixed a bug with `world:clear` not invoking `jecs.OnRemove` hooks
|
||||||
- The default behaviour is simply to drain the iterator
|
- `[typescript]`:
|
||||||
- Removed `query:next`
|
- Changed pair to accept generics
|
||||||
- Just call the iterator function returned by `query:iter` directly if you want to get the next results
|
- Improved handling of Tags
|
||||||
- Removed `query:replace`
|
|
||||||
- `[luau]`:
|
|
||||||
- Fixed `query:archetypes` not taking `self`
|
|
||||||
- Changed so that the `jecs.Pair` type now returns the first element's type so you won't need to typecast anymore.
|
|
||||||
|
|
||||||
## [0.3.2] - 2024-10-01
|
## [0.3.2] - 2024-10-01
|
||||||
|
|
||||||
|
|
|
@ -1,22 +0,0 @@
|
||||||
authors = ["jecs authors"]
|
|
||||||
description = "A minimal copy of jecs published on the official pesde registry"
|
|
||||||
includes = [
|
|
||||||
"jecs.luau",
|
|
||||||
"pesde.toml",
|
|
||||||
"README.md",
|
|
||||||
"CHANGELOG.md",
|
|
||||||
"LICENSE",
|
|
||||||
".luaurc",
|
|
||||||
]
|
|
||||||
license = "MIT"
|
|
||||||
name = "marked/jecs"
|
|
||||||
repository = "https://git.devmarked.win/marked/jecs-pesde"
|
|
||||||
version = "0.6.0"
|
|
||||||
|
|
||||||
[indices]
|
|
||||||
default = "https://github.com/pesde-pkg/index"
|
|
||||||
|
|
||||||
[target]
|
|
||||||
build_files = ["jecs.luau"]
|
|
||||||
environment = "roblox"
|
|
||||||
lib = "jecs.luau"
|
|
|
@ -1,6 +0,0 @@
|
||||||
# This file is automatically @generated by pesde.
|
|
||||||
# It is not intended for manual editing.
|
|
||||||
format = 1
|
|
||||||
name = "marked/jecs"
|
|
||||||
version = "0.6.0"
|
|
||||||
target = "luau"
|
|
|
@ -1,7 +1,7 @@
|
||||||
authors = ["jecs authors"]
|
authors = ["jecs authors"]
|
||||||
description = "A minimal copy of jecs published on the official pesde registry"
|
description = "A minimal copy of jecs published on the official pesde registry"
|
||||||
includes = [
|
includes = [
|
||||||
"jecs.luau",
|
"init.luau",
|
||||||
"pesde.toml",
|
"pesde.toml",
|
||||||
"README.md",
|
"README.md",
|
||||||
"CHANGELOG.md",
|
"CHANGELOG.md",
|
||||||
|
@ -11,11 +11,11 @@ includes = [
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
name = "marked/jecs"
|
name = "marked/jecs"
|
||||||
repository = "https://git.devmarked.win/marked/jecs-pesde"
|
repository = "https://git.devmarked.win/marked/jecs-pesde"
|
||||||
version = "0.6.0"
|
version = "0.5.5"
|
||||||
|
|
||||||
[indices]
|
[indices]
|
||||||
default = "https://github.com/pesde-pkg/index"
|
default = "https://github.com/pesde-pkg/index"
|
||||||
|
|
||||||
[target]
|
[target]
|
||||||
environment = "luau"
|
environment = "luau"
|
||||||
lib = "jecs.luau"
|
lib = "init.luau"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue