aieventjs 0.3.1 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +3 -2
- package/README_ZHTW.md +2 -2
- package/llms-full.txt +14 -2
- package/package.json +3 -4
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -10,13 +10,13 @@
|
|
|
10
10
|
|
|
11
11
|
Part of the [ai\*js micro-runtime ecosystem](https://github.com/yshengliao) — see also [aifsmjs](https://github.com/yshengliao/aifsmjs) (FSM), [aiecsjs](https://github.com/yshengliao/aiecsjs) (ECS), [aibridgejs](https://github.com/yshengliao/aibridgejs) (cross-context RPC), [aipooljs](https://github.com/yshengliao/aipooljs) (object pool), [aiquadtreejs](https://github.com/yshengliao/aiquadtreejs) (spatial partitioning), and [aiaudiojs](https://github.com/yshengliao/aiaudiojs) (Web Audio shell).
|
|
12
12
|
|
|
13
|
-
> **Status: 0.
|
|
13
|
+
> **Status: 0.5.0.** Full implementation shipped; all methods are live. Coverage ≥ 95/90/100/100; ~1050 B gzip (budget 1100 B).
|
|
14
14
|
|
|
15
15
|
---
|
|
16
16
|
|
|
17
17
|
## Why aieventjs
|
|
18
18
|
|
|
19
|
-
Why not just use `mitt`? Honest answer: `mitt` is the right choice for many projects — it's MIT, ~282 B gzipped, and the API is genuinely well-shaped. We evaluated it and chose to write from scratch instead. Three reasons
|
|
19
|
+
Why not just use `mitt`? Honest answer: `mitt` is the right choice for many projects — it's MIT, ~282 B gzipped, and the API is genuinely well-shaped. We evaluated it and chose to write from scratch instead. Three reasons:
|
|
20
20
|
|
|
21
21
|
- **mitt has been unmaintained since 2023-07-04.** The PRs the community most wants — `unsubscribe`-returning `on()`, `AbortSignal`, `sideEffects: false`, nodenext compatibility — are all open and untouched. Forking would mean shipping a copy with our name on it; the upstream couldn't accept improvements back even if we wanted.
|
|
22
22
|
- **The implementation is ~35 lines of pure logic.** "Fork and improve" doesn't really exist at that size class — any non-trivial change is a rewrite, and the cost of carrying the upstream copyright notice exceeds the benefit.
|
|
@@ -148,6 +148,7 @@ Full JSDoc lives in [`src/index.ts`](src/index.ts).
|
|
|
148
148
|
| **0.0.1** | Scaffold landed — frozen API surface as a `throw` stub; full config + CI walk clean. |
|
|
149
149
|
| **0.1.0** | First npm release. `on` / `once` / `off` / `emit` / `clear` / `dispose` implemented; coverage ≥ 95/90/100/100; ≤ 800 B gzip (strict-TS overhead lands at ~747 B). |
|
|
150
150
|
| **0.3.0** | `captureHandlerErrors` + wildcard sampling/throttling. The v0.2 number was skipped to align with the four-package v0.3 release cohort. |
|
|
151
|
+
| **0.4.0** | Dependency hygiene + stability freeze: removed the unused `tsx` devDependency, aligned `fast-check` to `^4.8.0`, and froze the 0.3.x public surface for the 1.x line. No runtime API change; bundle byte-identical to 0.3.1. |
|
|
151
152
|
| **0.6+** | Async handler tracking (draft) — see [STABILITY.md](STABILITY.md). |
|
|
152
153
|
|
|
153
154
|
---
|
package/README_ZHTW.md
CHANGED
|
@@ -10,13 +10,13 @@
|
|
|
10
10
|
|
|
11
11
|
隸屬 [ai\*js micro-runtime 生態系](https://github.com/yshengliao) ─ 另見 [aifsmjs](https://github.com/yshengliao/aifsmjs)(FSM)、[aiecsjs](https://github.com/yshengliao/aiecsjs)(ECS)、[aibridgejs](https://github.com/yshengliao/aibridgejs)(cross-context RPC)、[aipooljs](https://github.com/yshengliao/aipooljs)(物件池)、[aiquadtreejs](https://github.com/yshengliao/aiquadtreejs)(空間分割)、[aiaudiojs](https://github.com/yshengliao/aiaudiojs)(Web Audio 薄殼)。
|
|
12
12
|
|
|
13
|
-
> **狀態:0.0
|
|
13
|
+
> **狀態:0.5.0。** 完整實作已上線、所有 method 皆可用。Coverage ≥ 95/90/100/100;~1050 B gzip(budget 1100 B)。
|
|
14
14
|
|
|
15
15
|
---
|
|
16
16
|
|
|
17
17
|
## 為什麼有 aieventjs
|
|
18
18
|
|
|
19
|
-
為什麼不直接用 `mitt`?老實說 `mitt` 對很多專案來說是正確選擇 ── MIT、~282 bytes gzip、API
|
|
19
|
+
為什麼不直接用 `mitt`?老實說 `mitt` 對很多專案來說是正確選擇 ── MIT、~282 bytes gzip、API 本身造型很好。我們評估過之後選擇自寫。三個理由:
|
|
20
20
|
|
|
21
21
|
- **mitt 自 2023-07-04 起停止維護。** 社群最想要的 PR ── `on()` 回傳 unsubscribe、`AbortSignal`、`sideEffects: false`、nodenext 相容 ── 全部 open 但沒人處理。fork 等於我們扛一份「上面寫人家名字」的副本,且就算改進了上游也接不回去。
|
|
22
22
|
- **實作是 ~35 行純邏輯。** 那種尺寸沒有「fork 然後改良」這回事 ── 任何非 trivial 修改都等於重寫;繼承上游 copyright notice 的成本超過效益。
|
package/llms-full.txt
CHANGED
|
@@ -23,13 +23,13 @@ The short index lives at `llms.txt` (see https://llmstxt.org/).
|
|
|
23
23
|
|
|
24
24
|
Part of the [ai\*js micro-runtime ecosystem](https://github.com/yshengliao) — see also [aifsmjs](https://github.com/yshengliao/aifsmjs) (FSM), [aiecsjs](https://github.com/yshengliao/aiecsjs) (ECS), [aibridgejs](https://github.com/yshengliao/aibridgejs) (cross-context RPC), [aipooljs](https://github.com/yshengliao/aipooljs) (object pool), [aiquadtreejs](https://github.com/yshengliao/aiquadtreejs) (spatial partitioning), and [aiaudiojs](https://github.com/yshengliao/aiaudiojs) (Web Audio shell).
|
|
25
25
|
|
|
26
|
-
> **Status: 0.
|
|
26
|
+
> **Status: 0.5.0.** Full implementation shipped; all methods are live. Coverage ≥ 95/90/100/100; ~1050 B gzip (budget 1100 B).
|
|
27
27
|
|
|
28
28
|
---
|
|
29
29
|
|
|
30
30
|
## Why aieventjs
|
|
31
31
|
|
|
32
|
-
Why not just use `mitt`? Honest answer: `mitt` is the right choice for many projects — it's MIT, ~282 B gzipped, and the API is genuinely well-shaped. We evaluated it and chose to write from scratch instead. Three reasons
|
|
32
|
+
Why not just use `mitt`? Honest answer: `mitt` is the right choice for many projects — it's MIT, ~282 B gzipped, and the API is genuinely well-shaped. We evaluated it and chose to write from scratch instead. Three reasons:
|
|
33
33
|
|
|
34
34
|
- **mitt has been unmaintained since 2023-07-04.** The PRs the community most wants — `unsubscribe`-returning `on()`, `AbortSignal`, `sideEffects: false`, nodenext compatibility — are all open and untouched. Forking would mean shipping a copy with our name on it; the upstream couldn't accept improvements back even if we wanted.
|
|
35
35
|
- **The implementation is ~35 lines of pure logic.** "Fork and improve" doesn't really exist at that size class — any non-trivial change is a rewrite, and the cost of carrying the upstream copyright notice exceeds the benefit.
|
|
@@ -161,6 +161,7 @@ Full JSDoc lives in [`src/index.ts`](src/index.ts).
|
|
|
161
161
|
| **0.0.1** | Scaffold landed — frozen API surface as a `throw` stub; full config + CI walk clean. |
|
|
162
162
|
| **0.1.0** | First npm release. `on` / `once` / `off` / `emit` / `clear` / `dispose` implemented; coverage ≥ 95/90/100/100; ≤ 800 B gzip (strict-TS overhead lands at ~747 B). |
|
|
163
163
|
| **0.3.0** | `captureHandlerErrors` + wildcard sampling/throttling. The v0.2 number was skipped to align with the four-package v0.3 release cohort. |
|
|
164
|
+
| **0.4.0** | Dependency hygiene + stability freeze: removed the unused `tsx` devDependency, aligned `fast-check` to `^4.8.0`, and froze the 0.3.x public surface for the 1.x line. No runtime API change; bundle byte-identical to 0.3.1. |
|
|
164
165
|
| **0.6+** | Async handler tracking (draft) — see [STABILITY.md](STABILITY.md). |
|
|
165
166
|
|
|
166
167
|
---
|
|
@@ -181,6 +182,17 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
|
181
182
|
|
|
182
183
|
## [Unreleased]
|
|
183
184
|
|
|
185
|
+
## [0.4.0] - 2026-05-29
|
|
186
|
+
|
|
187
|
+
Dependency hygiene + stability freeze. No runtime API addition; `dist/` is byte-identical to 0.3.1 (no `src/` change). Consumer-facing behaviour is unchanged.
|
|
188
|
+
|
|
189
|
+
### Changed
|
|
190
|
+
- Aligned the `fast-check` devDependency to `^4.8.0` (was `^3.23.0`), matching the newer ai*js family cohort. Test-only; never bundled; zero consumer impact.
|
|
191
|
+
- Declared the entire 0.3.x public API surface frozen for the 1.x line — see STABILITY.md. No signatures, error names, or default behaviours changed.
|
|
192
|
+
|
|
193
|
+
### Removed
|
|
194
|
+
- `tsx` devDependency — unused (no script, config, test, or CI step referenced it). Trims the lockfile subtree; no functional impact.
|
|
195
|
+
|
|
184
196
|
## [0.3.1] - 2026-05-29
|
|
185
197
|
### Added
|
|
186
198
|
- `test/emitter.prop.test.ts`: three fast-check property invariants — dispatch
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aieventjs",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Small, strict, typed event emitter — on() returns an unsubscribe function, once is built-in, AbortSignal is first-class, dispose() is idempotent, wildcard '*' handlers preserved. Mitt-shaped API; ai*js conventions everywhere else.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"event-emitter",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"typescript",
|
|
14
14
|
"esm"
|
|
15
15
|
],
|
|
16
|
-
"author": "
|
|
16
|
+
"author": "yshengliao",
|
|
17
17
|
"license": "MIT",
|
|
18
18
|
"homepage": "https://github.com/yshengliao/aieventjs#readme",
|
|
19
19
|
"repository": {
|
|
@@ -61,9 +61,8 @@
|
|
|
61
61
|
"@biomejs/biome": "^1.9.0",
|
|
62
62
|
"@types/node": "^22.0.0",
|
|
63
63
|
"@vitest/coverage-v8": "^4.1.7",
|
|
64
|
-
"fast-check": "^
|
|
64
|
+
"fast-check": "^4.8.0",
|
|
65
65
|
"tsup": "^8.3.0",
|
|
66
|
-
"tsx": "^4.22.3",
|
|
67
66
|
"typescript": "^5.6.0",
|
|
68
67
|
"vite": "^8.0.14",
|
|
69
68
|
"vitest": "^4.1.7"
|