@siteimprove/alfa-map 0.97.0 → 0.99.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-map
2
2
 
3
+ ## 0.99.0
4
+
5
+ ## 0.98.0
6
+
7
+ ### Patch Changes
8
+
9
+ - **Changed:** Classes that do not implement the Singleton pattern now have `protected` constructor and can be extended. ([#1735](https://github.com/Siteimprove/alfa/pull/1735))
10
+
3
11
  ## 0.97.0
4
12
 
5
13
  ## 0.96.0
package/dist/map.d.ts CHANGED
@@ -9,6 +9,7 @@ import type { Option } from "@siteimprove/alfa-option";
9
9
  import { Predicate } from "@siteimprove/alfa-predicate";
10
10
  import type { Reducer } from "@siteimprove/alfa-reducer";
11
11
  import type { Refinement } from "@siteimprove/alfa-refinement";
12
+ import type { Node } from "./node.js";
12
13
  /**
13
14
  * @public
14
15
  */
@@ -18,7 +19,7 @@ export declare class Map<K, V> implements Collection.Keyed<K, V> {
18
19
  static empty<K = never, V = never>(): Map<K, V>;
19
20
  private readonly _root;
20
21
  private readonly _size;
21
- private constructor();
22
+ protected constructor(root: Node<K, V>, size: number);
22
23
  get size(): number;
23
24
  isEmpty(): this is Map<K, never>;
24
25
  forEach(callback: Callback<V, void, [key: K]>): void;
package/dist/node.d.ts CHANGED
@@ -57,7 +57,7 @@ export declare class Leaf<K, V> implements Node<K, V> {
57
57
  private readonly _hash;
58
58
  private readonly _key;
59
59
  private readonly _value;
60
- private constructor();
60
+ protected constructor(hash: number, key: K, value: V);
61
61
  get key(): K;
62
62
  get value(): V;
63
63
  isEmpty(): this is Empty;
@@ -76,7 +76,7 @@ export declare class Collision<K, V> implements Node<K, V> {
76
76
  static of<K, V>(hash: number, nodes: Array<Leaf<K, V>>): Collision<K, V>;
77
77
  private readonly _hash;
78
78
  private readonly _nodes;
79
- private constructor();
79
+ protected constructor(hash: number, nodes: Array<Leaf<K, V>>);
80
80
  isEmpty(): this is Empty;
81
81
  isLeaf(): this is Leaf<K, V>;
82
82
  get(key: K, hash: number, shift: number): Option<V>;
@@ -93,7 +93,7 @@ export declare class Sparse<K, V> implements Node<K, V> {
93
93
  static of<K, V>(mask: number, nodes: Array<Node<K, V>>): Sparse<K, V>;
94
94
  private readonly _mask;
95
95
  private readonly _nodes;
96
- private constructor();
96
+ protected constructor(mask: number, nodes: Array<Node<K, V>>);
97
97
  isEmpty(): this is Empty;
98
98
  isLeaf(): this is Leaf<K, V>;
99
99
  get(key: K, hash: number, shift: number): Option<V>;
package/dist/status.d.ts CHANGED
@@ -14,25 +14,25 @@ export declare namespace Status {
14
14
  }
15
15
  export class Created<T> extends Status<T> {
16
16
  static of<T>(result: T): Created<T>;
17
- private constructor();
17
+ protected constructor(result: T);
18
18
  get status(): "created";
19
19
  }
20
20
  export const created: typeof Created.of;
21
21
  export class Updated<T> extends Status<T> {
22
22
  static of<T>(result: T): Updated<T>;
23
- private constructor();
23
+ protected constructor(result: T);
24
24
  get status(): "updated";
25
25
  }
26
26
  export const updated: typeof Updated.of;
27
27
  export class Deleted<T> extends Status<T> {
28
28
  static of<T>(result: T): Deleted<T>;
29
- private constructor();
29
+ protected constructor(result: T);
30
30
  get status(): "deleted";
31
31
  }
32
32
  export const deleted: typeof Deleted.of;
33
33
  export class Unchanged<T> extends Status<T> {
34
34
  static of<T>(result: T): Unchanged<T>;
35
- private constructor();
35
+ protected constructor(result: T);
36
36
  get status(): "unchanged";
37
37
  }
38
38
  export const unchanged: typeof Unchanged.of;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "$schema": "http://json.schemastore.org/package",
3
3
  "name": "@siteimprove/alfa-map",
4
4
  "homepage": "https://alfa.siteimprove.com",
5
- "version": "0.97.0",
5
+ "version": "0.99.0",
6
6
  "license": "MIT",
7
7
  "description": "An implementation of an immutable map structure, based on a hash array mapped trie",
8
8
  "repository": {
@@ -22,24 +22,25 @@
22
22
  "dist/**/*.d.ts"
23
23
  ],
24
24
  "dependencies": {
25
- "@siteimprove/alfa-array": "^0.97.0",
26
- "@siteimprove/alfa-bits": "^0.97.0",
27
- "@siteimprove/alfa-callback": "^0.97.0",
28
- "@siteimprove/alfa-collection": "^0.97.0",
29
- "@siteimprove/alfa-equatable": "^0.97.0",
30
- "@siteimprove/alfa-fnv": "^0.97.0",
31
- "@siteimprove/alfa-functor": "^0.97.0",
32
- "@siteimprove/alfa-hash": "^0.97.0",
33
- "@siteimprove/alfa-iterable": "^0.97.0",
34
- "@siteimprove/alfa-json": "^0.97.0",
35
- "@siteimprove/alfa-mapper": "^0.97.0",
36
- "@siteimprove/alfa-option": "^0.97.0",
37
- "@siteimprove/alfa-predicate": "^0.97.0",
38
- "@siteimprove/alfa-reducer": "^0.97.0",
39
- "@siteimprove/alfa-refinement": "^0.97.0"
25
+ "@siteimprove/alfa-array": "^0.99.0",
26
+ "@siteimprove/alfa-bits": "^0.99.0",
27
+ "@siteimprove/alfa-callback": "^0.99.0",
28
+ "@siteimprove/alfa-collection": "^0.99.0",
29
+ "@siteimprove/alfa-equatable": "^0.99.0",
30
+ "@siteimprove/alfa-fnv": "^0.99.0",
31
+ "@siteimprove/alfa-functor": "^0.99.0",
32
+ "@siteimprove/alfa-hash": "^0.99.0",
33
+ "@siteimprove/alfa-iterable": "^0.99.0",
34
+ "@siteimprove/alfa-json": "^0.99.0",
35
+ "@siteimprove/alfa-mapper": "^0.99.0",
36
+ "@siteimprove/alfa-option": "^0.99.0",
37
+ "@siteimprove/alfa-predicate": "^0.99.0",
38
+ "@siteimprove/alfa-reducer": "^0.99.0",
39
+ "@siteimprove/alfa-refinement": "^0.99.0"
40
40
  },
41
41
  "devDependencies": {
42
- "@siteimprove/alfa-test": "^0.97.0"
42
+ "@siteimprove/alfa-rng": "^0.99.0",
43
+ "@siteimprove/alfa-test": "^0.99.0"
43
44
  },
44
45
  "publishConfig": {
45
46
  "access": "public",