Fix publishing: URL is not a constructor #69
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "fix/url-shadowing"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
A regression from #68, reported by the owner when publishing حدائقِ بخشش.
Cause: #68 added a constant named
URLin moderation.ts. It hid the globalURL, whichdataDir()uses for the default divan-data folder (new URL("../../../divan-data", import.meta.url)). Every publish withoutDIVAN_DATA_DIRset failed with "URL is not a constructor".The tests did not catch it because they always set
DIVAN_DATA_DIR, so the default is never evaluated there.Fix: the constants are renamed
TARGET_TITLEandTARGET_URL, with a comment saying why.Checked:
npm test42 pass; the module loads and the default folder resolves withoutDIVAN_DATA_DIR. The approved revision 215 is untouched and waiting for the owner to publish it.🤖 Generated with Claude Code