@metamask/snaps-cli 0.37.0-flask.1 → 0.38.0-flask.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (256) hide show
  1. package/.browserslistrc +3 -0
  2. package/CHANGELOG.md +20 -426
  3. package/README.md +539 -63
  4. package/dist/cjs/builders.js +40 -41
  5. package/dist/cjs/builders.js.map +1 -1
  6. package/dist/cjs/cli.js +14 -14
  7. package/dist/cjs/cli.js.map +1 -1
  8. package/dist/cjs/commands/build/build.js +54 -0
  9. package/dist/cjs/commands/build/build.js.map +1 -0
  10. package/dist/cjs/commands/build/implementation.js +31 -0
  11. package/dist/cjs/commands/build/implementation.js.map +1 -0
  12. package/dist/cjs/{cmds → commands}/build/index.js +18 -5
  13. package/dist/cjs/commands/build/index.js.map +1 -0
  14. package/dist/cjs/commands/eval/eval.js +57 -0
  15. package/dist/cjs/commands/eval/eval.js.map +1 -0
  16. package/dist/cjs/commands/eval/implementation.js +27 -0
  17. package/dist/cjs/commands/eval/implementation.js.map +1 -0
  18. package/dist/cjs/commands/eval/index.js +50 -0
  19. package/dist/cjs/commands/eval/index.js.map +1 -0
  20. package/dist/cjs/commands/index.js.map +1 -0
  21. package/dist/cjs/commands/manifest/implementation.js +34 -0
  22. package/dist/cjs/commands/manifest/implementation.js.map +1 -0
  23. package/dist/cjs/commands/manifest/index.js +50 -0
  24. package/dist/cjs/commands/manifest/index.js.map +1 -0
  25. package/dist/cjs/commands/manifest/manifest.js +55 -0
  26. package/dist/cjs/commands/manifest/manifest.js.map +1 -0
  27. package/dist/cjs/{cmds → commands}/serve/index.js +4 -2
  28. package/dist/cjs/commands/serve/index.js.map +1 -0
  29. package/dist/cjs/commands/serve/serve.js +21 -0
  30. package/dist/cjs/commands/serve/serve.js.map +1 -0
  31. package/dist/cjs/commands/watch/implementation.js +35 -0
  32. package/dist/cjs/commands/watch/implementation.js.map +1 -0
  33. package/dist/cjs/{cmds → commands}/watch/index.js +19 -4
  34. package/dist/cjs/commands/watch/index.js.map +1 -0
  35. package/dist/cjs/commands/watch/watch.js +51 -0
  36. package/dist/cjs/commands/watch/watch.js.map +1 -0
  37. package/dist/cjs/config.js +290 -0
  38. package/dist/cjs/config.js.map +1 -0
  39. package/dist/cjs/errors.js +37 -0
  40. package/dist/cjs/errors.js.map +1 -0
  41. package/dist/cjs/index.js +28 -3
  42. package/dist/cjs/index.js.map +1 -1
  43. package/dist/cjs/main.js +6 -7
  44. package/dist/cjs/main.js.map +1 -1
  45. package/dist/cjs/utils/cli.js +61 -0
  46. package/dist/cjs/utils/cli.js.map +1 -0
  47. package/dist/cjs/utils/errors.js +42 -0
  48. package/dist/cjs/utils/errors.js.map +1 -0
  49. package/dist/cjs/utils/index.js +6 -2
  50. package/dist/cjs/utils/index.js.map +1 -1
  51. package/dist/cjs/utils/legacy.js +48 -0
  52. package/dist/cjs/utils/legacy.js.map +1 -0
  53. package/dist/cjs/utils/logging.js +46 -0
  54. package/dist/cjs/utils/logging.js.map +1 -0
  55. package/dist/cjs/utils/path.js +16 -0
  56. package/dist/cjs/utils/path.js.map +1 -0
  57. package/dist/cjs/utils/steps.js +52 -0
  58. package/dist/cjs/utils/steps.js.map +1 -0
  59. package/dist/cjs/webpack/compiler.js +96 -0
  60. package/dist/cjs/webpack/compiler.js.map +1 -0
  61. package/dist/cjs/webpack/config.js +234 -0
  62. package/dist/cjs/webpack/config.js.map +1 -0
  63. package/dist/cjs/webpack/index.js +22 -0
  64. package/dist/cjs/webpack/index.js.map +1 -0
  65. package/dist/cjs/webpack/loaders/browserify.js +97 -0
  66. package/dist/cjs/webpack/loaders/browserify.js.map +1 -0
  67. package/dist/cjs/webpack/loaders/wasm.js +36 -0
  68. package/dist/cjs/webpack/loaders/wasm.js.map +1 -0
  69. package/dist/cjs/webpack/plugins.js +340 -0
  70. package/dist/cjs/webpack/plugins.js.map +1 -0
  71. package/dist/cjs/webpack/utils.js +133 -0
  72. package/dist/cjs/webpack/utils.js.map +1 -0
  73. package/dist/esm/builders.js +40 -41
  74. package/dist/esm/builders.js.map +1 -1
  75. package/dist/esm/cli.js +15 -15
  76. package/dist/esm/cli.js.map +1 -1
  77. package/dist/esm/commands/build/build.js +51 -0
  78. package/dist/esm/commands/build/build.js.map +1 -0
  79. package/dist/esm/commands/build/implementation.js +27 -0
  80. package/dist/esm/commands/build/implementation.js.map +1 -0
  81. package/dist/esm/{cmds → commands}/build/index.js +5 -5
  82. package/dist/esm/commands/build/index.js.map +1 -0
  83. package/dist/esm/commands/eval/eval.js +54 -0
  84. package/dist/esm/commands/eval/eval.js.map +1 -0
  85. package/dist/esm/commands/eval/implementation.js +24 -0
  86. package/dist/esm/commands/eval/implementation.js.map +1 -0
  87. package/dist/esm/commands/eval/index.js +22 -0
  88. package/dist/esm/commands/eval/index.js.map +1 -0
  89. package/dist/esm/commands/index.js +15 -0
  90. package/dist/esm/commands/index.js.map +1 -0
  91. package/dist/esm/commands/manifest/implementation.js +33 -0
  92. package/dist/esm/commands/manifest/implementation.js.map +1 -0
  93. package/dist/esm/commands/manifest/index.js +22 -0
  94. package/dist/esm/commands/manifest/index.js.map +1 -0
  95. package/dist/esm/commands/manifest/manifest.js +52 -0
  96. package/dist/esm/commands/manifest/manifest.js.map +1 -0
  97. package/dist/esm/{cmds → commands}/serve/index.js +4 -2
  98. package/dist/esm/commands/serve/index.js.map +1 -0
  99. package/dist/esm/commands/serve/serve.js +17 -0
  100. package/dist/esm/commands/serve/serve.js.map +1 -0
  101. package/dist/esm/commands/watch/implementation.js +34 -0
  102. package/dist/esm/commands/watch/implementation.js.map +1 -0
  103. package/dist/esm/{cmds → commands}/watch/index.js +6 -4
  104. package/dist/esm/commands/watch/index.js.map +1 -0
  105. package/dist/esm/commands/watch/watch.js +50 -0
  106. package/dist/esm/commands/watch/watch.js.map +1 -0
  107. package/dist/esm/config.js +294 -0
  108. package/dist/esm/config.js.map +1 -0
  109. package/dist/esm/errors.js +30 -0
  110. package/dist/esm/errors.js.map +1 -0
  111. package/dist/esm/index.js +3 -0
  112. package/dist/esm/index.js.map +1 -1
  113. package/dist/esm/main.js +6 -7
  114. package/dist/esm/main.js.map +1 -1
  115. package/dist/esm/utils/cli.js +43 -0
  116. package/dist/esm/utils/cli.js.map +1 -0
  117. package/dist/esm/utils/errors.js +43 -0
  118. package/dist/esm/utils/errors.js.map +1 -0
  119. package/dist/esm/utils/index.js +6 -2
  120. package/dist/esm/utils/index.js.map +1 -1
  121. package/dist/esm/utils/legacy.js +47 -0
  122. package/dist/esm/utils/legacy.js.map +1 -0
  123. package/dist/esm/utils/logging.js +40 -0
  124. package/dist/esm/utils/logging.js.map +1 -0
  125. package/dist/esm/utils/path.js +13 -0
  126. package/dist/esm/utils/path.js.map +1 -0
  127. package/dist/esm/utils/steps.js +43 -0
  128. package/dist/esm/utils/steps.js.map +1 -0
  129. package/dist/esm/webpack/compiler.js +89 -0
  130. package/dist/esm/webpack/compiler.js.map +1 -0
  131. package/dist/esm/webpack/config.js +236 -0
  132. package/dist/esm/webpack/config.js.map +1 -0
  133. package/dist/esm/webpack/index.js +5 -0
  134. package/dist/esm/webpack/index.js.map +1 -0
  135. package/dist/esm/webpack/loaders/browserify.js +82 -0
  136. package/dist/esm/webpack/loaders/browserify.js.map +1 -0
  137. package/dist/esm/webpack/loaders/wasm.js +26 -0
  138. package/dist/esm/webpack/loaders/wasm.js.map +1 -0
  139. package/dist/esm/webpack/plugins.js +343 -0
  140. package/dist/esm/webpack/plugins.js.map +1 -0
  141. package/dist/esm/webpack/utils.js +160 -0
  142. package/dist/esm/webpack/utils.js.map +1 -0
  143. package/dist/types/__fixtures__/configs/cjs.d.ts +1 -0
  144. package/dist/types/__fixtures__/configs/esm.d.ts +3 -0
  145. package/dist/types/__fixtures__/configs/invalid.d.ts +3 -0
  146. package/dist/types/__fixtures__/configs/javascript/snap.config.d.ts +0 -0
  147. package/dist/types/__fixtures__/configs/typescript/snap.config.d.ts +3 -0
  148. package/dist/types/builders.d.ts +2 -21
  149. package/dist/types/cli.d.ts +1 -1
  150. package/dist/types/commands/build/build.d.ts +10 -0
  151. package/dist/types/commands/build/implementation.d.ts +10 -0
  152. package/dist/types/{cmds/eval → commands/build}/index.d.ts +1 -0
  153. package/dist/types/commands/eval/__test__/browserify/bad/snap.config.d.ts +3 -0
  154. package/dist/types/commands/eval/__test__/browserify/good/snap.config.d.ts +3 -0
  155. package/dist/types/commands/eval/__test__/webpack/bad/snap.config.d.ts +3 -0
  156. package/dist/types/commands/eval/__test__/webpack/good/snap.config.d.ts +3 -0
  157. package/dist/types/commands/eval/__test__/webpack/snap.config.d.ts +3 -0
  158. package/dist/types/commands/eval/eval.d.ts +14 -0
  159. package/dist/types/commands/eval/implementation.d.ts +9 -0
  160. package/dist/types/{cmds/serve → commands/eval}/index.d.ts +1 -0
  161. package/dist/types/commands/manifest/implementation.d.ts +12 -0
  162. package/dist/types/{cmds → commands}/manifest/index.d.ts +1 -0
  163. package/dist/types/commands/manifest/manifest.d.ts +14 -0
  164. package/dist/types/commands/serve/serve.d.ts +16 -0
  165. package/dist/types/commands/watch/implementation.d.ts +14 -0
  166. package/dist/types/commands/watch/index.d.ts +10 -0
  167. package/dist/types/commands/watch/watch.d.ts +19 -0
  168. package/dist/types/config.d.ts +626 -0
  169. package/dist/types/errors.d.ts +25 -0
  170. package/dist/types/index.d.ts +4 -0
  171. package/dist/types/utils/cli.d.ts +17 -0
  172. package/dist/types/utils/errors.d.ts +23 -0
  173. package/dist/types/utils/index.d.ts +6 -2
  174. package/dist/types/utils/legacy.d.ts +27 -0
  175. package/dist/types/utils/logging.d.ts +22 -0
  176. package/dist/types/utils/path.d.ts +9 -0
  177. package/dist/types/utils/steps.d.ts +17 -0
  178. package/dist/types/webpack/compiler.d.ts +29 -0
  179. package/dist/types/webpack/config.d.ts +37 -0
  180. package/dist/types/webpack/index.d.ts +3 -0
  181. package/dist/types/webpack/loaders/browserify.d.ts +16 -0
  182. package/dist/types/webpack/loaders/wasm.d.ts +20 -0
  183. package/dist/types/webpack/plugins.d.ts +147 -0
  184. package/dist/types/webpack/utils.d.ts +156 -0
  185. package/package.json +15 -7
  186. package/dist/cjs/cmds/build/buildHandler.js +0 -36
  187. package/dist/cjs/cmds/build/buildHandler.js.map +0 -1
  188. package/dist/cjs/cmds/build/bundle.js +0 -83
  189. package/dist/cjs/cmds/build/bundle.js.map +0 -1
  190. package/dist/cjs/cmds/build/index.js.map +0 -1
  191. package/dist/cjs/cmds/build/utils.js +0 -79
  192. package/dist/cjs/cmds/build/utils.js.map +0 -1
  193. package/dist/cjs/cmds/eval/evalHandler.js +0 -24
  194. package/dist/cjs/cmds/eval/evalHandler.js.map +0 -1
  195. package/dist/cjs/cmds/eval/index.js +0 -31
  196. package/dist/cjs/cmds/eval/index.js.map +0 -1
  197. package/dist/cjs/cmds/index.js.map +0 -1
  198. package/dist/cjs/cmds/manifest/index.js +0 -44
  199. package/dist/cjs/cmds/manifest/index.js.map +0 -1
  200. package/dist/cjs/cmds/manifest/manifestHandler.js +0 -47
  201. package/dist/cjs/cmds/manifest/manifestHandler.js.map +0 -1
  202. package/dist/cjs/cmds/serve/index.js.map +0 -1
  203. package/dist/cjs/cmds/serve/serveHandler.js +0 -62
  204. package/dist/cjs/cmds/serve/serveHandler.js.map +0 -1
  205. package/dist/cjs/cmds/serve/serveUtils.js +0 -37
  206. package/dist/cjs/cmds/serve/serveUtils.js.map +0 -1
  207. package/dist/cjs/cmds/watch/index.js.map +0 -1
  208. package/dist/cjs/cmds/watch/watchHandler.js +0 -91
  209. package/dist/cjs/cmds/watch/watchHandler.js.map +0 -1
  210. package/dist/cjs/utils/misc.js +0 -142
  211. package/dist/cjs/utils/misc.js.map +0 -1
  212. package/dist/cjs/utils/snap-config.js +0 -104
  213. package/dist/cjs/utils/snap-config.js.map +0 -1
  214. package/dist/esm/cmds/build/buildHandler.js +0 -36
  215. package/dist/esm/cmds/build/buildHandler.js.map +0 -1
  216. package/dist/esm/cmds/build/bundle.js +0 -81
  217. package/dist/esm/cmds/build/bundle.js.map +0 -1
  218. package/dist/esm/cmds/build/index.js.map +0 -1
  219. package/dist/esm/cmds/build/utils.js +0 -88
  220. package/dist/esm/cmds/build/utils.js.map +0 -1
  221. package/dist/esm/cmds/eval/evalHandler.js +0 -20
  222. package/dist/esm/cmds/eval/evalHandler.js.map +0 -1
  223. package/dist/esm/cmds/eval/index.js +0 -16
  224. package/dist/esm/cmds/eval/index.js.map +0 -1
  225. package/dist/esm/cmds/index.js +0 -15
  226. package/dist/esm/cmds/index.js.map +0 -1
  227. package/dist/esm/cmds/manifest/index.js +0 -29
  228. package/dist/esm/cmds/manifest/index.js.map +0 -1
  229. package/dist/esm/cmds/manifest/manifestHandler.js +0 -44
  230. package/dist/esm/cmds/manifest/manifestHandler.js.map +0 -1
  231. package/dist/esm/cmds/serve/index.js.map +0 -1
  232. package/dist/esm/cmds/serve/serveHandler.js +0 -54
  233. package/dist/esm/cmds/serve/serveHandler.js.map +0 -1
  234. package/dist/esm/cmds/serve/serveUtils.js +0 -30
  235. package/dist/esm/cmds/serve/serveUtils.js.map +0 -1
  236. package/dist/esm/cmds/watch/index.js.map +0 -1
  237. package/dist/esm/cmds/watch/watchHandler.js +0 -87
  238. package/dist/esm/cmds/watch/watchHandler.js.map +0 -1
  239. package/dist/esm/utils/misc.js +0 -139
  240. package/dist/esm/utils/misc.js.map +0 -1
  241. package/dist/esm/utils/snap-config.js +0 -107
  242. package/dist/esm/utils/snap-config.js.map +0 -1
  243. package/dist/types/cmds/build/buildHandler.d.ts +0 -13
  244. package/dist/types/cmds/build/bundle.d.ts +0 -15
  245. package/dist/types/cmds/build/utils.d.ts +0 -56
  246. package/dist/types/cmds/eval/evalHandler.d.ts +0 -9
  247. package/dist/types/cmds/manifest/manifestHandler.d.ts +0 -10
  248. package/dist/types/cmds/serve/serveHandler.d.ts +0 -10
  249. package/dist/types/cmds/serve/serveUtils.d.ts +0 -22
  250. package/dist/types/cmds/watch/index.d.ts +0 -9
  251. package/dist/types/cmds/watch/watchHandler.d.ts +0 -14
  252. package/dist/types/utils/misc.d.ts +0 -53
  253. package/dist/types/utils/snap-config.d.ts +0 -48
  254. /package/dist/cjs/{cmds → commands}/index.js +0 -0
  255. /package/dist/types/{cmds → commands}/index.d.ts +0 -0
  256. /package/dist/types/{cmds/build → commands/serve}/index.d.ts +0 -0
@@ -0,0 +1,3 @@
1
+ # The minimum browser versions supported by MetaMask.
2
+ chrome >= 90
3
+ firefox >= 91
package/CHANGELOG.md CHANGED
@@ -6,429 +6,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
- ## [0.37.0-flask.1]
10
- ### Changed
11
- - No changes this release.
12
-
13
- ## [0.36.1-flask.1]
14
- ### Changed
15
- - No changes this release.
16
-
17
- ## [0.36.0-flask.1]
18
- ### Changed
19
- - No changes this release.
20
-
21
- ## [0.35.2-flask.1]
22
- ### Fixed
23
- - Fix type issue introduced by [#1532](https://github.com/MetaMask/snaps/pull/1532) ([#1541](https://github.com/MetaMask/snaps/pull/1541))
24
-
25
- ## [0.35.1-flask.1]
26
- ### Changed
27
- - No changes this release.
28
-
29
- ## [0.35.0-flask.1]
30
- ### Changed
31
- - **BREAKING:** Build packages as both CJS and ESM ([#1519](https://github.com/MetaMask/snaps/pull/1519), ([#1532](https://github.com/MetaMask/snaps/pull/1532)))
32
- - This is breaking in the sense that imports to `dist/` will now require you to import either `dist/cjs` or `dist/esm`.
33
- - Add `sideEffects: false` ([#1486](https://github.com/MetaMask/snaps/pull/1486))
34
-
35
- ## [0.34.1-flask.1]
36
- ### Changed
37
- - No changes this release.
38
-
39
- ## [0.34.0-flask.1]
40
- ### Removed
41
- - **BREAKING:** Remove `init` command ([#1268](https://github.com/MetaMask/snaps/pull/1268))
42
-
43
- ## [0.33.1-flask.1]
44
- ### Changed
45
- - No changes this release.
46
-
47
- ## [0.33.0-flask.1]
48
- ### Changed
49
- - Support ES2022 features ([#1373](https://github.com/MetaMask/snaps-monorepo/pull/1373))
50
- - Automatically watch `snap.config.js` and `snap.manifest.json` files ([#1358](https://github.com/MetaMask/snaps-monorepo/pull/1358))
51
-
52
- ## [0.32.2]
53
- ### Changed
54
- - No changes this release.
55
-
56
- ## [0.32.1]
57
- ### Changed
58
- - No changes this release.
59
-
60
- ## [0.32.0]
61
- ### Changed
62
- - No changes this release.
63
-
64
- ## [0.31.0]
65
- ### Changed
66
- - **BREAKING:** Target `ES2020` ([#1247](https://github.com/MetaMask/snaps-monorepo/pull/1247))
67
-
68
- ## [0.30.0]
69
- ### Changed
70
- - No changes this release.
71
-
72
- ## [0.29.0]
73
- ### Changed
74
- - **BREAKING:** Change checksum calculation ([#1128](https://github.com/MetaMask/snaps-monorepo/pull/1128))
75
- - The checksum has changed for all snaps, and needs to be updated
76
-
77
- ## [0.28.0]
78
- ### Changed
79
- - No changes this release.
80
-
81
- ## [0.27.1]
82
- ### Changed
83
- - No changes this release.
84
-
85
- ## [0.27.0]
86
- ### Changed
87
- - No changes this release.
88
-
89
- ## [0.26.2]
90
- ### Changed
91
- - No changes this release.
92
-
93
- ## [0.26.1]
94
- ### Changed
95
- - No changes this release.
96
-
97
- ## [0.26.0]
98
- ### Fixed
99
- - Fix post processing issue with `object.eval` ([#1040](https://github.com/MetaMask/snaps-monorepo/pull/1040))
100
-
101
- ## [0.25.0]
102
- ### Changed
103
- - No changes this release.
104
-
105
- ## [0.24.1]
106
- ### Changed
107
- - No changes this release.
108
-
109
- ## [0.24.0]
110
- ### Added
111
- - Add permission validation to SnapManifest ([#910](https://github.com/MetaMask/snaps-monorepo/pull/910))
112
-
113
- ### Fixed
114
- - Remove double logging in CLI ([#958](https://github.com/MetaMask/snaps-monorepo/pull/958))
115
-
116
- ## [0.23.0]
117
- ### Changed
118
- - **BREAKING:** Refactor `mm-snap init` command ([#866](https://github.com/MetaMask/snaps-monorepo/pull/866))
119
- - `mm-snap init` only takes one optional argument now, a directory for the snap to be initialized in.
120
- - It uses a new snap monorepo template.
121
- - Replace auto type guard with struct ([#911](https://github.com/MetaMask/snaps-monorepo/pull/911))
122
- - Replace JSON schema validation with structs ([#862](https://github.com/MetaMask/snaps-monorepo/pull/862))
123
-
124
- ## [0.22.3]
125
- ### Changed
126
- - No changes this release.
127
-
128
- ## [0.22.2]
129
- ### Changed
130
- - No changes this release.
131
-
132
- ## [0.22.1]
133
- ### Changed
134
- - No changes this release.
135
-
136
- ## [0.22.0]
137
- ### Changed
138
- - No changes this release.
139
-
140
- ## [0.21.0]
141
- ### Changed
142
- - No changes this release.
143
-
144
- ## [0.20.0]
145
- ### Changed
146
- - No changes this release.
147
-
148
- ## [0.19.1]
149
- ### Fixed
150
- - Fixed 0.19.0 not being able to run ([#697](https://github.com/MetaMask/snaps-monorepo/pull/697))
151
-
152
- ## [0.19.0]
153
- ### Added
154
- - Add 'Access-Control-Allow-Origin': * to serve ([#638](https://github.com/MetaMask/snaps-monorepo/pull/638))
155
-
156
- ### Changed
157
- - **BREAKING:** Replace RegEx-based bundle processing and comment stripping with an AST-based solution ([#583](https://github.com/MetaMask/snaps-monorepo/pull/583))
158
-
159
- ## [0.18.1]
160
- ### Changed
161
- - No changes this release.
162
-
163
- ## [0.18.0]
164
- ### Changed
165
- - Reduce TypeScript compilation target to ES2017 ([#628](https://github.com/MetaMask/snaps-monorepo/pull/628))
166
- - Update template files ([#632](https://github.com/MetaMask/snaps-monorepo/pull/632))
167
-
168
- ## [0.17.0]
169
- ### Added
170
- - Add a TypeScript template for `mm-snap init` ([#546](https://github.com/MetaMask/snaps-monorepo/pull/546))
171
- - Add serving to `mm-snap watch` ([#507](https://github.com/MetaMask/snaps-monorepo/pull/507))
172
-
173
- ### Changed
174
- - **BREAKING:** Bump minimum Node version to 16 ([#601](https://github.com/MetaMask/snaps-monorepo/pull/601))
175
-
176
- ### Fixed
177
- - Fix segfault when using `mm-snap watch` ([#556](https://github.com/MetaMask/snaps-monorepo/pull/556))
178
-
179
- ## [0.16.0]
180
- ### Changed
181
- - **BREAKING:** Snaps are now required to export `onRpcRequest` to receive RPC requests ([#481](https://github.com/MetaMask/snaps-monorepo/pull/481), [#533](https://github.com/MetaMask/snaps-monorepo/pull/533), [#538](https://github.com/MetaMask/snaps-monorepo/pull/538), [#541](https://github.com/MetaMask/snaps-monorepo/pull/541), [#544](https://github.com/MetaMask/snaps-monorepo/pull/544))
182
- - The type of the function is available in `@metamask/snaps-types` as `OnRpcRequestHandler`.
183
-
184
- ### Fixed
185
- - Fix importing local files in TypeScript Snaps ([#527](https://github.com/MetaMask/snaps-monorepo/pull/527))
186
- - Fix `build` command when the CLI is installed globally ([#542](https://github.com/MetaMask/snaps-monorepo/pull/542))
187
-
188
- ## [0.15.0]
189
- ### Added
190
- - Add support for building TypeScript Snaps ([#443](https://github.com/MetaMask/snaps-monorepo/pull/443))
191
-
192
- ### Fixed
193
- - Fix an issue where comment stripping would break for large files ([#468](https://github.com/MetaMask/snaps-monorepo/pull/468))
194
-
195
- ## [0.14.0]
196
- ### Changed
197
- - **BREAKING:** Increase TypeScript compilation target to ES2020 ([#449](https://github.com/MetaMask/snaps-monorepo/pull/449))
198
- - This should not be breaking for consumers on any non-deprecated browser or Node.js version.
199
-
200
- ## [0.13.0]
201
- ### Changed
202
- - No changes this release.
203
-
204
- ## [0.12.0]
205
- ### Changed
206
- - No changes this release.
207
-
208
- ## [0.11.1]
209
- ### Changed
210
- - No changes this release.
211
-
212
- ## [0.11.0]
213
- ### Added
214
- - Add self to mock endowments ([#341](https://github.com/MetaMask/snaps-monorepo/pull/341))
215
-
216
- ### Changed
217
- - Bump `ses` to `0.15.15` ([#396](https://github.com/MetaMask/snaps-monorepo/pull/396))
218
- - Upgraded TypeScript version to minimum 4.4 ([#360](https://github.com/MetaMask/snaps-monorepo/pull/360))
219
- - Update template files ([#350](https://github.com/MetaMask/snaps-monorepo/pull/350))
220
-
221
- ## [0.10.7]
222
- ### Changed
223
- - **BREAKING:** Bump minimum Node version from 12 to 14 ([#331](https://github.com/MetaMask/snaps-monorepo/pull/331))
224
- - Update `mm-snap init` template files ([#330](https://github.com/MetaMask/snaps-monorepo/pull/330))
225
-
226
- ### Fixed
227
- - Fix issue where comment stripping would create invalid bundles ([#336](https://github.com/MetaMask/snaps-monorepo/pull/336))
228
-
229
- ## [0.10.6]
230
- ### Fixed
231
- - Fix endowment mocking during `mm-snap eval` ([#311](https://github.com/MetaMask/snaps-monorepo/pull/311))
232
-
233
- ## [0.10.5]
234
- ### Changed
235
- - No changes this release.
236
-
237
- ## [0.10.3]
238
- ### Fixed
239
- - Improve dynamic mocking ([#262](https://github.com/MetaMask/snaps-monorepo/pull/262))
240
-
241
- ## [0.10.2]
242
- ### Fixed
243
- - Installation failure ([#279](https://github.com/MetaMask/snaps-monorepo/pull/279))
244
- - A faulty installation script in a dependency caused the installation of this package to fail.
245
-
246
- ## [0.10.1]
247
- ### Fixed
248
- - Comment stripping will no longer remove empty block comments in strings ([#276](https://github.com/MetaMask/snaps-monorepo/pull/276))
249
-
250
- ## [0.10.0]
251
- ### Added
252
- - **BREAKING:** Transform HTML comments by default ([#237](https://github.com/MetaMask/snaps-monorepo/pull/237))
253
- - 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.
254
- - `--transpiledDeps` flag to `build` and `watch` commands ([#221](https://github.com/MetaMask/snaps-monorepo/pull/221))
255
- - This flag allows the user to specify which dependencies will be transpiled at build time if the `--transpilationMode` is `--localAndDeps`.
256
- - Add CLI usage instructions to readme ([#228](https://github.com/MetaMask/snaps-monorepo/pull/228))
257
- - Build process customization ([#251](https://github.com/MetaMask/snaps-monorepo/pull/251))
258
- - Builds can now be customized by adding a `bundlerCustomizer` function to `snap.config.js`. See the README for details.
259
-
260
- ### Changed
261
- - **BREAKING:** Change Snap config file format ([#251](https://github.com/MetaMask/snaps-monorepo/pull/251))
262
- - The CLI now expects a file `snap.config.js` instead of `snap.config.json`, with a different structure. See the README for details.
263
- - **BREAKING:** Strip comments in source code by default ([#243](https://github.com/MetaMask/snaps-monorepo/pull/243))
264
- - All comments will now be stripped from snap source code (including dependencies) by default.
265
- - Enable `--verboseErrors` by default ([#249](https://github.com/MetaMask/snaps-monorepo/pull/249))
266
-
267
- ### Fixed
268
- - Comment stripping bug ([#270](https://github.com/MetaMask/snaps-monorepo/pull/270))
269
- - 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.
270
- - 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.
271
- - `watch` command parity with `build` command ([#241](https://github.com/MetaMask/snaps-monorepo/pull/241))
272
- - The `build` command had received a number of options that were not made available to the `watch` command. They now have the same options.
273
- - Update dead link in readme ([#240](https://github.com/MetaMask/snaps-monorepo/pull/240))
274
-
275
- ## [0.9.0]
276
- ### Added
277
- - Transpilation configuration ([#213](https://github.com/MetaMask/snaps-monorepo/pull/213))
278
- - `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.
279
-
280
- ### Fixed
281
- - `mm-snap build` command when CLI is installed globally ([#216](https://github.com/MetaMask/snaps-monorepo/pull/216))
282
- - Update installation command in readme ([#205](https://github.com/MetaMask/snaps-monorepo/pull/205))
283
-
284
- ## [0.8.0]
285
- ### Changed
286
- - Update template snap created by `mm-snap init` ([#195](https://github.com/MetaMask/snaps-monorepo/pull/195))
287
- - Exit by throwing errors instead of calling `process.exit` ([#190](https://github.com/MetaMask/snaps-monorepo/pull/190))
288
-
289
- ## [0.7.0]
290
- ### Added
291
- - ESM support for `mm-snap build` ([#185](https://github.com/MetaMask/snaps-monorepo/pull/185))
292
- - 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.
293
-
294
- ### Fixed
295
- - Fix `mm-snap init` `src` default value ([#186](https://github.com/MetaMask/snaps-monorepo/pull/186))
296
- - It now correctly defaults to `src/index.js` instead of just `index.js`.
297
- - Fix comment stripping ([#189](https://github.com/MetaMask/snaps-monorepo/pull/189))
298
- - Comments wouldn't be stripped under certain circumstances due to a RegEx error, details [here](https://github.com/jonschlinkert/strip-comments/pull/49).
299
-
300
- ## [0.6.3]
301
- ### Changed
302
- - No changes this release.
303
-
304
- ## [0.6.2]
305
- ### Changed
306
- - No changes this release.
307
-
308
- ## [0.6.1]
309
- ### Fixed
310
- - `mm-snap init` Snap `snap_confirm` call ([#168](https://github.com/MetaMask/snaps-monorepo/pull/168))
311
- - The generated Snap was passing invalid parameters to the method.
312
-
313
- ## [0.6.0]
314
- ### Added
315
- - Snap SVG icon support ([#163](https://github.com/MetaMask/snaps-monorepo/pull/163))
316
-
317
- ### Changed
318
- - **BREAKING:** Support the new Snaps publishing specification ([#140](https://github.com/MetaMask/snaps-monorepo/pull/140), [#160](https://github.com/MetaMask/snaps-monorepo/pull/160))
319
- - This introduces several breaking changes to how Snaps are developed, hosted, and represented at runtime. See [the specification](https://github.com/MetaMask/specifications/blob/d4a5bf5d6990bb5b02a98bd3f95a24ffb28c701c/snaps/publishing.md) and the referenced pull requests for details.
320
- - **BREAKING:** Rename Snap `name` property to `id` ([#147](https://github.com/MetaMask/snaps-monorepo/pull/147))
321
- - **BREAKING:** Update `ses` to version `^0.15.3` ([#159](https://github.com/MetaMask/snaps-monorepo/pull/159))
322
- - This will cause behavioral changes for code executed under SES, and may require modifications to code that previously executed without issues.
323
-
324
- ## [0.5.0]
325
- ### Changed
326
- - **BREAKING:** Convert all TypeScript `interface` declarations to `type` equivalents ([#143](https://github.com/MetaMask/snaps-monorepo/pull/143))
327
-
328
- ## [0.4.0]
329
- ### Fixed
330
- - Make Windows-compatible ([#131](https://github.com/MetaMask/snaps-monorepo/pull/131))
331
-
332
- ## [0.3.1]
333
- ### Changed
334
- - No changes this release.
335
-
336
- ## [0.3.0]
337
- ### Changed
338
- - **BREAKING:** Enforce consistent naming for Snaps-related functionality ([#119](https://github.com/MetaMask/snaps-monorepo/pull/119))
339
-
340
- ## [0.2.2]
341
- ### Fixed
342
- - Package script issues ([#97](https://github.com/MetaMask/snaps-monorepo/pull/97), [#98](https://github.com/MetaMask/snaps-monorepo/pull/98))
343
-
344
- ## [0.2.1]
345
- ### Fixed
346
- - Snap produced by `mm-snap init` ([#94](https://github.com/MetaMask/snaps-monorepo/pull/94))
347
- - The template used to create the "Hello, world!" snap had become outdated due to a build-time bug.
348
-
349
- ## [0.2.0]
350
- ### Changed
351
- - Update publish scripts ([#92](https://github.com/MetaMask/snaps-monorepo/pull/92))
352
-
353
- ## [0.1.1]
354
- ### Added
355
- - Missing publish scripts to new packages
356
-
357
- ## [0.1.0]
358
- ### Changed
359
- - **BREAKING:** Rename package to `@metamask/snaps-cli` ([#72](https://github.com/MetaMask/snaps-monorepo/pull/72))
360
- - This package was previously named [`snaps-cli`](https://npmjs.com/package/snaps-cli).
361
- - 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](https://github.com/MetaMask/snaps-cli/blob/main/CHANGELOG.md).
362
-
363
- ### Removed
364
- - Example snaps ([#72](https://github.com/MetaMask/snaps-monorepo/pull/72))
365
- - The examples now live in their own package, [`@metamask/snap-examples`](https://npmjs.com/package/@metamask/snap-examples).
366
-
367
- [Unreleased]: https://github.com/MetaMask/snaps/compare/v0.37.0-flask.1...HEAD
368
- [0.37.0-flask.1]: https://github.com/MetaMask/snaps/compare/v0.36.1-flask.1...v0.37.0-flask.1
369
- [0.36.1-flask.1]: https://github.com/MetaMask/snaps/compare/v0.36.0-flask.1...v0.36.1-flask.1
370
- [0.36.0-flask.1]: https://github.com/MetaMask/snaps/compare/v0.35.2-flask.1...v0.36.0-flask.1
371
- [0.35.2-flask.1]: https://github.com/MetaMask/snaps/compare/v0.35.1-flask.1...v0.35.2-flask.1
372
- [0.35.1-flask.1]: https://github.com/MetaMask/snaps/compare/v0.35.0-flask.1...v0.35.1-flask.1
373
- [0.35.0-flask.1]: https://github.com/MetaMask/snaps/compare/v0.34.1-flask.1...v0.35.0-flask.1
374
- [0.34.1-flask.1]: https://github.com/MetaMask/snaps/compare/v0.34.0-flask.1...v0.34.1-flask.1
375
- [0.34.0-flask.1]: https://github.com/MetaMask/snaps/compare/v0.33.1-flask.1...v0.34.0-flask.1
376
- [0.33.1-flask.1]: https://github.com/MetaMask/snaps/compare/v0.33.0-flask.1...v0.33.1-flask.1
377
- [0.33.0-flask.1]: https://github.com/MetaMask/snaps/compare/v0.32.2...v0.33.0-flask.1
378
- [0.32.2]: https://github.com/MetaMask/snaps/compare/v0.32.1...v0.32.2
379
- [0.32.1]: https://github.com/MetaMask/snaps/compare/v0.32.0...v0.32.1
380
- [0.32.0]: https://github.com/MetaMask/snaps/compare/v0.31.0...v0.32.0
381
- [0.31.0]: https://github.com/MetaMask/snaps/compare/v0.30.0...v0.31.0
382
- [0.30.0]: https://github.com/MetaMask/snaps/compare/v0.29.0...v0.30.0
383
- [0.29.0]: https://github.com/MetaMask/snaps/compare/v0.28.0...v0.29.0
384
- [0.28.0]: https://github.com/MetaMask/snaps/compare/v0.27.1...v0.28.0
385
- [0.27.1]: https://github.com/MetaMask/snaps/compare/v0.27.0...v0.27.1
386
- [0.27.0]: https://github.com/MetaMask/snaps/compare/v0.26.2...v0.27.0
387
- [0.26.2]: https://github.com/MetaMask/snaps/compare/v0.26.1...v0.26.2
388
- [0.26.1]: https://github.com/MetaMask/snaps/compare/v0.26.0...v0.26.1
389
- [0.26.0]: https://github.com/MetaMask/snaps/compare/v0.25.0...v0.26.0
390
- [0.25.0]: https://github.com/MetaMask/snaps/compare/v0.24.1...v0.25.0
391
- [0.24.1]: https://github.com/MetaMask/snaps/compare/v0.24.0...v0.24.1
392
- [0.24.0]: https://github.com/MetaMask/snaps/compare/v0.23.0...v0.24.0
393
- [0.23.0]: https://github.com/MetaMask/snaps/compare/v0.22.3...v0.23.0
394
- [0.22.3]: https://github.com/MetaMask/snaps/compare/v0.22.2...v0.22.3
395
- [0.22.2]: https://github.com/MetaMask/snaps/compare/v0.22.1...v0.22.2
396
- [0.22.1]: https://github.com/MetaMask/snaps/compare/v0.22.0...v0.22.1
397
- [0.22.0]: https://github.com/MetaMask/snaps/compare/v0.21.0...v0.22.0
398
- [0.21.0]: https://github.com/MetaMask/snaps/compare/v0.20.0...v0.21.0
399
- [0.20.0]: https://github.com/MetaMask/snaps/compare/v0.19.1...v0.20.0
400
- [0.19.1]: https://github.com/MetaMask/snaps/compare/v0.19.0...v0.19.1
401
- [0.19.0]: https://github.com/MetaMask/snaps/compare/v0.18.1...v0.19.0
402
- [0.18.1]: https://github.com/MetaMask/snaps/compare/v0.18.0...v0.18.1
403
- [0.18.0]: https://github.com/MetaMask/snaps/compare/v0.17.0...v0.18.0
404
- [0.17.0]: https://github.com/MetaMask/snaps/compare/v0.16.0...v0.17.0
405
- [0.16.0]: https://github.com/MetaMask/snaps/compare/v0.15.0...v0.16.0
406
- [0.15.0]: https://github.com/MetaMask/snaps/compare/v0.14.0...v0.15.0
407
- [0.14.0]: https://github.com/MetaMask/snaps/compare/v0.13.0...v0.14.0
408
- [0.13.0]: https://github.com/MetaMask/snaps/compare/v0.12.0...v0.13.0
409
- [0.12.0]: https://github.com/MetaMask/snaps/compare/v0.11.1...v0.12.0
410
- [0.11.1]: https://github.com/MetaMask/snaps/compare/v0.11.0...v0.11.1
411
- [0.11.0]: https://github.com/MetaMask/snaps/compare/v0.10.7...v0.11.0
412
- [0.10.7]: https://github.com/MetaMask/snaps/compare/v0.10.6...v0.10.7
413
- [0.10.6]: https://github.com/MetaMask/snaps/compare/v0.10.5...v0.10.6
414
- [0.10.5]: https://github.com/MetaMask/snaps/compare/v0.10.3...v0.10.5
415
- [0.10.3]: https://github.com/MetaMask/snaps/compare/v0.10.2...v0.10.3
416
- [0.10.2]: https://github.com/MetaMask/snaps/compare/v0.10.1...v0.10.2
417
- [0.10.1]: https://github.com/MetaMask/snaps/compare/v0.10.0...v0.10.1
418
- [0.10.0]: https://github.com/MetaMask/snaps/compare/v0.9.0...v0.10.0
419
- [0.9.0]: https://github.com/MetaMask/snaps/compare/v0.8.0...v0.9.0
420
- [0.8.0]: https://github.com/MetaMask/snaps/compare/v0.7.0...v0.8.0
421
- [0.7.0]: https://github.com/MetaMask/snaps/compare/v0.6.3...v0.7.0
422
- [0.6.3]: https://github.com/MetaMask/snaps/compare/v0.6.2...v0.6.3
423
- [0.6.2]: https://github.com/MetaMask/snaps/compare/v0.6.1...v0.6.2
424
- [0.6.1]: https://github.com/MetaMask/snaps/compare/v0.6.0...v0.6.1
425
- [0.6.0]: https://github.com/MetaMask/snaps/compare/v0.5.0...v0.6.0
426
- [0.5.0]: https://github.com/MetaMask/snaps/compare/v0.4.0...v0.5.0
427
- [0.4.0]: https://github.com/MetaMask/snaps/compare/v0.3.1...v0.4.0
428
- [0.3.1]: https://github.com/MetaMask/snaps/compare/v0.3.0...v0.3.1
429
- [0.3.0]: https://github.com/MetaMask/snaps/compare/v0.2.2...v0.3.0
430
- [0.2.2]: https://github.com/MetaMask/snaps/compare/v0.2.1...v0.2.2
431
- [0.2.1]: https://github.com/MetaMask/snaps/compare/v0.2.0...v0.2.1
432
- [0.2.0]: https://github.com/MetaMask/snaps/compare/v0.1.1...v0.2.0
433
- [0.1.1]: https://github.com/MetaMask/snaps/compare/v0.1.0...v0.1.1
434
- [0.1.0]: https://github.com/MetaMask/snaps/releases/tag/v0.1.0
9
+ ## [0.38.0-flask.1]
10
+ ### Added
11
+ - Add support for bundling with Webpack ([#1521](https://github.com/MetaMask/snaps/pull/1521))
12
+ - For backwards compatibility, the Webpack bundler is opt-in. To use it, add
13
+ `"bundler": "webpack"` to your snap configuration file, and follow the new
14
+ configuration format described in the documentation.
15
+ - The new configuration format also adds support for:
16
+ - Setting environment variables, which are set as `process.env` values in
17
+ the bundled code.
18
+ - Importing WebAssembly modules (if `experimental.wasm` is enabled in the
19
+ snap configuration file).
20
+ - Support TypeScript snap configuration files ([#1521](https://github.com/MetaMask/snaps/pull/1521))
21
+
22
+ ### Changed
23
+ - Release package independently ([#1600](https://github.com/MetaMask/snaps/pull/1600))
24
+ - The version of the package no longer needs to match the version of all other
25
+ MetaMask Snaps packages.
26
+
27
+ [Unreleased]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-cli@0.38.0-flask.1...HEAD
28
+ [0.38.0-flask.1]: https://github.com/MetaMask/snaps/releases/tag/@metamask/snaps-cli@0.38.0-flask.1