Skip to content

Commit 53a9c66

Browse files
authored
Merge pull request eclipse-thingweb#1362 from danielpeintner/issue-1349
style: npm run format
2 parents 456ce93 + e768123 commit 53a9c66

7 files changed

Lines changed: 29 additions & 28 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ jobs:
103103
name: Check coding style
104104
runs-on: ubuntu-latest
105105
steps:
106-
- uses: actions/checkout@v2
107-
- uses: actionsx/prettier@v3
106+
- uses: actions/checkout@v4
107+
- uses: Nerixyz/actionsx-prettier@v3-adj
108108
with:
109109
args: --check .

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
"eslint-plugin-workspaces": "^0.9.0",
7373
"husky": "^7.0.4",
7474
"mocha": "^11.1.0",
75-
"prettier": "^3.0.0",
75+
"prettier": "3.3.3",
7676
"pretty-quick": "^4.0.0",
7777
"sinon": "11.1.1",
7878
"source-map-support": "^0.5.20",

packages/binding-modbus/src/modbus-client.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -276,17 +276,17 @@ export default class ModbusClient implements ProtocolClient {
276276
mode === "r"
277277
? ModbusFunction.readCoil
278278
: contentLength > 1
279-
? ModbusFunction.writeMultipleCoils
280-
: ModbusFunction.writeSingleCoil;
279+
? ModbusFunction.writeMultipleCoils
280+
: ModbusFunction.writeSingleCoil;
281281
break;
282282
case "HoldingRegister":
283283
// the content length must be divided by 2 (holding registers are 16bit)
284284
result["modv:function"] =
285285
mode === "r"
286286
? ModbusFunction.readHoldingRegisters
287287
: contentLength / 2 > 1
288-
? ModbusFunction.writeMultipleHoldingRegisters
289-
: ModbusFunction.writeSingleHoldingRegister;
288+
? ModbusFunction.writeMultipleHoldingRegisters
289+
: ModbusFunction.writeSingleHoldingRegister;
290290
break;
291291
case "InputRegister":
292292
result["modv:function"] = ModbusFunction.readInputRegister;

packages/binding-opcua/src/opcua-protocol-client.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -605,8 +605,8 @@ export class OPCUAProtocolClient implements ProtocolClient {
605605
valueRank === -1
606606
? VariantArrayType.Scalar
607607
: valueRank === 1
608-
? VariantArrayType.Array
609-
: VariantArrayType.Matrix;
608+
? VariantArrayType.Array
609+
: VariantArrayType.Matrix;
610610

611611
const n = (a: unknown) => Buffer.from(JSON.stringify(a));
612612
const v = await this._contentToVariant(content2.type, n(bodyInput[name ?? "null"]), basicDataType);

packages/core/src/codecs/octetstream-codec.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -183,26 +183,26 @@ export default class OctetstreamCodec implements ContentCodec {
183183
? bytes.readInt16BE(0)
184184
: bytes.readUInt16BE(0)
185185
: signed
186-
? bytes.readInt16LE(0)
187-
: bytes.readUInt16LE(0);
186+
? bytes.readInt16LE(0)
187+
: bytes.readUInt16LE(0);
188188

189189
case 32:
190190
return bigEndian
191191
? signed
192192
? bytes.readInt32BE(0)
193193
: bytes.readUInt32BE(0)
194194
: signed
195-
? bytes.readInt32LE(0)
196-
: bytes.readUInt32LE(0);
195+
? bytes.readInt32LE(0)
196+
: bytes.readUInt32LE(0);
197197

198198
default: {
199199
const result = bigEndian
200200
? signed
201201
? bytes.readIntBE(0, dataLength / 8)
202202
: bytes.readUIntBE(0, dataLength / 8)
203203
: signed
204-
? bytes.readIntLE(0, dataLength / 8)
205-
: bytes.readUIntLE(0, dataLength / 8);
204+
? bytes.readIntLE(0, dataLength / 8)
205+
: bytes.readUIntLE(0, dataLength / 8);
206206
// warn about numbers being too big to be represented as safe integers
207207
if (!Number.isSafeInteger(result)) {
208208
warn("Result is not a safe integer");
@@ -460,8 +460,8 @@ export default class OctetstreamCodec implements ContentCodec {
460460
? buf.writeInt16BE(value, 0)
461461
: buf.writeUInt16BE(value, 0)
462462
: signed
463-
? buf.writeInt16LE(value, 0)
464-
: buf.writeUInt16LE(value, 0);
463+
? buf.writeInt16LE(value, 0)
464+
: buf.writeUInt16LE(value, 0);
465465
break;
466466

467467
case 4:
@@ -470,8 +470,8 @@ export default class OctetstreamCodec implements ContentCodec {
470470
? buf.writeInt32BE(value, 0)
471471
: buf.writeUInt32BE(value, 0)
472472
: signed
473-
? buf.writeInt32LE(value, 0)
474-
: buf.writeUInt32LE(value, 0);
473+
? buf.writeInt32LE(value, 0)
474+
: buf.writeUInt32LE(value, 0);
475475
break;
476476

477477
default:

packages/td-tools/src/td-tools.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,12 @@ export * from "./thing-description";
2020
export * from "./td-parser";
2121
export * from "./td-helpers";
2222
export * from "./thing-model-helpers";
23-
type DeepPartial<T> = T extends Record<string, unknown>
24-
? {
25-
[P in keyof T]?: T[P] extends Array<infer I> ? Array<DeepPartial<I>> : DeepPartial<T[P]>;
26-
}
27-
: T;
23+
type DeepPartial<T> =
24+
T extends Record<string, unknown>
25+
? {
26+
[P in keyof T]?: T[P] extends Array<infer I> ? Array<DeepPartial<I>> : DeepPartial<T[P]>;
27+
}
28+
: T;
2829

2930
/**
3031
* @deprecated Will be removed in the future. Please use '@node-wot/core' package instead.

0 commit comments

Comments
 (0)