Commit 4deea4a
committed
✨ [feat] Add cache-format upgrade workflow, manual validation override, and Show-ColorScript -ValidateCache
- ✨ Private/Ensure-CacheFormatVersion.ps1: add Set-CacheValidationOverride to let callers force cache validation; setting the override resets $script:CacheValidationPerformed so initialization will re-run validation.
- ✨ Private/Ensure-CacheFormatVersion.ps1: extend Update-CacheFormatVersion to accept -MetadataFileName and write metadata using [int]$script:CacheFormatVersion (Version, ModuleVersion, UpdatedUtc).
- ✨ Private/Ensure-CacheFormatVersion.ps1: implement purge of obsolete cache-metadata*.json files (remove files whose name != current MetadataFileName) with robust try/catch and Write-Verbose diagnostics to avoid breaking init on IO/parse failures.
🚜 [refactor] Integrate cache validation into initialization and add env override
- 🚜 Private/Initialize-CacheDirectory.ps1: standardize metadata filename to 'cache-metadata-v{0}.json' and pass that name into Update-CacheFormatVersion.
- 🚜 Private/Initialize-CacheDirectory.ps1: add support for COLOR_SCRIPTS_ENHANCED_VALIDATE_CACHE (accepts 1/true/yes) to force validation via environment.
- 🚜 Private/Initialize-CacheDirectory.ps1: only run validation when forced (env), when manual override is set, or when validation hasn't been performed and the metadata file is missing; set $script:CacheValidationPerformed = $true after validation and clear the manual override. Apply same logic to the fallback resolution path.
✨ [feat] Public Show-ColorScript: add -ValidateCache switch
- ✨ Public/Show-ColorScript.ps1: add .PARAMETER ValidateCache documentation and new [switch]$ValidateCache parameter.
- ✨ Public/Show-ColorScript.ps1: when -ValidateCache is supplied call Set-CacheValidationOverride -Value $true so callers can force cache rebuild/validation before rendering.
🔧 [build] Bump module version and release notes header
- 🔧 ColorScripts-Enhanced/ColorScripts-Enhanced.psd1: bump ModuleVersion => '2025.11.05.2125' and update embedded ReleaseNotes header to match the new stamp.
📝 [docs] Sync localized help UICultureVersion stamps
- 📝 Update localized HelpInfo.xml files (en-US, de, es, fr, it, ja, nl, pt, ru, zh-CN) to the new UICultureVersion stamp to keep manifest/help metadata consistent with the module bump.
🧪 [test] Initialize cache-validation state in tests
- 🧪 Tests/*: reset $script:CacheValidationPerformed = $false and $script:CacheValidationManualOverride = $false in test setup fixtures (CoverageExpansion, InternalCoverage, TargetedCoverage) so tests run with deterministic cache-validation state.
📝 [docs] Regenerate packaged release artifacts
- 📝 dist/LatestReleaseNotes.md & dist/PowerShellGalleryReleaseNotes.md: regenerate release notes header/content to reflect the cache-format workflow, validation changes and module/help version bumps.
Signed-off-by: Nick2bad4u <20943337+Nick2bad4u@users.noreply.github.com>1 parent e25ac30 commit 4deea4a
19 files changed
Lines changed: 514 additions & 39 deletions
File tree
- ColorScripts-Enhanced
- Private
- Public
- de
- en-US
- es
- fr
- it
- ja
- nl
- pt
- ru
- zh-CN
- Tests
- dist
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
214 | | - | |
| 214 | + | |
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
| |||
Lines changed: 40 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
5 | 26 | | |
6 | 27 | | |
7 | 28 | | |
8 | 29 | | |
9 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
10 | 35 | | |
11 | 36 | | |
12 | 37 | | |
13 | 38 | | |
14 | 39 | | |
15 | 40 | | |
16 | | - | |
17 | | - | |
| 41 | + | |
18 | 42 | | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
26 | 53 | | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | 54 | | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
| 55 | + | |
| 56 | + | |
38 | 57 | | |
39 | 58 | | |
40 | 59 | | |
| |||
62 | 81 | | |
63 | 82 | | |
64 | 83 | | |
65 | | - | |
| 84 | + | |
66 | 85 | | |
67 | 86 | | |
68 | 87 | | |
| |||
Lines changed: 43 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
74 | 81 | | |
75 | 82 | | |
76 | 83 | | |
77 | | - | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
78 | 102 | | |
79 | 103 | | |
80 | 104 | | |
| |||
99 | 123 | | |
100 | 124 | | |
101 | 125 | | |
102 | | - | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
103 | 144 | | |
104 | 145 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
51 | 54 | | |
52 | 55 | | |
53 | 56 | | |
| |||
261 | 264 | | |
262 | 265 | | |
263 | 266 | | |
264 | | - | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
265 | 271 | | |
266 | 272 | | |
267 | 273 | | |
268 | 274 | | |
269 | 275 | | |
270 | 276 | | |
271 | 277 | | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
272 | 282 | | |
273 | 283 | | |
274 | 284 | | |
| |||
483 | 493 | | |
484 | 494 | | |
485 | 495 | | |
486 | | - | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
0 commit comments