fix config file: "html5" and "includeAutoGeneratedTags" were ignored
the fix for #860 enabled disabling these 2 flags from the command line but also made them uncontrollable from the JSON config file
old commander.js (not 2021 commander.js) assigns boolean true unconditionally as defaultValue for all --no- arguments, when minifier fuses command line and JSON config file options together in cli.js's createOptions(), it sees program["includeAutoGeneratedTags"] = true and ignored config["includeAutoGeneratedTags"], in my case "= false". Delete the defaultValue/key from commander.js object before parsing user's ARGV to solve the bug.
EXTRA NOTES this probably fixes https://github.com/kangax/html-minifier/issues/1045
work around for old/publish html-minifiers is to always put --no-include-auto-generated-tags on cmd line in addition to "includeAutoGeneratedTags": false in json config file
Would be great to have this PR at https://github.com/terser/html-minifier-terser too =)
@bulk88 does this apply to the latest commander too? I'm wondering because the plan is to update all deps to the latest version.
I don't know. commander module from 10 years ago and 2021 commander module have almost no source code in common by now when I debugged this/wrote the patch and there was no attempt at back (bug) compat by commander's authors IIRC.