Skip to content

Release 1.5.1: drop the last dependency, add a help system, correct the docs - #13

Merged
umudhasanli merged 1 commit into
mainfrom
fix/zero-dependency-and-help
Aug 6, 2026
Merged

Release 1.5.1: drop the last dependency, add a help system, correct the docs#13
umudhasanli merged 1 commit into
mainfrom
fix/zero-dependency-and-help

Conversation

@umudhasanli

Copy link
Copy Markdown
Collaborator

Zero dependencies, for real this time

package.json declared undici-types as a runtime dependency, so
npm install flare-redact pulled a package down with every copy — while the
README carried a "dependencies 0" badge and the description said
"Zero-dependency". Nothing in src/ ever imported it.

It is gone. A clean install now brings exactly one package, and a TypeScript
consumer still compiles: the type it existed to satisfy comes from the
consumer's own @types/node, which is where it belonged.

ts-consumer@1.0.0
├─┬ @types/node@20.19.43
│ └── undici-types@6.21.0      <- theirs, not ours
├── flare-redact@1.5.1
└── typescript@5.9.3

The npm package also carries no Python, Go or Rust code — the files list never
included sdk/, and this PR says so explicitly in the README so nobody has to
check.

A CLI that answers questions

flare-redact help [topic]. A flag list tells you a flag exists and nothing
about when to reach for it, so there are ten topics that explain the thing
behind the flag: detectors, modes, vault, scan, files, gateway,
library, sdks, env, exit-codes.

$ flare-redact help modes
MODES — what replaces a matched value

  --mode mask        the default. Partial, shape-preserving: a***@***, sk-***
  --mode hash        keyed HMAC-SHA-256. Same input, same output, so you can
                     still count and join on it. Requires a key.
  …

Any detector id is a topic too — flare-redact help email gives what it finds,
whether it runs by default, its tags, and how to select or drop it. A name that
matches nothing suggests the nearest one rather than failing with nothing to go
on, goes to stderr, and exits 2 so it never lands in a piped report.

flare-gateway help and flare-redact gateway help now work alongside
--help, and an unknown flag on either CLI points at the help instead of only
complaining.

Documentation that was wrong

  • The Python and Rust installs did not work. pip install flare-redact and
    flare-redact = "1.5" were documented in the README, both SDK READMEs and the
    release notes, but neither package is on PyPI or crates.io — both return 404.
    Replaced with the repository installs, which are now tested end to end:
    pip install from the git subdirectory imports and redacts, and a Cargo git
    dependency builds and runs. The Go module was and remains installable with
    go get.
  • The README badge claimed 56 detectors; there are 82.
  • The CI example and the docs site still pinned 1.4.1, and the playground
    bundle on the docs site was still the 1.4.x build. All three now track the
    release, and the docs-site test that pinned the old label was updated with
    them.
  • bin/flare-gateway.mjs was committed without the executable bit that
    bin/flare-redact.mjs has.

Verification

Node 354 tests (13 new, covering the help system)
Python 87 · Go 18 · Rust 19
Lint go vet, clippy --all-targets -D warnings
Spec drift check and conformance build
Packaging npm ci, npm audit, npm pack, and a TypeScript consumer compiling against a clean install of the tarball
Examples all three smokes

…he docs

Remove the `undici-types` runtime dependency. Nothing imported it, but npm
installed it with every copy of the package, which made "zero-dependency" a
claim rather than a fact. Installing flare-redact now adds exactly one package.
TypeScript consumers are unaffected: the type it existed to satisfy comes from
their own @types/node.

Add `flare-redact help [topic]`. Ten topics — detectors, modes, vault, scan,
files, gateway, library, sdks, env and exit-codes — answer the question behind
the flag rather than restating the flag. Any detector id is also a topic, an
unknown name suggests the nearest one instead of failing with nothing to go on,
and unresolved help goes to stderr so it never pollutes a piped report. Bare
`help` now works on the gateway too, and an unknown flag on either CLI points
at it.

Correct the documentation. The Python and Rust engines are not on PyPI or
crates.io, so the README, both SDK READMEs and `help sdks` were giving install
commands that fail; they now give the repository installs that work, and say
why. The README badge claimed 56 detectors where there are 82, the CI example
and the docs site still pinned 1.4.1, and the playground bundle was still the
1.4.x build.

Verified: 354 Node tests, 87 Python, 18 Go, 19 Rust, go vet, clippy -D warnings,
the spec drift and conformance checks, all three example smokes, and a
TypeScript consumer compiling against a clean install of the packed tarball with
zero transitive packages.
@umudhasanli
umudhasanli merged commit f65c79e into main Aug 6, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant