Skip to content

Releases: Xalior/nicelicense

v0.2.0 - 2025-02-14

14 Feb 13:35
8795cc5

Choose a tag to compare

[0.2.0] - 2025-02-14

Changed

  • BREAKING: --validate now performs license identification instead of strict validation
    • Returns status: "identified" instead of status: "validated"
    • Returns status: "unknown" instead of status: "unmatched"
    • Includes confidence scoring (0.0-1.0) and fingerprint match counts
    • More lenient: works even when users add custom headers or modify formatting
  • 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 phrases
    • totalFingerprints: 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 by identifyLicense())
  • 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 --validate help text to say "Identify existing LICENSE file"