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 dayjs and calling .format()/.add()/.diff() throws ReferenceError: arguments is not defined. Plain arguments usage in a normal function/method works in Perry (verified), so the trigger is a specific form dayjs compiles to (likely arguments inside a nested/arrow/UMD-wrapped function where the binding is lost).
Repro
import dayjs from 'dayjs';
const d = dayjs('2026-06-14');
console.log(d.format('YYYY-MM-DD'), d.add(30, 'day').format('YYYY-MM-DD'), d.diff(dayjs('2026-01-01'), 'day'));
Expected (Node)
2026-06-14 2026-07-14 164
Actual (Perry)
ReferenceError: arguments is not defined
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
dayjsand calling.format()/.add()/.diff()throwsReferenceError: arguments is not defined. Plainargumentsusage in a normal function/method works in Perry (verified), so the trigger is a specific form dayjs compiles to (likelyargumentsinside a nested/arrow/UMD-wrapped function where the binding is lost).Repro
Expected (Node)
Actual (Perry)