flexpay-engine 0.3.1 → 0.3.2

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.
Files changed (2) hide show
  1. package/CHANGELOG.md +46 -0
  2. package/package.json +6 -6
package/CHANGELOG.md CHANGED
@@ -3,6 +3,52 @@
3
3
  All notable changes to `flexpay-engine` (npm package). Only `src/` ships; the
4
4
  `worker/` runtime is deployed separately and is not part of the package.
5
5
 
6
+ ## 0.3.2 — 2026-07-31
7
+
8
+ Packaging fix. **No source changes** — but `0.3.1` is effectively uninstallable for
9
+ `flexpay-backend`, so upgrade straight to `0.3.2`.
10
+
11
+ ### Fixed
12
+
13
+ - **`drizzle-orm` no longer appears in `dependencies`.** It was declared in *both*
14
+ `dependencies` and `peerDependencies`. The `dependencies` entry forces a real
15
+ install, so a consumer pinning an older drizzle got a **second, nested copy** —
16
+ and TypeScript treats two copies as unrelated types. Measured on
17
+ `flexpay-backend` (pins `drizzle-orm@^0.41.0`): **40 `error TS` diagnostics**,
18
+ all variants of
19
+
20
+ ```
21
+ Type '.../flexpay-engine/node_modules/drizzle-orm/sql/sql".SQL<unknown>' is not
22
+ assignable to type '.../flexpay-backend/node_modules/drizzle-orm/sql/sql".SQL<unknown>'.
23
+ Types have separate declarations of a private property 'shouldInlineParams'.
24
+ ```
25
+
26
+ With `0.3.2` the nested copy disappears and the same typecheck reports **0 errors**.
27
+ `flexpay-client-worker` was never affected — it pins `^0.44.7`, which satisfies the
28
+ peer range and dedupes.
29
+
30
+ `drizzle-orm` remains a `peerDependency` (`^0.44.7`) — it is the one thing `src/`
31
+ genuinely imports. Note that `flexpay-backend` does **not** satisfy that range today
32
+ (`^0.41.0`); that mismatch predates this release and is unchanged by it.
33
+
34
+ ### Deliberately NOT changed
35
+
36
+ - **`hono` and `@sentry/cloudflare` stay in `dependencies`.** Only `worker/` imports
37
+ them and `worker/` is not in the npm artifact, so moving them to `devDependencies`
38
+ looks correct — but it **breaks the Cloudflare Workers build**, which installs
39
+ production dependencies only:
40
+
41
+ ```
42
+ ✘ [ERROR] Could not resolve "hono"
43
+ worker/routes/webhooks-bnc.ts:4:21
44
+ ```
45
+
46
+ They are also not a consumer hazard: `src/` never imports them, so no type identity
47
+ is shared and no duplicate-copy breakage is possible. This repo is both an npm
48
+ package and a deployed Worker; `dependencies` has to satisfy the Worker build.
49
+ `drizzle-orm` is the one that must NOT be there, and it still resolves for the
50
+ Worker because peer dependencies are auto-installed.
51
+
6
52
  ## 0.3.1 — 2026-07-31
7
53
 
8
54
  Released from `dev`. Supersedes **0.3.0, which must not be used** — 0.3.0 was
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flexpay-engine",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "FlexPay loan servicing engine \u2014 pricing, schedules, allocation, delinquency, lock-state",
5
5
  "license": "MIT",
6
6
  "main": "src/index.ts",
@@ -38,19 +38,19 @@
38
38
  "probe:bnc": "bun run scripts/probe-bnc-sandbox.ts",
39
39
  "ci:verify": "bash scripts/check-deps.sh && bash scripts/check-engine-tables.sh && bun run typecheck && bun run typecheck:worker"
40
40
  },
41
- "dependencies": {
42
- "@sentry/cloudflare": "^10.20.0",
43
- "drizzle-orm": "^0.44.7",
44
- "hono": "^4.6.0"
45
- },
46
41
  "peerDependencies": {
47
42
  "drizzle-orm": "^0.44.7"
48
43
  },
49
44
  "devDependencies": {
50
45
  "@cloudflare/workers-types": "^4.20250101.0",
51
46
  "@types/bun": "latest",
47
+ "drizzle-orm": "^0.44.7",
52
48
  "fast-check": "^3.22.0",
53
49
  "typescript": "^5.7.0",
54
50
  "wrangler": "^4.0.0"
51
+ },
52
+ "dependencies": {
53
+ "@sentry/cloudflare": "^10.20.0",
54
+ "hono": "^4.6.0"
55
55
  }
56
56
  }