@skirbi/sugar 0.0.12 → 0.0.14

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/Changes CHANGED
@@ -1,5 +1,16 @@
1
1
  Revision history for @skirbi/sugar
2
2
 
3
+ 0.0.14 2026-04-16 14:01:35Z
4
+
5
+ * assertQuerySelector for this (if you know, you know)
6
+
7
+ 0.0.13 2026-04-16 13:27:59Z
8
+
9
+ * Fix jsdoc build issue
10
+ * Retro actively fix Changelog for v0.0.9, we missed two small additions in
11
+ testing.mjs
12
+ * Add assertQuerySelector() method
13
+
3
14
  0.0.12 2026-04-13 00:51:51Z
4
15
 
5
16
  * While checking other Semtic units, we tightened a few tests and exposed an
@@ -142,6 +153,8 @@ Revision history for @skirbi/sugar
142
153
  }
143
154
  XActions.register();
144
155
 
156
+ * Add `tick` and `morphReplace` methods in `testing.mjs`.
157
+
145
158
  0.0.8 2026-02-23 03:32:55Z
146
159
 
147
160
  * Add assertComponentContract testing method. The idea is this:
@@ -327,5 +327,15 @@ export class HTMLElementSugar extends HTMLElement {
327
327
  getConfig() {
328
328
  return { ...this.config };
329
329
  }
330
+
331
+ static assertQuerySelector(haystack, needle, msg) {
332
+ const item = haystack.querySelector(needle)
333
+ if (!item) throw new Error(msg);
334
+ return item;
335
+ }
336
+
337
+ assertQuerySelector(haystack, needle, msg) {
338
+ return this.constructor.assertQuerySelector(haystack, needle, msg);
339
+ }
330
340
  }
331
341
 
package/lib/index.mjs CHANGED
@@ -2,7 +2,7 @@
2
2
  //
3
3
  // SPDX-License-Identifier: MIT
4
4
 
5
- const VERSION = "0.0.12";
5
+ const VERSION = "0.0.14";
6
6
 
7
7
  export { HTMLElementSugar } from './htmlelement.mjs';
8
8
  export { HTMLElementSugarInput } from './htmlelement-input.mjs';
package/package.json CHANGED
@@ -53,5 +53,5 @@
53
53
  },
54
54
  "sideEffects": false,
55
55
  "type": "module",
56
- "version": "0.0.12"
56
+ "version": "0.0.14"
57
57
  }