Skip to content

Latest commit

 

History

History
302 lines (244 loc) · 15.3 KB

CHANGELOG.md

File metadata and controls

302 lines (244 loc) · 15.3 KB

Changelog

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.

Changed

  • 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)

Changed

  • No changes this release.

Changed

  • No changes this release.

Changed

  • No changes this release.

Changed

  • No changes this release.

Changed

  • No changes this release.

Changed

  • No changes this release.

Fixed

  • Fixed 0.19.0 not being able to run (#697)

Added

  • Add 'Access-Control-Allow-Origin': * to serve (#638)

Changed

  • BREAKING: Replace RegEx-based bundle processing and comment stripping with an AST-based solution (#583)

Changed

  • No changes this release.

Changed

  • Reduce TypeScript compilation target to ES2017 (#628)
  • Update template files (#632)

Added

  • Add a TypeScript template for mm-snap init (#546)
  • Add serving to mm-snap watch (#507)

Changed

  • BREAKING: Bump minimum Node version to 16 (#601)

Fixed

  • Fix segfault when using mm-snap watch (#556)

Changed

  • 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/snap-types as OnRpcRequestHandler.

Fixed

  • Fix importing local files in TypeScript Snaps (#527)
  • Fix build command when the CLI is installed globally (#542)

Added

  • Add support for building TypeScript Snaps (#443)

Fixed

  • Fix an issue where comment stripping would break for large files (#468)

Changed

  • BREAKING: Increase TypeScript compilation target to ES2020 (#449)
    • This should not be breaking for consumers on any non-deprecated browser or Node.js version.

Changed

  • No changes this release.

Changed

  • No changes this release.

Changed

  • No changes this release.

Added

  • Add self to mock endowments (#341)

Changed

  • Bump ses to 0.15.15 (#396)
  • Upgraded TypeScript version to minimum 4.4 (#360)
  • Update template files (#350)

Changed

  • BREAKING: Bump minimum Node version from 12 to 14 (#331)
  • Update mm-snap init template files (#330)

Fixed

  • Fix issue where comment stripping would create invalid bundles (#336)

Fixed

  • Fix endowment mocking during mm-snap eval (#311)

Changed

  • No changes this release.

Fixed

  • Improve dynamic mocking (#262)

Fixed

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

Fixed

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

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)

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)

Changed

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

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.

Changed

  • No changes this release.

Changed

  • No changes this release.

Fixed

  • mm-snap init Snap snap_confirm call (#168)
    • The generated Snap was passing invalid parameters to the method.

Added

  • Snap SVG icon support (#163)

Changed

  • 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 to id (#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.

Changed

  • BREAKING: Convert all TypeScript interface declarations to type equivalents (#143)

Fixed

  • Make Windows-compatible (#131)

Changed

  • No changes this release.

Changed

  • BREAKING: Enforce consistent naming for Snaps-related functionality (#119)

Fixed

  • Package script issues (#97, #98)

Fixed

  • 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.

Changed

  • Update publish scripts (#92)

Added

  • Missing publish scripts to new packages

Changed

  • BREAKING: Rename package to @metamask/snaps-cli (#72)
    • This package was previously named snaps-cli.
    • As part of the renaming, and due to the scope of the changes to both this package and MetaMask Snaps generally, its versioning and changelog have been reset. The original changelog can be found here.

Removed