chore: unify version (#1123)

This commit is contained in:
Himself65 2023-02-19 02:40:39 -06:00 committed by GitHub
parent aa1de57d96
commit ae4105e961
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
26 changed files with 1286 additions and 1694 deletions

View File

@ -15,35 +15,36 @@
"build:app": "tauri build"
},
"dependencies": {
"@blocksuite/icons": "^2.0.14",
"@blocksuite/icons": "2.0.12",
"@blocksuite/store": "0.4.1",
"@emotion/react": "^11.10.5",
"@emotion/styled": "^11.10.5",
"@emotion/react": "^11.10.6",
"@emotion/styled": "^11.10.6",
"@tauri-apps/api": "^1.2.0",
"json-schema-to-typescript": "^11.0.2",
"lib0": "^0.2.58",
"next": "^13.1.6",
"lib0": "^0.2.62",
"next": "13.1.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-is": "^18.2.0",
"react-router": "^6.5.0",
"react-router-dom": "^6.5.0",
"y-protocols": "^1.0.5",
"yjs": "^13.5.43"
"yjs": "^13.5.46"
},
"devDependencies": {
"@tauri-apps/cli": "^1.2.3",
"@types/node": "^18.11.17",
"@types/react": "^18.0.26",
"@types/react-dom": "^18.0.9",
"@types/node": "^18.14.0",
"@types/react": "^18.0.28",
"@types/react-dom": "^18.0.11",
"concurrently": "^7.6.0",
"cross-env": "^7.0.3",
"esbuild": "^0.16.10",
"prettier": "2.8.1",
"rimraf": "^3.0.2",
"esbuild": "^0.17.8",
"lit": "^2.6.1",
"prettier": "2.8.4",
"rimraf": "^4.1.2",
"typescript": "^4.9.4",
"typesync": "^0.9.2",
"vite": "^4.0.2",
"typesync": "^0.10.0",
"vite": "^4.1.2",
"zx": "^7.1.1"
}
}

View File

@ -1,4 +1,5 @@
{
"root": false,
"extends": "next/core-web-vitals"
"extends": "next/core-web-vitals",
"reportUnusedDisableDirectives": true
}

View File

@ -1,8 +1,12 @@
/* eslint @typescript-eslint/no-var-requires: "off" */
const { getGitVersion, getCommitHash } = require('./scripts/gitInfo');
const { dependencies } = require('./package.json');
const path = require('node:path');
const printer = require('./scripts/printer').printer;
import { getGitVersion, getCommitHash } from './scripts/gitInfo.mjs';
import fs from 'node:fs';
import path from 'node:path';
import { printer } from './scripts/printer.mjs';
import debugLocal from 'next-debug-local';
const dependencies = JSON.parse(fs.readFileSync('./package.json', 'utf8'))[
'dependencies'
];
const enableDebugLocal = path.isAbsolute(process.env.LOCAL_BLOCK_SUITE ?? '');
const EDITOR_VERSION = enableDebugLocal
@ -56,7 +60,6 @@ const nextConfig = {
],
webpack: config => {
config.experiments = { ...config.experiments, topLevelAwait: true };
config.resolve.alias['yjs'] = require.resolve('yjs');
config.module.rules.push({
test: /\.md$/i,
loader: 'raw-loader',
@ -81,7 +84,7 @@ const nextConfig = {
};
const baseDir = process.env.LOCAL_BLOCK_SUITE ?? '/';
const withDebugLocal = require('next-debug-local')(
const withDebugLocal = debugLocal(
{
'@blocksuite/editor': path.resolve(baseDir, 'packages', 'editor'),
'@blocksuite/blocks/models': path.resolve(
@ -115,4 +118,4 @@ const detectFirebaseConfig = () => {
};
detectFirebaseConfig();
module.exports = withDebugLocal(nextConfig);
export default withDebugLocal(nextConfig);

View File

@ -16,50 +16,42 @@
"@blocksuite/blocks": "0.4.1",
"@blocksuite/editor": "0.4.1",
"@blocksuite/global": "0.4.1",
"@blocksuite/icons": "^2.0.14",
"@blocksuite/icons": "2.0.12",
"@blocksuite/store": "0.4.1",
"@emotion/css": "^11.10.5",
"@emotion/react": "^11.10.5",
"@emotion/css": "^11.10.6",
"@emotion/react": "^11.10.6",
"@emotion/server": "^11.10.0",
"@emotion/styled": "^11.10.5",
"@emotion/styled": "^11.10.6",
"@fontsource/poppins": "^4.5.10",
"@fontsource/space-mono": "^4.5.10",
"@mui/base": "=5.0.0-alpha.117",
"@mui/icons-material": "=5.11.0",
"@mui/material": "=5.11.8",
"@fontsource/space-mono": "^4.5.12",
"@mui/base": "5.0.0-alpha.118",
"@mui/icons-material": "^5.11.9",
"@mui/material": "^5.11.9",
"@toeverything/pathfinder-logger": "workspace:@affine/logger@*",
"cmdk": "^0.1.20",
"cmdk": "^0.1.22",
"css-spring": "^4.1.0",
"dayjs": "^1.11.7",
"lit": "^2.6.1",
"next": "13.1.0",
"next-debug-local": "^0.1.5",
"prettier": "^2.7.1",
"prettier": "^2.8.4",
"quill": "^1.3.7",
"quill-cursors": "^4.0.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"yjs": "^13.5.45",
"zustand": "^4.3.2"
"yjs": "^13.5.46",
"zustand": "^4.3.3"
},
"devDependencies": {
"@types/node": "18.7.18",
"@types/react": "18.0.20",
"@types/react-dom": "18.0.6",
"@types/node": "18.14.0",
"@types/react": "18.0.28",
"@types/react-dom": "18.0.11",
"@types/wicg-file-system-access": "^2020.9.5",
"chalk": "^4.1.2",
"eslint-config-next": "12.3.1",
"chalk": "^5.2.0",
"eslint": "^8.34.0",
"eslint-config-next": "13.1.6",
"raw-loader": "^4.0.2",
"typescript": "^4.9.5"
},
"eslintConfig": {
"extends": [
"next/core-web-vitals",
"plugin:@next/next/recommended"
],
"rules": {
"prettier/prettier": "warn"
},
"reportUnusedDisableDirectives": true
"typescript": "^4.9.5",
"webpack": "^5.75.0"
}
}

View File

@ -1,8 +1,5 @@
// @ts-check
// import { execSync } from 'child_process'
// eslint-disable-next-line @typescript-eslint/no-var-requires
const { execSync } = require('child_process');
import { execSync } from 'node:child_process';
const hasGit = () => {
try {
@ -41,7 +38,4 @@ const getGitVersion = () => {
const getCommitHash = (rev = 'HEAD') =>
execSync(`git rev-parse --short ${rev}`).toString();
module.exports = {
getGitVersion,
getCommitHash,
};
export { getCommitHash, getGitVersion };

View File

@ -1,6 +1,5 @@
// eslint-disable-next-line @typescript-eslint/no-var-requires
const chalk = require('chalk');
const printer = {
import chalk from 'chalk';
export const printer = {
debug: msg => {
const result = chalk.green`debug` + chalk.white(' - ' + msg);
console.log(result);
@ -17,5 +16,3 @@ const printer = {
return result;
},
};
module.exports = { printer };

View File

@ -1,5 +1,4 @@
import { displayFlex, keyframes, styled } from '@affine/component';
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
import spring, { toString } from 'css-spring';

View File

@ -1,5 +1,4 @@
import { displayFlex, keyframes, styled } from '@affine/component';
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
import spring, { toString } from 'css-spring';
import { CSSProperties } from 'react';

View File

@ -2,12 +2,10 @@ import { cloneElement, FC, PropsWithChildren, ReactNode } from 'react';
export const ProviderComposer: FC<
PropsWithChildren<{
// eslint-disable-next-line @typescript-eslint/no-explicit-any
contexts: any;
}>
> = ({ contexts, children }) =>
contexts.reduceRight(
// eslint-disable-next-line @typescript-eslint/no-explicit-any
(kids: ReactNode, parent: any) =>
cloneElement(parent, {
children: kids,

View File

@ -52,22 +52,18 @@ export const WorkspaceDelete = ({
<StyledTextContent>
<Trans i18nKey="Delete Workspace Description">
Deleting (
<StyledWorkspaceName>
{{ workspace: workspace.name }}
</StyledWorkspaceName>
) cannot be undone, please proceed with caution. along with all
its content.
<StyledWorkspaceName>{workspace.name}</StyledWorkspaceName>)
cannot be undone, please proceed with caution. along with all its
content.
</Trans>
</StyledTextContent>
) : (
<StyledTextContent>
<Trans i18nKey="Delete Workspace Description2">
Deleting (
<StyledWorkspaceName>
{{ workspace: workspace.name }}
</StyledWorkspaceName>
) will delete both local and cloud data, this operation cannot be
undone, please proceed with caution.
<StyledWorkspaceName>{workspace.name}</StyledWorkspaceName>) will
delete both local and cloud data, this operation cannot be undone,
please proceed with caution.
</Trans>
</StyledTextContent>
)}

View File

@ -15,17 +15,16 @@ interface LoginModalProps {
workspaceId: string;
onInviteSuccess: () => void;
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export const debounce = <T extends (...args: any) => any>(
fn: T,
time?: number,
immediate?: boolean
// eslint-disable-next-line @typescript-eslint/no-explicit-any
): ((...args: any) => any) => {
let timeoutId: null | number;
let defaultImmediate = immediate || false;
const delay = time || 300;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
return (...args: any) => {
if (defaultImmediate) {
fn.apply(this, args);
@ -35,7 +34,7 @@ export const debounce = <T extends (...args: any) => any>(
if (timeoutId) {
clearTimeout(timeoutId);
}
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
timeoutId = setTimeout(() => {
fn.apply(this, args);

View File

@ -102,7 +102,7 @@ export const MembersPage = ({ workspace }: { workspace: WorkspaceUnit }) => {
<MenuItem
onClick={async () => {
// FIXME: remove ignore
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
await removeMember(member.id);
toast(

View File

@ -119,7 +119,7 @@ export const usePageHelper = (): EditorHandlers => {
},
permanentlyDeletePage: pageId => {
// TODO: workspace.meta.removePage or workspace.removePage?
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
currentWorkspace!.blocksuiteWorkspace?.meta.removePage(pageId);
},
openPage: (pageId, query = {}, newTab = false) => {

View File

@ -76,7 +76,6 @@ export const useConfirm: UseBoundStore<Store> = ((
) => {
const api = useConfirmApi();
return useStore(api, selector, equals);
// eslint-disable-next-line @typescript-eslint/no-explicit-any
}) as any;
function Records() {

View File

@ -30,7 +30,7 @@ import useCurrentPageMeta from '@/hooks/use-current-page-meta';
export const ThemeContext = createContext<ThemeProviderValue>({
mode: 'light',
// eslint-disable-next-line @typescript-eslint/no-empty-function
changeMode: () => {},
theme: getLightTheme('page'),
});
@ -124,10 +124,7 @@ export const ThemeProvider = ({
<Global
styles={css`
:root {
${
// eslint-disable-next-line @typescript-eslint/no-explicit-any
globalThemeVariables(mode, themeStyle) as any
}
${globalThemeVariables(mode, themeStyle) as any}
}
`}
/>

View File

@ -118,7 +118,6 @@ export const useModal: UseBoundStore<Store> = ((
) => {
const api = useModalApi();
return useStore(api, selector, equals);
// eslint-disable-next-line @typescript-eslint/no-explicit-any
}) as any;
const Modals: React.FC = function Modal() {

View File

@ -13,7 +13,6 @@ export function isMobile(userAgent: string) {
export const getIsMobile = function () {
return isMobile(
// eslint-disable-next-line @typescript-eslint/no-explicit-any
navigator?.userAgent || navigator?.vendor || (window as any)?.opera
);
};

View File

@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
// eslint-disable-next-line @typescript-eslint/ban-types
export function debounce(fn: Function, timeout: number) {
let timeoutId: any;

View File

@ -29,18 +29,18 @@
},
"devDependencies": {
"@changesets/cli": "^2.26.0",
"@playwright/test": "^1.29.1",
"@playwright/test": "^1.30.0",
"@testing-library/react": "^14.0.0",
"@types/eslint": "^8.4.10",
"@types/node": "^18.11.17",
"@typescript-eslint/eslint-plugin": "^5.47.0",
"@typescript-eslint/parser": "^5.47.0",
"@types/eslint": "^8.21.1",
"@types/node": "^18.14.0",
"@typescript-eslint/eslint-plugin": "^5.52.0",
"@typescript-eslint/parser": "^5.52.0",
"@vitejs/plugin-react": "^3.1.0",
"@vitest/coverage-istanbul": "^0.28.5",
"concurrently": "^7.6.0",
"cross-env": "^7.0.3",
"eslint": "^8.34.0",
"eslint-config-prettier": "^8.5.0",
"eslint-config-prettier": "^8.6.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.32.2",
@ -48,11 +48,11 @@
"eslint-plugin-unused-imports": "^2.0.0",
"fake-indexeddb": "4.0.1",
"got": "^12.5.3",
"happy-dom": "^8.4.4",
"husky": "^8.0.2",
"lint-staged": "^13.1.0",
"happy-dom": "^8.5.0",
"husky": "^8.0.3",
"lint-staged": "^13.1.2",
"nyc": "^15.1.0",
"prettier": "^2.7.1",
"prettier": "^2.8.4",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"typescript": "^4.9.5",
@ -62,7 +62,7 @@
"pnpm": {
"patchedDependencies": {
"@tauri-apps/api@1.2.0": "patches/@tauri-apps__api@1.2.0.patch",
"next@13.1.0": "patches/next@13.1.0.patch"
"next@13.1.6": "patches/next@13.1.0.patch"
}
}
}

View File

@ -12,14 +12,14 @@
"@blocksuite/blocks": "0.4.1",
"@blocksuite/editor": "0.4.1",
"@blocksuite/global": "0.4.1",
"@blocksuite/icons": "^2.0.2",
"@blocksuite/icons": "2.0.12",
"@blocksuite/react": "0.4.1",
"@blocksuite/store": "0.4.1",
"@emotion/react": "^11.10.5",
"@emotion/styled": "^11.10.5",
"@mui/base": "=5.0.0-alpha.117",
"@mui/icons-material": "=5.11.0",
"@mui/material": "=5.11.8",
"@emotion/react": "^11.10.6",
"@emotion/styled": "^11.10.6",
"@mui/base": "5.0.0-alpha.118",
"@mui/icons-material": "^5.11.9",
"@mui/material": "^5.11.9",
"lit": "^2.6.1",
"react": "^18.2.0",
"react-dom": "^18.2.0"
@ -31,14 +31,16 @@
"@storybook/builder-vite": "^7.0.0-beta.46",
"@storybook/react": "^7.0.0-beta.46",
"@storybook/react-vite": "7.0.0-beta.46",
"@types/react": "^18.0.27",
"@types/react-dom": "18.0.10",
"@swc/core": "^1.3.35",
"@types/react": "^18.0.28",
"@types/react-dom": "18.0.11",
"@vitejs/plugin-react": "^3.1.0",
"storybook": "^7.0.0-beta.46",
"swc": "^1.0.11",
"swc-loader": "^0.2.3",
"typescript": "^4.9.5",
"vite": "^4.0.2",
"webpack": "^5.75.0"
"vite": "^4.1.2",
"webpack": "^5.75.0",
"yjs": "^13.5.46"
}
}

View File

@ -4,10 +4,6 @@
"private": true,
"description": "",
"main": "./src/index.ts",
"scripts": {
"dev": "tsc --project ./tsconfig.json -w",
"build": "tsc --project ./tsconfig.json"
},
"repository": {
"type": "git",
"url": "git+https://github.com/toeverything/AFFiNE.git"
@ -15,9 +11,7 @@
"devDependencies": {
"@types/debug": "^4.1.7",
"fake-indexeddb": "4.0.1",
"lit": "^2.6.1",
"typescript": "^4.9.5",
"yjs": "^13.5.45"
"typescript": "^4.9.5"
},
"dependencies": {
"@blocksuite/blocks": "0.4.1",
@ -25,13 +19,14 @@
"@tauri-apps/api": "^1.2.0",
"debug": "^4.3.4",
"encoding": "^0.1.13",
"firebase": "^9.15.0",
"firebase": "^9.17.1",
"idb-keyval": "^6.2.0",
"js-base64": "^3.7.5",
"ky": "^0.33.0",
"ky": "^0.33.2",
"ky-universal": "^0.11.0",
"lib0": "^0.2.58",
"swr": "^2.0.0",
"y-protocols": "^1.0.5"
"lib0": "^0.2.62",
"lit": "^2.6.1",
"y-protocols": "^1.0.5",
"yjs": "^13.5.46"
}
}

View File

@ -26,12 +26,14 @@
"url": "git+https://github.com/toeverything/AFFiNE.git"
},
"dependencies": {
"i18next": "^21.9.1",
"prettier": "^2.7.1",
"react-i18next": "^11.18.4"
"react": "^18.2.0",
"i18next": "^22.4.10",
"react-i18next": "^12.1.5"
},
"devDependencies": {
"@types/node": "^18.14.0",
"@types/prettier": "^2.7.2",
"prettier": "^2.8.4",
"ts-node": "^10.9.1",
"typescript": "^4.9.5"
}

View File

@ -4,6 +4,13 @@ import { initReactI18next, Trans, useTranslation } from 'react-i18next';
import { LOCALES } from './resources';
import type en_US from './resources/en.json';
declare module 'i18next' {
// Refs: https://www.i18next.com/overview/typescript#argument-of-type-defaulttfuncreturn-is-not-assignable-to-parameter-of-type-xyz
interface CustomTypeOptions {
returnNull: false;
}
}
// const localStorage = {
// getItem() {
// return undefined;

View File

@ -13,12 +13,12 @@
"url": "git+https://github.com/toeverything/AFFiNE.git"
},
"dependencies": {
"next": "^12.3.1",
"next": "^13.1.6",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@types/react": "^18.0.21",
"@types/react": "^18.0.28",
"typescript": "^4.9.5"
}
}

View File

@ -9,11 +9,15 @@
"@blocksuite/global": "0.4.1",
"@blocksuite/react": "0.4.1",
"@blocksuite/store": "0.4.1",
"lit": "^2.6.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"swr": "^2.0.3",
"yjs": "^13.5.46",
"zustand": "^4.3.3"
},
"devDependencies": {
"@types/react": "^18.0.28"
"@types/react": "^18.0.28",
"@types/react-dom": "^18.0.11"
}
}

File diff suppressed because it is too large Load Diff