From 0279dc44b742f5951182e4eff5cfe96a87cab993 Mon Sep 17 00:00:00 2001 From: alt0 Date: Fri, 14 Oct 2022 13:26:06 +0800 Subject: [PATCH 1/2] chore: change to monorepo --- .eslintrc.js | 14 +- .vscode/settings.json | 3 + README.md | 35 +-- package.json | 56 ++-- packages/app/.eslintrc.js | 18 ++ packages/app/README.md | 34 +++ next-env.d.ts => packages/app/next-env.d.ts | 0 next.config.js => packages/app/next.config.js | 0 packages/app/package.json | 38 +++ {public => packages/app/public}/favicon.ico | Bin {public => packages/app/public}/globals.css | 0 {public => packages/app/public}/variable.css | 0 .../app/src}/components/Header/icons.tsx | 0 .../app/src}/components/Header/index.tsx | 0 .../app/src}/components/Header/styles.ts | 0 .../app/src}/components/editor-provider.tsx | 0 .../app/src}/components/editor.tsx | 0 .../app/src}/components/popover/index.tsx | 0 .../src}/components/simple-counter/index.ts | 0 {src => packages/app/src}/pages/_app.tsx | 0 {src => packages/app/src}/pages/_document.tsx | 0 {src => packages/app/src}/pages/affine.tsx | 0 {src => packages/app/src}/pages/index.tsx | 0 {src => packages/app/src}/pages/temporary.css | 0 {src => packages/app/src}/styles/hooks.ts | 0 {src => packages/app/src}/styles/index.ts | 0 {src => packages/app/src}/styles/styled.ts | 0 {src => packages/app/src}/styles/theme.ts | 0 .../app/src}/styles/themeProvider.tsx | 0 {src => packages/app/src}/styles/types.ts | 0 .../app/src}/styles/utils/index.ts | 0 .../styles/utils/localStorageThemeHelper.ts | 0 .../src}/styles/utils/systemThemeHelper.ts | 0 tsconfig.json => packages/app/tsconfig.json | 0 pnpm-lock.yaml | 271 ++++++++++++------ pnpm-workspace.yaml | 3 + 36 files changed, 305 insertions(+), 167 deletions(-) create mode 100644 .vscode/settings.json create mode 100644 packages/app/.eslintrc.js create mode 100644 packages/app/README.md rename next-env.d.ts => packages/app/next-env.d.ts (100%) rename next.config.js => packages/app/next.config.js (100%) create mode 100644 packages/app/package.json rename {public => packages/app/public}/favicon.ico (100%) rename {public => packages/app/public}/globals.css (100%) rename {public => packages/app/public}/variable.css (100%) rename {src => packages/app/src}/components/Header/icons.tsx (100%) rename {src => packages/app/src}/components/Header/index.tsx (100%) rename {src => packages/app/src}/components/Header/styles.ts (100%) rename {src => packages/app/src}/components/editor-provider.tsx (100%) rename {src => packages/app/src}/components/editor.tsx (100%) rename {src => packages/app/src}/components/popover/index.tsx (100%) rename {src => packages/app/src}/components/simple-counter/index.ts (100%) rename {src => packages/app/src}/pages/_app.tsx (100%) rename {src => packages/app/src}/pages/_document.tsx (100%) rename {src => packages/app/src}/pages/affine.tsx (100%) rename {src => packages/app/src}/pages/index.tsx (100%) rename {src => packages/app/src}/pages/temporary.css (100%) rename {src => packages/app/src}/styles/hooks.ts (100%) rename {src => packages/app/src}/styles/index.ts (100%) rename {src => packages/app/src}/styles/styled.ts (100%) rename {src => packages/app/src}/styles/theme.ts (100%) rename {src => packages/app/src}/styles/themeProvider.tsx (100%) rename {src => packages/app/src}/styles/types.ts (100%) rename {src => packages/app/src}/styles/utils/index.ts (100%) rename {src => packages/app/src}/styles/utils/localStorageThemeHelper.ts (100%) rename {src => packages/app/src}/styles/utils/systemThemeHelper.ts (100%) rename tsconfig.json => packages/app/tsconfig.json (100%) create mode 100644 pnpm-workspace.yaml diff --git a/.eslintrc.js b/.eslintrc.js index c76264c24..ce7b73ee9 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -5,14 +5,10 @@ /** @type { import('eslint').Linter.Config } */ module.exports = { - extends: [ - 'next/core-web-vitals', - 'plugin:@next/next/recommended', - 'plugin:prettier/recommended', - ], - rules: { - 'prettier/prettier': 'warn', - }, + extends: ['plugin:prettier/recommended'], + rules: { + 'prettier/prettier': 'warn', + }, - reportUnusedDisableDirectives: true, + reportUnusedDisableDirectives: true, }; diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 000000000..a565aa8dc --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "eslint.packageManager": "pnpm" +} \ No newline at end of file diff --git a/README.md b/README.md index c87e0421d..03842fac0 100644 --- a/README.md +++ b/README.md @@ -1,34 +1 @@ -This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). - -## Getting Started - -First, run the development server: - -```bash -npm run dev -# or -yarn dev -``` - -Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. - -You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file. - -[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`. - -The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages. - -## Learn More - -To learn more about Next.js, take a look at the following resources: - -- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. -- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. - -You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! - -## Deploy on Vercel - -The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. - -Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. +# Pathfinder diff --git a/package.json b/package.json index a75ccb5e0..89891984f 100644 --- a/package.json +++ b/package.json @@ -1,38 +1,22 @@ { - "name": "affine-pathfinder", - "version": "0.1.0", - "private": true, - "scripts": { - "dev": "next dev", - "build": "next build", - "export": "next export", - "start": "next start", - "lint": "next lint" - }, - "dependencies": { - "@blocksuite/blocks": "^0.2.4", - "@blocksuite/editor": "^0.2.4", - "@blocksuite/store": "^0.2.4", - "@emotion/css": "^11.10.0", - "@emotion/react": "^11.10.4", - "@emotion/server": "^11.10.0", - "@emotion/styled": "^11.10.4", - "lit": "^2.3.1", - "next": "12.3.1", - "prettier": "^2.7.1", - "quill": "^1.3.7", - "quill-cursors": "^4.0.0", - "react": "18.2.0", - "react-dom": "18.2.0" - }, - "devDependencies": { - "@types/node": "18.7.18", - "@types/react": "18.0.20", - "@types/react-dom": "18.0.6", - "eslint": "8.22.0", - "eslint-config-next": "12.3.1", - "eslint-config-prettier": "^8.5.0", - "eslint-plugin-prettier": "^4.2.1", - "typescript": "4.8.3" + "name": "pathfinder", + "version": "0.0.0", + "private": true, + "scripts": { + "dev": "pnpm --filter @pathfinder/app dev", + "build": "pnpm --filter @pathfinder/app build", + "export": "pnpm --filter @pathfinder/app export", + "start": "pnpm --filter @pathfinder/app start", + "lint": "pnpm --filter @pathfinder/app lint" + }, + "dependencies": { + }, + "devDependencies": { + "prettier": "^2.7.1", + "eslint": "8.22.0", + "eslint-config-next": "12.3.1", + "eslint-config-prettier": "^8.5.0", + "eslint-plugin-prettier": "^4.2.1" + } } -} + \ No newline at end of file diff --git a/packages/app/.eslintrc.js b/packages/app/.eslintrc.js new file mode 100644 index 000000000..c76264c24 --- /dev/null +++ b/packages/app/.eslintrc.js @@ -0,0 +1,18 @@ +// https://eslint.org/docs/latest/user-guide/configuring +// "off" or 0 - turn the rule off +// "warn" or 1 - turn the rule on as a warning (doesn’t affect exit code) +// "error" or 2 - turn the rule on as an error (exit code will be 1) + +/** @type { import('eslint').Linter.Config } */ +module.exports = { + extends: [ + 'next/core-web-vitals', + 'plugin:@next/next/recommended', + 'plugin:prettier/recommended', + ], + rules: { + 'prettier/prettier': 'warn', + }, + + reportUnusedDisableDirectives: true, +}; diff --git a/packages/app/README.md b/packages/app/README.md new file mode 100644 index 000000000..c87e0421d --- /dev/null +++ b/packages/app/README.md @@ -0,0 +1,34 @@ +This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). + +## Getting Started + +First, run the development server: + +```bash +npm run dev +# or +yarn dev +``` + +Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. + +You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file. + +[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`. + +The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages. + +## Learn More + +To learn more about Next.js, take a look at the following resources: + +- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. +- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. + +You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! + +## Deploy on Vercel + +The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. + +Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. diff --git a/next-env.d.ts b/packages/app/next-env.d.ts similarity index 100% rename from next-env.d.ts rename to packages/app/next-env.d.ts diff --git a/next.config.js b/packages/app/next.config.js similarity index 100% rename from next.config.js rename to packages/app/next.config.js diff --git a/packages/app/package.json b/packages/app/package.json new file mode 100644 index 000000000..b575adadd --- /dev/null +++ b/packages/app/package.json @@ -0,0 +1,38 @@ +{ + "name": "@pathfinder/app", + "version": "0.1.0", + "private": true, + "scripts": { + "dev": "next dev", + "build": "next build", + "export": "next export", + "start": "next start", + "lint": "next lint" + }, + "dependencies": { + "@blocksuite/blocks": "^0.2.4", + "@blocksuite/editor": "^0.2.4", + "@blocksuite/store": "^0.2.4", + "@emotion/css": "^11.10.0", + "@emotion/react": "^11.10.4", + "@emotion/server": "^11.10.0", + "@emotion/styled": "^11.10.4", + "lit": "^2.3.1", + "next": "12.3.1", + "prettier": "^2.7.1", + "quill": "^1.3.7", + "quill-cursors": "^4.0.0", + "react": "18.2.0", + "react-dom": "18.2.0" + }, + "devDependencies": { + "@types/node": "18.7.18", + "@types/react": "18.0.20", + "@types/react-dom": "18.0.6", + "eslint": "8.22.0", + "eslint-config-next": "12.3.1", + "eslint-config-prettier": "^8.5.0", + "eslint-plugin-prettier": "^4.2.1", + "typescript": "4.8.3" + } +} diff --git a/public/favicon.ico b/packages/app/public/favicon.ico similarity index 100% rename from public/favicon.ico rename to packages/app/public/favicon.ico diff --git a/public/globals.css b/packages/app/public/globals.css similarity index 100% rename from public/globals.css rename to packages/app/public/globals.css diff --git a/public/variable.css b/packages/app/public/variable.css similarity index 100% rename from public/variable.css rename to packages/app/public/variable.css diff --git a/src/components/Header/icons.tsx b/packages/app/src/components/Header/icons.tsx similarity index 100% rename from src/components/Header/icons.tsx rename to packages/app/src/components/Header/icons.tsx diff --git a/src/components/Header/index.tsx b/packages/app/src/components/Header/index.tsx similarity index 100% rename from src/components/Header/index.tsx rename to packages/app/src/components/Header/index.tsx diff --git a/src/components/Header/styles.ts b/packages/app/src/components/Header/styles.ts similarity index 100% rename from src/components/Header/styles.ts rename to packages/app/src/components/Header/styles.ts diff --git a/src/components/editor-provider.tsx b/packages/app/src/components/editor-provider.tsx similarity index 100% rename from src/components/editor-provider.tsx rename to packages/app/src/components/editor-provider.tsx diff --git a/src/components/editor.tsx b/packages/app/src/components/editor.tsx similarity index 100% rename from src/components/editor.tsx rename to packages/app/src/components/editor.tsx diff --git a/src/components/popover/index.tsx b/packages/app/src/components/popover/index.tsx similarity index 100% rename from src/components/popover/index.tsx rename to packages/app/src/components/popover/index.tsx diff --git a/src/components/simple-counter/index.ts b/packages/app/src/components/simple-counter/index.ts similarity index 100% rename from src/components/simple-counter/index.ts rename to packages/app/src/components/simple-counter/index.ts diff --git a/src/pages/_app.tsx b/packages/app/src/pages/_app.tsx similarity index 100% rename from src/pages/_app.tsx rename to packages/app/src/pages/_app.tsx diff --git a/src/pages/_document.tsx b/packages/app/src/pages/_document.tsx similarity index 100% rename from src/pages/_document.tsx rename to packages/app/src/pages/_document.tsx diff --git a/src/pages/affine.tsx b/packages/app/src/pages/affine.tsx similarity index 100% rename from src/pages/affine.tsx rename to packages/app/src/pages/affine.tsx diff --git a/src/pages/index.tsx b/packages/app/src/pages/index.tsx similarity index 100% rename from src/pages/index.tsx rename to packages/app/src/pages/index.tsx diff --git a/src/pages/temporary.css b/packages/app/src/pages/temporary.css similarity index 100% rename from src/pages/temporary.css rename to packages/app/src/pages/temporary.css diff --git a/src/styles/hooks.ts b/packages/app/src/styles/hooks.ts similarity index 100% rename from src/styles/hooks.ts rename to packages/app/src/styles/hooks.ts diff --git a/src/styles/index.ts b/packages/app/src/styles/index.ts similarity index 100% rename from src/styles/index.ts rename to packages/app/src/styles/index.ts diff --git a/src/styles/styled.ts b/packages/app/src/styles/styled.ts similarity index 100% rename from src/styles/styled.ts rename to packages/app/src/styles/styled.ts diff --git a/src/styles/theme.ts b/packages/app/src/styles/theme.ts similarity index 100% rename from src/styles/theme.ts rename to packages/app/src/styles/theme.ts diff --git a/src/styles/themeProvider.tsx b/packages/app/src/styles/themeProvider.tsx similarity index 100% rename from src/styles/themeProvider.tsx rename to packages/app/src/styles/themeProvider.tsx diff --git a/src/styles/types.ts b/packages/app/src/styles/types.ts similarity index 100% rename from src/styles/types.ts rename to packages/app/src/styles/types.ts diff --git a/src/styles/utils/index.ts b/packages/app/src/styles/utils/index.ts similarity index 100% rename from src/styles/utils/index.ts rename to packages/app/src/styles/utils/index.ts diff --git a/src/styles/utils/localStorageThemeHelper.ts b/packages/app/src/styles/utils/localStorageThemeHelper.ts similarity index 100% rename from src/styles/utils/localStorageThemeHelper.ts rename to packages/app/src/styles/utils/localStorageThemeHelper.ts diff --git a/src/styles/utils/systemThemeHelper.ts b/packages/app/src/styles/utils/systemThemeHelper.ts similarity index 100% rename from src/styles/utils/systemThemeHelper.ts rename to packages/app/src/styles/utils/systemThemeHelper.ts diff --git a/tsconfig.json b/packages/app/tsconfig.json similarity index 100% rename from tsconfig.json rename to packages/app/tsconfig.json diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c46df0f69..bdc81b472 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,54 +1,69 @@ lockfileVersion: 5.4 -specifiers: - '@blocksuite/blocks': ^0.2.4 - '@blocksuite/editor': ^0.2.4 - '@blocksuite/store': ^0.2.4 - '@emotion/css': ^11.10.0 - '@emotion/react': ^11.10.4 - '@emotion/server': ^11.10.0 - '@emotion/styled': ^11.10.4 - '@types/node': 18.7.18 - '@types/react': 18.0.20 - '@types/react-dom': 18.0.6 - eslint: 8.22.0 - eslint-config-next: 12.3.1 - eslint-config-prettier: ^8.5.0 - eslint-plugin-prettier: ^4.2.1 - lit: ^2.3.1 - next: 12.3.1 - prettier: ^2.7.1 - quill: ^1.3.7 - quill-cursors: ^4.0.0 - react: 18.2.0 - react-dom: 18.2.0 - typescript: 4.8.3 +importers: -dependencies: - '@blocksuite/blocks': 0.2.4 - '@blocksuite/editor': 0.2.4 - '@blocksuite/store': 0.2.4 - '@emotion/css': 11.10.0 - '@emotion/react': 11.10.4_w5j4k42lgipnm43s3brx6h3c34 - '@emotion/server': 11.10.0_@emotion+css@11.10.0 - '@emotion/styled': 11.10.4_yiaqs725o7pcd7rteavrnhgj4y - lit: 2.3.1 - next: 12.3.1_biqbaboplfbrettd7655fr4n2y - prettier: 2.7.1 - quill: 1.3.7 - quill-cursors: 4.0.0 - react: 18.2.0 - react-dom: 18.2.0_react@18.2.0 + .: + specifiers: + eslint: 8.22.0 + eslint-config-next: 12.3.1 + eslint-config-prettier: ^8.5.0 + eslint-plugin-prettier: ^4.2.1 + prettier: ^2.7.1 + devDependencies: + eslint: 8.22.0 + eslint-config-next: 12.3.1_eslint@8.22.0 + eslint-config-prettier: 8.5.0_eslint@8.22.0 + eslint-plugin-prettier: 4.2.1_i2cojdczqdiurzgttlwdgf764e + prettier: 2.7.1 -devDependencies: - '@types/node': 18.7.18 - '@types/react': 18.0.20 - '@types/react-dom': 18.0.6 - eslint: 8.22.0 - eslint-config-next: 12.3.1_76twfck5d7crjqrmw4yltga7zm - eslint-config-prettier: 8.5.0_eslint@8.22.0 - eslint-plugin-prettier: 4.2.1_i2cojdczqdiurzgttlwdgf764e - typescript: 4.8.3 + packages/app: + specifiers: + '@blocksuite/blocks': ^0.2.4 + '@blocksuite/editor': ^0.2.4 + '@blocksuite/store': ^0.2.4 + '@emotion/css': ^11.10.0 + '@emotion/react': ^11.10.4 + '@emotion/server': ^11.10.0 + '@emotion/styled': ^11.10.4 + '@types/node': 18.7.18 + '@types/react': 18.0.20 + '@types/react-dom': 18.0.6 + eslint: 8.22.0 + eslint-config-next: 12.3.1 + eslint-config-prettier: ^8.5.0 + eslint-plugin-prettier: ^4.2.1 + lit: ^2.3.1 + next: 12.3.1 + prettier: ^2.7.1 + quill: ^1.3.7 + quill-cursors: ^4.0.0 + react: 18.2.0 + react-dom: 18.2.0 + typescript: 4.8.3 + dependencies: + '@blocksuite/blocks': 0.2.5 + '@blocksuite/editor': 0.2.5 + '@blocksuite/store': 0.2.5 + '@emotion/css': 11.10.0 + '@emotion/react': 11.10.4_w5j4k42lgipnm43s3brx6h3c34 + '@emotion/server': 11.10.0_@emotion+css@11.10.0 + '@emotion/styled': 11.10.4_yiaqs725o7pcd7rteavrnhgj4y + lit: 2.4.0 + next: 12.3.1_biqbaboplfbrettd7655fr4n2y + prettier: 2.7.1 + quill: 1.3.7 + quill-cursors: 4.0.0 + react: 18.2.0 + react-dom: 18.2.0_react@18.2.0 + devDependencies: + '@types/node': 18.7.18 + '@types/react': 18.0.20 + '@types/react-dom': 18.0.6 + eslint: 8.22.0 + eslint-config-next: 12.3.1_76twfck5d7crjqrmw4yltga7zm + eslint-config-prettier: 8.5.0_eslint@8.22.0 + eslint-plugin-prettier: 4.2.1_i2cojdczqdiurzgttlwdgf764e + typescript: 4.8.3 packages: @@ -63,7 +78,7 @@ packages: resolution: {integrity: sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.19.0 + '@babel/types': 7.19.4 dev: false /@babel/helper-plugin-utils/7.19.0: @@ -71,8 +86,8 @@ packages: engines: {node: '>=6.9.0'} dev: false - /@babel/helper-string-parser/7.18.10: - resolution: {integrity: sha512-XtIfWmeNY3i4t7t4D2t02q50HvqHybPqW2ki1kosnvWCwuCMeo81Jf0gwr85jy/neUdg5XDdeFE/80DXiO+njw==} + /@babel/helper-string-parser/7.19.4: + resolution: {integrity: sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw==} engines: {node: '>=6.9.0'} dev: false @@ -113,21 +128,21 @@ packages: dependencies: regenerator-runtime: 0.13.9 - /@babel/types/7.19.0: - resolution: {integrity: sha512-YuGopBq3ke25BVSiS6fgF49Ul9gH1x70Bcr6bqRLjWCkcX8Hre1/5+z+IiWOIerRMSSEfGZVB9z9kyq7wVs9YA==} + /@babel/types/7.19.4: + resolution: {integrity: sha512-M5LK7nAeS6+9j7hAq+b3fQs+pNfUtTGq+yFFfHnauFA8zQtLRfmuipmsKDKKLuyG+wC8ABW43A153YNawNTEtw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/helper-string-parser': 7.18.10 + '@babel/helper-string-parser': 7.19.4 '@babel/helper-validator-identifier': 7.19.1 to-fast-properties: 2.0.0 dev: false - /@blocksuite/blocks/0.2.4: - resolution: {integrity: sha512-d8mBKt3Skk/fHR1i8tLzEYfkXUblEuuJXtQ6GrAdaU/yHwiM7R7+ZdO6AFOnJYPszX17AxQ4428ERe5qRhCDCA==} + /@blocksuite/blocks/0.2.5: + resolution: {integrity: sha512-e1pMkrbUmGBDBaquK8Ho7VONKkXsIyOz76tC9K+srDbCFhL3Vw6ozPVMn5s3v6k4A9f69q2xdHoQSSgbD2zX1A==} dependencies: - '@blocksuite/shared': 0.2.4 - '@blocksuite/store': 0.2.4 - lit: 2.3.1 + '@blocksuite/shared': 0.2.5 + '@blocksuite/store': 0.2.5 + lit: 2.4.0 quill: 1.3.7 quill-cursors: 4.0.0 transitivePeerDependencies: @@ -136,13 +151,13 @@ packages: - utf-8-validate dev: false - /@blocksuite/editor/0.2.4: - resolution: {integrity: sha512-f+BpetqzeTwZAxXfwKdH86xZw3XOnKokfhsOMVkK3PJnaWiNn2Kn9jJ0DkqAAwltWscReK5PQW7/D32gdsj7OA==} + /@blocksuite/editor/0.2.5: + resolution: {integrity: sha512-dKNNRuaMostt199L2+inY+aMzIjK0KFehU95zKPo/nBqQEBc69F7Bc2BWbvPFJHMYyItkz7zwtLbK/h2gV0wwg==} dependencies: - '@blocksuite/blocks': 0.2.4 - '@blocksuite/shared': 0.2.4 - '@blocksuite/store': 0.2.4 - lit: 2.3.1 + '@blocksuite/blocks': 0.2.5 + '@blocksuite/shared': 0.2.5 + '@blocksuite/store': 0.2.5 + lit: 2.4.0 marked: 4.1.1 turndown: 7.1.1 transitivePeerDependencies: @@ -151,10 +166,10 @@ packages: - utf-8-validate dev: false - /@blocksuite/shared/0.2.4: - resolution: {integrity: sha512-lc9J+Lty61V6w9xZ/KEj3CrMMRzwL2OfKQfAyrUErnzaTOUQj13CF1+yIfLSW4Ymu0BchU7mXDzMZIToeDOnEQ==} + /@blocksuite/shared/0.2.5: + resolution: {integrity: sha512-bibt5pPXxtHzq27CUpgBOjqj5T0WG0tu9B0KWR1VTERzTElyzSr4vzT8RLdUJNBfMbtJvpXL6MTFxtQqmmreUQ==} dependencies: - '@blocksuite/store': 0.2.4 + '@blocksuite/store': 0.2.5 hotkeys-js: 3.10.0 transitivePeerDependencies: - bufferutil @@ -162,8 +177,8 @@ packages: - utf-8-validate dev: false - /@blocksuite/store/0.2.4: - resolution: {integrity: sha512-SuUCvxzXaUWa5CLkRhXCbHRLYQo8r1G4VG4aKlhX3P4krrzAa5x77VxZ5qnvi9OHOxSHkeJ+oZdFbh1avtfHgw==} + /@blocksuite/store/0.2.5: + resolution: {integrity: sha512-YU+WRN2PnAF+GDpEcHJyGGWdSCIclLWMkKBuYGR0ddWWOfJ35UGkHVjCQaLKvwB8IidhFrfrrj9wEVp7Ma/Pog==} dependencies: lib0: 0.2.52 y-protocols: 1.0.5 @@ -187,7 +202,7 @@ packages: '@emotion/memoize': 0.8.0 '@emotion/serialize': 1.1.0 babel-plugin-macros: 3.1.0 - convert-source-map: 1.8.0 + convert-source-map: 1.9.0 escape-string-regexp: 4.0.0 find-root: 1.1.0 source-map: 0.5.7 @@ -583,6 +598,25 @@ packages: - supports-color dev: true + /@typescript-eslint/parser/5.38.0_eslint@8.22.0: + resolution: {integrity: sha512-/F63giJGLDr0ms1Cr8utDAxP2SPiglaD6V+pCOcG35P2jCqdfR7uuEhz1GIC3oy4hkUF8xA1XSXmd9hOh/a5EA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/scope-manager': 5.38.0 + '@typescript-eslint/types': 5.38.0 + '@typescript-eslint/typescript-estree': 5.38.0 + debug: 4.3.4 + eslint: 8.22.0 + transitivePeerDependencies: + - supports-color + dev: true + /@typescript-eslint/scope-manager/5.38.0: resolution: {integrity: sha512-ByhHIuNyKD9giwkkLqzezZ9y5bALW8VNY6xXcP+VxoH4JBDKjU5WNnsiD4HJdglHECdV+lyaxhvQjTUbRboiTA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -596,6 +630,26 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true + /@typescript-eslint/typescript-estree/5.38.0: + resolution: {integrity: sha512-6P0RuphkR+UuV7Avv7MU3hFoWaGcrgOdi8eTe1NwhMp2/GjUJoODBTRWzlHpZh6lFOaPmSvgxGlROa0Sg5Zbyg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/types': 5.38.0 + '@typescript-eslint/visitor-keys': 5.38.0 + debug: 4.3.4 + globby: 11.1.0 + is-glob: 4.0.3 + semver: 7.3.7 + tsutils: 3.21.0 + transitivePeerDependencies: + - supports-color + dev: true + /@typescript-eslint/typescript-estree/5.38.0_typescript@4.8.3: resolution: {integrity: sha512-6P0RuphkR+UuV7Avv7MU3hFoWaGcrgOdi8eTe1NwhMp2/GjUJoODBTRWzlHpZh6lFOaPmSvgxGlROa0Sg5Zbyg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -780,8 +834,8 @@ packages: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} engines: {node: '>=6'} - /caniuse-lite/1.0.30001408: - resolution: {integrity: sha512-DdUCktgMSM+1ndk9EFMZcavsGszV7zxV9O7MtOHniTa/iyAIwJCF0dFVBdU9SijJbfh29hC9bCs07wu8pjnGJQ==} + /caniuse-lite/1.0.30001419: + resolution: {integrity: sha512-aFO1r+g6R7TW+PNQxKzjITwLOyDhVRLjW0LcwS/HCZGUUKTGNp9+IwLC4xyDSZBygVL/mxaFR3HIV6wEKQuSzw==} dev: false /chalk/2.4.2: @@ -828,13 +882,11 @@ packages: dev: true /concat-map/0.0.1: - resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} + resolution: {integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=} dev: true - /convert-source-map/1.8.0: - resolution: {integrity: sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==} - dependencies: - safe-buffer: 5.1.2 + /convert-source-map/1.9.0: + resolution: {integrity: sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==} dev: false /core-js-pure/3.25.2: @@ -1051,6 +1103,30 @@ packages: - supports-color dev: true + /eslint-config-next/12.3.1_eslint@8.22.0: + resolution: {integrity: sha512-EN/xwKPU6jz1G0Qi6Bd/BqMnHLyRAL0VsaQaWA7F3KkjAgZHi4f1uL1JKGWNxdQpHTW/sdGONBd0bzxUka/DJg==} + peerDependencies: + eslint: ^7.23.0 || ^8.0.0 + typescript: '>=3.3.1' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@next/eslint-plugin-next': 12.3.1 + '@rushstack/eslint-patch': 1.2.0 + '@typescript-eslint/parser': 5.38.0_eslint@8.22.0 + eslint: 8.22.0 + eslint-import-resolver-node: 0.3.6 + eslint-import-resolver-typescript: 2.7.1_2iahngt3u2tkbdlu6s4gkur3pu + eslint-plugin-import: 2.26.0_dz6mtv6jua3j7xbldvgsafodwi + eslint-plugin-jsx-a11y: 6.6.1_eslint@8.22.0 + eslint-plugin-react: 7.31.8_eslint@8.22.0 + eslint-plugin-react-hooks: 4.6.0_eslint@8.22.0 + transitivePeerDependencies: + - eslint-import-resolver-webpack + - supports-color + dev: true + /eslint-config-prettier/8.5.0_eslint@8.22.0: resolution: {integrity: sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q==} hasBin: true @@ -1108,7 +1184,7 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 5.38.0_76twfck5d7crjqrmw4yltga7zm + '@typescript-eslint/parser': 5.38.0_eslint@8.22.0 debug: 3.2.7 eslint: 8.22.0 eslint-import-resolver-node: 0.3.6 @@ -1127,7 +1203,7 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 5.38.0_76twfck5d7crjqrmw4yltga7zm + '@typescript-eslint/parser': 5.38.0_eslint@8.22.0 array-includes: 3.1.5 array.prototype.flat: 1.3.0 debug: 2.6.9 @@ -1799,21 +1875,21 @@ packages: resolution: {integrity: sha512-6ZgxBR9KNroqKb6+htkyBwD90XGRiqKDHVrW/Eh0EZ+l+iC+u+v+w3/BA5NGi4nizAVHGYvQBHUDuSmLjPp7NQ==} dependencies: '@lit/reactive-element': 1.4.1 - lit-html: 2.3.1 + lit-html: 2.4.0 dev: false - /lit-html/2.3.1: - resolution: {integrity: sha512-FyKH6LTW6aBdkfNhNSHyZTnLgJSTe5hMk7HFtc/+DcN1w74C215q8B+Cfxc2OuIEpBNcEKxgF64qL8as30FDHA==} + /lit-html/2.4.0: + resolution: {integrity: sha512-G6qXu4JNUpY6aaF2VMfaszhO9hlWw0hOTRFDmuMheg/nDYGB+2RztUSOyrzALAbr8Nh0Y7qjhYkReh3rPnplVg==} dependencies: '@types/trusted-types': 2.0.2 dev: false - /lit/2.3.1: - resolution: {integrity: sha512-TejktDR4mqG3qB32Y8Lm5Lye3c8SUehqz7qRsxe1PqGYL6me2Ef+jeQAEqh20BnnGncv4Yxy2njEIT0kzK1WCw==} + /lit/2.4.0: + resolution: {integrity: sha512-fdgzxEtLrZFQU/BqTtxFQCLwlZd9bdat+ltzSFjvWkZrs7eBmeX0L5MHUMb3kYIkuS8Xlfnii/iI5klirF8/Xg==} dependencies: '@lit/reactive-element': 1.4.1 lit-element: 3.2.2 - lit-html: 2.3.1 + lit-html: 2.4.0 dev: false /locate-path/6.0.0: @@ -1916,7 +1992,7 @@ packages: dependencies: '@next/env': 12.3.1 '@swc/helpers': 0.4.11 - caniuse-lite: 1.0.30001408 + caniuse-lite: 1.0.30001419 postcss: 8.4.14 react: 18.2.0 react-dom: 18.2.0_react@18.2.0 @@ -2165,7 +2241,7 @@ packages: /randombytes/2.1.0: resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==} dependencies: - safe-buffer: 5.1.2 + safe-buffer: 5.2.1 dev: false /react-dom/18.2.0_react@18.2.0: @@ -2214,7 +2290,7 @@ packages: engines: {node: '>= 6'} dependencies: inherits: 2.0.4 - string_decoder: 1.1.1 + string_decoder: 1.3.0 util-deprecate: 1.0.2 dev: false @@ -2277,6 +2353,10 @@ packages: resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==} dev: false + /safe-buffer/5.2.1: + resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} + dev: false + /scheduler/0.23.0: resolution: {integrity: sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==} dependencies: @@ -2384,6 +2464,12 @@ packages: safe-buffer: 5.1.2 dev: false + /string_decoder/1.3.0: + resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} + dependencies: + safe-buffer: 5.2.1 + dev: false + /strip-ansi/6.0.1: resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} engines: {node: '>=8'} @@ -2483,6 +2569,15 @@ packages: resolution: {integrity: sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==} dev: false + /tsutils/3.21.0: + resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} + engines: {node: '>= 6'} + peerDependencies: + typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta' + dependencies: + tslib: 1.14.1 + dev: true + /tsutils/3.21.0_typescript@4.8.3: resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} engines: {node: '>= 6'} diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml new file mode 100644 index 000000000..d6d060732 --- /dev/null +++ b/pnpm-workspace.yaml @@ -0,0 +1,3 @@ +packages: + # all packages in direct subdirs of packages/ + - 'packages/*' \ No newline at end of file From 88bc397816d4fdf6ec5aa17d4e3829aad26478fb Mon Sep 17 00:00:00 2001 From: zuomeng wang Date: Fri, 14 Oct 2022 14:56:38 +0800 Subject: [PATCH 2/2] chore: update workflow (#17) --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 869f9391c..af528d430 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -61,7 +61,7 @@ jobs: - name: Upload artifact uses: actions/upload-artifact@v3 with: - path: ./out + path: ./packages/app/out push_to_registry: # See https://docs.github.com/en/actions/publishing-packages/publishing-docker-images @@ -88,7 +88,7 @@ jobs: uses: actions/download-artifact@v3 with: name: artifact - path: out/ + path: packages/app/out/ - name: Log in to Docker Hub uses: docker/login-action@v2