Skip to content

Releases

adotenv-lsp 0.8.0

Choose a tag to compare

@github-actions github-actions released this 03 Dec 09:04
98b2604

Breaking Changes

  • adotenv-lsp: raised the adotenv-lint public re-export floor from 0.3 to
    0.4 (adotenv-lint 0.4.0), exposing schema metadata (description,
    deprecated, deprecation_note), Rule::DeprecatedKey,
    ValueShape::{IpAddr, Host, SocketAddr, Email}, literal bounds (prefix,
    suffix, min_len, max_len), and Fix::InsertEmpty.

Added

  • adotenv-lsp: surfaced value-free Finding::detail() in LSP diagnostics
    (escaped for control/Bidi characters) and emitted
    DiagnosticTag::DEPRECATED on adotenv-lint.deprecated-key diagnostics.
  • adotenv-lsp: enriched hover (declarations and references, respecting
    mask_values) and completion (key positions and $VAR/${VAR
    references) with value-free KeySchema Markdown documentation
    (description, ValueShape, literal bounds, required/optional status,
    empty/bare policy, and deprecation notices with control/Bidi/Markdown
    escaping) and CompletionItemTag::DEPRECATED on deprecated keys.
  • adotenv-lsp: wired Fix::InsertEmpty into explicit quickfix code actions
    (Add 'KEY=' placeholder and multi-key Add all missing keys), added
    ParsedDocument::code_actions_with_schema (suppressing schema quick fixes on
    open [schema] example templates in the stdio server), advertised
    codeActionProvider whenever fixable style rules or a schema with
    missing-key is configured, and kept source.fixAll strictly style-only
    (including the Err(LintError::Parse) fallback in build_fix_all_edits).
  • adotenv-lsp: added iterative linear-time dialect-accurate semantic tokens
    (SEMANTIC_TOKEN_TYPES, SEMANTIC_TOKEN_MODIFIERS,
    semantic_tokens_legend, ParsedDocument::semantic_tokens,
    ParsedDocument::semantic_tokens_with_schema, stateless semantic_tokens,
    and textDocument/semanticTokens/full in the stdio server) and folding
    ranges (ParsedDocument::folding_ranges, stateless folding_ranges, and
    textDocument/foldingRange for multiline quoted values and contiguous
    comment blocks) under negotiated positionEncoding with limit_error()
    enforcement.
  • adotenv-lsp: added ParsedDocument::set_options, Session::set_options,
    Session::uris, and bounded live reload of --config /
    --discover-lint-config .adotenv-lint.toml and [schema] example files on
    workspace/didChangeWatchedFiles (including ancestor-directory deletion
    events and symlink retargeting) and textDocument/didSave (issuing
    non-blocking client/registerCapability / client/unregisterCapability
    requests for watched files and dynamic textDocument/codeAction after
    initialized when supported, retaining last-known-good policy with a
    deduplicated window/showMessage warning on invalid/oversized/unreadable
    reloads, re-running ancestor discovery when a discovered config is deleted,
    and republishing versioned diagnostics for open buffers).

Fixed

  • adotenv-lsp: tightened Phase::AfterQuotedKey to accept only dialect
    horizontal whitespace and valid assignment separators (suppressing false
    completions on malformed quoted-key lines such as 'key' bogus=$, empty
    quoted '' = "$H, and non-Python ''#x=$), rejected empty : assignments in
    Syntax::Node (: $H), matched InlineComments::Python bare-key #
    comment suppression in Phase::UnquotedKey (FOO BAR#x=$), honored internal
    \r whitespace (including EOF fallback scans) under LineBreaks::Lf
    dialects (Compose, Docker), preserved valid completions at
    offset == comment.start (A=$#note, H#note), enforced Syntax::Node's
    adjacent-colon rule under ColonSeparator::Whitespace (KEY : $H), escaped
    control/Bidi characters in CompletionItem::label (preserving raw
    filter_text/insert_text), and matched workspace_symbols queries against
    both raw and escaped display names.

adotenv-lint 0.4.0

Choose a tag to compare

@github-actions github-actions released this 03 Dec 06:05
8e25d08

Changed

  • adotenv-lint: marked KeySchemaConfig #[non_exhaustive] and added
    KeySchemaConfig::new() plus builder methods so future schema metadata and
    bound fields remain additive.

Added

  • adotenv-lint: added schema key metadata (description, deprecated,
    deprecation_note) on KeySchema and KeySchemaConfig (accepting TOML
    deprecated = true | false | "reason" and merging per-key overrides in
    LintConfig::apply), Rule::DeprecatedKey (deprecated-key, configurable
    via [rules] and LintOptions::with_deprecated_keys), and value-free
    Finding::detail().
  • adotenv-lint: added zero-new-dependency std value shapes
    ValueShape::{IpAddr, Host, SocketAddr, Email} (TOML shapes ip-addr,
    host, socket-addr, email) and literal bounds (prefix, suffix,
    min_len, max_len, measured in Unicode scalar characters) with config-load
    contradiction validation (min_len > max_len, max_len shorter than
    configured prefix/suffix, empty deprecated = "" notes).
  • adotenv-lint: added value-safe missing-key placeholder fixes
    (Fix::InsertEmpty { key }, backed by verified Edit::Insert with an empty
    "" value and never copying .env.example values), BatchOptions,
    apply_batch_with_policy (keeping default apply_batch / apply_batch_with_options
    and CLI --fix strictly style-only unless opted in), and CLI --fix --fix-missing.
  • adotenv-lint: added SARIF 2.1.0 output (OutputFormat::Sarif,
    --format=sarif with ruleIndex, post-fix BOM-aware line/column regions,
    RFC 3986 URI encoding, and control/Bidi escaping), and offline rule
    documentation (Rule::ALL, Rule::from_name, Rule::explain,
    RuleExplanation, CLI --list-rules and --explain <rule>).

adotenv 1.8.1

Choose a tag to compare

@github-actions github-actions released this 02 Dec 02:28
60fd80d

Fixed

  • adotenv: fixed Document::example to insert a separating space after a
    "" placeholder before # under InlineComments::AnyHash with
    quoted_comments: false, emitted a "" placeholder for Node cross-line
    space_after_eq before quoted values and before next-line quoted keys under
    Syntax::Node (scanning from item.content_span().end so non-Unicode
    whitespace dialects do not emit unnecessary placeholders), preserved #
    inline comments after Node \u{2028}/\u{2029} trailing whitespace and
    custom Compose non-dialect Unicode whitespace (\u{2003}, replacing
    unparseable non-dialect trailing separators with ASCII space under
    quoted_tail != QuotedTail::NextStatement), and kept Document::format
    final-CR trailing-whitespace trimming and FinalNewline::Remove aligned with
    plan_trailing_whitespace (previous_ending == Cr, protect_next,
    raw_values, and exposed line-break preservation on Node A:\n \r).
  • adotenv-lint (0.3.1): adopted adotenv 1.8.1, hardened LintConfig::load
    with a regular-file check and 4 MiB read cap (plus --max-input-bytes config
    enforcement in the CLI), merged per-key [schema.keys.*] overrides in
    LintConfig::apply, rejected empty closed [schema] allow_unknown = false
    configs consistently with --no-unknown-keys, and escaped ASCII controls,
    Unicode line/paragraph separators (\u{2028}/\u{2029}), and Bidi format
    controls in human-output key tags.
  • adotenv-process and adotenv-cli (1.8.1): adopted adotenv 1.8.1 in
    lockstep.

adotenv-lsp 0.7.2

Choose a tag to compare

@github-actions github-actions released this 02 Dec 06:24
30fe8c9

Fixed

  • adotenv-lsp: replaced LiteralCloseCache in reference_nesting_at with a
    deferred zero-allocation uncached fast path and a compact suffix-sliced
    (offset, quote_state) state-transition memo table guaranteeing strict
    linear worst-case work (<= 7N steps) on all adversarial nested \$( /
    \${ and \'' sequences without allocating on benign or single-unclosed
    inputs.
  • adotenv-lsp: guarded ParsedDocument::{document_symbols,workspace_symbols, definition,hover,references} with limit_error() so documents exceeding
    max_items, max_diagnostics, max_input_bytes, or max_lines return
    empty/None results consistently across every query method.
  • adotenv-lsp: fixed completion_for_entry to parse pre-separator prefixes
    with CompletionContext::of so completion inside existing assigned quoted
    keys ('key '=1, export 'key '=1, 'key'=1, 'a#b'=1) works without
    double-quoting, suppressed completion inside bare-entry inline comments
    (FOO#x=$, 'key'#x=$) under Dialect::PYTHON_DOTENV, added
    Phase::AfterQuotedKey and full dialect-aware whitespace handling (including
    Whitespace::Compose, Whitespace::EcmaScript, and Whitespace::Python)
    across key starts, value starts, colon separators, and inline comments,
    cleared line_byte_limit when probing key syntax in completion_insert_text,
    filtered empty and whitespace-only keys out of document_symbols and
    workspace_symbols per LSP 3.17, returned None on hover for Compose
    empty keys (=anon), escaped control/Bidi characters in hover key/reference
    labels and symbol names, and capped stdio .adotenv-lint.toml config reads
    at min(--max-input-bytes, 4 MiB).

adotenv-lsp 0.7.1

Choose a tag to compare

@github-actions github-actions released this 02 Dec 02:42
60fd80d

Fixed

  • adotenv-lsp: guarded ParsedDocument::completion with limit_error() so
    oversized documents return empty completions rather than running schema
    completion or scanning rejected buffers, and added exact linear-time
    dead-state memoization to reference_nesting_at literal-close scans to
    prevent quadratic CPU growth on nested \$( / \${ sequences.
  • adotenv-lsp: normalized SchemaExamplePath fallback comparisons lexically
    (.. segments), stripped Windows verbatim \\?\ / \\?\UNC\ prefixes
    case-insensitively and compared case-insensitively on Windows so
    .env.example self-exemption remains intact when the template is temporarily
    absent on disk.
  • adotenv-lsp: emitted single-quoted insert_text for Python quoted schema
    keys requiring quotes at key start (without double-quoting inside '...),
    enabled completion inside quoted key prefixes with spaces, =, or #
    (including export '...), skipped empty Compose keys in completion results,
    escaped Unicode line/paragraph separators (\u{2028}/\u{2029}) and Bidi
    format controls in missing-key diagnostic messages and rename quick-fix
    titles, and advertised codeActionProvider only when a loaded lint policy
    enables at least one auto-fixable rule.

Changed

  • adotenv-lsp: adopted adotenv 1.8.1 and adotenv-lint 0.3.1.

adotenv-lint 0.3.2

Choose a tag to compare

@github-actions github-actions released this 02 Dec 06:24
30fe8c9

Fixed

  • adotenv-lint: escaped ANSI, line/paragraph separator, and Bidi control
    characters in --format=github key annotations, and capped CLI
    .adotenv-lint.toml config reads at min(--max-input-bytes, 4 MiB) so
    raising --max-input-bytes for large .env files does not weaken the 4 MiB
    config size cap.

adotenv-lsp 0.7.0

Choose a tag to compare

@github-actions github-actions released this 01 Dec 22:53
2970117

Breaking Changes

  • adotenv-lsp: adopted adotenv 1.8.0 and adotenv-lint 0.3.0 (bumping the
    publicly re-exported adotenv_lint::{KeyCase, LintOptions, Rule} dependency
    across 0.2 -> 0.3), removed Copy from LspOptions to carry an
    Arc-shared Option<Arc<Schema>> field (LspOptions::schema), and changed
    ParsedDocument::options and Session::options to return &LspOptions.

Added

  • adotenv-lsp: added opt-in schema and .env.example presence-and-shape
    diagnostics and schema key completion via LspOptions::with_schema,
    LspOptions::without_schema, LspOptions::schema,
    ParsedDocument::diagnostics_with_schema, and re-exported
    adotenv_lint::{KeySchema, Schema, ValueShape}. Missing-key diagnostics name
    the missing key cleanly (escaping control characters) while keeping all
    schema diagnostics strictly value-free.
  • adotenv-lsp (stdio): wired [schema] and [schema.keys.*] resolution
    for --config (validated before server startup) and --discover-lint-config
    (validated during initialize), enforced bounded regular-file reads
    (--max-input-bytes, default 4 MiB) on config and [schema] example files,
    rejected empty closed [schema] allow_unknown = false policies without an
    example or keys, and suppressed schema checks when editing the configured
    schema.example URI itself while retaining parser and style diagnostics.

Changed

  • adotenv-lsp: wired diagnostics, formatting, and code_actions through
    Document::format_with_options, lint_with_options,
    apply_fix_with_options, apply_fixes_with_options, and
    apply_batch_with_options so ParseOptions bounds are enforced before
    allocating formatted or fixed output.

Fixed

  • adotenv-lsp: guarded the entry_at EOF fallback to require
    LineEnding::None so hover on a trailing empty line after a newline returns
    None, preserved single-stage granular edits in source.fixAll, and
    restricted Windows drive-letter normalization in decoded_uri_path to ASCII
    alphabetic drive letters.

adotenv-lint 0.3.0

Choose a tag to compare

@github-actions github-actions released this 01 Dec 20:12
1412ec7

Added

  • adotenv-lint: added opt-in schema and .env.example presence-and-shape
    policy rules (Rule::MissingKey / missing-key, Rule::UnknownKey /
    unknown-key, Rule::EmptyValue / empty-value, and Rule::InvalidValue /
    invalid-value), Schema, KeySchema, ValueShape (Any, Bool,
    Integer, UnsignedInteger, Port, Float, Url, and OneOf),
    LintOptions toggles (missing_keys, unknown_keys, empty_values,
    invalid_values), lint_with_schema, and lint_with_options, keeping
    findings strictly value-free and the adotenv core policy-free.
  • adotenv-lint: added bounded fix-application helpers
    (apply_fix_with_options, apply_fixes_with_options, and
    apply_batch_with_options) backed by adotenv 1.8.0's
    Document::edit_with_options, Document::format_with_options, and
    Document::sort_with_options (plus EditOptions re-export), with two-pass
    verified convergence when QuoteStyle::Unquoted combines with other trivia
    formatting options.
  • adotenv-lint: added [schema] and [schema.keys.<KEY>] configuration
    support (SchemaConfig, KeySchemaConfig, config-relative example path
    resolution, and [rules] entries for schema rules) and CLI flags
    --example <path>, --no-unknown-keys, --no-empty-values,
    --max-items <n>, --max-diagnostics <n>, --max-output-bytes <n>,
    --max-output-lines <n>, and --max-references <n>.

Changed

  • adotenv-lint: updated minimum adotenv dependency to 1.8.0, extended
    LintConfig, LintPolicy, and ConfigExplicit with schema fields, and
    excluded the configured --example / [schema] example file from recursive
    directory discovery while still linting it when passed explicitly.

adotenv 1.8.0

Choose a tag to compare

@github-actions github-actions released this 28 Nov 00:44
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.

adotenv-lsp 0.6.0

Choose a tag to compare

@asamarts asamarts released this 27 Nov 17:14
64f8949

Breaking Changes

  • Unified the stateless library API so all 12 free functions (diagnostics,
    completion, document_symbols, workspace_symbols, apply_change,
    definition, hover, references, prepare_rename, rename, formatting,
    and code_actions) accept &LspOptions consistently; removed the seven
    redundant *_with_options wrappers (completion_with_options,
    document_symbols_with_options, workspace_symbols_with_options,
    apply_change_with_options, definition_with_options,
    references_with_options, and rename_with_options). Migrate callers by
    passing &LspOptions::new() (or your existing &options) to the base
    function name.
  • references now returns each reference's exact identifier (reference.name)
    span rather than the full enclosing ${VAR:-default} operator span, matching
    definition, prepare_rename, and rename.
  • apply_change and coordinate lookups now adopt LSP 3.17 §3.1.1 end-of-line
    clamping (character > line_len on a valid line clamps to line end instead of
    returning None). Out-of-bounds lines, inverted ranges, split UTF-16
    surrogates, and mid-character UTF-8 byte offsets still return None.

Added

  • Stateful ParsedDocument and Session handles (SessionError) that parse
    and line-index each document once per open/change and serve repeated LSP
    requests without re-parsing, including atomic multi-edit apply_changes /
    Session::change rollback on invalid changes.
  • textDocument/prepareRename (prepare_rename), textDocument/formatting
    (formatting, FormattingError, LspOptions::with_format_options /
    without_format_options), and textDocument/codeAction (code_actions,
    supporting quickfix and BOM-preserving source.fixAll backed by
    adotenv-lint).
  • LSP 3.17 positionEncoding negotiation (PositionEncoding::{Utf8, Utf16, Utf32}, LspOptions::with_position_encoding) across both library and stdio
    server.
  • Bounded synchronous JSON-RPC 2.0 Content-Length stdio transport replacing
    lsp-server (8 KiB header-line limit, 32-header cap, 16 MiB default payload
    limit configurable via --max-message-bytes) enforced before allocating
    payload buffers, plus proper ServerNotInitialized (-32002) and
    post-shutdown InvalidRequest (-32600) handling.
  • Default-on stdio feature gating the adotenv-lsp binary and optional
    serde/serde_json dependencies so library embedders using
    default-features = false build only the transport-free library.
  • Workspace-folder config discovery for --discover-lint-config (checking
    InitializeParams::workspace_folders, then root_uri, then launch cwd).
  • Re-exported BlankLines, BomPolicy, Document, EditError,
    FinalNewline, FormatError, and FormatOptions; added
    LspOptions::without_lint_options; derived Clone/PartialEq/Eq on
    RenameError; added CLI flags --dialect, --max-items,
    --max-diagnostics, and --max-message-bytes; advertised serverInfo and
    versioned diagnostics; and added --package adotenv-lsp to CI
    cargo semver-checks.

Changed

  • Lowered adotenv-lsp MSRV from Rust 1.85 to Rust 1.81 (matching adotenv)
    after removing edition-2024 lsp-server, relaxed lsp-types = "0.97", and
    bumped dependency floors to adotenv 1.7.3 and adotenv-lint 0.2.3.

Fixed

  • Snapped InsideCrLf diagnostic spans monotonically to line end, anchored
    stripped BOM diagnostics to the full encoded width of the first visible
    character across UTF-8/UTF-16/UTF-32, fixed BomPolicy::Error and BOM-only
    diagnostic ranges, switched rename to recovering parsing, narrowed
    reference_at to the containing entry, escaped multiline keys in Markdown
    hover, aligned completion quote/comment/escape/command-nesting rules with core
    adotenv, returned InvalidParams and exited promptly on bad initialize,
    exited non-zero on exit before shutdown, rejected didChange on unopened
    URIs, and restricted URI ignore matching to file:// URIs with Windows
    drive-letter slash stripping.