diff --git a/.forgejo/workflows/syncandrelease.yml b/.forgejo/workflows/syncandrelease.yml
index 5915aad..87bf76e 100644
--- a/.forgejo/workflows/syncandrelease.yml
+++ b/.forgejo/workflows/syncandrelease.yml
@@ -1,4 +1,4 @@
-name: Sync
+name: Sync & Release
on:
workflow_dispatch:
@@ -6,11 +6,11 @@ on:
- cron: "10 0 * * *" # Runs at 00:10 UTC every day
jobs:
- sync:
- name: Sync
+ sync_and_release:
+ name: Sync & Release
runs-on: docker
container:
- image: ghcr.io/catthehacker/ubuntu:act-22.04
+ image: ghcr.io/catthehacker/ubuntu:act-24.04
steps:
- name: Checkout Repository
uses: actions/checkout@v4
@@ -36,18 +36,16 @@ jobs:
- name: Publish Luau Target
run: pesde publish -y
- - name: Manifest Switcharoo
+ # Much hacky, much evil
+ - name: Publish Roblox Target
run: |
mv pesde.toml pesde-luau.toml
mv pesde-rbx.toml pesde.toml
-
- - name: Publish Roblox Target
- run: pesde publish -y
-
- - name: Manifest Switcharoo
- run: |
+ pesde install
+ pesde publish -y
mv pesde.toml pesde-rbx.toml
mv pesde-luau.toml pesde.toml
+ pesde install
- name: Read Jecs Version
id: read_jecs_version
@@ -56,6 +54,7 @@ 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 }}
diff --git a/.luaurc b/.luaurc
index 07221f7..1d36832 100644
--- a/.luaurc
+++ b/.luaurc
@@ -1,8 +1,10 @@
-{
- "aliases": {
- "jecs": "jecs",
- "testkit": "test/testkit",
- "mirror": "mirror"
- },
- "languageMode": "strict"
-}
+{
+ "aliases": {
+ "jecs": "jecs",
+ "testkit": "tools/testkit",
+ "mirror": "mirror",
+ "tools": "tools",
+ "addons": "addons"
+ },
+ "languageMode": "strict"
+}
diff --git a/.lune/pull.luau b/.lune/pull.luau
index 08b9b55..3e50a31 100644
--- a/.lune/pull.luau
+++ b/.lune/pull.luau
@@ -87,7 +87,7 @@ local function download_list(list: { { path: string, output: string } })
end
download_list({
- { path = "jecs.luau", output = "init.luau" },
+ { path = "jecs.luau", output = "$" },
{ 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 = {
- "init.luau",
+ "jecs.luau",
"pesde.toml",
"README.md",
"CHANGELOG.md",
@@ -123,7 +123,7 @@ local pesde_manifest: types.pesde_manifest = {
target = {
environment = "luau",
- lib = "init.luau",
+ lib = "jecs.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 = {
- "init.luau",
+ "jecs.luau",
"pesde.toml",
"README.md",
"CHANGELOG.md",
@@ -149,8 +149,8 @@ local pesde_roblox_manifest: types.pesde_manifest = {
target = {
environment = "roblox",
- lib = "init.luau",
- build_files = { "init.luau" },
+ lib = "jecs.luau",
+ build_files = { "jecs.luau" },
},
indices = {
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 52f87cc..b880f62 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,205 +1,190 @@
-# Jecs Changelog
+# Changelog
-All notable changes to this project will be documented in this file.
+## Unreleased
-The format is based on [Keep a Changelog][kac], and this project adheres to
-[Semantic Versioning][semver].
-
-[kac]: https://keepachangelog.com/en/1.1.0/
-[semver]: https://semver.org/spec/v2.0.0.html
-
-## [Unreleased]
-
-- `[world]`:
- - 16% faster `world:get`
- - `world:has` no longer typechecks components after the 8th one.
-- `[typescript]`
-
- - Fixed Entity type to default to `undefined | unknown` instead of just `undefined`
-
-- `[query]`:
- - 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
-
-- `[world]`:
- - Changed `world:cleanup` to traverse a header type for graph edges. (Edit)
- - Fixed a regression that occurred when you call `world:set` following a `world:remove` using the same component
- - Remove explicit error in JECS_DEBUG for `world:target` when not applying an index parameter
-- `[typescript]` :
- - Fixed `world.set` with NoInfer
= Id
+type ecs_id_t (first: Id , second: Id ,
+
+ -- Inwards facing API for testing
+ ECS_ID = ECS_ENTITY_T_LO,
+ ECS_GENERATION_INC = ECS_GENERATION_INC,
+ ECS_GENERATION = ECS_GENERATION,
+ ECS_ID_IS_WILDCARD = ECS_ID_IS_WILDCARD,
+ ECS_ID_DELETE = ECS_ID_DELETE,
+ ECS_META_RESET = ECS_META_RESET,
+
+ IS_PAIR = (ECS_IS_PAIR :: any) :: (pair: Pair ) -> boolean,
+ ECS_PAIR_FIRST = ECS_PAIR_FIRST :: (pair: Pair ) -> Id ,
+ ECS_PAIR_SECOND = ECS_PAIR_SECOND :: (pair: Pair ) -> Id (world: World, pair: Pair ) -> Id ,
+ pair_second = (ecs_pair_second :: any) :: (world: World, pair: Pair ) -> Id