From 02bfc40e6509faa1984dafa459f3a885ae6ac3f9 Mon Sep 17 00:00:00 2001 From: Alex Hultman Date: Fri, 6 Mar 2026 08:33:32 +0000 Subject: [PATCH] [GitHub Actions] Updated ubuntu-24.04-arm binaries --- source_commit | 2 +- uws.js | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/source_commit b/source_commit index 7e14d980..0dce1d59 100644 --- a/source_commit +++ b/source_commit @@ -1 +1 @@ -279e47a116271f2b797d7365b1d7f27ca7ed9cc4 +eec323022d80a793649cae43b6ef7a164527b262 diff --git a/uws.js b/uws.js index 24991207..edd1e0e8 100644 --- a/uws.js +++ b/uws.js @@ -19,20 +19,21 @@ module.exports = (() => { try { return require('./uws_' + process.platform + '_' + process.arch + '_' + process.versions.modules + '.node'); } catch (e) { - throw new Error('This version of uWS.js (v20.59.0) supports only Node.js versions 20, 22, 24 and 25 on (glibc) Linux, macOS and Windows, on Tier 1 platforms (https://github.com/nodejs/node/blob/master/BUILDING.md#platform-list).\n\n' + e.toString()); + throw new Error('This version of uWS.js (v20.60.0) supports only Node.js versions 20, 22, 24 and 25 on (glibc) Linux, macOS and Windows, on Tier 1 platforms (https://github.com/nodejs/node/blob/master/BUILDING.md#platform-list).\n\n' + e.toString()); } })(); module.exports.DeclarativeResponse = class DeclarativeResponse { constructor() { this.instructions = []; + this.encoder = new TextEncoder(); } // Utility method to encode text and append instruction _appendInstruction(opcode, ...text) { this.instructions.push(opcode); text.forEach(str => { - const bytes = (typeof str === 'string') ? new TextEncoder().encode(str) : str; + const bytes = (typeof str === 'string') ? this.encoder.encode(str) : str; this.instructions.push(bytes.length, ...bytes); }); } @@ -40,7 +41,7 @@ module.exports.DeclarativeResponse = class DeclarativeResponse { // Utility method to append 2-byte length text in little-endian format _appendInstructionWithLength(opcode, text) { this.instructions.push(opcode); - const bytes = new TextEncoder().encode(text); + const bytes = this.encoder.encode(text); const length = bytes.length; this.instructions.push(length & 0xff, (length >> 8) & 0xff, ...bytes); } @@ -52,8 +53,8 @@ module.exports.DeclarativeResponse = class DeclarativeResponse { write(value) { return this._appendInstructionWithLength(5, value), this; } writeParameterValue(key) { return this._appendInstruction(6, key), this; } - end(str) { - const bytes = (typeof str === 'string') ? new TextEncoder().encode(str) : str; + end(value) { + const bytes = (typeof str === 'string') ? this.encoder.encode(str) : str; const length = bytes.length; this.instructions.push(0, length & 0xff, (length >> 8) & 0xff, ...bytes); return new Uint8Array(this.instructions).buffer;