masterrecord 1.30.2 → 1.31.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/CHANGES.md +50 -0
- package/Migrations/cli.js +0 -1
- package/package.json +4 -4
- package/readme.md +18 -12
package/CHANGES.md
CHANGED
|
@@ -1,5 +1,55 @@
|
|
|
1
1
|
# MasterRecord Changelog
|
|
2
2
|
|
|
3
|
+
## v1.31.1 — better-sqlite3 range back to `>=12.6.2 <14`
|
|
4
|
+
|
|
5
|
+
**Fix for a build break introduced in 1.31.0.** 1.31.0 raised the floor to
|
|
6
|
+
`better-sqlite3@^13.0.3`. An app that pins `better-sqlite3@12` itself could then no longer
|
|
7
|
+
share its copy: npm installed a second, nested 13.x under `masterrecord/node_modules`. npm 10
|
|
8
|
+
(bundled with Node 20 and 22) runs `node-gyp rebuild` for that copy, which needs Python and
|
|
9
|
+
a compiler, so builds on slim images failed (`gyp ERR! find Python`). Three production apps
|
|
10
|
+
built with Nixpacks hit exactly this.
|
|
11
|
+
|
|
12
|
+
- The range is `>=12.6.2 <14` again, as in 1.30: npm shares an app-pinned 12.x, and a fresh
|
|
13
|
+
install still gets 13.x. 12.6.2+ ships prebuilt binaries for Node 22 and 24 (12.11.1 also
|
|
14
|
+
for Node 26), so no compiler is needed on either line.
|
|
15
|
+
- New test `test/better-sqlite3-range.test.js` keeps the range from being narrowed again.
|
|
16
|
+
The full suite also passes against `better-sqlite3@12.11.1` (SQLite 3.53.2).
|
|
17
|
+
- README install note corrected: 1.31.0 said npm 11.19+ blocks dependency install scripts.
|
|
18
|
+
Only npm 12 does; npm 11 runs them with a notice. The note now has a table for 12.x vs
|
|
19
|
+
13.x on npm 10/11 vs 12 — `deny` is only right on 13.x, and a pinned 12.x must be
|
|
20
|
+
approved under npm 12.
|
|
21
|
+
|
|
22
|
+
Engines stay at `>=22.12.0`. If you are on 1.31.0 with a pinned `better-sqlite3@12`, upgrade
|
|
23
|
+
and re-lock: `npm install masterrecord@^1.31.1` leaves one copy in the lockfile.
|
|
24
|
+
|
|
25
|
+
## v1.31.0 — security maintenance: Node 22.12+, patched SQLite, clean audit
|
|
26
|
+
|
|
27
|
+
Node 20 reached end-of-life on 2026-04-30 and no longer receives security releases,
|
|
28
|
+
so this release stops claiming it. No API changes.
|
|
29
|
+
|
|
30
|
+
- **`engines.node` is now `>=22.12.0`.** The `>=20` claim was not backed by anything:
|
|
31
|
+
CI has only run Node 22 and 24, and `better-sqlite3@13` (which the old range already
|
|
32
|
+
resolved to) declares `node >=22`. The README and the docs site have said 22.12+ since
|
|
33
|
+
1.2x; `package.json` now agrees with them. CI runs Node 22, 24 and 26. Use a current
|
|
34
|
+
patch release of your line — the 2026-10-20 Node.js security releases are 22.23.4,
|
|
35
|
+
24.22.1 and 26.12.1.
|
|
36
|
+
- **`better-sqlite3` floor raised to `^13.0.3`** (was `>=12.6.2 <14`). 13.0.2 bundles
|
|
37
|
+
SQLite 3.53.4 and fixes table-parameter validation; 12.x bundled an older SQLite.
|
|
38
|
+
13.x ships prebuilt N-API binaries, so SQLite loads even when npm blocks dependency
|
|
39
|
+
install scripts (see the README's install note).
|
|
40
|
+
- **`npm audit`: 0 vulnerabilities.** The lockfile now resolves `brace-expansion@5.0.12`
|
|
41
|
+
(GHSA-q2hr-2g5m-vwhr, GHSA-qhr7-859c-m2p7, GHSA-6j4f-fj2g-mc7p — DoS via crafted brace
|
|
42
|
+
patterns), reached through `glob` → `minimatch`. Consumers get the fixed version from
|
|
43
|
+
the existing `^` ranges on a fresh install; `npm update` picks it up in an existing app.
|
|
44
|
+
`mysql2` 3.24.6 and `pg` 8.23.1 are in the lockfile; their ranges are unchanged.
|
|
45
|
+
- **CI actions moved off the Node 20 runtime:** `actions/checkout@v6`,
|
|
46
|
+
`actions/setup-node@v5`.
|
|
47
|
+
- `update-database` no longer prints `💾 Updating snapshot...`. Since 1.30.0 it does not
|
|
48
|
+
write the snapshot (EF semantics); the message was left behind and said otherwise.
|
|
49
|
+
|
|
50
|
+
Verified: full suite (440 pass, 22 live-DB tests skipped) on Node 22.23.4, 24.22.1 and
|
|
51
|
+
26.12.1.
|
|
52
|
+
|
|
3
53
|
## v1.30.2 — pool reuse is a debug message
|
|
4
54
|
|
|
5
55
|
Every context a server constructs reuses the process's connection pool, and each
|
package/Migrations/cli.js
CHANGED
|
@@ -586,7 +586,6 @@ program.hook('preAction', () => {
|
|
|
586
586
|
await __cleanupAndExit(contextInstance, 1);
|
|
587
587
|
}
|
|
588
588
|
|
|
589
|
-
console.log(`\n💾 Updating snapshot...`);
|
|
590
589
|
// EF: applying migrations does NOT touch the snapshot — only the history table.
|
|
591
590
|
console.log(`\n✅ Database updated successfully!`);
|
|
592
591
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "masterrecord",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.31.1",
|
|
4
4
|
"description": "An Object-relational mapping for the Master framework. Master Record connects classes to relational database tables to establish a database with almost zero-configuration ",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./MasterRecord.js",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"THIRD-PARTY-NOTICES.md"
|
|
61
61
|
],
|
|
62
62
|
"engines": {
|
|
63
|
-
"node": ">=
|
|
63
|
+
"node": ">=22.12.0"
|
|
64
64
|
},
|
|
65
65
|
"scripts": {
|
|
66
66
|
"test": "node --test test/*.test.js test/integration/*.test.js Migrations/pathUtils.test.js",
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
},
|
|
95
95
|
"devDependencies": {
|
|
96
96
|
"@eslint/js": "^10.0.1",
|
|
97
|
-
"eslint": "^10.
|
|
98
|
-
"globals": "^17.
|
|
97
|
+
"eslint": "^10.13.0",
|
|
98
|
+
"globals": "^17.13.0"
|
|
99
99
|
}
|
|
100
100
|
}
|
package/readme.md
CHANGED
|
@@ -207,24 +207,30 @@ npm install masterrecord better-sqlite3 # SQLite
|
|
|
207
207
|
MasterRecord includes the following database drivers by default:
|
|
208
208
|
- `pg@^8.22.0` - PostgreSQL (async)
|
|
209
209
|
- `mysql2@^3.23.2` - MySQL (async with connection pooling)
|
|
210
|
-
- `better-sqlite3
|
|
210
|
+
- `better-sqlite3@>=12.6.2 <14` - SQLite (async API wrapper for consistency; an app-pinned 12.x is shared)
|
|
211
211
|
|
|
212
|
-
### npm
|
|
212
|
+
### npm install-script note (native SQLite build)
|
|
213
213
|
|
|
214
|
-
`better-sqlite3`
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
214
|
+
How `better-sqlite3` gets its native binary depends on its major version and your npm:
|
|
215
|
+
|
|
216
|
+
| | npm 10 / 11 (Node 20–24) | npm 12 |
|
|
217
|
+
|---|---|---|
|
|
218
|
+
| **13.x** (what a fresh install gets) | runs `node-gyp rebuild` — needs `python3`, `make` and `g++` in the build image | script blocked by default; the bundled prebuilt binary is used — nothing to approve |
|
|
219
|
+
| **12.x** (if your app pins it) | runs its install script, which downloads a prebuilt binary — no compiler needed | script blocked by default — **approve it**, or SQLite fails with "Could not locate the bindings file" |
|
|
220
|
+
|
|
221
|
+
npm 11 runs dependency install scripts but lists them with a notice; npm 12 blocks
|
|
222
|
+
them unless your `package.json` `allowScripts` allows them. Record the decision once:
|
|
219
223
|
|
|
220
224
|
```bash
|
|
221
|
-
npm
|
|
222
|
-
#
|
|
225
|
+
npm install-scripts deny better-sqlite3 # on 13.x: the bundled binary is enough
|
|
226
|
+
npm install-scripts approve better-sqlite3 # on 12.x, or on a platform with no prebuilt binary
|
|
223
227
|
```
|
|
224
228
|
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
229
|
+
Either command writes `allowScripts` into your `package.json`; commit it. On a slim
|
|
230
|
+
Docker or Nixpacks image with npm 10/11 and no Python, pin `better-sqlite3@^12.6.2`
|
|
231
|
+
in your app — masterrecord accepts `>=12.6.2 <14` and shares your copy, so nothing
|
|
232
|
+
compiles. If you only use MySQL or Postgres, you can drop `better-sqlite3` entirely and
|
|
233
|
+
this doesn't apply.
|
|
228
234
|
|
|
229
235
|
## Two Patterns: Entity Framework & Active Record
|
|
230
236
|
|