Repository navigation
Clarify binding boundary names - #10
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR clarifies naming at the JavaScript binding boundary by renaming internal binding types from Native* to Binding* and aligning “raw” read-only method names with the existing rawGet* convention, while keeping the public @taffyjs/node API surface unchanged.
Changes:
- Renamed the private N-API tree class from
NativeTaffyTreetoBindingTaffyTreeacross Rust, JS/TS, generated artifacts, and tests. - Renamed binding-layer error/result types from
NativeError/NativeResulttoBindingError/BindingResult. - Renamed read-only raw methods (e.g.
rawNodeCount) torawGet*equivalents and updated all call sites.
Reviewed changes
Copilot reviewed 27 out of 28 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tools/api-codegen/src/emit/tagged-values/rust.ts | Updates Rust codegen output to use BindingResult imports/signatures. |
| tests/taffyjs-node/tests/types/public-api.test-d.ts | Updates private-export assertions to reference BindingTaffyTree. |
| tests/taffyjs-node/tests/tree/constructor.test.mts | Ensures root module does not expose BindingTaffyTree. |
| packages/taffyjs-node/tests/native/style.test.mts | Updates internal binding class name and rawGetNodeCount usage in native tests. |
| packages/taffyjs-node/tests/native/numeric-families.test.mts | Updates internal binding class name and rawGetNodeCount usage in native tests. |
| packages/taffyjs-node/tests/native/numbers.test.mts | Updates internal binding class name and rawGetNodeCount usage in native tests. |
| packages/taffyjs-node/tests/native/length.test.mts | Updates internal binding class name and rawGetNodeCount usage in native tests. |
| packages/taffyjs-node/tests/native/grid.test.mts | Updates internal binding class name and rawGetNodeCount usage in native tests. |
| packages/taffyjs-node/tests/native/geometry.test.mts | Updates internal binding class name and rawGetNodeCount usage in native tests. |
| packages/taffyjs-node/tests/native/available-space.test.mts | Updates internal binding class name used by native tests. |
| packages/taffyjs-node/src/tree.ts | Switches wrapper to BindingTaffyTree and read-only rawGet* methods. |
| packages/taffyjs-node/src/binding.ts | Re-exports BindingTaffyTree from the generated binding module. |
| packages/taffyjs-node/index.js | Updates bundled runtime to use BindingTaffyTree and rawGet* methods. |
| packages/taffyjs-node/binding.js | Updates generated binding module exports to BindingTaffyTree. |
| packages/taffyjs-node/binding.d.ts | Updates generated type declarations to BindingTaffyTree and rawGet* methods. |
| crates/taffyjs_binding/src/tagged_values.rs | Migrates parsing helpers to return BindingResult and import it. |
| crates/taffyjs_binding/src/style.rs | Migrates style conversion helpers/collects to BindingResult. |
| crates/taffyjs_binding/src/owner.rs | Updates owner access wrapper to use BindingResult. |
| crates/taffyjs_binding/src/number.rs | Migrates number parsing helpers to BindingResult. |
| crates/taffyjs_binding/src/measure.rs | Renames error/failure variants to binding layer and uses BindingResult. |
| crates/taffyjs_binding/src/lib.rs | Renames exported N-API class to BindingTaffyTree and rawGet* JS method names. |
| crates/taffyjs_binding/src/length.rs | Migrates length parsers to BindingResult. |
| crates/taffyjs_binding/src/js_object.rs | Migrates object parsing helpers to BindingResult. |
| crates/taffyjs_binding/src/grid.rs | Migrates grid parsing helpers/collects to BindingResult. |
| crates/taffyjs_binding/src/geometry.rs | Migrates geometry parsing helpers to BindingResult. |
| crates/taffyjs_binding/src/error.rs | Renames binding-layer error and result types to BindingError/BindingResult. |
| crates/taffyjs_binding/src/available_space.rs | Migrates available-space parser to BindingResult. |
| .agents/docs/binding-cases.md | Updates documentation example to BindingTaffyTree. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
hyfdev
added a commit
that referenced
this pull request
Aug 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
NativeTaffyTreetoBindingTaffyTreerawGet*conventionWhy
The old
Native*names described where the code happened to run, while these types specifically belong to the JavaScript binding boundary. The read-only raw methods also used a different naming pattern from the rest of the raw API.Impact
This changes private binding internals only. The supported
@taffyjs/nodeexports and publicindex.d.tssurface remain unchanged.Validation
vp run codegenvp run ready(9 Rust unit tests, 45 native tests, 194 integration tests, types, formatting, lint, clippy, and release build)