Releases: Xalior/nicelicense
Releases · Xalior/nicelicense
v0.2.0 - 2025-02-14
[0.2.0] - 2025-02-14
Changed
- BREAKING:
--validatenow performs license identification instead of strict validation- Returns
status: "identified"instead ofstatus: "validated" - Returns
status: "unknown"instead ofstatus: "unmatched" - Includes confidence scoring (0.0-1.0) and fingerprint match counts
- More lenient: works even when users add custom headers or modify formatting
- Returns
- Replaced regex-based license validation with fingerprint-based identification
- Improved accuracy with distinctive phrase matching per license
Added
- Confidence scoring for license identification
confidence: decimal score (0.0-1.0)confidencePercent: human-readable percentage (e.g., "100%")matchedFingerprints: number of matched distinctive phrasestotalFingerprints: total distinctive phrases for the license
- Fingerprints (distinctive phrases) for all 10 supported licenses
- MIT: 3 fingerprints
- Apache-2.0: 4 fingerprints
- BSD-3-Clause: 3 fingerprints
- BSD-2-Clause: 3 fingerprints
- ISC: 3 fingerprints
- MPL-2.0: 3 fingerprints
- LGPL-3.0-only: 4 fingerprints
- GPL-3.0-only: 4 fingerprints
- GPL-3.0-or-later: 4 fingerprints
- Unlicense: 3 fingerprints
Fixed
- BSD-2-Clause and BSD-3-Clause no longer falsely match each other
- BSD-3-Clause uses full "Neither the name...endorse or promote" clause
- BSD-2-Clause uses "Redistributions in binary form" phrase
- ISC license no longer matches "DISCLAIMER" in other licenses
- Replaced generic "ISC" fingerprint with distinctive "with or without fee"
- GPL-3.0-or-later better distinguished from GPL-3.0-only
- Added 4th fingerprint "How to Apply These Terms to Your New Programs"
- Performance:
.toLowerCase()now called once instead of per-fingerprint iteration
Removed
buildLicenseRegex()function (replaced by fingerprint matching)validateExistingLicense()function (replaced byidentifyLicense())- Regex-based template matching logic
Documentation
- Updated README.md to describe identification instead of validation
- Updated docs/AGENTS.md with new JSON response schema
- Updated docs/CLAUDE.md with identification usage
- Updated
--validatehelp text to say "Identify existing LICENSE file"