Skip to content

Commit

Permalink
enable "zstd" local store/db compression by default
Browse files Browse the repository at this point in the history
  • Loading branch information
vladimiry committed Oct 28, 2022
1 parent 8e35269 commit 8f6e248
Show file tree
Hide file tree
Showing 21 changed files with 66 additions and 713 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Expand Up @@ -13,7 +13,7 @@ jobs:
steps:
# <common> TODO use YAML anchors feature when it gets supported
- { uses: actions/checkout@v2 }
- { uses: pnpm/action-setup@v2, with: { version: 7.5.2 } }
- { uses: pnpm/action-setup@v2, with: { version: "latest" } }
- { name: pnpm patch, if: runner.os == 'Windows', run: ./scripts/ci/github/patch-pnpm.ps1 }
- { uses: actions/setup-node@v2, with: { node-version: "${{ env.ELECTRON_MAIL_NODE_VERSION }}", cache: "pnpm" } }
- { name: system setup, if: runner.os == 'Linux', run: ./scripts/ci/github/system-setup-linux.sh }
Expand All @@ -40,7 +40,7 @@ jobs:
steps:
# <common> TODO use YAML anchors feature when it gets supported
- { uses: actions/checkout@v2 }
- { uses: pnpm/action-setup@v2, with: { version: 7.5.2 } }
- { uses: pnpm/action-setup@v2, with: { version: "latest" } }
- { name: pnpm patch, if: runner.os == 'Windows', run: ./scripts/ci/github/patch-pnpm.ps1 }
- { uses: actions/setup-node@v2, with: { node-version: "${{ env.ELECTRON_MAIL_NODE_VERSION }}", cache: "pnpm" } }
- { name: system setup, if: runner.os == 'Linux', run: ./scripts/ci/github/system-setup-linux.sh }
Expand All @@ -60,7 +60,7 @@ jobs:
steps:
# <common> TODO use YAML anchors feature when it gets supported
- { uses: actions/checkout@v2 }
- { uses: pnpm/action-setup@v2, with: { version: 7.5.2 } }
- { uses: pnpm/action-setup@v2, with: { version: "latest" } }
- { name: pnpm patch, if: runner.os == 'Windows', run: ./scripts/ci/github/patch-pnpm.ps1 }
- { uses: actions/setup-node@v2, with: { node-version: "${{ env.ELECTRON_MAIL_NODE_VERSION }}", cache: "pnpm" } }
- { name: system setup, if: runner.os == 'Linux', run: ./scripts/ci/github/system-setup-linux.sh }
Expand Down
1 change: 0 additions & 1 deletion README.md
Expand Up @@ -78,7 +78,6 @@ The [reproducible builds](https://en.wikipedia.org/wiki/Reproducible_builds) ide
- On `Linux`: `python`, `make` and a C/C++ compiler toolchain, like `GCC` are most likely already installed. Besides [keytar](https://github.com/atom/node-keytar) needs `libsecret` library to be installed.
- On `macOS`: `python` and [Xcode](https://developer.apple.com/xcode/download/) need to be installed. You also need to install the `Command Line Tools` via Xcode, can be found under the `Xcode -> Preferences -> Downloads` menu.
- ProtonMail's [WebClient](https://github.com/ProtonMail/WebClient) requires `yarn` to be available on your system. Additional setup is required if you run Windows, [see](https://github.com/ProtonMail/proton-shared/wiki/setup-windows).
- Make sure you have [Rust](https://www.rust-lang.org/) installed on the system.
- [Clone](https://help.github.com/articles/cloning-a-repository/) this project to your local device. If you are going to contribute, consider cloning the [forked](https://help.github.com/articles/fork-a-repo/) into your own GitHub account project.
- Install [pnpm](https://pnpm.io/installation).
- Install dependencies running `pnpm install --frozen-lockfile` (setting `PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1` environment variable might speed up the process).
Expand Down
2 changes: 2 additions & 0 deletions package.json
Expand Up @@ -18,6 +18,7 @@
"type": "module",
"main": "./app/electron-main/index.cjs",
"scripts": {
"postinstall": "node -e \"if (process.platform === 'win32') process.exit(0); require('child_process').exec('chmod +x ./node_modules/.bin/*')\"",
"prepare": "npm-run-all prepare:husky-install prepare:remove:prebuild-install prepare:ts-patch prepare:ts-patch:check",
"prepare:husky-install": "husky install",
"prepare:ts-patch": "ts-patch install -s",
Expand Down Expand Up @@ -124,6 +125,7 @@
"@ngrx/effects": "14.3.1",
"@ngrx/store": "14.3.1",
"@ngtools/webpack": "14.2.2",
"@oneidentity/zstd-js": "^1.0.2",
"@playwright/test": "1.25.2",
"@rgba-image/lanczos": "0.1.1",
"@t-bowersox/cookie": "1.0.0",
Expand Down
2 changes: 1 addition & 1 deletion patches/typescript-transform-paths@3.3.1.patch
Expand Up @@ -10,4 +10,4 @@ index 4fb647535a227ebe25fff6240f2111c1349c6596..6e2a314e1315cc5be7e6af908fae3721
+ return factory.updateImportDeclaration(node, node.decorators, node.modifiers, importClause, p, node.assertClause);
});
/**
* Update ExportDeclaration
* Update ExportDeclaration
18 changes: 15 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions pnpm-workspace.yaml

This file was deleted.

19 changes: 0 additions & 19 deletions scripts/electron-main-compile-compression-native.ts

This file was deleted.

6 changes: 3 additions & 3 deletions src/electron-main/context.ts
Expand Up @@ -238,9 +238,9 @@ export function initContext(
return {encryption};
},
},
async dbCompression(): Promise<Config["dbCompression"]> {
const {dbCompression} = await configStore.readExisting();
return dbCompression;
async dbCompression(): Promise<Config["dbCompression2"]> {
const {dbCompression2} = await configStore.readExisting();
return dbCompression2;
},
} as const;
return {
Expand Down
2 changes: 1 addition & 1 deletion src/electron-main/database/index.ts
Expand Up @@ -125,7 +125,7 @@ export class Database {
resolveKey: () => Promise<string>;
resolvePreset: () => Promise<KeyBasedPreset>;
}>;
dbCompression: () => Promise<Config["dbCompression"]>;
dbCompression: () => Promise<Config["dbCompression2"]>;
}>
) {
this.serializer = buildSerializer(this.options.file);
Expand Down

This file was deleted.

0 comments on commit 8f6e248

Please sign in to comment.