qword 1.1.3 → 1.1.5

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/ChangeLog CHANGED
@@ -1,3 +1,14 @@
1
+ 2026.09.05, v1.1.5
2
+
3
+ fix:
4
+ - 08c2671 indent revert
5
+
6
+ 2026.09.05, v1.1.4
7
+
8
+ fix:
9
+ - af91c6f indent
10
+ - 0029930 socket
11
+
1
12
  2026.09.05, v1.1.3
2
13
 
3
14
  fix:
@@ -287,14 +287,11 @@ test('Editor: addListener is alias for on', (t) => {
287
287
  t.end();
288
288
  });
289
289
 
290
- test('Editor: emit calls registered handler', async (t) => {
290
+ test('Editor: emit calls registered handler', (t) => {
291
291
  const editor = makeEditor();
292
292
  let received = null;
293
- const [value] = await once(editor, 'custom');
294
-
295
- received = value;
293
+ editor.on('custom', (value) => { received = value; });
296
294
  editor.emit('custom', 'hello');
297
-
298
295
  t.equal(received, 'hello');
299
296
  t.end();
300
297
  });
@@ -14,11 +14,11 @@ export const loadOptions = once(async (prefix) => {
14
14
  return await load.json(url);
15
15
  });
16
16
 
17
- const on = async (remote) => {
17
+ const on = async ({remote, local}) => {
18
18
  const [error] = await tryToCatch(load.parallel, remote);
19
19
 
20
20
  if (error)
21
- await off();
21
+ await off(local);
22
22
  };
23
23
 
24
24
  const off = async function(local) {
@@ -59,22 +59,19 @@ export default async (name, options = {}) => {
59
59
  local = [module.local];
60
60
  }
61
61
 
62
- local = [];
62
+ local = local.map((url) => prefix + url);
63
63
 
64
- for (const url of local) {
65
- local.push(prefix + url);
66
- }
67
-
68
- const remote = [];
69
-
70
- for (const tmpl of remoteTmpls) {
71
- remote.push(tmpl.replace(/{{\sversion\s}}/g, version));
72
- }
64
+ const remote = remoteTmpls.map((tmpl) => {
65
+ return tmpl.replace(/{{\s*version\s*}}/g, version);
66
+ });
73
67
 
74
68
  if (!online)
75
69
  return await off(local);
76
70
 
77
- await on(remote);
71
+ await on({
72
+ remote,
73
+ local,
74
+ });
78
75
  };
79
76
 
80
77
  function binom(name, array) {