Skip to content

adotenv 1.8.0

Choose a tag to compare

@github-actions github-actions released this 28 Nov 00:44
· 21 commits to main since this release
d45b756

Added

  • adotenv: added CompactEntries disk loaders under the load feature
    (load_cascade_entries_compact, load_cascade_entries_compact_with,
    load_cascade_entries_compact_with_options, load_entries_compact, and
    load_entries_compact_with_options) with value-preserving cascade merge.
  • adotenv: added bounded edit/format/sort helpers
    (Document::comment_with_options, Document::uncomment_with_options,
    Document::set_export_with_options, Document::format_with_options, and
    Document::sort_with_options, all returning EditError),
    LimitKind::References, and EditOptions::max_references /
    EditOptions::with_max_references (closing the AUD-9 unbounded reference
    scan in sort and bounding reference scans in
    rename_with_references_with_options).
  • adotenv: added LineIndex::with_bom_policy(BomPolicy) supporting
    BomPolicy::Strip, BomPolicy::StripAll, BomPolicy::Keep, and
    BomPolicy::Error.
  • adotenv (serde): parsed non-string scalar map keys (such as
    BTreeMap<u16, String>, bool, char, integers, floats, newtypes, bytes,
    and Option) in Document::deserialize and LoadedEnvironment::deserialize
    using the same scalar rules as values, and documented the
    #[serde(deserialize_with = ...)] pattern for typed fields inside
    #[serde(flatten)].
  • adotenv-process: added validate_compact_entries and
    apply_compact_entries for CompactEntries (skipping bare None entries and
    validating/applying assigned entries).
  • adotenv-cli: added global --max-items <n> and --max-diagnostics <n>
    flags, added bounded fmt flags (--max-output-bytes <n>,
    --max-output-lines <n>, and --max-references <n>) backed by
    Document::sort_with_options and Document::format_with_options, wired
    get, load, and run to CompactValues (parse_values_compact_with_options
    for non-empty keys and load_cascade_values_compact_with_options), and
    replaced hand-rolled BOM column calculation in check with
    LineIndex::with_bom_policy.
  • Planning docs: added docs/design/1.8.0-plan.md covering adotenv-lsp 0.6.0
    stabilization (#248), adotenv 1.8.0 core additions (#249, #250), and
    adotenv-lint 0.3.0 (#251).

Fixed

  • adotenv: fixed Document::format idempotence under LineBreaks::Lf (with
    and without custom line_byte_limit) when quote normalization combines with
    trailing-whitespace trimming or FinalNewline::Remove, fixed verification
    culprit tracking in Document::format and Document::sort so split-and-swallow
    parse desynchronizations track all overlapping output spans and never revert
    collapsed blank lines under BlankLines::Collapse, preserved leading
    \u{feff} keys in QuotedTail::Append native tail encoding, and updated
    Document::example to emit bare text following a Compose closing quote on the
    same physical line as a # comment (A="x"tail\n -> A=""\n#\n) while
    keeping explicit second assigned declarations and safe inline-comment
    placeholders under custom QuotedTail::NextStatement and ColonSeparator
    dialects (without quoting unquoted empty inline-comment lines like
    B = #comment in Portable).
  • adotenv: hardened src/references.rs Closes memoization so escaped
    command operators (\-, "\-", \$(-), \${-}) and depth max_depth + 1
    fillers stay linear without clamping explicit finite max_depth bounds,
    enforced EditOptions::max_references across reference-rename verification
    passes (verify_reference_rename, verify_reference_structure, and
    reference_counts_bounded), and kept the EditOptions::max_references
    delimiter-depth cap derived from the configured limit rather than remaining
    budget so sort_with_options and rename_with_references_with_options stay
    order-invariant.
  • adotenv-cli: snapped InsideCrLf diagnostic offsets cleanly to line end in
    check human/--source/GitHub output, aligned fmt --sort on partially
    invalid files with fmt without --sort (formatting valid groups and exiting
    1 rather than failing strict re-parse), preserved two-argument subcommand
    option values during global option extraction across fmt/check/diff/
    set, and enforced single-occurrence validation on set --max-output-bytes
    and set --max-output-lines.