Skip to content

Releases

v0.1.4

Choose a tag to compare

@khanakia khanakia released this 13 Nov 14:30

First public release. The earlier v0.1.1–v0.1.2 tags were pre-releases; they are retracted in go.mod, and everything they contained is in this release.

Added

  • First release of the shared base, stdlib only, additive-only from here on.
  • plugin: Plugin, Lookuper, Resolver, CommandRunner, ValueTransformer(path, value), SaveGuard(Document), ExpandObserver, Validator, Includer, the Document view, capabilities, Registry, *plugin.Error and ErrUnavailable, ErrUnsupportedScheme, ErrDenied, ErrNotFound.
  • expand: ${VAR} engine with every operator, nesting, $$, $(cmd) only with a runner, ${scheme:ref} through resolvers, cycle guard with positions.
  • atomicfile: temp file, fsync, chmod, rename, folder fsync; keeps mode; writes through symlinks.
  • pos: Pos, offset Index, file:line:col Error and ErrorList.
  • path: dotted paths with quoted segments and indexes, JSON Pointer, ParseAny; a leading / key is quoted so ParseAny(p.String()) round-trips.
  • texttest: round-trip and untouched-bytes property harness and a shared awkward-input corpus.
  • expand.CommandError: the error for a $(command) whose runner failed; Cmd names the command as handed to the runner and Unwrap returns the runner's error.

Changed during the pre-releases

  • expand: a $(command) whose Run returns an error (the command failed, exited non-zero or was refused) now stops Expand with a *expand.CommandError instead of expanding to "". Behaviour change: a failed command no longer reads as an empty value. dotenv and jsonc report it from GetExpanded/Expanded (jsonc at the value's file:line:col).

Fixed during the pre-releases

  • pos.ErrorList.Error() says "(and 1 more error)" for two errors; "(and N more errors)" is kept for more.

Documentation

  • Repository-wide docs under docs/: a 14-step learning path and a "start from your goal" table (docs/README.md), 49 step-by-step guides, with an index page per folder, covering every module (getting started, dotenv, jsonc, jsonc tools, value plugins, the command line, push providers and clikit, base packages), decision guides under docs/choosing/ (format and modules, methods, value plugins, options per kind of app, library or CLI), a feature index of all 136 features with the guide step and example for each (docs/reference/features.md), and an architecture diagram (docs/assets/architecture.svg).
  • examples/: a test-only module of 46 runnable programs, one per guide topic, each with a README and a test that checks its output; guide snippets are copied from them and kept in sync by docsync.
  • Module READMEs name their current tag, and links that used to go to the archived ubgo/dotenv docs point at the new guides.
  • Repository: README with install, quick start per format and FAQ; CONTRIBUTING.md, CODE_OF_CONDUCT.md, SECURITY.md, and GitHub issue and pull request templates.

textdatactl/v0.1.5

Choose a tag to compare

@khanakia khanakia released this 13 Nov 15:22

Changed

  • Requires github.com/ubgo/textdata/jsonc/cli v0.1.5 and jsonc v0.1.5: textdatactl jsonc edits and fmt keep a mixed LF/CRLF file's own line ending instead of one taken from inside a block comment.

textdatactl/v0.1.4

Choose a tag to compare

@khanakia khanakia released this 13 Nov 14:36

First public release. The earlier cmd/textdatactl/v0.1.1–cmd/textdatactl/v0.1.2 tags were pre-releases; they are retracted in go.mod, and everything they contained is in this release.

Added

  • Umbrella CLI: textdatactl dotenv … and textdatactl jsonc … by delegation, version and --version from voltkit versioncmd.Collect.

Fixed during the pre-releases

  • Release builds are no longer stamped (dirty): volt writes its archives into dist/ while building, and the repo now git-ignores that folder. In textdatactl v0.1.1 every platform except darwin/arm64 was stamped dirty.
  • textdatactl completion <shell> prints a completion script for textdatactl, and its __complete requests inside dotenv and jsonc reach those formats' verbs; textdatactl dotenv completion printed a dotenvctl script before. textdatactl dotenv <verb> --help examples now say textdatactl dotenv.
  • Exec plugins run as textdatactl dotenv <plugin> can call the host back: textdatactl sets DOTENVCTL_BIN_ARGS=dotenv, so "$DOTENVCTL_BIN" ${DOTENVCTL_BIN_ARGS:-} -f FILE get KEY reaches the dotenv verbs instead of failing with unknown shorthand flag: 'f'.

plugins/vault/v0.1.4

Choose a tag to compare

@khanakia khanakia released this 13 Nov 14:32

First public release. The earlier plugins/vault/v0.1.1 tag was a pre-release; it is retracted in go.mod, and everything it contained is in this release.

Added

  • HashiCorp Vault Resolver + Lookuper: KV v1/v2 over HTTP, path[?version=N][#field], namespace, opt-in FromEnv, per-plugin cache, ErrDenied/ErrUnavailable/ErrNotFound mapping; stdlib only.
  • Requires only the base module github.com/ubgo/textdata: importing the plugin pulls no format. Its tests in dotenv and jsonc live in the repo's test-only integration/ module.

plugins/gopass/v0.1.4

Choose a tag to compare

@khanakia khanakia released this 13 Nov 14:32

First public release. The earlier plugins/gopass/v0.1.1 tag was a pre-release; it is retracted in go.mod, and everything it contained is in this release.

Added

  • gopass Resolver (${gopass:ref}) and an optional prefix/mapping Lookuper; injectable runner, per-plugin cache, context and timeout; secrets never in errors or argv.
  • Requires only the base module github.com/ubgo/textdata: importing the plugin pulls no format. Its tests in dotenv and jsonc live in the repo's test-only integration/ module.

plugins/file/v0.1.4

Choose a tag to compare

@khanakia khanakia released this 13 Nov 14:32

First public release. The earlier plugins/file/v0.1.1 tag was a pre-release; it is retracted in go.mod, and everything it contained is in this release.

Added

  • file Resolver (${file:ref}) relative to a base folder, confined to it by default (.., absolute and symlink escapes refused through os.Root), WithRoot, Unconfined(), size limit, one trailing newline trimmed.
  • Requires only the base module github.com/ubgo/textdata: importing the plugin pulls no format. Its tests in dotenv and jsonc live in the repo's test-only integration/ module.

plugins/extends/v0.1.4

Choose a tag to compare

@khanakia khanakia released this 13 Nov 14:32

First public release. The earlier plugins/extends/v0.1.1 tag was a pre-release; it is retracted in go.mod, and everything it contained is in this release.

Added

  • plugin.Includer for $extends: New (disk; WithRoot confinement through the real path and os.Root, AllowAbsolute, WithMaxSize) and NewFS (fs.FS).
  • Requires only the base module github.com/ubgo/textdata: importing the plugin pulls no format. Its tests in dotenv and jsonc live in the repo's test-only integration/ module.

plugins/aws/v0.1.4

Choose a tag to compare

@khanakia khanakia released this 13 Nov 14:33

First public release. The earlier plugins/aws/v0.1.1 tag was a pre-release; it is retracted in go.mod, and everything it contained is in this release.

Added

  • AWS Secrets Manager and SSM Parameter Store Resolver + Lookuper: sm/ and ssm/ grammar, #jsonKey, stage/version, stdlib SigV4 checked against AWS's published suite, static/env/shared-file/source credentials, endpoint override, per-plugin cache.
  • Requires only the base module github.com/ubgo/textdata: importing the plugin pulls no format. Its tests in dotenv and jsonc live in the repo's test-only integration/ module.

jsonc/v0.1.5

Choose a tag to compare

@khanakia khanakia released this 13 Nov 15:20

Fixed

  • Text inserted into a file that mixes LF and CRLF took its line ending from a line break inside a block comment. In {/*\r\n*/\n}, Set wrote a CRLF that Delete then left behind, so Set then Delete no longer gave back the input. Inserted text now uses the break where it goes, or the line break just before the new line, or the document's first line break outside a comment, never one inside a block comment. This covers Set and SetAfter/SetBefore on objects, Append/Insert on arrays, SetComment and the comments Merge copies. Found by FuzzSetDelete; the input is kept as a fuzz seed, and a table test covers each mixed LF/CRLF layout.
  • format.Format took the line ending from the first line break anywhere, so a CRLF inside a block comment turned an LF file into a CRLF one. It now uses the first break outside a block comment or string.

jsonc/v0.1.4

Choose a tag to compare

@khanakia khanakia released this 13 Nov 14:31

First public release. The earlier jsonc/v0.1.1–jsonc/v0.1.3 tags were pre-releases; they are retracted in go.mod, and everything they contained is in this release.

Added

  • Lossless JSONC parser (tolerant by default, Strict() for plain JSON matching encoding/json.Valid), comments attached to members, file:line:col errors.
  • Read: JSON, Decode, Get and typed getters, Has, Keys, Len, Kind, Comment, Pos, KeyPos, dotted paths and JSON Pointer; Read one-call.
  • Edit: Set, SetAfter, SetBefore, Delete, Append, Insert, Remove, SetComment, RemoveComment, Disable, Restore, Merge, Clone; Save/SaveAs through atomicfile with save guards.
  • Dynamic values: expansion through the base engine with Lookupers, Resolvers, CommandRunner and ValueTransformers (off by default; positioned errors); $extends through Extended when an Includer is installed.
  • Lint, and packages format (Format, Minify), generate (builders, FromStruct), schema (FromStruct, Parse/Load, Validate, Plugin), diff (Diff).
  • Tests: JSONTestSuite conformance, a JSONC case set, property tests through texttest, fuzz targets for parse, edits, merge, format, lint, extends, schema and diff.

Changed during the pre-releases

  • schema.Plugin is now also a plugin.SaveGuard: installing it makes Save and SaveAs refuse a document with schema errors, leaving the file untouched. Warnings never refuse a save. It used to be a Validator only, so Save never ran it.
  • A failing or refused $(command) is now an error from GetExpanded, Expanded and Read with expansion, carrying the value's file:line:col and unwrapping to *expand.CommandError; it used to expand to "" silently.
  • Read on a missing file now returns an error that names the path and wraps fs.ErrNotExist, matching dotenv.Read; it used to return an empty map and no error. Open is unchanged: a missing file is still an empty document that Save creates.

Fixed during the pre-releases

  • Doc.Pos, Doc.KeyPos and every error position raced when several goroutines read one unedited Doc: the lazily built offset index is now an atomic pointer, reset the same way by every edit. Clone builds a new Doc instead of copying one. Pinned by a race-detector test.
  • schema.Parse reported a type that is neither a string nor an array as must be an array of strings; a single type name is valid too, so it now says must be a string or an array of strings.