Skip to content

fix: attr tag local member expression closure#3188

Merged
LuLaValva merged 3 commits into
mainfrom
attr-tag-nested-loop-hoisting
May 14, 2026
Merged

fix: attr tag local member expression closure#3188
LuLaValva merged 3 commits into
mainfrom
attr-tag-nested-loop-hoisting

Conversation

@LuLaValva
Copy link
Copy Markdown
Member

Fixed an oversight where member expressions within an attr tag were not handled correctly.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 14, 2026

🦋 Changeset detected

Latest commit: eebd29e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@marko/runtime-tags Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 14, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: bf8f3723-341d-4393-8623-4baa3d5d221a

📥 Commits

Reviewing files that changed from the base of the PR and between 10313e5 and eebd29e.

⛔ Files ignored due to path filters (6)
  • packages/runtime-tags/src/__tests__/fixtures/at-tags-dynamic-and-static/__snapshots__/dom.expected/template.js is excluded by !**/__snapshots__/** and included by **
  • packages/runtime-tags/src/__tests__/fixtures/at-tags-dynamic/__snapshots__/dom.expected/template.js is excluded by !**/__snapshots__/** and included by **
  • packages/runtime-tags/src/__tests__/fixtures/at-tags-for-loop-param-closure/__snapshots__/dom.expected/template.js is excluded by !**/__snapshots__/** and included by **
  • packages/runtime-tags/src/__tests__/fixtures/at-tags-for-loop-param-intersection-closure/__snapshots__/dom.expected/template.js is excluded by !**/__snapshots__/** and included by **
  • packages/runtime-tags/src/__tests__/fixtures/local-closure-script/__snapshots__/dom.expected/template.js is excluded by !**/__snapshots__/** and included by **
  • packages/runtime-tags/src/__tests__/fixtures/native-tag-local-closures/__snapshots__/dom.expected/template.js is excluded by !**/__snapshots__/** and included by **
📒 Files selected for processing (1)
  • .changeset/hip-tables-teach.md
✅ Files skipped from review due to trivial changes (1)
  • .changeset/hip-tables-teach.md

Walkthrough

The PR changes attribute-tag translation to use getDeclaredBindingExpression when building referencedLocalClosures object properties in translate-attrs.ts, replacing the previous manual construction and adjusting the to-object-property import. It adds a Marko fixture template demonstrating a Child component that iterates with dynamic component tags and uses a local member-expression closure, plus a TypeScript test fixture exporting a config object. A changeset was added to bump @marko/runtime-tags with the note “Attr tag local member expression hoists”.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically summarizes the main change: fixing a bug with member expressions in attr tags.
Description check ✅ Passed The description is directly related to the changeset, explaining that member expressions within attr tags were fixed.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch attr-tag-nested-loop-hoisting

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.75%. Comparing base (ceb9d27) to head (eebd29e).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3188      +/-   ##
==========================================
- Coverage   92.75%   92.75%   -0.01%     
==========================================
  Files         371      371              
  Lines       47296    47293       -3     
  Branches     3376     3376              
==========================================
- Hits        43868    43865       -3     
  Misses       3396     3396              
  Partials       32       32              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@LuLaValva LuLaValva merged commit 78a15b7 into main May 14, 2026
11 checks passed
@LuLaValva LuLaValva deleted the attr-tag-nested-loop-hoisting branch May 14, 2026 21:48
@github-actions github-actions Bot mentioned this pull request May 14, 2026
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