thamara / time-to-leave

Log work hours and get notified when it's time to leave the office and start to live.
http://timetoleave.app
GNU General Public License v3.0
455 stars 267 forks source link

[WIP] Migrating to Electron 28 #1054

Open araujoarthur0 opened 8 months ago

araujoarthur0 commented 8 months ago

Related issue

Closes #1037

Context / Background

The new electron 28 changes things by providing main electron imports through JS modules. That means we'll be able to use import syntax rather than node's require(), and no longer need the esm module to use both notations. The require() notation will still be available, making it the best of both worlds for other imports that haven't migrated yet - date-holidays for example.

This patch follows #1050 in which I cleaned some things in preparation.

What change is being introduced by this PR?

I am sending this PR as a call for help to finish migrating our tests. We have too much content to migrate and I'll probably take a long time to do it alone.

The way I'm running tests right now is for example npx electron-mocha .\__tests__\__main__\notification.mjs. Later on we can change our package.json targets.

How will this be tested?

Hopefully soon by electron-mocha.

araujoarthur0 commented 8 months ago

I will make a separate PR changing the tests to use node's assert rather than jest's expect to make reviewing better here.

tupaschoal commented 8 months ago

I'm converting this to draft, until the tests have been cleared and this can be rebased, ok @araujoarthur0 ?