chore(fast-html): use @microsoft/fast-build to build deep-merge fixture#7390
Draft
chore(fast-html): use @microsoft/fast-build to build deep-merge fixture#7390
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
5 tasks
janechu
added a commit
that referenced
this pull request
Apr 8, 2026
…ssions (#7394) # Pull Request ## 📖 Description Fixes two gaps in the `microsoft-fast-build` Rust renderer related to data access in template expressions: 1. **Array `.length` support** — `{{items.length}}` now resolves correctly. Previously, `get_nested_property` tried to parse `"length"` as a numeric array index, which always failed and returned a `MissingState` error. A special case now returns the array's length as a number. 2. **JSON literal attribute values** — Custom element attributes can now accept JSON array and object literals directly (e.g. `items='["a","b","c"]'` or `config='{"title":"Hello"}'`). Previously, these were passed through as raw strings, causing child templates that iterated or accessed nested values to fail. ### 🎫 Issues * Helps unblock [#7390](#7390) — deep-merge fixture uses `{{users.length}}` and `{{user.orders.length}}` * Helps unblock [#7388](#7388) — observer-map fixture uses `{{user.posts.length}}` ## 📑 Test Plan New Rust integration tests added: - `tests/bindings.rs` — `test_array_length`, `test_array_length_empty`, `test_array_length_nested` - `tests/f_when.rs` — `test_when_array_length_gt_zero`, `test_when_array_length_zero` - `tests/custom_elements.rs` — `test_custom_element_json_array_attr`, `test_custom_element_empty_array_attr`, `test_custom_element_json_object_attr` All existing and new tests pass (`cargo test`). ## ✅ Checklist ### General - [x] I have included a change request file using `$ npm run change` - [x] I have added tests for my changes. - [x] I have tested my changes. - [x] I have updated the project documentation to reflect my changes. - [x] I have read the [CONTRIBUTING](https://github.com/microsoft/fast/blob/main/CONTRIBUTING.md) documentation and followed the [standards](https://github.com/microsoft/fast/blob/main/CODE_OF_CONDUCT.md#our-standards) for this project.
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.
Uses
@microsoft/fast-buildto generate theindex.htmlfor thedeep-mergetest fixture in@microsoft/fast-html.