Releases: MetaMask/snaps
Releases · MetaMask/snaps
0.10.3
@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
@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
@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
.
- This package now uses the functionally equivalent
@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
.
- This package now uses the functionally equivalent
0.10.0
@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 thewallet
API object.
- Previously, default endowments were specified in the execution environment. Now, default endowments are specified in the
- 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.
- This ensures that the
Removed
- BREAKING: Remove the
PermissionController
andSubjectMetadataController
(#261)- They are part of the
@metamask/controllers
as of version 26.0.0 of that package.
- They are part of the
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 thewallet
API object.
- Previously, default endowments were specified in the execution environment itself. Now, all endowments must be specified in the
- Add endowments to the global
self
in addition towindow
(#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/[email protected]
(#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.
- The strings
--transpiledDeps
flag tobuild
andwatch
commands (#221)- This flag allows the user to specify which dependencies will be transpiled at build time if the
--transpilationMode
is--localAndDeps
.
- This flag allows the user to specify which dependencies will be transpiled at build time if the
- Add CLI usage instructions to readme (#228)
- Build process customization (#251)
- Builds can now be customized by adding a
bundlerCustomizer
function tosnap.config.js
. See the README for details.
- Builds can now be customized by adding a
Changed
- BREAKING: Change Snap config file format (#251)
- The CLI now expects a file
snap.config.js
instead ofsnap.config.json
, with a different structure. See the README for details.
- The CLI now expects a file
- 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 tomm-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.
- Prior to this change, if the
watch
command parity withbuild
command (#241)- The
build
command had received a number of options that were not made available to thewatch
command. They now have the same options.
- The
- Update dead link in readme (#240)
@metamask/snap-types
Changed
- No changes this release.
0.9.0
@metamask/snap-controllers
Added
- Make
SnapController
npm registry configurable (#200)
Changed
- BREAKING: Return
null
fromSnapController.getSnapState
if the snap has no state (#203)- Previously it would return
undefined
in this case.
- Previously it would return
@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
0.8.0
@metamask/snap-controllers
Added
- Expose more
PermissionController
functionality via actions (#194)
Changed
- BREAKING: Replace
PermissionController
functions with actions inSnapController
(#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
@metamask/snap-controllers
Changed
- BREAKING: Rename execution environment service class and events (#188)
ServiceMessenger
events are now namedExecutionService
.WebWorkerExecutionEnvironmentService
is now namedWebWorkerExecutionService
.
@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 namedExecutionService
.IframeExecutionEnvironmentService
is now namedIframeExecutionService
.
@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.
- The
Fixed
- Fix
mm-snap init
src
default value (#186)- It now correctly defaults to
src/index.js
instead of justindex.js
.
- It now correctly defaults to
- 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 toExecutionService
(#188)
@metamask/snap-workers
Changed
- No changes this release.
0.6.3
@metamask/snap-controllers
Fixed
- Prevent
disableSnap
from throwing if the specified Snap is stopped (#175)
@metamask/example-snap
Changed
- No changes this release.
@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
- No changes this release.
@metamask/snap-types
Changed
- No changes this release.
@metamask/snap-workers
Changed
- No changes this release.
0.6.2
@metamask/snap-controllers
Changed
- BREAKING: Rename endowment permission builder exports (#171)
Removed
- BREAKING: Remove the
svgIcon
property from Snap state (#172)- The SVG icon content string is instead emitted with the
SnapController:snapAdded
event.
- The SVG icon content string is instead emitted with the
@metamask/example-snap
Changed
- No changes this release.
@metamask/iframe-execution-environment-service
Changed
- No changes this release.
@metamask/rpc-methods
Changed
- BREAKING: Rename restricted method permission builder exports (#171)
@metamask/snap-examples
Changed
- No changes this release.
@metamask/snaps-cli
Changed
- No changes this release.
@metamask/snap-types
Changed
- No changes this release.
@metamask/snap-workers
Changed
- No changes this release.