{"_id":"@alphanull/jsdoc-plugin-esnext","_rev":"5-e1ad88689654e00a8afccc15c8ca1f91","name":"@alphanull/jsdoc-plugin-esnext","dist-tags":{"latest":"1.3.0"},"versions":{"1.0.0":{"name":"@alphanull/jsdoc-plugin-esnext","version":"1.0.0","keywords":["jsdoc","plugin","jsdoc-plugin","private fields","static","arrow functions","esnext","es2022","documentation"],"author":{"url":"https://alphanull.de","name":"Frank Kudermann","email":"kudermann@alphanull.de"},"license":"MIT","_id":"@alphanull/jsdoc-plugin-esnext@1.0.0","maintainers":[{"name":"alphanull","email":"kudermann@alphanull.de"}],"homepage":"https://github.com/alphanull/jsdoc-plugin-esnext#readme","bugs":{"url":"https://github.com/alphanull/jsdoc-plugin-esnext/issues"},"dist":{"shasum":"5b33d3c73df5fa7330196870748c458420998e9b","tarball":"https://registry.npmjs.org/@alphanull/jsdoc-plugin-esnext/-/jsdoc-plugin-esnext-1.0.0.tgz","fileCount":6,"integrity":"sha512-LWYF+bxFOOEi7Ykf4krtC2m4zWX8+pXUj5ZqSqMwVmUmFLHMCUFrqa/kXJElHDxRwtKYkfRe5/Nz5N+ZonKTPw==","signatures":[{"sig":"MEYCIQD/h/SorNxBRzE6VRSSvRE3TqZlKkMi1J/NFUAUbSaPrAIhAO1aArX9RLkk/cbseM3/qfd7evEnGvsLLtc5JdU9y4Qr","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":161490},"main":"index.js","type":"module","engines":{"node":">=16.0.0"},"exports":{".":"./index.js"},"gitHead":"7e37cd27c7b910991f767eaa9ec935156912bd7a","_npmUser":{"name":"alphanull","actor":{"name":"alphanull","type":"user","email":"kudermann@alphanull.de"},"email":"kudermann@alphanull.de"},"repository":{"url":"git+https://github.com/alphanull/jsdoc-plugin-esnext.git","type":"git"},"_npmVersion":"11.4.2","description":"Smart JSDoc plugin that adds full ES2022+ class-feature support – private fields, static members and arrow-bound methods.","directories":{},"sideEffects":false,"_nodeVersion":"22.13.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/jsdoc-plugin-esnext_1.0.0_1751806504509_0.7231744704738667","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@alphanull/jsdoc-plugin-esnext","version":"1.1.0","keywords":["jsdoc","plugin","jsdoc-plugin","private fields","static","arrow functions","esnext","es2022","documentation"],"author":{"url":"https://alphanull.de","name":"Frank Kudermann","email":"kudermann@alphanull.de"},"license":"MIT","_id":"@alphanull/jsdoc-plugin-esnext@1.1.0","maintainers":[{"name":"alphanull","email":"kudermann@alphanull.de"}],"homepage":"https://github.com/alphanull/jsdoc-plugin-esnext#readme","bugs":{"url":"https://github.com/alphanull/jsdoc-plugin-esnext/issues"},"dist":{"shasum":"63e05fba5797fe82e616ec8691bfa87a2e2b43ae","tarball":"https://registry.npmjs.org/@alphanull/jsdoc-plugin-esnext/-/jsdoc-plugin-esnext-1.1.0.tgz","fileCount":8,"integrity":"sha512-NHHLEd1KloUJFCbB/3OvMMtnzLGWEM6oW19Dbh8PzwXQ6x2AWtauO39FWFVDHhGupmH6b2hBM0pjRqmmy2njCg==","signatures":[{"sig":"MEQCIDDqwOCrB5htdLVhGpOB8SuUmA179WhJuUBkHbE2smgvAiAoeZQPYhdC0qvbs4yBWYn4N/+0ppbdGstQBW+2MZzSDA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":297160},"main":"index.js","type":"module","engines":{"node":">=16.0.0"},"exports":{".":"./index.js"},"gitHead":"c12a71c02b05b8180630a2eb26d129b40ca12373","_npmUser":{"name":"alphanull","email":"kudermann@alphanull.de"},"repository":{"url":"git+https://github.com/alphanull/jsdoc-plugin-esnext.git","type":"git"},"_npmVersion":"11.4.2","description":"JSDoc plugin that adds full ES2022+ class-feature support – private fields, static members, arrow-bound methods, and ES6 default export fixes.","directories":{},"sideEffects":false,"_nodeVersion":"22.13.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/jsdoc-plugin-esnext_1.1.0_1754582128396_0.38184583380144166","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@alphanull/jsdoc-plugin-esnext","version":"1.2.0","keywords":["jsdoc","plugin","jsdoc-plugin","private fields","static","arrow functions","esnext","es2022","documentation"],"author":{"url":"https://alphanull.de","name":"Frank Kudermann","email":"kudermann@alphanull.de"},"license":"MIT","_id":"@alphanull/jsdoc-plugin-esnext@1.2.0","maintainers":[{"name":"alphanull","email":"kudermann@alphanull.de"}],"homepage":"https://github.com/alphanull/jsdoc-plugin-esnext#readme","bugs":{"url":"https://github.com/alphanull/jsdoc-plugin-esnext/issues"},"dist":{"shasum":"a7f391198edd4f26b58c36a6ff745ecf46e66624","tarball":"https://registry.npmjs.org/@alphanull/jsdoc-plugin-esnext/-/jsdoc-plugin-esnext-1.2.0.tgz","fileCount":10,"integrity":"sha512-SjkMAeKgWqqGwYdEJIJXU2Jn834022jVdGRRnM3D9vqRoMUAeeP2FYn1/jMXlHLSc2PM7KGATlEIiZ6+wVELRQ==","signatures":[{"sig":"MEYCIQCsz8ltPPq7h5+X+e3x54yx5WcKQwzilQFb1Af8+3bycgIhAPpcCP/c9im4rowKLjnOOobJ79w6nfL/DLo0xYfUMiKq","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":461872},"main":"index.js","type":"module","engines":{"node":">=16.0.0"},"exports":{".":"./index.js"},"gitHead":"27664392cb26235606195837db1110bb7e6045d4","_npmUser":{"name":"alphanull","email":"kudermann@alphanull.de"},"repository":{"url":"git+https://github.com/alphanull/jsdoc-plugin-esnext.git","type":"git"},"_npmVersion":"11.4.2","description":"JSDoc plugin that adds full ES2022+ class-feature support – private fields, static members, arrow-bound methods, and ES6 default export fixes.","directories":{},"sideEffects":false,"_nodeVersion":"22.13.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/jsdoc-plugin-esnext_1.2.0_1756741659305_0.5240447506300714","host":"s3://npm-registry-packages-npm-production"}},"1.2.1":{"name":"@alphanull/jsdoc-plugin-esnext","version":"1.2.1","keywords":["jsdoc","plugin","jsdoc-plugin","private fields","static","arrow functions","esnext","es2022","documentation"],"author":{"url":"https://alphanull.de","name":"Frank Kudermann","email":"kudermann@alphanull.de"},"license":"MIT","_id":"@alphanull/jsdoc-plugin-esnext@1.2.1","maintainers":[{"name":"alphanull","email":"kudermann@alphanull.de"}],"homepage":"https://github.com/alphanull/jsdoc-plugin-esnext#readme","bugs":{"url":"https://github.com/alphanull/jsdoc-plugin-esnext/issues"},"dist":{"shasum":"584e941525b65d536523176388781ff09597428f","tarball":"https://registry.npmjs.org/@alphanull/jsdoc-plugin-esnext/-/jsdoc-plugin-esnext-1.2.1.tgz","fileCount":10,"integrity":"sha512-oJpJTUJdiswkzsc7VOETzxKX2s6iXRj1TwfoUG4oUNT9E6r//OIeZAVnF5fC/vyVBGDGzODRG3kaRI2KqJxfOg==","signatures":[{"sig":"MEQCIDJkxg7kdjLJlFyxDfipft7SlZyOftJQOaRaz8xLurUfAiBUmOmbjE1GHjqLEQUqlfDBPK4G8Ubyjl0ay8PLgyqZ+w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":461825},"main":"index.js","engines":{"node":">=16.0.0"},"gitHead":"b12b80b358962d68a1ce3295613c57e6236440f1","_npmUser":{"name":"alphanull","email":"kudermann@alphanull.de"},"repository":{"url":"git+https://github.com/alphanull/jsdoc-plugin-esnext.git","type":"git"},"_npmVersion":"11.6.0","description":"JSDoc plugin that adds full ES2022+ class-feature support – private fields, static members, arrow-bound methods, and ES6 default export fixes.","directories":{},"sideEffects":false,"_nodeVersion":"22.13.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/jsdoc-plugin-esnext_1.2.1_1758458214515_0.07153569669797744","host":"s3://npm-registry-packages-npm-production"}},"1.3.0":{"name":"@alphanull/jsdoc-plugin-esnext","version":"1.3.0","license":"MIT","description":"JSDoc plugin that adds full ES2022+ class-feature support – private fields, static members, arrow-bound methods, and ES6 default export fixes.","keywords":["jsdoc","plugin","jsdoc-plugin","private fields","static","arrow functions","esnext","es2022","documentation"],"author":{"name":"Frank Kudermann","email":"kudermann@alphanull.de","url":"https://alphanull.de"},"repository":{"type":"git","url":"git+https://github.com/alphanull/jsdoc-plugin-esnext.git"},"homepage":"https://github.com/alphanull/jsdoc-plugin-esnext#readme","bugs":{"url":"https://github.com/alphanull/jsdoc-plugin-esnext/issues"},"main":"index.js","publishConfig":{"access":"public"},"sideEffects":false,"engines":{"node":">=16.0.0"},"scripts":{"test":"node test/run.js"},"devDependencies":{"jsdoc":"^4.0.5"},"gitHead":"86c25b14b6fca56f76971467d8081c2ac96a2681","_id":"@alphanull/jsdoc-plugin-esnext@1.3.0","_nodeVersion":"22.13.1","_npmVersion":"11.6.1","dist":{"integrity":"sha512-waMnYWYtTpORjsPlwxzOanPIS50HZzDOC2Zrgj4tEtTqQXm7p3oF147JXUz6G6R4cBNbD97n8HyRb8cY6O32KQ==","shasum":"008edd27b223ed9059136cca47767097eadba593","tarball":"https://registry.npmjs.org/@alphanull/jsdoc-plugin-esnext/-/jsdoc-plugin-esnext-1.3.0.tgz","fileCount":10,"unpackedSize":462573,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIEKSCyngfgRiLWlMRi2sThxRBhtyCEGqgnwCmpugghlmAiEA/xFwHdUJP7eu248nvbPhYX9xMrhLTbwNHCzbh6G3mcs="}]},"_npmUser":{"name":"alphanull","email":"kudermann@alphanull.de"},"directories":{},"maintainers":[{"name":"alphanull","email":"kudermann@alphanull.de"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/jsdoc-plugin-esnext_1.3.0_1762620448388_0.9202530652196137"},"_hasShrinkwrap":false}},"time":{"created":"2025-07-06T12:55:04.431Z","modified":"2025-11-08T16:47:29.139Z","1.0.0":"2025-07-06T12:55:04.713Z","1.1.0":"2025-08-07T15:55:28.613Z","1.2.0":"2025-09-01T15:47:39.498Z","1.2.1":"2025-09-21T12:36:54.711Z","1.3.0":"2025-11-08T16:47:28.615Z"},"bugs":{"url":"https://github.com/alphanull/jsdoc-plugin-esnext/issues"},"author":{"name":"Frank Kudermann","email":"kudermann@alphanull.de","url":"https://alphanull.de"},"license":"MIT","homepage":"https://github.com/alphanull/jsdoc-plugin-esnext#readme","keywords":["jsdoc","plugin","jsdoc-plugin","private fields","static","arrow functions","esnext","es2022","documentation"],"repository":{"type":"git","url":"git+https://github.com/alphanull/jsdoc-plugin-esnext.git"},"description":"JSDoc plugin that adds full ES2022+ class-feature support – private fields, static members, arrow-bound methods, and ES6 default export fixes.","maintainers":[{"name":"alphanull","email":"kudermann@alphanull.de"}],"readme":"![License](https://img.shields.io/github/license/alphanull/jsdoc-plugin-esnext)\n![Version](https://img.shields.io/npm/v/@alphanull/jsdoc-plugin-esnext)\n\n# JSDoc ESNext Plugin\n\n**JSDoc plugin that adds full ES2022+ class-feature support – private fields, static members, arrow-bound methods, as well as ES6 default export fixes.**\n\nModern JavaScript syntax isn’t always accurately recognized by JSDoc. This plugin enables accurate recognition of modern ECMAScript class structures and enhances the resulting documentation.\n\n## Features\n\n* Restores accurate naming for native `#privateFields` and `#methods()`.\n* Automatically tags private members with `@private`.\n* Detects `static` class members and applies `@static` and `scope: static`.\n* Treats arrow-bound methods as `@function`.\n* Detects assignments like `this.#foo = ...` in constructors.\n* Fixes various ES6 default export issues - corrects wrong names and structures for exported classes, functions, object literals, and their members.\n* Static class properties are correctly parsed with static scope instead of instance scope.\n* ES6 class mixin static members retain their static scope during augmentation.\n* Prevents duplicated mixin fields when classes declare constructors.\n* Works seamlessly with JSDoc's default parser.\n* Works with all themes (but see note below!).\n* Perfectly integrates with [VisionTheme](https://github.com/alphanull/jsdoc-vision-theme) for a modern UI (optional).\n* Tested with JSDoc 3.6.11 and 4.0.4.\n\n## Installation\n\n```bash\nnpm install --save-dev @alphanull/jsdoc-plugin-esnext\n```\n\nThen, add the plugin to your JSDoc configuration file:\n\n```json\n{\n    \"plugins\": [\n        \"@alphanull/jsdoc-plugin-esnext\"\n    ]\n}\n```\n\n## ES2022 Example\n\n```js\nexport default class Example {\n\n    /**\n     * Static counter\n     * @type {number}\n     */\n    static counter = 0;\n\n    /**\n     * Private field\n     * @type {string}\n     */\n    static #secret = 'abc';\n\n    /**\n     * Bound handler\n     * @function\n     */\n    #handleClick = () => {\n        console.log('clicked');\n    }\n\n    constructor() {\n        this.#local = 123;\n    }\n\n    /**\n     * Private method\n     */\n    #compute() {\n        return true;\n    }\n}\n```\n\n### Resulting Documentation\n\n| ![before](assets/private-before.jpg) | ![after](assets/private-after.jpg) |\n| :----------------------------------------------------------: | :----------------------------------------------------------: |\n|                      **Without plugin**                      |                **Using jsdoc-plugin-esnext**                 |\n\n* `counter` appears with `@static` and type.\n* `#secret` is listed as `private static`.\n* `#handleClick` is listed as a private function.\n* `#compute()` is listed as a private method.\n\n## Exports Example\n\n```js\n/**\n * Exported as default class.\n */\nexport default class FooClass {\n    /**\n     * FooClass constructor.\n     * @param {string} message - Additional message.\n     */\n    constructor(message) { }\n    /**\n     * This is a class method.\n     * @param {any} someArg - An arg you need to pass.\n     */\n    classMethod(someArg) {\n    this.fooAClassMethod(this.message);\n    }\n}\n```\n\n### Resulting Documentation\n\n| ![before](assets/exports-before.jpg) | ![after](assets/exports-after.jpg) |\n| :----------------------------------------------------------: | :----------------------------------------------------------: |\n|                      **Without plugin**                      |                **Using jsdoc-plugin-esnext**                 |\n\n* `FooClass` is named correctly (not `exports`).\n* Class members (constructor, properties, methods) are correctly linked to their parent class and do not appear in `Global`.\n\n## Static Properties & Mixins Example\n\n```js\n/**\n * ES6 class mixin with static members.\n * @mixin TestMixin\n */\nclass TestMixin {\n  /**\n   * Static property - correctly parsed as static scope.\n   * @type {string}\n   */\n  static staticProp = 'static';\n\n  /**\n   * Static method - correctly retains static scope during augmentation.\n   * @returns {string}\n   */\n  static staticMethod() {\n    return 'static';\n  }\n}\n\n/**\n * Class using the mixin.\n * @class TestClass\n * @mixes TestMixin\n */\nclass TestClass extends TestMixin {\n  /**\n   * Class static property - correctly parsed as static scope.\n   * @type {string}\n   */\n  static classStaticProp = 'classStatic';\n}\n```\n\n### Resulting Documentation\n\n| ![before](assets/static-before.jpg) | ![after](assets/static-after.jpg) |\n| :----------------------------------------------------------: | :----------------------------------------------------------: |\n|                      **Without plugin**                      |                **Using jsdoc-plugin-esnext**                 |\n\n* `TestClass.staticProp` appears with `@static` and scope `static` (fixes JSDoc Bug #2144).\n* `TestClass.staticMethod` retains static scope during mixin augmentation (fixes JSDoc Bug #2146).\n* `TestClass.classStaticProp` is correctly parsed as static scope.\n\n## Tests\n\nRun the integration suite to ensure all plugin features keep working:\n\n```bash\nnpm test\n```\n\nSnapshots land in the destination chosen in `test/jsdoc.config.json` (default `test/output/`) for manual inspection.\n\n## Limitations\n\nWhile there are no limitations with this plugin per se, for private members (which start with \"#\")  there can be resulting hash links containing two hashes, like: `<a href=\"##privateMember\">#privateMember</a>` which can lead to broken links. Unfortunately, this cannot be handled by the plugin itself and needs to be managed by the theme.\n\nThe good news is that documenting modern code typically requires a modern theme anyway. Consider using the brand-new [JSDoc VisionTheme](https://github.com/alphanull/jsdoc-vision-theme), which addresses this issue and is fully tested and optimized for compatibility with this plugin.\n\n## License\n\n[MIT License](https://opensource.org/license/MIT)\n\nCopyright © 2025–present Frank Kudermann @ [alphanull.de](https://alphanull.de)\n","readmeFilename":"README.md"}