Skip to content

Commit

Permalink
refactor: remove unused deps (#8259)
Browse files Browse the repository at this point in the history
  • Loading branch information
EYHN committed Sep 14, 2024
1 parent 5802572 commit ed63602
Show file tree
Hide file tree
Showing 31 changed files with 151 additions and 3,672 deletions.
19 changes: 1 addition & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,26 +53,19 @@
]
},
"devDependencies": {
"@affine-test/kit": "workspace:*",
"@affine/cli": "workspace:*",
"@commitlint/cli": "^19.2.1",
"@commitlint/config-conventional": "^19.1.0",
"@faker-js/faker": "^9.0.0",
"@istanbuljs/schema": "^0.1.3",
"@magic-works/i18n-codegen": "^0.6.0",
"@nx/vite": "^19.5.3",
"@playwright/test": "=1.47.0",
"@taplo/cli": "^0.7.0",
"@testing-library/react": "^16.0.0",
"@toeverything/infra": "workspace:*",
"@types/affine__env": "workspace:*",
"@types/eslint": "^9.0.0",
"@types/node": "^20.12.7",
"@typescript-eslint/eslint-plugin": "^7.6.0",
"@typescript-eslint/parser": "^7.6.0",
"@vanilla-extract/vite-plugin": "^4.0.7",
"@vanilla-extract/webpack-plugin": "^2.3.7",
"@vitejs/plugin-react-swc": "^3.6.0",
"@vitest/coverage-istanbul": "2.1.0",
"@vitest/ui": "2.1.0",
"cross-env": "^7.0.3",
Expand All @@ -87,29 +80,19 @@
"eslint-plugin-sonarjs": "^0.25.1",
"eslint-plugin-unicorn": "^52.0.0",
"eslint-plugin-unused-imports": "^3.1.0",
"eslint-plugin-vue": "^9.24.1",
"fake-indexeddb": "6.0.0",
"happy-dom": "^15.0.0",
"husky": "^9.0.11",
"lint-staged": "^15.2.2",
"msw": "^2.3.0",
"nanoid": "^5.0.7",
"nx": "^19.0.0",
"nyc": "^17.0.0",
"oxlint": "0.9.5",
"prettier": "^3.3.3",
"semver": "^7.6.0",
"serve": "^14.2.1",
"string-width": "^7.1.0",
"ts-node": "^10.9.2",
"typescript": "^5.4.5",
"unplugin-swc": "^1.4.5",
"vite": "^5.2.8",
"vite-plugin-istanbul": "^6.0.0",
"vite-plugin-static-copy": "^1.0.2",
"vitest": "2.1.0",
"vitest-fetch-mock": "^0.3.0",
"vitest-mock-extended": "^2.0.0"
"vitest": "2.1.0"
},
"packageManager": "[email protected]",
"resolutions": {
Expand Down
13 changes: 0 additions & 13 deletions packages/backend/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
"@google-cloud/opentelemetry-cloud-monitoring-exporter": "^0.19.0",
"@google-cloud/opentelemetry-cloud-trace-exporter": "^2.2.0",
"@google-cloud/opentelemetry-resource-util": "^2.2.0",
"@keyv/redis": "^3.0.0",
"@nestjs/apollo": "^12.1.0",
"@nestjs/common": "^10.3.7",
"@nestjs/core": "^10.3.7",
Expand All @@ -38,7 +37,6 @@
"@nestjs/websockets": "^10.3.7",
"@node-rs/argon2": "^1.8.0",
"@node-rs/crc32": "^1.10.0",
"@node-rs/jsonwebtoken": "^0.5.2",
"@opentelemetry/api": "^1.9.0",
"@opentelemetry/core": "^1.25.0",
"@opentelemetry/exporter-prometheus": "^0.53.0",
Expand All @@ -60,13 +58,11 @@
"@socket.io/redis-adapter": "^8.3.0",
"cookie-parser": "^1.4.6",
"dotenv": "^16.4.5",
"dotenv-cli": "^7.4.1",
"express": "^4.19.2",
"fast-xml-parser": "^4.4.0",
"get-stream": "^9.0.1",
"graphql": "^16.8.1",
"graphql-scalars": "^1.23.0",
"graphql-type-json": "^0.3.2",
"graphql-upload": "^16.0.2",
"html-validate": "^8.20.1",
"ioredis": "^5.3.2",
Expand All @@ -81,30 +77,23 @@
"nodemailer": "^6.9.13",
"on-headers": "^1.0.2",
"openai": "^4.33.0",
"parse-duration": "^1.1.0",
"piscina": "^4.5.1",
"pretty-time": "^1.1.0",
"prisma": "^5.12.1",
"prom-client": "^15.1.1",
"reflect-metadata": "^0.2.2",
"rxjs": "^7.8.1",
"semver": "^7.6.0",
"ses": "^1.4.1",
"socket.io": "^4.7.5",
"stripe": "^16.0.0",
"ts-node": "^10.9.2",
"typescript": "^5.4.5",
"ws": "^8.16.0",
"yjs": "patch:yjs@npm%3A13.6.18#~/.yarn/patches/yjs-npm-13.6.18-ad0d5f7c43.patch",
"zod": "^3.22.4"
},
"devDependencies": {
"@affine-test/kit": "workspace:*",
"@affine/server-native": "workspace:*",
"@napi-rs/image": "^1.9.1",
"@nestjs/testing": "^10.3.7",
"@types/cookie-parser": "^1.4.7",
"@types/engine.io": "^3.1.10",
"@types/express": "^4.17.21",
"@types/graphql-upload": "^16.0.7",
"@types/keyv": "^4.2.0",
Expand All @@ -114,10 +103,8 @@
"@types/node": "^20.12.7",
"@types/nodemailer": "^6.4.14",
"@types/on-headers": "^1.0.3",
"@types/pretty-time": "^1.1.5",
"@types/sinon": "^17.0.3",
"@types/supertest": "^6.0.2",
"@types/ws": "^8.5.10",
"ava": "^6.1.2",
"c8": "^10.0.0",
"nodemon": "^3.1.0",
Expand Down
3 changes: 0 additions & 3 deletions packages/common/env/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
"devDependencies": {
"@blocksuite/global": "0.17.10",
"@blocksuite/store": "0.17.10",
"react": "18.3.1",
"react-dom": "18.3.1",
"vitest": "2.1.0"
},
"exports": {
Expand All @@ -23,7 +21,6 @@
"@blocksuite/global": "0.11.0-nightly-202401020419-752a5b8"
},
"dependencies": {
"lit": "^3.1.2",
"zod": "^3.22.4"
},
"version": "0.16.0"
Expand Down
4 changes: 0 additions & 4 deletions packages/common/infra/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,11 @@
"devDependencies": {
"@affine-test/fixtures": "workspace:*",
"@affine/templates": "workspace:*",
"@blocksuite/block-std": "0.17.10",
"@blocksuite/presets": "0.17.10",
"@testing-library/react": "^16.0.0",
"async-call-rpc": "^6.4.0",
"fake-indexeddb": "^6.0.0",
"react": "^18.2.0",
"rxjs": "^7.8.1",
"vite": "^5.2.8",
"vite-plugin-dts": "4.2.1",
"vitest": "2.1.0"
},
"peerDependencies": {
Expand Down
2 changes: 0 additions & 2 deletions packages/frontend/admin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"dependencies": {
"@affine/core": "workspace:*",
"@affine/graphql": "workspace:*",
"@hookform/resolvers": "^3.6.0",
"@radix-ui/react-accordion": "^1.2.0",
"@radix-ui/react-alert-dialog": "^1.1.1",
"@radix-ui/react-aspect-ratio": "^1.1.0",
Expand Down Expand Up @@ -36,7 +35,6 @@
"@sentry/react": "^8.9.0",
"@tanstack/react-table": "^8.19.3",
"cmdk": "^1.0.0",
"date-fns": "^3.6.0",
"embla-carousel-react": "^8.1.5",
"input-otp": "^1.2.4",
"lucide-react": "^0.441.0",
Expand Down
9 changes: 1 addition & 8 deletions packages/frontend/apps/electron/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,9 @@
"@affine-test/kit": "workspace:*",
"@affine/component": "workspace:*",
"@affine/core": "workspace:*",
"@affine/env": "workspace:*",
"@affine/i18n": "workspace:*",
"@affine/native": "workspace:*",
"@blocksuite/block-std": "0.17.10",
"@blocksuite/blocks": "0.17.10",
"@blocksuite/presets": "0.17.10",
"@blocksuite/store": "0.17.10",
"@blocksuite/global": "0.17.10",
"@electron-forge/cli": "^7.3.0",
"@electron-forge/core": "^7.3.0",
"@electron-forge/core-utils": "^7.3.0",
Expand All @@ -59,7 +55,6 @@
"esbuild": "^0.23.0",
"fs-extra": "^11.2.0",
"glob": "^11.0.0",
"jotai": "^2.8.0",
"lodash-es": "^4.17.21",
"nanoid": "^5.0.7",
"react": "^18.2.0",
Expand All @@ -69,10 +64,8 @@
"semver": "^7.6.0",
"tree-kill": "^1.2.2",
"ts-node": "^10.9.2",
"undici": "^6.12.0",
"uuid": "^10.0.0",
"vitest": "2.1.0",
"which": "^4.0.0",
"zod": "^3.22.4"
},
"dependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const showTabContextMenu = async (tabId: string, viewIndex: number) => {
{
label: 'Refresh tab',
click: () => {
reloadView().catch(logger.error);
reloadView().catch(err => logger.error(err));
},
},
{
Expand All @@ -45,7 +45,7 @@ export const showTabContextMenu = async (tabId: string, viewIndex: number) => {
basename: tabMeta.basename,
view: tabMeta.views,
show: false,
}).catch(logger.error);
}).catch(err => logger.error(err));
},
},

Expand All @@ -71,7 +71,7 @@ export const showTabContextMenu = async (tabId: string, viewIndex: number) => {
{
label: 'Close tab',
click: () => {
closeTab(tabId).catch(logger.error);
closeTab(tabId).catch(err => logger.error(err));
},
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ export class WebContentViewsManager {
return;
}

this.showTab(activeWorkbenchKey).catch(logger.error);
this.showTab(activeWorkbenchKey).catch(error => logger.error(error));

this.patchTabViewsMeta({
workbenches,
Expand Down Expand Up @@ -470,7 +470,7 @@ export class WebContentViewsManager {
url.hash = viewMeta.path?.hash ?? '';
url.search = viewMeta.path?.search ?? '';
logger.info(`loading tab ${id} at ${url.href}`);
view.webContents.loadURL(url.href).catch(logger.error);
view.webContents.loadURL(url.href).catch(err => logger.error(err));
}
return view;
};
Expand Down Expand Up @@ -593,7 +593,7 @@ export class WebContentViewsManager {
this.updateWorkbenchMeta(tabId, {
views: tabMeta.views.toSpliced(viewIndex, 1),
});
addTab(newTabMeta).catch(logger.error);
addTab(newTabMeta).catch(err => logger.error(err));
};

openInSplitView = (payload: OpenInSplitViewAction['payload']) => {
Expand Down Expand Up @@ -668,7 +668,9 @@ export class WebContentViewsManager {
this.mainWindow?.contentView.addChildView(view, idx);
});

handleWebContentsResize(activeView?.webContents).catch(logger.error);
handleWebContentsResize(activeView?.webContents).catch(err =>
logger.error(err)
);
}
};

Expand All @@ -680,7 +682,7 @@ export class WebContentViewsManager {
const disposables: Unsubscribable[] = [];
disposables.push(
windowReadyToShow$.subscribe(w => {
handleWebContentsResize().catch(logger.error);
handleWebContentsResize().catch(err => logger.error(err));
const screenSizeChangeEvents = ['resize', 'maximize', 'unmaximize'];
const onResize = () => {
if (this.activeWorkbenchView) {
Expand All @@ -695,7 +697,7 @@ export class WebContentViewsManager {
});

// add shell view
this.createAndAddView('shell').catch(logger.error);
this.createAndAddView('shell').catch(err => logger.error(err));
(async () => {
const updateCookies = () => {
session.defaultSession.cookies
Expand All @@ -721,7 +723,7 @@ export class WebContentViewsManager {
const defaultTabId = this.activeWorkbenchId;
if (defaultTabId) await this.showTab(defaultTabId);
}
})().catch(logger.error);
})().catch(err => logger.error(err));
})
);

Expand Down Expand Up @@ -813,7 +815,7 @@ export class WebContentViewsManager {
});
});

view.webContents.loadURL(shellViewUrl).catch(logger.error);
view.webContents.loadURL(shellViewUrl).catch(err => logger.error(err));
if (isDev) {
view.webContents.openDevTools({
mode: 'detach',
Expand Down Expand Up @@ -1032,7 +1034,9 @@ export const switchTab = (n: number) => {
n === 9 ? -1 : n - 1
);
if (item) {
WebContentViewsManager.instance.showTab(item.id).catch(logger.error);
WebContentViewsManager.instance
.showTab(item.id)
.catch(err => logger.error(err));
}
};

Expand All @@ -1044,7 +1048,9 @@ export const switchToNextTab = () => {
activeIndex === length - 1 ? 0 : activeIndex + 1
);
if (item) {
WebContentViewsManager.instance.showTab(item.id).catch(logger.error);
WebContentViewsManager.instance
.showTab(item.id)
.catch(err => logger.error(err));
}
};

Expand All @@ -1056,6 +1062,8 @@ export const switchToPreviousTab = () => {
activeIndex === 0 ? length - 1 : activeIndex - 1
);
if (item) {
WebContentViewsManager.instance.showTab(item.id).catch(logger.error);
WebContentViewsManager.instance
.showTab(item.id)
.catch(err => logger.error(err));
}
};
17 changes: 1 addition & 16 deletions packages/frontend/apps/mobile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,32 +12,17 @@
"dependencies": {
"@affine/component": "workspace:*",
"@affine/core": "workspace:*",
"@affine/env": "workspace:*",
"@affine/graphql": "workspace:*",
"@affine/i18n": "workspace:*",
"@affine/track": "workspace:*",
"@blocksuite/blocks": "0.17.10",
"@blocksuite/icons": "^2.1.66",
"@radix-ui/react-collapsible": "^1.0.3",
"@blocksuite/icons": "^2.1.67",
"@sentry/react": "^8.0.0",
"@toeverything/theme": "^1.0.9",
"clsx": "^2.1.1",
"jotai": "^2.9.3",
"jotai-effect": "^1.0.2",
"jotai-scope": "^0.7.2",
"lodash-es": "^4.17.21",
"next-themes": "^0.3.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.26.1"
},
"devDependencies": {
"@affine/cli": "workspace:*",
"@types/lodash-es": "^4.17.12",
"@types/react": "^18.2.75",
"@types/react-dom": "^18.2.24",
"@vanilla-extract/css": "^1.15.5",
"@vanilla-extract/dynamic": "^2.1.2",
"cross-env": "^7.0.3",
"typescript": "^5.4.5"
}
Expand Down
4 changes: 0 additions & 4 deletions packages/frontend/apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,14 @@
"dependencies": {
"@affine/component": "workspace:*",
"@affine/core": "workspace:*",
"@affine/electron-api": "workspace:*",
"@affine/env": "workspace:*",
"@affine/i18n": "workspace:*",
"@emotion/react": "^11.11.4",
"@sentry/react": "^8.0.0",
"jotai": "^2.8.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.22.3"
},
"devDependencies": {
"@affine/cli": "workspace:*",
"@types/react": "^18.2.75",
"@types/react-dom": "^18.2.24",
"cross-env": "^7.0.3",
Expand Down
Loading

0 comments on commit ed63602

Please sign in to comment.