fix(omp): resolve Bun redeclaration syntax error and add omp key - #594
fix(omp): resolve Bun redeclaration syntax error and add omp key#594saeidakbari wants to merge 1 commit into
Conversation
|
Tested this against Oh My Pi (omp) 16.5.0 today (2026-07-14) and wanted to confirm this fix covers a second, related failure mode — not just the Repro on unpatched Install rolls back cleanly (no half-installed state), but the extension never loads — Tested this PR's branch directly ( Installs and loads cleanly — the |
This PR fixes a syntax error when installing the ponytail extension under
omp(Oh My Pi).Problem
In the
ompenvironment (which runs on Bun),requireis pre-defined globally. Definingconst require = createRequire(import.meta.url)in ESM files throws aSyntaxError: Cannot declare a const variable twice: 'require'. This triggers an installation rollback during validation.Fix
requirevariables tocjsRequireacross all ESM files to avoid redeclaration syntax conflicts in Bun."omp"manifest key alongside"pi"inpackage.jsonfor proper native package resolution in Oh My Pi.