Skip to content

Conversation

@DylanPiercey
Copy link
Contributor

No description provided.

@changeset-bot
Copy link

changeset-bot bot commented Dec 3, 2025

🦋 Changeset detected

Latest commit: 9a73073

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

This PR includes changesets to release 2 packages
Name Type
marko Patch
@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

coderabbitai bot commented Dec 3, 2025

Walkthrough

This change updates type definitions for HTML tag implementations in the Marko runtime. It introduces new TypeScript declaration files for html-comment, html-script, and html-style tags, each defining an Input interface. The tag translator files are modified to reference these new type definitions via a types property instead of maintaining explicit attribute mappings. Additionally, parse options for the <style> tag are extended to include text and preserveWhitespace flags. A changeset entry documents the patch-level release across the "marko" and "@marko/runtime-tags" packages.

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Description check ❓ Inconclusive No pull request description was provided by the author, making this check inconclusive. Add a description explaining the purpose and scope of the type fixes for html-* tags.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: fixing type declarations for HTML-related tags across the codebase.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ 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 wip

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 55fd324 and 9a73073.

📒 Files selected for processing (8)
  • .changeset/crisp-bugs-sin.md (1 hunks)
  • packages/runtime-class/src/translator/taglib/core/index.js (1 hunks)
  • packages/runtime-tags/src/translator/core/html-comment.ts (2 hunks)
  • packages/runtime-tags/src/translator/core/html-script.ts (2 hunks)
  • packages/runtime-tags/src/translator/core/html-style.ts (2 hunks)
  • packages/runtime-tags/tags/html-comment.d.marko (1 hunks)
  • packages/runtime-tags/tags/html-script.d.marko (1 hunks)
  • packages/runtime-tags/tags/html-style.d.marko (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: test: node@24
  • GitHub Check: test: node@20
  • GitHub Check: test: node@22
🔇 Additional comments (8)
packages/runtime-class/src/translator/taglib/core/index.js (1)

89-96: Align <style> parse-options with CSS/text handling

Adding text: true and preserveWhitespace: true for <style> is consistent with how CSS should be parsed and matches the html-style translator’s behavior, so this alignment looks correct.

.changeset/crisp-bugs-sin.md (1)

1-6: Changeset accurately describes and scopes the update

Patch bumps for marko and @marko/runtime-tags with the “Fix types for html-* tags” summary correctly reflect the limited, type-focused nature of this PR.

packages/runtime-tags/tags/html-style.d.marko (1)

1-1: Input type for html-style cleanly delegates to native style attributes

Defining Input to extend the underlying HTML-style type keeps the tag’s public typing aligned with native <style> attributes and matches the pattern used for other html-* tags.

packages/runtime-tags/tags/html-comment.d.marko (1)

1-1: Empty Input matches <html-comment> capabilities

Since <html-comment> doesn’t accept attributes, an empty Input interface is the right shape and keeps the types accurate.

packages/runtime-tags/src/translator/core/html-style.ts (1)

29-29: Wire html-style translator to its .d.marko type

Importing runtimeInfo and setting types to runtimeInfo.name + "/tags/html-style.d.marko" cleanly connects this tag to the new html-style.d.marko declaration without touching runtime behavior.

Also applies to: 379-380

packages/runtime-tags/tags/html-script.d.marko (1)

1-1: html-script Input reuses the native script attribute surface

Having Input extend the underlying HTML script type lets consumers use the full native <script> attribute set through this tag, consistent with the rest of the html-* typings.

packages/runtime-tags/src/translator/core/html-comment.ts (1)

20-20: Attach .d.marko typing to html-comment translator

Using runtimeInfo to set types to the html-comment.d.marko path exposes the new Input interface to tooling while leaving the existing parsing and rendering behavior intact.

Also applies to: 154-155

packages/runtime-tags/src/translator/core/html-script.ts (1)

29-29: Consolidate html-script typings via html-script.d.marko

The types field wired through runtimeInfo correctly points this translator at the shared html-script.d.marko definition, reducing duplication of attribute typing while preserving existing runtime behavior and parse options.

Also applies to: 374-378


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

@codecov
Copy link

codecov bot commented Dec 3, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.27%. Comparing base (55fd324) to head (9a73073).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2980      +/-   ##
==========================================
- Coverage   88.27%   88.27%   -0.01%     
==========================================
  Files         374      374              
  Lines       47514    47506       -8     
  Branches     3983     3983              
==========================================
- Hits        41943    41935       -8     
  Misses       5519     5519              
  Partials       52       52              

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

@DylanPiercey DylanPiercey merged commit f9cf89f into main Dec 3, 2025
15 of 16 checks passed
@DylanPiercey DylanPiercey deleted the wip branch December 3, 2025 17:36
@github-actions github-actions bot mentioned this pull request Dec 4, 2025
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