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/snaps-sandboxfrom^1.0.0to^1.0.1(#3894)
- Add
--manifestoption for custom manifests (#3793, #3811)- This is currently only supported for the
watchcommand, andbuildcommand for preinstalled Snaps (when used with the--preinstalledflag).
- This is currently only supported for the
- Allow manifest to extend another manifest (#3802)
- For example, you could have a
snap.manifest.jsonfile with common fields, and asnap.manifest.dev.jsonfile that extends it with development-specific fields:and// snap.manifest.json { "version": "1.0.0", "proposedName": "My Snap", "initialPermissions": { "endowment:network-access": {} } }
When running// snap.manifest.dev.json { "extends": "./snap.manifest.json", "proposedName": "My Snap (development)", "initialConnections": { "https://localhost:8000": {} } }
mm-snap watch --manifest snap.manifest.dev.json, the resulting manifest will combine the fields from both files.
- For example, you could have a
- Add
--preinstalledflag to build command to create preinstalled Snap bundle (#3805)
- Merge manifest validation reports to include latest validation errors and warnings (#3567)
- Add support for eval in watch mode (#3553)
- This enables some extra validation checks in watch mode, which can help catch issues earlier in the development process.
- Display CLI minimum version range properly (#3531)
- Support scheduling cronjobs with an ISO 8601 duration (#3421)
- BREAKING: Drop support for Node.js 18 and 21 (#3447)
- Bump minimum supported browser versions (#3441)
- The minimum supported browser versions are now:
- Chrome 113
- Firefox 115
- The minimum supported browser versions are now:
- Bump
@swc/corefrom1.3.78to1.11.31(#3442) - Bump
swc-loaderfrom0.2.3to0.2.6(#3442)
- Add
sandboxcommand to run sandbox tool (#3306)- This command allows you to run the Snaps sandbox tool, which is useful for quickly testing and debugging Snaps.
- Bump
@metamask/utilsfrom11.2.0to11.4.0(#3232)
- BREAKING: Remove deprecated Browserify configuration (#3313)
- The Browserify bundler is no longer supported. Snaps using the Browserify bundler will need to be migrated to the new configuration format based on Webpack.
- The
bundleroption in the Snap configuration file was removed, and the CLI will show an error if it's used in config. - Several command line flags that were used to configure the Browserify
bundler were removed.
- Use the config file to provide these options instead.
- The removed options are:
--bundle--dist--eval--manifest--outfileName--root--sourceMaps--src--stripComments--suppressWarnings--transpilationMode--depsToTranspile--verboseErrors--writeManifest--serve
- Add
--analyzeflag to build command to enable bundle analyzer (#3075)
- Bump MetaMask dependencies (#2946)
- Disable
nodeEnvoptimization 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
platformVersionto 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-pluginto dependencies (#2862)
- Add support for TypeScript type-checking (#2783)
- This introduces a new configuration option,
typescript.enabled, which can be set totrueto enable TypeScript type-checking. - You can optionally specify a custom
tsconfig.jsonfile by settingtypescript.configFileto 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/utilsfrom^9.1.0to^9.2.1(#2680)
- Hide browserlist warning where applicable (#2664)
- Improve manifest validation output (#2572)
- Replace
superstructwith 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-sdkto build user interfaces for Snaps.
- It's now possible to use JSX components from
- Disable
topLevelAwaitconfiguration 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: truein your Snap config.
- Set
output.chunkFormattocommonjsby default (#2136)
- Fix missing
globalduring snap evaluation (#2072)
- BREAKING: Synchronously initialize WASM modules (#2024)
- When the
experimental.wasmflag 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-sdkpackage (#1951)- This package replaces the
@metamask/snaps-typesand@metamask/snaps-uipackages.
- This package replaces the
- BREAKING: Bump minimum Node.js version to
^18.16.0(#1741)
- Fix Webpack being unable to find
swc-loaderin some cases (#1798) - Check minimum Node version in CLI (#1797)
- Disable the
fullySpecifiedrule for.jsimports in the default Webpack config (#1780)
- Initial stable release from main branch (#1757)
- Remove unused dependencies (#1680)
- Add
polyfillsoption 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.envvalues in the bundled code. - Importing WebAssembly modules (if
experimental.wasmis 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.