webpackbar
Advanced tools
Comparing version 5.0.2 to 6.0.0
import Webpack, { Stats } from 'webpack'; | ||
type ReporterContextFunc<T = any> = (context: WebpackBarPlugin, opts: T) => void | ||
type ReporterContextFunc<T = any> = (context: WebpackBarPlugin, opts: T) => void; | ||
interface State { | ||
start: [number, number] | null | ||
progress: number | ||
done: boolean | ||
message: string | ||
details: string[] | ||
start: [number, number] | null; | ||
progress: number; | ||
done: boolean; | ||
message: string; | ||
details: string[]; | ||
request: null | { | ||
file: null | string | ||
loaders: string[] | ||
} | ||
hasErrors: boolean | ||
color: string | ||
name: string | ||
file: null | string; | ||
loaders: string[]; | ||
}; | ||
hasErrors: boolean; | ||
color: string; | ||
name: string; | ||
} | ||
@@ -24,3 +24,3 @@ | ||
*/ | ||
start?: ReporterContextFunc | ||
start?: ReporterContextFunc; | ||
@@ -30,3 +30,3 @@ /** | ||
*/ | ||
change?: ReporterContextFunc<{ shortPath: string }> | ||
change?: ReporterContextFunc<{ shortPath: string }>; | ||
@@ -36,3 +36,3 @@ /** | ||
*/ | ||
update?: ReporterContextFunc | ||
update?: ReporterContextFunc; | ||
@@ -42,3 +42,3 @@ /** | ||
*/ | ||
done?: ReporterContextFunc<{ stats: Stats }> | ||
done?: ReporterContextFunc<{ stats: Stats }>; | ||
@@ -48,3 +48,3 @@ /** | ||
*/ | ||
progress?: ReporterContextFunc | ||
progress?: ReporterContextFunc; | ||
@@ -54,11 +54,11 @@ /** | ||
*/ | ||
allDone?: ReporterContextFunc | ||
allDone?: ReporterContextFunc; | ||
beforeAllDone?: ReporterContextFunc | ||
beforeAllDone?: ReporterContextFunc; | ||
afterAllDone?: ReporterContextFunc | ||
afterAllDone?: ReporterContextFunc; | ||
} | ||
type ReporterOpts = { reporter: Reporter | string, options?: any } | ||
type ReporterInput = string | [Reporter | string, any?] | ReporterOpts | ||
type ReporterOpts = { reporter: Reporter | string; options?: any }; | ||
type ReporterInput = string | [Reporter | string, any?] | ReporterOpts; | ||
@@ -70,3 +70,3 @@ interface WebpackBarOptions { | ||
*/ | ||
name?: string | ||
name?: string; | ||
@@ -77,3 +77,3 @@ /** | ||
*/ | ||
color?: string | ||
color?: string; | ||
@@ -84,3 +84,3 @@ /** | ||
*/ | ||
profile?: boolean | ||
profile?: boolean; | ||
@@ -92,3 +92,3 @@ /** | ||
*/ | ||
fancy?: boolean | ||
fancy?: boolean; | ||
@@ -100,3 +100,3 @@ /** | ||
*/ | ||
basic?: boolean | ||
basic?: boolean; | ||
@@ -106,3 +106,3 @@ /** | ||
*/ | ||
reporter?: ReporterInput | ||
reporter?: ReporterInput; | ||
@@ -113,3 +113,3 @@ /** | ||
*/ | ||
reporters?: ReporterInput[] | ||
reporters?: ReporterInput[]; | ||
} | ||
@@ -134,2 +134,2 @@ | ||
export { Reporter, State, WebpackBarPlugin as default }; | ||
export { type Reporter, type State, WebpackBarPlugin as default }; |
{ | ||
"name": "webpackbar", | ||
"version": "5.0.2", | ||
"version": "6.0.0", | ||
"description": "Elegant ProgressBar and Profiler for Webpack", | ||
@@ -10,4 +10,10 @@ "repository": "unjs/webpackbar", | ||
"exports": { | ||
"import": "./dist/index.mjs", | ||
"require": "./dist/index.cjs" | ||
"import": { | ||
"types": "./dist/index.d.mts", | ||
"default": "./dist/index.mjs" | ||
}, | ||
"require": { | ||
"types": "./dist/index.d.cts", | ||
"default": "./dist/index.cjs" | ||
} | ||
}, | ||
@@ -19,32 +25,34 @@ "types": "./dist/index.d.ts", | ||
"scripts": { | ||
"build": "unbuild", | ||
"dev": "webpack --config ./playground/webpack.config.cjs", | ||
"lint": "eslint --ext .ts,.mjs", | ||
"lint": "eslint --ext .ts,.mjs . && prettier -c .", | ||
"lint:fix": "eslint --fix --ext .ts,.mjs . && prettier -w .", | ||
"prepack": "unbuild", | ||
"release": "yarn test && standard-version && npm publish && git push --follow-tags", | ||
"test": "yarn lint && mocha ./test/*.test.*" | ||
"release": "pnpm test && changelogen --release && npm publish && git push --follow-tags", | ||
"test": "pnpm lint && mocha ./test/*.test.*" | ||
}, | ||
"dependencies": { | ||
"chalk": "^4.1.0", | ||
"consola": "^2.15.3", | ||
"ansi-escapes": "^4.3.2", | ||
"chalk": "^4.1.2", | ||
"consola": "^3.2.3", | ||
"figures": "^3.2.0", | ||
"markdown-table": "^2.0.0", | ||
"pretty-time": "^1.1.0", | ||
"std-env": "^3.0.1" | ||
"std-env": "^3.6.0", | ||
"wrap-ansi": "^7.0.0" | ||
}, | ||
"devDependencies": { | ||
"markdown-table": "^3.0.1", | ||
"figures": "^4.0.0", | ||
"ansi-escapes": "^5.0.0", | ||
"wrap-ansi": "^8.0.1", | ||
"@nuxtjs/eslint-config-typescript": "latest", | ||
"@types/mocha": "^9.0.0", | ||
"@types/node": "latest", | ||
"codecov": "latest", | ||
"eslint": "latest", | ||
"jiti": "latest", | ||
"memory-fs": "latest", | ||
"mocha": "latest", | ||
"standard-version": "latest", | ||
"typescript": "latest", | ||
"unbuild": "latest", | ||
"webpack": "latest", | ||
"webpack-cli": "latest" | ||
"@types/mocha": "^10.0.6", | ||
"@types/node": "^20.10.4", | ||
"changelogen": "^0.5.5", | ||
"eslint": "^8.55.0", | ||
"eslint-config-unjs": "^0.2.1", | ||
"jiti": "^1.21.0", | ||
"memory-fs": "^0.5.0", | ||
"mocha": "^10.2.0", | ||
"prettier": "^3.1.1", | ||
"typescript": "^5.3.3", | ||
"unbuild": "^2.0.0", | ||
"webpack": "^5.89.0", | ||
"webpack-cli": "^5.1.4" | ||
}, | ||
@@ -55,4 +63,4 @@ "peerDependencies": { | ||
"engines": { | ||
"node": ">=12" | ||
"node": ">=14.21.3" | ||
} | ||
} | ||
} |
@@ -1,2 +0,1 @@ | ||
[![Standard JS][standard-js-src]][standard-js-href] | ||
[![npm version][npm-version-src]][npm-version-href] | ||
@@ -7,3 +6,2 @@ [![npm downloads][npm-downloads-src]][npm-downloads-href] | ||
<div align="center"> | ||
@@ -65,16 +63,14 @@ <!-- replace with accurate logo e.g from https://worldvectorlogo.com/ --> | ||
```js | ||
const webpack = require('webpack'); | ||
const WebpackBar = require('webpackbar'); | ||
const webpack = require("webpack"); | ||
const WebpackBar = require("webpackbar"); | ||
module.exports = { | ||
context: path.resolve(__dirname), | ||
devtool: 'source-map', | ||
entry: './entry.js', | ||
devtool: "source-map", | ||
entry: "./entry.js", | ||
output: { | ||
filename: './output.js', | ||
path: path.resolve(__dirname) | ||
filename: "./output.js", | ||
path: path.resolve(__dirname), | ||
}, | ||
plugins: [ | ||
new WebpackBar() | ||
] | ||
plugins: [new WebpackBar()], | ||
}; | ||
@@ -86,14 +82,17 @@ ``` | ||
### `name` | ||
- Default: `webpack` | ||
- Default: `webpack` | ||
Name. | ||
### `color` | ||
- Default: `green` | ||
- Default: `green` | ||
Primary color (can be HEX like `#xxyyzz` or a web color like `green`). | ||
### `profile` | ||
- Default: `false` | ||
- Default: `false` | ||
Enable profiler. | ||
@@ -103,3 +102,3 @@ | ||
- Default: `true` when not in CI or testing mode. | ||
- Default: `true` when not in CI or testing mode. | ||
@@ -110,3 +109,3 @@ Enable bars reporter. | ||
- Default: `true` when running in minimal environments. | ||
- Default: `true` when running in minimal environments. | ||
@@ -120,4 +119,5 @@ Enable a simple log reporter (only start and end). | ||
### `reporters` | ||
- Default: `[]` | ||
- Default: `[]` | ||
Register an Array of your custom reporters. (Same as `reporter` but array) | ||
@@ -167,3 +167,2 @@ | ||
**Schema of `context.state`:** | ||
@@ -173,8 +172,3 @@ | ||
{ | ||
start, | ||
progress, | ||
message, | ||
details, | ||
request, | ||
hasErrors | ||
start, progress, message, details, request, hasErrors; | ||
} | ||
@@ -185,18 +179,15 @@ ``` | ||
MIT - Made with 💖 By Nuxt.js team! | ||
[MIT](./LICENSE) | ||
<!-- Refs --> | ||
[standard-js-src]: https://flat.badgen.net/badge/code%20style/standard/green | ||
[standard-js-href]: https://standardjs.com | ||
[npm-version-src]: https://flat.badgen.net/npm/v/webpackbar/latest | ||
[npm-version-href]: https://npmjs.com/package/webpackbar | ||
[npm-downloads-src]: https://flat.badgen.net/npm/dm/webpackbar | ||
[npm-downloads-href]: https://npmjs.com/package/webpackbar | ||
[package-phobia-src]: https://flat.badgen.net/packagephobia/install/webpackbar | ||
[package-phobia-href]: https://packagephobia.now.sh/result?p=webpackbar | ||
[checks-src]: https://flat.badgen.net/github/checks/nuxt-contrib/webpackbar/master | ||
[checks-href]: https://github.com/nuxt-contrib/webpackbar/actions |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 5 instances in 1 package
13
8
2
50162
9
1345
185
+ Addedansi-escapes@^4.3.2
+ Addedfigures@^3.2.0
+ Addedmarkdown-table@^2.0.0
+ Addedwrap-ansi@^7.0.0
+ Addedansi-escapes@4.3.2(transitive)
+ Addedansi-regex@5.0.1(transitive)
+ Addedcaniuse-lite@1.0.30001620(transitive)
+ Addedconsola@3.2.3(transitive)
+ Addedelectron-to-chromium@1.4.773(transitive)
+ Addedemoji-regex@8.0.0(transitive)
+ Addedescalade@3.1.2(transitive)
+ Addedescape-string-regexp@1.0.5(transitive)
+ Addedfigures@3.2.0(transitive)
+ Addedis-fullwidth-code-point@3.0.0(transitive)
+ Addedmarkdown-table@2.0.0(transitive)
+ Addedpicocolors@1.0.1(transitive)
+ Addedrepeat-string@1.6.1(transitive)
+ Addedstring-width@4.2.3(transitive)
+ Addedstrip-ansi@6.0.1(transitive)
+ Addedtype-fest@0.21.3(transitive)
+ Addedwrap-ansi@7.0.0(transitive)
- Removedcaniuse-lite@1.0.30001618(transitive)
- Removedconsola@2.15.3(transitive)
- Removedelectron-to-chromium@1.4.763(transitive)
Updatedchalk@^4.1.2
Updatedconsola@^3.2.3
Updatedstd-env@^3.6.0