pubspec_licenses 1.1.0
pubspec_licenses: ^1.1.0 copied to clipboard
Zero-dependency Dart library and CLI to extract OSS licenses and SPDX identifiers from pubspec.lock. Drop-in replacement for dart_pubspec_licenses.
1.1.0 #
- Safe Dart Codegen String Escaping (
renderDartLicensesFile): Escaped backslashes (\->\\), carriage returns, NUL bytes,$interpolation tokens (\$foono longer unescapes into live$foointerpolation), and trailing quotes before closing'''/"""delimiters, plus added identifier collision deduplication for split SDK components. - Transitive Dev-Dependency Graph Pruning (
--no-dev-dependencies): Traversed the runtime dependency graph via BFS from root runtimedependencies(direct main/ non-devdirect overridden) sogenerateDevDependencies: falseexcludes transitive dev-only packages (such astest_api,fake_async,lints, andbuild_daemon) in addition todirect deventries. - Root Package
--ignoreParity in Dart Codegen: Stripped root packagelicense,description,homepage,repository,authors, andspdxIdentifierswhen the root package name is passed to--ignore(-i), preventing proprietary application terms from being emitted intooss_licenses.dartwhile keepingthisPackageAPI-compatible. - Dart 3.5+ Pub Workspace Sub-Package CLI Resolution: Updated
generateCLI to traverse upward viafindPubspecLockFromDirectoryand resolve lockfile relativepathdependencies against the workspacepubspec.lockroot directory. - YAML, License Filename & SPDX
WITHHardening: FixedMiniYamlParsermultiline quoted scalar trailing# commenthandling and indented plain-scalar:continuations, addedLICENCE/UNLICENSEand case-insensitive license filename discovery, and preserved SPDXWITHexception clauses (such asApache-2.0 WITH LLVM-exception).
1.0.1 #
- Added explicit
library;directive inlib/src/spdx_detector.dartto satisfydangling_library_doc_commentsunderlints_corestatic analysis. - Refined package overview documentation and updated version examples in
README.md. - Updated the zero-dependency test suite to resolve local
pub-cachepaths and package version dynamically, and normalized path separator assertions on Windows. - Added multi-OS (
Linux,macOS,Windows) andpanapreflight verification workflow in GitHub Actions.
1.0.0 #
- Initial release of
pubspec_licenses. - Zero-Dependency Architecture: 100% pure Dart implementation (
dart:io,dart:convert,dart:async,dart:core) with zero runtime or transitive dependencies (nopana,analyzer,yaml,path, orargslock-in). - 1:1 Drop-in Replacement for
dart_pubspec_licensesv3.2.0:- Identical
ProjectStructure,Package,LimitConcurrency, andlistDependenciesAPI signatures. - Provides both
package:pubspec_licenses/pubspec_licenses.dartand compatibilitypackage:pubspec_licenses/dart_pubspec_licenses.dartbarrel exports.
- Identical
- CLI & Code Generation (
pubspec_licenses&pubspec_licenses:generate):- Generates
lib/oss_licenses.dartout of the box (dart run pubspec_licenses:generate). - Supports JSON export (
-j/--json), human-readable console summary (-s/--summary), custom output paths (-o), package ignore lists (-i),--split-sdk-licenses, and--no-dev-dependencies.
- Generates
- Pure Dart Engines:
MiniYamlParser(loadYaml) supporting block scalars, flow collections, and lockfiles.detectSpdxIdentifierssupporting 25+ standard SPDX licenses, multi-license blocks, andSPDX-License-Identifiertags.- Cross-platform POSIX/Windows path utilities (
path_utils).