Cypress and Jest both define "expect", but they come from different
libraries (Cypress uses Chai, Jest uses its own thing). So we can't
include both of them in the tsconfig.json. Conveniently, however, we
don't need any of the test code to be part of the main project, so
it suffices to give these things their own tsconfig.json files.
That being done, adding "jest" to the global types lets us remove all
those imports.
Cypress and Jest both define "expect", but they come from different
libraries (Cypress uses Chai, Jest uses its own thing). So we can't
include both of them in the tsconfig.json. Conveniently, however, we
don't need any of the test code to be part of the main project, so
it suffices to give cypress its own tsconfig.json file.
That being done, adding "jest" to the global types lets us remove all
those imports.
depcheck is useful here. Has some false reports, but there are some
unused packages and some missing ones. Also I moved types to dev-
dependencies because we don't use them at runtime.
Replaces the `npm run allbuild` script with the `npm version` command.
It creates a new commit with a standardized message & includes the built
app.
Usage: `npm version [patch | minor | version | 10.0.0 | etc]`
Will update the package.json & perform a bunch of steps in a row:
- Runs `npm install` in:
- The root directory
- The ./electron/ directory
- The ./tools/bump-version/ directory
- Runs `npm run test`
- Update the version string in:
- ./electron/package.json (version)
- ./src/Constants.ts (VersionString)
- ./doc/source/conf.py (version & release)
- Runs `npm run doc` (build the markdown documentation)
- Runs `npm run build` (production build)
- Runs `npm run electron` (electron build)
- Runs `git add --all`
- Runs `git push -u origin dev && git push --tags`
It did not resolve all of the vulns as some are gated behind breaking
changes. Most of them seem to be resolved when updating to webpack 5
Also moves devDependencies out of normal dependencies, as a few libs
were better suited for dev.