@vllnt/convex-comments 0.1.1-canary.faf51e0 → 0.2.0-canary.5ce0d15
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 +47 -6
- package/README.md +428 -141
- package/dist/client/index.d.ts +2 -0
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +2 -0
- package/dist/client/index.js.map +1 -1
- package/dist/component/convex.config.d.ts +5 -0
- package/dist/component/convex.config.d.ts.map +1 -1
- package/dist/component/convex.config.js +5 -0
- package/dist/component/convex.config.js.map +1 -1
- package/dist/component/mutations.d.ts +5 -3
- package/dist/component/mutations.d.ts.map +1 -1
- package/dist/component/mutations.js +5 -3
- package/dist/component/mutations.js.map +1 -1
- package/docs/API.md +171 -70
- package/llms.txt +51 -14
- package/package.json +15 -7
- package/src/client/index.ts +2 -0
- package/src/component/convex.config.ts +5 -0
- package/src/component/mutations.ts +5 -3
- package/src/test.ts +8 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,7 +4,10 @@ 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 adheres to
|
|
5
5
|
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
-
## [0.
|
|
7
|
+
## [0.2.0] - Unreleased
|
|
8
|
+
|
|
9
|
+
A minor release, not a patch: it adds the `resourceCounts` component table and `post` now
|
|
10
|
+
rejects empty refs that 0.1.0 accepted, so `^0.1.0` ranges do not pick it up silently.
|
|
8
11
|
|
|
9
12
|
### Added
|
|
10
13
|
|
|
@@ -16,22 +19,60 @@ All notable changes to this project are documented here. The format is based on
|
|
|
16
19
|
resolve inside the tarball.
|
|
17
20
|
- `docs/API.md` documents every entry point (`.`, `./convex.config`, `./test`,
|
|
18
21
|
`./_generated/component`) and the exported types.
|
|
22
|
+
- `pnpm check:docs`, run in CI, fails when a README section is missing or out of order, a code
|
|
23
|
+
block has no language, a relative link does not resolve, an export or error code is not
|
|
24
|
+
documented, a README example does not type-check against `dist`, or the shared Links, footer or
|
|
25
|
+
Ecosystem block differs.
|
|
19
26
|
|
|
20
27
|
### Changed
|
|
21
28
|
|
|
29
|
+
- Docs rewritten for coding agents. The README follows the shared @vllnt section order (For
|
|
30
|
+
coding agents, When to use, Install, Quick start, API, Common tasks, Errors and fixes, Limits
|
|
31
|
+
and gotchas, Compatibility, Testing, Security, Related packages, Contributing, Links, License)
|
|
32
|
+
and every README `ts` example type-checks against the built package. `docs/API.md` holds
|
|
33
|
+
signatures, not examples, and has one heading per export and a single error-codes table;
|
|
34
|
+
`llms.txt` carries the same summary, when-to-use list and links. The `package.json`
|
|
35
|
+
`description` and `keywords` changed to match. The README no longer lists `@vllnt/convex-reactions`,
|
|
36
|
+
`@vllnt/convex-notifications` or `@vllnt/convex-permissions` as related packages: no code,
|
|
37
|
+
test or example here uses them.
|
|
22
38
|
- A push to `main` publishes a canary automatically (under the `canary` dist-tag only); the
|
|
23
39
|
repository-variable gate on canary publishing is removed. Docs-only changes to the shipped
|
|
24
40
|
files also trigger it.
|
|
25
41
|
- `homepage` now points to `https://oss.vllnt.com/packages/convex-comments`.
|
|
42
|
+
- **Breaking:** `post` rejects an empty `resourceRef` or `authorRef` with
|
|
43
|
+
`ConvexError({ code: "INVALID_REF" })`; 0.1.0 accepted them. Callers that passed `""` must
|
|
44
|
+
pass a non-empty ref. Comments stored by 0.1.0 with an empty `authorRef` still exist, and since
|
|
45
|
+
only `post` checks refs, `edit`, `remove` and `resolve` accept a caller passing `""` as their
|
|
46
|
+
author: hosts should reject an empty `authorRef` before calling those.
|
|
26
47
|
- `count` reads a maintained `resourceCounts` row (one document) instead of collecting every comment
|
|
27
|
-
on the resource
|
|
28
|
-
|
|
29
|
-
|
|
48
|
+
on the resource. The counter is created by the first `post` on a resource with no comments, and
|
|
49
|
+
only `post` and `remove` change it, so for a resource with a counter `count` re-runs only when a
|
|
50
|
+
comment is posted or removed. Resources whose comments predate the counter have no row and keep
|
|
51
|
+
the previous scan (and its reactivity: `count` re-runs on any change to the resource's comments),
|
|
52
|
+
so no write ever scans a whole resource.
|
|
53
|
+
- Upgrading again after a downgrade needs a cleanup: if you run 0.2.0, go back to 0.1.x and later
|
|
54
|
+
upgrade again, the `resourceCounts` rows missed every post and remove made under 0.1.x, so `count`
|
|
55
|
+
returns stale numbers. Before upgrading again, delete every row in the component's
|
|
56
|
+
`resourceCounts` table: `count` then falls back to the scan for each resource that has comments,
|
|
57
|
+
which stays correct, and a resource with no comments gets a fresh counter on its next `post`.
|
|
58
|
+
- `pnpm test:package` (run in CI and before every publish) now also installs the packed tarball in
|
|
59
|
+
a clean project, imports every runtime entry point (`.`, `./convex.config`) under Node, and
|
|
60
|
+
type-checks a strict `NodeNext` consumer that imports every entry point, including the
|
|
61
|
+
types-only `./_generated/component` and `./test`, with `skipLibCheck` off.
|
|
62
|
+
- `scripts/check-package-contents.sh` (run before every publish) also blocks `*.spec.mts` and
|
|
63
|
+
`*.spec.cts` files, and CI now runs its test harness.
|
|
30
64
|
|
|
31
65
|
### Fixed
|
|
32
66
|
|
|
33
|
-
- `
|
|
34
|
-
|
|
67
|
+
- `register(t)` from `@vllnt/convex-comments/test` accepts the `convexTest(schema, modules)`
|
|
68
|
+
instance of any host schema. It was typed against the component's own schema, so a host
|
|
69
|
+
app's test failed to type-check with TS2345. Runtime behavior is unchanged. The repo's
|
|
70
|
+
tests (`example/**`, `src/**/*.test.ts`) are now type-checked by `pnpm typecheck:tests`,
|
|
71
|
+
which `pnpm test` and `pnpm test:coverage` run first.
|
|
72
|
+
- The publish workflow runs `pnpm test:package` in its quality gate, so a canary or stable
|
|
73
|
+
release no longer publishes a tarball that misses a required doc or `exports` target.
|
|
74
|
+
`pnpm check:release` (run by `pnpm lint`) fails if that gate or the existing release
|
|
75
|
+
guards are removed.
|
|
35
76
|
- `@vllnt/convex-comments/test` now type-checks under `moduleResolution: nodenext`
|
|
36
77
|
(explicit `.js` relative imports, Vite client types referenced).
|
|
37
78
|
- The `bodyValidator` JSDoc in `src/client` no longer says a Convex `v.*` validator has a
|