mirror of
https://github.com/thisisjaymehta/bentopdf.git
synced 2026-04-08 21:06:45 +00:00
[PR #1] Fix ESM/CJS conflict: rename electron/*.js to *.cjs #1
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
thisisjaymehta/bentopdf#1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
📋 Pull Request Information
Original PR: https://github.com/thisisjaymehta/bentopdf/pull/1
Author: @Copilot
Created: 2/10/2026
Status: 🔄 Open
Base:
main← Head:copilot/convert-app-to-electron📝 Commits (4)
b67dcffInitial plan1d1ed1dAdd Electron wrapper with PDF file association support for Windowsa9c9576Address code review feedback: cross-platform dev runner, IPC cleanup, simplified buffer70445c9Rename electron/*.js to *.cjs to fix ESM/CJS conflict📊 Changes
8 files changed (+318 additions, -3 deletions)
View changed files
📝
.gitignore(+4 -1)➕
electron/dev-runner.cjs(+55 -0)➕
electron/main.cjs(+139 -0)➕
electron/preload.cjs(+23 -0)📝
eslint.config.mjs(+1 -1)📝
package.json(+62 -1)📝
src/js/logic/edit-pdf-page.ts(+25 -0)➕
src/types/electron.d.ts(+9 -0)📄 Description
Description
package.jsondeclares"type": "module", causing Node.js to treat.jsfiles as ESM. The Electron files use CommonJSrequire(), resulting in:Renamed all Electron files to
.cjsand updated references:electron/main.js→electron/main.cjs(also updated internalpreload.js→preload.cjspath)electron/preload.js→electron/preload.cjselectron/dev-runner.js→electron/dev-runner.cjspackage.json: updated"main",electron:devscript, andbuild.filesexclusionType of change
🧪 How Has This Been Tested?
Checklist:
Expected Results:
node electron/dev-runner.cjsparses without ESM errors; all three.cjsfiles passnode -csyntax check.Actual Results:
.jsreferences to electron files in the codebase.Checklist:
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.