@metamask/snaps-controllers 3.5.0 → 3.6.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 +19 -1
- package/dist/cjs/snaps/SnapController.js +6 -4
- package/dist/cjs/snaps/SnapController.js.map +1 -1
- package/dist/cjs/snaps/location/npm.js +111 -80
- package/dist/cjs/snaps/location/npm.js.map +1 -1
- package/dist/cjs/snaps/registry/json.js +12 -12
- package/dist/cjs/snaps/registry/json.js.map +1 -1
- package/dist/esm/snaps/SnapController.js +6 -4
- package/dist/esm/snaps/SnapController.js.map +1 -1
- package/dist/esm/snaps/location/npm.js +111 -80
- package/dist/esm/snaps/location/npm.js.map +1 -1
- package/dist/esm/snaps/registry/json.js +12 -12
- package/dist/esm/snaps/registry/json.js.map +1 -1
- package/dist/types/snaps/SnapController.d.ts +6 -6
- package/dist/types/snaps/location/npm.d.ts +38 -4
- package/package.json +10 -10
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [3.6.0]
|
|
10
|
+
### Changed
|
|
11
|
+
- Revert usage of `DecompressionStream` ([#2052](https://github.com/MetaMask/snaps/pull/2052))
|
|
12
|
+
- Refactor `NpmLocation` class ([#2038](https://github.com/MetaMask/snaps/pull/2038))
|
|
13
|
+
- Most logic is now located in `BaseNpmLocation`, making it easier to extend without duplication.
|
|
14
|
+
- Bump several MetaMask dependencies ([#2053](https://github.com/MetaMask/snaps/pull/2053), [#2061](https://github.com/MetaMask/snaps/pull/2061), [#2064](https://github.com/MetaMask/snaps/pull/2064), [#2065](https://github.com/MetaMask/snaps/pull/2065), [#2067](https://github.com/MetaMask/snaps/pull/2067))
|
|
15
|
+
|
|
16
|
+
### Removed
|
|
17
|
+
- Remove support for object-like syntax for cronjobs ([#2057](https://github.com/MetaMask/snaps/pull/2057))
|
|
18
|
+
- Since this never worked in the first place we aren't marking it as breaking.
|
|
19
|
+
|
|
20
|
+
## [3.5.1]
|
|
21
|
+
### Changed
|
|
22
|
+
- Improve `SnapController` constructor types ([#2023](https://github.com/MetaMask/snaps/pull/2023))
|
|
23
|
+
- Bump `snaps-registry` ([#2020](https://github.com/MetaMask/snaps/pull/2020))
|
|
24
|
+
|
|
9
25
|
## [3.5.0]
|
|
10
26
|
### Changed
|
|
11
27
|
- Reduce memory usage by removing source code and state from runtime ([#2009](https://github.com/MetaMask/snaps/pull/2009))
|
|
@@ -136,7 +152,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
136
152
|
- The version of the package no longer needs to match the version of all other
|
|
137
153
|
MetaMask Snaps packages.
|
|
138
154
|
|
|
139
|
-
[Unreleased]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-controllers@3.
|
|
155
|
+
[Unreleased]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-controllers@3.6.0...HEAD
|
|
156
|
+
[3.6.0]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-controllers@3.5.1...@metamask/snaps-controllers@3.6.0
|
|
157
|
+
[3.5.1]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-controllers@3.5.0...@metamask/snaps-controllers@3.5.1
|
|
140
158
|
[3.5.0]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-controllers@3.4.1...@metamask/snaps-controllers@3.5.0
|
|
141
159
|
[3.4.1]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-controllers@3.4.0...@metamask/snaps-controllers@3.4.1
|
|
142
160
|
[3.4.0]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-controllers@3.3.0...@metamask/snaps-controllers@3.4.0
|
|
@@ -327,7 +327,7 @@ class SnapController extends _basecontroller.BaseController {
|
|
|
327
327
|
runtime.pendingOutboundRequests = 0;
|
|
328
328
|
try {
|
|
329
329
|
if (this.isRunning(snapId)) {
|
|
330
|
-
_class_private_field_get(this, _closeAllConnections)
|
|
330
|
+
_class_private_field_get(this, _closeAllConnections)?.call(this, snapId);
|
|
331
331
|
await _class_private_method_get(this, _terminateSnap, terminateSnap).call(this, snapId);
|
|
332
332
|
}
|
|
333
333
|
} finally{
|
|
@@ -460,9 +460,11 @@ class SnapController extends _basecontroller.BaseController {
|
|
|
460
460
|
* handlers, event listeners, and permissions; tear down all snap providers.
|
|
461
461
|
*/ async clearState() {
|
|
462
462
|
const snapIds = Object.keys(this.state.snaps);
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
463
|
+
if (_class_private_field_get(this, _closeAllConnections)) {
|
|
464
|
+
snapIds.forEach((snapId)=>{
|
|
465
|
+
_class_private_field_get(this, _closeAllConnections)?.call(this, snapId);
|
|
466
|
+
});
|
|
467
|
+
}
|
|
466
468
|
await this.messagingSystem.call('ExecutionService:terminateAllSnaps');
|
|
467
469
|
snapIds.forEach((snapId)=>_class_private_method_get(this, _revokeAllSnapPermissions, revokeAllSnapPermissions).call(this, snapId));
|
|
468
470
|
this.update((state)=>{
|