anonyma 1.1.0-beta.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +72 -13
- package/README.md +307 -81
- package/dist/ai/index.cjs +3 -3
- package/dist/ai/index.d.cts +5 -5
- package/dist/ai/index.d.ts +5 -5
- package/dist/ai/index.js +2 -2
- package/dist/audit/index.cjs +3 -3
- package/dist/audit/index.d.cts +2 -2
- package/dist/audit/index.d.ts +2 -2
- package/dist/audit/index.js +2 -2
- package/dist/{chunk-7Y4X3Z3T.js → chunk-G4AN7FND.js} +3 -3
- package/dist/{chunk-7Y4X3Z3T.js.map → chunk-G4AN7FND.js.map} +1 -1
- package/dist/{chunk-7GPLMGZ3.js → chunk-GBYHQQUY.js} +19 -30
- package/dist/chunk-GBYHQQUY.js.map +1 -0
- package/dist/{chunk-2NTQ2455.js → chunk-GS3FRH4K.js} +2 -2
- package/dist/chunk-GS3FRH4K.js.map +1 -0
- package/dist/{chunk-SCWWWJJZ.cjs → chunk-IHEIYZPL.cjs} +2 -2
- package/dist/chunk-IHEIYZPL.cjs.map +1 -0
- package/dist/{chunk-UHNALA3S.cjs → chunk-IJAMLYOT.cjs} +11 -11
- package/dist/{chunk-UHNALA3S.cjs.map → chunk-IJAMLYOT.cjs.map} +1 -1
- package/dist/{chunk-IFMYNZQN.cjs → chunk-ISL5B4LU.cjs} +4 -4
- package/dist/{chunk-IFMYNZQN.cjs.map → chunk-ISL5B4LU.cjs.map} +1 -1
- package/dist/{chunk-O5LRGWLY.js → chunk-JKW36IPT.js} +3 -3
- package/dist/{chunk-O5LRGWLY.js.map → chunk-JKW36IPT.js.map} +1 -1
- package/dist/{chunk-NTG222XM.cjs → chunk-ZXPZ7W37.cjs} +28 -39
- package/dist/chunk-ZXPZ7W37.cjs.map +1 -0
- package/dist/compliance/index.d.cts +5 -198
- package/dist/compliance/index.d.ts +5 -198
- package/dist/crypto.d.cts +1 -1
- package/dist/crypto.d.ts +1 -1
- package/dist/detectors/index.d.cts +1 -1
- package/dist/detectors/index.d.ts +1 -1
- package/dist/engine/index.cjs +25 -25
- package/dist/engine/index.d.cts +3 -3
- package/dist/engine/index.d.ts +3 -3
- package/dist/engine/index.js +2 -2
- package/dist/index.cjs +45 -25
- package/dist/index.d.cts +80 -5
- package/dist/index.d.ts +80 -5
- package/dist/index.js +4 -4
- package/dist/{json-CBncvuY_.d.ts → json-BruY_-tV.d.ts} +1 -1
- package/dist/{json-CkGYK7l4.d.cts → json-CvKtPL8l.d.cts} +1 -1
- package/dist/mcp/index.cjs +8 -8
- package/dist/mcp/index.cjs.map +1 -1
- package/dist/mcp/index.js +3 -3
- package/dist/mcp/index.js.map +1 -1
- package/dist/middleware/express.cjs +4 -4
- package/dist/middleware/express.d.cts +3 -3
- package/dist/middleware/express.d.ts +3 -3
- package/dist/middleware/express.js +3 -3
- package/dist/middleware/hono.cjs +4 -4
- package/dist/middleware/hono.d.cts +3 -3
- package/dist/middleware/hono.d.ts +3 -3
- package/dist/middleware/hono.js +3 -3
- package/dist/middleware/index.cjs +4 -4
- package/dist/middleware/index.d.cts +3 -3
- package/dist/middleware/index.d.ts +3 -3
- package/dist/middleware/index.js +3 -3
- package/dist/schemas.cjs +1 -1
- package/dist/schemas.cjs.map +1 -1
- package/dist/schemas.d.cts +16 -6
- package/dist/schemas.d.ts +16 -6
- package/dist/schemas.js +1 -1
- package/dist/schemas.js.map +1 -1
- package/dist/{session-B4lJTMrN.d.ts → session-CEFGgjFV.d.ts} +1 -1
- package/dist/{session-DP66OFAB.d.cts → session-DEQrPea7.d.cts} +1 -1
- package/dist/stream.cjs +5 -5
- package/dist/stream.d.cts +1 -1
- package/dist/stream.d.ts +1 -1
- package/dist/stream.js +2 -2
- package/dist/{types-_QrW2-Iq.d.cts → types-BL5UWH0y.d.cts} +2 -2
- package/dist/types-BtvX8QTd.d.cts +199 -0
- package/dist/types-D5BeXwnX.d.ts +199 -0
- package/dist/{types-ipG-_Imf.d.ts → types-cbGVW8cD.d.cts} +47 -8
- package/dist/{types-ipG-_Imf.d.cts → types-cbGVW8cD.d.ts} +47 -8
- package/dist/{types-Bf8AbYPJ.d.ts → types-oxllMFYF.d.ts} +2 -2
- package/dist/vault/index.d.cts +4 -4
- package/dist/vault/index.d.ts +4 -4
- package/package.json +7 -3
- package/dist/chunk-2NTQ2455.js.map +0 -1
- package/dist/chunk-7GPLMGZ3.js.map +0 -1
- package/dist/chunk-NTG222XM.cjs.map +0 -1
- package/dist/chunk-SCWWWJJZ.cjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,21 +7,51 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
-
## [
|
|
10
|
+
## [1.1.1] — 2026-10-05
|
|
11
|
+
|
|
12
|
+
Patch release. The 1.x functions now exempt a detected value only when it equals an `allowlist`
|
|
13
|
+
entry, as documented; since 1.0.0 they also exempted every value that contained one. Code that
|
|
14
|
+
relied on such partial matches will see those values anonymized, and can use `allowlistPatterns`
|
|
15
|
+
to match a part of a value instead. The span engine (`"anonyma/engine"`) is unchanged.
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
|
|
19
|
+
- **`allowlist`** skips a detected value only when the value equals an entry, as documented.
|
|
20
|
+
Entries were matched as substrings, so `allowlist: ["bob@example.com"]` also left
|
|
21
|
+
`jimbob@example.com` in the output of `anonymize()`, `anonymizeAsync()`, `tokenize()`,
|
|
22
|
+
`sanitizeForLLM()` and the methods of `createAnonymizer()`; an entry naming a domain left
|
|
23
|
+
every address of that domain, and an empty entry left every value. A value that merely
|
|
24
|
+
contains an entry is now anonymized. `allowlistPatterns` still match a part of a value.
|
|
25
|
+
- **`createAnonymizer().tokenize()`** matched `allowlist` entries as regular expressions: an
|
|
26
|
+
entry containing `(` threw a `SyntaxError`, and `"x.y@example.com"` also exempted
|
|
27
|
+
`"xzy@example.com"`.
|
|
28
|
+
- **`allowlistPatterns`** with the `g` or `y` flag skipped only every other matching value,
|
|
29
|
+
because `RegExp.test()` kept its `lastIndex` between values, and left the caller's pattern
|
|
30
|
+
with a changed `lastIndex`. These flags are now ignored.
|
|
11
31
|
|
|
12
32
|
---
|
|
13
33
|
|
|
14
|
-
## [1.1.0
|
|
34
|
+
## [1.1.0] — 2026-10-05
|
|
35
|
+
|
|
36
|
+
Additive release. The 1.0 functions (`anonymize`, `tokenize`, `anonymizeObject`, the streams,
|
|
37
|
+
`sanitizeForLLM`, …) keep their behaviour, apart from the fixes listed under "Fixed". Text
|
|
38
|
+
processed with the `hipaa` and `ccpa` presets may have more values replaced (see "Changed").
|
|
15
39
|
|
|
16
|
-
|
|
40
|
+
The subpath exports `anonyma/engine`, `/vault`, `/audit`, `/compliance`, `/ai`, `/mcp` and
|
|
41
|
+
`/middleware` are new. They were experimental in 1.1.0-beta.0 and are stable from this release:
|
|
42
|
+
they follow semantic versioning like the rest of the package.
|
|
17
43
|
|
|
18
|
-
|
|
19
|
-
the 1.x streams, `sanitizeForLLM`, …) keep their behaviour, apart from the fixes listed
|
|
20
|
-
under "Fixed".
|
|
44
|
+
Changes since 1.1.0-beta.0:
|
|
21
45
|
|
|
22
|
-
The
|
|
23
|
-
|
|
24
|
-
|
|
46
|
+
- The error classes added in this release are exported from `"anonyma"`. The pre-release did
|
|
47
|
+
not export them from any entry point, so they could not be used with `instanceof`.
|
|
48
|
+
- The subpath exports are no longer experimental.
|
|
49
|
+
- The warnings that `anonymize()` and `anonymizeAsync()` print for a strategy they do not apply
|
|
50
|
+
name the span engine, which applies it, instead of `anonymizeAsync()`, which does not.
|
|
51
|
+
- The README and the TSDoc describe the subpath modules, and say which declared options the 1.x
|
|
52
|
+
functions do not apply (see "Known limitations").
|
|
53
|
+
- Releases are published through npm trusted publishing only, and a stable version only from a
|
|
54
|
+
commit on `main`. The tests also run on Node.js 26.
|
|
25
55
|
|
|
26
56
|
### Added
|
|
27
57
|
|
|
@@ -57,7 +87,7 @@ still change between pre-releases.
|
|
|
57
87
|
**`"anonyma/middleware/hono"`** — `createScrubber()`, `anonymaExpress()`, `anonymaHono()`.
|
|
58
88
|
- **Presets `lgpd` and `pipeda`.**
|
|
59
89
|
- **Error classes** `AsyncStrategyError`, `KeyManagementError`, `TokenVaultError`,
|
|
60
|
-
`PolicyError`, `
|
|
90
|
+
`PolicyError` and `AuditIntegrityError`, exported from `"anonyma"` like the others.
|
|
61
91
|
- **`./package.json`** in the export map.
|
|
62
92
|
- **Benchmark** (`npm run bench`, `bench/`) and labelled detector corpora
|
|
63
93
|
(`tests/fixtures/corpus/`).
|
|
@@ -75,9 +105,9 @@ still change between pre-releases.
|
|
|
75
105
|
uses the same class instances, so `instanceof AnonymaError` holds for errors thrown
|
|
76
106
|
by any subpath. The `dist/` layout gains `chunk-*.js` files.
|
|
77
107
|
- `PresetNotFoundError` lists the eight presets.
|
|
78
|
-
- **Releases** are built and published by GitHub Actions from a version tag,
|
|
79
|
-
provenance attestation, a GitHub build attestation and a
|
|
80
|
-
GitHub release.
|
|
108
|
+
- **Releases** are built and published by GitHub Actions from a version tag, through npm
|
|
109
|
+
trusted publishing, with an npm provenance attestation, a GitHub build attestation and a
|
|
110
|
+
CycloneDX SBOM attached to the GitHub release.
|
|
81
111
|
- **Development** needs Node.js 22.22 or newer. The package still supports Node.js 18:
|
|
82
112
|
every release is installed and exercised on Node.js 18, 20, 22, 24 and 26.
|
|
83
113
|
|
|
@@ -94,6 +124,32 @@ still change between pre-releases.
|
|
|
94
124
|
replaced.
|
|
95
125
|
- **`synthesize()`** no longer crashes, or returns `[object Undefined]`, for a category
|
|
96
126
|
named like an `Object.prototype` member (`constructor`, `toString`, …).
|
|
127
|
+
- The warning printed when `anonymize()` or `anonymizeAsync()` redacts a value whose rule is
|
|
128
|
+
`tokenize`, `encrypt` or `synthesize` advised `anonymizeAsync()`, which redacts it too.
|
|
129
|
+
|
|
130
|
+
### Known limitations
|
|
131
|
+
|
|
132
|
+
The 1.0 documentation described behaviour that the 1.x functions do not have. The
|
|
133
|
+
documentation now describes what they do; the behaviour itself is unchanged:
|
|
134
|
+
|
|
135
|
+
- `anonymize()`, `anonymizeAsync()` and the functions built on them redact a value whose rule
|
|
136
|
+
is `tokenize`, `encrypt` or `synthesize`, with a warning, and the synchronous functions
|
|
137
|
+
replace a `hash` rule with a seeded pseudonym. A pipeline from `"anonyma/engine"` applies
|
|
138
|
+
every strategy.
|
|
139
|
+
- `createAnonymizer()` does not apply `plugins` (`AnonymaPlugin`).
|
|
140
|
+
- With `preset` set, `anonymize()` ignores `enabledCategories`; a pipeline can add categories
|
|
141
|
+
to a preset.
|
|
142
|
+
- `tokenize()` does not apply `format: "custom"` with `tokenTemplate`, nor
|
|
143
|
+
`deterministic: false`, and no function applies `locales`.
|
|
144
|
+
- `AnonymizeOptionsSchema.parse()` removes `preset`, `allowlist`, `confidenceThreshold`,
|
|
145
|
+
`locales` and the other options the schema does not describe.
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## [1.1.0-beta.0] — 2026-10-04
|
|
150
|
+
|
|
151
|
+
Pre-release of 1.1.0, published under the `next` dist-tag. Its changes are listed under
|
|
152
|
+
[1.1.0], together with the changes made since.
|
|
97
153
|
|
|
98
154
|
---
|
|
99
155
|
|
|
@@ -544,5 +600,8 @@ All types are zero-cost, type-only exports (stripped by `tsc`; no runtime overhe
|
|
|
544
600
|
- **Prettier** code formatting.
|
|
545
601
|
- **MIT License**.
|
|
546
602
|
|
|
603
|
+
[Unreleased]: https://github.com/izaccavalheiro/anonyma/compare/v1.1.1...HEAD
|
|
604
|
+
[1.1.1]: https://github.com/izaccavalheiro/anonyma/releases/tag/v1.1.1
|
|
605
|
+
[1.1.0]: https://github.com/izaccavalheiro/anonyma/releases/tag/v1.1.0
|
|
547
606
|
[1.1.0-beta.0]: https://github.com/izaccavalheiro/anonyma/releases/tag/v1.1.0-beta.0
|
|
548
607
|
[1.0.0]: https://github.com/izaccavalheiro/anonyma/releases/tag/v1.0.0
|