@metamask-previews/base-controller 4.1.0-preview.d357889 → 4.1.1-preview.08978bf

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.
Files changed (2) hide show
  1. package/CHANGELOG.md +44 -3
  2. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,4 +1,5 @@
1
1
  # Changelog
2
+
2
3
  All notable changes to this project will be documented in this file.
3
4
 
4
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
@@ -6,12 +7,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
7
 
7
8
  ## [Unreleased]
8
9
 
10
+ ## [4.1.1]
11
+
12
+ ### Changed
13
+
14
+ - Bump `@metamask/utils` to `^8.3.0` ([#3769](https://github.com/MetaMask/core/pull/3769))
15
+
9
16
  ## [4.1.0]
17
+
10
18
  ### Added
19
+
11
20
  - Add `registerInitialEventPayload` to `ControllerMessenger` and `RestrictedControllerMessenger` ([#3697](https://github.com/MetaMask/core/pull/3697))
12
21
  - This allows registering an event payload function for an event, which has the benefit of ensuring the "subscription selector" feature works correctly the first time the event is fired after subscribing.
13
22
 
14
23
  ### Fixed
24
+
15
25
  - Fix `subscribe` method selector support on first publish ([#3697](https://github.com/MetaMask/core/pull/3697))
16
26
  - An event with a registered initial event payload function will work better with selectors, in that it will correctly compare with the initial selected state and return the previous value the first time it's published. Without this, the initial published event will always return `undefined` as the previous value.
17
27
  - Subscribers to the `stateChange` event of any `BaseControllerV2`-based controllers will now correctly handle the initial state change event ([#3702](https://github.com/MetaMask/core/pull/3702))
@@ -19,18 +29,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
19
29
  - `BaseControllerV2` has been updated to correctly compare with the previous value even for the first state change. The returned `previousValue` is also now guaranteed to be correct even for the initial state change.
20
30
 
21
31
  ## [4.0.1]
32
+
22
33
  ### Changed
34
+
23
35
  - Deprecate `subscribe` property from `BaseControllerV2` ([#3590](https://github.com/MetaMask/core/pull/3590), [#3698](https://github.com/MetaMask/core/pull/3698))
24
36
  - This property was used to differentiate between `BaseControllerV1` and `BaseControllerV2` controllers. It is no longer used, so it has been marked as deprecated.
25
37
 
26
38
  ## [4.0.0]
39
+
27
40
  ### Added
41
+
28
42
  - Add `ControllerGetStateAction` and `ControllerStateChangeEvent` types ([#1890](https://github.com/MetaMask/core/pull/1890), [#2029](https://github.com/MetaMask/core/pull/2029))
29
43
  - Add `NamespacedName` type ([#1890](https://github.com/MetaMask/core/pull/1890))
30
44
  - This is the narrowest supertype of all names defined within a given namespace.
31
45
  - Add `NotNamespacedBy` type, which matches an action/event name if and only if it is not prefixed by a given namespace ([#2051](https://github.com/MetaMask/core/pull/2051))
32
46
 
33
47
  ### Changed
48
+
34
49
  - **BREAKING:** Alter controller messenger `ActionHandler` type so `Action` type parameter must satisfy (updated) `ActionConstraint` ([#1890](https://github.com/MetaMask/core/pull/1890))
35
50
  - **BREAKING:** Alter controller messenger `ExtractActionParameters` utility type so `Action` type parameter must satisfy (updated) `ActionConstraint` ([#1890](https://github.com/MetaMask/core/pull/1890))
36
51
  - **BREAKING:** Alter controller messenger `ExtractEventHandler` utility type so `Event` type parameter must satisfy `EventConstraint` ([#1890](https://github.com/MetaMask/core/pull/1890))
@@ -49,61 +64,86 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
49
64
  - Bump `@metamask/utils` to ^8.2.0 ([#1957](https://github.com/MetaMask/core/pull/1957))
50
65
 
51
66
  ## [3.2.3]
67
+
52
68
  ### Changed
69
+
53
70
  - Bump dependency on `@metamask/utils` to ^8.1.0 ([#1639](https://github.com/MetaMask/core/pull/1639))
54
71
 
55
72
  ## [3.2.2]
73
+
56
74
  ### Changed
75
+
57
76
  - Update TypeScript to v4.8.x ([#1718](https://github.com/MetaMask/core/pull/1718))
58
77
 
59
78
  ## [3.2.1]
79
+
60
80
  ### Changed
81
+
61
82
  - There are no consumer-facing changes to this package. This version is a part of a synchronized release across all packages in our monorepo.
62
83
 
63
84
  ## [3.2.0]
85
+
64
86
  ### Changed
65
- - When deriving state, skip properties with invalid metadata ([#1529](https://github.com/MetaMask/core/pull/1529))
87
+
88
+ - When deriving state, skip properties with invalid metadata ([#1529](https://github.com/MetaMask/core/pull/1529))
66
89
  - The previous behavior was to throw an error
67
90
  - An error is thrown in a timeout handler so that it can still be captured in the console, and by global unhandled error handlers.
68
91
  - Update `@metamask/utils` to `^6.2.0` ([#1514](https://github.com/MetaMask/core/pull/1514))
69
92
 
70
93
  ## [3.1.0]
94
+
71
95
  ### Changed
96
+
72
97
  - Prevent event publish from throwing error ([#1475](https://github.com/MetaMask/core/pull/1475))
73
98
  - The controller messenger will no longer throw when an event subscriber throws an error. Calls to `publish` (either within controllers or on a messenger instance directly) will no longer throw errors.
74
99
  - Errors are thrown in a timeout handler so that they can still be logged and captured.
75
100
 
76
101
  ## [3.0.0]
102
+
77
103
  ### Changed
104
+
78
105
  - **BREAKING:** Bump to Node 16 ([#1262](https://github.com/MetaMask/core/pull/1262))
79
106
  - Replace `@metamask/controller-utils` dependency with `@metamask/utils` ([#1370](https://github.com/MetaMask/core/pull/1370))
80
107
 
81
108
  ## [2.0.0]
109
+
82
110
  ### Removed
111
+
83
112
  - **BREAKING:** Remove `isomorphic-fetch` ([#1106](https://github.com/MetaMask/controllers/pull/1106))
84
113
  - Consumers must now import `isomorphic-fetch` or another polyfill themselves if they are running in an environment without `fetch`
85
114
 
86
115
  ## [1.1.2]
116
+
87
117
  ### Changed
118
+
88
119
  - Rename this repository to `core` ([#1031](https://github.com/MetaMask/controllers/pull/1031))
89
- - Update `@metamask/controller-utils` package ([#1041](https://github.com/MetaMask/controllers/pull/1041))
120
+ - Update `@metamask/controller-utils` package ([#1041](https://github.com/MetaMask/controllers/pull/1041))
90
121
 
91
122
  ## [1.1.1]
123
+
92
124
  ### Changed
125
+
93
126
  - Relax dependency on `@metamask/controller-utils` (use `^` instead of `~`) ([#998](https://github.com/MetaMask/core/pull/998))
94
127
 
95
128
  ## [1.1.0]
129
+
96
130
  ### Added
131
+
97
132
  - Add `applyPatches` function to BaseControllerV2 ([#980](https://github.com/MetaMask/core/pull/980))
98
133
 
99
134
  ### Changed
135
+
100
136
  - Action and event handler types are now exported ([#987](https://github.com/MetaMask/core/pull/987))
101
137
  - Update `update` function to expose patches ([#980](https://github.com/MetaMask/core/pull/980))
102
138
 
103
139
  ## [1.0.0]
140
+
104
141
  ### Added
142
+
105
143
  - Initial release
144
+
106
145
  - As a result of converting our shared controllers repo into a monorepo ([#831](https://github.com/MetaMask/core/pull/831)), we've created this package from select parts of [`@metamask/controllers` v33.0.0](https://github.com/MetaMask/core/tree/v33.0.0), namely:
146
+
107
147
  - `src/BaseController.ts`
108
148
  - `src/BaseController.test.ts`
109
149
  - `src/BaseControllerV2.ts`
@@ -115,7 +155,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
115
155
 
116
156
  All changes listed after this point were applied to this package following the monorepo conversion.
117
157
 
118
- [Unreleased]: https://github.com/MetaMask/core/compare/@metamask/base-controller@4.1.0...HEAD
158
+ [Unreleased]: https://github.com/MetaMask/core/compare/@metamask/base-controller@4.1.1...HEAD
159
+ [4.1.1]: https://github.com/MetaMask/core/compare/@metamask/base-controller@4.1.0...@metamask/base-controller@4.1.1
119
160
  [4.1.0]: https://github.com/MetaMask/core/compare/@metamask/base-controller@4.0.1...@metamask/base-controller@4.1.0
120
161
  [4.0.1]: https://github.com/MetaMask/core/compare/@metamask/base-controller@4.0.0...@metamask/base-controller@4.0.1
121
162
  [4.0.0]: https://github.com/MetaMask/core/compare/@metamask/base-controller@3.2.3...@metamask/base-controller@4.0.0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metamask-previews/base-controller",
3
- "version": "4.1.0-preview.d357889",
3
+ "version": "4.1.1-preview.08978bf",
4
4
  "description": "Provides scaffolding for controllers as well a communication system for all controllers",
5
5
  "keywords": [
6
6
  "MetaMask",