@vllnt/convex-analytics 0.1.1-canary.879bde1 → 0.2.0-canary.d5fa959
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 +17 -3
- package/dist/component/_generated/api.d.ts +2 -0
- package/dist/component/_generated/api.d.ts.map +1 -1
- package/dist/component/_generated/api.js.map +1 -1
- package/dist/component/queries.d.ts +1 -1
- package/dist/component/queries.js +1 -1
- package/package.json +11 -11
- package/src/component/_generated/api.ts +2 -0
- package/src/component/queries.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,7 +5,14 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
-
## [0.
|
|
8
|
+
## [0.2.0] - Unreleased
|
|
9
|
+
|
|
10
|
+
This release changes behaviour for invalid input: calls that `0.1.0` accepted with `NaN` or
|
|
11
|
+
infinite numbers, empty strings or out-of-range limits now throw typed `ConvexError` codes (see
|
|
12
|
+
**Fixed**), and the REST routes answer them with `400`; non-scalar REST `props` return `400`
|
|
13
|
+
instead of failing unhandled. Hosts that passed such input must handle these errors before
|
|
14
|
+
upgrading from `^0.1.0`. The next `convex deploy` also builds the changed indexes (see
|
|
15
|
+
**Changed**) over existing rows, which takes longer on large `rollups` tables.
|
|
9
16
|
|
|
10
17
|
### Added
|
|
11
18
|
|
|
@@ -14,6 +21,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
14
21
|
`llms.txt` links to them with relative paths. `pnpm test:package` (run in CI) installs the
|
|
15
22
|
packed tarball and fails when a required file is missing, an internal file ships, or a
|
|
16
23
|
relative link does not resolve.
|
|
24
|
+
- Export `./convex.config.js` (same target as `./convex.config`), which the Convex Components
|
|
25
|
+
Directory preflight requires alongside `./_generated/component.js`.
|
|
17
26
|
|
|
18
27
|
### Fixed
|
|
19
28
|
|
|
@@ -39,8 +48,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
39
48
|
type-checks under `moduleResolution: nodenext`.
|
|
40
49
|
- `convex` is declared only as a (now required) peer dependency, no longer also as a runtime
|
|
41
50
|
dependency, so a host on `convex` 1.45 to 1.47 no longer gets a second, nested `convex` copy.
|
|
42
|
-
-
|
|
43
|
-
|
|
51
|
+
- The package build's turbo cache now covers the docs it copies from the repo root, so a build
|
|
52
|
+
can no longer ship stale or missing `README.md`, `LICENSE`, `llms.txt` or `docs/` after a root
|
|
53
|
+
doc change or a cache hit. `pnpm lint` checks this with a turbo dry run.
|
|
44
54
|
|
|
45
55
|
### Changed
|
|
46
56
|
|
|
@@ -66,6 +76,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
66
76
|
- Release flow: canary publishes on every qualifying push to `main` without a repository-variable
|
|
67
77
|
gate, and a change to the shipped docs, `llms.txt`, README, LICENSE or changelog alone now
|
|
68
78
|
triggers it.
|
|
79
|
+
- Dependencies since `0.1.0`: `@convex-dev/rate-limiter` `^0.3.2` → `^0.4.3` (its component adds a
|
|
80
|
+
`pendingUpdates` table, created on deploy), `@convex-dev/aggregate` `^0.3.0` → `^0.3.4` and
|
|
81
|
+
`@convex-dev/sharded-counter` `^0.2.1` → `^0.2.4`. The `convex` peer range stays `^1.45.0`;
|
|
82
|
+
tests pass on 1.45.0 and 1.51.0.
|
|
69
83
|
|
|
70
84
|
## [0.1.0] - 2026-09-01
|
|
71
85
|
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* To regenerate, run `npx convex dev`.
|
|
7
7
|
* @module
|
|
8
8
|
*/
|
|
9
|
+
import type * as crons from "../crons.js";
|
|
9
10
|
import type * as http from "../http.js";
|
|
10
11
|
import type * as internal_mutations from "../internal_mutations.js";
|
|
11
12
|
import type * as mutations from "../mutations.js";
|
|
@@ -13,6 +14,7 @@ import type * as queries from "../queries.js";
|
|
|
13
14
|
import type * as validators from "../validators.js";
|
|
14
15
|
import type { ApiFromModules, FilterApi, FunctionReference } from "convex/server";
|
|
15
16
|
declare const fullApi: ApiFromModules<{
|
|
17
|
+
crons: typeof crons;
|
|
16
18
|
http: typeof http;
|
|
17
19
|
internal_mutations: typeof internal_mutations;
|
|
18
20
|
mutations: typeof mutations;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../src/component/_generated/api.ts"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAEH,OAAO,KAAK,KAAK,IAAI,MAAM,YAAY,CAAC;AACxC,OAAO,KAAK,KAAK,kBAAkB,MAAM,0BAA0B,CAAC;AACpE,OAAO,KAAK,KAAK,SAAS,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,KAAK,OAAO,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,KAAK,UAAU,MAAM,kBAAkB,CAAC;AAEpD,OAAO,KAAK,EACV,cAAc,EACd,SAAS,EACT,iBAAiB,EAClB,MAAM,eAAe,CAAC;AAGvB,QAAA,MAAM,OAAO,EAAE,cAAc,CAAC;IAC5B,IAAI,EAAE,OAAO,IAAI,CAAC;IAClB,kBAAkB,EAAE,OAAO,kBAAkB,CAAC;IAC9C,SAAS,EAAE,OAAO,SAAS,CAAC;IAC5B,OAAO,EAAE,OAAO,OAAO,CAAC;IACxB,UAAU,EAAE,OAAO,UAAU,CAAC;CAC/B,CAAiB,CAAC;AAEnB;;;;;;;GAOG;AACH,eAAO,MAAM,GAAG,EAAE,SAAS,CACzB,OAAO,OAAO,EACd,iBAAiB,CAAC,GAAG,EAAE,QAAQ,CAAC,CACjB,CAAC;AAElB;;;;;;;GAOG;AACH,eAAO,MAAM,QAAQ,EAAE,SAAS,CAC9B,OAAO,OAAO,EACd,iBAAiB,CAAC,GAAG,EAAE,UAAU,CAAC,CACnB,CAAC;AAElB,eAAO,MAAM,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AAG,EAAE,UAAU,CAAC,CACnB,CAAC;AAElB,eAAO,MAAM,UAAU,EAAqC;IAC1D,SAAS,EAAE,OAAO,+CAA+C,EAAE,YAAY,CAAC,WAAW,CAAC,CAAC;IAC7F,cAAc,EAAE,OAAO,qDAAqD,EAAE,YAAY,CAAC,gBAAgB,CAAC,CAAC;IAC7G,WAAW,EAAE,OAAO,kDAAkD,EAAE,YAAY,CAAC,aAAa,CAAC,CAAC;CACrG,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../../src/component/_generated/api.ts"],"names":[],"mappings":"AAAA,oBAAoB;AACpB;;;;;;;GAOG;
|
|
1
|
+
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../../src/component/_generated/api.ts"],"names":[],"mappings":"AAAA,oBAAoB;AACpB;;;;;;;GAOG;AAcH,OAAO,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAE1D,MAAM,OAAO,GAOR,MAAa,CAAC;AAEnB;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,GAAG,GAGZ,MAAa,CAAC;AAElB;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,QAAQ,GAGjB,MAAa,CAAC;AAElB,MAAM,CAAC,MAAM,UAAU,GAAG,iBAAiB,EAI1C,CAAC"}
|
|
@@ -92,7 +92,7 @@ export declare const retention: import("convex/server").RegisteredQuery<"public"
|
|
|
92
92
|
* values above the last bound land in `overflow`. Non-numeric measure values are
|
|
93
93
|
* ignored. `count`/`sum` give the population size and total (so mean = sum/count).
|
|
94
94
|
* Index-backed (`by_scope_name_ts`) and bounded — computed from raw events, like
|
|
95
|
-
* `funnel
|
|
95
|
+
* `funnel` (`retention` reads `subjects` first/last-seen rows instead).
|
|
96
96
|
*/
|
|
97
97
|
export declare const distribution: import("convex/server").RegisteredQuery<"public", {
|
|
98
98
|
buckets: number[];
|
|
@@ -257,7 +257,7 @@ export const retention = query({
|
|
|
257
257
|
* values above the last bound land in `overflow`. Non-numeric measure values are
|
|
258
258
|
* ignored. `count`/`sum` give the population size and total (so mean = sum/count).
|
|
259
259
|
* Index-backed (`by_scope_name_ts`) and bounded — computed from raw events, like
|
|
260
|
-
* `funnel
|
|
260
|
+
* `funnel` (`retention` reads `subjects` first/last-seen rows instead).
|
|
261
261
|
*/
|
|
262
262
|
export const distribution = query({
|
|
263
263
|
args: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vllnt/convex-analytics",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0-canary.d5fa959",
|
|
4
4
|
"description": "Generic, configurable analytics component for Convex — any event, any dimension, any domain; rollup-on-write with funnels, retention, uniques",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -68,25 +68,25 @@
|
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
70
|
"@convex-dev/aggregate": "^0.3.4",
|
|
71
|
-
"@convex-dev/rate-limiter": "^0.4.
|
|
72
|
-
"@convex-dev/sharded-counter": "^0.2.
|
|
71
|
+
"@convex-dev/rate-limiter": "^0.4.3",
|
|
72
|
+
"@convex-dev/sharded-counter": "^0.2.4"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
75
|
"@edge-runtime/vm": "^5.0.0",
|
|
76
76
|
"@testing-library/react": "^16.3.3",
|
|
77
77
|
"@types/react": "^19.3.0",
|
|
78
78
|
"@typescript/native": "npm:typescript@7.0.2",
|
|
79
|
-
"@vitest/coverage-v8": "^5.
|
|
80
|
-
"@vllnt/typescript": "
|
|
81
|
-
"convex": "^1.
|
|
82
|
-
"convex-test": "^0.0.
|
|
83
|
-
"eslint": "^
|
|
84
|
-
"jsdom": "^
|
|
79
|
+
"@vitest/coverage-v8": "^5.1.1",
|
|
80
|
+
"@vllnt/typescript": "3.0.0",
|
|
81
|
+
"convex": "^1.51.0",
|
|
82
|
+
"convex-test": "^0.0.73",
|
|
83
|
+
"eslint": "^10.15.0",
|
|
84
|
+
"jsdom": "^31.0.1",
|
|
85
85
|
"react": "^19.3.1",
|
|
86
86
|
"react-dom": "^19.3.1",
|
|
87
87
|
"typescript": "npm:@typescript/typescript6@^6.0.2",
|
|
88
|
-
"vite": "^8.3.
|
|
89
|
-
"vitest": "^5.
|
|
88
|
+
"vite": "^8.3.8",
|
|
89
|
+
"vitest": "^5.1.1"
|
|
90
90
|
},
|
|
91
91
|
"peerDependencies": {
|
|
92
92
|
"convex": "^1.45.0",
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
* @module
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
+
import type * as crons from "../crons.js";
|
|
11
12
|
import type * as http from "../http.js";
|
|
12
13
|
import type * as internal_mutations from "../internal_mutations.js";
|
|
13
14
|
import type * as mutations from "../mutations.js";
|
|
@@ -22,6 +23,7 @@ import type {
|
|
|
22
23
|
import { anyApi, componentsGeneric } from "convex/server";
|
|
23
24
|
|
|
24
25
|
const fullApi: ApiFromModules<{
|
|
26
|
+
crons: typeof crons;
|
|
25
27
|
http: typeof http;
|
|
26
28
|
internal_mutations: typeof internal_mutations;
|
|
27
29
|
mutations: typeof mutations;
|
package/src/component/queries.ts
CHANGED
|
@@ -332,7 +332,7 @@ export const retention = query({
|
|
|
332
332
|
* values above the last bound land in `overflow`. Non-numeric measure values are
|
|
333
333
|
* ignored. `count`/`sum` give the population size and total (so mean = sum/count).
|
|
334
334
|
* Index-backed (`by_scope_name_ts`) and bounded — computed from raw events, like
|
|
335
|
-
* `funnel
|
|
335
|
+
* `funnel` (`retention` reads `subjects` first/last-seen rows instead).
|
|
336
336
|
*/
|
|
337
337
|
export const distribution = query({
|
|
338
338
|
args: {
|