Skip to content

feat(codegen): apply --cache to watch mode startup#419

Draft
mizdra wants to merge 1 commit into
feat/codegen-cachefrom
feat/codegen-cache-watch
Draft

feat(codegen): apply --cache to watch mode startup#419
mizdra wants to merge 1 commit into
feat/codegen-cachefrom
feat/codegen-cache-watch

Conversation

@mizdra

@mizdra mizdra commented Jun 20, 2026

Copy link
Copy Markdown
Owner

follow-up: #418

Summary

  • When --cache is used with --watch, the persistent cache is now loaded on startup so unchanged files are skipped on the initial emit round
  • After each emit cycle (startup and per-change), the cache is saved so the next session starts from up-to-date state

Test plan

  • skips emitting unchanged files on watch startup — verifies that a cache-warm second startup skips re-emitting unchanged files
  • saves updated cache after a file changes during watch — verifies that the cache is updated when a file changes mid-session, and the next startup reflects that state

@mizdra mizdra added the Type: Feature New Feature label Jun 20, 2026
@changeset-bot

changeset-bot Bot commented Jun 20, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 685919e

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

This PR includes changesets to release 6 packages
Name Type
@css-modules-kit/codegen Minor
@css-modules-kit/core Minor
@css-modules-kit/ts-plugin Minor
@css-modules-kit/eslint-plugin Minor
@css-modules-kit/stylelint-plugin Minor
css-modules-kit-vscode Minor

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

On watch startup, load the persistent cache and skip emitting
files whose content matches the cached hash. After each emit
cycle (initial and per-change), save the updated cache so the
next session starts with fresh state.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@mizdra mizdra force-pushed the feat/codegen-cache-watch branch from e61c7a7 to 685919e Compare June 20, 2026 04:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Feature New Feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant