Skip to content

Releases: MetaMask/snaps

0.10.5

21 Mar 14:01
37af59a
Compare
Choose a tag to compare

@metamask/snaps-cli

Changed

  • No changes this release.

@metamask/snap-controllers

Added

  • Add updateSnap function to SnapController (#259)

Fixed

  • Fix issue where installation errors were repeatedly thrown (#301)
  • Fix snap crash handling (#298)

@metamask/snap-examples

Changed

  • No changes this release.

@metamask/execution-environments

Fixed

  • Fix missing index.js (#303)

@metamask/iframe-execution-environment-service

Fixed

  • Fix snap crash handling (#298)

@metamask/rpc-methods

Changed

  • No changes this release.

@metamask/snap-types

Changed

  • No changes this release.

0.10.4

18 Mar 20:12
4cfaeb8
Compare
Choose a tag to compare

@metamask/execution-environments

Fixed

  • Fix endowed global functions with properties (#294)
    • Endowments like Date were missing all properties except name and length, causing e.g. Date.now to be undefined. This is no longer the case.

0.10.3

18 Mar 12:12
fa313de
Compare
Choose a tag to compare

@metamask/snaps-cli

Fixed

  • Improve dynamic mocking (#262)

@metamask/snap-controllers

Changed

  • Always reinstall local snaps (#289)

@metamask/snap-examples

Added

  • Add notification example snap (#248)

@metamask/execution-environments

Changed

  • No changes this release.

@metamask/iframe-execution-environment-service

Changed

  • No changes this release.

@metamask/rpc-methods

Changed

  • Throw when trying to invoke a non-installed Snap (#286)

@metamask/snap-types

Changed

  • No changes this release.

0.10.2

11 Mar 23:56
1b09897
Compare
Choose a tag to compare

@metamask/snap-controllers

Fixed

  • Installation failure (#279)
    • A faulty installation script in a dependency caused the installation of this package to fail.

@metamask/execution-environments

Fixed

  • Remove faulty postinstall script (#279)
    • The faulty script caused the installation of this package to fail for consumers.

@metamask/iframe-execution-environment-service

Fixed

  • Installation failure (#279)
    • A faulty installation script in a dependency caused the installation of this package to fail.

@metamask/snaps-cli

Fixed

  • Installation failure (#279)
    • A faulty installation script in a dependency caused the installation of this package to fail.

0.10.1

11 Mar 22:12
87b5c64
Compare
Choose a tag to compare

@metamask/snap-controllers

Changed

  • Populate jsonrpc field in Snap RPC requests (#273)

Fixed

  • Various bugs (#275)
    • Snap fetching during installation.
    • Snap removal when cancelling a Snap installation request.

@metamask/execution-environments

Fixed

  • Removed deprecated package (#272)
    • This package now uses the functionally equivalent @metamask/providers instead of the deprecated @metamask/inpage-provider.

@metamask/snaps-cli

Fixed

  • Comment stripping will no longer remove empty block comments in strings (#276)

@metamask/snap-types

Fixed

  • Removed deprecated package (#272)
    • This package now uses the functionally equivalent @metamask/providers instead of the deprecated @metamask/inpage-provider.

0.10.0

10 Mar 01:14
f138e4d
Compare
Choose a tag to compare

@metamask/snap-controllers

Added

  • Allow specifying a version range when installing snap (#250)
  • Add more safe default endowments to snaps (#252)

Changed

  • BREAKING: Specify all endowments in the SnapController (#252), (#266)
    • Previously, default endowments were specified in the execution environment. Now, default endowments are specified in the SnapController, and the execution environment will only add endowments specified by the execution command, except for the wallet API object.
  • Disable caching when fetching local snaps (#227)
    • This ensures that the SnapController will always fetch the latest snap manifest and source code during local development.

Removed

  • BREAKING: Remove the PermissionController and SubjectMetadataController (#261)

Fixed

  • Prevent useless errors from being thrown when a snap is removed (#215)

@metamask/execution-environments

Changed

  • Initial release, made using components from the deprecated @metamask/snap-workers package. (#231)
    • Breaking changes are relative to the old package.
  • BREAKING: Endowments must be passed to the execution environment (#252), (#266)
    • Previously, default endowments were specified in the execution environment itself. Now, all endowments must be specified in the executeSnap RPC parameters, except for the wallet API object.
  • Add endowments to the global self in addition to window (#263)

@metamask/iframe-execution-environment-service

Changed

  • No changes this release.

@metamask/rpc-methods

Added

  • snap_notify RPC method (#234)

Changed

  • BREAKING: Enforce JSON-compatibility of snap state (#233)
    • This state was always supposed to be JSON-compatible, and this is now enforced.

@metamask/snap-examples

Changed

Fixed

  • Ensure that all examples work with the current Snaps implementation (#219)

@metamask/snap-workers

Package deprecated, deleted, and its functionality moved into @metamask/execution-environments.

@metamask/snaps-cli

Added

  • BREAKING: Transform HTML comments by default (#237)
    • The strings <!-- and --> will be transformed into < !-- and -- > respectively by default. If these strings appear as operands in an expression or in a string literal, this transform will change the behavior of your program. This behavior was added because these strings are rejected by SES. The behavior can be toggled using the --transformHtmlComments option.
  • --transpiledDeps flag to build and watch commands (#221)
    • This flag allows the user to specify which dependencies will be transpiled at build time if the --transpilationMode is --localAndDeps.
  • Add CLI usage instructions to readme (#228)
  • Build process customization (#251)
    • Builds can now be customized by adding a bundlerCustomizer function to snap.config.js. See the README for details.

Changed

  • BREAKING: Change Snap config file format (#251)
    • The CLI now expects a file snap.config.js instead of snap.config.json, with a different structure. See the README for details.
  • BREAKING: Strip comments in source code by default (#243)
    • All comments will now be stripped from snap source code (including dependencies) by default.
  • Enable --verboseErrors by default (#249)

Fixed

  • Comment stripping bug (#270)
    • Prior to this change, if the --strip-comments option was provided to mm-snap build and an empty block comment of the form /**/ appeared anywhere in the source code (including dependencies), the remainder of the string after the empty block comment would be truncated. This was resolved by removing all instances of the string /**/ from the raw bundle string.
    • In an upcoming release, the string /**/ will only be removed if it is in fact an empty block comment, and not if it e.g. appears in a string literal.
  • watch command parity with build command (#241)
    • The build command had received a number of options that were not made available to the watch command. They now have the same options.
  • Update dead link in readme (#240)

@metamask/snap-types

Changed

  • No changes this release.

0.9.0

28 Jan 21:20
d49f468
Compare
Choose a tag to compare

@metamask/snap-controllers

Added

  • Make SnapController npm registry configurable (#200)

Changed

  • BREAKING: Return null from SnapController.getSnapState if the snap has no state (#203)
    • Previously it would return undefined in this case.
  • @metamask/controllers@^25.1.0 (#207)

@metamask/iframe-execution-environment-service

Changed

  • @metamask/controllers@^25.1.0 (#207)

@metamask/rpc-methods

Changed

  • @metamask/controllers@^25.1.0 (#207)

@metamask/snap-examples

Changed

  • No changes this release.

@metamask/snaps-cli

Added

  • Transpilation configuration (#213)
    • mm-snap build now takes a --transpilationMode argument which determines what will be transpiled by Babel during building: all source code (including dependencies), local source code only, or nothing.

Fixed

  • mm-snap build command when CLI is installed globally (#216)
  • Update installation command in readme (#205)

@metamask/snap-types

Changed

  • @metamask/controllers@^25.1.0 (#207)
    • This may affect some types in this package.

@metamask/snap-workers

Changed

  • No changes this release.

0.8.1

23 Jan 00:23
32843a7
Compare
Choose a tag to compare

@metamask/snap-controllers

Added

  • A variety of SnapController actions (#199)

0.8.0

21 Jan 02:53
28b7e8e
Compare
Choose a tag to compare

@metamask/snap-controllers

Added

  • Expose more PermissionController functionality via actions (#194)

Changed

  • BREAKING: Replace PermissionController functions with actions in SnapController (#194)

@metamask/iframe-execution-environment-service

Changed

  • No changes this release.

@metamask/rpc-methods

Changed

  • No changes this release.

@metamask/snap-examples

Changed

  • No changes this release.

@metamask/snaps-cli

Changed

  • Update template snap created by mm-snap init (#195)
  • Exit by throwing errors instead of calling process.exit (#190)

@metamask/snap-types

Changed

  • No changes this release.

@metamask/snap-workers

Changed

  • No changes this release.

0.7.0

13 Jan 01:38
92e5dae
Compare
Choose a tag to compare

@metamask/snap-controllers

Changed

  • BREAKING: Rename execution environment service class and events (#188)
    • ServiceMessenger events are now named ExecutionService.
    • WebWorkerExecutionEnvironmentService is now named WebWorkerExecutionService.

@metamask/example-snap

Changed

  • No changes this release.

@metamask/iframe-execution-environment-service

Changed

  • BREAKING: Rename execution environment service class and events (#188)
    • ServiceMessenger events are now named ExecutionService.
    • IframeExecutionEnvironmentService is now named IframeExecutionService.

@metamask/rpc-methods

Changed

  • No changes this release.

@metamask/snap-examples

Changed

  • No changes this release.

@metamask/snaps-cli

Added

  • ESM support for mm-snap build (#185)
    • The build command can now handle snap source code that includes ESM import / export statements. They will be transpiled to their CommonJS equivalents via Babel.

Fixed

  • Fix mm-snap init src default value (#186)
    • It now correctly defaults to src/index.js instead of just index.js.
  • Fix comment stripping (#189)
    • Comments wouldn't be stripped under certain circumstances due to a RegEx error, details here.

@metamask/snap-types

Changed

  • BREAKING: Rename ServiceMessenger events to ExecutionService (#188)

@metamask/snap-workers

Changed

  • No changes this release.