mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 12:28:42 +00:00
feat: upgrade dependencies and lockfile (#5016)
- Close https://github.com/toeverything/AFFiNE/security/dependabot/47
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
"@affine/workspace": "workspace:*",
|
||||
"@dnd-kit/core": "^6.0.8",
|
||||
"@dnd-kit/modifiers": "^6.0.1",
|
||||
"@dnd-kit/sortable": "^7.0.2",
|
||||
"@dnd-kit/sortable": "^8.0.0",
|
||||
"@emotion/cache": "^11.11.0",
|
||||
"@emotion/react": "^11.11.1",
|
||||
"@emotion/server": "^11.11.0",
|
||||
@@ -43,14 +43,14 @@
|
||||
"clsx": "^2.0.0",
|
||||
"dayjs": "^1.11.10",
|
||||
"foxact": "^0.2.20",
|
||||
"jotai": "^2.4.3",
|
||||
"jotai-effect": "^0.2.2",
|
||||
"jotai-scope": "^0.4.0",
|
||||
"jotai": "^2.5.1",
|
||||
"jotai-effect": "^0.2.3",
|
||||
"jotai-scope": "^0.4.1",
|
||||
"lit": "^3.0.2",
|
||||
"lodash-es": "^4.17.21",
|
||||
"lottie-react": "^2.4.0",
|
||||
"lottie-web": "^5.12.2",
|
||||
"nanoid": "^5.0.1",
|
||||
"nanoid": "^5.0.3",
|
||||
"next-themes": "^0.2.1",
|
||||
"react": "18.2.0",
|
||||
"react-datepicker": "^4.20.0",
|
||||
@@ -79,10 +79,10 @@
|
||||
"@types/react-dom": "^18.2.13",
|
||||
"@vanilla-extract/css": "^1.13.0",
|
||||
"fake-indexeddb": "^5.0.0",
|
||||
"typescript": "^5.2.2",
|
||||
"typescript": "^5.3.2",
|
||||
"vite": "^4.4.11",
|
||||
"vitest": "0.34.6",
|
||||
"yjs": "^13.6.8"
|
||||
"yjs": "^13.6.10"
|
||||
},
|
||||
"version": "0.10.3-canary.0"
|
||||
}
|
||||
|
||||
@@ -192,9 +192,9 @@ export const pageGroupsAtom = atom(get => {
|
||||
sorter.key === 'createDate' || sorter.key === 'updatedDate'
|
||||
? sorter.key
|
||||
: // default sort
|
||||
!sorter.key
|
||||
? DEFAULT_SORT_KEY
|
||||
: undefined;
|
||||
!sorter.key
|
||||
? DEFAULT_SORT_KEY
|
||||
: undefined;
|
||||
}
|
||||
return pagesToPageGroups(sorter.pages, groupBy);
|
||||
});
|
||||
|
||||
@@ -51,8 +51,8 @@ export const Checkbox = ({
|
||||
const icon = indeterminate
|
||||
? icons.indeterminate
|
||||
: checked
|
||||
? icons.checked
|
||||
: icons.unchecked;
|
||||
? icons.checked
|
||||
: icons.unchecked;
|
||||
|
||||
return (
|
||||
<div
|
||||
|
||||
@@ -129,8 +129,8 @@ export function getRuntimeConfig(buildFlags: BuildFlags): RuntimeConfig {
|
||||
enableCaptcha: process.env.ENABLE_CAPTCHA
|
||||
? process.env.ENABLE_CAPTCHA === 'true'
|
||||
: buildFlags.mode === 'development'
|
||||
? false
|
||||
: currentBuildPreset.enableCaptcha,
|
||||
? false
|
||||
: currentBuildPreset.enableCaptcha,
|
||||
enableEnhanceShareMode: process.env.ENABLE_ENHANCE_SHARE_MODE
|
||||
? process.env.ENABLE_ENHANCE_SHARE_MODE === 'true'
|
||||
: currentBuildPreset.enableEnhanceShareMode,
|
||||
@@ -140,8 +140,8 @@ export function getRuntimeConfig(buildFlags: BuildFlags): RuntimeConfig {
|
||||
enablePayment: process.env.ENABLE_PAYMENT
|
||||
? process.env.ENABLE_PAYMENT !== 'false'
|
||||
: buildFlags.mode === 'development'
|
||||
? true
|
||||
: currentBuildPreset.enablePayment,
|
||||
? true
|
||||
: currentBuildPreset.enablePayment,
|
||||
};
|
||||
|
||||
if (buildFlags.mode === 'development') {
|
||||
|
||||
@@ -31,9 +31,9 @@
|
||||
"@blocksuite/global": "0.0.0-20231122113751-6bf81eb3-nightly",
|
||||
"@blocksuite/icons": "2.1.35",
|
||||
"@blocksuite/store": "0.0.0-20231122113751-6bf81eb3-nightly",
|
||||
"@blocksuite/virgo": "0.0.0-20231116023037-31273bb7-nightly",
|
||||
"@blocksuite/virgo": "0.0.0-20231122113751-6bf81eb3-nightly",
|
||||
"@dnd-kit/core": "^6.0.8",
|
||||
"@dnd-kit/sortable": "^7.0.2",
|
||||
"@dnd-kit/sortable": "^8.0.0",
|
||||
"@emotion/cache": "^11.11.0",
|
||||
"@emotion/react": "^11.11.1",
|
||||
"@emotion/server": "^11.11.0",
|
||||
@@ -58,13 +58,13 @@
|
||||
"graphql": "^16.8.1",
|
||||
"idb": "^7.1.1",
|
||||
"intl-segmenter-polyfill-rs": "^0.1.6",
|
||||
"jotai": "^2.4.3",
|
||||
"jotai": "^2.5.1",
|
||||
"jotai-devtools": "^0.7.0",
|
||||
"lit": "^3.0.2",
|
||||
"lottie-web": "^5.12.2",
|
||||
"mini-css-extract-plugin": "^2.7.6",
|
||||
"nanoid": "^5.0.1",
|
||||
"next-auth": "^4.23.2",
|
||||
"nanoid": "^5.0.3",
|
||||
"next-auth": "^4.24.5",
|
||||
"next-themes": "^0.2.1",
|
||||
"postcss-loader": "^7.3.3",
|
||||
"react": "18.2.0",
|
||||
@@ -79,7 +79,7 @@
|
||||
"uuid": "^9.0.1",
|
||||
"valtio": "^1.11.2",
|
||||
"y-protocols": "^1.0.6",
|
||||
"yjs": "^13.6.8",
|
||||
"yjs": "^13.6.10",
|
||||
"zod": "^3.22.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -130,7 +130,9 @@ export const pageCollectionBaseAtom =
|
||||
await userSetting.loaded;
|
||||
const view = userSetting.view;
|
||||
if (view) {
|
||||
const collections: DeprecatedCollection[] = [...view.values()];
|
||||
const collections: Omit<DeprecatedCollection, 'workspaceId'>[] = [
|
||||
...view.values(),
|
||||
];
|
||||
//delete collections
|
||||
view.clear();
|
||||
return collections.map(v => {
|
||||
|
||||
@@ -106,10 +106,10 @@ const SubscriptionSettings = () => {
|
||||
plan === SubscriptionPlan.Free
|
||||
? '0'
|
||||
: price
|
||||
? recurring === SubscriptionRecurring.Monthly
|
||||
? String(price.amount / 100)
|
||||
: String(price.yearlyAmount / 100)
|
||||
: '?';
|
||||
? recurring === SubscriptionRecurring.Monthly
|
||||
? String(price.amount / 100)
|
||||
: String(price.yearlyAmount / 100)
|
||||
: '?';
|
||||
|
||||
const t = useAFFiNEI18N();
|
||||
|
||||
|
||||
@@ -11,8 +11,8 @@ export const StyledIsland = styled('div')<{
|
||||
boxShadow: spread
|
||||
? 'var(--affine-menu-shadow)'
|
||||
: inEdgelessPage
|
||||
? 'var(--affine-menu-shadow)'
|
||||
: 'unset',
|
||||
? 'var(--affine-menu-shadow)'
|
||||
: 'unset',
|
||||
padding: '0 4px 44px',
|
||||
borderRadius: '10px',
|
||||
background: spread
|
||||
|
||||
@@ -35,35 +35,35 @@
|
||||
"@blocksuite/blocks": "0.0.0-20231122113751-6bf81eb3-nightly",
|
||||
"@blocksuite/editor": "0.0.0-20231122113751-6bf81eb3-nightly",
|
||||
"@blocksuite/store": "0.0.0-20231122113751-6bf81eb3-nightly",
|
||||
"@electron-forge/cli": "^6.4.2",
|
||||
"@electron-forge/core": "^6.4.2",
|
||||
"@electron-forge/core-utils": "^6.4.2",
|
||||
"@electron-forge/maker-deb": "^6.4.2",
|
||||
"@electron-forge/maker-dmg": "^6.4.2",
|
||||
"@electron-forge/maker-squirrel": "^6.4.2",
|
||||
"@electron-forge/maker-zip": "^6.4.2",
|
||||
"@electron-forge/plugin-auto-unpack-natives": "^6.4.2",
|
||||
"@electron-forge/shared-types": "^6.4.2",
|
||||
"@electron/remote": "2.0.12",
|
||||
"@electron-forge/cli": "^7.1.0",
|
||||
"@electron-forge/core": "^7.1.0",
|
||||
"@electron-forge/core-utils": "^7.1.0",
|
||||
"@electron-forge/maker-deb": "^7.1.0",
|
||||
"@electron-forge/maker-dmg": "^7.1.0",
|
||||
"@electron-forge/maker-squirrel": "^7.1.0",
|
||||
"@electron-forge/maker-zip": "^7.1.0",
|
||||
"@electron-forge/plugin-auto-unpack-natives": "^7.1.0",
|
||||
"@electron-forge/shared-types": "^7.1.0",
|
||||
"@electron/remote": "2.1.0",
|
||||
"@reforged/maker-appimage": "^3.3.1",
|
||||
"@toeverything/infra": "workspace:*",
|
||||
"@types/uuid": "^9.0.5",
|
||||
"builder-util-runtime": "^9.2.1",
|
||||
"@types/uuid": "^9.0.7",
|
||||
"builder-util-runtime": "^9.2.3",
|
||||
"cross-env": "^7.0.3",
|
||||
"electron": "^27.1.0",
|
||||
"electron-log": "^5.0.0",
|
||||
"electron-log": "^5.0.1",
|
||||
"electron-squirrel-startup": "1.0.0",
|
||||
"electron-window-state": "^5.0.3",
|
||||
"esbuild": "^0.19.4",
|
||||
"esbuild": "^0.19.7",
|
||||
"fs-extra": "^11.1.1",
|
||||
"glob": "^10.3.10",
|
||||
"jotai": "^2.4.3",
|
||||
"jotai": "^2.5.1",
|
||||
"lodash-es": "^4.17.21",
|
||||
"rxjs": "^7.8.1",
|
||||
"semver": "^7.5.4",
|
||||
"tinykeys": "^2.1.0",
|
||||
"ts-node": "^10.9.1",
|
||||
"undici": "^5.26.3",
|
||||
"undici": "^5.27.2",
|
||||
"uuid": "^9.0.1",
|
||||
"vitest": "0.34.6",
|
||||
"which": "^4.0.0",
|
||||
@@ -73,8 +73,8 @@
|
||||
"async-call-rpc": "^6.3.1",
|
||||
"electron-updater": "^6.1.5",
|
||||
"link-preview-js": "^3.0.5",
|
||||
"nanoid": "^5.0.1",
|
||||
"yjs": "^13.6.8"
|
||||
"nanoid": "^5.0.3",
|
||||
"yjs": "^13.6.10"
|
||||
},
|
||||
"build": {
|
||||
"protocols": [
|
||||
|
||||
@@ -11,9 +11,8 @@ async function buildLayers() {
|
||||
};
|
||||
|
||||
if (process.env.BUILD_TYPE_OVERRIDE) {
|
||||
define[
|
||||
'process.env.BUILD_TYPE_OVERRIDE'
|
||||
] = `"${process.env.BUILD_TYPE_OVERRIDE}"`;
|
||||
define['process.env.BUILD_TYPE_OVERRIDE'] =
|
||||
`"${process.env.BUILD_TYPE_OVERRIDE}"`;
|
||||
}
|
||||
|
||||
await esbuild.build({
|
||||
|
||||
@@ -36,8 +36,8 @@ async function createWindow() {
|
||||
titleBarStyle: isMacOS()
|
||||
? 'hiddenInset'
|
||||
: isWindows()
|
||||
? 'hidden'
|
||||
: 'default',
|
||||
? 'hidden'
|
||||
: 'default',
|
||||
trafficLightPosition: { x: 20, y: 16 },
|
||||
x: mainWindowState.x,
|
||||
y: mainWindowState.y,
|
||||
|
||||
@@ -20,8 +20,8 @@ export type _QueryVariables<Q extends GraphQLQuery> =
|
||||
Q['id'] extends Queries['name']
|
||||
? Extract<Queries, { name: Q['id'] }>['variables']
|
||||
: Q['id'] extends Mutations['name']
|
||||
? Extract<Mutations, { name: Q['id'] }>['variables']
|
||||
: undefined;
|
||||
? Extract<Mutations, { name: Q['id'] }>['variables']
|
||||
: undefined;
|
||||
|
||||
export type QueryVariables<Q extends GraphQLQuery> = _QueryVariables<Q> extends
|
||||
| never
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
"dependencies": {
|
||||
"foxact": "^0.2.20",
|
||||
"image-blob-reduce": "^4.1.0",
|
||||
"jotai": "^2.4.3",
|
||||
"jotai": "^2.5.1",
|
||||
"lodash.debounce": "^4.0.8",
|
||||
"p-queue": "^7.4.1",
|
||||
"react": "18.2.0",
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
"react-i18next": "^13.3.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^18.18.5",
|
||||
"@types/prettier": "^3.0.0",
|
||||
"prettier": "^3.0.3",
|
||||
"ts-node": "^10.9.1",
|
||||
|
||||
@@ -2,6 +2,7 @@ import type { i18n, Resource } from 'i18next';
|
||||
import i18next from 'i18next';
|
||||
import {
|
||||
I18nextProvider,
|
||||
type I18nextProviderProps,
|
||||
initReactI18next,
|
||||
Trans,
|
||||
useTranslation as useRootTranslation,
|
||||
@@ -66,8 +67,9 @@ const standardizeLocale = (language: string) => {
|
||||
return fallbackLng;
|
||||
};
|
||||
|
||||
export const createI18n = () => {
|
||||
const i18n = i18next.createInstance();
|
||||
export const createI18n = (): I18nextProviderProps['i18n'] => {
|
||||
// @ts-expect-error ts bug
|
||||
const i18n: I18nextProviderProps['i18n'] = i18next.createInstance();
|
||||
i18n
|
||||
.use(initReactI18next)
|
||||
.init({
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import type { Request } from 'undici-types';
|
||||
|
||||
// cSpell:ignore Tolgee
|
||||
const TOLGEE_API_KEY = process.env['TOLGEE_API_KEY'];
|
||||
const TOLGEE_API_URL = 'https://i18n.affine.pro';
|
||||
@@ -15,7 +17,7 @@ const withTolgee = (
|
||||
'Content-Type': 'application/json',
|
||||
});
|
||||
|
||||
const isRequest = (input: RequestInfo | URL): input is Request => {
|
||||
const isRequest = (input: NodeJS.fetch.RequestInfo): input is Request => {
|
||||
return typeof input === 'object' && !('href' in input);
|
||||
};
|
||||
|
||||
@@ -31,6 +33,7 @@ const withTolgee = (
|
||||
argArray[0] = {
|
||||
...argArray[0],
|
||||
url: `${baseUrl}${argArray[0].url}`,
|
||||
// @ts-expect-error Node.js types incorrectly define RequestInit
|
||||
headers,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -35,16 +35,16 @@
|
||||
}
|
||||
},
|
||||
"devDependencies": {
|
||||
"@napi-rs/cli": "^2.16.3",
|
||||
"@types/node": "^18.18.5",
|
||||
"@types/uuid": "^9.0.5",
|
||||
"@napi-rs/cli": "^2.16.5",
|
||||
"@types/node": "^20.9.3",
|
||||
"@types/uuid": "^9.0.7",
|
||||
"ava": "^5.3.1",
|
||||
"cross-env": "^7.0.3",
|
||||
"nx": "^16.10.0",
|
||||
"nx": "^17.1.3",
|
||||
"nx-cloud": "^16.5.2",
|
||||
"rxjs": "^7.8.1",
|
||||
"ts-node": "^10.9.1",
|
||||
"typescript": "^5.2.2",
|
||||
"typescript": "^5.3.2",
|
||||
"uuid": "^9.0.1"
|
||||
},
|
||||
"engines": {
|
||||
|
||||
@@ -23,13 +23,13 @@
|
||||
"async-call-rpc": "^6.3.1",
|
||||
"idb": "^7.1.1",
|
||||
"is-svg": "^5.0.0",
|
||||
"jotai": "^2.4.3",
|
||||
"jotai": "^2.5.1",
|
||||
"js-base64": "^3.7.5",
|
||||
"ky": "^1.0.1",
|
||||
"lib0": "^0.2.87",
|
||||
"lodash-es": "^4.17.21",
|
||||
"nanoid": "^5.0.1",
|
||||
"next-auth": "^4.23.2",
|
||||
"nanoid": "^5.0.3",
|
||||
"next-auth": "^4.24.5",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0",
|
||||
"socket.io-client": "^4.7.2",
|
||||
@@ -37,7 +37,7 @@
|
||||
"valtio": "^1.11.2",
|
||||
"y-protocols": "^1.0.6",
|
||||
"y-provider": "workspace:*",
|
||||
"yjs": "^13.6.8",
|
||||
"yjs": "^13.6.10",
|
||||
"zod": "^3.22.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -18,8 +18,8 @@ export const createCloudBlobStorage = (workspaceId: string): BlobStorage => {
|
||||
const suffix = key.startsWith('/')
|
||||
? key
|
||||
: predefinedStaticFiles.includes(key)
|
||||
? `/static/${key}`
|
||||
: `/api/workspaces/${workspaceId}/blobs/${key}`;
|
||||
? `/static/${key}`
|
||||
: `/api/workspaces/${workspaceId}/blobs/${key}`;
|
||||
|
||||
return fetchWithTraceReport(
|
||||
runtimeConfig.serverUrlPrefix + suffix
|
||||
|
||||
Reference in New Issue
Block a user