@schukai/monster 4.73.0 → 4.73.1

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.md CHANGED
@@ -2,6 +2,17 @@
2
2
 
3
3
 
4
4
 
5
+ ## [4.73.1] - 2026-01-03
6
+
7
+ ### Bug Fixes
8
+
9
+ - Enhance collectLookupIds with sourcePath parameter for flexibility
10
+ ### Changes
11
+
12
+ - update tests
13
+
14
+
15
+
5
16
  ## [4.73.0] - 2026-01-03
6
17
 
7
18
  ### Add Features
package/package.json CHANGED
@@ -1 +1 @@
1
- {"author":"Volker Schukai","dependencies":{"@floating-ui/dom":"^1.7.4","@popperjs/core":"^2.11.8"},"description":"Monster is a simple library for creating fast, robust and lightweight websites.","homepage":"https://monsterjs.org/","keywords":["framework","web","dom","css","sass","mobile-first","app","front-end","templates","schukai","core","shopcloud","alvine","monster","buildmap","stack","observer","observable","uuid","node","nodelist","css-in-js","logger","log","theme"],"license":"AGPL 3.0","main":"source/monster.mjs","module":"source/monster.mjs","name":"@schukai/monster","repository":{"type":"git","url":"https://gitlab.schukai.com/oss/libraries/javascript/monster.git"},"type":"module","version":"4.73.0"}
1
+ {"author":"Volker Schukai","dependencies":{"@floating-ui/dom":"^1.7.4","@popperjs/core":"^2.11.8"},"description":"Monster is a simple library for creating fast, robust and lightweight websites.","homepage":"https://monsterjs.org/","keywords":["framework","web","dom","css","sass","mobile-first","app","front-end","templates","schukai","core","shopcloud","alvine","monster","buildmap","stack","observer","observable","uuid","node","nodelist","css-in-js","logger","log","theme"],"license":"AGPL 3.0","main":"source/monster.mjs","module":"source/monster.mjs","name":"@schukai/monster","repository":{"type":"git","url":"https://gitlab.schukai.com/oss/libraries/javascript/monster.git"},"type":"module","version":"4.73.1"}
@@ -824,7 +824,11 @@ async function resolveRemoteLookup(requestId, name, cfg) {
824
824
  const cache = getLookupCache.call(this, name);
825
825
  const pending = getLookupPending.call(this, name);
826
826
 
827
- const ids = collectLookupIds.call(this, key);
827
+ const ids = collectLookupIds.call(
828
+ this,
829
+ key,
830
+ this.getOption("lookups.sourcePath", "dataset"),
831
+ );
828
832
  const missingIds = ids.filter((id) => !cache.has(id) && !pending.has(id));
829
833
 
830
834
  if (missingIds.length === 0) {
@@ -878,8 +882,8 @@ function applyLookupCache(requestId, cfg, cache) {
878
882
  * @param {string} key
879
883
  * @return {string[]}
880
884
  */
881
- function collectLookupIds(key) {
882
- const rows = resolveLookupRows.call(this);
885
+ function collectLookupIds(key, sourcePath) {
886
+ const rows = resolveLookupRows.call(this, undefined, sourcePath);
883
887
  if (!isArray(rows)) {
884
888
  return [];
885
889
  }
@@ -228,9 +228,16 @@ describe('Select', function () {
228
228
  ]);
229
229
  mocks.appendChild(select);
230
230
 
231
- setTimeout(() => {
231
+ const startedAt = Date.now();
232
+ const poll = () => {
232
233
  try {
233
234
  const options = select.getOption('options');
235
+ if (options?.[0]?.value !== 'Alpha') {
236
+ if (Date.now() - startedAt < 1500) {
237
+ return setTimeout(poll, 50);
238
+ }
239
+ }
240
+
234
241
  expect(options[0].value).to.equal('Alpha');
235
242
  expect(options[0].label).to.equal('Alpha');
236
243
  expect(options[0].visibility).to.equal('visible');
@@ -245,7 +252,9 @@ describe('Select', function () {
245
252
  }
246
253
 
247
254
  done();
248
- }, 350);
255
+ };
256
+
257
+ setTimeout(poll, 50);
249
258
  });
250
259
 
251
260
  it('should not parse options arrays with multiple string entries', function (done) {
@@ -14,11 +14,11 @@ describe('DeadMansSwitch', function () {
14
14
  const ms2 = Date.now();
15
15
 
16
16
  const diff = ms2 - ms1;
17
- if (diff < 100) {
18
- done('to short ' + diff);
19
- return;
20
- }
21
- done();
17
+ if (diff < 90) {
18
+ done(new Error('to short ' + diff));
19
+ return;
20
+ }
21
+ done();
22
22
  })
23
23
 
24
24
 
@@ -42,7 +42,7 @@ describe('DeadMansSwitch', function () {
42
42
  return;
43
43
  }
44
44
 
45
- if (diff < 600) {
45
+ if (diff < 550) {
46
46
  done(new Error('to short ' + diff));
47
47
  return;
48
48
  }
@@ -68,4 +68,4 @@ describe('DeadMansSwitch', function () {
68
68
  });
69
69
  });
70
70
 
71
- });
71
+ });