-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Description
newman run on node 24 or higher produces this runtime deprecation warning:
(node:26419) [DEP0176] DeprecationWarning: fs.F_OK is deprecated, use fs.constants.F_OK instead
at newman/lib/run/secure-fs.js:146:92
at Array.map (<anonymous>)
at Object.<anonymous> (newman/lib/run/secure-fs.js:144:32)
This is because the code (uselessly?) iterates over all enumerable properties of the fs module which triggers node's deprecation getters:
Lines 143 to 151 in 74a4554
| // Attach all functions in fs to postman-fs | |
| Object.getOwnPropertyNames(fs).map((prop) => { | |
| // Bail-out early to prevent fs module from logging warning for deprecated and experimental methods | |
| if (prop === DEPRECATED_SYNC_WRITE_STREAM || prop === EXPERIMENTAL_PROMISE || typeof fs[prop] !== FUNCTION) { | |
| return; | |
| } | |
| SecureFS.prototype[prop] = fs[prop]; | |
| }); |
A quick workaround would be to add a exclusion for accessing F_OK.
Metadata
Metadata
Assignees
Labels
No labels