Skip to content

Conversation

@rturnq
Copy link
Contributor

@rturnq rturnq commented Jan 30, 2026

No description provided.

@changeset-bot
Copy link

changeset-bot bot commented Jan 30, 2026

🦋 Changeset detected

Latest commit: b736b2b

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

@codecov
Copy link

codecov bot commented Jan 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.03%. Comparing base (c5c8778) to head (b736b2b).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3064      +/-   ##
==========================================
- Coverage   89.04%   89.03%   -0.02%     
==========================================
  Files         375      375              
  Lines       47452    47496      +44     
  Branches     4102     4128      +26     
==========================================
+ Hits        42254    42286      +32     
- Misses       5145     5158      +13     
+ Partials       53       52       -1     

☔ 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.

@coderabbitai
Copy link

coderabbitai bot commented Jan 30, 2026

Walkthrough

Refactors hoisting internals in packages/runtime-tags: replaces traverseAllHoisted with a new path-based traverse, adds _hoist_resume, changes _hoist to return an iterator-capable function, simplifies _el and internal walk logic, and updates branch/path wiring. Adds a $traverse entry to name-cache.json and lowers numeric metrics in .sizes.json. Converts many test fixtures to curried return handlers and two-step invocations, adds numerous hoist- and spread-related test fixtures and tests, and introduces three patch-level changeset files for @marko/runtime-tags.

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Description check ⚠️ Warning No description was provided by the author, making it impossible to assess whether it relates to the changeset. Add a pull request description explaining the changes, rationale, and any breaking changes or migration guidance if applicable.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title directly relates to the main changes: refactoring hoisting logic and unifying custom tag hoists with native tag refs across multiple test fixtures and runtime code.

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

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-spread-input

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

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In
`@packages/runtime-tags/src/__tests__/fixtures/controllable-checked-many/template.marko`:
- Line 1: Remove the unused Node-only import "import { console } from
\"node:inspector\";" from the template fixture so it no longer pulls in
Node-only APIs that break browser/DOM builds; locate the import statement
referencing "console" and "node:inspector" at the top of the file and delete
that line, leaving the rest of the template untouched.

In
`@packages/runtime-tags/src/__tests__/fixtures/controllable-checked-many/test.ts`:
- Around line 3-9: The helper functions click0 and click1 call .click() on
container.querySelectorAll("input").item(0/item(1)) without checking for null;
add an explicit guard in each function to check the result of .item(...) and
either throw a clear error (e.g., "expected input `#0` not found") or return
safely before calling .click(), so the test failure is explicit if the fixture
markup changes. Ensure you update both functions (click0 and click1).
🧹 Nitpick comments (1)
packages/runtime-tags/src/__tests__/fixtures/hoist-return-ref/test.ts (1)

1-5: Consider removing commented-out code.

The commented-out click function and additional steps could be removed if not needed for this test. If they're intended for future use, consider adding a TODO comment explaining the plan.

🧹 Proposed cleanup
-export const steps = [{}]; //, click, click, click];
-
-// function click(container: Element) {
-//   container.querySelector("button")!.click();
-// }
+export const steps = [{}];

@rturnq rturnq force-pushed the fix-spread-input branch 3 times, most recently from 32d170b to 2a8f688 Compare January 30, 2026 22:57
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In
`@packages/runtime-tags/src/__tests__/fixtures/spread-attr-tag-effect/tags/child.marko`:
- Around line 1-2: Guard against input.option being null/undefined in the script
that sets $el().innerHTML: when computing Object.keys(input.option) (inside the
script block assigning $el().innerHTML), default input.option to an empty object
(e.g., use input.option || {} or nullish coalescing) before calling Object.keys
so the code won't throw if option is missing.
🧹 Nitpick comments (1)
packages/runtime-tags/src/__tests__/fixtures/hoist-native-tag-var/template.marko (1)

23-28: Consider using a distinct variable name to improve readability.

Both script blocks declare const el (line 11 and line 24). While Marko scopes each <script> block separately so this is technically correct, using distinct names like el1 and el2 (matching the $el/$el2 references) would improve clarity and make the test fixture easier to follow.

✨ Suggested improvement
 <script>
-  const el = $el2()
-  if (el) {
-    el.innerHTML = 'Hello World';
+  const el2 = $el2()
+  if (el2) {
+    el2.innerHTML = 'Hello World';
   }
 </script>

@rturnq rturnq merged commit aeec614 into main Jan 30, 2026
9 checks passed
@rturnq rturnq deleted the fix-spread-input branch January 30, 2026 23:35
@github-actions github-actions bot mentioned this pull request Jan 30, 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.

2 participants