File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ unreleased
2+ ========================
3+
4+ * fix: use static exports instead of lazy getters to improve ESM compatibility
5+
162.2.2 / 2026-01-07
27=========================
38
Original file line number Diff line number Diff line change @@ -24,41 +24,25 @@ exports = module.exports = bodyParser
2424 * JSON parser.
2525 * @public
2626 */
27- Object . defineProperty ( exports , 'json' , {
28- configurable : true ,
29- enumerable : true ,
30- get : ( ) => require ( './lib/types/json' )
31- } )
27+ exports . json = require ( './lib/types/json' )
3228
3329/**
3430 * Raw parser.
3531 * @public
3632 */
37- Object . defineProperty ( exports , 'raw' , {
38- configurable : true ,
39- enumerable : true ,
40- get : ( ) => require ( './lib/types/raw' )
41- } )
33+ exports . raw = require ( './lib/types/raw' )
4234
4335/**
4436 * Text parser.
4537 * @public
4638 */
47- Object . defineProperty ( exports , 'text' , {
48- configurable : true ,
49- enumerable : true ,
50- get : ( ) => require ( './lib/types/text' )
51- } )
39+ exports . text = require ( './lib/types/text' )
5240
5341/**
5442 * URL-encoded parser.
5543 * @public
5644 */
57- Object . defineProperty ( exports , 'urlencoded' , {
58- configurable : true ,
59- enumerable : true ,
60- get : ( ) => require ( './lib/types/urlencoded' )
61- } )
45+ exports . urlencoded = require ( './lib/types/urlencoded' )
6246
6347/**
6448 * Create a middleware to parse json and urlencoded bodies.
You can’t perform that action at this time.
0 commit comments