Commit 9159a88
feat(core): add ManifestStore for startup manifest caching
Add ManifestStore class to cache startup filesystem I/O results
(resolveModule lookups, globby scans) in `.egg/manifest.json`.
When a valid manifest exists, the framework skips redundant I/O.
Key design:
- ManifestStore.resolveModule(path, fallback) and globFiles(dir, fallback)
encapsulate cache-read + collect logic in one place
- All paths stored as relative (forward slashes) for cross-platform portability
- Stat-based fingerprinting (lockfile + config dir) for invalidation
- Generic `extensions: Record<string, unknown>` for plugin-specific data
- `metadataOnly` mode + `loadMetadata` lifecycle hook for manifest generation
- ManifestStore.createCollector() for collection-only mode (no cached data)
Closes #5842
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 0dc5dfb commit 9159a88
File tree
13 files changed
+1219
-6
lines changed- packages/core
- src
- loader
- test
- __snapshots__
- fixtures/manifest
- loader
13 files changed
+1219
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
| |||
218 | 220 | | |
219 | 221 | | |
220 | 222 | | |
| 223 | + | |
221 | 224 | | |
222 | 225 | | |
223 | 226 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
57 | 64 | | |
58 | 65 | | |
59 | 66 | | |
| |||
72 | 79 | | |
73 | 80 | | |
74 | 81 | | |
| 82 | + | |
75 | 83 | | |
76 | 84 | | |
77 | 85 | | |
| |||
87 | 95 | | |
88 | 96 | | |
89 | 97 | | |
| 98 | + | |
90 | 99 | | |
91 | 100 | | |
92 | 101 | | |
| |||
110 | 119 | | |
111 | 120 | | |
112 | 121 | | |
113 | | - | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
114 | 125 | | |
115 | 126 | | |
116 | 127 | | |
| |||
331 | 342 | | |
332 | 343 | | |
333 | 344 | | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
334 | 366 | | |
335 | 367 | | |
336 | 368 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
| 51 | + | |
| 52 | + | |
50 | 53 | | |
51 | 54 | | |
52 | 55 | | |
| |||
67 | 70 | | |
68 | 71 | | |
69 | 72 | | |
| 73 | + | |
| 74 | + | |
70 | 75 | | |
71 | 76 | | |
72 | 77 | | |
| |||
154 | 159 | | |
155 | 160 | | |
156 | 161 | | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
157 | 167 | | |
158 | 168 | | |
159 | 169 | | |
| |||
1233 | 1243 | | |
1234 | 1244 | | |
1235 | 1245 | | |
1236 | | - | |
| 1246 | + | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
1237 | 1251 | | |
1238 | 1252 | | |
1239 | 1253 | | |
1240 | 1254 | | |
1241 | 1255 | | |
1242 | 1256 | | |
1243 | 1257 | | |
1244 | | - | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
1245 | 1263 | | |
1246 | 1264 | | |
1247 | 1265 | | |
| |||
1627 | 1645 | | |
1628 | 1646 | | |
1629 | 1647 | | |
| 1648 | + | |
1630 | 1649 | | |
1631 | 1650 | | |
1632 | 1651 | | |
| |||
1652 | 1671 | | |
1653 | 1672 | | |
1654 | 1673 | | |
| 1674 | + | |
1655 | 1675 | | |
1656 | 1676 | | |
1657 | 1677 | | |
| |||
1688 | 1708 | | |
1689 | 1709 | | |
1690 | 1710 | | |
| 1711 | + | |
| 1712 | + | |
| 1713 | + | |
| 1714 | + | |
1691 | 1715 | | |
1692 | 1716 | | |
1693 | 1717 | | |
1694 | 1718 | | |
1695 | | - | |
| 1719 | + | |
1696 | 1720 | | |
1697 | 1721 | | |
1698 | 1722 | | |
| |||
1734 | 1758 | | |
1735 | 1759 | | |
1736 | 1760 | | |
| 1761 | + | |
| 1762 | + | |
| 1763 | + | |
| 1764 | + | |
| 1765 | + | |
| 1766 | + | |
| 1767 | + | |
| 1768 | + | |
| 1769 | + | |
| 1770 | + | |
| 1771 | + | |
| 1772 | + | |
| 1773 | + | |
1737 | 1774 | | |
1738 | 1775 | | |
1739 | 1776 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
| 53 | + | |
| 54 | + | |
52 | 55 | | |
53 | 56 | | |
54 | 57 | | |
| |||
193 | 196 | | |
194 | 197 | | |
195 | 198 | | |
196 | | - | |
197 | | - | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
198 | 204 | | |
199 | 205 | | |
200 | 206 | | |
| |||
0 commit comments