Skip to content

0.10.0

Compare
Choose a tag to compare
@github-actions github-actions released this 10 Mar 01:14
· 1358 commits to main since this release
f138e4d

@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

  • BREAKING: Update config files per @metamask/snaps-cli@0.10.0 (#251)

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.