diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 2a6f25b..aa2aae9 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -15,7 +15,7 @@ jobs: strategy: matrix: - node-version: [18.x, 20.x] + node-version: ['>=20.12.0', 22.x] # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ steps: diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 0a6f8a1..738fbc1 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -14,7 +14,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: 20 + node-version: 22 registry-url: https://registry.npmjs.org/ - run: npm ci - run: npm run build diff --git a/.mocharc.cjs b/.mocharc.cjs index 5539a8c..0039045 100644 --- a/.mocharc.cjs +++ b/.mocharc.cjs @@ -2,6 +2,7 @@ module.exports = { require: 'tsx', spec: ['**/*.spec.ts'], + ignore: ['node_modules/**/*'], watchFiles: ['src', 'test'], watchIgnore: ['test/fixtures'] }; diff --git a/README.md b/README.md index 4cd19ad..d6f3171 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,17 @@ -[npm-img]: https://img.shields.io/npm/v/rollup-plugin-output-size.svg -[npm-url]: https://www.npmjs.com/package/rollup-plugin-output-size -[ci-img]: https://github.com/Arnesfield/rollup-plugin-output-size/workflows/Node.js%20CI/badge.svg -[ci-url]: https://github.com/Arnesfield/rollup-plugin-output-size/actions?query=workflow%3A"Node.js+CI" -[preview-img]: https://gist.githubusercontent.com/Arnesfield/0f85b2ddfa1109aec6ed2ec46ee42b03/raw/7cc3b49fc8496cc71db41a0f273871636520a611/preview.png - # rollup-plugin-output-size [![npm][npm-img]][npm-url] [![Node.js CI][ci-img]][ci-url] +[npm-img]: https://img.shields.io/npm/v/rollup-plugin-output-size.svg +[npm-url]: https://www.npmjs.com/package/rollup-plugin-output-size +[ci-img]: https://github.com/Arnesfield/rollup-plugin-output-size/workflows/Node.js%20CI/badge.svg +[ci-url]: https://github.com/Arnesfield/rollup-plugin-output-size/actions?query=workflow%3A"Node.js+CI" +[preview-img]: https://gist.githubusercontent.com/Arnesfield/0f85b2ddfa1109aec6ed2ec46ee42b03/raw/916870f919fea8c8c61dfaf10afb32f892583111/preview.png + A Rollup plugin that displays output bundle sizes. -> This project was inspired by [rollup-plugin-bundle-size](https://github.com/vimeo/rollup-plugin-bundle-size). +> This project was inspired by [rollup-plugin-bundle-size](https://www.npmjs.com/package/rollup-plugin-bundle-size). ![rollup-plugin-output-size example output][preview-img] @@ -49,14 +49,14 @@ You can change and override the behavior of this plugin through its options. Not ### bytes -Type: `boolean`
+Type: `boolean`\ Default: `false` Displays the size in bytes for both the output info and [`summary`](#summary) output (e.g. `4,096 B` instead of `4.1 kB`). ### hide -Type: `boolean | OutputType[]`
+Type: `boolean | OutputType[]`\ Default: `false` Disables output types display. @@ -65,13 +65,13 @@ Set to `true` to disable output for all output types, or set an array to specify Output types are: `asset`, `chunk`, and `entry`. -> Note: Both `chunk` and `entry` output types are `OutputChunk`s but `entry` chunks have `isEntry` values of `true`. +Both `chunk` and `entry` output types are `OutputChunk`s but `entry` chunks have `isEntry` values of `true`. -This option does not affect [`summary`](#summary) output. +This option does not affect the [`summary`](#summary) output. ### gzip -Type: `boolean | OutputType[]`
+Type: `boolean | OutputType[]`\ Default: `true` Gets gzipped sizes of output. @@ -80,17 +80,17 @@ Set to `false` to skip getting gzipped size, or set an array to only get gzipped ### silent -Type: `boolean`
+Type: `boolean`\ Default: `false` Disables output. This will also skip the [`handle`](#handle) and [`summary`](#summary) callbacks. ### summary -Type: `boolean | 'always' | SummaryCallback`
+Type: `boolean | 'always' | SummaryCallback`\ Default: `true` -Displays summary output. +Displays the summary output. - Set to `false` to disable summary output. - Set to `'always'` to force summary output even if there is only one (1) output. diff --git a/eslint.config.mjs b/eslint.config.mjs index 7060ae1..9586471 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -2,6 +2,7 @@ import eslint from '@eslint/js'; // @ts-expect-error: package has no type declarations import pluginChaiFriendly from 'eslint-plugin-chai-friendly'; +import jsdoc from 'eslint-plugin-jsdoc'; import globals from 'globals'; import tseslint from 'typescript-eslint'; @@ -37,6 +38,7 @@ export default tseslint.config( eqeqeq: ['warn', 'always', { null: 'ignore' }], 'no-constant-condition': 'warn', 'no-empty': 'warn', + 'no-lonely-if': 'warn', 'no-throw-literal': 'warn', 'no-unused-expressions': 'off', // use typescript-eslint 'no-unused-private-class-members': 'warn', @@ -50,6 +52,11 @@ export default tseslint.config( semi: 'warn' } }, + { + // for imported types used only in jsdoc comments + plugins: { jsdoc }, + rules: { 'jsdoc/no-undefined-types': ['warn', { disableReporting: true }] } + }, { // for tests only, override no-unused-expressions files: ['**/*.spec.ts'], diff --git a/package-lock.json b/package-lock.json index 4265b83..e81e348 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,49 +1,43 @@ { "name": "rollup-plugin-output-size", - "version": "1.6.1", + "version": "2.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "rollup-plugin-output-size", - "version": "1.6.1", + "version": "2.0.0", "license": "MIT", - "dependencies": { - "colorette": "^2.0.20", - "pretty-bytes": "^6.1.1" - }, "devDependencies": { - "@eslint/js": "^9.25.0", - "@rollup/plugin-commonjs": "^28.0.3", + "@eslint/js": "^9.28.0", "@rollup/plugin-eslint": "^9.0.5", - "@rollup/plugin-node-resolve": "^16.0.1", "@rollup/plugin-typescript": "^12.1.2", - "@types/chai": "^5.2.1", + "@types/chai": "^5.2.2", "@types/mocha": "^10.0.10", - "@types/node": "^22.14.1", - "@types/rimraf": "^4.0.5", + "@types/node": "^22.15.29", "@types/sinon": "^17.0.4", "chai": "^5.2.0", "concurrently": "^9.1.2", - "eslint": "^9.25.0", + "eslint": "^9.28.0", "eslint-plugin-chai-friendly": "^1.0.1", - "globals": "^16.0.0", + "eslint-plugin-jsdoc": "^50.6.17", + "globals": "^16.2.0", "mocha": "^11.1.0", "prettier": "^3.5.3", + "pretty-bytes": "^7.0.0", "rimraf": "^6.0.1", - "rollup": "^4.40.0", + "rollup": "^4.41.1", "rollup-plugin-cleanup": "^3.2.1", "rollup-plugin-dts": "^6.2.1", "rollup-plugin-esbuild": "^6.2.1", "rollup-plugin-node-externals": "^8.0.0", "sinon": "^20.0.0", - "strip-ansi": "^7.1.0", - "tsx": "^4.19.3", + "tsx": "^4.19.4", "typescript": "^5.8.3", - "typescript-eslint": "^8.30.1" + "typescript-eslint": "^8.33.0" }, "engines": { - "node": ">=14.16.0" + "node": ">=20.12.0" }, "peerDependencies": { "rollup": "^2.0.0 || ^3.0.0 || ^4.0.0" @@ -90,6 +84,23 @@ "node": ">=6.9.0" } }, + "node_modules/@es-joy/jsdoccomment": { + "version": "0.50.2", + "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.50.2.tgz", + "integrity": "sha512-YAdE/IJSpwbOTiaURNCKECdAwqrJuFiZhylmesBcIRawtYKnBR2wxPhoIewMg+Yu+QuYvHfJNReWpoxGBKOChA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.6", + "@typescript-eslint/types": "^8.11.0", + "comment-parser": "1.4.1", + "esquery": "^1.6.0", + "jsdoc-type-pratt-parser": "~4.1.0" + }, + "engines": { + "node": ">=18" + } + }, "node_modules/@esbuild/aix-ppc64": { "version": "0.25.2", "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.2.tgz", @@ -516,16 +527,20 @@ } }, "node_modules/@eslint-community/eslint-utils": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", - "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.7.0.tgz", + "integrity": "sha512-dyybb3AcajC7uha6CvhdVRJqaKyn7w2YKqKyAN37NKYgZT36w+iRb0Dymmc5qEJ549c/S31cMMSFd75bteCpCw==", "dev": true, + "license": "MIT", "dependencies": { - "eslint-visitor-keys": "^3.3.0" + "eslint-visitor-keys": "^3.4.3" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, + "funding": { + "url": "https://opencollective.com/eslint" + }, "peerDependencies": { "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" } @@ -566,9 +581,9 @@ } }, "node_modules/@eslint/core": { - "version": "0.13.0", - "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.13.0.tgz", - "integrity": "sha512-yfkgDw1KR66rkT5A8ci4irzDysN7FRpq3ttJolR88OqQikAWqwA8j5VZyas+vjyBNFIJ7MfybJ9plMILI2UrCw==", + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.14.0.tgz", + "integrity": "sha512-qIbV0/JZr7iSDjqAc60IqbLdsj9GDt16xQtWD+B78d/HAlvysGdZZ6rpJHGAc2T0FQx1X6thsSPdnoiGKdNtdg==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -616,13 +631,16 @@ } }, "node_modules/@eslint/js": { - "version": "9.25.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.25.0.tgz", - "integrity": "sha512-iWhsUS8Wgxz9AXNfvfOPFSW4VfMXdVhp1hjkZVhXCrpgh/aLcc45rX6MPu+tIVUWDw0HfNwth7O28M1xDxNf9w==", + "version": "9.28.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.28.0.tgz", + "integrity": "sha512-fnqSjGWd/CoIp4EXIxWVK/sHA6DOHN4+8Ix2cX5ycOY7LG0UY8nHCU5pIp2eaE1Mc7Qd8kHspYNzYXT2ojPLzg==", "dev": true, "license": "MIT", "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" } }, "node_modules/@eslint/object-schema": { @@ -636,13 +654,13 @@ } }, "node_modules/@eslint/plugin-kit": { - "version": "0.2.8", - "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.8.tgz", - "integrity": "sha512-ZAoA40rNMPwSm+AeHpCq8STiNAwzWLJuP8Xv4CHIc9wv/PSuExjMrmjfYNj682vW0OOiZ1HKxzvjQr9XZIisQA==", + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.3.1.tgz", + "integrity": "sha512-0J+zgWxHN+xXONWIyPWKFMgVuJoZuGiIFu8yxk7RJjxkzpGmyja5wRFqZIVtjDVOQpV+Rw0iOAjYPE2eQyjr0w==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@eslint/core": "^0.13.0", + "@eslint/core": "^0.14.0", "levn": "^0.4.1" }, "engines": { @@ -844,33 +862,6 @@ "node": ">=14" } }, - "node_modules/@rollup/plugin-commonjs": { - "version": "28.0.3", - "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-28.0.3.tgz", - "integrity": "sha512-pyltgilam1QPdn+Zd9gaCfOLcnjMEJ9gV+bTw6/r73INdvzf1ah9zLIJBm+kW7R6IUFIQ1YO+VqZtYxZNWFPEQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@rollup/pluginutils": "^5.0.1", - "commondir": "^1.0.1", - "estree-walker": "^2.0.2", - "fdir": "^6.2.0", - "is-reference": "1.2.1", - "magic-string": "^0.30.3", - "picomatch": "^4.0.2" - }, - "engines": { - "node": ">=16.0.0 || 14 >= 14.17" - }, - "peerDependencies": { - "rollup": "^2.68.0||^3.0.0||^4.0.0" - }, - "peerDependenciesMeta": { - "rollup": { - "optional": true - } - } - }, "node_modules/@rollup/plugin-eslint": { "version": "9.0.5", "resolved": "https://registry.npmjs.org/@rollup/plugin-eslint/-/plugin-eslint-9.0.5.tgz", @@ -892,31 +883,6 @@ } } }, - "node_modules/@rollup/plugin-node-resolve": { - "version": "16.0.1", - "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-16.0.1.tgz", - "integrity": "sha512-tk5YCxJWIG81umIvNkSod2qK5KyQW19qcBF/B78n1bjtOON6gzKoVeSzAE8yHCZEDmqkHKkxplExA8KzdJLJpA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@rollup/pluginutils": "^5.0.1", - "@types/resolve": "1.20.2", - "deepmerge": "^4.2.2", - "is-module": "^1.0.0", - "resolve": "^1.22.1" - }, - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "rollup": "^2.78.0||^3.0.0||^4.0.0" - }, - "peerDependenciesMeta": { - "rollup": { - "optional": true - } - } - }, "node_modules/@rollup/plugin-typescript": { "version": "12.1.2", "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-12.1.2.tgz", @@ -980,9 +946,9 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.40.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.40.0.tgz", - "integrity": "sha512-+Fbls/diZ0RDerhE8kyC6hjADCXA1K4yVNlH0EYfd2XjyH0UGgzaQ8MlT0pCXAThfxv3QUAczHaL+qSv1E4/Cg==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.41.1.tgz", + "integrity": "sha512-NELNvyEWZ6R9QMkiytB4/L4zSEaBC03KIXEghptLGLZWJ6VPrL63ooZQCOnlx36aQPGhzuOMwDerC1Eb2VmrLw==", "cpu": [ "arm" ], @@ -994,9 +960,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.40.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.40.0.tgz", - "integrity": "sha512-PPA6aEEsTPRz+/4xxAmaoWDqh67N7wFbgFUJGMnanCFs0TV99M0M8QhhaSCks+n6EbQoFvLQgYOGXxlMGQe/6w==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.41.1.tgz", + "integrity": "sha512-DXdQe1BJ6TK47ukAoZLehRHhfKnKg9BjnQYUu9gzhI8Mwa1d2fzxA1aw2JixHVl403bwp1+/o/NhhHtxWJBgEA==", "cpu": [ "arm64" ], @@ -1008,9 +974,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.40.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.40.0.tgz", - "integrity": "sha512-GwYOcOakYHdfnjjKwqpTGgn5a6cUX7+Ra2HeNj/GdXvO2VJOOXCiYYlRFU4CubFM67EhbmzLOmACKEfvp3J1kQ==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.41.1.tgz", + "integrity": "sha512-5afxvwszzdulsU2w8JKWwY8/sJOLPzf0e1bFuvcW5h9zsEg+RQAojdW0ux2zyYAz7R8HvvzKCjLNJhVq965U7w==", "cpu": [ "arm64" ], @@ -1022,9 +988,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.40.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.40.0.tgz", - "integrity": "sha512-CoLEGJ+2eheqD9KBSxmma6ld01czS52Iw0e2qMZNpPDlf7Z9mj8xmMemxEucinev4LgHalDPczMyxzbq+Q+EtA==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.41.1.tgz", + "integrity": "sha512-egpJACny8QOdHNNMZKf8xY0Is6gIMz+tuqXlusxquWu3F833DcMwmGM7WlvCO9sB3OsPjdC4U0wHw5FabzCGZg==", "cpu": [ "x64" ], @@ -1036,9 +1002,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.40.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.40.0.tgz", - "integrity": "sha512-r7yGiS4HN/kibvESzmrOB/PxKMhPTlz+FcGvoUIKYoTyGd5toHp48g1uZy1o1xQvybwwpqpe010JrcGG2s5nkg==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.41.1.tgz", + "integrity": "sha512-DBVMZH5vbjgRk3r0OzgjS38z+atlupJ7xfKIDJdZZL6sM6wjfDNo64aowcLPKIx7LMQi8vybB56uh1Ftck/Atg==", "cpu": [ "arm64" ], @@ -1050,9 +1016,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.40.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.40.0.tgz", - "integrity": "sha512-mVDxzlf0oLzV3oZOr0SMJ0lSDd3xC4CmnWJ8Val8isp9jRGl5Dq//LLDSPFrasS7pSm6m5xAcKaw3sHXhBjoRw==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.41.1.tgz", + "integrity": "sha512-3FkydeohozEskBxNWEIbPfOE0aqQgB6ttTkJ159uWOFn42VLyfAiyD9UK5mhu+ItWzft60DycIN1Xdgiy8o/SA==", "cpu": [ "x64" ], @@ -1064,9 +1030,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.40.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.40.0.tgz", - "integrity": "sha512-y/qUMOpJxBMy8xCXD++jeu8t7kzjlOCkoxxajL58G62PJGBZVl/Gwpm7JK9+YvlB701rcQTzjUZ1JgUoPTnoQA==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.41.1.tgz", + "integrity": "sha512-wC53ZNDgt0pqx5xCAgNunkTzFE8GTgdZ9EwYGVcg+jEjJdZGtq9xPjDnFgfFozQI/Xm1mh+D9YlYtl+ueswNEg==", "cpu": [ "arm" ], @@ -1078,9 +1044,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.40.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.40.0.tgz", - "integrity": "sha512-GoCsPibtVdJFPv/BOIvBKO/XmwZLwaNWdyD8TKlXuqp0veo2sHE+A/vpMQ5iSArRUz/uaoj4h5S6Pn0+PdhRjg==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.41.1.tgz", + "integrity": "sha512-jwKCca1gbZkZLhLRtsrka5N8sFAaxrGz/7wRJ8Wwvq3jug7toO21vWlViihG85ei7uJTpzbXZRcORotE+xyrLA==", "cpu": [ "arm" ], @@ -1092,9 +1058,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.40.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.40.0.tgz", - "integrity": "sha512-L5ZLphTjjAD9leJzSLI7rr8fNqJMlGDKlazW2tX4IUF9P7R5TMQPElpH82Q7eNIDQnQlAyiNVfRPfP2vM5Avvg==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.41.1.tgz", + "integrity": "sha512-g0UBcNknsmmNQ8V2d/zD2P7WWfJKU0F1nu0k5pW4rvdb+BIqMm8ToluW/eeRmxCared5dD76lS04uL4UaNgpNA==", "cpu": [ "arm64" ], @@ -1106,9 +1072,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.40.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.40.0.tgz", - "integrity": "sha512-ATZvCRGCDtv1Y4gpDIXsS+wfFeFuLwVxyUBSLawjgXK2tRE6fnsQEkE4csQQYWlBlsFztRzCnBvWVfcae/1qxQ==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.41.1.tgz", + "integrity": "sha512-XZpeGB5TKEZWzIrj7sXr+BEaSgo/ma/kCgrZgL0oo5qdB1JlTzIYQKel/RmhT6vMAvOdM2teYlAaOGJpJ9lahg==", "cpu": [ "arm64" ], @@ -1120,9 +1086,9 @@ ] }, "node_modules/@rollup/rollup-linux-loongarch64-gnu": { - "version": "4.40.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.40.0.tgz", - "integrity": "sha512-wG9e2XtIhd++QugU5MD9i7OnpaVb08ji3P1y/hNbxrQ3sYEelKJOq1UJ5dXczeo6Hj2rfDEL5GdtkMSVLa/AOg==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.41.1.tgz", + "integrity": "sha512-bkCfDJ4qzWfFRCNt5RVV4DOw6KEgFTUZi2r2RuYhGWC8WhCA8lCAJhDeAmrM/fdiAH54m0mA0Vk2FGRPyzI+tw==", "cpu": [ "loong64" ], @@ -1134,9 +1100,9 @@ ] }, "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.40.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.40.0.tgz", - "integrity": "sha512-vgXfWmj0f3jAUvC7TZSU/m/cOE558ILWDzS7jBhiCAFpY2WEBn5jqgbqvmzlMjtp8KlLcBlXVD2mkTSEQE6Ixw==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.41.1.tgz", + "integrity": "sha512-3mr3Xm+gvMX+/8EKogIZSIEF0WUu0HL9di+YWlJpO8CQBnoLAEL/roTCxuLncEdgcfJcvA4UMOf+2dnjl4Ut1A==", "cpu": [ "ppc64" ], @@ -1148,9 +1114,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.40.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.40.0.tgz", - "integrity": "sha512-uJkYTugqtPZBS3Z136arevt/FsKTF/J9dEMTX/cwR7lsAW4bShzI2R0pJVw+hcBTWF4dxVckYh72Hk3/hWNKvA==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.41.1.tgz", + "integrity": "sha512-3rwCIh6MQ1LGrvKJitQjZFuQnT2wxfU+ivhNBzmxXTXPllewOF7JR1s2vMX/tWtUYFgphygxjqMl76q4aMotGw==", "cpu": [ "riscv64" ], @@ -1162,9 +1128,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-musl": { - "version": "4.40.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.40.0.tgz", - "integrity": "sha512-rKmSj6EXQRnhSkE22+WvrqOqRtk733x3p5sWpZilhmjnkHkpeCgWsFFo0dGnUGeA+OZjRl3+VYq+HyCOEuwcxQ==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.41.1.tgz", + "integrity": "sha512-LdIUOb3gvfmpkgFZuccNa2uYiqtgZAz3PTzjuM5bH3nvuy9ty6RGc/Q0+HDFrHrizJGVpjnTZ1yS5TNNjFlklw==", "cpu": [ "riscv64" ], @@ -1176,9 +1142,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.40.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.40.0.tgz", - "integrity": "sha512-SpnYlAfKPOoVsQqmTFJ0usx0z84bzGOS9anAC0AZ3rdSo3snecihbhFTlJZ8XMwzqAcodjFU4+/SM311dqE5Sw==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.41.1.tgz", + "integrity": "sha512-oIE6M8WC9ma6xYqjvPhzZYk6NbobIURvP/lEbh7FWplcMO6gn7MM2yHKA1eC/GvYwzNKK/1LYgqzdkZ8YFxR8g==", "cpu": [ "s390x" ], @@ -1190,9 +1156,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.40.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.40.0.tgz", - "integrity": "sha512-RcDGMtqF9EFN8i2RYN2W+64CdHruJ5rPqrlYw+cgM3uOVPSsnAQps7cpjXe9be/yDp8UC7VLoCoKC8J3Kn2FkQ==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.41.1.tgz", + "integrity": "sha512-cWBOvayNvA+SyeQMp79BHPK8ws6sHSsYnK5zDcsC3Hsxr1dgTABKjMnMslPq1DvZIp6uO7kIWhiGwaTdR4Og9A==", "cpu": [ "x64" ], @@ -1204,9 +1170,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.40.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.40.0.tgz", - "integrity": "sha512-HZvjpiUmSNx5zFgwtQAV1GaGazT2RWvqeDi0hV+AtC8unqqDSsaFjPxfsO6qPtKRRg25SisACWnJ37Yio8ttaw==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.41.1.tgz", + "integrity": "sha512-y5CbN44M+pUCdGDlZFzGGBSKCA4A/J2ZH4edTYSSxFg7ce1Xt3GtydbVKWLlzL+INfFIZAEg1ZV6hh9+QQf9YQ==", "cpu": [ "x64" ], @@ -1218,9 +1184,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.40.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.40.0.tgz", - "integrity": "sha512-UtZQQI5k/b8d7d3i9AZmA/t+Q4tk3hOC0tMOMSq2GlMYOfxbesxG4mJSeDp0EHs30N9bsfwUvs3zF4v/RzOeTQ==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.41.1.tgz", + "integrity": "sha512-lZkCxIrjlJlMt1dLO/FbpZbzt6J/A8p4DnqzSa4PWqPEUUUnzXLeki/iyPLfV0BmHItlYgHUqJe+3KiyydmiNQ==", "cpu": [ "arm64" ], @@ -1232,9 +1198,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.40.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.40.0.tgz", - "integrity": "sha512-+m03kvI2f5syIqHXCZLPVYplP8pQch9JHyXKZ3AGMKlg8dCyr2PKHjwRLiW53LTrN/Nc3EqHOKxUxzoSPdKddA==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.41.1.tgz", + "integrity": "sha512-+psFT9+pIh2iuGsxFYYa/LhS5MFKmuivRsx9iPJWNSGbh2XVEjk90fmpUEjCnILPEPJnikAU6SFDiEUyOv90Pg==", "cpu": [ "ia32" ], @@ -1246,9 +1212,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.40.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.40.0.tgz", - "integrity": "sha512-lpPE1cLfP5oPzVjKMx10pgBmKELQnFJXHgvtHCtuJWOv8MxqdEIMNtgHgBFf7Ea2/7EuVwa9fodWUfXAlXZLZQ==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.41.1.tgz", + "integrity": "sha512-Wq2zpapRYLfi4aKxf2Xff0tN+7slj2d4R87WEzqw7ZLsVvO5zwYCIuEGSZYiK41+GlwUo1HiR+GdkLEJnCKTCw==", "cpu": [ "x64" ], @@ -1302,9 +1268,9 @@ } }, "node_modules/@types/chai": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.1.tgz", - "integrity": "sha512-iu1JLYmGmITRzUgNiLMZD3WCoFzpYtueuyAgHTXqgwSRAMIlFTnZqG6/xenkpUGRJEzSfklUTI4GNSzks/dc0w==", + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.2.tgz", + "integrity": "sha512-8kB30R7Hwqf40JPiKhVzodJs2Qc1ZJ5zuT3uzw5Hq/dhNCl3G3l83jfpdI1e20BP348+fV7VIL/+FxaXkqBmWg==", "dev": true, "license": "MIT", "dependencies": { @@ -1340,32 +1306,15 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "22.14.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.14.1.tgz", - "integrity": "sha512-u0HuPQwe/dHrItgHHpmw3N2fYCR6x4ivMNbPHRkBVP4CvN+kiRrKHWk3i8tXiO/joPwXLMYvF9TTF0eqgHIuOw==", + "version": "22.15.29", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.29.tgz", + "integrity": "sha512-LNdjOkUDlU1RZb8e1kOIUpN1qQUlzGkEtbVNo53vbrwDg5om6oduhm4SiUaPW5ASTXhAiP0jInWG8Qx9fVlOeQ==", "dev": true, "license": "MIT", "dependencies": { "undici-types": "~6.21.0" } }, - "node_modules/@types/resolve": { - "version": "1.20.2", - "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.20.2.tgz", - "integrity": "sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==", - "dev": true - }, - "node_modules/@types/rimraf": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/@types/rimraf/-/rimraf-4.0.5.tgz", - "integrity": "sha512-DTCZoIQotB2SUJnYgrEx43cQIUYOlNZz0AZPbKU4PSLYTUdML5Gox0++z4F9kQocxStrCmRNhi4x5x/UlwtKUA==", - "deprecated": "This is a stub types definition. rimraf provides its own type definitions, so you do not need this installed.", - "dev": true, - "license": "MIT", - "dependencies": { - "rimraf": "*" - } - }, "node_modules/@types/sinon": { "version": "17.0.4", "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-17.0.4.tgz", @@ -1383,21 +1332,21 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.30.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.30.1.tgz", - "integrity": "sha512-v+VWphxMjn+1t48/jO4t950D6KR8JaJuNXzi33Ve6P8sEmPr5k6CEXjdGwT6+LodVnEa91EQCtwjWNUCPweo+Q==", + "version": "8.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.33.0.tgz", + "integrity": "sha512-CACyQuqSHt7ma3Ns601xykeBK/rDeZa3w6IS6UtMQbixO5DWy+8TilKkviGDH6jtWCo8FGRKEK5cLLkPvEammQ==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.30.1", - "@typescript-eslint/type-utils": "8.30.1", - "@typescript-eslint/utils": "8.30.1", - "@typescript-eslint/visitor-keys": "8.30.1", + "@typescript-eslint/scope-manager": "8.33.0", + "@typescript-eslint/type-utils": "8.33.0", + "@typescript-eslint/utils": "8.33.0", + "@typescript-eslint/visitor-keys": "8.33.0", "graphemer": "^1.4.0", - "ignore": "^5.3.1", + "ignore": "^7.0.0", "natural-compare": "^1.4.0", - "ts-api-utils": "^2.0.1" + "ts-api-utils": "^2.1.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1407,22 +1356,32 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^8.0.0 || ^8.0.0-alpha.0", + "@typescript-eslint/parser": "^8.33.0", "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <5.9.0" } }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.4.tgz", + "integrity": "sha512-gJzzk+PQNznz8ysRrC0aOkBNVRBDtE1n53IqyqEf3PXrYwomFs5q4pGMizBMJF+ykh03insJ27hB8gSrD2Hn8A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, "node_modules/@typescript-eslint/parser": { - "version": "8.30.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.30.1.tgz", - "integrity": "sha512-H+vqmWwT5xoNrXqWs/fesmssOW70gxFlgcMlYcBaWNPIEWDgLa4W9nkSPmhuOgLnXq9QYgkZ31fhDyLhleCsAg==", + "version": "8.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.33.0.tgz", + "integrity": "sha512-JaehZvf6m0yqYp34+RVnihBAChkqeH+tqqhS0GuX1qgPpwLvmTPheKEs6OeCK6hVJgXZHJ2vbjnC9j119auStQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/scope-manager": "8.30.1", - "@typescript-eslint/types": "8.30.1", - "@typescript-eslint/typescript-estree": "8.30.1", - "@typescript-eslint/visitor-keys": "8.30.1", + "@typescript-eslint/scope-manager": "8.33.0", + "@typescript-eslint/types": "8.33.0", + "@typescript-eslint/typescript-estree": "8.33.0", + "@typescript-eslint/visitor-keys": "8.33.0", "debug": "^4.3.4" }, "engines": { @@ -1437,15 +1396,34 @@ "typescript": ">=4.8.4 <5.9.0" } }, + "node_modules/@typescript-eslint/project-service": { + "version": "8.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.33.0.tgz", + "integrity": "sha512-d1hz0u9l6N+u/gcrk6s6gYdl7/+pp8yHheRTqP6X5hVDKALEaTn8WfGiit7G511yueBEL3OpOEpD+3/MBdoN+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/tsconfig-utils": "^8.33.0", + "@typescript-eslint/types": "^8.33.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.30.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.30.1.tgz", - "integrity": "sha512-+C0B6ChFXZkuaNDl73FJxRYT0G7ufVPOSQkqkpM/U198wUwUFOtgo1k/QzFh1KjpBitaK7R1tgjVz6o9HmsRPg==", + "version": "8.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.33.0.tgz", + "integrity": "sha512-LMi/oqrzpqxyO72ltP+dBSP6V0xiUb4saY7WLtxSfiNEBI8m321LLVFU9/QDJxjDQG9/tjSqKz/E3380TEqSTw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.30.1", - "@typescript-eslint/visitor-keys": "8.30.1" + "@typescript-eslint/types": "8.33.0", + "@typescript-eslint/visitor-keys": "8.33.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1455,17 +1433,34 @@ "url": "https://opencollective.com/typescript-eslint" } }, + "node_modules/@typescript-eslint/tsconfig-utils": { + "version": "8.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.33.0.tgz", + "integrity": "sha512-sTkETlbqhEoiFmGr1gsdq5HyVbSOF0145SYDJ/EQmXHtKViCaGvnyLqWFFHtEXoS0J1yU8Wyou2UGmgW88fEug==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <5.9.0" + } + }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.30.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.30.1.tgz", - "integrity": "sha512-64uBF76bfQiJyHgZISC7vcNz3adqQKIccVoKubyQcOnNcdJBvYOILV1v22Qhsw3tw3VQu5ll8ND6hycgAR5fEA==", + "version": "8.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.33.0.tgz", + "integrity": "sha512-lScnHNCBqL1QayuSrWeqAL5GmqNdVUQAAMTaCwdYEdWfIrSrOGzyLGRCHXcCixa5NK6i5l0AfSO2oBSjCjf4XQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/typescript-estree": "8.30.1", - "@typescript-eslint/utils": "8.30.1", + "@typescript-eslint/typescript-estree": "8.33.0", + "@typescript-eslint/utils": "8.33.0", "debug": "^4.3.4", - "ts-api-utils": "^2.0.1" + "ts-api-utils": "^2.1.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1480,9 +1475,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "8.30.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.30.1.tgz", - "integrity": "sha512-81KawPfkuulyWo5QdyG/LOKbspyyiW+p4vpn4bYO7DM/hZImlVnFwrpCTnmNMOt8CvLRr5ojI9nU1Ekpw4RcEw==", + "version": "8.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.33.0.tgz", + "integrity": "sha512-DKuXOKpM5IDT1FA2g9x9x1Ug81YuKrzf4mYX8FAVSNu5Wo/LELHWQyM1pQaDkI42bX15PWl0vNPt1uGiIFUOpg==", "dev": true, "license": "MIT", "engines": { @@ -1494,20 +1489,22 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.30.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.30.1.tgz", - "integrity": "sha512-kQQnxymiUy9tTb1F2uep9W6aBiYODgq5EMSk6Nxh4Z+BDUoYUSa029ISs5zTzKBFnexQEh71KqwjKnRz58lusQ==", + "version": "8.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.33.0.tgz", + "integrity": "sha512-vegY4FQoB6jL97Tu/lWRsAiUUp8qJTqzAmENH2k59SJhw0Th1oszb9Idq/FyyONLuNqT1OADJPXfyUNOR8SzAQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.30.1", - "@typescript-eslint/visitor-keys": "8.30.1", + "@typescript-eslint/project-service": "8.33.0", + "@typescript-eslint/tsconfig-utils": "8.33.0", + "@typescript-eslint/types": "8.33.0", + "@typescript-eslint/visitor-keys": "8.33.0", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", "minimatch": "^9.0.4", "semver": "^7.6.0", - "ts-api-utils": "^2.0.1" + "ts-api-utils": "^2.1.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1547,16 +1544,16 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.30.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.30.1.tgz", - "integrity": "sha512-T/8q4R9En2tcEsWPQgB5BQ0XJVOtfARcUvOa8yJP3fh9M/mXraLxZrkCfGb6ChrO/V3W+Xbd04RacUEqk1CFEQ==", + "version": "8.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.33.0.tgz", + "integrity": "sha512-lPFuQaLA9aSNa7D5u2EpRiqdAUhzShwGg/nhpBlc4GR6kcTABttCuyjFs8BcEZ8VWrjCBof/bePhP3Q3fS+Yrw==", "dev": true, "license": "MIT", "dependencies": { - "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.30.1", - "@typescript-eslint/types": "8.30.1", - "@typescript-eslint/typescript-estree": "8.30.1" + "@eslint-community/eslint-utils": "^4.7.0", + "@typescript-eslint/scope-manager": "8.33.0", + "@typescript-eslint/types": "8.33.0", + "@typescript-eslint/typescript-estree": "8.33.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1571,13 +1568,13 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.30.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.30.1.tgz", - "integrity": "sha512-aEhgas7aJ6vZnNFC7K4/vMGDGyOiqWcYZPpIWrTKuTAlsvDNKy2GFDqh9smL+iq069ZvR0YzEeq0B8NJlLzjFA==", + "version": "8.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.33.0.tgz", + "integrity": "sha512-7RW7CMYoskiz5OOGAWjJFxgb7c5UNjTG292gYhWeOAcFmYCtVCSqjqSBj5zMhxbXo2JOW95YYrUWJfU0zrpaGQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.30.1", + "@typescript-eslint/types": "8.33.0", "eslint-visitor-keys": "^4.2.0" }, "engines": { @@ -1704,6 +1701,16 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/are-docs-informative": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/are-docs-informative/-/are-docs-informative-0.0.2.tgz", + "integrity": "sha512-ixiS0nLNNG5jNQzgZJNoUpBKdo9yTYZMGJ+QgT2jmjR7G7+QHRCc4v6LQ3NgE7EBJq+o0ams3waJwkrlBom8Ig==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14" + } + }, "node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", @@ -1933,16 +1940,15 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, - "node_modules/colorette": { - "version": "2.0.20", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", - "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==" - }, - "node_modules/commondir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", - "dev": true + "node_modules/comment-parser": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.4.1.tgz", + "integrity": "sha512-buhp5kePrmda3vhc5B9t7pUQXAb2Tnd0qgpkIhPhkHXxJpiPJ11H0ZEU0oBpJ2QztSbzG/ZxMj/CHsYJqRHmyg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 12.0.0" + } }, "node_modules/concat-map": { "version": "0.0.1", @@ -2037,15 +2043,6 @@ "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, - "node_modules/deepmerge": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", - "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/diff": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", @@ -2139,9 +2136,9 @@ } }, "node_modules/eslint": { - "version": "9.25.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.25.0.tgz", - "integrity": "sha512-MsBdObhM4cEwkzCiraDv7A6txFXEqtNXOb877TsSp2FCkBNl8JfVQrmiuDqC1IkejT6JLPzYBXx/xAiYhyzgGA==", + "version": "9.28.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.28.0.tgz", + "integrity": "sha512-ocgh41VhRlf9+fVpe7QKzwLj9c92fDiqOj8Y3Sd4/ZmVA4Btx4PlUYPq4pp9JDyupkf1upbEXecxL2mwNV7jPQ==", "dev": true, "license": "MIT", "dependencies": { @@ -2149,10 +2146,10 @@ "@eslint-community/regexpp": "^4.12.1", "@eslint/config-array": "^0.20.0", "@eslint/config-helpers": "^0.2.1", - "@eslint/core": "^0.13.0", + "@eslint/core": "^0.14.0", "@eslint/eslintrc": "^3.3.1", - "@eslint/js": "9.25.0", - "@eslint/plugin-kit": "^0.2.8", + "@eslint/js": "9.28.0", + "@eslint/plugin-kit": "^0.3.1", "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", "@humanwhocodes/retry": "^0.4.2", @@ -2212,6 +2209,31 @@ "eslint": ">=3.0.0" } }, + "node_modules/eslint-plugin-jsdoc": { + "version": "50.6.17", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-50.6.17.tgz", + "integrity": "sha512-hq+VQylhd12l8qjexyriDsejZhqiP33WgMTy2AmaGZ9+MrMWVqPECsM87GPxgHfQn0zw+YTuhqjUfk1f+q67aQ==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@es-joy/jsdoccomment": "~0.50.1", + "are-docs-informative": "^0.0.2", + "comment-parser": "1.4.1", + "debug": "^4.3.6", + "escape-string-regexp": "^4.0.0", + "espree": "^10.1.0", + "esquery": "^1.6.0", + "parse-imports-exports": "^0.2.4", + "semver": "^7.6.3", + "spdx-expression-parse": "^4.0.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0 || ^9.0.0" + } + }, "node_modules/eslint-scope": { "version": "8.3.0", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.3.0.tgz", @@ -2286,10 +2308,11 @@ } }, "node_modules/esquery": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", - "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", + "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "estraverse": "^5.1.0" }, @@ -2395,21 +2418,6 @@ "reusify": "^1.0.4" } }, - "node_modules/fdir": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.3.0.tgz", - "integrity": "sha512-QOnuT+BOtivR77wYvCWHfGt9s4Pz1VIMbD463vegT5MLqNXy8rYFT/lPVEqf/bhYeT6qmqrNHhsX+rWwe3rOCQ==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "picomatch": "^3 || ^4" - }, - "peerDependenciesMeta": { - "picomatch": { - "optional": true - } - } - }, "node_modules/file-entry-cache": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", @@ -2514,10 +2522,14 @@ } }, "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/get-caller-file": { "version": "2.0.5", @@ -2610,9 +2622,9 @@ } }, "node_modules/globals": { - "version": "16.0.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-16.0.0.tgz", - "integrity": "sha512-iInW14XItCXET01CQFqudPOWP2jYMl7T+QRQT+UNcR/iQncN/F0UNpgd76iFkBPgNQb4+X3LV9tLJYzwh+Gl3A==", + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-16.2.0.tgz", + "integrity": "sha512-O+7l9tPdHCU320IigZZPj5zmRCFG9xHmx9cU8FqU2Rp+JN714seHV+2S9+JslCpY4gJwU2vOGox0wzgae/MCEg==", "dev": true, "license": "MIT", "engines": { @@ -2748,12 +2760,6 @@ "node": ">=0.10.0" } }, - "node_modules/is-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", - "integrity": "sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==", - "dev": true - }, "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", @@ -2773,15 +2779,6 @@ "node": ">=8" } }, - "node_modules/is-reference": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.2.1.tgz", - "integrity": "sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==", - "dev": true, - "dependencies": { - "@types/estree": "*" - } - }, "node_modules/is-unicode-supported": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", @@ -2859,6 +2856,16 @@ "js-yaml": "bin/js-yaml.js" } }, + "node_modules/jsdoc-type-pratt-parser": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-4.1.0.tgz", + "integrity": "sha512-Hicd6JK5Njt2QB6XYFS7ok9e37O8AYk3jTcppG4YVQnYjOemymvTcmc7OWsmq/Qqj5TdRFO5/x/tIPmBeRtGHg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/json-buffer": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", @@ -3186,6 +3193,23 @@ "node": ">=6" } }, + "node_modules/parse-imports-exports": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/parse-imports-exports/-/parse-imports-exports-0.2.4.tgz", + "integrity": "sha512-4s6vd6dx1AotCx/RCI2m7t7GCh5bDRUtGNvRfHSP2wbBQdMi67pPe7mtzmgwcaQ8VKK/6IB7Glfyu3qdZJPybQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "parse-statements": "1.0.11" + } + }, + "node_modules/parse-statements": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/parse-statements/-/parse-statements-1.0.11.tgz", + "integrity": "sha512-HlsyYdMBnbPQ9Jr/VgJ1YF4scnldvJpJxCVx6KgqPL4dxppsWrJHCIIxQXMJrqGnsRkNPATbeMJ8Yxu7JMsYcA==", + "dev": true, + "license": "MIT" + }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -3299,11 +3323,13 @@ } }, "node_modules/pretty-bytes": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-6.1.1.tgz", - "integrity": "sha512-mQUvGU6aUFQ+rNvTIAcZuWGRT9a6f6Yrg9bHs4ImKF+HZCEK+plBvnAZYSIQztknZF2qnzNtr6F8s0+IuptdlQ==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-7.0.0.tgz", + "integrity": "sha512-U5otLYPR3L0SVjHGrkEUx5mf7MxV2ceXeE7VwWPk+hyzC5drNohsOGNPDZqxCqyX1lkbEN4kl1LiI8QFd7r0ZA==", + "dev": true, + "license": "MIT", "engines": { - "node": "^14.13.1 || >=16.0.0" + "node": ">=20" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -3548,9 +3574,9 @@ } }, "node_modules/rollup": { - "version": "4.40.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.40.0.tgz", - "integrity": "sha512-Noe455xmA96nnqH5piFtLobsGbCij7Tu+tb3c1vYjNbTkfzGqXqQXG3wJaYXkRZuQ0vEYN4bhwg7QnIrqB5B+w==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.41.1.tgz", + "integrity": "sha512-cPmwD3FnFv8rKMBc1MxWCwVQFxwf1JEmSX3iQXrRVVG15zerAIXRjMFVWnd5Q5QvgKF7Aj+5ykXFhUl+QGnyOw==", "dev": true, "license": "MIT", "dependencies": { @@ -3564,26 +3590,26 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.40.0", - "@rollup/rollup-android-arm64": "4.40.0", - "@rollup/rollup-darwin-arm64": "4.40.0", - "@rollup/rollup-darwin-x64": "4.40.0", - "@rollup/rollup-freebsd-arm64": "4.40.0", - "@rollup/rollup-freebsd-x64": "4.40.0", - "@rollup/rollup-linux-arm-gnueabihf": "4.40.0", - "@rollup/rollup-linux-arm-musleabihf": "4.40.0", - "@rollup/rollup-linux-arm64-gnu": "4.40.0", - "@rollup/rollup-linux-arm64-musl": "4.40.0", - "@rollup/rollup-linux-loongarch64-gnu": "4.40.0", - "@rollup/rollup-linux-powerpc64le-gnu": "4.40.0", - "@rollup/rollup-linux-riscv64-gnu": "4.40.0", - "@rollup/rollup-linux-riscv64-musl": "4.40.0", - "@rollup/rollup-linux-s390x-gnu": "4.40.0", - "@rollup/rollup-linux-x64-gnu": "4.40.0", - "@rollup/rollup-linux-x64-musl": "4.40.0", - "@rollup/rollup-win32-arm64-msvc": "4.40.0", - "@rollup/rollup-win32-ia32-msvc": "4.40.0", - "@rollup/rollup-win32-x64-msvc": "4.40.0", + "@rollup/rollup-android-arm-eabi": "4.41.1", + "@rollup/rollup-android-arm64": "4.41.1", + "@rollup/rollup-darwin-arm64": "4.41.1", + "@rollup/rollup-darwin-x64": "4.41.1", + "@rollup/rollup-freebsd-arm64": "4.41.1", + "@rollup/rollup-freebsd-x64": "4.41.1", + "@rollup/rollup-linux-arm-gnueabihf": "4.41.1", + "@rollup/rollup-linux-arm-musleabihf": "4.41.1", + "@rollup/rollup-linux-arm64-gnu": "4.41.1", + "@rollup/rollup-linux-arm64-musl": "4.41.1", + "@rollup/rollup-linux-loongarch64-gnu": "4.41.1", + "@rollup/rollup-linux-powerpc64le-gnu": "4.41.1", + "@rollup/rollup-linux-riscv64-gnu": "4.41.1", + "@rollup/rollup-linux-riscv64-musl": "4.41.1", + "@rollup/rollup-linux-s390x-gnu": "4.41.1", + "@rollup/rollup-linux-x64-gnu": "4.41.1", + "@rollup/rollup-linux-x64-musl": "4.41.1", + "@rollup/rollup-win32-arm64-msvc": "4.41.1", + "@rollup/rollup-win32-ia32-msvc": "4.41.1", + "@rollup/rollup-win32-x64-msvc": "4.41.1", "fsevents": "~2.3.2" } }, @@ -3739,9 +3765,9 @@ "license": "MIT" }, "node_modules/semver": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", - "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", "dev": true, "license": "ISC", "bin": { @@ -3860,6 +3886,31 @@ "deprecated": "Please use @jridgewell/sourcemap-codec instead", "dev": true }, + "node_modules/spdx-exceptions": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz", + "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==", + "dev": true, + "license": "CC-BY-3.0" + }, + "node_modules/spdx-expression-parse": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-4.0.0.tgz", + "integrity": "sha512-Clya5JIij/7C6bRR22+tnGXbc4VKlibKSVj2iHvVeX5iMW7s1SIQlqu699JkODJJIhh/pUu8L0/VLh8xflD+LQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-license-ids": { + "version": "3.0.21", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.21.tgz", + "integrity": "sha512-Bvg/8F5XephndSK3JffaRqdT+gyhfqIPwDHpX80tJrF8QQRYMo8sNMeaZ2Dp5+jhwKnUmIOyFFQfHRkjJm5nXg==", + "dev": true, + "license": "CC0-1.0" + }, "node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", @@ -4054,9 +4105,9 @@ "dev": true }, "node_modules/tsx": { - "version": "4.19.3", - "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.19.3.tgz", - "integrity": "sha512-4H8vUNGNjQ4V2EOoGw005+c+dGuPSnhpPBPHBtsZdGZBk/iJb4kguGlPWaZTZ3q5nMtFOEsY0nRDlh9PJyd6SQ==", + "version": "4.19.4", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.19.4.tgz", + "integrity": "sha512-gK5GVzDkJK1SI1zwHf32Mqxf2tSJkNx+eYcNly5+nHvWqXUJYUkWBQtKauoESz3ymezAI++ZwT855x5p5eop+Q==", "dev": true, "license": "MIT", "dependencies": { @@ -4109,15 +4160,15 @@ } }, "node_modules/typescript-eslint": { - "version": "8.30.1", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.30.1.tgz", - "integrity": "sha512-D7lC0kcehVH7Mb26MRQi64LMyRJsj3dToJxM1+JVTl53DQSV5/7oUGWQLcKl1C1KnoVHxMMU2FNQMffr7F3Row==", + "version": "8.33.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.33.0.tgz", + "integrity": "sha512-5YmNhF24ylCsvdNW2oJwMzTbaeO4bg90KeGtMjUw0AGtHksgEPLRTUil+coHwCfiu4QjVJFnjp94DmU6zV7DhQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/eslint-plugin": "8.30.1", - "@typescript-eslint/parser": "8.30.1", - "@typescript-eslint/utils": "8.30.1" + "@typescript-eslint/eslint-plugin": "8.33.0", + "@typescript-eslint/parser": "8.33.0", + "@typescript-eslint/utils": "8.33.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" diff --git a/package.json b/package.json index 6d9fa8e..f1606da 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rollup-plugin-output-size", - "version": "1.6.1", + "version": "2.0.0", "description": "A Rollup plugin that displays output bundle sizes.", "keywords": [ "rollup-plugin", @@ -41,47 +41,42 @@ "all": "concurrently -r --kill-others-on-fail", "build": "npm run all -- npm:bundle npm:check", "prebundle": "rimraf lib", - "bundle": "rollup -c rollup.config.ts --configPlugin \"esbuild={target:'esnext'}\"", + "bundle": "rollup -c rollup.config.ts --configPlugin \"esbuild={target:'esnext'}\" --configImportAttributesKey with", "check": "npm run all -- \"npm:lint -- --max-warnings 0\" tsc", "format": "npm run lint -- --fix && prettier -cw .", "lint": "eslint .", - "start": "npm run bundle -- -w --no-watch.clearScreen", + "start": "npm run watch -- --environment NODE_ENV:development", "test": "npm run all -- mocha npm:check", - "test:watch": "mocha -w" - }, - "dependencies": { - "colorette": "^2.0.20", - "pretty-bytes": "^6.1.1" + "test:watch": "mocha -w", + "watch": "npm run bundle -- -w --no-watch.clearScreen" }, "devDependencies": { - "@eslint/js": "^9.25.0", - "@rollup/plugin-commonjs": "^28.0.3", + "@eslint/js": "^9.28.0", "@rollup/plugin-eslint": "^9.0.5", - "@rollup/plugin-node-resolve": "^16.0.1", "@rollup/plugin-typescript": "^12.1.2", - "@types/chai": "^5.2.1", + "@types/chai": "^5.2.2", "@types/mocha": "^10.0.10", - "@types/node": "^22.14.1", - "@types/rimraf": "^4.0.5", + "@types/node": "^22.15.29", "@types/sinon": "^17.0.4", "chai": "^5.2.0", "concurrently": "^9.1.2", - "eslint": "^9.25.0", + "eslint": "^9.28.0", "eslint-plugin-chai-friendly": "^1.0.1", - "globals": "^16.0.0", + "eslint-plugin-jsdoc": "^50.6.17", + "globals": "^16.2.0", "mocha": "^11.1.0", "prettier": "^3.5.3", + "pretty-bytes": "^7.0.0", "rimraf": "^6.0.1", - "rollup": "^4.40.0", + "rollup": "^4.41.1", "rollup-plugin-cleanup": "^3.2.1", "rollup-plugin-dts": "^6.2.1", "rollup-plugin-esbuild": "^6.2.1", "rollup-plugin-node-externals": "^8.0.0", "sinon": "^20.0.0", - "strip-ansi": "^7.1.0", - "tsx": "^4.19.3", + "tsx": "^4.19.4", "typescript": "^5.8.3", - "typescript-eslint": "^8.30.1" + "typescript-eslint": "^8.33.0" }, "peerDependencies": { "rollup": "^2.0.0 || ^3.0.0 || ^4.0.0" @@ -92,7 +87,7 @@ } }, "engines": { - "node": ">=14.16.0" + "node": ">=20.12.0" }, "overrides": { "@rollup/plugin-eslint": { diff --git a/rollup.config.ts b/rollup.config.ts index 65449cb..b8e4c7a 100644 --- a/rollup.config.ts +++ b/rollup.config.ts @@ -1,6 +1,4 @@ -import commonjs from '@rollup/plugin-commonjs'; import eslint from '@rollup/plugin-eslint'; -import nodeResolve from '@rollup/plugin-node-resolve'; import typescript from '@rollup/plugin-typescript'; import { RollupOptions } from 'rollup'; import cleanup from 'rollup-plugin-cleanup'; @@ -10,14 +8,20 @@ import nodeExternals from 'rollup-plugin-node-externals'; import pkg from './package.json' with { type: 'json' }; import outputSize from './src'; -const WATCH = process.env.ROLLUP_WATCH === 'true'; -const input = 'src/index.ts'; -// esm dependencies to bundle into vendor.cjs -const esmExternals = ['pretty-bytes']; // disable sourcemaps (enable only for preview) const preview = false; const bytes = true; +const WATCH = process.env.ROLLUP_WATCH === 'true'; +const input = 'src/index.ts'; + +// for preview mode utils chunk +const utils = [ + 'src/utils/format.ts', + 'src/utils/gzip.ts', + 'src/utils/summarize.ts' +]; + function build() { return esbuild({ target: 'esnext' }); } @@ -52,18 +56,10 @@ export default defineConfig([ sourcemap: preview, entryFileNames: '[name].cjs', chunkFileNames: '[name].cjs', - manualChunks: { vendor: esmExternals } + // for preview mode, create a separate chunk for utils + manualChunks: preview ? { utils } : undefined }, - plugins: [ - build(), - clean(), - commonjs(), - nodeResolve(), - // exclude esm dependencies from external - // since they will be bundled into vendor.cjs - nodeExternals({ exclude: esmExternals }), - size() - ] + plugins: [build(), clean(), nodeExternals(), size()] }, { input, diff --git a/src/constants.ts b/src/constants.ts index 7c44b7d..fa8bc83 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,9 +1,8 @@ -import { blue, cyan, magenta } from 'colorette'; - // NOTE: internal -export const OUTPUT_TYPES = ['entry', 'chunk', 'asset'] as const; +export const TYPES = ['entry', 'chunk', 'asset'] as const; -export const TYPES = [...OUTPUT_TYPES, 'total'] as const; +export const KEYS = [...TYPES, 'total'] as const; -export const COLOR = { asset: magenta, chunk: blue, entry: cyan } as const; +// prettier-ignore +export const COLOR = { asset: 'magenta', chunk: 'blue', entry: 'cyan' } as const; diff --git a/src/core/output-size.ts b/src/core/output-size.ts index 19885ab..1a8f5ad 100644 --- a/src/core/output-size.ts +++ b/src/core/output-size.ts @@ -1,15 +1,20 @@ import path from 'path'; -import prettyBytes from 'pretty-bytes'; import { Plugin } from 'rollup'; -import { TYPES } from '../constants'; +import { KEYS } from '../constants'; import { Options } from '../types/core.types'; import { OutputInfo } from '../types/output.types'; import { Size } from '../types/size.types'; -import { Summary, SummaryOutput } from '../types/summary.types'; +import { SummaryOutput, SummarySizes } from '../types/summary.types'; import { format } from '../utils/format'; -import { gzip as getGzip } from '../utils/gzip'; +import { formatBytes } from '../utils/format-bytes'; +import { gzip } from '../utils/gzip'; import { summarize } from '../utils/summarize'; +// same as Summary but props are required +interface PluginSummary extends Required { + gzip?: Required; +} + /** * A Rollup plugin that displays output bundle sizes. * @param options The plugin options. @@ -22,14 +27,13 @@ export function outputSize(options: Options = {}): Plugin { : options.gzip == null || !!options.gzip || []; const summaryOpts = options.summary == null || options.summary; - let summaries: SummaryOutput[]; - let didSummarize: boolean; + let summaries: SummaryOutput[], summarized: boolean; return { name: 'output-size', outputOptions() { summaries = []; - didSummarize = false; + summarized = false; }, async generateBundle(outputOpts, bundle) { if (options.silent) return; @@ -37,26 +41,26 @@ export function outputSize(options: Options = {}): Plugin { for (const output of Object.values(bundle)) { const isChunk = output.type === 'chunk'; const type = isChunk && output.isEntry ? 'entry' : output.type; - const shouldHide = hide === true || hide.includes(type); + const hidden = hide === true || hide.includes(type); // skip other checks if no summary is required - if (!summaryOpts && shouldHide) continue; + if (!summaryOpts && hidden) continue; const data = isChunk ? output.code : output.source; const size = typeof data === 'string' ? Buffer.byteLength(data) : data.byteLength; - const hSize = prettyBytes(size); - const gzip = - gzipOpts === true || gzipOpts.includes(type) - ? await getGzip(data) - : undefined; + const hSize = formatBytes(size); const filePath = path.join( outputOpts.dir || path.dirname(outputOpts.file || ''), output.fileName ); - const info: OutputInfo = { path: filePath, type, size, hSize, gzip }; + const info: OutputInfo = { path: filePath, type, size, hSize }; + if (gzipOpts === true || gzipOpts.includes(type)) { + info.gzip = await gzip(data); + } + summaries.push({ info, output }); - if (shouldHide) { + if (hidden) { // do nothing } else if (typeof options.handle === 'function') { await options.handle(info, output); @@ -66,41 +70,41 @@ export function outputSize(options: Options = {}): Plugin { } }, async writeBundle() { - if (didSummarize || !summaryOpts || options.silent) return; - didSummarize = true; + if (summarized || !summaryOpts || options.silent) return; + summarized = true; // create summary - const summary = { gzip: {} } as Summary; - for (const type of TYPES) { - summary[type] = { size: 0, hSize: '0 B' }; - summary.gzip![type] = { size: 0, hSize: '0 B' }; + const summary = { gzip: {} } as PluginSummary; + for (const key of KEYS) { + summary[key] = { size: 0, hSize: '0 B' }; + summary.gzip![key] = { size: 0, hSize: '0 B' }; } // set summary sizes for (const { info } of summaries) { summary.total.size += info.size; - summary[info.type]!.size += info.size; + summary[info.type].size += info.size; if (!summary.gzip) { // exclude gzip if an info does not have gzip size } else if (info.gzip) { summary.gzip.total.size += info.gzip.size; - summary.gzip[info.type]!.size += info.gzip.size; + summary.gzip[info.type].size += info.gzip.size; } else { delete summary.gzip; } } // update hSizes - const s = (size: Size) => (size.hSize = prettyBytes(size.size)); - for (const type of TYPES) { - s(summary[type]!); - summary.gzip && s(summary.gzip[type]!); + const s = (size: Size) => (size.hSize = formatBytes(size.size)); + for (const key of KEYS) { + s(summary[key]); + summary.gzip && s(summary.gzip[key]); } // display summary (preserve `this` for callbacks) if (typeof options.summary === 'function') { await options.summary(summary, summaries); - } else if (summaryOpts === 'always' || summaries.length > 1) { + } else if (summaries.length > 1 || summaryOpts === 'always') { // by default, show summary only if more than 1 output console.log(summarize(summary, options)); } diff --git a/src/types/core.types.ts b/src/types/core.types.ts index 7307f06..8e4161b 100644 --- a/src/types/core.types.ts +++ b/src/types/core.types.ts @@ -17,7 +17,7 @@ export interface Options { * Set to `true` to disable output for output types, or set * an array to specify which output types will not be displayed. * - * This option does not affect {@linkcode summary} output. + * This option does not affect the {@linkcode summary} output. * @default false */ hide?: boolean | OutputType[]; @@ -36,7 +36,7 @@ export interface Options { */ silent?: boolean; /** - * Displays summary output. + * Displays the summary output. * - Set to `false` to disable summary output. * - Set to `'always'` to force summary output even if there is only one (1) output. * - Set a callback to override default summary output. @@ -53,6 +53,3 @@ export interface Options { output: OutputBundle[keyof OutputBundle] ): void | Promise; } - -/** @deprecated Since v1.4.0. Use {@linkcode Options} instead. */ -export type RollupOutputSizeOptions = Options; diff --git a/src/types/output.types.ts b/src/types/output.types.ts index 5380160..e89fb8b 100644 --- a/src/types/output.types.ts +++ b/src/types/output.types.ts @@ -1,5 +1,4 @@ -// eslint-disable-next-line @typescript-eslint/no-unused-vars -import type { Options } from './core.types'; +import { Options } from './core.types'; import { Size } from './size.types'; /** @@ -17,8 +16,8 @@ export interface OutputInfo extends Size { /** Output type. */ type: OutputType; /** - * The gzipped size of the output. Provided unless the - * {@linkcode Options.gzip gzip} option is set to `false`. + * The gzipped size of the output. + * Provided unless {@linkcode Options.gzip} is set to `false`. */ gzip?: Size; } diff --git a/src/utils/format-bytes.ts b/src/utils/format-bytes.ts new file mode 100644 index 0000000..c14d72e --- /dev/null +++ b/src/utils/format-bytes.ts @@ -0,0 +1,24 @@ +// NOTE: internal + +// probably don't need units after GB +// add these if needed for some reason: 'TB', 'PB', 'EB', 'ZB', 'YB' +const units = ['B', 'kB', 'MB', 'GB']; + +/** + * Formats bytes to human-readable string. + * - Assume no negative numbers. + * - Assume no file sizes that could reach TB and above. + * @param bytes The bytes to format. + * @returns The formatted bytes. + * @see https://github.com/sindresorhus/pretty-bytes + * @see https://gist.github.com/zentala/1e6f72438796d74531803cc3833c039c + */ +export function formatBytes(bytes: number): string { + if (bytes === 0) return '0 B'; + + // prettier-ignore + const e = Math.min(units.length - 1, Math.floor(Math.log(bytes) / Math.log(1000))); + return ( + Number((bytes / 1000 ** e).toFixed(2)).toLocaleString() + ' ' + units[e] + ); +} diff --git a/src/utils/format.ts b/src/utils/format.ts index e81a9bd..2301a6f 100644 --- a/src/utils/format.ts +++ b/src/utils/format.ts @@ -1,4 +1,4 @@ -import { dim, gray, red, yellow } from 'colorette'; +import util from 'util'; import { COLOR } from '../constants'; import { Options } from '../types/core.types'; import { OutputInfo } from '../types/output.types'; @@ -15,10 +15,17 @@ export function format( options: Pick = {} ): string { return ( - COLOR[info.type](dim(`[${info.type}] `) + info.path + dim(' is ')) + - yellow(getSize(info, options)) + + util.styleText( + COLOR[info.type], + util.styleText('dim', `[${info.type}] `) + + info.path + + util.styleText('dim', ' is ') + ) + + util.styleText('yellow', getSize(info, options)) + (info.gzip - ? red(' → ') + yellow(getSize(info.gzip, options)) + gray(' (gzip)') + ? util.styleText('red', ' → ') + + util.styleText('yellow', getSize(info.gzip, options)) + + util.styleText('gray', ' (gzip)') : '') ); } diff --git a/src/utils/gzip.ts b/src/utils/gzip.ts index 94b5a1f..776ab5b 100644 --- a/src/utils/gzip.ts +++ b/src/utils/gzip.ts @@ -1,9 +1,9 @@ -import prettyBytes from 'pretty-bytes'; -import { promisify } from 'util'; -import { gzip as __gzip } from 'zlib'; +import util from 'util'; +import zlib from 'zlib'; import { Size } from '../types/size.types'; +import { formatBytes } from './format-bytes'; -const _gzip = promisify(__gzip); +const _gzip = util.promisify(zlib.gzip); /** * Gets the gzipped size of input. @@ -12,5 +12,5 @@ const _gzip = promisify(__gzip); */ export async function gzip(input: string | Uint8Array): Promise { const size = input ? (await _gzip(input, { level: 9 })).byteLength : 0; - return { size, hSize: prettyBytes(size) }; + return { size, hSize: formatBytes(size) }; } diff --git a/src/utils/summarize.ts b/src/utils/summarize.ts index f400890..499cff0 100644 --- a/src/utils/summarize.ts +++ b/src/utils/summarize.ts @@ -1,5 +1,5 @@ -import { dim, gray, green, red, yellow } from 'colorette'; -import { COLOR, OUTPUT_TYPES } from '../constants'; +import util from 'util'; +import { COLOR, TYPES } from '../constants'; import { Options } from '../types/core.types'; import { Summary } from '../types/summary.types'; import { getSize } from './size'; @@ -10,11 +10,13 @@ import { getSize } from './size'; * @param total Total size. * @returns The summary line. */ -function line(sizes: string[], total: string | number) { +function line(sizes: string[], total: string) { return ( - dim(green('[total] ')) + - (sizes.length > 0 ? sizes.join(red(' + ')) + red(' = ') : '') + - yellow(total) + util.styleText(['dim', 'green'], '[total] ') + + (sizes.length > 0 + ? sizes.join(util.styleText('red', ' + ')) + util.styleText('red', ' = ') + : '') + + util.styleText('yellow', total) ); } @@ -32,22 +34,24 @@ export function summarize( const sizes: string[] = []; const gzipSizes: string[] = []; - for (const type of OUTPUT_TYPES) { + for (const type of TYPES) { const color = COLOR[type]; const item = summary[type]; const gzipItem = gzip && gzip[type]; if (item && item.size > 0) { - sizes.push(color(getSize(item, options))); + sizes.push(util.styleText(color, getSize(item, options))); } if (gzipItem && gzipItem.size > 0) { - gzipSizes.push(color(getSize(gzipItem, options))); + gzipSizes.push(util.styleText(color, getSize(gzipItem, options))); } } return ( line(sizes, getSize(total, options)) + (gzip - ? '\n' + line(gzipSizes, getSize(gzip.total, options)) + gray(' (gzip)') + ? '\n' + + line(gzipSizes, getSize(gzip.total, options)) + + util.styleText('gray', ' (gzip)') : '') ); } diff --git a/test/format-bytes.spec.ts b/test/format-bytes.spec.ts new file mode 100644 index 0000000..6ff1252 --- /dev/null +++ b/test/format-bytes.spec.ts @@ -0,0 +1,46 @@ +import { expect } from 'chai'; +import prettyBytes from 'pretty-bytes'; +import { formatBytes } from '../src/utils/format-bytes'; + +// NOTE: this is internal but test it anyway for correctness + +// expect not equal to prettyBytes output +function expectNotEqual(list: [number, string][]) { + for (const [bytes, actual] of list) { + const hBytes = formatBytes(bytes); + expect(hBytes).to.not.equal(prettyBytes(bytes)); + expect(hBytes).to.equal(actual); + } +} + +describe('formatBytes', () => { + it('should be a function', () => { + expect(formatBytes).to.be.a('function'); + }); + + it('should properly format bytes', () => { + const list = [0, 99, 999, 1_000, 1_337, 9_999, 1_234_567, 1_234_567_890]; + for (const bytes of list) { + expect(formatBytes(bytes)).to.equal(prettyBytes(bytes)); + } + }); + + it('should format with commas and decimals', () => { + expectNotEqual([ + [999.5, '999.5 B'], // 1000 B + [999_999, '1,000 kB'], // 1000 kB + [123_456, '123.46 kB'], // 123 kB + [999_999_999, '1,000 MB'], // 1000 MB + [123_456_789_000, '123.46 GB'], // 123 GB + [999_999_999_999, '1,000 GB'] // 1000 GB + ]); + }); + + it('should not format more than GB', () => { + expectNotEqual([ + [1_234_567_890_000, '1,234.57 GB'], // 1.23 TB + [123_456_789_876_543, '123,456.79 GB'], // 123 TB + [999_999_999_999_999, '1,000,000 GB'] // 1 PB + ]); + }); +}); diff --git a/test/format.spec.ts b/test/format.spec.ts index de1221c..4ae1a26 100644 --- a/test/format.spec.ts +++ b/test/format.spec.ts @@ -1,7 +1,7 @@ import { expect } from 'chai'; -import prettyBytes from 'pretty-bytes'; -import stripAnsi from 'strip-ansi'; +import util from 'util'; import { format, OutputInfo } from '../src'; +import { formatBytes } from '../src/utils/format-bytes'; describe('format', () => { it('should be a function', () => { @@ -18,7 +18,7 @@ describe('format', () => { }; const formatted = format(info); expect(formatted).to.be.a('string'); - const raw = stripAnsi(formatted); + const raw = util.stripVTControlCharacters(formatted); expect(raw).to.equal('[chunk] out/test/chunk.js is 30 B → 20 B (gzip)'); }); @@ -29,7 +29,7 @@ describe('format', () => { size: 100, hSize: '100 B' }; - const raw = stripAnsi(format(info)); + const raw = util.stripVTControlCharacters(format(info)); expect(raw).to.equal('[asset] out/test/asset.js.map is 100 B'); }); @@ -39,9 +39,9 @@ describe('format', () => { path: 'out/test/entry.js', type: 'entry', size, - hSize: prettyBytes(size) + hSize: formatBytes(size) }; - let raw = stripAnsi(format(info, { bytes: true })); + let raw = util.stripVTControlCharacters(format(info, { bytes: true })); expect(raw).to.equal('[entry] out/test/entry.js is 0 B'); size = 1234567890; @@ -49,9 +49,9 @@ describe('format', () => { path: 'out/test/entry.js', type: 'entry', size, - hSize: prettyBytes(size) + hSize: formatBytes(size) }; - raw = stripAnsi(format(info, { bytes: true })); + raw = util.stripVTControlCharacters(format(info, { bytes: true })); expect(raw).to.equal('[entry] out/test/entry.js is 1,234,567,890 B'); }); }); diff --git a/test/output-size.spec.ts b/test/output-size.spec.ts index 7262fa9..a65930c 100644 --- a/test/output-size.spec.ts +++ b/test/output-size.spec.ts @@ -4,7 +4,6 @@ import { rimraf } from 'rimraf'; import { rollup, RollupOptions } from 'rollup'; import { spy } from 'sinon'; import { fileURLToPath } from 'url'; -import { OUTPUT_TYPES } from '../src/constants'; import { Options, OutputInfo, @@ -12,6 +11,7 @@ import { OutputType, SummaryCallback } from '../src'; +import { TYPES } from '../src/constants'; type Handle = Exclude; @@ -335,7 +335,7 @@ describe('options', () => { expect(summary).to.have.property('total').that.is.an('object'); expect(summary).to.have.property('gzip').that.is.an('object'); expect(summary.gzip).to.have.property('total').that.is.an('object'); - for (const type of OUTPUT_TYPES) { + for (const type of TYPES) { expect(summary).to.have.property(type).that.is.an('object'); expect(summary.gzip).to.have.property(type).that.is.an('object'); } @@ -372,7 +372,7 @@ describe('options', () => { expect(output).to.have.property('info').that.is.an('object'); expect(output).to.have.property('output').that.is.an('object'); expect(output.info).to.be.an('object'); - expect(output.info.type).to.have.oneOf(OUTPUT_TYPES); + expect(output.info.type).to.have.oneOf(TYPES); } }); const plugin = outputSize({ hide: true, gzip: ['asset'], summary }); diff --git a/test/summarize.spec.ts b/test/summarize.spec.ts index ad299ae..5701239 100644 --- a/test/summarize.spec.ts +++ b/test/summarize.spec.ts @@ -1,10 +1,10 @@ import { expect } from 'chai'; -import prettyBytes from 'pretty-bytes'; -import stripAnsi from 'strip-ansi'; +import util from 'util'; import { Size, summarize, Summary, SummarySizes } from '../src'; +import { formatBytes } from '../src/utils/format-bytes'; function size(size: number): Size { - return { size, hSize: prettyBytes(size) }; + return { size, hSize: formatBytes(size) }; } function getSizes(): SummarySizes { @@ -21,7 +21,7 @@ describe('summarize', () => { const summary: Summary = { ...sizes, gzip: sizes }; const formatted = summarize(summary); expect(formatted).to.be.a('string'); - const raw = stripAnsi(formatted); + const raw = util.stripVTControlCharacters(formatted); const text = '[total] 40 B + 30 B + 20 B = 90 B'; expect(raw).to.equal(`${text}\n${text} (gzip)`); }); @@ -30,7 +30,7 @@ describe('summarize', () => { const summary: Summary = getSizes(); const formatted = summarize(summary); expect(formatted).to.be.a('string'); - const raw = stripAnsi(formatted); + const raw = util.stripVTControlCharacters(formatted); expect(raw).to.equal('[total] 40 B + 30 B + 20 B = 90 B'); }); @@ -39,7 +39,7 @@ describe('summarize', () => { const summary: Summary = { ...sizes, gzip: sizes }; const formatted = summarize(summary); expect(formatted).to.be.a('string'); - const raw = stripAnsi(formatted); + const raw = util.stripVTControlCharacters(formatted); expect(raw).to.equal('[total] 90 B\n[total] 90 B (gzip)'); }); @@ -52,7 +52,7 @@ describe('summarize', () => { }; const formatted = summarize(summary, { bytes: true }); expect(formatted).to.be.a('string'); - const raw = stripAnsi(formatted); + const raw = util.stripVTControlCharacters(formatted); expect(raw).to.equal('[total] 4,000 B + 3,000 B + 2,000 B = 9,000 B'); }); });