Skip to content

Commit b12b80b

Browse files
committed
Changed export to CommonJS to support older NodeJS versions.
1 parent 2766439 commit b12b80b

File tree

3 files changed

+14
-7
lines changed

3 files changed

+14
-7
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,15 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [1.2.1] - 2025-09-21
8+
9+
### Fixed
10+
11+
- Converted plugin from ES Modules to CommonJS format to resolve `ERR_REQUIRE_ESM` errors when JSDoc loads the plugin with `require()`.
12+
- Resolves [Issue #1](https://github.com/alphanull/jsdoc-plugin-esnext/issues/1)
13+
14+
---
15+
716
## [1.2.0] - 2025-09-01
817

918
### Added

index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
* - ES6 class mixin static members (fixes JSDoc bug #2146)
88
* It injects missing @function and @private tags where necessary and formats the resulting doclets consistently.
99
* @author Frank Kudermann @ alphanull
10-
* @version 1.2.0
10+
* @version 1.2.1
1111
* @license MIT
1212
*/
13-
export const handlers = {
13+
const handlers = {
1414

1515
/**
1616
* Triggered when a symbol (e.g. Method or field) is found during AST traversal.
@@ -278,3 +278,5 @@ export const handlers = {
278278
}
279279
}
280280
};
281+
282+
module.exports = { handlers };

package.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@alphanull/jsdoc-plugin-esnext",
3-
"version": "1.2.0",
3+
"version": "1.2.1",
44
"license": "MIT",
55
"description": "JSDoc plugin that adds full ES2022+ class-feature support – private fields, static members, arrow-bound methods, and ES6 default export fixes.",
66
"keywords": [
@@ -27,11 +27,7 @@
2727
"bugs": {
2828
"url": "https://github.com/alphanull/jsdoc-plugin-esnext/issues"
2929
},
30-
"type": "module",
3130
"main": "index.js",
32-
"exports": {
33-
".": "./index.js"
34-
},
3531
"files": [
3632
"assets",
3733
"index.js",

0 commit comments

Comments
 (0)