mirror of
https://github.com/vercel/next.js.git
synced 2026-09-20 02:25:18 +08:00
33af645bea
This suite installed `sqlite` and `sqlite3` on every run to prerender a page from a checked-in SQLite database. Neither package was needed for what the test covers. The pinned `sqlite3@5.0.2` has no linux-arm64 prebuild, and every job that runs this suite is linux-arm64, so each one compiled the SQLite amalgamation from source. That pin is also Node-API based and therefore context-aware, so it could no longer reproduce the abort the suite was originally added for. The fixture now uses its own compiled `native-addon` plus a dependency-free JS wrapper standing in for `sqlite`'s role, and reads its rows from a plain JSON file. The `path.join(process.cwd(), ...)` expression stays in the page, because output file tracing only follows it from the app's own code, so moving it into the wrapper would stop the data file being traced. The emitted traces were read rather than assumed. Turbopack and `@vercel/nft` produce the same fixture entries, including the compiled binary at `native-addon/build/Release/native_addon.node` and the `process.cwd()`-derived `users.json`. The trace assertion now checks each pattern separately instead of collapsing them into a single `every(...)`, which could only report that something did not match. The `notTests` block went away with it, since `[].some(...)` asserted nothing.
8 lines
158 B
JSON
8 lines
158 B
JSON
{
|
|
"dependencies": {
|
|
"native-addon": "file:native-addon",
|
|
"native-addon-wrapper": "file:native-addon-wrapper",
|
|
"bindings": "file:bindings"
|
|
}
|
|
}
|