mol_data_all 1.1.1560 → 1.1.1561

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/node.test.js CHANGED
@@ -1212,11 +1212,11 @@ var $;
1212
1212
  function $mol_dev_format_button(label, click) {
1213
1213
  return $mol_dev_format_auto({
1214
1214
  [$.$mol_dev_format_head]() {
1215
- return $mol_dev_format_span({ color: 'cornflowerblue' }, label);
1215
+ return $.$mol_dev_format_span({ color: 'cornflowerblue' }, label);
1216
1216
  },
1217
1217
  [$.$mol_dev_format_body]() {
1218
1218
  Promise.resolve().then(click);
1219
- return $mol_dev_format_span({});
1219
+ return $.$mol_dev_format_span({});
1220
1220
  }
1221
1221
  });
1222
1222
  }
@@ -1238,7 +1238,7 @@ var $;
1238
1238
  return $mol_dev_format_native(val);
1239
1239
  }
1240
1240
  if (val instanceof Error) {
1241
- return $mol_dev_format_span({}, $mol_dev_format_native(val), ' ', $mol_dev_format_button('throw', () => $mol_fail_hidden(val)));
1241
+ return $.$mol_dev_format_span({}, $mol_dev_format_native(val), ' ', $mol_dev_format_button('throw', () => $mol_fail_hidden(val)));
1242
1242
  }
1243
1243
  if (val instanceof Promise) {
1244
1244
  return $.$mol_dev_format_shade($mol_dev_format_native(val), ' ', val[Symbol.toStringTag] ?? '');
@@ -1310,28 +1310,23 @@ var $;
1310
1310
  ];
1311
1311
  }
1312
1312
  $.$mol_dev_format_element = $mol_dev_format_element;
1313
- function $mol_dev_format_span(style, ...content) {
1314
- return $mol_dev_format_element('span', {
1315
- ...style,
1316
- }, ...content);
1317
- }
1318
- $.$mol_dev_format_span = $mol_dev_format_span;
1313
+ $.$mol_dev_format_span = $mol_dev_format_element.bind(null, 'span');
1319
1314
  $.$mol_dev_format_div = $mol_dev_format_element.bind(null, 'div');
1320
1315
  $.$mol_dev_format_ol = $mol_dev_format_element.bind(null, 'ol');
1321
1316
  $.$mol_dev_format_li = $mol_dev_format_element.bind(null, 'li');
1322
1317
  $.$mol_dev_format_table = $mol_dev_format_element.bind(null, 'table');
1323
1318
  $.$mol_dev_format_tr = $mol_dev_format_element.bind(null, 'tr');
1324
1319
  $.$mol_dev_format_td = $mol_dev_format_element.bind(null, 'td');
1325
- $.$mol_dev_format_accent = $mol_dev_format_span.bind(null, {
1320
+ $.$mol_dev_format_accent = $.$mol_dev_format_span.bind(null, {
1326
1321
  'color': 'magenta',
1327
1322
  });
1328
- $.$mol_dev_format_strong = $mol_dev_format_span.bind(null, {
1323
+ $.$mol_dev_format_strong = $.$mol_dev_format_span.bind(null, {
1329
1324
  'font-weight': 'bold',
1330
1325
  });
1331
- $.$mol_dev_format_string = $mol_dev_format_span.bind(null, {
1326
+ $.$mol_dev_format_string = $.$mol_dev_format_span.bind(null, {
1332
1327
  'color': 'green',
1333
1328
  });
1334
- $.$mol_dev_format_shade = $mol_dev_format_span.bind(null, {
1329
+ $.$mol_dev_format_shade = $.$mol_dev_format_span.bind(null, {
1335
1330
  'color': 'gray',
1336
1331
  });
1337
1332
  $.$mol_dev_format_indent = $.$mol_dev_format_div.bind(null, {
@@ -2123,15 +2118,22 @@ var $;
2123
2118
  return function $mol_wire_task_get(host, args) {
2124
2119
  const sub = $mol_wire_auto();
2125
2120
  const existen = sub?.track_next();
2121
+ let cause = '';
2126
2122
  reuse: if (existen) {
2127
2123
  if (!existen.temp)
2128
2124
  break reuse;
2129
- if (existen.host !== host)
2125
+ if (existen.task !== task) {
2126
+ cause = 'task';
2130
2127
  break reuse;
2131
- if (existen.task !== task)
2128
+ }
2129
+ if (existen.host !== host) {
2130
+ cause = 'host';
2132
2131
  break reuse;
2133
- if (!$mol_compare_deep(existen.args, args))
2132
+ }
2133
+ if (!$mol_compare_deep(existen.args, args)) {
2134
+ cause = 'args';
2134
2135
  break reuse;
2136
+ }
2135
2137
  return existen;
2136
2138
  }
2137
2139
  const key = (host?.[Symbol.toStringTag] ?? host) + ('.' + task.name + '<#>');
@@ -2139,11 +2141,11 @@ var $;
2139
2141
  if (existen?.temp) {
2140
2142
  $$.$mol_log3_warn({
2141
2143
  place: '$mol_wire_task',
2142
- message: `Non idempotency`,
2144
+ message: `Different ${cause} on restart`,
2143
2145
  sub,
2144
- pubs: [...sub?.pub_list ?? [], existen],
2146
+ prev: existen,
2145
2147
  next,
2146
- hint: 'Ignore it',
2148
+ hint: 'Maybe required additional memoization',
2147
2149
  });
2148
2150
  }
2149
2151
  return next;