From de844d769e28925540038b783085261f14a7d6e4 Mon Sep 17 00:00:00 2001 From: danielpeintner Date: Thu, 9 Oct 2025 16:09:09 +0200 Subject: [PATCH] refactor: fix prettier version to exact 3.0.0 --- package-lock.json | 6 ++++-- package.json | 2 +- packages/binding-modbus/src/modbus-client.ts | 8 ++++---- .../src/opcua-protocol-client.ts | 4 ++-- packages/core/src/codecs/octetstream-codec.ts | 20 +++++++++---------- 5 files changed, 21 insertions(+), 19 deletions(-) diff --git a/package-lock.json b/package-lock.json index a1f7df527..0733245b5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -40,7 +40,7 @@ "globals": "^16.4.0", "husky": "^7.0.4", "mocha": "^11.7.2", - "prettier": "3.3.3", + "prettier": "3.0.0", "pretty-quick": "^4.0.0", "sinon": "11.1.1", "source-map-support": "^0.5.20", @@ -9228,7 +9228,9 @@ } }, "node_modules/prettier": { - "version": "3.3.3", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.0.tgz", + "integrity": "sha512-zBf5eHpwHOGPC47h0zrPyNn+eAEIdEzfywMoYn2XPi0P44Zp0tSq64rq0xAREh4auw2cJZHo9QUob+NqCQky4g==", "dev": true, "license": "MIT", "bin": { diff --git a/package.json b/package.json index a51ab1dc0..a16d25a4e 100644 --- a/package.json +++ b/package.json @@ -72,7 +72,7 @@ "globals": "^16.4.0", "husky": "^7.0.4", "mocha": "^11.7.2", - "prettier": "3.3.3", + "prettier": "3.0.0", "pretty-quick": "^4.0.0", "sinon": "11.1.1", "source-map-support": "^0.5.20", diff --git a/packages/binding-modbus/src/modbus-client.ts b/packages/binding-modbus/src/modbus-client.ts index ad06f03a8..ff31d50bb 100644 --- a/packages/binding-modbus/src/modbus-client.ts +++ b/packages/binding-modbus/src/modbus-client.ts @@ -276,8 +276,8 @@ export default class ModbusClient implements ProtocolClient { mode === "r" ? ModbusFunction.readCoil : contentLength > 1 - ? ModbusFunction.writeMultipleCoils - : ModbusFunction.writeSingleCoil; + ? ModbusFunction.writeMultipleCoils + : ModbusFunction.writeSingleCoil; break; case "HoldingRegister": // the content length must be divided by 2 (holding registers are 16bit) @@ -285,8 +285,8 @@ export default class ModbusClient implements ProtocolClient { mode === "r" ? ModbusFunction.readHoldingRegisters : contentLength / 2 > 1 - ? ModbusFunction.writeMultipleHoldingRegisters - : ModbusFunction.writeSingleHoldingRegister; + ? ModbusFunction.writeMultipleHoldingRegisters + : ModbusFunction.writeSingleHoldingRegister; break; case "InputRegister": result["modv:function"] = ModbusFunction.readInputRegister; diff --git a/packages/binding-opcua/src/opcua-protocol-client.ts b/packages/binding-opcua/src/opcua-protocol-client.ts index 08bb99278..94329f98b 100644 --- a/packages/binding-opcua/src/opcua-protocol-client.ts +++ b/packages/binding-opcua/src/opcua-protocol-client.ts @@ -717,8 +717,8 @@ export class OPCUAProtocolClient implements ProtocolClient { valueRank === -1 ? VariantArrayType.Scalar : valueRank === 1 - ? VariantArrayType.Array - : VariantArrayType.Matrix; + ? VariantArrayType.Array + : VariantArrayType.Matrix; const n = (a: unknown) => Buffer.from(JSON.stringify(a)); const v = await this._contentToVariant(content2.type, n(bodyInput[name ?? "null"]), basicDataType); diff --git a/packages/core/src/codecs/octetstream-codec.ts b/packages/core/src/codecs/octetstream-codec.ts index 5aec25931..aae832c51 100644 --- a/packages/core/src/codecs/octetstream-codec.ts +++ b/packages/core/src/codecs/octetstream-codec.ts @@ -183,8 +183,8 @@ export default class OctetstreamCodec implements ContentCodec { ? bytes.readInt16BE(0) : bytes.readUInt16BE(0) : signed - ? bytes.readInt16LE(0) - : bytes.readUInt16LE(0); + ? bytes.readInt16LE(0) + : bytes.readUInt16LE(0); case 32: return bigEndian @@ -192,8 +192,8 @@ export default class OctetstreamCodec implements ContentCodec { ? bytes.readInt32BE(0) : bytes.readUInt32BE(0) : signed - ? bytes.readInt32LE(0) - : bytes.readUInt32LE(0); + ? bytes.readInt32LE(0) + : bytes.readUInt32LE(0); default: { const result = bigEndian @@ -201,8 +201,8 @@ export default class OctetstreamCodec implements ContentCodec { ? bytes.readIntBE(0, dataLength / 8) : bytes.readUIntBE(0, dataLength / 8) : signed - ? bytes.readIntLE(0, dataLength / 8) - : bytes.readUIntLE(0, dataLength / 8); + ? bytes.readIntLE(0, dataLength / 8) + : bytes.readUIntLE(0, dataLength / 8); // warn about numbers being too big to be represented as safe integers if (!Number.isSafeInteger(result)) { warn("Result is not a safe integer"); @@ -460,8 +460,8 @@ export default class OctetstreamCodec implements ContentCodec { ? buf.writeInt16BE(value, 0) : buf.writeUInt16BE(value, 0) : signed - ? buf.writeInt16LE(value, 0) - : buf.writeUInt16LE(value, 0); + ? buf.writeInt16LE(value, 0) + : buf.writeUInt16LE(value, 0); break; case 4: @@ -470,8 +470,8 @@ export default class OctetstreamCodec implements ContentCodec { ? buf.writeInt32BE(value, 0) : buf.writeUInt32BE(value, 0) : signed - ? buf.writeInt32LE(value, 0) - : buf.writeUInt32LE(value, 0); + ? buf.writeInt32LE(value, 0) + : buf.writeUInt32LE(value, 0); break; default: