All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- No changes this release.
- No changes this release.
- No changes this release.
- No changes this release.
- No changes this release.
- Fix post processing issue with
object.eval
(#1040)
- No changes this release.
- No changes this release.
- Add permission validation to SnapManifest (#910)
- Remove double logging in CLI (#958)
- BREAKING: Refactor
mm-snap init
command (#866)mm-snap init
only takes one optional argument now, a directory for the snap to be initialized in.- It uses a new snap monorepo template.
- Replace auto type guard with struct (#911)
- Replace JSON schema validation with structs (#862)
- No changes this release.
- No changes this release.
- No changes this release.
- No changes this release.
- No changes this release.
- No changes this release.
- Fixed 0.19.0 not being able to run (#697)
- Add 'Access-Control-Allow-Origin': * to serve (#638)
- BREAKING: Replace RegEx-based bundle processing and comment stripping with an AST-based solution (#583)
- No changes this release.
- BREAKING: Bump minimum Node version to 16 (#601)
- Fix segfault when using
mm-snap watch
(#556)
- BREAKING: Snaps are now required to export
onRpcRequest
to receive RPC requests (#481, #533, #538, #541, #544)- The type of the function is available in
@metamask/snaps-types
asOnRpcRequestHandler
.
- The type of the function is available in
- Fix importing local files in TypeScript Snaps (#527)
- Fix
build
command when the CLI is installed globally (#542)
- Add support for building TypeScript Snaps (#443)
- Fix an issue where comment stripping would break for large files (#468)
- BREAKING: Increase TypeScript compilation target to ES2020 (#449)
- This should not be breaking for consumers on any non-deprecated browser or Node.js version.
- No changes this release.
- No changes this release.
- No changes this release.
- Add self to mock endowments (#341)
- Bump
ses
to0.15.15
(#396) - Upgraded TypeScript version to minimum 4.4 (#360)
- Update template files (#350)
- Fix issue where comment stripping would create invalid bundles (#336)
- Fix endowment mocking during
mm-snap eval
(#311)
- No changes this release.
- Improve dynamic mocking (#262)
- Installation failure (#279)
- A faulty installation script in a dependency caused the installation of this package to fail.
- Comment stripping will no longer remove empty block comments in strings (#276)
- 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
- 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)
- 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)
- 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.
mm-snap build
command when CLI is installed globally (#216)- Update installation command in readme (#205)
- Update template snap created by
mm-snap init
(#195) - Exit by throwing errors instead of calling
process.exit
(#190)
- 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
- 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.
- No changes this release.
- No changes this release.
mm-snap init
Snapsnap_confirm
call (#168)- The generated Snap was passing invalid parameters to the method.
- Snap SVG icon support (#163)
- BREAKING: Support the new Snaps publishing specification (#140, #160)
- This introduces several breaking changes to how Snaps are developed, hosted, and represented at runtime. See the specification and the referenced pull requests for details.
- BREAKING: Rename Snap
name
property toid
(#147) - BREAKING: Update
ses
to version^0.15.3
(#159)- This will cause behavioral changes for code executed under SES, and may require modifications to code that previously executed without issues.
- BREAKING: Convert all TypeScript
interface
declarations totype
equivalents (#143)
- Make Windows-compatible (#131)
- No changes this release.
- BREAKING: Enforce consistent naming for Snaps-related functionality (#119)
- Snap produced by
mm-snap init
(#94)- The template used to create the "Hello, world!" snap had become outdated due to a build-time bug.
- Update publish scripts (#92)
- Missing publish scripts to new packages
- BREAKING: Rename package to
@metamask/snaps-cli
(#72)
- Example snaps (#72)
- The examples now live in their own package,
@metamask/snap-examples
.
- The examples now live in their own package,