webpack-bundle-analyzer 4.4.2 → 4.5.0

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/CHANGELOG.md CHANGED
@@ -12,6 +12,16 @@ _Note: Gaps between patch versions are faulty, broken or test releases._
12
12
 
13
13
  ## UNRELEASED
14
14
 
15
+ ## 4.5.0
16
+
17
+ * **Improvement**
18
+ * Stop publishing src folder to npm ([#478](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/478) by [@wood1986](https://github.com/wood1986))
19
+
20
+ * **Internal**
21
+ * Update some dependencies ([#448](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/448))
22
+ * Replace nightmare with Puppeteer ([#469](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/469) by [@valscion](https://github.com/valscion))
23
+ * Replace Mocha with Jest ([#470](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/470) by [@valscion](https://github.com/valscion))
24
+
15
25
  ## 4.4.2
16
26
 
17
27
  * **Bug Fix**
package/README.md CHANGED
@@ -173,8 +173,8 @@ The Chunk Context Menu can be opened by right-clicking or `Ctrl`-clicking on a s
173
173
 
174
174
  It happens when `webpack-bundle-analyzer` analyzes files that don't actually exist in your file system, for example when you work with `webpack-dev-server` that keeps all the files in RAM. If you use `webpack-bundle-analyzer` as a plugin you won't get any errors, however if you run it via CLI you get the error message in terminal:
175
175
  ```
176
- Couldn't parse bundle asset "your_bundle_name.bundle.js".
177
- Analyzer will use module sizes from stats file.
176
+ Error parsing bundle asset "your_bundle_name.bundle.js": no such file
177
+ No bundles were parsed. Analyzer will show only original module sizes from stats file.
178
178
  ```
179
179
  To get more information about it you can read [issue #147](https://github.com/webpack-contrib/webpack-bundle-analyzer/issues/147).
180
180
 
@@ -24,13 +24,14 @@ const SIZES = new Set(['stat', 'parsed', 'gzip']);
24
24
  const program = commander.version(require('../../package.json').version).usage(`<bundleStatsFile> [bundleDir] [options]
25
25
 
26
26
  Arguments:
27
-
27
+
28
28
  bundleStatsFile Path to Webpack Stats JSON file.
29
29
  bundleDir Directory containing all generated bundles.
30
30
  You should provided it if you want analyzer to show you the real parsed module sizes.
31
31
  By default a directory of stats file is used.`).option('-m, --mode <mode>', 'Analyzer mode. Should be `server`,`static` or `json`.' + br('In `server` mode analyzer will start HTTP server to show bundle report.') + br('In `static` mode single HTML file with bundle report will be generated.') + br('In `json` mode single JSON file with bundle report will be generated.'), 'server').option( // Had to make `host` parameter optional in order to let `-h` flag output help message
32
32
  // Fixes https://github.com/webpack-contrib/webpack-bundle-analyzer/issues/239
33
33
  '-h, --host [host]', 'Host that will be used in `server` mode to start HTTP server.', '127.0.0.1').option('-p, --port <n>', 'Port that will be used in `server` mode to start HTTP server.', 8888).option('-r, --report <file>', 'Path to bundle report file that will be generated in `static` mode.').option('-t, --title <title>', 'String to use in title element of html report.').option('-s, --default-sizes <type>', 'Module sizes to show in treemap by default.' + br(`Possible values: ${[...SIZES].join(', ')}`), 'parsed').option('-O, --no-open', "Don't open report in default browser automatically.").option('-e, --exclude <regexp>', 'Assets that should be excluded from the report.' + br('Can be specified multiple times.'), array()).option('-l, --log-level <level>', 'Log level.' + br(`Possible values: ${[...Logger.levels].join(', ')}`), Logger.defaultLevel).parse(process.argv);
34
+ let [bundleStatsFile, bundleDir] = program.args;
34
35
  let {
35
36
  mode,
36
37
  host,
@@ -40,9 +41,8 @@ let {
40
41
  defaultSizes,
41
42
  logLevel,
42
43
  open: openBrowser,
43
- exclude: excludeAssets,
44
- args: [bundleStatsFile, bundleDir]
45
- } = program;
44
+ exclude: excludeAssets
45
+ } = program.opts();
46
46
  const logger = new Logger(logLevel);
47
47
 
48
48
  if (typeof reportTitle === 'undefined') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "webpack-bundle-analyzer",
3
- "version": "4.4.2",
3
+ "version": "4.5.0",
4
4
  "description": "Webpack plugin and CLI utility that represents bundle content as convenient interactive zoomable treemap",
5
5
  "author": "Yury Grunin <grunin.ya@ya.ru>",
6
6
  "license": "MIT",
@@ -24,19 +24,18 @@
24
24
  "npm-publish": "npm run lint && npm run build && npm test && npm publish",
25
25
  "lint": "eslint --ext js,jsx .",
26
26
  "install-test-webpack-versions": "./bin/install-test-webpack-versions.sh",
27
- "test": "npm run install-test-webpack-versions && mocha --exit --require @babel/register",
28
- "test-dev": "npm run install-test-webpack-versions && mocha --watch --watch-ignore test/output --require @babel/register"
27
+ "test": "npm run install-test-webpack-versions && jest --runInBand",
28
+ "test-dev": "npm run install-test-webpack-versions && jest --watch --runInBand"
29
29
  },
30
30
  "files": [
31
31
  "public",
32
- "lib",
33
- "src"
32
+ "lib"
34
33
  ],
35
34
  "dependencies": {
36
35
  "acorn": "^8.0.4",
37
36
  "acorn-walk": "^8.0.0",
38
37
  "chalk": "^4.1.0",
39
- "commander": "^6.2.0",
38
+ "commander": "^7.2.0",
40
39
  "gzip-size": "^6.0.0",
41
40
  "lodash": "^4.17.20",
42
41
  "opener": "^1.5.2",
@@ -44,50 +43,48 @@
44
43
  "ws": "^7.3.1"
45
44
  },
46
45
  "devDependencies": {
47
- "@babel/core": "7.12.3",
48
- "@babel/plugin-proposal-class-properties": "7.12.1",
49
- "@babel/plugin-proposal-decorators": "7.12.1",
50
- "@babel/plugin-transform-runtime": "7.12.1",
51
- "@babel/preset-env": "7.12.1",
52
- "@babel/preset-react": "7.12.5",
53
- "@babel/register": "7.12.1",
54
- "@babel/runtime": "7.12.5",
46
+ "@babel/core": "7.14.3",
47
+ "@babel/plugin-proposal-class-properties": "7.13.0",
48
+ "@babel/plugin-proposal-decorators": "7.14.2",
49
+ "@babel/plugin-transform-runtime": "7.14.3",
50
+ "@babel/preset-env": "7.14.2",
51
+ "@babel/preset-react": "7.13.13",
52
+ "@babel/runtime": "7.14.0",
55
53
  "@carrotsearch/foamtree": "3.5.0",
56
- "autoprefixer": "10.0.1",
54
+ "autoprefixer": "10.2.5",
57
55
  "babel-eslint": "10.1.0",
58
- "babel-loader": "8.1.0",
56
+ "babel-loader": "8.2.2",
59
57
  "babel-plugin-lodash": "3.3.4",
60
- "chai": "4.2.0",
58
+ "chai": "4.3.4",
61
59
  "chai-subset": "1.6.0",
62
- "classnames": "2.2.6",
63
- "core-js": "3.6.5",
64
- "css-loader": "5.0.1",
65
- "cssnano": "4.1.10",
60
+ "classnames": "2.3.1",
61
+ "core-js": "3.12.1",
62
+ "css-loader": "5.2.5",
63
+ "cssnano": "5.0.4",
66
64
  "del": "6.0.0",
67
65
  "eslint": "5.16.0",
68
66
  "eslint-config-th0r": "2.0.0",
69
67
  "eslint-config-th0r-react": "2.0.1",
70
- "eslint-plugin-react": "7.21.5",
71
- "exports-loader": "1.1.1",
72
- "filesize": "^6.1.0",
73
- "globby": "11.0.1",
68
+ "eslint-plugin-react": "7.23.2",
69
+ "filesize": "^6.3.0",
70
+ "globby": "11.0.3",
74
71
  "gulp": "4.0.2",
75
72
  "gulp-babel": "8.0.0",
73
+ "jest": "27.2.2",
76
74
  "mobx": "5.15.7",
77
75
  "mobx-react": "6.3.1",
78
- "mocha": "8.2.1",
79
- "nightmare": "3.0.2",
80
- "postcss": "8.2.10",
76
+ "postcss": "8.3.0",
81
77
  "postcss-icss-values": "2.0.2",
82
- "postcss-loader": "4.0.4",
83
- "preact": "10.5.5",
78
+ "postcss-loader": "5.3.0",
79
+ "preact": "10.5.13",
80
+ "puppeteer": "10.4.0",
84
81
  "stream-combiner2": "1.1.1",
85
82
  "style-loader": "2.0.0",
86
- "terser-webpack-plugin": "5.0.3",
83
+ "terser-webpack-plugin": "5.1.2",
87
84
  "url-loader": "4.1.1",
88
- "webpack": "5.4.0",
85
+ "webpack": "5.37.1",
89
86
  "webpack-cli": "3.3.12",
90
- "webpack-dev-server": "3.11.0"
87
+ "webpack-dev-server": "3.11.2"
91
88
  },
92
89
  "keywords": [
93
90
  "webpack",