9 Commits

Author SHA1 Message Date
Ryan Roemer
0a11e7e6ae
Chore: Various plugin refactoring and simplification. (#332)
Refactors the plugin internal logic to be a lot simpler. 

- Chore: Refactor internal stats consumption to perform `inspectpack` analysis in the main thread, without using `main` streams. Originally, the `inspectpack` engine did some really heavy CPU stuff (gzipping lots of files), but now the actions are super fast, so I've removed `most` async observables and just switched to straight promises.
- Chore: Refactor internal handler in plugin to always be a wrapped function so that we can't accidentally have asynchronous code call the handler function after it is removed / nulled.
- Bugfix: Add message counting delayed cleanup in plugin to allow messages to drain in Dashboard. The issue seems to be that we hit socket IO disconnect in the plugin before the dashboard actually processes the messages. Fixes #294.
2021-07-12 12:27:50 -07:00
Ryan Roemer
77039dc78f
Chore: Update devDependencies. (#317)
Updates all `devDependencies` except for webpack which we're going to tackle in #316
2021-01-20 14:03:12 -08:00
Ryan Roemer
95e5ca1cd0
Feature: Include only specified assets in plugin and/or CLI. (#291)
- Add `DashboardPlugin({ includeAssets: [ "stringPrefix", /regexObj/ ] })` Webpack plugin filtering option.
- Add `webpack-dashboard --include-assets stringPrefix1 -a stringPrefix2` CLI filtering option.
- Change `"mode"` SocketIO event to `"options"` as it now passes both `minimal` and `includeAssets` from CLI to the Webpack plugin.
- Fix unit tests that incorrectly relied on `.complete()` for `most` observables.
- Add additional `examples` fixture of `hello` for development (useful for this scenario to have 2).
- Updates a really old README PNG of the dashboard CLI!
- Replaces @wapgear 's great initial foray into an `--ignore-assets` flag. Closes #289
2019-08-27 14:50:17 -07:00
parkerziegler
09cc396e4f Upgrade to inspectpack 4; add regression tests. 2018-11-24 15:49:51 -08:00
Elrey Belmonti
379d0e9fc9 refactor test according to PR comments 2018-10-04 09:23:08 -07:00
Elrey Belmonti
8ed01f0356 refactor test files according to comments 2018-09-28 11:04:29 -07:00
Elrey Belmonti
720e2ac5df add unit test for dashboard/index.js and plugin/index.js 2018-09-28 08:52:08 -07:00
Ryan Roemer
8a32cd19ff
[Major] Integrate inspectpack3 - faster, better, and more colorful! (#249)
This is a major update to `webpack-dashboard` with breaking changes. And a lot of speed and coolness.

## Breaking changes

- Requires node6+.
- Use the webpack internal stats object instead of real bundles. This is faster and with less futzing / parsing on the dashboard's end. Should permanently fix the `no code sections` found errors.
- We've removed command flags / plugin options that no longer apply like `--root`, etc.

### Modules

- Removed `min` and `min+gz` estimated file sizes from modules outputs. This dramatically speeds up the dashboard and reduces CPU usage.

### Versions

- Version skews should be detected more accurately and much faster thanks to dramatically improved heuristics from `inspectpack`.

### Duplicates

- Duplicates now reports on duplicate files that are (1) completely identical, and (2) the same package name and file path but with different sources. The first are low hanging fruit for optimizations in your build -- you've literally got the same thing multiple times. The latter needs to be coalesced at the package dependency level -- something the versions output can help with.

## Issues

- Upgrade hooks to work in webpack1-4 with abstraction. Fixes #240

## Refactoring

- Switch from `chalk` to using Blessed's built-in tags for coloring. This is definitely the way to go as things like table spacing don't work with chalk strings and work like a charm with Blessed tags.
- Update dependencies and remove lots of unused things (like `lodash`, `chalk`, `bluebird` and a whole lot of `babel*` that apparently wasn't used anyways).
    - New `inspectpack` is way slimmer and faster, with no more binary dependencies!
- Switch to yarn-only workflow in dev.
- Bump Travis node versions.
2018-05-24 13:12:52 -07:00
Ryan Roemer
c9be42760d Add basic tests. (#208)
* Fixes #205 
* Add the most minimal skeleton tests to import most files and check for rudimentary breakage.
* Make `bin/webpack-dashboard.js` exportable in addition to being a script.
* Follow-on real test ticket at #207 
* Update eslintrc to use `arrow-parens: [error, as-needed]`
2017-10-10 09:08:44 -07:00