Compare commits

..

No commits in common. "main" and "autoci+roblox-target" have entirely different histories.

8 changed files with 42 additions and 2806 deletions

View file

@ -1,4 +1,4 @@
name: Sync & Release
name: Sync
on:
workflow_dispatch:
@ -6,11 +6,11 @@ on:
- cron: "10 0 * * *" # Runs at 00:10 UTC every day
jobs:
sync_and_release:
name: Sync & Release
sync:
name: Sync
runs-on: docker
container:
image: ghcr.io/catthehacker/ubuntu:act-24.04
image: ghcr.io/catthehacker/ubuntu:act-22.04
steps:
- name: Checkout Repository
uses: actions/checkout@v4
@ -36,16 +36,18 @@ jobs:
- name: Publish Luau Target
run: pesde publish -y
# Much hacky, much evil
- name: Publish Roblox Target
- name: Manifest Switcharoo
run: |
mv pesde.toml pesde-luau.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-luau.toml pesde.toml
pesde install
- name: Read Jecs Version
id: read_jecs_version
@ -54,7 +56,6 @@ jobs:
echo "JECS_VERSION=$version" >> $GITHUB_OUTPUT
- name: Create Pull Request
id: create_pull_request
uses: https://git.devmarked.win/actions/create-pull-request@7174d368c2e4450dea17b297819eb28ae93ee645
with:
title: Sync to upstream Jecs ${{ steps.read_jecs_version.outputs.JECS_VERSION }}

View file

@ -1,10 +1,8 @@
{
"aliases": {
"jecs": "jecs",
"testkit": "tools/testkit",
"mirror": "mirror",
"tools": "tools",
"addons": "addons"
"testkit": "test/testkit",
"mirror": "mirror"
},
"languageMode": "strict"
}

View file

@ -87,7 +87,7 @@ local function download_list(list: { { path: string, output: string } })
end
download_list({
{ path = "jecs.luau", output = "$" },
{ path = "jecs.luau", output = "init.luau" },
{ path = ".luaurc", output = "$" },
{ path = "LICENSE", output = "$" },
{ path = "README.md", output = "$" },
@ -113,7 +113,7 @@ local pesde_manifest: types.pesde_manifest = {
repository = "https://git.devmarked.win/marked/jecs-pesde",
license = manifest.package.license,
includes = {
"jecs.luau",
"init.luau",
"pesde.toml",
"README.md",
"CHANGELOG.md",
@ -123,7 +123,7 @@ local pesde_manifest: types.pesde_manifest = {
target = {
environment = "luau",
lib = "jecs.luau",
lib = "init.luau",
},
indices = {
@ -139,7 +139,7 @@ local pesde_roblox_manifest: types.pesde_manifest = {
repository = "https://git.devmarked.win/marked/jecs-pesde",
license = manifest.package.license,
includes = {
"jecs.luau",
"init.luau",
"pesde.toml",
"README.md",
"CHANGELOG.md",
@ -149,8 +149,8 @@ local pesde_roblox_manifest: types.pesde_manifest = {
target = {
environment = "roblox",
lib = "jecs.luau",
build_files = { "jecs.luau" },
lib = "init.luau",
build_files = { "init.luau" },
},
indices = {

View file

@ -10,53 +10,30 @@ The format is based on [Keep a Changelog][kac], and this project adheres to
## [Unreleased]
## [0.6.0] - 2025-05-10
- `[world]`:
- Added `world:range` to restrict entity range
- Changed `world:entity` to accept the overload to create an entity at the desired id
- Changed `world:clear` to also look through the component record for the cleared `ID`
- 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.
- 16% faster `world:get`
- `world:has` no longer typechecks components after the 8th one.
- `[typescript]`
## [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]`:
- Added `query:cached`
- Adds query cache that updates itself when an archetype matching the query gets created or deleted.
- `[luau]`:
- Changed how entities' types are inferred with user-defined type functions
- Changed `Pair<First, Second>` to return `Second` if `First` is a `Tag`; otherwise, returns `First`.
## [0.4.0] - 2024-11-17
- `[world]`:
- Added recycling to `world:entity`
- If you see much larger entity ids, that is because its generation has been incremented
- `[query]`:
- Removed `query:drain`
- The default behaviour is simply to drain the iterator
- Removed `query:next`
- Just call the iterator function returned by `query:iter` directly if you want to get the next results
- 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.
- Fixed bug where `world:clear` did not invoke `jecs.OnRemove` hooks
- Changed `query.__iter` to drain on iteration
- It will initialize once wherever you left iteration off at last time
- Changed `query:iter` to restart the iterator
- 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
```lua
local it = world:query(A, B, C):iter()
local entity, a, b, c = it()
entity, a, b, c = it() -- get next results
```
- `[world`
- Fixed a bug with `world:clear` not invoking `jecs.OnRemove` hooks
- `[typescript]`:
- Changed pair to accept generics
- Improved handling of Tags
## [0.3.2] - 2024-10-01

2712
jecs.luau

File diff suppressed because it is too large Load diff

View file

@ -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"

View file

@ -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"

View file

@ -1,7 +1,7 @@
authors = ["jecs authors"]
description = "A minimal copy of jecs published on the official pesde registry"
includes = [
"jecs.luau",
"init.luau",
"pesde.toml",
"README.md",
"CHANGELOG.md",
@ -11,11 +11,11 @@ includes = [
license = "MIT"
name = "marked/jecs"
repository = "https://git.devmarked.win/marked/jecs-pesde"
version = "0.6.0"
version = "0.5.5"
[indices]
default = "https://github.com/pesde-pkg/index"
[target]
environment = "luau"
lib = "jecs.luau"
lib = "init.luau"