@mikrojs/native 0.21.1-next.20260928214050 → 0.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/mik_udp.cpp CHANGED
@@ -520,7 +520,10 @@ static JSValue mik__udp_bind(JSContext* ctx, JSValue this_val, int argc, JSValue
520
520
  JS_FreeValue(ctx, rq_val);
521
521
  if (recv_queue < 1) recv_queue = 1;
522
522
 
523
- /* Create socket */
523
+ /* Create socket. The stack may not be running yet on platforms that
524
+ * start it on demand (nothing else in this file needs an interface). */
525
+ const MIKPlatform* platform = MIK_GetPlatform();
526
+ if (platform->net_init) platform->net_init();
524
527
  int fd = socket(family, SOCK_DGRAM, 0);
525
528
  if (fd < 0) {
526
529
  if (address) JS_FreeCString(ctx, address);
package/src/modules.cpp CHANGED
@@ -252,6 +252,7 @@ static JSModuleDef* mik_module_loader_inner(JSContext* ctx, const char* module_n
252
252
  {"mikro/http/helpers", mik__http_helpers_load},
253
253
  {"mikro/http/request", mik__http_request_load},
254
254
  {"mikro/observable/operators", mik__observable_operators_load},
255
+ {"mikro/test", mik__test_load},
255
256
  {"mikro/wifi", mik__wifi_client_load},
256
257
  };
257
258
  for (const auto& cm : c_modules) {
package/src/utils.cpp CHANGED
@@ -24,8 +24,7 @@ JSValue mik_throw_errno(JSContext* ctx, int err) {
24
24
  }
25
25
 
26
26
  void mik_assert(const struct AssertionInfo info) {
27
- fprintf(stderr, "%s:%s%s Assertion `%s' failed.\n", info.file_line, info.function,
28
- *info.function ? ":" : "", info.message);
27
+ fprintf(stderr, "%s Assertion '%s' failed\n", info.file_line, info.message);
29
28
  fflush(stderr);
30
29
  abort();
31
30
  }