@metamask/snaps-webpack-plugin 0.16.0 → 0.18.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.
- package/dist/plugin.d.ts +14 -0
- package/dist/plugin.js +14 -0
- package/dist/plugin.js.map +1 -1
- package/package.json +9 -8
- package/CHANGELOG.md +0 -35
package/dist/plugin.d.ts
CHANGED
|
@@ -3,6 +3,20 @@ import { Compiler } from 'webpack';
|
|
|
3
3
|
export declare type Options = PostProcessOptions;
|
|
4
4
|
export default class SnapsWebpackPlugin {
|
|
5
5
|
readonly options: Partial<Options>;
|
|
6
|
+
/**
|
|
7
|
+
* Construct an instance of the plugin.
|
|
8
|
+
*
|
|
9
|
+
* @param options - The post-process options.
|
|
10
|
+
* @param options.stripComments - Whether to strip comments. Defaults to `true`.
|
|
11
|
+
* @param options.transformHtmlComments - Whether to transform HTML comments.
|
|
12
|
+
* Defaults to `true`.
|
|
13
|
+
*/
|
|
6
14
|
constructor(options?: Partial<Options>);
|
|
15
|
+
/**
|
|
16
|
+
* Apply the plugin to the Webpack compiler. Hooks into the `processAssets`
|
|
17
|
+
* stage to process the bundle.
|
|
18
|
+
*
|
|
19
|
+
* @param compiler - The Webpack compiler.
|
|
20
|
+
*/
|
|
7
21
|
apply(compiler: Compiler): void;
|
|
8
22
|
}
|
package/dist/plugin.js
CHANGED
|
@@ -4,9 +4,23 @@ const snap_utils_1 = require("@metamask/snap-utils");
|
|
|
4
4
|
const webpack_sources_1 = require("webpack-sources");
|
|
5
5
|
const PLUGIN_NAME = 'SnapsWebpackPlugin';
|
|
6
6
|
class SnapsWebpackPlugin {
|
|
7
|
+
/**
|
|
8
|
+
* Construct an instance of the plugin.
|
|
9
|
+
*
|
|
10
|
+
* @param options - The post-process options.
|
|
11
|
+
* @param options.stripComments - Whether to strip comments. Defaults to `true`.
|
|
12
|
+
* @param options.transformHtmlComments - Whether to transform HTML comments.
|
|
13
|
+
* Defaults to `true`.
|
|
14
|
+
*/
|
|
7
15
|
constructor(options = {}) {
|
|
8
16
|
this.options = options;
|
|
9
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* Apply the plugin to the Webpack compiler. Hooks into the `processAssets`
|
|
20
|
+
* stage to process the bundle.
|
|
21
|
+
*
|
|
22
|
+
* @param compiler - The Webpack compiler.
|
|
23
|
+
*/
|
|
10
24
|
apply(compiler) {
|
|
11
25
|
compiler.hooks.compilation.tap(PLUGIN_NAME, (compilation) => {
|
|
12
26
|
compilation.hooks.processAssets.tap(PLUGIN_NAME, (assets) => {
|
package/dist/plugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":";;AAAA,qDAA6E;AAE7E,qDAA4C;AAE5C,MAAM,WAAW,GAAG,oBAAoB,CAAC;AAIzC,MAAqB,kBAAkB;IAGrC,YAAY,UAA4B,EAAE;QACxC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED,KAAK,CAAC,QAAkB;QACtB,QAAQ,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,WAAW,EAAE,EAAE;YAC1D,WAAW,CAAC,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,MAAM,EAAE,EAAE;gBAC1D,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,SAAS,EAAE,EAAE;oBACxC,MAAM,KAAK,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;oBAChC,MAAM,SAAS,GAAG,IAAA,8BAAiB,EACjC,KAAK,CAAC,MAAM,EAAY,EACxB,IAAI,CAAC,OAAO,CACb,CAAC;oBAEF,IAAI,SAAS,EAAE;wBACb,+EAA+E;wBAC/E,qDAAqD;wBACrD,WAAW,CAAC,WAAW,CAAC,SAAS,EAAE,IAAI,2BAAS,CAAC,SAAS,CAAQ,CAAC,CAAC;qBACrE;gBACH,CAAC,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;CACF;
|
|
1
|
+
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":";;AAAA,qDAA6E;AAE7E,qDAA4C;AAE5C,MAAM,WAAW,GAAG,oBAAoB,CAAC;AAIzC,MAAqB,kBAAkB;IAGrC;;;;;;;OAOG;IACH,YAAY,UAA4B,EAAE;QACxC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,QAAkB;QACtB,QAAQ,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,WAAW,EAAE,EAAE;YAC1D,WAAW,CAAC,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,MAAM,EAAE,EAAE;gBAC1D,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,SAAS,EAAE,EAAE;oBACxC,MAAM,KAAK,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;oBAChC,MAAM,SAAS,GAAG,IAAA,8BAAiB,EACjC,KAAK,CAAC,MAAM,EAAY,EACxB,IAAI,CAAC,OAAO,CACb,CAAC;oBAEF,IAAI,SAAS,EAAE;wBACb,+EAA+E;wBAC/E,qDAAqD;wBACrD,WAAW,CAAC,WAAW,CAAC,SAAS,EAAE,IAAI,2BAAS,CAAC,SAAS,CAAQ,CAAC,CAAC;qBACrE;gBACH,CAAC,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AAxCD,qCAwCC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@metamask/snaps-webpack-plugin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.1",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"webpack",
|
|
6
6
|
"plugin"
|
|
@@ -26,25 +26,26 @@
|
|
|
26
26
|
"build": "yarn build:tsc",
|
|
27
27
|
"build:clean": "yarn clean && yarn build",
|
|
28
28
|
"clean": "rimraf '*.tsbuildinfo' 'dist/*'",
|
|
29
|
-
"publish": "../../scripts/publish-package.sh"
|
|
29
|
+
"publish:package": "../../scripts/publish-package.sh"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@metamask/snap-utils": "^0.
|
|
32
|
+
"@metamask/snap-utils": "^0.18.1",
|
|
33
33
|
"webpack-sources": "^3.2.3"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@lavamoat/allow-scripts": "^2.0.3",
|
|
37
37
|
"@metamask/auto-changelog": "^2.6.0",
|
|
38
|
-
"@metamask/eslint-config": "^
|
|
39
|
-
"@metamask/eslint-config-jest": "^
|
|
40
|
-
"@metamask/eslint-config-nodejs": "^
|
|
41
|
-
"@metamask/eslint-config-typescript": "^
|
|
38
|
+
"@metamask/eslint-config": "^9.0.0",
|
|
39
|
+
"@metamask/eslint-config-jest": "^9.0.0",
|
|
40
|
+
"@metamask/eslint-config-nodejs": "^9.0.0",
|
|
41
|
+
"@metamask/eslint-config-typescript": "^9.0.1",
|
|
42
42
|
"@types/jest": "^27.5.1",
|
|
43
43
|
"@types/webpack-sources": "^3.2.0",
|
|
44
44
|
"eslint": "^7.30.0",
|
|
45
45
|
"eslint-config-prettier": "^8.3.0",
|
|
46
46
|
"eslint-plugin-import": "^2.23.4",
|
|
47
47
|
"eslint-plugin-jest": "^24.4.0",
|
|
48
|
+
"eslint-plugin-jsdoc": "^36.1.0",
|
|
48
49
|
"eslint-plugin-node": "^11.1.0",
|
|
49
50
|
"eslint-plugin-prettier": "^3.4.0",
|
|
50
51
|
"jest": "^27.5.1",
|
|
@@ -58,7 +59,7 @@
|
|
|
58
59
|
"webpack": "^5.72.1"
|
|
59
60
|
},
|
|
60
61
|
"engines": {
|
|
61
|
-
"node": ">=
|
|
62
|
+
"node": ">=16.0.0"
|
|
62
63
|
},
|
|
63
64
|
"publishConfig": {
|
|
64
65
|
"access": "public",
|
package/CHANGELOG.md
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
All notable changes to this project will be documented in this file.
|
|
3
|
-
|
|
4
|
-
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
5
|
-
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
|
-
|
|
7
|
-
## [Unreleased]
|
|
8
|
-
|
|
9
|
-
## [0.16.0]
|
|
10
|
-
### Changed
|
|
11
|
-
- No changes this release.
|
|
12
|
-
|
|
13
|
-
## [0.15.0]
|
|
14
|
-
### Fixed
|
|
15
|
-
- Fix some typing issues ([#462](https://github.com/MetaMask/snaps-skunkworks/pull/462))
|
|
16
|
-
|
|
17
|
-
## [0.14.0]
|
|
18
|
-
### Fixed
|
|
19
|
-
- Actually publish package contents ([#449](https://github.com/MetaMask/snaps-skunkworks/pull/449))
|
|
20
|
-
- Package contents were omitted from the previous version due to a build failure.
|
|
21
|
-
|
|
22
|
-
## [0.13.0]
|
|
23
|
-
### Changed
|
|
24
|
-
- No changes this release.
|
|
25
|
-
|
|
26
|
-
## [0.12.0]
|
|
27
|
-
### Added
|
|
28
|
-
- Initial release ([#420](https://github.com/MetaMask/snaps-skunkworks/pull/420))
|
|
29
|
-
|
|
30
|
-
[Unreleased]: https://github.com/MetaMask/snaps-skunkworks/compare/v0.16.0...HEAD
|
|
31
|
-
[0.16.0]: https://github.com/MetaMask/snaps-skunkworks/compare/v0.15.0...v0.16.0
|
|
32
|
-
[0.15.0]: https://github.com/MetaMask/snaps-skunkworks/compare/v0.14.0...v0.15.0
|
|
33
|
-
[0.14.0]: https://github.com/MetaMask/snaps-skunkworks/compare/v0.13.0...v0.14.0
|
|
34
|
-
[0.13.0]: https://github.com/MetaMask/snaps-skunkworks/compare/v0.12.0...v0.13.0
|
|
35
|
-
[0.12.0]: https://github.com/MetaMask/snaps-skunkworks/releases/tag/v0.12.0
|