mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-09-11 19:47:35 +03:00
chore: bump up all non-major dependencies (#5499)
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@aws-sdk/client-s3](https://togithub.com/aws/aws-sdk-js-v3/tree/main/clients/client-s3) ([source](https://togithub.com/aws/aws-sdk-js-v3/tree/HEAD/clients/client-s3)) | [`3.484.0` -> `3.485.0`](https://renovatebot.com/diffs/npm/@aws-sdk%2fclient-s3/3.484.0/3.485.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@aws-sdk%2fclient-s3/3.485.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@aws-sdk%2fclient-s3/3.485.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@aws-sdk%2fclient-s3/3.484.0/3.485.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@aws-sdk%2fclient-s3/3.484.0/3.485.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [@napi-rs/cli](https://togithub.com/napi-rs/napi-rs) | [`3.0.0-alpha.29` -> `3.0.0-alpha.30`](https://renovatebot.com/diffs/npm/@napi-rs%2fcli/3.0.0-alpha.29/3.0.0-alpha.30) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@napi-rs%2fcli/3.0.0-alpha.30?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@napi-rs%2fcli/3.0.0-alpha.30?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@napi-rs%2fcli/3.0.0-alpha.29/3.0.0-alpha.30?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@napi-rs%2fcli/3.0.0-alpha.29/3.0.0-alpha.30?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [@node-rs/jsonwebtoken](https://togithub.com/napi-rs/node-rs) | [`^0.2.3` -> `^0.3.0`](https://renovatebot.com/diffs/npm/@node-rs%2fjsonwebtoken/0.2.3/0.3.1) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@node-rs%2fjsonwebtoken/0.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@node-rs%2fjsonwebtoken/0.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@node-rs%2fjsonwebtoken/0.2.3/0.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@node-rs%2fjsonwebtoken/0.2.3/0.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [@opentelemetry/instrumentation-socket.io](https://togithub.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/instrumentation-socket.io#readme) ([source](https://togithub.com/open-telemetry/opentelemetry-js-contrib)) | [`^0.34.4` -> `^0.35.0`](https://renovatebot.com/diffs/npm/@opentelemetry%2finstrumentation-socket.io/0.34.4/0.35.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@opentelemetry%2finstrumentation-socket.io/0.35.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@opentelemetry%2finstrumentation-socket.io/0.35.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@opentelemetry%2finstrumentation-socket.io/0.34.4/0.35.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@opentelemetry%2finstrumentation-socket.io/0.34.4/0.35.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [@storybook/test-runner](https://togithub.com/storybookjs/test-runner) | [`^0.15.2` -> `^0.16.0`](https://renovatebot.com/diffs/npm/@storybook%2ftest-runner/0.15.2/0.16.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@storybook%2ftest-runner/0.16.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@storybook%2ftest-runner/0.16.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@storybook%2ftest-runner/0.15.2/0.16.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@storybook%2ftest-runner/0.15.2/0.16.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [@vitest/coverage-istanbul](https://togithub.com/vitest-dev/vitest/tree/main/packages/coverage-istanbul#readme) ([source](https://togithub.com/vitest-dev/vitest/tree/HEAD/packages/coverage-istanbul)) | [`1.1.1` -> `1.1.2`](https://renovatebot.com/diffs/npm/@vitest%2fcoverage-istanbul/1.1.1/1.1.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@vitest%2fcoverage-istanbul/1.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@vitest%2fcoverage-istanbul/1.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@vitest%2fcoverage-istanbul/1.1.1/1.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@vitest%2fcoverage-istanbul/1.1.1/1.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [@vitest/ui](https://togithub.com/vitest-dev/vitest/tree/main/packages/ui#readme) ([source](https://togithub.com/vitest-dev/vitest/tree/HEAD/packages/ui)) | [`1.1.1` -> `1.1.2`](https://renovatebot.com/diffs/npm/@vitest%2fui/1.1.1/1.1.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@vitest%2fui/1.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@vitest%2fui/1.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@vitest%2fui/1.1.1/1.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@vitest%2fui/1.1.1/1.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [vitest](https://togithub.com/vitest-dev/vitest) ([source](https://togithub.com/vitest-dev/vitest/tree/HEAD/packages/vitest)) | [`1.1.1` -> `1.1.2`](https://renovatebot.com/diffs/npm/vitest/1.1.1/1.1.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/vitest/1.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/vitest/1.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/vitest/1.1.1/1.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/vitest/1.1.1/1.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>aws/aws-sdk-js-v3 (@​aws-sdk/client-s3)</summary> ### [`v3.485.0`](https://togithub.com/aws/aws-sdk-js-v3/blob/HEAD/clients/client-s3/CHANGELOG.md#34850-2024-01-03) [Compare Source](https://togithub.com/aws/aws-sdk-js-v3/compare/v3.484.0...v3.485.0) ##### Features - **credential-providers:** add credentialScope field ([#​5606](https://togithub.com/aws/aws-sdk-js-v3/issues/5606)) ([04c1459](04c1459289
)) </details> <details> <summary>napi-rs/napi-rs (@​napi-rs/cli)</summary> ### [`v3.0.0-alpha.30`](https://togithub.com/napi-rs/napi-rs/releases/tag/%40napi-rs/cli%403.0.0-alpha.30) [Compare Source](https://togithub.com/napi-rs/napi-rs/compare/@napi-rs/cli@3.0.0-alpha.29...@napi-rs/cli@3.0.0-alpha.30) ##### What's Changed - chore(deps): lock file maintenance by [@​renovate](https://togithub.com/renovate) in [https://github.com/napi-rs/napi-rs/pull/1882](https://togithub.com/napi-rs/napi-rs/pull/1882) - fix(cli): wasi fallback package load logic by [@​Brooooooklyn](https://togithub.com/Brooooooklyn) in [https://github.com/napi-rs/napi-rs/pull/1887](https://togithub.com/napi-rs/napi-rs/pull/1887) - fix(cli): upload to github releases issue by [@​Brooooooklyn](https://togithub.com/Brooooooklyn) in [https://github.com/napi-rs/napi-rs/pull/1888](https://togithub.com/napi-rs/napi-rs/pull/1888) **Full Changelog**: https://github.com/napi-rs/napi-rs/compare/[@​napi-rs/cli](https://togithub.com/napi-rs/cli)[@​3](https://togithub.com/3).0.0-alpha.29...[@​napi-rs/cli](https://togithub.com/napi-rs/cli)[@​3](https://togithub.com/3).0.0-alpha.30 </details> <details> <summary>napi-rs/node-rs (@​node-rs/jsonwebtoken)</summary> ### [`v0.3.1`](https://togithub.com/napi-rs/node-rs/compare/@node-rs/jsonwebtoken@0.3.0...@node-rs/jsonwebtoken@0.3.1) [Compare Source](https://togithub.com/napi-rs/node-rs/compare/@node-rs/jsonwebtoken@0.3.0...@node-rs/jsonwebtoken@0.3.1) ### [`v0.3.0`](https://togithub.com/napi-rs/node-rs/compare/@node-rs/jsonwebtoken@0.2.3...@node-rs/jsonwebtoken@0.3.0) [Compare Source](https://togithub.com/napi-rs/node-rs/compare/@node-rs/jsonwebtoken@0.2.3...@node-rs/jsonwebtoken@0.3.0) </details> <details> <summary>open-telemetry/opentelemetry-js-contrib (@​opentelemetry/instrumentation-socket.io)</summary> ### [`v0.35.0`](efdfc727a4...f81f8a76a8
) [Compare Source](a757b5e443...9092823125
) </details> <details> <summary>storybookjs/test-runner (@​storybook/test-runner)</summary> ### [`v0.16.0`](https://togithub.com/storybookjs/test-runner/releases/tag/v0.16.0) [Compare Source](https://togithub.com/storybookjs/test-runner/compare/v0.15.2...v0.16.0) ##### 🚀 Enhancement - Introduce logLevel configuration [#​406](https://togithub.com/storybookjs/test-runner/pull/406) ([@​yannbf](https://togithub.com/yannbf)) ##### 🐛 Bug Fix - Filter duplicated error messages in browser logs [#​405](https://togithub.com/storybookjs/test-runner/pull/405) ([@​yannbf](https://togithub.com/yannbf)) - Fix sync issues between tests [#​404](https://togithub.com/storybookjs/test-runner/pull/404) ([@​yannbf](https://togithub.com/yannbf)) - Refactor: Extract the setup page scripts into a separate file [#​403](https://togithub.com/storybookjs/test-runner/pull/403) ([@​yannbf](https://togithub.com/yannbf)) - Docs: Adds feedback form to migration documentation [#​402](https://togithub.com/storybookjs/test-runner/pull/402) ([@​jonniebigodes](https://togithub.com/jonniebigodes)) - Bump `jest-playwright-preset` from `v3.0.1` to `v4.0.0` [#​400](https://togithub.com/storybookjs/test-runner/pull/400) ([@​kemuridama](https://togithub.com/kemuridama)) - Improve type safety and code quality [#​383](https://togithub.com/storybookjs/test-runner/pull/383) ([@​bryanjtc](https://togithub.com/bryanjtc) [@​yannbf](https://togithub.com/yannbf)) - Refactor: Improve internal code [#​378](https://togithub.com/storybookjs/test-runner/pull/378) ([@​bryanjtc](https://togithub.com/bryanjtc) [@​yannbf](https://togithub.com/yannbf)) ##### Authors: 4 - [@​jonniebigodes](https://togithub.com/jonniebigodes) - Bryan Thomas ([@​bryanjtc](https://togithub.com/bryanjtc)) - Ryo Ochiai ([@​kemuridama](https://togithub.com/kemuridama)) - Yann Braga ([@​yannbf](https://togithub.com/yannbf)) </details> <details> <summary>vitest-dev/vitest (@​vitest/coverage-istanbul)</summary> ### [`v1.1.2`](https://togithub.com/vitest-dev/vitest/releases/tag/v1.1.2) [Compare Source](https://togithub.com/vitest-dev/vitest/compare/v1.1.1...v1.1.2) ##### 🐞 Bug Fixes - Remove internal flag from UI option in the config - by [@​sheremet-va](https://togithub.com/sheremet-va) [<samp>(7b4a2)</samp>](https://togithub.com/vitest-dev/vitest/commit/7b4a2fce) - **browser**: - Avoid safaridriver collision - by [@​mbland](https://togithub.com/mbland) in [https://github.com/vitest-dev/vitest/issues/4863](https://togithub.com/vitest-dev/vitest/issues/4863) [<samp>(345a2)</samp>](https://togithub.com/vitest-dev/vitest/commit/345a25d6) - Resolved failure to find arbitrarily-named snapshot files when using `expect(...).toMatchFileSnapshot()` matcher. - by [@​zmullett](https://togithub.com/zmullett), **Zac Mullett** and [@​sheremet-va](https://togithub.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/4839](https://togithub.com/vitest-dev/vitest/issues/4839) [<samp>(b8140)</samp>](https://togithub.com/vitest-dev/vitest/commit/b8140fca) - Handle config.base - by [@​mbland](https://togithub.com/mbland) and [@​sheremet-va](https://togithub.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/4686](https://togithub.com/vitest-dev/vitest/issues/4686) and [https://github.com/vitest-dev/vitest/issues/4692](https://togithub.com/vitest-dev/vitest/issues/4692) [<samp>(9e345)</samp>](https://togithub.com/vitest-dev/vitest/commit/9e34557e) - **deps**: - Update dependency acorn-walk to ^8.3.1 - by [@​renovate](https://togithub.com/renovate)\[bot] in[https://github.com/vitest-dev/vitest/issues/4837](https://togithub.com/vitest-dev/vitest/issues/4837)7 [<samp>(47bc2)</samp>](https://togithub.com/vitest-dev/vitest/commit/47bc233d) - Update dependency sirv to ^2.0.4 - by [@​renovate](https://togithub.com/renovate)\[bot] in[https://github.com/vitest-dev/vitest/issues/4838](https://togithub.com/vitest-dev/vitest/issues/4838)8 [<samp>(df261)</samp>](https://togithub.com/vitest-dev/vitest/commit/df261ae1) - **runner**: - Fix fixture cleanup for concurrent tests - by [@​hi-ogawa](https://togithub.com/hi-ogawa) in [https://github.com/vitest-dev/vitest/issues/4827](https://togithub.com/vitest-dev/vitest/issues/4827) [<samp>(1fee6)</samp>](https://togithub.com/vitest-dev/vitest/commit/1fee63f2) - **spy**: - Don't allow `Promise` in `mockImplementation` if it's not in the function signature - by [@​sheremet-va](https://togithub.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/4859](https://togithub.com/vitest-dev/vitest/issues/4859) [<samp>(072e0)</samp>](https://togithub.com/vitest-dev/vitest/commit/072e02bf) - **vite-node**: - Correctly return cached result - by [@​sheremet-va](https://togithub.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/4870](https://togithub.com/vitest-dev/vitest/issues/4870) [<samp>(15bbb)</samp>](https://togithub.com/vitest-dev/vitest/commit/15bbbf81) - **vitest**: - Throw an error if mock was already loaded when `vi.mock` is called - by [@​sheremet-va](https://togithub.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/4862](https://togithub.com/vitest-dev/vitest/issues/4862) [<samp>(e12a5)</samp>](https://togithub.com/vitest-dev/vitest/commit/e12a5a36) - Correctly rerun test files on change if server was restarted - by [@​sheremet-va](https://togithub.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/4871](https://togithub.com/vitest-dev/vitest/issues/4871) [<samp>(6088b)</samp>](https://togithub.com/vitest-dev/vitest/commit/6088b372) - **vm-threads**: - Don't crash on percentage based `memoryLimit` - by [@​inottn](https://togithub.com/inottn) and [@​AriPerkkio](https://togithub.com/AriPerkkio) in [https://github.com/vitest-dev/vitest/issues/4802](https://togithub.com/vitest-dev/vitest/issues/4802) [<samp>(70e8a)</samp>](https://togithub.com/vitest-dev/vitest/commit/70e8a389) ##### [View changes on GitHub](https://togithub.com/vitest-dev/vitest/compare/v1.1.1...v1.1.2) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/toeverything/AFFiNE). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMDMuMSIsInVwZGF0ZWRJblZlciI6IjM3LjEyMS4wIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5In0=-->
This commit is contained in:
parent
f6ec786ef9
commit
3cdfa8ca22
3
.github/workflows/build-test.yml
vendored
3
.github/workflows/build-test.yml
vendored
@ -520,8 +520,7 @@ jobs:
|
||||
- name: Run unit tests
|
||||
if: ${{ matrix.spec.test }}
|
||||
shell: bash
|
||||
run: yarn vitest
|
||||
working-directory: packages/frontend/electron
|
||||
run: yarn workspace @affine/electron vitest
|
||||
|
||||
- name: Download core artifact
|
||||
uses: ./.github/actions/download-core
|
||||
|
@ -74,8 +74,8 @@
|
||||
"@vanilla-extract/vite-plugin": "^3.9.2",
|
||||
"@vanilla-extract/webpack-plugin": "^2.3.1",
|
||||
"@vitejs/plugin-react-swc": "^3.5.0",
|
||||
"@vitest/coverage-istanbul": "1.1.1",
|
||||
"@vitest/ui": "1.1.1",
|
||||
"@vitest/coverage-istanbul": "1.1.2",
|
||||
"@vitest/ui": "1.1.2",
|
||||
"electron": "^27.1.0",
|
||||
"eslint": "^8.54.0",
|
||||
"eslint-config-prettier": "^9.0.0",
|
||||
@ -107,7 +107,7 @@
|
||||
"vite-plugin-istanbul": "^5.0.0",
|
||||
"vite-plugin-static-copy": "^1.0.0",
|
||||
"vite-tsconfig-paths": "^4.2.1",
|
||||
"vitest": "1.1.1",
|
||||
"vitest": "1.1.2",
|
||||
"vitest-fetch-mock": "^0.2.2",
|
||||
"vitest-mock-extended": "^1.3.1"
|
||||
},
|
||||
|
@ -36,7 +36,7 @@
|
||||
"@nestjs/websockets": "^10.2.10",
|
||||
"@node-rs/argon2": "^1.5.2",
|
||||
"@node-rs/crc32": "^1.7.2",
|
||||
"@node-rs/jsonwebtoken": "^0.2.3",
|
||||
"@node-rs/jsonwebtoken": "^0.3.0",
|
||||
"@opentelemetry/api": "^1.7.0",
|
||||
"@opentelemetry/core": "^1.19.0",
|
||||
"@opentelemetry/exporter-prometheus": "^0.46.0",
|
||||
@ -47,7 +47,7 @@
|
||||
"@opentelemetry/instrumentation-http": "^0.46.0",
|
||||
"@opentelemetry/instrumentation-ioredis": "^0.36.0",
|
||||
"@opentelemetry/instrumentation-nestjs-core": "^0.33.3",
|
||||
"@opentelemetry/instrumentation-socket.io": "^0.34.4",
|
||||
"@opentelemetry/instrumentation-socket.io": "^0.35.0",
|
||||
"@opentelemetry/resources": "^1.19.0",
|
||||
"@opentelemetry/sdk-metrics": "^1.19.0",
|
||||
"@opentelemetry/sdk-node": "^0.46.0",
|
||||
|
@ -51,7 +51,7 @@ export class AuthService {
|
||||
exp: now + this.config.auth.accessTokenExpiresIn,
|
||||
iss: this.config.serverId,
|
||||
sub: user.id,
|
||||
aud: user.name,
|
||||
aud: 'https://affine.pro',
|
||||
jti: randomUUID({
|
||||
disableEntropyCache: true,
|
||||
}),
|
||||
@ -80,7 +80,7 @@ export class AuthService {
|
||||
iat: now,
|
||||
iss: this.config.serverId,
|
||||
sub: user.id,
|
||||
aud: user.name,
|
||||
aud: 'https://affine.pro',
|
||||
jti: randomUUID({
|
||||
disableEntropyCache: true,
|
||||
}),
|
||||
@ -100,6 +100,7 @@ export class AuthService {
|
||||
iss: [this.config.serverId],
|
||||
leeway: this.config.auth.leeway,
|
||||
requiredSpecClaims: ['exp', 'iat', 'iss', 'sub'],
|
||||
aud: ['https://affine.pro'],
|
||||
})
|
||||
).data as UserClaim;
|
||||
|
||||
|
@ -38,7 +38,7 @@ export const jwtEncode = async (
|
||||
exp: now + (maxAge ?? config.auth.accessTokenExpiresIn),
|
||||
iss: config.serverId,
|
||||
sub: user.id,
|
||||
aud: user.name,
|
||||
aud: 'https://affine.pro',
|
||||
jti: randomUUID({
|
||||
disableEntropyCache: true,
|
||||
}),
|
||||
|
@ -35,7 +35,7 @@
|
||||
"version": "napi version"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@napi-rs/cli": "3.0.0-alpha.29",
|
||||
"@napi-rs/cli": "3.0.0-alpha.30",
|
||||
"lib0": "^0.2.87",
|
||||
"nx": "^17.1.3",
|
||||
"nx-cloud": "^16.5.2",
|
||||
|
@ -7,7 +7,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/debug": "^4.1.9",
|
||||
"vitest": "1.1.1"
|
||||
"vitest": "1.1.2"
|
||||
},
|
||||
"version": "0.11.0"
|
||||
}
|
||||
|
2
packages/common/env/package.json
vendored
2
packages/common/env/package.json
vendored
@ -7,7 +7,7 @@
|
||||
"@blocksuite/store": "0.11.0-nightly-202401020419-752a5b8",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0",
|
||||
"vitest": "1.1.1",
|
||||
"vitest": "1.1.2",
|
||||
"zod": "^3.22.4"
|
||||
},
|
||||
"exports": {
|
||||
|
@ -32,7 +32,7 @@
|
||||
"rxjs": "^7.8.1",
|
||||
"vite": "^5.0.6",
|
||||
"vite-plugin-dts": "3.7.0",
|
||||
"vitest": "1.1.1",
|
||||
"vitest": "1.1.2",
|
||||
"yjs": "^13.6.10"
|
||||
},
|
||||
"peerDependencies": {
|
||||
|
@ -18,7 +18,7 @@
|
||||
"yjs": "^13.6.10"
|
||||
},
|
||||
"devDependencies": {
|
||||
"vitest": "1.1.1"
|
||||
"vitest": "1.1.2"
|
||||
},
|
||||
"version": "0.11.0"
|
||||
}
|
||||
|
@ -42,7 +42,7 @@
|
||||
"fake-indexeddb": "^5.0.0",
|
||||
"vite": "^5.0.6",
|
||||
"vite-plugin-dts": "3.7.0",
|
||||
"vitest": "1.1.1",
|
||||
"vitest": "1.1.2",
|
||||
"y-indexeddb": "^9.0.11",
|
||||
"yjs": "^13.6.10"
|
||||
},
|
||||
|
@ -27,7 +27,7 @@
|
||||
"@blocksuite/store": "0.11.0-nightly-202401020419-752a5b8",
|
||||
"vite": "^5.0.6",
|
||||
"vite-plugin-dts": "3.7.0",
|
||||
"vitest": "1.1.1",
|
||||
"vitest": "1.1.2",
|
||||
"yjs": "^13.6.10"
|
||||
},
|
||||
"peerDependencies": {
|
||||
|
@ -102,7 +102,7 @@
|
||||
"storybook-dark-mode": "^3.0.1",
|
||||
"typescript": "^5.3.2",
|
||||
"vite": "^5.0.6",
|
||||
"vitest": "1.1.1",
|
||||
"vitest": "1.1.2",
|
||||
"yjs": "^13.6.10"
|
||||
},
|
||||
"version": "0.11.0"
|
||||
|
@ -89,7 +89,7 @@
|
||||
"zod": "^3.22.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@aws-sdk/client-s3": "3.484.0",
|
||||
"@aws-sdk/client-s3": "3.485.0",
|
||||
"@perfsee/webpack": "^1.8.4",
|
||||
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.11",
|
||||
"@sentry/webpack-plugin": "^2.8.0",
|
||||
@ -114,7 +114,7 @@
|
||||
"swc-loader": "^0.2.3",
|
||||
"swc-plugin-coverage-instrument": "^0.0.20",
|
||||
"thread-loader": "^4.0.2",
|
||||
"vitest": "1.1.1",
|
||||
"vitest": "1.1.2",
|
||||
"webpack": "^5.89.0",
|
||||
"webpack-cli": "^5.1.4",
|
||||
"webpack-dev-server": "^4.15.1",
|
||||
|
@ -60,7 +60,7 @@
|
||||
"ts-node": "^10.9.1",
|
||||
"undici": "^6.0.0",
|
||||
"uuid": "^9.0.1",
|
||||
"vitest": "1.1.1",
|
||||
"vitest": "1.1.2",
|
||||
"which": "^4.0.0",
|
||||
"zod": "^3.22.4"
|
||||
},
|
||||
|
@ -3,7 +3,7 @@ import { setTimeout } from 'node:timers/promises';
|
||||
|
||||
import { removeWithRetry } from '@affine-test/kit/utils/utils';
|
||||
import { v4 } from 'uuid';
|
||||
import { afterEach, beforeEach, expect, test, vi } from 'vitest';
|
||||
import { afterAll, afterEach, beforeEach, expect, test, vi } from 'vitest';
|
||||
|
||||
const tmpDir = path.join(__dirname, 'tmp');
|
||||
const appDataPath = path.join(tmpDir, 'app-data');
|
||||
@ -48,6 +48,10 @@ afterEach(async () => {
|
||||
vi.useRealTimers();
|
||||
});
|
||||
|
||||
afterAll(() => {
|
||||
vi.doUnmock('@affine/electron/helper/main-rpc');
|
||||
});
|
||||
|
||||
test('can get a valid WorkspaceSQLiteDB', async () => {
|
||||
const { ensureSQLiteDB } = await import(
|
||||
'@affine/electron/helper/db/ensure-db'
|
||||
|
@ -1,12 +1,16 @@
|
||||
import path from 'node:path';
|
||||
|
||||
import {
|
||||
copyToTemp,
|
||||
migrateToSubdocAndReplaceDatabase,
|
||||
} from '@affine/electron/helper/db/migration';
|
||||
import { SqliteConnection } from '@affine/native';
|
||||
import { removeWithRetry } from '@affine-test/kit/utils/utils';
|
||||
import { afterEach, describe, expect, it, vi } from 'vitest';
|
||||
import {
|
||||
afterAll,
|
||||
afterEach,
|
||||
beforeAll,
|
||||
describe,
|
||||
expect,
|
||||
it,
|
||||
vi,
|
||||
} from 'vitest';
|
||||
import { applyUpdate, Doc as YDoc } from 'yjs';
|
||||
|
||||
const tmpDir = path.join(__dirname, 'tmp');
|
||||
@ -14,18 +18,31 @@ const testDBFilePath = path.resolve(__dirname, 'old-db.affine');
|
||||
|
||||
const appDataPath = path.join(tmpDir, 'app-data');
|
||||
|
||||
vi.mock('@affine/electron/helper/main-rpc', () => ({
|
||||
beforeAll(() => {
|
||||
vi.doMock('@affine/electron/helper/main-rpc', () => ({
|
||||
mainRPC: {
|
||||
getPath: async () => appDataPath,
|
||||
channel: {
|
||||
on: () => {},
|
||||
send: () => {},
|
||||
},
|
||||
}));
|
||||
},
|
||||
}));
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
await removeWithRetry(tmpDir);
|
||||
});
|
||||
|
||||
afterAll(() => {
|
||||
vi.doUnmock('@affine/electron/helper/main-rpc');
|
||||
});
|
||||
|
||||
describe('migrateToSubdocAndReplaceDatabase', () => {
|
||||
it('should migrate and replace the database', async () => {
|
||||
const { copyToTemp, migrateToSubdocAndReplaceDatabase } = await import(
|
||||
'@affine/electron/helper/db/migration'
|
||||
);
|
||||
const copiedDbFilePath = await copyToTemp(testDBFilePath);
|
||||
await migrateToSubdocAndReplaceDatabase(copiedDbFilePath);
|
||||
|
||||
|
@ -4,22 +4,28 @@ import { dbSubjects } from '@affine/electron/helper/db/subjects';
|
||||
import { removeWithRetry } from '@affine-test/kit/utils/utils';
|
||||
import fs from 'fs-extra';
|
||||
import { v4 } from 'uuid';
|
||||
import { afterEach, expect, test, vi } from 'vitest';
|
||||
import { afterAll, afterEach, beforeAll, expect, test, vi } from 'vitest';
|
||||
import { Doc as YDoc, encodeStateAsUpdate } from 'yjs';
|
||||
|
||||
const tmpDir = path.join(__dirname, 'tmp');
|
||||
const appDataPath = path.join(tmpDir, 'app-data');
|
||||
|
||||
vi.doMock('@affine/electron/helper/main-rpc', () => ({
|
||||
beforeAll(() => {
|
||||
vi.doMock('@affine/electron/helper/main-rpc', () => ({
|
||||
mainRPC: {
|
||||
getPath: async () => appDataPath,
|
||||
},
|
||||
}));
|
||||
}));
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
await removeWithRetry(tmpDir);
|
||||
});
|
||||
|
||||
afterAll(() => {
|
||||
vi.doUnmock('@affine/electron/helper/main-rpc');
|
||||
});
|
||||
|
||||
let testYDoc: YDoc;
|
||||
let testYSubDoc: YDoc;
|
||||
|
||||
|
@ -3,7 +3,7 @@ import path from 'node:path';
|
||||
import { removeWithRetry } from '@affine-test/kit/utils/utils';
|
||||
import fs from 'fs-extra';
|
||||
import { v4 } from 'uuid';
|
||||
import { afterEach, describe, expect, test, vi } from 'vitest';
|
||||
import { afterAll, afterEach, describe, expect, test, vi } from 'vitest';
|
||||
|
||||
const tmpDir = path.join(__dirname, 'tmp');
|
||||
const appDataPath = path.join(tmpDir, 'app-data');
|
||||
@ -24,6 +24,10 @@ afterEach(async () => {
|
||||
await removeWithRetry(tmpDir);
|
||||
});
|
||||
|
||||
afterAll(() => {
|
||||
vi.doUnmock('@affine/electron/helper/main-rpc');
|
||||
});
|
||||
|
||||
describe('list workspaces', () => {
|
||||
test('listWorkspaces (valid)', async () => {
|
||||
const { listWorkspaces } = await import(
|
||||
|
@ -18,7 +18,7 @@
|
||||
"lodash": "^4.17.21",
|
||||
"lodash-es": "^4.17.21",
|
||||
"prettier": "^3.0.3",
|
||||
"vitest": "1.1.1"
|
||||
"vitest": "1.1.2"
|
||||
},
|
||||
"scripts": {
|
||||
"postinstall": "gql-gen --errors-only"
|
||||
|
@ -269,6 +269,35 @@ switch (platform) {
|
||||
loadError = e
|
||||
}
|
||||
break
|
||||
case 'riscv64':
|
||||
if (isMusl()) {
|
||||
localFileExisted = existsSync(
|
||||
join(__dirname, 'affine.linux-riscv64-musl.node')
|
||||
)
|
||||
try {
|
||||
if (localFileExisted) {
|
||||
nativeBinding = require('./affine.linux-riscv64-musl.node')
|
||||
} else {
|
||||
nativeBinding = require('@affine/native-linux-riscv64-musl')
|
||||
}
|
||||
} catch (e) {
|
||||
loadError = e
|
||||
}
|
||||
} else {
|
||||
localFileExisted = existsSync(
|
||||
join(__dirname, 'affine.linux-riscv64-gnu.node')
|
||||
)
|
||||
try {
|
||||
if (localFileExisted) {
|
||||
nativeBinding = require('./affine.linux-riscv64-gnu.node')
|
||||
} else {
|
||||
nativeBinding = require('@affine/native-linux-riscv64-gnu')
|
||||
}
|
||||
} catch (e) {
|
||||
loadError = e
|
||||
}
|
||||
}
|
||||
break
|
||||
default:
|
||||
throw new Error(`Unsupported architecture on Linux: ${arch}`)
|
||||
}
|
||||
@ -277,6 +306,21 @@ switch (platform) {
|
||||
throw new Error(`Unsupported OS: ${platform}, architecture: ${arch}`)
|
||||
}
|
||||
|
||||
if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) {
|
||||
try {
|
||||
nativeBinding = require('./affine.wasi.cjs')
|
||||
} catch {
|
||||
// ignore
|
||||
}
|
||||
if (!nativeBinding) {
|
||||
try {
|
||||
nativeBinding = require('@affine/native-wasm32-wasi')
|
||||
} catch (err) {
|
||||
console.error(err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!nativeBinding) {
|
||||
if (loadError) {
|
||||
throw loadError
|
||||
|
@ -35,7 +35,7 @@
|
||||
}
|
||||
},
|
||||
"devDependencies": {
|
||||
"@napi-rs/cli": "3.0.0-alpha.29",
|
||||
"@napi-rs/cli": "3.0.0-alpha.30",
|
||||
"@types/node": "^20.9.3",
|
||||
"@types/uuid": "^9.0.7",
|
||||
"ava": "^6.0.0",
|
||||
|
@ -29,7 +29,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"fake-indexeddb": "^5.0.0",
|
||||
"vitest": "1.1.1",
|
||||
"vitest": "1.1.2",
|
||||
"ws": "^8.14.2"
|
||||
},
|
||||
"version": "0.11.0"
|
||||
|
@ -19,7 +19,7 @@
|
||||
"@storybook/jest": "^0.2.3",
|
||||
"@storybook/react": "^7.5.3",
|
||||
"@storybook/react-vite": "^7.5.3",
|
||||
"@storybook/test-runner": "^0.15.2",
|
||||
"@storybook/test-runner": "^0.16.0",
|
||||
"@storybook/testing-library": "^0.2.2",
|
||||
"@vitejs/plugin-react": "^4.2.0",
|
||||
"concurrently": "^8.2.2",
|
||||
|
@ -33,7 +33,7 @@ export default defineConfig({
|
||||
'**/dist',
|
||||
'**/build',
|
||||
'**/out,',
|
||||
'**/frontend/electron',
|
||||
'**/packages/frontend/electron',
|
||||
],
|
||||
testTimeout: 5000,
|
||||
coverage: {
|
||||
|
Loading…
Reference in New Issue
Block a user