Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to esm #183

Draft
wants to merge 13 commits into
base: trunk
Choose a base branch
from
Draft

Update to esm #183

wants to merge 13 commits into from

Conversation

sirbrillig
Copy link
Owner

This is a branch from #182 attempting to update the whole package to ESM, but it seems as though getting Electron Forge, TypeScript, ESM, Babel, and Webpack to all work together may be impossible currently.

Current status:

tsc works but the dev server fails because the transpiled main.js file from webpack is apparently cjs and so won't load correctly in an ESM environment. I don't know how to force webpack to leave ESM alone.

sirbrillig added a commit that referenced this pull request Sep 7, 2024
This prevents the issue described here: sindresorhus/electron-store#276

The recommended solution that issue is to convert the entire project to
ESM, which I've attempted in #183, but it doesn't seem to work because
of incompatibilities between Webpack and Electron Forge that I haven't
been able to resolve. So for now I'm just going to downgrade.
(The app works fine with or without the errors.)
sirbrillig added a commit that referenced this pull request Sep 7, 2024
* Remove minor TS warnings

* Temporarily remove eslint from dependencies

It has some sort of node requirement which prevents upgrading anything
else.

* Upgrade all packages to latest

* Update date-fns calls to new version

* Remove asset loading in main process WebPack config

The main process should have no assets.

* Downgrade webpack-asset-relocator-loader to 1.7.3

See electron/forge#3600

* Fix calls to formatDistanceToNow by fixing definitions of timestamps

updatedAt and gitnewsSeenAt are quite different and their types were
wrong.

* Install octokit

* Update tests to remove chai and sinon

* Remove chai and sinon

* Set node version in GH actions

* Fix TS errors in middleware

* Remove octokit

* Add semver types

* Downgrade electron-store to 8.2

This prevents the issue described here: sindresorhus/electron-store#276

The recommended solution that issue is to convert the entire project to
ESM, which I've attempted in #183, but it doesn't seem to work because
of incompatibilities between Webpack and Electron Forge that I haven't
been able to resolve. So for now I'm just going to downgrade.
(The app works fine with or without the errors.)

* Ignore extras directory
Base automatically changed from update-packages-to-electron-32 to trunk September 7, 2024 00:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant