Perry: origin/main @ a674b6e (v0.5.1167) · macOS arm64
Setup: package compiled natively via perry.compilePackages (perry.allow.compilePackages: ["*"])
Build/run: perry repro.ts -o out && ./out
(Found via an internal real-package stress run — importing the real package and exercising it.)
Bug
Importing commander and constructing/using new Command() throws TypeError: undefined is not a constructor.
Repro
import { Command } from 'commander';
const program = new Command();
program.name('demo').option('-v, --verbose').argument('<file>');
program.parse(['node', 'x', 'in.txt', '-v']);
console.log(program.args[0], JSON.stringify(program.opts()));
Expected (Node)
Actual (Perry)
TypeError: undefined is not a constructor
Perry:
origin/main@ a674b6e (v0.5.1167) · macOS arm64Setup: package compiled natively via
perry.compilePackages(perry.allow.compilePackages: ["*"])Build/run:
perry repro.ts -o out && ./out(Found via an internal real-package stress run — importing the real package and exercising it.)
Bug
Importing
commanderand constructing/usingnew Command()throwsTypeError: undefined is not a constructor.Repro
Expected (Node)
Actual (Perry)