@vllnt/convex-suppression 0.1.1-canary.dc30a0f → 0.2.0-canary.4bb2fbc
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 +62 -17
- package/README.md +412 -162
- package/dist/client/index.d.ts +33 -10
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +33 -10
- package/dist/client/index.js.map +1 -1
- package/dist/component/convex.config.d.ts +1 -0
- package/dist/component/convex.config.d.ts.map +1 -1
- package/dist/component/convex.config.js +1 -0
- package/dist/component/convex.config.js.map +1 -1
- package/dist/component/mutations.d.ts +18 -4
- package/dist/component/mutations.d.ts.map +1 -1
- package/dist/component/mutations.js +25 -10
- package/dist/component/mutations.js.map +1 -1
- package/dist/component/validators.d.ts +14 -5
- package/dist/component/validators.d.ts.map +1 -1
- package/dist/component/validators.js +29 -7
- package/dist/component/validators.js.map +1 -1
- package/dist/shared.d.ts +1 -0
- package/dist/shared.d.ts.map +1 -1
- package/dist/shared.js +1 -0
- package/dist/shared.js.map +1 -1
- package/docs/API.md +248 -107
- package/llms.txt +68 -14
- package/package.json +21 -18
- package/src/client/index.ts +33 -10
- package/src/component/convex.config.ts +1 -0
- package/src/component/mutations.ts +25 -10
- package/src/component/validators.ts +35 -7
- package/src/shared.ts +1 -0
- package/src/test.ts +5 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,7 +4,7 @@ All notable changes to this project are documented here. The format is based on
|
|
|
4
4
|
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project
|
|
5
5
|
adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
-
## [Unreleased
|
|
7
|
+
## [0.2.0] - Unreleased
|
|
8
8
|
|
|
9
9
|
### Added
|
|
10
10
|
|
|
@@ -16,13 +16,30 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
|
16
16
|
|
|
17
17
|
### Changed
|
|
18
18
|
|
|
19
|
-
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
- **Breaking:** `suppress` and `recordOptIn` now throw
|
|
20
|
+
`ConvexError({ code: "INVALID_ARGUMENT", field })` for a `contactHash`,
|
|
21
|
+
`channel`, `listKey` or `source` over 256 UTF-8 bytes, and for an opt-in
|
|
22
|
+
`proof` over 16384 UTF-8 bytes of its JSON form (`field: "proof"`). Sizes
|
|
23
|
+
count UTF-8 bytes, not characters: `"é"` is 2 bytes. Hash and normalize each
|
|
24
|
+
contact to a short fixed-length key such as a hex SHA-256 (64 bytes), keep
|
|
25
|
+
`proof` small, and store large evidence in the host and pass a reference.
|
|
26
|
+
Rows stored earlier with longer keys stay readable through `isSuppressed`,
|
|
27
|
+
`isEligible` and `getOptInProof`; `suppress` or `recordOptIn` on such a key
|
|
28
|
+
now throws and leaves the row unchanged; `unsuppress` is not size-checked and
|
|
29
|
+
still removes it.
|
|
22
30
|
- Removed the `by_hash` index; it was unused and a prefix of `by_hash_channel`.
|
|
23
|
-
One less index entry written per suppression and less index storage.
|
|
24
|
-
|
|
25
|
-
|
|
31
|
+
One less index entry written per suppression and less index storage. No
|
|
32
|
+
migration is needed; the next deploy drops the index.
|
|
33
|
+
- Release automation: pinned actions, least-privilege permissions, npm trusted
|
|
34
|
+
publishing with provenance; `@latest` is published only from a `vX.Y.Z` tag on
|
|
35
|
+
`main`.
|
|
36
|
+
- Every push to `main` publishes a `@canary` build of that commit; the opt-in
|
|
37
|
+
repository-variable gate is removed.
|
|
38
|
+
- The README install command now installs the stable release.
|
|
39
|
+
- Internal: CI and publish set up pnpm through Corepack, so every action in
|
|
40
|
+
`ci.yml` and `publish.yml` is GitHub's own and pinned to a commit; the
|
|
41
|
+
privacy guard pins its GitHub actions to commits; CI cancels only superseded
|
|
42
|
+
pull request runs; there is no version-update bot.
|
|
26
43
|
|
|
27
44
|
### Fixed
|
|
28
45
|
|
|
@@ -31,20 +48,48 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
|
31
48
|
`channel`, `listKey` or `source`. `isEligible` previously answered `true` for
|
|
32
49
|
an empty `contactHash` or `channel`; it now answers `false`, so the send gate
|
|
33
50
|
fails closed. Documented that keys are matched exactly (no case, whitespace or
|
|
34
|
-
plus-address normalization; the host normalizes).
|
|
51
|
+
plus-address normalization; the host normalizes). **Upgrade note:** a
|
|
52
|
+
`suppress` or `recordOptIn` call that passed an empty string for one of these
|
|
53
|
+
fields succeeded in 0.1.0 and now throws; check for empty values before
|
|
54
|
+
calling. Omitting `channel` or `listKey` (global entry) is unaffected.
|
|
35
55
|
- The `./test` entry now type-checks for consumers using
|
|
36
56
|
`moduleResolution: nodenext` (relative imports use `.js`; Vite client types
|
|
37
57
|
are referenced). The README documents the `convex-test` and `vitest`
|
|
38
58
|
requirement.
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
`
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
59
|
+
- `register(t)` from `./test` now accepts the host app's
|
|
60
|
+
`convexTest(hostSchema)`; it was typed against the component's own schema, so
|
|
61
|
+
any host schema with its own tables failed with TS2345. Types only; no runtime
|
|
62
|
+
change.
|
|
63
|
+
- The `proofValidator` example in the `Suppression` JSDoc passed
|
|
64
|
+
`v.object(...).parse`, which Convex validators do not have; it now shows a
|
|
65
|
+
host parser `(unknown) => TProof`.
|
|
66
|
+
|
|
67
|
+
### Documentation
|
|
68
|
+
|
|
69
|
+
- README rewritten in the shared @vllnt layout: For coding agents, When to use,
|
|
70
|
+
Install, Quick start, API (one row per export), Common tasks, Errors and
|
|
71
|
+
fixes, Limits and gotchas, Compatibility, Testing, Security, Related
|
|
72
|
+
packages, Contributing, Links, License and the vllnt footer. Badges moved to
|
|
73
|
+
the end.
|
|
74
|
+
- `docs/API.md` checked against the code: one section per export and per
|
|
75
|
+
`Suppression` method, the tables and indexes, and newly documented behavior:
|
|
76
|
+
`"*"` as a `channel` or `listKey` targets the global entry, `reason:
|
|
77
|
+
"global"` does not make an entry global, recording an opt-in again without
|
|
78
|
+
`proof` removes the stored proof, the `proofValidator` return value is what
|
|
79
|
+
is stored, an empty `channel` in `isSuppressed` checks only the global
|
|
80
|
+
entry, and a `proofValidator` error from `recordOptIn` is a
|
|
81
|
+
synchronous throw, not a rejected promise.
|
|
82
|
+
- `llms.txt` now has the package summary, When to use, a link to the errors
|
|
83
|
+
table and the shared Ecosystem block.
|
|
84
|
+
- New `package.json` description and keywords, shared by the README and
|
|
85
|
+
`llms.txt`.
|
|
86
|
+
- TSDoc summaries on every public export, and
|
|
87
|
+
`@see https://oss.vllnt.com/packages/convex-suppression` on `Suppression`.
|
|
88
|
+
Comment-only: `dist` changes only in comments and source maps.
|
|
89
|
+
- `pnpm test:package` now runs a docs contract test
|
|
90
|
+
(`scripts/check-documentation.mjs`) on the installed tarball, and type-checks
|
|
91
|
+
every README and `docs/API.md` TypeScript example against it; the README test
|
|
92
|
+
example runs under Vitest.
|
|
48
93
|
|
|
49
94
|
## [0.1.0] - 2026-09-01
|
|
50
95
|
|