<!-- Thank you for reporting an issue. This issue tracker is for bugs and issues found within Node.js core. If you require more general support please file an issue on our help repo. https://github.com/nodejs/help Please fill in as much of the template below as you're able. Version: output of `node -v` Platform: output of `uname -a` (UNIX), or version and 32 or 64-bit (Windows) Subsystem: if known, please specify affected core module name If possible, please provide code that demonstrates the problem, keeping it as simple and free of external dependencies as you are able. --> * **Version**: * **Platform**: * **Subsystem**: <!-- Enter your issue details below this comment. --> Version : v8.2.1 Platform: Windows (64 bit) Code ```js const os = require('os'); console.log(os.EOL + " is the EOL"); os.EOL = "12345" console.log(os.EOL + " is the EOL"); ``` Output ``` is the EOL 12345 is the EOL ``` os.EOL is specified as a constant but its value is getting updated
Activity
[-]version: v8.2.1[/-][+]version: v8.2.1 [/+][-]version: v8.2.1 [/-][+]os.EOL constant issue[/+]XadillaX commentedon Aug 4, 2017
I think we may define
os.EOLby usingObject.definePropertywith not configurable and not writable? Then we mark that update with SEMVER-MAJOR?If we can do that, I'll take this work.
TimothyGu commentedon Aug 4, 2017
I'm okay with that.
vishal7201 commentedon Aug 4, 2017
I'd love to address this issue! How can I submit a PR for this?
os: make EOL non-configurable and readonly
XadillaX commentedon Aug 4, 2017
@vishal7201 Sorry but I just saw your reply after I finished the PR.
vishal7201 commentedon Aug 4, 2017
No problem @XadillaX
addaleax commentedon Aug 4, 2017
@vishal7201 How did you discover this? Is this causing issues for you?
vishal7201 commentedon Aug 4, 2017
@addaleax I was just playing with os module in REPL mode and just figured it out!
os: make EOL configurable and read only