Skip to content

fix: improve optional watch file tracking#242

Merged
DylanPiercey merged 1 commit intomainfrom
watch-improvements
Jan 29, 2026
Merged

fix: improve optional watch file tracking#242
DylanPiercey merged 1 commit intomainfrom
watch-improvements

Conversation

@DylanPiercey
Copy link
Contributor

No description provided.

@changeset-bot
Copy link

changeset-bot bot commented Jan 29, 2026

🦋 Changeset detected

Latest commit: 832436b

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

This PR includes changesets to release 1 package
Name Type
@marko/vite 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 Jan 29, 2026

Walkthrough

This pull request refactors the optional watch file tracking logic in the Vite integration for Marko. A new regex pattern (optionalWatchFileReg) is introduced to detect optional watch files like marko-tag.json and style/component variant files. The transformOptionalFiles data structure and related tracking logic are removed, replacing the previous iteration-based approach with direct pattern matching. The watcher logic is simplified so that when files are added or unlinked, it directly detects matching patterns and emits change events for corresponding Marko files. The getPosixBasenameWithoutExt helper function is also removed. The transformWatchFiles mapping is retained for tracking watched files per entry. A new changeset entry documents this patch release.

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
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.
Description check ❓ Inconclusive No pull request description was provided by the author. While some level of detail is missing, this is a very lenient check and a minimal description passes unless completely off-topic. Consider adding a brief description explaining the motivation and benefits of the optional watch file tracking improvements to help reviewers understand the context.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The pull request title 'fix: improve optional watch file tracking' is directly related to the main change of refactoring and improving the optional watch file tracking logic in src/index.ts.

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

✨ Finishing touches
  • 📝 Generate docstrings

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

@DylanPiercey DylanPiercey merged commit 3f10138 into main Jan 29, 2026
9 checks passed
@DylanPiercey DylanPiercey deleted the watch-improvements branch January 29, 2026 19:04
@github-actions github-actions bot mentioned this pull request Jan 29, 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