Skip to content

fix: attr tag type narrowing#458

Merged
LuLaValva merged 3 commits intomainfrom
attr-tag-type-narrowing
Feb 5, 2026
Merged

fix: attr tag type narrowing#458
LuLaValva merged 3 commits intomainfrom
attr-tag-type-narrowing

Conversation

@LuLaValva
Copy link
Member

No description provided.

@changeset-bot
Copy link

changeset-bot bot commented Feb 5, 2026

🦋 Changeset detected

Latest commit: 0aae642

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

This PR includes changesets to release 3 packages
Name Type
@marko/language-tools Patch
@marko/type-check Patch
marko-vscode 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 Feb 5, 2026

Walkthrough

A changeset file was added to document patch-level updates for three packages: @marko/language-tools, @marko/type-check, and marko-vscode, with the description "Type narrowing fix for attribute tags". The attrTagFor function signature in the type declarations file was modified to constrain the AttrTags generic parameter as a const tuple by adding the const modifier to the type parameter declaration.

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Description check ❓ Inconclusive No pull request description was provided by the author, making it impossible to assess relevance to the changeset. Add a pull request description explaining the type narrowing fix, its purpose, and any relevant context for reviewers.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fix: attr tag type narrowing' directly reflects the main change: adding const to the AttrTags generic parameter to enforce type narrowing in the attrTagFor function.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ 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 attr-tag-type-narrowing

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: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/language-tools/marko.internal.d.ts (1)

400-418: ⚠️ Potential issue | 🟠 Major

Add TypeScript 5.0+ peer dependency constraint.

The const type parameter in attrTagFor (line 405) is a TypeScript 5.0+ feature. The @marko/language-tools package exports marko.internal.d.ts as a public export but has no TypeScript version constraint in peerDependencies. Consumers using TypeScript < 5.0 will encounter parse errors. Add "typescript": ">=5.0" to peerDependencies in packages/language-tools/package.json.

@LuLaValva LuLaValva merged commit c5d7722 into main Feb 5, 2026
5 checks passed
@LuLaValva LuLaValva deleted the attr-tag-type-narrowing branch February 5, 2026 17:40
@github-actions github-actions bot mentioned this pull request Feb 5, 2026
@coderabbitai coderabbitai bot mentioned this pull request Feb 6, 2026
@github-project-automation github-project-automation bot moved this to Done in Roadmap Feb 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant