chore: standardize package references (#9346)

This commit is contained in:
liuyi
2024-12-26 19:08:42 +08:00
committed by GitHub
parent 37747369bc
commit 00980077c4
45 changed files with 146 additions and 101 deletions

View File

@@ -0,0 +1,30 @@
{
"name": "@affine/electron-renderer",
"private": true,
"version": "0.18.0",
"type": "module",
"scripts": {
"build": "affine bundle",
"dev": "affine bundle --dev"
},
"dependencies": {
"@affine/component": "workspace:*",
"@affine/core": "workspace:*",
"@affine/electron-api": "workspace:*",
"@affine/i18n": "workspace:*",
"@emotion/react": "^11.14.0",
"@sentry/react": "^8.44.0",
"@vanilla-extract/css": "^1.16.1",
"next-themes": "^0.4.4",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react-router-dom": "^6.28.0"
},
"devDependencies": {
"@affine-tools/utils": "workspace:*",
"@types/react": "^19.0.1",
"@types/react-dom": "^19.0.2",
"cross-env": "^7.0.3",
"typescript": "^5.7.2"
}
}

View File

@@ -17,7 +17,7 @@ function main() {
}
function mountApp() {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
// oxlint-disable-next-line typescript-eslint/no-non-null-assertion
const root = document.getElementById('app')!;
createRoot(root).render(
<StrictMode>

View File

@@ -0,0 +1,17 @@
{
"extends": "../../../../tsconfig.json",
"compilerOptions": {
"composite": true,
"outDir": "lib",
"moduleResolution": "Bundler",
"types": ["affine__env"],
"rootDir": "./src"
},
"include": ["./src"],
"references": [
{ "path": "../../core" },
{
"path": "../../electron-api"
}
]
}

View File

@@ -0,0 +1,21 @@
{
"extends": "../../../../tsconfig.json",
"compilerOptions": {
"composite": true,
"target": "ESNext",
"module": "ESNext",
"resolveJsonModule": true,
"moduleResolution": "Node",
"allowSyntheticDefaultImports": true,
"noEmit": false,
"outDir": "./lib/tests",
"types": ["node", "affine__env"],
"allowJs": true
},
"references": [
{
"path": "./tsconfig.json"
}
],
"include": ["./test"]
}

View File

@@ -0,0 +1,6 @@
export const config = {
entry: {
app: './src/index.tsx',
shell: './src/shell/index.tsx',
},
};

View File

@@ -16,7 +16,6 @@
"dev:prod": "node ./scripts/dev.ts",
"build": "cross-env NODE_ENV=production node ./scripts/build-layers.ts",
"build:dev": "node ./scripts/build-layers.ts",
"bundle": "affine bundle",
"generate-assets": "node ./scripts/generate-assets.ts",
"package": "electron-forge package",
"make": "electron-forge make",
@@ -26,13 +25,8 @@
"devDependencies": {
"@affine-test/kit": "workspace:*",
"@affine-tools/utils": "workspace:*",
"@affine/component": "workspace:*",
"@affine/core": "workspace:*",
"@affine/electron-api": "workspace:*",
"@affine/i18n": "workspace:*",
"@affine/native": "workspace:*",
"@affine/nbstore": "workspace:*",
"@blocksuite/affine": "workspace:*",
"@electron-forge/cli": "^7.6.0",
"@electron-forge/core": "^7.6.0",
"@electron-forge/core-utils": "^7.6.0",
@@ -43,7 +37,6 @@
"@electron-forge/maker-zip": "^7.6.0",
"@electron-forge/plugin-auto-unpack-natives": "^7.6.0",
"@electron-forge/shared-types": "^7.6.0",
"@emotion/react": "^11.14.0",
"@pengx17/electron-forge-maker-appimage": "^1.2.1",
"@sentry/electron": "^5.8.0",
"@sentry/esbuild-plugin": "^2.22.7",
@@ -51,7 +44,6 @@
"@toeverything/infra": "workspace:*",
"@types/set-cookie-parser": "^2.4.10",
"@types/uuid": "^10.0.0",
"@vanilla-extract/css": "^1.16.1",
"@vitejs/plugin-react-swc": "^3.7.2",
"app-builder-lib": "^25.1.8",
"builder-util-runtime": "^9.2.10",
@@ -67,9 +59,6 @@
"lodash-es": "^4.17.21",
"msw": "^2.6.8",
"nanoid": "^5.0.9",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react-router-dom": "^6.28.0",
"rxjs": "^7.8.1",
"semver": "^7.6.3",
"tree-kill": "^1.2.2",

View File

@@ -1,30 +0,0 @@
{
"extends": "../../../../../tsconfig.json",
"compilerOptions": {
"composite": true,
"target": "ESNext",
"module": "ESNext",
"resolveJsonModule": true,
"moduleResolution": "Bundler",
"allowSyntheticDefaultImports": true,
"noEmit": false,
"outDir": "../lib",
"allowJs": true
},
"references": [
{
"path": "../../../../common/env"
},
{
"path": "../../../core"
},
{
"path": "../../../component"
},
{
"path": "../../../../common/infra"
}
],
"include": ["."],
"exclude": ["dist"]
}

View File

@@ -17,8 +17,7 @@ const webDir = path.join(
'packages',
'frontend',
'apps',
'electron',
'renderer'
'electron-renderer'
);
const affineWebOutDir = path.join(webDir, 'dist');
const publicAffineOutDir = path.join(publicDistDir, `web-static`);