@statoscope/helpers
Advanced tools
Changelog
5.28.1 (20 October 2023)
[webpack-model]
- revert chunk-asset linking logic from 5.25.1Changelog
5.28.0 (24 September 2023)
update jora from 1.0.0-beta.7 to 1.0.0-beta.8 (see changelog)
lots of new methods and assertions-feature
update discoveryjs from 1.0.0-beta.77 to 1.0.0-beta.78
Changelog
5.25.0 (17 February 2023)
[webpack-plugin]
- super-huge (up to 30 times) decrease of html-report size[cli]
- super-huge (up to 30 times) decrease of html-report sizeChangelog
5.24.0 (22 July 2022)
[webpack-ui]
- replace highcharts
by chart.js
Usage example:
{
"view": "box",
"options": { "height": "400px" },
"content": {
"view": "chart",
"data": "{ any chart.js options here }"
}
}
[webpack-ui]
- add error
-view:
{
"view": "error",
"message": "Some error message"
}
[cli]
- js-files can be used in customReport
-arg
[helpers]
- add options
-parameter into formatData
-helper just like Date.toLocaleString
[webpack-model]
- remove stats validation (increase startup performance)Changelog
5.23.0 (14 July 2022)
[helpers]
- update jora
to 1.0.0-beta.7[webpack-ui]
- update @discoveryjs/discovery
to 1.0.0-beta.66[webpack-ui]
- update highcharts
to 10.2.0[webpack-model]
- refactor chunk graph building (fixes bugs of chunks relations accuracy)Changelog
5.22.0 (03 July 2022)
This is 5.21 actually 🤦
[cli]
- add --custom-report
and --config
args for generate
and serve
commands (#157 by @amalitsky)[config]
- add generate.reports
field (#157 by @amalitsky)[webpack-model]
- added helpers:
asset_getSize(asset: NormalizedAsset, hash: string, useCompressed: boolean): Size
assets_getTotalSize(assets: NormalizedAsset[], hash: string, useCompressed: boolean): Size
entrypoint_getChunks(entry: NormalizedEntrypointItem): NormalizedChunk[]
entrypoint_getInitialChunks(entry: NormalizedEntrypointItem): NormalizedChunk[]
entrypoint_getInitialSize(entry: NormalizedEntrypointItem, hash: string, useCompressed: boolean): Size
entrypoint_getAsyncChunks(entry: NormalizedEntrypointItem): NormalizedChunk[]
entrypoint_getAsyncSize(entry: NormalizedEntrypointItem, hash: string, useCompressed: boolean): Size
entrypoint_getAssets(entry: NormalizedEntrypointItem): NormalizedAsset[]
entrypoint_getInitialAssets(entry: NormalizedEntrypointItem): NormalizedAsset[]
entrypoint_getAsyncAssets(entry: NormalizedEntrypointItem): NormalizedAsset[]
resolveCompilationByAsset(asset: NormalizedAsset, filename: string): NormalizedCompilation | null
resolveCompilationByChunk(chunk: NormalizedChunk, filename: string): NormalizedCompilation | null
resolveCompilationByModule(module: NormalizedModule, filename: string): NormalizedCompilation | null
resolveCompilationByEntrypoint(entry: NormalizedEntrypointItem, filename: string): NormalizedCompilation | null
[webpack-ui]
- fix dashboard data[webpack-model]
- fix handling chunks with no files (#158 by @amalitsky)Changelog
5.19.0 (26 November 2021)
[webpack-model]
- smart handling for concat modules container id
This improves modules diff.[helpers]
- add id modifier to indexer[cli]
- add init
and create
commands (#139 by @wildOrlik)Changelog
5.9.0 (27 September 2021)
[stats-extension-custom-reports]
- add package for passing custom reports to the UI (#108)
[webpack-plugin]
- support custom reports (#108)
[webpack-ui]
- support custom reports (#108)
[helpers]
- support lock
/unlock
for Resolver
(#107)
By default, all the resolvers is locked (no items can be added to resolver storage)
const resolver = makeResolver(modules, m => m.identifier);
modules.push(fooModule);
resolver('foo'); // null
resolver.unlock(); // allow to fetch resolver storage for new elements
modules.push(fooModule);
resolver('foo'); // fooModule
In other words, locked resolver remembers its source items and ignores any source changes.
It is useful for performance.
[helpers]
- add Indexer
to build an index (#108)
Index is more complex of resolver. It provides some API to manipulate its storage:
const moduleIndex = makeIndex(module => module.identifier); // no source needed
moduleIndex.add(fooModule);
moduleIndex.get('foo'); // fooModule
moduleIndex.get('bar'); // null
moduleIndex.add(barModule);
moduleIndex.get('bar'); // barModule
moduleIndex.getAll(); // [fooModule, barModule]
[stats-extension-compressed]
- support indexer (#108)
[stats-extension-package-info]
- support indexer (#108)
[stats-extension-stats-validation-result]
- support indexer (#108)
[config]
- add requireConfig
(#108)
[cli]
- support requireConfig
(#108)
[cli]
- add makeReplacer
helper to create json replacer (#107)
[webpack-model]
- add __statoscope.context
field (#107)
[report-writer]
- remove context path from stats (it makes all the path relative from context) (#107)
[webpack-plugin]
- remove context path from stats (it makes all the path relative from context) (#107)
[webpack-stats-extension-package-info]
- remove context path from stats (it makes all the path relative from context) (#107)
[webpack-model]
- use module.identifier to resolve a module (#107)
[webpack-model]
- decouple extension and compilation (#108)
Extensions have attached to files, not to compilations
[webpack-ui]
- use module.identifier
to resolve a module (#107)
[webpack-stats-extension-compressed]
- use module.identifier
to resolve a module (#107)
[stats-validator-plugin-webpack]
- use module.identifier
to resolve a module (#107)
[webpack-model]
- not fail when incomplete stats have used