throwError(`yargs parser supports a minimum Node.js version of ${minNodeVersion}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`);
}
}
// Creates a yargs-parser instance using Node.js standard libraries:
constenv=process?process.env:{};
constparser=newYargsParser({
cwd:process.cwd,
env:()=>{
returnenv;
},
format,
normalize,
resolve,
// TODO: figure out a way to combine ESM and CJS coverage, such that
// we can exercise all the lines below:
require:(path)=>{
if(typeofrequire!=='undefined'){
returnrequire(path);
}
elseif(path.match(/\.json$/)){
returnreadFileSync(path,'utf8');
}
else{
throwError('only .json config files are supported in ESM');