Skip to content

fix(fast-element): avoid mutating render template bindings#7552

Draft
janechu wants to merge 1 commit into
releases/fast-element-v3from
users/janechu/render-binding-adapter
Draft

fix(fast-element): avoid mutating render template bindings#7552
janechu wants to merge 1 commit into
releases/fast-element-v3from
users/janechu/render-binding-adapter

Conversation

@janechu
Copy link
Copy Markdown
Collaborator

@janechu janechu commented May 29, 2026

Pull Request

📖 Description

  • Avoid mutating caller-owned template Binding instances passed to render().
  • Preserve string, node, and template resolution by adapting the binding used internally by the render directive.
  • Add regression coverage for reusing the same template binding across different render data bindings.

👩‍💻 Reviewer Notes

Please focus review on the render() template binding adapter behavior.

📑 Test Plan

  • npx biome check packages\fast-element\src\templating\render.ts packages\fast-element\src\templating\render-binding.pw.spec.ts change\@microsoft-fast-element-2613f3cc-434d-4262-96ad-f1ab70e28a86.json
  • npm run build:tsc -w @microsoft/fast-element && npm run build:rollup -w @microsoft/fast-element && npm run build:sizes -w @microsoft/fast-element
  • npx playwright test --project=chromium -g "does not mutate a provided template binding" from packages\fast-element
  • npx playwright test --project=chromium -g "The render" from packages\fast-element
  • npx beachball check --branch origin/releases/fast-element-v3 --scope "!sites/*" --changehint "Run 'npm run change' to generate a change file"

✅ Checklist

General

  • I have included a change request file using $ npm run change
  • I have added tests for my changes.
  • I have tested my changes.
  • I have updated the project documentation to reflect my changes.
  • I have read the CONTRIBUTING documentation and followed the standards for this project.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant