@siteimprove/alfa-dom 0.102.0 → 0.103.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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @siteimprove/alfa-dom
2
2
 
3
+ ## 0.103.0
4
+
5
+ ### Patch Changes
6
+
7
+ - **Fixed:** `Native.fromNode` can now handle `document.adoptedStyleSheets` where `length` property is missing. ([#1786](https://github.com/Siteimprove/alfa/pull/1786))
8
+
9
+ This addresses what is probably incorrect behavior of the `adoptedStyleSheets` in some browser implementations.
10
+
3
11
  ## 0.102.0
4
12
 
5
13
  ### Minor Changes
package/dist/native.js CHANGED
@@ -378,18 +378,10 @@ export var Native;
378
378
  };
379
379
  }
380
380
  function map(arrayLike, mapper) {
381
- const result = new Array(arrayLike.length);
382
- for (let i = 0, n = arrayLike.length; i < n; i++) {
383
- result[i] = mapper(arrayLike[i]);
384
- }
385
- return result;
381
+ return Array.from(arrayLike, mapper);
386
382
  }
387
383
  async function mapAsync(arrayLike, mapper) {
388
- const result = new Array(arrayLike.length);
389
- for (let i = 0, n = arrayLike.length; i < n; i++) {
390
- result[i] = await mapper(arrayLike[i]);
391
- }
392
- return result;
384
+ return Promise.all(Array.from(arrayLike, mapper));
393
385
  }
394
386
  /**
395
387
  * Ensure that the needed resources for the document or shadow root, such as
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "$schema": "http://json.schemastore.org/package",
3
3
  "name": "@siteimprove/alfa-dom",
4
4
  "homepage": "https://alfa.siteimprove.com",
5
- "version": "0.102.0",
5
+ "version": "0.103.0",
6
6
  "license": "MIT",
7
7
  "description": "Implementations of the core DOM and CSSOM node types",
8
8
  "repository": {
@@ -35,35 +35,35 @@
35
35
  "dist/**/*.d.ts"
36
36
  ],
37
37
  "dependencies": {
38
- "@siteimprove/alfa-array": "^0.102.0",
39
- "@siteimprove/alfa-cache": "^0.102.0",
40
- "@siteimprove/alfa-comparable": "^0.102.0",
41
- "@siteimprove/alfa-css": "^0.102.0",
42
- "@siteimprove/alfa-css-feature": "^0.102.0",
43
- "@siteimprove/alfa-device": "^0.102.0",
44
- "@siteimprove/alfa-earl": "^0.102.0",
45
- "@siteimprove/alfa-equatable": "^0.102.0",
46
- "@siteimprove/alfa-flags": "^0.102.0",
47
- "@siteimprove/alfa-iterable": "^0.102.0",
48
- "@siteimprove/alfa-json": "^0.102.0",
49
- "@siteimprove/alfa-lazy": "^0.102.0",
50
- "@siteimprove/alfa-map": "^0.102.0",
51
- "@siteimprove/alfa-option": "^0.102.0",
52
- "@siteimprove/alfa-parser": "^0.102.0",
53
- "@siteimprove/alfa-predicate": "^0.102.0",
54
- "@siteimprove/alfa-rectangle": "^0.102.0",
55
- "@siteimprove/alfa-refinement": "^0.102.0",
56
- "@siteimprove/alfa-result": "^0.102.0",
57
- "@siteimprove/alfa-sarif": "^0.102.0",
58
- "@siteimprove/alfa-selective": "^0.102.0",
59
- "@siteimprove/alfa-sequence": "^0.102.0",
60
- "@siteimprove/alfa-slice": "^0.102.0",
61
- "@siteimprove/alfa-string": "^0.102.0",
62
- "@siteimprove/alfa-trampoline": "^0.102.0",
63
- "@siteimprove/alfa-tree": "^0.102.0"
38
+ "@siteimprove/alfa-array": "^0.103.0",
39
+ "@siteimprove/alfa-cache": "^0.103.0",
40
+ "@siteimprove/alfa-comparable": "^0.103.0",
41
+ "@siteimprove/alfa-css": "^0.103.0",
42
+ "@siteimprove/alfa-css-feature": "^0.103.0",
43
+ "@siteimprove/alfa-device": "^0.103.0",
44
+ "@siteimprove/alfa-earl": "^0.103.0",
45
+ "@siteimprove/alfa-equatable": "^0.103.0",
46
+ "@siteimprove/alfa-flags": "^0.103.0",
47
+ "@siteimprove/alfa-iterable": "^0.103.0",
48
+ "@siteimprove/alfa-json": "^0.103.0",
49
+ "@siteimprove/alfa-lazy": "^0.103.0",
50
+ "@siteimprove/alfa-map": "^0.103.0",
51
+ "@siteimprove/alfa-option": "^0.103.0",
52
+ "@siteimprove/alfa-parser": "^0.103.0",
53
+ "@siteimprove/alfa-predicate": "^0.103.0",
54
+ "@siteimprove/alfa-rectangle": "^0.103.0",
55
+ "@siteimprove/alfa-refinement": "^0.103.0",
56
+ "@siteimprove/alfa-result": "^0.103.0",
57
+ "@siteimprove/alfa-sarif": "^0.103.0",
58
+ "@siteimprove/alfa-selective": "^0.103.0",
59
+ "@siteimprove/alfa-sequence": "^0.103.0",
60
+ "@siteimprove/alfa-slice": "^0.103.0",
61
+ "@siteimprove/alfa-string": "^0.103.0",
62
+ "@siteimprove/alfa-trampoline": "^0.103.0",
63
+ "@siteimprove/alfa-tree": "^0.103.0"
64
64
  },
65
65
  "devDependencies": {
66
- "@siteimprove/alfa-test": "^0.102.0",
66
+ "@siteimprove/alfa-test": "^0.103.0",
67
67
  "@types/jsdom": "^21.1.6",
68
68
  "jsdom": "^26.0.0"
69
69
  },