Commit f7e9e75
fix(data): break equals/typed-buffer, aabb, and math/aabb circular imports (#111)
* fix(data): break three circular import cycles flagged by bundlers
- `equals.ts` and `typed-buffer/typed-buffer-equals.ts` are mutually
recursive (each calls the other for deep equality). Inline the
typed-buffer fast path into `equals.ts` and switch detection to a
duck-typed `__brand` check + `import type` of `ReadonlyTypedBuffer`,
so `equals.ts` has no runtime edge into `typed-buffer/`. The static
`TypedBuffer.equals` (public surface) keeps pointing at
`typedBufferEquals` unchanged.
- `math/aabb/face/from-position.ts` imported the `Aabb` namespace value
from the aabb barrel to reach `Aabb.center` / `Aabb.unit`, closing the
cycle `aabb/index → public → face/face → face/public → from-position →
aabb/index`. Switch to `import type { Aabb }` and pull `center` /
`unit` from their source files, per the namespace rule.
- `math/aabb/schema.ts` imported `Vec3` from the math barrel, closing
the cycle `math/index → aabb/index → public → schema → math/index`.
Switch to `../vec3/index.js` directly.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* bumped
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 8d6045d commit f7e9e75
16 files changed
Lines changed: 41 additions & 23 deletions
File tree
- packages
- data-lit-tictactoe
- data-lit-todo
- data-lit
- data-p2p-tictactoe
- data-persistence
- data-react-hello
- data-react-pixie
- data-react
- data-solid-dashboard
- data-solid
- data-sync
- data
- src
- math/aabb
- face
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
0 commit comments