Commit Graph

17 Commits

Author SHA1 Message Date
LongYinan
332cd3b380
refactor(core): split web entry from core (#6082)
This pr is trying to split `web` and `electron` entries from `core`. It allows more platform-related optimization to be addressed in each entry.
We should remove all browser/electron only codes from `core` eventually, this is the very first step for that.
2024-03-19 07:48:56 +00:00
Peng Xiao
65b32156a8
build: do not fail build for a non-fatal error (#6017) 2024-03-05 08:27:47 +00:00
Peng Xiao
3fcbfe4d30
fix(electron): electron updater issues (#6005)
- generate-yml.js does not filter files correctly
- add version to generated bundles
- change `.AppImage` to `.appimage`. See https://github.com/electron-userland/electron-builder/blob/master/packages/electron-updater/src/providers/Provider.ts#L88
2024-03-05 03:27:52 +00:00
Peng Xiao
3881164854
build(electron): generate latest-linux.yml (#5822) 2024-02-19 14:25:02 +00:00
LongYinan
fa8655e43e
style: apply prefer-node-protocol lint rule (#5627)
it makes it perfectly clear that the package is a Node.js builtin module.
2024-01-19 03:47:08 +00:00
EYHN
265ee81666
refactor(infra): remove old plugin system (#5411)
plugin system need redesign
2023-12-27 02:49:59 +00:00
Joooye_34
9fbd9b39d6
ci: set version correctly and remove nightly build workflow (#5367) 2023-12-21 10:00:12 +00:00
Peng Xiao
e8cfc807ea
fix(electron): use tree-kill for electron dev (#5252)
electron process sometimes do not get re-spawned because of some child process not being closed.
use tree-kill instead.
2023-12-11 04:26:19 +00:00
LongYinan
0ee2ecc1e9
ci: always perform fresh build in deployment job (#5066) 2023-11-28 06:59:50 +00:00
Peng Xiao
8841dc3c4e
fix(electron): electron dev startup on win (#5031) 2023-11-27 08:45:33 +00:00
LongYinan
3499dbbb7f
feat: upgrade dependencies and lockfile (#5016)
- Close https://github.com/toeverything/AFFiNE/security/dependabot/47
2023-11-23 05:18:05 +00:00
Peng Xiao
3839a9bd15
build(electron): asar (#4965)
Due to restrictions on how Electron package works, the `node_modules` should not be hoisted and not to use s/h-links at all. This is why we need to have two separate installs for electron and non-electron packages in the build.

Tested via the following script

```bash
#!/bin/bash

echo "step 1: clean up"
find . -name "node_modules" -prune -exec rm -rf '{}' +
# git clean -dfX
build_type=canary

echo "step 2: install web dependencies"
# firstly, build web static
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 SENTRYCLI_SKIP_DOWNLOAD=1 PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 HUSKY=1 yarn

echo "step 3: generate assets"
BUILD_TYPE="$build_type" yarn workspace @affine/electron generate-assets

# cleanup node_modules
find . -name "node_modules" -prune -exec rm -rf '{}' +

echo "step 4: install electron dependencies"
# install electron deps
yarn config set nmHoistingLimits workspaces
yarn config set enableScripts false
yarn config set nmMode classic
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 HUSKY=0 yarn workspaces focus @affine/electron @affine/monorepo

echo "step 5: build native"
# build native
yarn workspace @affine/native build
yarn workspace @affine/storage build

echo "step 6: build electron"
# build electron
yarn workspace @affine/electron build

echo "step 7: package electron"
# package
SKIP_GENERATE_ASSETS=1 BUILD_TYPE="$build_type" HOIST_NODE_MODULES=1 yarn workspace @affine/electron package
```
2023-11-21 17:44:30 +00:00
Peng Xiao
a8d89254ce
fix(electron): dev reload (#4911) 2023-11-12 03:19:27 +00:00
Alex Yang
d9e2d17a26 refactor: cleanup code 2023-10-20 19:28:04 -05:00
Alex Yang
97d8660a54
refactor(electron): fix vitest and add behavior test (#4655) 2023-10-18 22:14:30 -05:00
Alex Yang
b14a6bc29e build: fix generate-assets.ts 2023-10-18 16:33:09 -05:00
Joooye_34
bed9310519
refactor(infra): directory structure (#4615) 2023-10-18 15:30:08 +00:00