Closed BerniWittmann closed 2 years ago
@BerniWittmann
Thank you for reporting the issue. I was not aware.
I m no expert in Babel, so that is why I m trying to use simple JavaScript.
I ll see what I can do to fix the issue: or try Babel or replace the optional chaining with plain chained if.
@BerniWittmann
In the 1.6.4 release of openapi-format, NodeJS 12 should be supported and the package is set to require minimum nodejs 12 to prevent future unclarity.
@thim81 Awesome, thank you very much. Especially thanks for the quick response 👍
@BerniWittmann Based on your feedback, we can make the package more stable, so thank you for taking the time to provide the feedback.
With commit https://github.com/thim81/openapi-format/commit/56713e7e7be7309937b21b8a42c3d2c19036ab52 this library started using more modern language features.
This causes problems when running the library on node 12
Reproduction:
This result in the Error:
Unexpected token '.'
(To be exact bin/cli.js:143cliLog.unusedComp = resFilter?.resultData?.unusedComp;
Doing the above on node 14 works flawlessly.
I would advise to specify the engines option in package.json and then install a compiler like Babel or sth. similar for easy compatibility with older node versions
In the meantime the workaround is to use node 14