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.
- Bump MetaMask dependencies (#2946)
- Disable
nodeEnv
optimization in Webpack (#2970)- This previously caused issues with overwriting
NODE_ENV
.
- This previously caused issues with overwriting
- Allow async initialization logic (#2918)
- Top-level-await is now available in Snaps.
- WASM modules are instantiated asynchronously.
- Automatically add
platformVersion
to manifest (#2938)
- Bundle and initialize WASM modules using Base64 encoding (#2913)
- Ignore query strings when parsing URLs (#2883)
- Bump MetaMask dependencies (#2853)
- Move
fork-ts-checker-webpack-plugin
to dependencies (#2862)
- Add support for TypeScript type-checking (#2783)
- This introduces a new configuration option,
typescript.enabled
, which can be set totrue
to enable TypeScript type-checking. - You can optionally specify a custom
tsconfig.json
file by settingtypescript.configFile
to the path of the file.
- This introduces a new configuration option,
- Format Snap manifests with Prettier (#2787)
- Fix invalid types in type declaration in some cases (#2714)
- Fix ESM version of the package (#2682)
- This fixes the ESM version of the package to be fully compliant with the ESM standard.
- Bump
@metamask/utils
from^9.1.0
to^9.2.1
(#2680)
- Hide browserlist warning where applicable (#2664)
- Improve manifest validation output (#2572)
- Replace
superstruct
with ESM-compatible fork@metamask/superstruct
(#2445)
- Improve validation of
endowment:rpc
(#2512)
- Add support for building Snaps with JSX (#2258)
- It's now possible to use JSX components from
@metamask/snaps-sdk
to build user interfaces for Snaps.
- It's now possible to use JSX components from
- Disable
topLevelAwait
configuration option (#2358)- Before this the CLI would produce invalid builds when using top-level await.
- Add support for importing SVG, PNG, and JPEG files directly (#2284)
- You can now import these files using a regular import declaration when using the Webpack-based config.
- To opt out of this feature (i.e., to use custom image loading logic), add the following to your config:
{ features: { images: false, }, }
- Update CLI docs link (#2294)
- Fix detection of minimum Node.js version (#2292)
- Publish
.browserslistrc
(#2227)
- Fix minor build configuration problems (#2220)
- BREAKING: Update ESM build to be fully compliant with the ESM standard (#2210)
- BREAKING: Change config to use Webpack by default (#2214)
- You can still use Browserify by specifying
bundler: 'browserify'
.
- You can still use Browserify by specifying
- Support new lines in CLI message formatting (#2194)
- Optimize CLI Webpack configuration (#2175)
- This can reduce the size of Snaps in certain cases.
- Show Webpack compilation warnings in CLI (#2186, #2192)
- Add a warning when no icon is found and when icon is not square (#2185)
- BREAKING: Disable source maps by default (#2166)
- This slightly speeds up the build process.
- You can enable source maps again by setting
sourceMap: true
in your Snap config.
- Set
output.chunkFormat
tocommonjs
by default (#2136)
- Fix missing
global
during snap evaluation (#2072)
- BREAKING: Synchronously initialize WASM modules (#2024)
- When the
experimental.wasm
flag in the Snaps CLI is enabled, the WASM module will now be synchronously initialized, rather than being inlined as a Uint8Array.
- When the
- Include Snap icon in allowed server paths (#2003)
- Only serve Snap files from CLI (#1979)
- Bump several MetaMask dependencies (#1964)
- Fix issues generating checksum with binary auxiliary files (#1975)
- Use
@metamask/snaps-sdk
package (#1951)- This package replaces the
@metamask/snaps-types
and@metamask/snaps-ui
packages.
- This package replaces the
- BREAKING: Bump minimum Node.js version to
^18.16.0
(#1741)
- Fix Webpack being unable to find
swc-loader
in some cases (#1798) - Check minimum Node version in CLI (#1797)
- Disable the
fullySpecified
rule for.js
imports in the default Webpack config (#1780)
- Initial stable release from main branch (#1757)
- Remove unused dependencies (#1680)
- Add
polyfills
option to Webpack configuration (#1650)
- Fix breaking change to SWC causing the CLI to break (#1677)
- Update all examples to use Webpack (#1632)
- Add support for bundling with Webpack (#1521)
- For backwards compatibility, the Webpack bundler is opt-in. To use it, add
"bundler": "webpack"
to your snap configuration file, and follow the new configuration format described in the documentation. - The new configuration format also adds support for:
- Setting environment variables, which are set as
process.env
values in the bundled code. - Importing WebAssembly modules (if
experimental.wasm
is enabled in the snap configuration file).
- Setting environment variables, which are set as
- For backwards compatibility, the Webpack bundler is opt-in. To use it, add
- Support TypeScript snap configuration files (#1521)
- Release package independently (#1600)
- The version of the package no longer needs to match the version of all other MetaMask Snaps packages.