From 0d40a913dddb87cdbcd89bade0c587cfe66f3ed3 Mon Sep 17 00:00:00 2001 From: Tony133 Date: Sat, 11 Jul 2026 15:48:48 +0200 Subject: [PATCH 1/2] chore: upgrade piscina to v5.x --- index.js | 14 +++++++++++--- package.json | 2 +- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index 194a655..53a95a7 100644 --- a/index.js +++ b/index.js @@ -36,21 +36,29 @@ async function fastifyHotwire (fastify, opts) { async function render (file, data) { file = join(templates, file) - const html = await pool.runTask({ file, data, fragment: false }) + const html = await pool.run({ file, data, fragment: false }) this.type('text/html; charset=utf-8') this.send(html) return this } async function turboSend (that, action, file, target, data) { - const html = await pool.runTask({ file: join(templates, file), data, fragment: true }) + const html = await pool.run({ + file: join(templates, file), + data, + fragment: true + }) that.type('text/vnd.turbo-stream.html; charset=utf-8') that.send(buildStream(action, target, html.trim())) return that } async function generate (_that, action, file, target, data) { - const html = await pool.runTask({ file: join(templates, file), data, fragment: true }) + const html = await pool.run({ + file: join(templates, file), + data, + fragment: true + }) return buildStream(action, target, html).replace(/\n/g, '').trim() } } diff --git a/package.json b/package.json index 48fd295..5873c2c 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ ], "dependencies": { "fastify-plugin": "^5.0.0", - "piscina": "^4.0.0" + "piscina": "^5.0.0" }, "devDependencies": { "@fastify/cookie": "^11.0.1", From ed3ce025938d1a3c6410281c3c6d99f60d13227e Mon Sep 17 00:00:00 2001 From: Tony133 Date: Sat, 11 Jul 2026 17:00:35 +0200 Subject: [PATCH 2/2] chore(deps): upgrade fastify-plugin to v6.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5873c2c..e1c3bfd 100644 --- a/package.json +++ b/package.json @@ -60,7 +60,7 @@ } ], "dependencies": { - "fastify-plugin": "^5.0.0", + "fastify-plugin": "^6.0.0", "piscina": "^5.0.0" }, "devDependencies": {