* Add plugin for offline PWA support
* Add release notes
* Attempt to fix kcab fetch issue
* Fix type errors
* Cache more file types
* Empty commit to try to bump action
* Attempt to fix fonts
This significantly speeds up `yarn lint` for me. It also ensures we’re
listing all source files in the project, including the `.eslintrc` files
and any other files that may be present.
- New linter rules are now added
- Perhaps the `createPayee` method i've tagged with a disable should be
deleted.
- I have ignored unused methods in Plaid/Mobile as this stuff is still
WIP/experimental?
After #1115, new Node.js versions will be able to be used for
development of the frontend. This PR changes the recommended Node.js
version to 18 (the current LTS version). I have also tested with 16 and
20 and it works.
I also took the opportunity to:
- move the build script that was at the project root to the `bin/`
folder
- update the `browserslist` to target Electron 24 (which is the version
we currently build against). This results in a slightly smaller bundle
due to no longer having to transpile optional chaining.
Updates to the latest version of electron and moves the backend-frontend
communication from node-ipc to websockets. This resolves the previous
roadblock regarding `nodeIntegration` .
Done
- Remove node-ipc in favour of websockets.
- Move file copying out of `preload.js` to avoid importing module `fs`
there
- Bump all electron pacakge versions to the latest
- Added new package for finding open ports as node-ipc is gone
- Tweaked webpack config for above changes
Partially fixes#468
Questions/ Pending:
- Literally every single test fails for me, presumably some issue with
my setup/environment.
- The websocket communication is not using TLS. I'm not sure how to
enable this, or if we even need to as its all local.
- Still need to create the CI for building/deploying but I'm not sure
where start in this regard as i have no exp with it. Presumably we will
need to point the electron auto-updater to the github releases url's. If
people are happy with this PR I will look at adding the CI before its
merged.
- In dev mode only, I have disabled TLS security becuase my docker
container's cert is not signed. I _assume_ this will be true for other
people who spin up the server on thier own hardware. Perhaps I just need
to change my cert to one from letsencrypt or something...
Notes.
I have not touched javascript in eons so my apologies if the commit
trail is a bit fragmented. I tried to keep them fairly contained and
then there is a slightly gnarly final commit fixing all the linter
issues... Please let me know if you want me to squash some commits etc.
I initially tried to move this to web workers the same way the web app
does it but this was unsuccessful. I have found no way to spin up a
worker in one place (frontend/backend) and then pass this worker to the
other. The electron ipc channels don't allow you to directly pass
objects such as workers, everything is cloned/serialised. Passing a port
number so the other end can spin up its own socket works fine.
---------
Co-authored-by: Shazib Hussain <contact@shazib.com>
Co-authored-by: Jed Fox <git@jedfox.com>
before:
```
kcab.worker.4bdc73a8d45eb2115156.js (2.1 MiB)
xfo.kcab.worker.4bdc73a8d45eb2115156.js (1010 KiB)
```
after:
```
kcab.worker.39f5fba82d7bc7477962.js (1.41 MiB)
xfo.kcab.worker.39f5fba82d7bc7477962.js (1000 KiB)
```
What’s changed:
- `loot-core` did not have a `browserslist` config, so
`@babel/preset-env` assumes we want to [transpile all the way back to
ES5](https://babeljs.io/docs/options#no-targets). I’ve removed the
`browserslist` config from each of the `package.json` files and moved it
to the root so this doesn’t happen again.
- I updated the target from `electron 3.0` to `electron 12.0` to match
our Electron dependency
- I’ve added `defaults` (currently equivalent to `> 0.5%, last 2
versions, Firefox ESR, not dead`) which is [recommended by
browserslist](https://browsersl.ist/#q=defaults). We could consider
tightening this, but it doesn’t offer a ton of space savings at this
point to just target Electron 12.
- Since much less transpilation will be happening, stack traces (dev and
prod) will be much easier to read!
* Run `yarn dedupe`
* Update to better-sqlite3@latest
* Remove react-native
* Remove a bunch more unused deps
* Update mitt to 3.0
* Remove a few more
* Remove react-native-gesture-handler
* Revert "Update to better-sqlite3@latest"
This reverts commit d436bc8d73f2745f484def4e40596322d0c56458.
* Dedupe better-sqlite3 versions
* snapshots!
* Fix jsdom error
* Revert "Dedupe better-sqlite3 versions"
This reverts commit f99d2ab6f9.
* Add back jest-watch-typeahead
* Fix conflicting Jest version
(The jest-environment-jsdom package that is magically available seems to only be compatible with Jest 27)
* master:
fix: correct import of merkle in test
chore: move snapshot to new dir
refactor: move crdt files into separate directory
revert: revert pruning of svg imports
style: nicer re-exporting syntax
refactor: remove unused imports
chore: update package scripts to take advantage of yarn v3
build: add missing eslint dependency to loot-core
build: add cross-env dependency to desktop-client package.json
build: remove deprecated nohoist settings and prevent hoisting of mobile dependencies
fix: move downshift patch to monorepo root
CI: update CI definition to use yarn v3
fix: wrap glob in quotes so that it's properly passed to npm-run-all
chore: update root yarn scripts to use `workspace` command instead of cd
chore: fix broken builds
chore: update to yarnv3 and fix missing packages preventing install
Force react-error-overlay to 6.0.9 to fix error
Add docs for building for windows (contributed by @ejmurra)
add: tsconfig.json