Skip to content

Fix watch dependency tracking through static re-exports - #344

Merged
bcomnes merged 2 commits into
masterfrom
fix/reexport-dependency-tracking
Oct 31, 2026
Merged

bcomnes merged 2 commits into
masterfrom
fix/reexport-dependency-tracking

Conversation

@bcomnes

@bcomnes bcomnes commented Oct 31, 2026

Copy link
Copy Markdown
Owner

Summary

Fixes #328 by migrating from @11ty/dependency-tree-typescript@1.0.0 to the consolidated @11ty/dependency-tree@5.0.0-alpha.3, which follows runtime static re-exports. The replacement is a published canary prerelease and is pinned to an exact version.

  • Replace the two issue-specific TODOs with 12 regression tests covering named, star, and namespace re-exports in JavaScript and TypeScript.
  • Verify that re-exported page helpers shared with templates upsert affected source pages and that re-exported global-data helpers shared with templates reset the retained index.
  • Compare watch-produced global data with a fresh build in every new regression.
  • Clear the upstream filesystem cache at each dependency-index rebuild so DOMStack retains control of observation-aware analysis reuse and watcher-error recovery.
  • Update the analyzer read probe, account for canonical symlink paths in the unobserved-dependency test, and migrate the local type shim and implementation documentation.

Red → green verification

All 12 new regression cases failed with the previous dependency: affected source pages were omitted from deltas, and global-data helper edits incorrectly produced deltas instead of resets. After migration, all 12 pass, including watch-versus-fresh-build comparisons.

Validation

  • node --test --test-reporter=dot — full Node test suite passed.
  • node --test lib/watch/*.test.js lib/watch/incremental-global-data-tests/index.test.js lib/watch/lifecycle-tests/*.test.js — 222 tests passed.
  • Targeted ESLint for the three changed JavaScript files passed.
  • npm run test:tsc passed.
  • npm run test:installed-check passed.
  • git diff --check passed.

Playwright was not run.

@socket-security

socket-security Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​@​11ty/​dependency-tree@​5.0.0-alpha.310010010089100

View full report

@bcomnes
bcomnes marked this pull request as ready for review October 31, 2026 19:28
@bcomnes
bcomnes requested a balanced review from Copilot October 31, 2026 19:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 41234280039

Coverage decreased (-0.05%) to 96.605%

Details

  • Coverage decreased (-0.05%) from the base build.
  • Patch coverage: 3 of 3 lines across 1 file are fully covered (100%).
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 12060
Covered Lines: 11800
Line Coverage: 97.84%
Relevant Branches: 4142
Covered Branches: 3852
Branch Coverage: 93.0%
Branches in Coverage %: Yes
Coverage Strength: 927.73 hits per line

💛 - Coveralls

@bcomnes
bcomnes merged commit d841b36 into master Oct 31, 2026
6 checks passed
@bcomnes
bcomnes deleted the fix/reexport-dependency-tracking branch October 31, 2026 19:39
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.

Watch dependency tracking misses static re-exports

3 participants