@siteimprove/alfa-dom 0.102.0 → 0.103.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
@@ -1,5 +1,19 @@
1
1
  # @siteimprove/alfa-dom
2
2
 
3
+ ## 0.103.1
4
+
5
+ ### Patch Changes
6
+
7
+ - **Fixed:** Imported style sheets are now serialized. ([#1789](https://github.com/Siteimprove/alfa/pull/1789))
8
+
9
+ ## 0.103.0
10
+
11
+ ### Patch Changes
12
+
13
+ - **Fixed:** `Native.fromNode` can now handle `document.adoptedStyleSheets` where `length` property is missing. ([#1786](https://github.com/Siteimprove/alfa/pull/1786))
14
+
15
+ This addresses what is probably incorrect behavior of the `adoptedStyleSheets` in some browser implementations.
16
+
3
17
  ## 0.102.0
4
18
 
5
19
  ### 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
@@ -1,5 +1,6 @@
1
1
  import { Feature } from "@siteimprove/alfa-css-feature";
2
2
  import type { Device } from "@siteimprove/alfa-device";
3
+ import { Iterable } from "@siteimprove/alfa-iterable";
3
4
  import { Option } from "@siteimprove/alfa-option";
4
5
  import { Predicate } from "@siteimprove/alfa-predicate";
5
6
  import { Trampoline } from "@siteimprove/alfa-trampoline";
@@ -1,6 +1,7 @@
1
1
  import { Lexer } from "@siteimprove/alfa-css";
2
2
  import { Feature } from "@siteimprove/alfa-css-feature";
3
- import { Option, None } from "@siteimprove/alfa-option";
3
+ import { Iterable } from "@siteimprove/alfa-iterable";
4
+ import { None, Option } from "@siteimprove/alfa-option";
4
5
  import { Predicate } from "@siteimprove/alfa-predicate";
5
6
  import { Trampoline } from "@siteimprove/alfa-trampoline";
6
7
  import { Rule } from "../rule.js";
@@ -74,6 +75,7 @@ export class ImportRule extends ConditionRule {
74
75
  // We match the CSSImportRule interface returning null when no layer
75
76
  // is declared, and "" for an anonymous layer.
76
77
  layer: this._layer.getOr(null),
78
+ rules: Iterable.toJSON(this.rules),
77
79
  };
78
80
  }
79
81
  toString() {
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.1",
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.1",
39
+ "@siteimprove/alfa-cache": "^0.103.1",
40
+ "@siteimprove/alfa-comparable": "^0.103.1",
41
+ "@siteimprove/alfa-css": "^0.103.1",
42
+ "@siteimprove/alfa-css-feature": "^0.103.1",
43
+ "@siteimprove/alfa-device": "^0.103.1",
44
+ "@siteimprove/alfa-earl": "^0.103.1",
45
+ "@siteimprove/alfa-equatable": "^0.103.1",
46
+ "@siteimprove/alfa-flags": "^0.103.1",
47
+ "@siteimprove/alfa-iterable": "^0.103.1",
48
+ "@siteimprove/alfa-json": "^0.103.1",
49
+ "@siteimprove/alfa-lazy": "^0.103.1",
50
+ "@siteimprove/alfa-map": "^0.103.1",
51
+ "@siteimprove/alfa-option": "^0.103.1",
52
+ "@siteimprove/alfa-parser": "^0.103.1",
53
+ "@siteimprove/alfa-predicate": "^0.103.1",
54
+ "@siteimprove/alfa-rectangle": "^0.103.1",
55
+ "@siteimprove/alfa-refinement": "^0.103.1",
56
+ "@siteimprove/alfa-result": "^0.103.1",
57
+ "@siteimprove/alfa-sarif": "^0.103.1",
58
+ "@siteimprove/alfa-selective": "^0.103.1",
59
+ "@siteimprove/alfa-sequence": "^0.103.1",
60
+ "@siteimprove/alfa-slice": "^0.103.1",
61
+ "@siteimprove/alfa-string": "^0.103.1",
62
+ "@siteimprove/alfa-trampoline": "^0.103.1",
63
+ "@siteimprove/alfa-tree": "^0.103.1"
64
64
  },
65
65
  "devDependencies": {
66
- "@siteimprove/alfa-test": "^0.102.0",
66
+ "@siteimprove/alfa-test": "^0.103.1",
67
67
  "@types/jsdom": "^21.1.6",
68
68
  "jsdom": "^26.0.0"
69
69
  },