Skip to content

Commit 3325b9e

Browse files
committed
Merge branch 'zephyr' of https://git.moddable.tech:3000/git/moddable into zephyr
2 parents dc35d20 + 85a33ce commit 3325b9e

File tree

33 files changed

+154
-102
lines changed

33 files changed

+154
-102
lines changed

build/devices/zephyr/targets/esp32_ethernet_kit/manifest.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,13 @@
55
"include": [
66
"$(MODULES)/io/ethernet/manifest.json"
77
],
8-
"modules": {
9-
"setup/target": "./setup-target"
10-
},
11-
"preload": "setup/target",
128
"config": {
139
},
1410
"defines": {
1511
},
1612
"zephyrConfig": {
17-
"CONFIG_ESP_SIMPLE_BOOT": "y",
18-
"CONFIG_BOOTLOADER_MCUBOOT": "n",
13+
"CONFIG_ESP_SIMPLE_BOOT": "y",
14+
"CONFIG_BOOTLOADER_MCUBOOT": "n",
1915

2016
"CONFIG_ETH_ESP32": "y",
2117
"CONFIG_NET_IF_MAX_IPV4_COUNT": 2

build/devices/zephyr/targets/esp32_ethernet_kit/setup-target.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

contributed/conversationalAI/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import model from "model" with { type:"json" };
2323
import assets from "assets";
2424
import Controller from "Controller";
2525

26-
globalThis.importNow = function(specifier) @ "xs_importNow";
26+
globalThis.importNow = function(specifier) { return native("xs_importNow").call(this, specifier); };
2727
globalThis.localize = function(it) {
2828
if (it) {
2929
let result = locals.get(it);

contributed/conversationalAI/views/Levels.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import assets from "assets";
2323
import Timeline from "piu/Timeline";
2424
import View from "Common";
2525

26-
function computeLevel(buffer) @ "xs_computeLevel";
26+
function computeLevel(buffer) { return native("xs_computeLevel").call(this, buffer); };
2727

2828
class LevelsBehavior extends View.Behavior {
2929
onCreate(container, view) {

contributed/conversationalAI/views/Services.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2024-2025 Moddable Tech, Inc.
2+
* Copyright (c) 2024-2026 Moddable Tech, Inc.
33
*
44
* This file is part of the Moddable SDK Runtime.
55
*
@@ -23,7 +23,7 @@ import Timeline from "piu/Timeline";
2323
import View from "Common";
2424

2525
class ServicesBehavior extends View.Behavior {
26-
onDisplaying(container) {
26+
onDisplaying(/* container */) {
2727
const view = this.view;
2828
const row = view.LIST.content(view.selection);
2929
row.last.previous.visible = true;

eslint.config.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ export default defineConfig([{
6767
Outline: "readonly",
6868
QRCode: "readonly",
6969
Shape: "readonly",
70+
71+
assetMap: "readonly",
7072
}
7173
}
7274
},

examples/io/tcp/httpclient/httpclient.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -418,9 +418,7 @@ class HTTPClient {
418418
return;
419419
}
420420

421-
if (!this.#pendingWrite || !this.#writable)
422-
break;
423-
} while (true);
421+
} while (this.#pendingWrite && this.#writable);
424422
}
425423
#error(e) {
426424
if (("receivedBody" === this.#state) && this.#timer) { // completion not reported yet. report before handling error.

examples/io/tcp/mqttclient/mqttclient.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ class MQTTClient {
7575
id: options.id ?? "",
7676
clean: options.clean ?? true,
7777
keepalive: options.keepAlive ?? options.keepalive ?? 0, // for compatibilty. should eventually be removed
78+
/** @type {any[] & {timer?: Timer}} */
7879
pending: []
7980
};
8081

@@ -270,11 +271,13 @@ class MQTTClient {
270271
return (this.#writable > Overhead) ? (this.#writable - Overhead) : 0;
271272
}
272273
read(count = this.#payload) {
274+
/** @type {BufferLike} */
273275
let buffer;
274276
if ("object" === typeof count) {
275277
buffer = count;
276278
count = buffer.byteLength;
277279

280+
// @ts-expect-error when BYTES_PER_ELEMENT is undefined, this check works as intended
278281
if (buffer.BYTES_PER_ELEMENT > 1) // allows ArrayBuffer, SharedArrayBuffer, Uint8Array, Int8Array, DataView. disallows multi-byte element arrays.
279282
throw new Error("invalid buffer");
280283
}

examples/io/tcp/websocketclient/websocketclient.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ class WebSocketClient {
263263
switch (this.#state) {
264264
case "receiveStatus":
265265
case "receiveHeader":
266-
do {
266+
for (;;) {
267267
while (count--) {
268268
const c = this.#socket.read();
269269
this.#line += String.fromCharCode(c);
@@ -318,7 +318,7 @@ class WebSocketClient {
318318
}
319319

320320
this.#line = "";
321-
} while (true);
321+
}
322322
break;
323323

324324
case "connected": {

examples/js/aborthook/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,4 @@ Promise.reject(new Error("exception from promise"));
6464

6565
throw new Error("exception from module top level");
6666

67-
trace("will never reach here\n");
67+
// trace("will never reach here\n");

0 commit comments

Comments
 (0)