Repository navigation
Releases
Releases · zeropier/adotenv
adotenv-lsp 0.8.0
Breaking Changes
adotenv-lsp: raised theadotenv-lintpublic re-export floor from0.3to
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), andFix::InsertEmpty.
Added
adotenv-lsp: surfaced value-freeFinding::detail()in LSP diagnostics
(escaped for control/Bidi characters) and emitted
DiagnosticTag::DEPRECATEDonadotenv-lint.deprecated-keydiagnostics.adotenv-lsp: enrichedhover(declarations and references, respecting
mask_values) andcompletion(key positions and$VAR/${VAR
references) with value-freeKeySchemaMarkdown documentation
(description,ValueShape, literal bounds, required/optional status,
empty/bare policy, and deprecation notices with control/Bidi/Markdown
escaping) andCompletionItemTag::DEPRECATEDon deprecated keys.adotenv-lsp: wiredFix::InsertEmptyinto explicitquickfixcode actions
(Add 'KEY=' placeholderand multi-keyAdd all missing keys), added
ParsedDocument::code_actions_with_schema(suppressing schema quick fixes on
open[schema] exampletemplates in the stdio server), advertised
codeActionProviderwhenever fixable style rules or a schema with
missing-keyis configured, and keptsource.fixAllstrictly style-only
(including theErr(LintError::Parse)fallback inbuild_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, statelesssemantic_tokens,
andtextDocument/semanticTokens/fullin the stdio server) and folding
ranges (ParsedDocument::folding_ranges, statelessfolding_ranges, and
textDocument/foldingRangefor multiline quoted values and contiguous
comment blocks) under negotiatedpositionEncodingwithlimit_error()
enforcement.adotenv-lsp: addedParsedDocument::set_options,Session::set_options,
Session::uris, and bounded live reload of--config/
--discover-lint-config.adotenv-lint.tomland[schema] examplefiles on
workspace/didChangeWatchedFiles(including ancestor-directory deletion
events and symlink retargeting) andtextDocument/didSave(issuing
non-blockingclient/registerCapability/client/unregisterCapability
requests for watched files and dynamictextDocument/codeActionafter
initializedwhen supported, retaining last-known-good policy with a
deduplicatedwindow/showMessagewarning 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: tightenedPhase::AfterQuotedKeyto 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), matchedInlineComments::Pythonbare-key#
comment suppression inPhase::UnquotedKey(FOO BAR#x=$), honored internal
\rwhitespace (including EOF fallback scans) underLineBreaks::Lf
dialects (Compose,Docker), preserved valid completions at
offset == comment.start(A=$#note,H#note), enforcedSyntax::Node's
adjacent-colon rule underColonSeparator::Whitespace(KEY : $H), escaped
control/Bidi characters inCompletionItem::label(preserving raw
filter_text/insert_text), and matchedworkspace_symbolsqueries against
both raw and escaped display names.
adotenv-lint 0.4.0
Changed
adotenv-lint: markedKeySchemaConfig#[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) onKeySchemaandKeySchemaConfig(accepting TOML
deprecated = true | false | "reason"and merging per-key overrides in
LintConfig::apply),Rule::DeprecatedKey(deprecated-key, configurable
via[rules]andLintOptions::with_deprecated_keys), and value-free
Finding::detail().adotenv-lint: added zero-new-dependencystdvalue shapes
ValueShape::{IpAddr, Host, SocketAddr, Email}(TOML shapesip-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_lenshorter than
configuredprefix/suffix, emptydeprecated = ""notes).adotenv-lint: added value-safe missing-key placeholder fixes
(Fix::InsertEmpty { key }, backed by verifiedEdit::Insertwith an empty
""value and never copying.env.examplevalues),BatchOptions,
apply_batch_with_policy(keeping defaultapply_batch/apply_batch_with_options
and CLI--fixstrictly style-only unless opted in), and CLI--fix --fix-missing.adotenv-lint: added SARIF 2.1.0 output (OutputFormat::Sarif,
--format=sarifwithruleIndex, 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-rulesand--explain <rule>).
adotenv 1.8.1
Fixed
adotenv: fixedDocument::exampleto insert a separating space after a
""placeholder before#underInlineComments::AnyHashwith
quoted_comments: false, emitted a""placeholder for Node cross-line
space_after_eqbefore quoted values and before next-line quoted keys under
Syntax::Node(scanning fromitem.content_span().endso 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 keptDocument::format
final-CR trailing-whitespace trimming andFinalNewline::Removealigned with
plan_trailing_whitespace(previous_ending == Cr,protect_next,
raw_values, and exposed line-break preservation on NodeA:\n \r).adotenv-lint(0.3.1): adoptedadotenv1.8.1, hardenedLintConfig::load
with a regular-file check and 4 MiB read cap (plus--max-input-bytesconfig
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-processandadotenv-cli(1.8.1): adoptedadotenv1.8.1 in
lockstep.
adotenv-lsp 0.7.2
Fixed
adotenv-lsp: replacedLiteralCloseCacheinreference_nesting_atwith 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 (<= 7Nsteps) on all adversarial nested\$(/
\${and\''sequences without allocating on benign or single-unclosed
inputs.adotenv-lsp: guardedParsedDocument::{document_symbols,workspace_symbols, definition,hover,references}withlimit_error()so documents exceeding
max_items,max_diagnostics,max_input_bytes, ormax_linesreturn
empty/Noneresults consistently across every query method.adotenv-lsp: fixedcompletion_for_entryto parse pre-separator prefixes
withCompletionContext::ofso 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=$) underDialect::PYTHON_DOTENV, added
Phase::AfterQuotedKeyand full dialect-aware whitespace handling (including
Whitespace::Compose,Whitespace::EcmaScript, andWhitespace::Python)
across key starts, value starts, colon separators, and inline comments,
clearedline_byte_limitwhen probing key syntax incompletion_insert_text,
filtered empty and whitespace-only keys out ofdocument_symbolsand
workspace_symbolsper LSP 3.17, returnedNoneonhoverfor Compose
empty keys (=anon), escaped control/Bidi characters inhoverkey/reference
labels and symbol names, and capped stdio.adotenv-lint.tomlconfig reads
atmin(--max-input-bytes, 4 MiB).
adotenv-lsp 0.7.1
Fixed
adotenv-lsp: guardedParsedDocument::completionwithlimit_error()so
oversized documents return empty completions rather than running schema
completion or scanning rejected buffers, and added exact linear-time
dead-state memoization toreference_nesting_atliteral-close scans to
prevent quadratic CPU growth on nested\$(/\${sequences.adotenv-lsp: normalizedSchemaExamplePathfallback comparisons lexically
(..segments), stripped Windows verbatim\\?\/\\?\UNC\prefixes
case-insensitively and compared case-insensitively on Windows so
.env.exampleself-exemption remains intact when the template is temporarily
absent on disk.adotenv-lsp: emitted single-quotedinsert_textfor Python quoted schema
keys requiring quotes at key start (without double-quoting inside'...),
enabled completion inside quoted key prefixes with spaces,=, or#
(includingexport '...), 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 advertisedcodeActionProvideronly when a loaded lint policy
enables at least one auto-fixable rule.
Changed
adotenv-lsp: adoptedadotenv1.8.1 andadotenv-lint0.3.1.
adotenv-lint 0.3.2
Fixed
adotenv-lint: escaped ANSI, line/paragraph separator, and Bidi control
characters in--format=githubkey annotations, and capped CLI
.adotenv-lint.tomlconfig reads atmin(--max-input-bytes, 4 MiB)so
raising--max-input-bytesfor large.envfiles does not weaken the 4 MiB
config size cap.
adotenv-lsp 0.7.0
Breaking Changes
adotenv-lsp: adoptedadotenv1.8.0 andadotenv-lint0.3.0 (bumping the
publicly re-exportedadotenv_lint::{KeyCase, LintOptions, Rule}dependency
across0.2 -> 0.3), removedCopyfromLspOptionsto carry an
Arc-sharedOption<Arc<Schema>>field (LspOptions::schema), and changed
ParsedDocument::optionsandSession::optionsto return&LspOptions.
Added
adotenv-lsp: added opt-in schema and.env.examplepresence-and-shape
diagnostics and schema key completion viaLspOptions::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 duringinitialize), enforced bounded regular-file reads
(--max-input-bytes, default 4 MiB) on config and[schema] examplefiles,
rejected empty closed[schema] allow_unknown = falsepolicies without an
example or keys, and suppressed schema checks when editing the configured
schema.exampleURI itself while retaining parser and style diagnostics.
Changed
adotenv-lsp: wireddiagnostics,formatting, andcode_actionsthrough
Document::format_with_options,lint_with_options,
apply_fix_with_options,apply_fixes_with_options, and
apply_batch_with_optionssoParseOptionsbounds are enforced before
allocating formatted or fixed output.
Fixed
adotenv-lsp: guarded theentry_atEOF fallback to require
LineEnding::Noneso hover on a trailing empty line after a newline returns
None, preserved single-stage granular edits insource.fixAll, and
restricted Windows drive-letter normalization indecoded_uri_pathto ASCII
alphabetic drive letters.
adotenv-lint 0.3.0
Added
adotenv-lint: added opt-in schema and.env.examplepresence-and-shape
policy rules (Rule::MissingKey/missing-key,Rule::UnknownKey/
unknown-key,Rule::EmptyValue/empty-value, andRule::InvalidValue/
invalid-value),Schema,KeySchema,ValueShape(Any,Bool,
Integer,UnsignedInteger,Port,Float,Url, andOneOf),
LintOptionstoggles (missing_keys,unknown_keys,empty_values,
invalid_values),lint_with_schema, andlint_with_options, keeping
findings strictly value-free and theadotenvcore policy-free.adotenv-lint: added bounded fix-application helpers
(apply_fix_with_options,apply_fixes_with_options, and
apply_batch_with_options) backed byadotenv1.8.0's
Document::edit_with_options,Document::format_with_options, and
Document::sort_with_options(plusEditOptionsre-export), with two-pass
verified convergence whenQuoteStyle::Unquotedcombines with other trivia
formatting options.adotenv-lint: added[schema]and[schema.keys.<KEY>]configuration
support (SchemaConfig,KeySchemaConfig, config-relativeexamplepath
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 minimumadotenvdependency to1.8.0, extended
LintConfig,LintPolicy, andConfigExplicitwith schema fields, and
excluded the configured--example/[schema] examplefile from recursive
directory discovery while still linting it when passed explicitly.
adotenv 1.8.0
Added
adotenv: addedCompactEntriesdisk loaders under theloadfeature
(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 returningEditError),
LimitKind::References, andEditOptions::max_references/
EditOptions::with_max_references(closing theAUD-9unbounded reference
scan insortand bounding reference scans in
rename_with_references_with_options).adotenv: addedLineIndex::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,
andOption) inDocument::deserializeandLoadedEnvironment::deserialize
using the same scalar rules as values, and documented the
#[serde(deserialize_with = ...)]pattern for typed fields inside
#[serde(flatten)].adotenv-process: addedvalidate_compact_entriesand
apply_compact_entriesforCompactEntries(skipping bareNoneentries and
validating/applying assigned entries).adotenv-cli: added global--max-items <n>and--max-diagnostics <n>
flags, added boundedfmtflags (--max-output-bytes <n>,
--max-output-lines <n>, and--max-references <n>) backed by
Document::sort_with_optionsandDocument::format_with_options, wired
get,load, andruntoCompactValues(parse_values_compact_with_options
for non-empty keys andload_cascade_values_compact_with_options), and
replaced hand-rolled BOM column calculation incheckwith
LineIndex::with_bom_policy.- Planning docs: added
docs/design/1.8.0-plan.mdcoveringadotenv-lsp 0.6.0
stabilization (#248),adotenv 1.8.0core additions (#249,#250), and
adotenv-lint 0.3.0(#251).
Fixed
adotenv: fixedDocument::formatidempotence underLineBreaks::Lf(with
and without customline_byte_limit) when quote normalization combines with
trailing-whitespace trimming orFinalNewline::Remove, fixed verification
culprit tracking inDocument::formatandDocument::sortso split-and-swallow
parse desynchronizations track all overlapping output spans and never revert
collapsed blank lines underBlankLines::Collapse, preserved leading
\u{feff}keys inQuotedTail::Appendnative tail encoding, and updated
Document::exampleto 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 customQuotedTail::NextStatementandColonSeparator
dialects (without quoting unquoted empty inline-comment lines like
B = #commentin Portable).adotenv: hardenedsrc/references.rsClosesmemoization so escaped
command operators (\-,"\-",\$(-),\${-}) and depthmax_depth + 1
fillers stay linear without clamping explicit finitemax_depthbounds,
enforcedEditOptions::max_referencesacross reference-rename verification
passes (verify_reference_rename,verify_reference_structure, and
reference_counts_bounded), and kept theEditOptions::max_references
delimiter-depth cap derived from the configured limit rather than remaining
budget sosort_with_optionsandrename_with_references_with_optionsstay
order-invariant.adotenv-cli: snappedInsideCrLfdiagnostic offsets cleanly to line end in
checkhuman/--source/GitHub output, alignedfmt --sorton partially
invalid files withfmtwithout--sort(formatting valid groups and exiting
1rather than failing strict re-parse), preserved two-argument subcommand
option values during global option extraction acrossfmt/check/diff/
set, and enforced single-occurrence validation onset --max-output-bytes
andset --max-output-lines.
adotenv-lsp 0.6.0
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,
andcode_actions) accept&LspOptionsconsistently; removed the seven
redundant*_with_optionswrappers (completion_with_options,
document_symbols_with_options,workspace_symbols_with_options,
apply_change_with_options,definition_with_options,
references_with_options, andrename_with_options). Migrate callers by
passing&LspOptions::new()(or your existing&options) to the base
function name. referencesnow returns each reference's exact identifier (reference.name)
span rather than the full enclosing${VAR:-default}operator span, matching
definition,prepare_rename, andrename.apply_changeand coordinate lookups now adopt LSP 3.17 §3.1.1 end-of-line
clamping (character > line_lenon a valid line clamps to line end instead of
returningNone). Out-of-bounds lines, inverted ranges, split UTF-16
surrogates, and mid-character UTF-8 byte offsets still returnNone.
Added
- Stateful
ParsedDocumentandSessionhandles (SessionError) that parse
and line-index each document once per open/change and serve repeated LSP
requests without re-parsing, including atomic multi-editapply_changes/
Session::changerollback on invalid changes. textDocument/prepareRename(prepare_rename),textDocument/formatting
(formatting,FormattingError,LspOptions::with_format_options/
without_format_options), andtextDocument/codeAction(code_actions,
supportingquickfixand BOM-preservingsource.fixAllbacked by
adotenv-lint).- LSP 3.17
positionEncodingnegotiation (PositionEncoding::{Utf8, Utf16, Utf32},LspOptions::with_position_encoding) across both library and stdio
server. - Bounded synchronous JSON-RPC 2.0
Content-Lengthstdio 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 properServerNotInitialized(-32002) and
post-shutdownInvalidRequest(-32600) handling. - Default-on
stdiofeature gating theadotenv-lspbinary and optional
serde/serde_jsondependencies so library embedders using
default-features = falsebuild only the transport-free library. - Workspace-folder config discovery for
--discover-lint-config(checking
InitializeParams::workspace_folders, thenroot_uri, then launch cwd). - Re-exported
BlankLines,BomPolicy,Document,EditError,
FinalNewline,FormatError, andFormatOptions; added
LspOptions::without_lint_options; derivedClone/PartialEq/Eqon
RenameError; added CLI flags--dialect,--max-items,
--max-diagnostics, and--max-message-bytes; advertisedserverInfoand
versioned diagnostics; and added--package adotenv-lspto CI
cargo semver-checks.
Changed
- Lowered
adotenv-lspMSRV from Rust 1.85 to Rust 1.81 (matchingadotenv)
after removing edition-2024lsp-server, relaxedlsp-types = "0.97", and
bumped dependency floors toadotenv 1.7.3andadotenv-lint 0.2.3.
Fixed
- Snapped
InsideCrLfdiagnostic 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, fixedBomPolicy::Errorand BOM-only
diagnostic ranges, switchedrenameto recovering parsing, narrowed
reference_atto the containing entry, escaped multiline keys in Markdown
hover, aligned completion quote/comment/escape/command-nesting rules with core
adotenv, returnedInvalidParamsand exited promptly on badinitialize,
exited non-zero onexitbeforeshutdown, rejecteddidChangeon unopened
URIs, and restricted URI ignore matching tofile://URIs with Windows
drive-letter slash stripping.