Skip to content

Commit 9e991ef

Browse files
committed
🔧 [build] Update license information across the project
- 📝 Update PowerShellGalleryReleaseNotes.md to reflect the new version '2025.12.15.1707' and change license from MIT to Unlicense. - 📝 Modify DOCUMENTATION_INDEX.md to update license terms from MIT to Unlicense. - 📝 Change PUBLISHING.md to reflect the Unlicense license expression and its corresponding license URL. - 📝 Update QUICK_REFERENCE.md to indicate the project is now under the Unlicense. - 🔧 Update package.json to set the license field to Unlicense. - 🛠️ Enhance Test-Coverage.ps1 to ensure coverage runs do not affect the user's real cache. - 🛠️ Modify Test-Module.ps1 to ensure tests run in isolated environments without affecting user data. - 🛠️ Update Update-NuGetPackageMetadata.ps1 to set the license to Unlicense in the NuGet metadata. - 🔧 Change build.ps1 to update the license URI and expression to Unlicense. Signed-off-by: Nick2bad4u <20943337+Nick2bad4u@users.noreply.github.com>
1 parent efff7d3 commit 9e991ef

46 files changed

Lines changed: 576 additions & 413 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -634,5 +634,5 @@ Signed-off-by: StepSecurity Bot <bot@stepsecurity.io> [`(7da72e1)`](https://gith
634634
## Contributors
635635
Thanks to all the [contributors](https://github.com/Nick2bad4u/PS-Color-Scripts-Enhanced/graphs/contributors) for their hard work!
636636
## License
637-
This project is licensed under the [MIT License](https://github.com/Nick2bad4u/PS-Color-Scripts-Enhanced/blob/main/LICENSE)
637+
This project is licensed under the [Unlicense License](https://github.com/Nick2bad4u/PS-Color-Scripts-Enhanced/blob/main/LICENSE)
638638
*This changelog was automatically generated with [git-cliff](https://github.com/orhun/git-cliff).*

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ ps-color-scripts-enhanced/
237237
├── README.md # Main documentation
238238
├── RELEASENOTES.md # Version history
239239
├── CONTRIBUTING.md # This file
240-
├── LICENSE # MIT License
240+
├── LICENSE # Unlicense License
241241
└── .gitignore # Git ignore rules
242242
```
243243

@@ -692,7 +692,7 @@ Example: `2025.10.09.1625`
692692

693693
## License
694694

695-
By contributing, you agree your contributions will be licensed under the [MIT License](./LICENSE).
695+
By contributing, you agree your contributions will be licensed under the [Unlicense License](./LICENSE).
696696

697697
---
698698

ColorScripts-Enhanced/ColorScripts-Enhanced.psd1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
RootModule = 'ColorScripts-Enhanced.psm1'
1212

1313
# Version number of this module.
14-
ModuleVersion = '2025.12.15.1153'
14+
ModuleVersion = '2025.12.15.1730'
1515

1616
# Supported PSEditions
1717
CompatiblePSEditions = @('Desktop', 'Core')
@@ -198,10 +198,10 @@ PERFECT FOR
198198
)
199199

200200
# A URL to the license for this module.
201-
LicenseUri = 'https://licenses.nuget.org/MIT'
201+
LicenseUri = 'https://licenses.nuget.org/Unlicense'
202202

203203
# License expression or path to license file
204-
License = 'MIT'
204+
License = 'Unlicense'
205205

206206
# A URL to the main website for this project.
207207
ProjectUri = 'https://github.com/Nick2bad4u/ps-color-scripts-enhanced'
@@ -211,7 +211,7 @@ PERFECT FOR
211211

212212
# ReleaseNotes of this module
213213
ReleaseNotes = @'
214-
Version 2025.12.15.1153:
214+
Version 2025.12.15.1730:
215215
- Enhanced caching system with OS-wide cache in AppData
216216
- 6-19x performance improvement
217217
- Cache stored in centralized location

ColorScripts-Enhanced/Private/Build-ScriptCache.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ function Build-ScriptCache {
4040
Invoke-FileWriteAllText -Path $cacheFile -Content $execution.StdOut -Encoding $script:Utf8NoBomEncoding
4141

4242
try {
43-
$scriptLastWrite = Get-FileLastWriteTimeUtc -Path $ScriptPath
44-
Set-FileLastWriteTimeUtc -Path $cacheFile -Timestamp $scriptLastWrite
43+
$cacheStamp = (Get-Date).ToUniversalTime()
44+
Set-FileLastWriteTimeUtc -Path $cacheFile -Timestamp $cacheStamp
4545
}
4646
catch {
47-
$scriptLastWrite = Get-FileLastWriteTime -Path $ScriptPath
48-
Set-FileLastWriteTime -Path $cacheFile -Timestamp $scriptLastWrite
47+
$cacheStamp = Get-Date
48+
Set-FileLastWriteTime -Path $cacheFile -Timestamp $cacheStamp
4949
}
5050

5151
$signature = Get-FileContentSignature -Path $ScriptPath -IncludeHash

ColorScripts-Enhanced/Private/Get-CachedOutput.ps1

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,34 @@ function Get-CachedOutput {
271271
}
272272
}
273273

274+
# Migration/robustness:
275+
# Historically cache files were backdated to the script's LastWriteTimeUtc. That makes
276+
# *.cache appear old even when they are valid and recently used/validated, and can cause
277+
# external cleanup tools to delete *.cache while leaving *.cacheinfo behind.
278+
# If we detect that legacy stamp, touch the cache file to 'now' once.
279+
try {
280+
if ($cacheLastWrite -and $scriptLastWriteUtc -and ($cacheLastWrite -eq $scriptLastWriteUtc)) {
281+
$nowUtc = (Get-Date).ToUniversalTime()
282+
try {
283+
Set-FileLastWriteTimeUtc -Path $cacheFile -Timestamp $nowUtc
284+
$cacheLastWrite = $nowUtc
285+
}
286+
catch {
287+
try {
288+
$nowLocal = Get-Date
289+
Set-FileLastWriteTime -Path $cacheFile -Timestamp $nowLocal
290+
$cacheLastWrite = $nowLocal.ToUniversalTime()
291+
}
292+
catch {
293+
Write-Verbose ("Failed to touch cache file timestamp for {0}: {1}" -f $cacheFile, $_.Exception.Message)
294+
}
295+
}
296+
}
297+
}
298+
catch {
299+
Write-Verbose ("Cache timestamp migration check failed for {0}: {1}" -f $cacheFile, $_.Exception.Message)
300+
}
301+
274302
$content = & $script:FileReadAllTextDelegate $cacheFile $script:Utf8NoBomEncoding
275303

276304
return [pscustomobject]@{

ColorScripts-Enhanced/README-Gallery.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
> **Credits:** Built upon [shell-color-scripts](https://gitlab.com/dwt1/shell-color-scripts) by Derek Taylor and [ps-color-scripts](https://github.com/scottmckendry/ps-color-scripts) by Scott McKendry. Enhanced with high-performance caching, configuration management, and full cross-platform support.
44
5-
[![PowerShell Gallery.](https://img.shields.io/powershellgallery/v/ColorScripts-Enhanced?logo=powershell)](https://www.powershellgallery.com/packages/ColorScripts-Enhanced) [![Downloads.](https://img.shields.io/powershellgallery/dt/ColorScripts-Enhanced?logo=powershell)](https://www.powershellgallery.com/packages/ColorScripts-Enhanced) [![NuGet.](https://img.shields.io/nuget/v/ColorScripts-Enhanced?logo=nuget)](https://www.nuget.org/packages/ColorScripts-Enhanced/) [![Tests.](https://github.com/Nick2bad4u/ps-color-scripts-enhanced/actions/workflows/test.yml/badge.svg)](https://github.com/Nick2bad4u/ps-color-scripts-enhanced/actions/workflows/test.yml) [![License.](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/Nick2bad4u/ps-color-scripts-enhanced/blob/main/LICENSE)
5+
[![PowerShell Gallery.](https://img.shields.io/powershellgallery/v/ColorScripts-Enhanced?logo=powershell)](https://www.powershellgallery.com/packages/ColorScripts-Enhanced) [![Downloads.](https://img.shields.io/powershellgallery/dt/ColorScripts-Enhanced?logo=powershell)](https://www.powershellgallery.com/packages/ColorScripts-Enhanced) [![NuGet.](https://img.shields.io/nuget/v/ColorScripts-Enhanced?logo=nuget)](https://www.nuget.org/packages/ColorScripts-Enhanced/) [![Tests.](https://github.com/Nick2bad4u/ps-color-scripts-enhanced/actions/workflows/test.yml/badge.svg)](https://github.com/Nick2bad4u/ps-color-scripts-enhanced/actions/workflows/test.yml) [![License.](https://img.shields.io/badge/License-Unlicense-yellow.svg)](https://github.com/Nick2bad4u/ps-color-scripts-enhanced/blob/main/LICENSE)
66

77
Display beautiful ANSI colorscripts in your terminal with intelligent caching for **6-19x faster load times**. Perfect for terminal customization and visual appeal!
88

@@ -182,7 +182,7 @@ Contributions welcome! Submit colorscripts, report bugs, or suggest features.
182182

183183
## License
184184

185-
MIT - See [LICENSE](https://github.com/Nick2bad4u/ps-color-scripts-enhanced/blob/main/LICENSE)
185+
Unlicense - See [LICENSE](https://github.com/Nick2bad4u/ps-color-scripts-enhanced/blob/main/LICENSE)
186186

187187
---
188188

ColorScripts-Enhanced/de/ColorScripts-Enhanced-help.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2798,7 +2798,7 @@ Copyright (c) 2025. Alle Rechte vorbehalten.
27982798

27992799
### LICENSE
28002800

2801-
Lizenziert unter MIT-Lizenz. Siehe LICENSE-Datei für Details.</maml:para>
2801+
Lizenziert unter Unlicense-Lizenz. Siehe LICENSE-Datei für Details.</maml:para>
28022802
</maml:alert>
28032803
</maml:alertSet>
28042804
<command:examples />

ColorScripts-Enhanced/de/ColorScripts-Enhanced_f77548d7-23eb-48ce-a6e0-f64b4758d995_HelpInfo.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<SupportedUICultures>
55
<UICulture>
66
<UICultureName>de</UICultureName>
7-
<UICultureVersion>2025.12.15.1153</UICultureVersion>
7+
<UICultureVersion>2025.12.15.1730</UICultureVersion>
88
</UICulture>
99
</SupportedUICultures>
1010
</HelpInfo>

ColorScripts-Enhanced/de/Show-ColorScript.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -982,7 +982,7 @@ Copyright (c) 2025. Alle Rechte vorbehalten.
982982

983983
### LICENSE
984984

985-
Lizenziert unter MIT-Lizenz. Siehe LICENSE-Datei für Details.
985+
Lizenziert unter Unlicense-Lizenz. Siehe LICENSE-Datei für Details.
986986

987987
## RELATED LINKS
988988

@@ -991,4 +991,3 @@ Lizenziert unter MIT-Lizenz. Siehe LICENSE-Datei für Details.
991991
- [Clear-ColorScriptCache](Clear-ColorScriptCache.md)
992992
- [Export-ColorScriptMetadata](Export-ColorScriptMetadata.md)
993993
- [Online Documentation](https://github.com/Nick2bad4u/ps-color-scripts-enhanced)
994-

ColorScripts-Enhanced/de/about_ColorScripts-Enhanced.help.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -832,4 +832,4 @@ Copyright (c) 2025. All rights reserved.
832832

833833
### LICENSE
834834

835-
Licensed under MIT License. See LICENSE file for details.
835+
Licensed under Unlicense License. See LICENSE file for details.

0 commit comments

Comments
 (0)