From c56f11fb8f8abc709cb0269d2ccc12470ae67e48 Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Wed, 14 Feb 2024 18:45:51 +0530 Subject: [PATCH 01/31] Scaffold utils project --- packages/utils/.prettierrc.json | 3 +++ packages/utils/README.md | 3 +++ packages/utils/package.json | 4 ++++ 3 files changed, 10 insertions(+) create mode 100644 packages/utils/.prettierrc.json create mode 100644 packages/utils/README.md create mode 100644 packages/utils/package.json diff --git a/packages/utils/.prettierrc.json b/packages/utils/.prettierrc.json new file mode 100644 index 000000000..0a02bcefd --- /dev/null +++ b/packages/utils/.prettierrc.json @@ -0,0 +1,3 @@ +{ + "tabWidth": 4 +} diff --git a/packages/utils/README.md b/packages/utils/README.md new file mode 100644 index 000000000..717fe6776 --- /dev/null +++ b/packages/utils/README.md @@ -0,0 +1,3 @@ +### @ente-io/utils + +Utility functions, types and assortments. diff --git a/packages/utils/package.json b/packages/utils/package.json new file mode 100644 index 000000000..aed74b61c --- /dev/null +++ b/packages/utils/package.json @@ -0,0 +1,4 @@ +{ + "name": "@ente-io/utils", + "private": true +} From 9723f818e0324a33697b93ea2c42c71074da8c24 Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Thu, 15 Feb 2024 09:17:25 +0530 Subject: [PATCH 02/31] Add tsconfig --- packages/utils/tsconfig.json | 78 ++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 packages/utils/tsconfig.json diff --git a/packages/utils/tsconfig.json b/packages/utils/tsconfig.json new file mode 100644 index 000000000..fccc23454 --- /dev/null +++ b/packages/utils/tsconfig.json @@ -0,0 +1,78 @@ +{ + /* Docs: https://aka.ms/tsconfig.json */ + "compilerOptions": { + /* We use TypeScript as a type checker, not as a build tool */ + "noEmit": true, + + /* + * Tell TypeScript which all things it can assume that our target + * runtime will have. + * + * In our case, we tell it that the code will run in a modern browser, + * and will have access to a latest JS (esnext) and the DOM (dom). Our + * transpiler (Babel via Next.js) will take care that these things hold. + * + * Unlike the other individual library components (say how "esnext" + * implies "esnext.*"), "dom.iterable" (the ability to iterate over DOM + * elements) is not a subset of "dom" and needs to be listed out + * explicitly. + * + * Note that we don't need to specify target, since TypeScript isn't + * actually generating (emitting) the JavaScript. + */ + "lib": ["esnext", "dom", "dom.iterable"], + + /* + * The module system to assume the generated JavaScript will use. + * + * Since we're using a bundler, we should set this to esnext + * https://www.typescriptlang.org/docs/handbook/modules/guides/choosing-compiler-options.html + */ + "module": "esnext", + /* + * Tell TypeScript how to lookup the file for a given import + * + * From the TypeScript docs: + * + * > 'bundler' is for use with bundlers. Like node16 and nodenext, this + * mode supports package.json `imports` and `exports`, but unlinke the + * Node.js resolution modes, bundler never requires file extensions on + * relative paths in imports. + * + * > bundler does not support resolution of `require` calls. + */ + "moduleResolution": "bundler", + + /* Allow use of `.tsx` files */ + "jsx": "preserve", + + /* Ask TypeScript to warn us if we use TypeScript features that cannot + be used by single-file transpilers (Babel in our case) */ + "isolatedModules": true, + /* Enable various workarounds to play better with CJS libraries */ + "esModuleInterop": true, + + /* Speed things up by not type checking `node_modules` */ + "skipLibCheck": true, + /* Ensure filename in import has the same casing as the file on disk */ + "forceConsistentCasingInFileNames": true, + /* Require the `type` modifier when importing types */ + "verbatimModuleSyntax": true, + /* Enable importing .json files */ + "resolveJsonModule": true, + + "strict": true, + /* Stricter than strict */ + "noImplicitReturns": true, + "noUnusedParameters": true, + "noUnusedLocals": true, + "noFallthroughCasesInSwitch": true, + /* e.g. makes array indexing returns undefined */ + "noUncheckedIndexedAccess": true, + "exactOptionalPropertyTypes": true + }, + /* + * Typecheck all files (here or in subfolders) with the given extensions + */ + "include": ["**/*.ts", "**/*.tsx"] +} From 3aa0f4d0b81276b73bb8f08bd9e0ce293c8e78a7 Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Thu, 15 Feb 2024 10:08:22 +0530 Subject: [PATCH 03/31] Make it work with yarn workspace --- apps/photos/package.json | 1 + apps/photos/src/pages/_app.tsx | 2 ++ apps/photos/tsconfig.json | 2 +- packages/utils/hello.ts | 2 ++ packages/utils/package.json | 2 +- 5 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 packages/utils/hello.ts diff --git a/apps/photos/package.json b/apps/photos/package.json index 71bad1f3d..0857a0a23 100644 --- a/apps/photos/package.json +++ b/apps/photos/package.json @@ -29,6 +29,7 @@ "comlink": "^4.3.0", "debounce": "^2.0.0", "density-clustering": "^1.3.0", + "@ente-io/utils": "0.0.0", "eventemitter3": "^4.0.7", "exifr": "^7.1.3", "fast-srp-hap": "^2.0.4", diff --git a/apps/photos/src/pages/_app.tsx b/apps/photos/src/pages/_app.tsx index 7c9b09b95..fd955f7c1 100644 --- a/apps/photos/src/pages/_app.tsx +++ b/apps/photos/src/pages/_app.tsx @@ -79,6 +79,7 @@ import { PHOTOS_PAGES as PAGES } from '@ente/shared/constants/pages'; import { getTheme } from '@ente/shared/themes'; import { AppUpdateInfo } from '@ente/shared/electron/types'; import DownloadManager from 'services/download'; +import { sayHello } from '@ente-io/utils/hello'; const redirectMap = new Map([ [REDIRECTS.ROADMAP, getRoadmapRedirectURL], @@ -170,6 +171,7 @@ export default function App(props: EnteAppProps) { // setup logging clearLogsIfLocalStorageLimitExceeded(); logStartupMessage(); + sayHello(); }, []); useEffect(() => { diff --git a/apps/photos/tsconfig.json b/apps/photos/tsconfig.json index d9092609d..e325ef405 100644 --- a/apps/photos/tsconfig.json +++ b/apps/photos/tsconfig.json @@ -11,7 +11,7 @@ "noUnusedParameters": false, "strictNullChecks": false, "target": "es5", - "useUnknownInCatchVariables": false + "useUnknownInCatchVariables": false, }, "include": [ "next-env.d.ts", diff --git a/packages/utils/hello.ts b/packages/utils/hello.ts new file mode 100644 index 000000000..803501816 --- /dev/null +++ b/packages/utils/hello.ts @@ -0,0 +1,2 @@ +/** Howdy! */ +export const sayHello = () => console.log("Hello, world"); diff --git a/packages/utils/package.json b/packages/utils/package.json index aed74b61c..a2c859382 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -1,4 +1,4 @@ { "name": "@ente-io/utils", - "private": true + "version": "0.0.0" } From c87aca72ad5521f35fc3bcd2dd01aff1b91daab3 Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Thu, 15 Feb 2024 11:18:33 +0530 Subject: [PATCH 04/31] Use yarn add @ente-io/utils@'file:packages/utils' The version field is still required, but we can additionally add a private for both semantic signalling and preventing this from being published to npm. --- apps/photos/package.json | 2 +- packages/utils/package.json | 3 ++- yarn.lock | 3 +++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/photos/package.json b/apps/photos/package.json index 0857a0a23..3ef494dfa 100644 --- a/apps/photos/package.json +++ b/apps/photos/package.json @@ -11,6 +11,7 @@ }, "dependencies": { "@date-io/date-fns": "^2.14.0", + "@ente-io/utils": "file:packages/utils", "@mui/x-date-pickers": "^5.0.0-alpha.6", "@sentry/nextjs": "^7.77.0", "@stripe/stripe-js": "^1.13.2", @@ -29,7 +30,6 @@ "comlink": "^4.3.0", "debounce": "^2.0.0", "density-clustering": "^1.3.0", - "@ente-io/utils": "0.0.0", "eventemitter3": "^4.0.7", "exifr": "^7.1.3", "fast-srp-hap": "^2.0.4", diff --git a/packages/utils/package.json b/packages/utils/package.json index a2c859382..69dc1c106 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -1,4 +1,5 @@ { "name": "@ente-io/utils", - "version": "0.0.0" + "version": "0.0.0", + "private": true } diff --git a/yarn.lock b/yarn.lock index 08f2bb358..1080b406b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -206,6 +206,9 @@ resolved "https://registry.npmjs.org/@emotion/weak-memoize/-/weak-memoize-0.3.0.tgz" integrity sha512-AHPmaAx+RYfZz0eYu6Gviiagpmiyw98ySSlQvCUhVGDRtDFe4DBS0x1bSjdF3gqUDYOczB+yYvBTtEylYSdRhg== +"@ente-io/utils@file:packages/utils": + version "0.0.0" + "@eslint-community/eslint-utils@^4.2.0": version "4.4.0" resolved "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz" From f3340db57e5635b9f4c24205cb9b132489515567 Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Thu, 15 Feb 2024 12:02:06 +0530 Subject: [PATCH 05/31] Make it work with src --- package.json | 3 ++- packages/utils/package.json | 5 ++++- packages/utils/{ => src}/hello.ts | 0 3 files changed, 6 insertions(+), 2 deletions(-) rename packages/utils/{ => src}/hello.ts (100%) diff --git a/package.json b/package.json index 2017dc82f..ccc3f8288 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,8 @@ "export:accounts": "turbo run export --filter=accounts", "lint": "turbo run lint", "albums": "turbo run albums", - "prepare": "husky install" + "prepare": "husky install", + "photos:dev": "TURBO_NO_UPDATE_NOTIFIER=true turbo run dev --filter=photos" }, "dependencies": { "@emotion/react": "11.10.6", diff --git a/packages/utils/package.json b/packages/utils/package.json index 69dc1c106..48b659873 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -1,5 +1,8 @@ { "name": "@ente-io/utils", "version": "0.0.0", - "private": true + "private": true, + "exports": { + "hello": "./src/hello" + } } diff --git a/packages/utils/hello.ts b/packages/utils/src/hello.ts similarity index 100% rename from packages/utils/hello.ts rename to packages/utils/src/hello.ts From 3fad0427a799e07100c5dd26b05a58987f44a50d Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Thu, 15 Feb 2024 12:05:56 +0530 Subject: [PATCH 06/31] Next.js does not use Babel (at least for single file) anymore > Compiling using Next.js compiler instead of Babel is enabled by default since v12 https://nextjs.org/docs/architecture/nextjs-compiler --- packages/utils/tsconfig.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/utils/tsconfig.json b/packages/utils/tsconfig.json index fccc23454..1054a65f3 100644 --- a/packages/utils/tsconfig.json +++ b/packages/utils/tsconfig.json @@ -10,15 +10,15 @@ * * In our case, we tell it that the code will run in a modern browser, * and will have access to a latest JS (esnext) and the DOM (dom). Our - * transpiler (Babel via Next.js) will take care that these things hold. + * transpiler (Next.js) will ensure that these things hold. * * Unlike the other individual library components (say how "esnext" * implies "esnext.*"), "dom.iterable" (the ability to iterate over DOM * elements) is not a subset of "dom" and needs to be listed out * explicitly. * - * Note that we don't need to specify target, since TypeScript isn't - * actually generating (emitting) the JavaScript. + * Note that we don't need to specify the `target` compilerOption, since + * TypeScript isn't actually generating (emitting) the JavaScript. */ "lib": ["esnext", "dom", "dom.iterable"], @@ -47,7 +47,7 @@ "jsx": "preserve", /* Ask TypeScript to warn us if we use TypeScript features that cannot - be used by single-file transpilers (Babel in our case) */ + be used by single-file transpilers */ "isolatedModules": true, /* Enable various workarounds to play better with CJS libraries */ "esModuleInterop": true, From 72639699534db942955111564fa8fac2bf42fb00 Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Thu, 15 Feb 2024 12:26:48 +0530 Subject: [PATCH 07/31] Make src work with next - The star in package.json matches any version https://docs.npmjs.com/cli/v10/configuring-npm/package-json - VSCode is still giving errors --- apps/photos/package.json | 2 +- packages/shared/next/next.config.base.js | 7 ++++++- packages/utils/package.json | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/apps/photos/package.json b/apps/photos/package.json index 3ef494dfa..9eacd2f71 100644 --- a/apps/photos/package.json +++ b/apps/photos/package.json @@ -11,7 +11,7 @@ }, "dependencies": { "@date-io/date-fns": "^2.14.0", - "@ente-io/utils": "file:packages/utils", + "@ente-io/utils": "*", "@mui/x-date-pickers": "^5.0.0-alpha.6", "@sentry/nextjs": "^7.77.0", "@stripe/stripe-js": "^1.13.2", diff --git a/packages/shared/next/next.config.base.js b/packages/shared/next/next.config.base.js index 4585ba454..6b99d17d5 100644 --- a/packages/shared/next/next.config.base.js +++ b/packages/shared/next/next.config.base.js @@ -35,7 +35,12 @@ const nextConfig = { }, }, }, - transpilePackages: ['@mui/material', '@mui/system', '@mui/icons-material'], + transpilePackages: [ + '@ente-io/utils', + '@mui/material', + '@mui/system', + '@mui/icons-material', + ], // Add environment variables to the JavaScript bundle. They will be // available as `process.env.VAR_NAME` to our code. diff --git a/packages/utils/package.json b/packages/utils/package.json index 48b659873..22cac4b8c 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -3,6 +3,6 @@ "version": "0.0.0", "private": true, "exports": { - "hello": "./src/hello" + "./hello": "./src/hello" } } From 41351e71d2f389dea63f6d6bbc2ffb3e7693c040 Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Thu, 15 Feb 2024 13:32:21 +0530 Subject: [PATCH 08/31] next start can already do this --- Development.md | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 Development.md diff --git a/Development.md b/Development.md deleted file mode 100644 index 96b804bc2..000000000 --- a/Development.md +++ /dev/null @@ -1,9 +0,0 @@ -## Notes for Developers - -### Local production builds - -```sh -yarn export:photos -cd apps/ -python3 -m http.server -``` From 632af065feb108462373efaa01b7229b5b1103eb Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Thu, 15 Feb 2024 20:18:33 +0530 Subject: [PATCH 09/31] Add a working WIP example --- apps/photos/package.json | 1 + apps/web/app/page.tsx | 12 ++++++++ apps/web/next-env.d.ts | 5 ++++ apps/web/next.config.js | 4 +++ apps/web/package.json | 22 +++++++++++++++ apps/web/tsconfig.json | 35 ++++++++++++++++++++++++ package.json | 1 + packages/shared/next/next.config.base.js | 1 + packages/ui/package.json | 15 ++++++++++ packages/ui/src/card.tsx | 14 ++++++++++ packages/ui/src/hello.ts | 2 ++ packages/ui/tsconfig.json | 23 ++++++++++++++++ 12 files changed, 135 insertions(+) create mode 100644 apps/web/app/page.tsx create mode 100644 apps/web/next-env.d.ts create mode 100644 apps/web/next.config.js create mode 100644 apps/web/package.json create mode 100644 apps/web/tsconfig.json create mode 100644 packages/ui/package.json create mode 100644 packages/ui/src/card.tsx create mode 100644 packages/ui/src/hello.ts create mode 100644 packages/ui/tsconfig.json diff --git a/apps/photos/package.json b/apps/photos/package.json index 9eacd2f71..9c0e7a3d1 100644 --- a/apps/photos/package.json +++ b/apps/photos/package.json @@ -11,6 +11,7 @@ }, "dependencies": { "@date-io/date-fns": "^2.14.0", + "@repo/ui": "*", "@ente-io/utils": "*", "@mui/x-date-pickers": "^5.0.0-alpha.6", "@sentry/nextjs": "^7.77.0", diff --git a/apps/web/app/page.tsx b/apps/web/app/page.tsx new file mode 100644 index 000000000..32059f30e --- /dev/null +++ b/apps/web/app/page.tsx @@ -0,0 +1,12 @@ +import { Card } from "@repo/ui/card"; +import { sayHello } from "@repo/ui/hello"; + +export default function Page(): JSX.Element { + sayHello(); + + return ( +
+ Card +
+ ); +} diff --git a/apps/web/next-env.d.ts b/apps/web/next-env.d.ts new file mode 100644 index 000000000..4f11a03dc --- /dev/null +++ b/apps/web/next-env.d.ts @@ -0,0 +1,5 @@ +/// +/// + +// NOTE: This file should not be edited +// see https://nextjs.org/docs/basic-features/typescript for more information. diff --git a/apps/web/next.config.js b/apps/web/next.config.js new file mode 100644 index 000000000..a5b0aec2b --- /dev/null +++ b/apps/web/next.config.js @@ -0,0 +1,4 @@ +/** @type {import('next').NextConfig} */ +module.exports = { + transpilePackages: ["@repo/ui"], +}; diff --git a/apps/web/package.json b/apps/web/package.json new file mode 100644 index 000000000..c9582f0c3 --- /dev/null +++ b/apps/web/package.json @@ -0,0 +1,22 @@ +{ + "name": "web", + "version": "1.0.0", + "private": true, + "scripts": { + "dev": "next dev", + "build": "next build", + "start": "next start" + }, + "dependencies": { + "@repo/ui": "*", + "next": "^14.0.4", + "react": "^18.2.0", + "react-dom": "^18.2.0" + }, + "devDependencies": { + "@types/node": "^20.10.6", + "@types/react": "^18.2.46", + "@types/react-dom": "^18.2.18", + "typescript": "^5.3.3" + } +} diff --git a/apps/web/tsconfig.json b/apps/web/tsconfig.json new file mode 100644 index 000000000..06ced022a --- /dev/null +++ b/apps/web/tsconfig.json @@ -0,0 +1,35 @@ +{ + "$schema": "https://json.schemastore.org/tsconfig", + "display": "Next.js", + "compilerOptions": { + "declaration": true, + "declarationMap": true, + "esModuleInterop": true, + "incremental": false, + "isolatedModules": true, + "lib": ["es2022", "DOM", "DOM.Iterable"], + // "module": "NodeNext", + "moduleDetection": "force", + // "moduleResolution": "NodeNext", + "noUncheckedIndexedAccess": true, + "resolveJsonModule": true, + "skipLibCheck": true, + "strict": true, + "target": "ES2022", + + "plugins": [{ "name": "next" }], + "module": "ESNext", + "moduleResolution": "Bundler", + "allowJs": true, + "jsx": "preserve", + "noEmit": true + }, + "include": [ + "next-env.d.ts", + "next.config.js", + "**/*.ts", + "**/*.tsx", + ".next/types/**/*.ts" + ], + "exclude": ["node_modules"] +} diff --git a/package.json b/package.json index ccc3f8288..39e22092a 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "dev:auth": "turbo run dev --filter=auth", "dev:photos": "turbo run dev --filter=photos", "dev:accounts": "turbo run dev --filter=accounts", + "dev:web": "turbo run dev --filter=web", "dev:cast": "turbo run dev --filter=cast", "export:photos": "turbo run export --filter=photos", "export:auth": "turbo run export --filter=auth", diff --git a/packages/shared/next/next.config.base.js b/packages/shared/next/next.config.base.js index 6b99d17d5..d80c920be 100644 --- a/packages/shared/next/next.config.base.js +++ b/packages/shared/next/next.config.base.js @@ -36,6 +36,7 @@ const nextConfig = { }, }, transpilePackages: [ + "@repo/ui", '@ente-io/utils', '@mui/material', '@mui/system', diff --git a/packages/ui/package.json b/packages/ui/package.json new file mode 100644 index 000000000..423bf6c24 --- /dev/null +++ b/packages/ui/package.json @@ -0,0 +1,15 @@ +{ + "name": "@repo/ui", + "version": "0.0.0", + "private": true, + "exports": { + "./hello": "./src/hello.ts", + "./card": "./src/card.tsx" + }, + "devDependencies": { + "@types/react": "^18.2.46", + "@types/react-dom": "^18.2.18", + "react": "^18.2.0", + "typescript": "^5.3.3" + } +} diff --git a/packages/ui/src/card.tsx b/packages/ui/src/card.tsx new file mode 100644 index 000000000..d9760148d --- /dev/null +++ b/packages/ui/src/card.tsx @@ -0,0 +1,14 @@ +/** Test comment */ +export function Card({ + href, + children, +}: { + href: string; + children: React.ReactNode; +}): JSX.Element { + return ( + +

{children}

+
+ ); +} diff --git a/packages/ui/src/hello.ts b/packages/ui/src/hello.ts new file mode 100644 index 000000000..803501816 --- /dev/null +++ b/packages/ui/src/hello.ts @@ -0,0 +1,2 @@ +/** Howdy! */ +export const sayHello = () => console.log("Hello, world"); diff --git a/packages/ui/tsconfig.json b/packages/ui/tsconfig.json new file mode 100644 index 000000000..cabd12f4a --- /dev/null +++ b/packages/ui/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "declaration": true, + "declarationMap": true, + "esModuleInterop": true, + "incremental": false, + "isolatedModules": true, + "lib": ["es2022", "DOM", "DOM.Iterable"], + "module": "NodeNext", + "moduleDetection": "force", + "moduleResolution": "NodeNext", + "noUncheckedIndexedAccess": true, + "resolveJsonModule": true, + "skipLibCheck": true, + "strict": true, + "target": "ES2022", + "jsx": "preserve", + + "outDir": "dist" + }, + "include": ["src"], + "exclude": ["node_modules", "dist"] +} From a2fa7d371659d43c940093ce39a164aa4f24248f Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Thu, 15 Feb 2024 20:31:39 +0530 Subject: [PATCH 10/31] Find the bit that was causing trouble in VSCode --- apps/photos/src/pages/_app.tsx | 3 ++- apps/photos/tsconfig.json | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/photos/src/pages/_app.tsx b/apps/photos/src/pages/_app.tsx index fd955f7c1..0805dbcf2 100644 --- a/apps/photos/src/pages/_app.tsx +++ b/apps/photos/src/pages/_app.tsx @@ -79,7 +79,8 @@ import { PHOTOS_PAGES as PAGES } from '@ente/shared/constants/pages'; import { getTheme } from '@ente/shared/themes'; import { AppUpdateInfo } from '@ente/shared/electron/types'; import DownloadManager from 'services/download'; -import { sayHello } from '@ente-io/utils/hello'; +// import { sayHello } from '@ente-io/utils/hello'; +import { sayHello } from '@repo/ui/hello'; const redirectMap = new Map([ [REDIRECTS.ROADMAP, getRoadmapRedirectURL], diff --git a/apps/photos/tsconfig.json b/apps/photos/tsconfig.json index e325ef405..e7105c071 100644 --- a/apps/photos/tsconfig.json +++ b/apps/photos/tsconfig.json @@ -12,6 +12,9 @@ "strictNullChecks": false, "target": "es5", "useUnknownInCatchVariables": false, + + /* TODO(MR): Add to auth */ + "moduleResolution": "bundler" }, "include": [ "next-env.d.ts", From 3289d137bfc303f7a418e26b85131fb0fe831049 Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Thu, 15 Feb 2024 20:38:51 +0530 Subject: [PATCH 11/31] forceConsistentCasingInFileNames is true by default with TS 5 --- packages/utils/tsconfig.json | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/utils/tsconfig.json b/packages/utils/tsconfig.json index 1054a65f3..c65746616 100644 --- a/packages/utils/tsconfig.json +++ b/packages/utils/tsconfig.json @@ -54,8 +54,6 @@ /* Speed things up by not type checking `node_modules` */ "skipLibCheck": true, - /* Ensure filename in import has the same casing as the file on disk */ - "forceConsistentCasingInFileNames": true, /* Require the `type` modifier when importing types */ "verbatimModuleSyntax": true, /* Enable importing .json files */ From 386c31310c5a494a9e7cbb75924eb86c56da4489 Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Thu, 15 Feb 2024 20:53:53 +0530 Subject: [PATCH 12/31] Remove unused project I used to isolate the issue --- apps/web/app/page.tsx | 12 ------------ apps/web/next-env.d.ts | 5 ----- apps/web/next.config.js | 4 ---- apps/web/package.json | 22 ---------------------- apps/web/tsconfig.json | 35 ----------------------------------- 5 files changed, 78 deletions(-) delete mode 100644 apps/web/app/page.tsx delete mode 100644 apps/web/next-env.d.ts delete mode 100644 apps/web/next.config.js delete mode 100644 apps/web/package.json delete mode 100644 apps/web/tsconfig.json diff --git a/apps/web/app/page.tsx b/apps/web/app/page.tsx deleted file mode 100644 index 32059f30e..000000000 --- a/apps/web/app/page.tsx +++ /dev/null @@ -1,12 +0,0 @@ -import { Card } from "@repo/ui/card"; -import { sayHello } from "@repo/ui/hello"; - -export default function Page(): JSX.Element { - sayHello(); - - return ( -
- Card -
- ); -} diff --git a/apps/web/next-env.d.ts b/apps/web/next-env.d.ts deleted file mode 100644 index 4f11a03dc..000000000 --- a/apps/web/next-env.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -/// -/// - -// NOTE: This file should not be edited -// see https://nextjs.org/docs/basic-features/typescript for more information. diff --git a/apps/web/next.config.js b/apps/web/next.config.js deleted file mode 100644 index a5b0aec2b..000000000 --- a/apps/web/next.config.js +++ /dev/null @@ -1,4 +0,0 @@ -/** @type {import('next').NextConfig} */ -module.exports = { - transpilePackages: ["@repo/ui"], -}; diff --git a/apps/web/package.json b/apps/web/package.json deleted file mode 100644 index c9582f0c3..000000000 --- a/apps/web/package.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "web", - "version": "1.0.0", - "private": true, - "scripts": { - "dev": "next dev", - "build": "next build", - "start": "next start" - }, - "dependencies": { - "@repo/ui": "*", - "next": "^14.0.4", - "react": "^18.2.0", - "react-dom": "^18.2.0" - }, - "devDependencies": { - "@types/node": "^20.10.6", - "@types/react": "^18.2.46", - "@types/react-dom": "^18.2.18", - "typescript": "^5.3.3" - } -} diff --git a/apps/web/tsconfig.json b/apps/web/tsconfig.json deleted file mode 100644 index 06ced022a..000000000 --- a/apps/web/tsconfig.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "$schema": "https://json.schemastore.org/tsconfig", - "display": "Next.js", - "compilerOptions": { - "declaration": true, - "declarationMap": true, - "esModuleInterop": true, - "incremental": false, - "isolatedModules": true, - "lib": ["es2022", "DOM", "DOM.Iterable"], - // "module": "NodeNext", - "moduleDetection": "force", - // "moduleResolution": "NodeNext", - "noUncheckedIndexedAccess": true, - "resolveJsonModule": true, - "skipLibCheck": true, - "strict": true, - "target": "ES2022", - - "plugins": [{ "name": "next" }], - "module": "ESNext", - "moduleResolution": "Bundler", - "allowJs": true, - "jsx": "preserve", - "noEmit": true - }, - "include": [ - "next-env.d.ts", - "next.config.js", - "**/*.ts", - "**/*.tsx", - ".next/types/**/*.ts" - ], - "exclude": ["node_modules"] -} From 2e926ed60f896e6536cd7b3212def3d2e263a4a2 Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Thu, 15 Feb 2024 20:54:57 +0530 Subject: [PATCH 13/31] Upgrade next (remaining in 13 series) to fix moduleResolution issue This is to prevent Next from forcefully overwriting the "moduleResolution" in tsconfig.json to "node". If it is "node", then VS code cannot find the imports we do from @repo/ui. This was a bug in Next which was fixed in this PR: https://github.com/vercel/next.js/pull/51957 To upgrade, I used: yarn upgrade next@^13.5 The latest Next.js is 14, but I left it at the last release in the 13 series. Will deal with the upgrade to 14 later in a different PR. --- package.json | 2 +- yarn.lock | 220 ++++++++++++++++++++++++++++----------------------- 2 files changed, 124 insertions(+), 98 deletions(-) diff --git a/package.json b/package.json index 39e22092a..19f4f9914 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "@mui/material": "5.11.16", "axios": "^1.6.0", "is-electron": "^2.2.2", - "next": "13.1.3", + "next": "^13.5", "react": "18.2.0", "react-dom": "18.2.0" }, diff --git a/yarn.lock b/yarn.lock index 1080b406b..5672f57b8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -206,9 +206,6 @@ resolved "https://registry.npmjs.org/@emotion/weak-memoize/-/weak-memoize-0.3.0.tgz" integrity sha512-AHPmaAx+RYfZz0eYu6Gviiagpmiyw98ySSlQvCUhVGDRtDFe4DBS0x1bSjdF3gqUDYOczB+yYvBTtEylYSdRhg== -"@ente-io/utils@file:packages/utils": - version "0.0.0" - "@eslint-community/eslint-utils@^4.2.0": version "4.4.0" resolved "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz" @@ -381,10 +378,10 @@ dependencies: webpack-bundle-analyzer "4.7.0" -"@next/env@13.1.3": - version "13.1.3" - resolved "https://registry.npmjs.org/@next/env/-/env-13.1.3.tgz" - integrity sha512-ye0yvGmlzQQJnzNC7tC/ZhgRMd0s54msgrDOft1SjEG1Fbb+RBxGsalPqG3tUGuchA25z3npAtkFoAP8d2wPnw== +"@next/env@13.5.6": + version "13.5.6" + resolved "https://registry.yarnpkg.com/@next/env/-/env-13.5.6.tgz#c1148e2e1aa166614f05161ee8f77ded467062bc" + integrity sha512-Yac/bV5sBGkkEXmAX5FWPS9Mmo2rthrOPRQQNfycJPkjUAUclomCPH7QFVCDQ4Mp2k2K1SSM6m0zrxYrOwtFQw== "@next/eslint-plugin-next@13.4.7": version "13.4.7" @@ -393,70 +390,50 @@ dependencies: glob "7.1.7" -"@next/swc-android-arm-eabi@13.1.3": - version "13.1.3" - resolved "https://registry.yarnpkg.com/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-13.1.3.tgz#f038b4e76af750b56b884997e902a6096ee367f3" - integrity sha512-kXL0z7uVUHdUkXY997oZcoz4PXWXRJq3R9x2UYz0uW8OHsZinxTW/BgyzH8nfTB/4/a0nox4fgzQRurjem3nGQ== +"@next/swc-darwin-arm64@13.5.6": + version "13.5.6" + resolved "https://registry.yarnpkg.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.5.6.tgz#b15d139d8971360fca29be3bdd703c108c9a45fb" + integrity sha512-5nvXMzKtZfvcu4BhtV0KH1oGv4XEW+B+jOfmBdpFI3C7FrB/MfujRpWYSBBO64+qbW8pkZiSyQv9eiwnn5VIQA== -"@next/swc-android-arm64@13.1.3": - version "13.1.3" - resolved "https://registry.yarnpkg.com/@next/swc-android-arm64/-/swc-android-arm64-13.1.3.tgz#e5622575187aaecea3dd34e27b6089f3a4a004d8" - integrity sha512-ZHYC5Ze+syk9mex/T5XILHox5xjJotQ5GmPqHrJpXh9AOuIZnfhNP/zeLYaOXWaJmrE55Ni56VxHgckJfpGeBw== +"@next/swc-darwin-x64@13.5.6": + version "13.5.6" + resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-13.5.6.tgz#9c72ee31cc356cb65ce6860b658d807ff39f1578" + integrity sha512-6cgBfxg98oOCSr4BckWjLLgiVwlL3vlLj8hXg2b+nDgm4bC/qVXXLfpLB9FHdoDu4057hzywbxKvmYGmi7yUzA== -"@next/swc-darwin-arm64@13.1.3": - version "13.1.3" - resolved "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.1.3.tgz" - integrity sha512-B8Gyx/XhoxiiD4kHjnNVPCdgvLvIeQQGE2Nq6P7gsG0t17mMcPS4Y8fh/kVJSZAu5B5bAACwYIsI5bKMFzM+Ug== +"@next/swc-linux-arm64-gnu@13.5.6": + version "13.5.6" + resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.5.6.tgz#59f5f66155e85380ffa26ee3d95b687a770cfeab" + integrity sha512-txagBbj1e1w47YQjcKgSU4rRVQ7uF29YpnlHV5xuVUsgCUf2FmyfJ3CPjZUvpIeXCJAoMCFAoGnbtX86BK7+sg== -"@next/swc-darwin-x64@13.1.3": - version "13.1.3" - resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-13.1.3.tgz#a060253ec0dfab008c296eec6654b63de2e9d4f2" - integrity sha512-SCXf0JA3tR9FcsFA53a3LWDaxoIWFoLSbN3m88cYQYQMluObxwo6SBeUD9E3F4pM0bXEeIGOh8Y6u8w0GmmGoQ== +"@next/swc-linux-arm64-musl@13.5.6": + version "13.5.6" + resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.5.6.tgz#f012518228017052736a87d69bae73e587c76ce2" + integrity sha512-cGd+H8amifT86ZldVJtAKDxUqeFyLWW+v2NlBULnLAdWsiuuN8TuhVBt8ZNpCqcAuoruoSWynvMWixTFcroq+Q== -"@next/swc-freebsd-x64@13.1.3": - version "13.1.3" - resolved "https://registry.yarnpkg.com/@next/swc-freebsd-x64/-/swc-freebsd-x64-13.1.3.tgz#f93f351202ed18aca3a7ea8c5e241f3a4601110e" - integrity sha512-bUf1HYF3znES0Kd75fRnVp7LXlwF3MiuTk/qh32t1VH8CHSGsJmPPtHw4ag5GgwCbIn3AwWJQgqS+jyVYj40CA== +"@next/swc-linux-x64-gnu@13.5.6": + version "13.5.6" + resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.5.6.tgz#339b867a7e9e7ee727a700b496b269033d820df4" + integrity sha512-Mc2b4xiIWKXIhBy2NBTwOxGD3nHLmq4keFk+d4/WL5fMsB8XdJRdtUlL87SqVCTSaf1BRuQQf1HvXZcy+rq3Nw== -"@next/swc-linux-arm-gnueabihf@13.1.3": - version "13.1.3" - resolved "https://registry.yarnpkg.com/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-13.1.3.tgz#a8939e0d825c4063c8141879935c2f3210959d77" - integrity sha512-ibl6YbAoOVH5whhHcC3s4auSKLIzWyhRdv9M8373m8xaTWkAGtFNgbJysaTBm4M9RlePPX0G81oul9wmpkP48w== +"@next/swc-linux-x64-musl@13.5.6": + version "13.5.6" + resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.5.6.tgz#ae0ae84d058df758675830bcf70ca1846f1028f2" + integrity sha512-CFHvP9Qz98NruJiUnCe61O6GveKKHpJLloXbDSWRhqhkJdZD2zU5hG+gtVJR//tyW897izuHpM6Gtf6+sNgJPQ== -"@next/swc-linux-arm64-gnu@13.1.3": - version "13.1.3" - resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.1.3.tgz#97725ec5723d8d012116124ec9c3f1f60d7e0eed" - integrity sha512-ChsZxyNgAu1JHLQWZq4L6lJ4VQ4Rj30qA8VCGkr1AFiqwWabri9dc5y32zJSmqa6Ex6NVDyYCNBKUGlcUOmDtw== +"@next/swc-win32-arm64-msvc@13.5.6": + version "13.5.6" + resolved "https://registry.yarnpkg.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.5.6.tgz#a5cc0c16920485a929a17495064671374fdbc661" + integrity sha512-aFv1ejfkbS7PUa1qVPwzDHjQWQtknzAZWGTKYIAaS4NMtBlk3VyA6AYn593pqNanlicewqyl2jUhQAaFV/qXsg== -"@next/swc-linux-arm64-musl@13.1.3": - version "13.1.3" - resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.1.3.tgz#110f328eba0a04a6786726ec71357234e462962e" - integrity sha512-WoYE9I/1iEW9wldxFxhu+OZmU4IbwQQl/w5nFrgbSIyGz3g3JeaQxJOdyMggX3WOjWF9khdJ4r4ANa0TsF28DA== +"@next/swc-win32-ia32-msvc@13.5.6": + version "13.5.6" + resolved "https://registry.yarnpkg.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.5.6.tgz#6a2409b84a2cbf34bf92fe714896455efb4191e4" + integrity sha512-XqqpHgEIlBHvzwG8sp/JXMFkLAfGLqkbVsyN+/Ih1mR8INb6YCc2x/Mbwi6hsAgUnqQztz8cvEbHJUbSl7RHDg== -"@next/swc-linux-x64-gnu@13.1.3": - version "13.1.3" - resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.1.3.tgz#6c4704433929a981b2a97a490159e6d9d507db10" - integrity sha512-fz5j+p1MsD0Kb+vMUkHzKxzFDteqzAqtdC41NyRvyKYhAffyDsfjGB542nmtt+EdxtlpDWfH204gN6nNXDDI7w== - -"@next/swc-linux-x64-musl@13.1.3": - version "13.1.3" - resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.1.3.tgz#dd3735f672dbaa3153fb590b1320cf1e621ca853" - integrity sha512-kw98zZnIAGyElE8GqsY5oH/n/vLYWqhEHlhHlY9ZzPIhsKwybWqLTq6ZPA60fEgRm9+UoU6u7lGD9pjZhTBRvA== - -"@next/swc-win32-arm64-msvc@13.1.3": - version "13.1.3" - resolved "https://registry.yarnpkg.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.1.3.tgz#b888dd4449310b8ec8f6470afef556de99d4d0fd" - integrity sha512-bfulLL1SkaECHnv1Oz1nLdwpMu/B/TQEzA3+XoJYoiZaKHuTrufDIr+fTUasK5l7KQmB1y8LXSMKEKVeZomeGg== - -"@next/swc-win32-ia32-msvc@13.1.3": - version "13.1.3" - resolved "https://registry.yarnpkg.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.1.3.tgz#a24772611f02b026f4be71edffcf63740510bffa" - integrity sha512-5UwjzQWgUdKAinZgLSYB8BG5jtTUuUGBh//7EwDXf+nqfTEZ7VOaDuHWeO6MQLkuSgQOIpwL5uMJQFJY1rX69A== - -"@next/swc-win32-x64-msvc@13.1.3": - version "13.1.3" - resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.1.3.tgz#f6cb40f36a9a917e9bc5025e3ad747309180ff6a" - integrity sha512-P9fSi+/FZKGQXV4kCJg2td2jkIvDryDFZr/mn+0xfWiC/rcSov9CHK0W3qh+ZXyItLEe6dOtAdGxlTYOijHthw== +"@next/swc-win32-x64-msvc@13.5.6": + version "13.5.6" + resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.5.6.tgz#4a3e2a206251abc729339ba85f60bc0433c2865d" + integrity sha512-Cqfe1YmOS7k+5mGu92nl5ULkzpKuxJrP3+4AEuPmrpFZ3BHxTY3TnHmU1On3bFmFFs6FbTcdF58CCUProGpIGQ== "@nodelib/fs.scandir@2.1.5": version "2.1.5" @@ -673,10 +650,10 @@ resolved "https://registry.npmjs.org/@stripe/stripe-js/-/stripe-js-1.17.1.tgz" integrity sha512-c9MyDvdi5Xou0j0JPNy86NebtTDfh9o62Ifuzx6GSm2YO0oedBpy51WSyOue2L8Fb+mqESS5gd6mGVEIPUnXsA== -"@swc/helpers@0.4.14": - version "0.4.14" - resolved "https://registry.npmjs.org/@swc/helpers/-/helpers-0.4.14.tgz" - integrity sha512-4C7nX/dvpzB7za4Ql9K81xK3HPxCpHMgwTZVyf+9JQ6VUbn9jjZVN7/Nkdz/Ugzs2CSjqnL/UPXroiVBVHUWUw== +"@swc/helpers@0.5.2": + version "0.5.2" + resolved "https://registry.yarnpkg.com/@swc/helpers/-/helpers-0.5.2.tgz#85ea0c76450b61ad7d10a37050289eded783c27d" + integrity sha512-E4KcWTpoLHqwPHLxidpOqQbcrZVgi0rsmmZXUle1jXmJfuIf/UWpczUJ7MZZ5tlxytgJXyp0w4PGkkeLiuIdZw== dependencies: tslib "^2.4.0" @@ -860,6 +837,13 @@ dependencies: "@types/react" "*" +"@types/react-dom@^18.2.18": + version "18.2.19" + resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-18.2.19.tgz#b84b7c30c635a6c26c6a6dfbb599b2da9788be58" + integrity sha512-aZvQL6uUbIJpjZk4U8JZGbau9KDeAwMfmhyWorxgBkqDIEf6ROjRozcmPIicqsUwPUjbkDfHKgGee1Lq65APcA== + dependencies: + "@types/react" "*" + "@types/react-is@^16.7.1 || ^17.0.0": version "17.0.3" resolved "https://registry.npmjs.org/@types/react-is/-/react-is-17.0.3.tgz" @@ -924,6 +908,15 @@ "@types/scheduler" "*" csstype "^3.0.2" +"@types/react@^18.2.46": + version "18.2.55" + resolved "https://registry.yarnpkg.com/@types/react/-/react-18.2.55.tgz#38141821b7084404b5013742bc4ae08e44da7a67" + integrity sha512-Y2Tz5P4yz23brwm2d7jNon39qoAtMMmalOQv6+fEFt1mT+FcM3D841wDpoUvFXhaYenuROCy3FZYqdTjM7qVyA== + dependencies: + "@types/prop-types" "*" + "@types/scheduler" "*" + csstype "^3.0.2" + "@types/scheduler@*": version "0.16.2" resolved "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz" @@ -1379,6 +1372,13 @@ buffer-from@~0.1.1: resolved "https://registry.npmjs.org/buffer-from/-/buffer-from-0.1.2.tgz" integrity sha512-RiWIenusJsmI2KcvqQABB83tLxCByE3upSP8QU3rJDMVFGPWLvPQJt/O1Su9moRWeH7d+Q2HYb68f6+v+tw2vg== +busboy@1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/busboy/-/busboy-1.6.0.tgz#966ea36a9502e43cdb9146962523b92f531f6893" + integrity sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA== + dependencies: + streamsearch "^1.1.0" + call-bind@^1.0.0, call-bind@^1.0.2: version "1.0.2" resolved "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz" @@ -2381,6 +2381,11 @@ glob-parent@^6.0.2: dependencies: is-glob "^4.0.3" +glob-to-regexp@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e" + integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== + glob@7.1.7, glob@^7.1.3: version "7.1.7" resolved "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz" @@ -2458,6 +2463,11 @@ gopd@^1.0.1: dependencies: get-intrinsic "^1.1.3" +graceful-fs@^4.1.2: + version "4.2.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" + integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== + graceful-fs@^4.2.4: version "4.2.10" resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz" @@ -3312,10 +3322,10 @@ multipipe@^1.0.2: duplexer2 "^0.1.2" object-assign "^4.1.0" -nanoid@^3.3.4: - version "3.3.4" - resolved "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz" - integrity sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw== +nanoid@^3.3.6: + version "3.3.7" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.7.tgz#d0c301a691bc8d54efa0a2226ccf3fe2fd656bd8" + integrity sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g== natural-compare-lite@^1.4.0: version "1.4.0" @@ -3334,30 +3344,28 @@ next-transpile-modules@^10.0.0: dependencies: enhanced-resolve "^5.10.0" -next@13.1.3: - version "13.1.3" - resolved "https://registry.yarnpkg.com/next/-/next-13.1.3.tgz#2ba15a441fb9ef38467259fb0894623c79e938aa" - integrity sha512-ig7m7Po/F+Wp0xl+9RKYZq+PYfgVmONH6hBPVT2+jrdUmZkrqsN5ioSe4oQbCAb9tMtVr07agVdK2HFjD15Yug== +next@^13.5: + version "13.5.6" + resolved "https://registry.yarnpkg.com/next/-/next-13.5.6.tgz#e964b5853272236c37ce0dd2c68302973cf010b1" + integrity sha512-Y2wTcTbO4WwEsVb4A8VSnOsG1I9ok+h74q0ZdxkwM3EODqrs4pasq7O0iUxbcS9VtWMicG7f3+HAj0r1+NtKSw== dependencies: - "@next/env" "13.1.3" - "@swc/helpers" "0.4.14" + "@next/env" "13.5.6" + "@swc/helpers" "0.5.2" + busboy "1.6.0" caniuse-lite "^1.0.30001406" - postcss "8.4.14" + postcss "8.4.31" styled-jsx "5.1.1" + watchpack "2.4.0" optionalDependencies: - "@next/swc-android-arm-eabi" "13.1.3" - "@next/swc-android-arm64" "13.1.3" - "@next/swc-darwin-arm64" "13.1.3" - "@next/swc-darwin-x64" "13.1.3" - "@next/swc-freebsd-x64" "13.1.3" - "@next/swc-linux-arm-gnueabihf" "13.1.3" - "@next/swc-linux-arm64-gnu" "13.1.3" - "@next/swc-linux-arm64-musl" "13.1.3" - "@next/swc-linux-x64-gnu" "13.1.3" - "@next/swc-linux-x64-musl" "13.1.3" - "@next/swc-win32-arm64-msvc" "13.1.3" - "@next/swc-win32-ia32-msvc" "13.1.3" - "@next/swc-win32-x64-msvc" "13.1.3" + "@next/swc-darwin-arm64" "13.5.6" + "@next/swc-darwin-x64" "13.5.6" + "@next/swc-linux-arm64-gnu" "13.5.6" + "@next/swc-linux-arm64-musl" "13.5.6" + "@next/swc-linux-x64-gnu" "13.5.6" + "@next/swc-linux-x64-musl" "13.5.6" + "@next/swc-win32-arm64-msvc" "13.5.6" + "@next/swc-win32-ia32-msvc" "13.5.6" + "@next/swc-win32-x64-msvc" "13.5.6" node-fetch@2.6.7: version "2.6.7" @@ -3647,12 +3655,12 @@ pngjs@^6.0.0: resolved "https://registry.yarnpkg.com/pngjs/-/pngjs-6.0.0.tgz#ca9e5d2aa48db0228a52c419c3308e87720da821" integrity sha512-TRzzuFRRmEoSW/p1KVAmiOgPco2Irlah+bGFCeNfJXxxYGwSw7YwAOAcd7X28K/m5bjBWKsC29KyoMfHbypayg== -postcss@8.4.14: - version "8.4.14" - resolved "https://registry.npmjs.org/postcss/-/postcss-8.4.14.tgz" - integrity sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig== +postcss@8.4.31: + version "8.4.31" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.31.tgz#92b451050a9f914da6755af352bdc0192508656d" + integrity sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ== dependencies: - nanoid "^3.3.4" + nanoid "^3.3.6" picocolors "^1.0.0" source-map-js "^1.0.2" @@ -3890,7 +3898,7 @@ react-window@^1.8.6: "@babel/runtime" "^7.0.0" memoize-one ">=3.1.1 <6" -react@18.2.0: +react@18.2.0, react@^18.2.0: version "18.2.0" resolved "https://registry.yarnpkg.com/react/-/react-18.2.0.tgz#555bd98592883255fa00de14f1151a917b5d77d5" integrity sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ== @@ -4221,6 +4229,11 @@ stop-iteration-iterator@^1.0.0: dependencies: internal-slot "^1.0.4" +streamsearch@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/streamsearch/-/streamsearch-1.1.0.tgz#404dd1e2247ca94af554e841a8ef0eaa238da764" + integrity sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg== + string-argv@^0.3.1: version "0.3.2" resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.3.2.tgz#2b6d0ef24b656274d957d54e0a4bbf6153dc02b6" @@ -4583,6 +4596,11 @@ typescript@^5.1.3: resolved "https://registry.npmjs.org/typescript/-/typescript-5.1.3.tgz" integrity sha512-XH627E9vkeqhlZFQuL+UsyAXEnibT0kWR2FWONlr4sTjvxyJYnyefgrkyECLzM5NenmKzRAy2rR/OlYLA1HkZw== +typescript@^5.3.3: + version "5.3.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.3.3.tgz#b3ce6ba258e72e6305ba66f5c9b452aaee3ffe37" + integrity sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw== + unbox-primitive@^1.0.2: version "1.0.2" resolved "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz" @@ -4642,6 +4660,14 @@ warning@^4.0.0, warning@^4.0.2, warning@^4.0.3: dependencies: loose-envify "^1.0.0" +watchpack@2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.4.0.tgz#fa33032374962c78113f93c7f2fb4c54c9862a5d" + integrity sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg== + dependencies: + glob-to-regexp "^0.4.1" + graceful-fs "^4.1.2" + webidl-conversions@^3.0.0: version "3.0.1" resolved "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz" From 0c7beceece55aeacffa014663d214cf0ed086458 Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Thu, 15 Feb 2024 21:21:09 +0530 Subject: [PATCH 14/31] Update to Next 14 This was because with 13.5 I was getting an error coming from emotion: Unhandled Runtime Error Error: Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform. Call Stack - handleInterpolation ../node_modules/@emotion/serialize/dist/emotion-serialize.browser.esm.js (84:0) - serializeStyles ../node_modules/@emotion/serialize/dist/emotion-serialize.browser.esm.js (264:0) --- package.json | 2 +- yarn.lock | 135 +++++++++++++++++++++++---------------------------- 2 files changed, 62 insertions(+), 75 deletions(-) diff --git a/package.json b/package.json index 19f4f9914..29b91c705 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "@mui/material": "5.11.16", "axios": "^1.6.0", "is-electron": "^2.2.2", - "next": "^13.5", + "next": "^14.1", "react": "18.2.0", "react-dom": "18.2.0" }, diff --git a/yarn.lock b/yarn.lock index 5672f57b8..94bea2706 100644 --- a/yarn.lock +++ b/yarn.lock @@ -378,10 +378,10 @@ dependencies: webpack-bundle-analyzer "4.7.0" -"@next/env@13.5.6": - version "13.5.6" - resolved "https://registry.yarnpkg.com/@next/env/-/env-13.5.6.tgz#c1148e2e1aa166614f05161ee8f77ded467062bc" - integrity sha512-Yac/bV5sBGkkEXmAX5FWPS9Mmo2rthrOPRQQNfycJPkjUAUclomCPH7QFVCDQ4Mp2k2K1SSM6m0zrxYrOwtFQw== +"@next/env@14.1.0": + version "14.1.0" + resolved "https://registry.yarnpkg.com/@next/env/-/env-14.1.0.tgz#43d92ebb53bc0ae43dcc64fb4d418f8f17d7a341" + integrity sha512-Py8zIo+02ht82brwwhTg36iogzFqGLPXlRGKQw5s+qP/kMNc4MAyDeEwBKDijk6zTIbegEgu8Qy7C1LboslQAw== "@next/eslint-plugin-next@13.4.7": version "13.4.7" @@ -390,50 +390,50 @@ dependencies: glob "7.1.7" -"@next/swc-darwin-arm64@13.5.6": - version "13.5.6" - resolved "https://registry.yarnpkg.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.5.6.tgz#b15d139d8971360fca29be3bdd703c108c9a45fb" - integrity sha512-5nvXMzKtZfvcu4BhtV0KH1oGv4XEW+B+jOfmBdpFI3C7FrB/MfujRpWYSBBO64+qbW8pkZiSyQv9eiwnn5VIQA== +"@next/swc-darwin-arm64@14.1.0": + version "14.1.0" + resolved "https://registry.yarnpkg.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.1.0.tgz#70a57c87ab1ae5aa963a3ba0f4e59e18f4ecea39" + integrity sha512-nUDn7TOGcIeyQni6lZHfzNoo9S0euXnu0jhsbMOmMJUBfgsnESdjN97kM7cBqQxZa8L/bM9om/S5/1dzCrW6wQ== -"@next/swc-darwin-x64@13.5.6": - version "13.5.6" - resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-13.5.6.tgz#9c72ee31cc356cb65ce6860b658d807ff39f1578" - integrity sha512-6cgBfxg98oOCSr4BckWjLLgiVwlL3vlLj8hXg2b+nDgm4bC/qVXXLfpLB9FHdoDu4057hzywbxKvmYGmi7yUzA== +"@next/swc-darwin-x64@14.1.0": + version "14.1.0" + resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-14.1.0.tgz#0863a22feae1540e83c249384b539069fef054e9" + integrity sha512-1jgudN5haWxiAl3O1ljUS2GfupPmcftu2RYJqZiMJmmbBT5M1XDffjUtRUzP4W3cBHsrvkfOFdQ71hAreNQP6g== -"@next/swc-linux-arm64-gnu@13.5.6": - version "13.5.6" - resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.5.6.tgz#59f5f66155e85380ffa26ee3d95b687a770cfeab" - integrity sha512-txagBbj1e1w47YQjcKgSU4rRVQ7uF29YpnlHV5xuVUsgCUf2FmyfJ3CPjZUvpIeXCJAoMCFAoGnbtX86BK7+sg== +"@next/swc-linux-arm64-gnu@14.1.0": + version "14.1.0" + resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.1.0.tgz#893da533d3fce4aec7116fe772d4f9b95232423c" + integrity sha512-RHo7Tcj+jllXUbK7xk2NyIDod3YcCPDZxj1WLIYxd709BQ7WuRYl3OWUNG+WUfqeQBds6kvZYlc42NJJTNi4tQ== -"@next/swc-linux-arm64-musl@13.5.6": - version "13.5.6" - resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.5.6.tgz#f012518228017052736a87d69bae73e587c76ce2" - integrity sha512-cGd+H8amifT86ZldVJtAKDxUqeFyLWW+v2NlBULnLAdWsiuuN8TuhVBt8ZNpCqcAuoruoSWynvMWixTFcroq+Q== +"@next/swc-linux-arm64-musl@14.1.0": + version "14.1.0" + resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.1.0.tgz#d81ddcf95916310b8b0e4ad32b637406564244c0" + integrity sha512-v6kP8sHYxjO8RwHmWMJSq7VZP2nYCkRVQ0qolh2l6xroe9QjbgV8siTbduED4u0hlk0+tjS6/Tuy4n5XCp+l6g== -"@next/swc-linux-x64-gnu@13.5.6": - version "13.5.6" - resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.5.6.tgz#339b867a7e9e7ee727a700b496b269033d820df4" - integrity sha512-Mc2b4xiIWKXIhBy2NBTwOxGD3nHLmq4keFk+d4/WL5fMsB8XdJRdtUlL87SqVCTSaf1BRuQQf1HvXZcy+rq3Nw== +"@next/swc-linux-x64-gnu@14.1.0": + version "14.1.0" + resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.1.0.tgz#18967f100ec19938354332dcb0268393cbacf581" + integrity sha512-zJ2pnoFYB1F4vmEVlb/eSe+VH679zT1VdXlZKX+pE66grOgjmKJHKacf82g/sWE4MQ4Rk2FMBCRnX+l6/TVYzQ== -"@next/swc-linux-x64-musl@13.5.6": - version "13.5.6" - resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.5.6.tgz#ae0ae84d058df758675830bcf70ca1846f1028f2" - integrity sha512-CFHvP9Qz98NruJiUnCe61O6GveKKHpJLloXbDSWRhqhkJdZD2zU5hG+gtVJR//tyW897izuHpM6Gtf6+sNgJPQ== +"@next/swc-linux-x64-musl@14.1.0": + version "14.1.0" + resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.1.0.tgz#77077cd4ba8dda8f349dc7ceb6230e68ee3293cf" + integrity sha512-rbaIYFt2X9YZBSbH/CwGAjbBG2/MrACCVu2X0+kSykHzHnYH5FjHxwXLkcoJ10cX0aWCEynpu+rP76x0914atg== -"@next/swc-win32-arm64-msvc@13.5.6": - version "13.5.6" - resolved "https://registry.yarnpkg.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.5.6.tgz#a5cc0c16920485a929a17495064671374fdbc661" - integrity sha512-aFv1ejfkbS7PUa1qVPwzDHjQWQtknzAZWGTKYIAaS4NMtBlk3VyA6AYn593pqNanlicewqyl2jUhQAaFV/qXsg== +"@next/swc-win32-arm64-msvc@14.1.0": + version "14.1.0" + resolved "https://registry.yarnpkg.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.1.0.tgz#5f0b8cf955644104621e6d7cc923cad3a4c5365a" + integrity sha512-o1N5TsYc8f/HpGt39OUQpQ9AKIGApd3QLueu7hXk//2xq5Z9OxmV6sQfNp8C7qYmiOlHYODOGqNNa0e9jvchGQ== -"@next/swc-win32-ia32-msvc@13.5.6": - version "13.5.6" - resolved "https://registry.yarnpkg.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.5.6.tgz#6a2409b84a2cbf34bf92fe714896455efb4191e4" - integrity sha512-XqqpHgEIlBHvzwG8sp/JXMFkLAfGLqkbVsyN+/Ih1mR8INb6YCc2x/Mbwi6hsAgUnqQztz8cvEbHJUbSl7RHDg== +"@next/swc-win32-ia32-msvc@14.1.0": + version "14.1.0" + resolved "https://registry.yarnpkg.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.1.0.tgz#21f4de1293ac5e5a168a412b139db5d3420a89d0" + integrity sha512-XXIuB1DBRCFwNO6EEzCTMHT5pauwaSj4SWs7CYnME57eaReAKBXCnkUE80p/pAZcewm7hs+vGvNqDPacEXHVkw== -"@next/swc-win32-x64-msvc@13.5.6": - version "13.5.6" - resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.5.6.tgz#4a3e2a206251abc729339ba85f60bc0433c2865d" - integrity sha512-Cqfe1YmOS7k+5mGu92nl5ULkzpKuxJrP3+4AEuPmrpFZ3BHxTY3TnHmU1On3bFmFFs6FbTcdF58CCUProGpIGQ== +"@next/swc-win32-x64-msvc@14.1.0": + version "14.1.0" + resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.1.0.tgz#e561fb330466d41807123d932b365cf3d33ceba2" + integrity sha512-9WEbVRRAqJ3YFVqEZIxUqkiO8l1nool1LmNxygr5HWF8AcSYsEpneUDhmjUVJEzO2A04+oPtZdombzzPPkTtgg== "@nodelib/fs.scandir@2.1.5": version "2.1.5" @@ -1392,10 +1392,10 @@ callsites@^3.0.0: resolved "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz" integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== -caniuse-lite@^1.0.30001406: - version "1.0.30001508" - resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001508.tgz" - integrity sha512-sdQZOJdmt3GJs1UMNpCCCyeuS2IEGLXnHyAo9yIO5JJDjbjoVRij4M1qep6P6gFpptD1PqIYgzM+gwJbOi92mw== +caniuse-lite@^1.0.30001579: + version "1.0.30001587" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001587.tgz#a0bce920155fa56a1885a69c74e1163fc34b4881" + integrity sha512-HMFNotUmLXn71BQxg8cijvqxnIAofforZOwGsxyXJ0qugTdspUF4sPSJ2vhgprHCB996tIDzEq1ubumPDV8ULA== chalk@3.0.0: version "3.0.0" @@ -2381,11 +2381,6 @@ glob-parent@^6.0.2: dependencies: is-glob "^4.0.3" -glob-to-regexp@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e" - integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== - glob@7.1.7, glob@^7.1.3: version "7.1.7" resolved "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz" @@ -2463,7 +2458,7 @@ gopd@^1.0.1: dependencies: get-intrinsic "^1.1.3" -graceful-fs@^4.1.2: +graceful-fs@^4.2.11: version "4.2.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== @@ -3344,28 +3339,28 @@ next-transpile-modules@^10.0.0: dependencies: enhanced-resolve "^5.10.0" -next@^13.5: - version "13.5.6" - resolved "https://registry.yarnpkg.com/next/-/next-13.5.6.tgz#e964b5853272236c37ce0dd2c68302973cf010b1" - integrity sha512-Y2wTcTbO4WwEsVb4A8VSnOsG1I9ok+h74q0ZdxkwM3EODqrs4pasq7O0iUxbcS9VtWMicG7f3+HAj0r1+NtKSw== +next@^14.1: + version "14.1.0" + resolved "https://registry.yarnpkg.com/next/-/next-14.1.0.tgz#b31c0261ff9caa6b4a17c5af019ed77387174b69" + integrity sha512-wlzrsbfeSU48YQBjZhDzOwhWhGsy+uQycR8bHAOt1LY1bn3zZEcDyHQOEoN3aWzQ8LHCAJ1nqrWCc9XF2+O45Q== dependencies: - "@next/env" "13.5.6" + "@next/env" "14.1.0" "@swc/helpers" "0.5.2" busboy "1.6.0" - caniuse-lite "^1.0.30001406" + caniuse-lite "^1.0.30001579" + graceful-fs "^4.2.11" postcss "8.4.31" styled-jsx "5.1.1" - watchpack "2.4.0" optionalDependencies: - "@next/swc-darwin-arm64" "13.5.6" - "@next/swc-darwin-x64" "13.5.6" - "@next/swc-linux-arm64-gnu" "13.5.6" - "@next/swc-linux-arm64-musl" "13.5.6" - "@next/swc-linux-x64-gnu" "13.5.6" - "@next/swc-linux-x64-musl" "13.5.6" - "@next/swc-win32-arm64-msvc" "13.5.6" - "@next/swc-win32-ia32-msvc" "13.5.6" - "@next/swc-win32-x64-msvc" "13.5.6" + "@next/swc-darwin-arm64" "14.1.0" + "@next/swc-darwin-x64" "14.1.0" + "@next/swc-linux-arm64-gnu" "14.1.0" + "@next/swc-linux-arm64-musl" "14.1.0" + "@next/swc-linux-x64-gnu" "14.1.0" + "@next/swc-linux-x64-musl" "14.1.0" + "@next/swc-win32-arm64-msvc" "14.1.0" + "@next/swc-win32-ia32-msvc" "14.1.0" + "@next/swc-win32-x64-msvc" "14.1.0" node-fetch@2.6.7: version "2.6.7" @@ -4660,14 +4655,6 @@ warning@^4.0.0, warning@^4.0.2, warning@^4.0.3: dependencies: loose-envify "^1.0.0" -watchpack@2.4.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.4.0.tgz#fa33032374962c78113f93c7f2fb4c54c9862a5d" - integrity sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg== - dependencies: - glob-to-regexp "^0.4.1" - graceful-fs "^4.1.2" - webidl-conversions@^3.0.0: version "3.0.1" resolved "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz" From 3720abe0ed83f52e50c39273444499d08d273850 Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Fri, 16 Feb 2024 09:42:44 +0530 Subject: [PATCH 15/31] Integrate the actual one --- apps/photos/package.json | 4 ++-- apps/photos/src/pages/_app.tsx | 4 ++-- packages/shared/next/next.config.base.js | 4 ++-- packages/utils/README.md | 4 +++- packages/utils/package.json | 4 ++-- packages/utils/tsconfig.json | 9 +++++---- 6 files changed, 16 insertions(+), 13 deletions(-) diff --git a/apps/photos/package.json b/apps/photos/package.json index 9c0e7a3d1..dcfa5ff42 100644 --- a/apps/photos/package.json +++ b/apps/photos/package.json @@ -10,10 +10,10 @@ "albums": "next dev -p 3002" }, "dependencies": { + "@/utils": "*", "@date-io/date-fns": "^2.14.0", - "@repo/ui": "*", - "@ente-io/utils": "*", "@mui/x-date-pickers": "^5.0.0-alpha.6", + "@repo/ui": "*", "@sentry/nextjs": "^7.77.0", "@stripe/stripe-js": "^1.13.2", "@tensorflow-models/coco-ssd": "^2.2.2", diff --git a/apps/photos/src/pages/_app.tsx b/apps/photos/src/pages/_app.tsx index 0805dbcf2..33b4470d7 100644 --- a/apps/photos/src/pages/_app.tsx +++ b/apps/photos/src/pages/_app.tsx @@ -79,8 +79,8 @@ import { PHOTOS_PAGES as PAGES } from '@ente/shared/constants/pages'; import { getTheme } from '@ente/shared/themes'; import { AppUpdateInfo } from '@ente/shared/electron/types'; import DownloadManager from 'services/download'; -// import { sayHello } from '@ente-io/utils/hello'; -import { sayHello } from '@repo/ui/hello'; +import { sayHello } from '@/utils/hello'; +// import { sayHello } from '@repo/ui/hello'; const redirectMap = new Map([ [REDIRECTS.ROADMAP, getRoadmapRedirectURL], diff --git a/packages/shared/next/next.config.base.js b/packages/shared/next/next.config.base.js index d80c920be..1c2216667 100644 --- a/packages/shared/next/next.config.base.js +++ b/packages/shared/next/next.config.base.js @@ -36,8 +36,8 @@ const nextConfig = { }, }, transpilePackages: [ - "@repo/ui", - '@ente-io/utils', + '@repo/ui', + '@/utils', '@mui/material', '@mui/system', '@mui/icons-material', diff --git a/packages/utils/README.md b/packages/utils/README.md index 717fe6776..9bccc5da0 100644 --- a/packages/utils/README.md +++ b/packages/utils/README.md @@ -1,3 +1,5 @@ -### @ente-io/utils +### @/utils Utility functions, types and assortments. + +> "Life is like a box of chocolates" - _Forrest Gump_ diff --git a/packages/utils/package.json b/packages/utils/package.json index 22cac4b8c..3260068d6 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -1,8 +1,8 @@ { - "name": "@ente-io/utils", + "name": "@/utils", "version": "0.0.0", "private": true, "exports": { - "./hello": "./src/hello" + "./hello": "./src/hello.ts" } } diff --git a/packages/utils/tsconfig.json b/packages/utils/tsconfig.json index c65746616..9f0bf1c3e 100644 --- a/packages/utils/tsconfig.json +++ b/packages/utils/tsconfig.json @@ -1,7 +1,7 @@ { /* Docs: https://aka.ms/tsconfig.json */ "compilerOptions": { - /* We use TypeScript as a type checker, not as a build tool */ + /* We use TypeScript (tsc) as a type checker, not as a build tool */ "noEmit": true, /* @@ -18,17 +18,18 @@ * explicitly. * * Note that we don't need to specify the `target` compilerOption, since - * TypeScript isn't actually generating (emitting) the JavaScript. + * tsc isn't actually generating (emitting) the JavaScript. */ "lib": ["esnext", "dom", "dom.iterable"], /* * The module system to assume the generated JavaScript will use. * - * Since we're using a bundler, we should set this to esnext + * Since we're using a bundler, we should set this to "esnext" * https://www.typescriptlang.org/docs/handbook/modules/guides/choosing-compiler-options.html */ "module": "esnext", + /* * Tell TypeScript how to lookup the file for a given import * @@ -43,7 +44,7 @@ */ "moduleResolution": "bundler", - /* Allow use of `.tsx` files */ + /* Allow use of `.tsx` files, but don't tranform them */ "jsx": "preserve", /* Ask TypeScript to warn us if we use TypeScript features that cannot From 703031f73c7dcd8a4bb8d21f704eb5058d065d74 Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Fri, 16 Feb 2024 10:00:21 +0530 Subject: [PATCH 16/31] Add development notes --- docs/Dev.md | 19 +++++++++++++++++++ docs/README.md | 9 +++++++++ 2 files changed, 28 insertions(+) create mode 100644 docs/Dev.md create mode 100644 docs/README.md diff --git a/docs/Dev.md b/docs/Dev.md new file mode 100644 index 000000000..03a7b444b --- /dev/null +++ b/docs/Dev.md @@ -0,0 +1,19 @@ +## Monorepo + +The monorepo uses Yarn (classic) workspaces. + +To run a command for a workspace ``, invoke `yarn workspace ` from +the root folder instead the the `yarn ` you’d have done otherwise. + +To add a local package as a dependency, use `@*`. The "*" here +denotes any version. + +```sh +yarn workspace photos add '@/utils@*' +``` + +To see what packages depend on each other locally, use + +```sh +yarn workspaces info +``` diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 000000000..756f0bdcd --- /dev/null +++ b/docs/README.md @@ -0,0 +1,9 @@ +## Notes for maintainers + +If you just want to run ente locally or develop on it, you can do + + yarn + yarn photos:dev + +The notes in this directory are for maintainers to note down more advanced or +infrequently needed details. From 6b5859dca7f27cc8117c70da4ecac0c30a69308c Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Fri, 16 Feb 2024 10:23:48 +0530 Subject: [PATCH 17/31] Funnel .tsx extensions via subfolders --- apps/photos/src/pages/_app.tsx | 2 ++ packages/utils/package.json | 3 ++- packages/utils/src/components/Card.tsx | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 packages/utils/src/components/Card.tsx diff --git a/apps/photos/src/pages/_app.tsx b/apps/photos/src/pages/_app.tsx index 33b4470d7..acd30e17a 100644 --- a/apps/photos/src/pages/_app.tsx +++ b/apps/photos/src/pages/_app.tsx @@ -80,6 +80,7 @@ import { getTheme } from '@ente/shared/themes'; import { AppUpdateInfo } from '@ente/shared/electron/types'; import DownloadManager from 'services/download'; import { sayHello } from '@/utils/hello'; +import { Card } from '@/utils/components/Card'; // import { sayHello } from '@repo/ui/hello'; const redirectMap = new Map([ @@ -412,6 +413,7 @@ export default function App(props: EnteAppProps) { + {showNavbar && } {offline && t('OFFLINE_MSG')} diff --git a/packages/utils/package.json b/packages/utils/package.json index 3260068d6..3015b3295 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -3,6 +3,7 @@ "version": "0.0.0", "private": true, "exports": { - "./hello": "./src/hello.ts" + "./components/*": "./src/components/*.tsx", + "./*": "./src/*.ts" } } diff --git a/packages/utils/src/components/Card.tsx b/packages/utils/src/components/Card.tsx new file mode 100644 index 000000000..6853d236b --- /dev/null +++ b/packages/utils/src/components/Card.tsx @@ -0,0 +1,3 @@ +export const Card: React.FC = () => { + return
Hello
; +}; From 21b8c4e77a731f9b5f3e5e9638288c7ddf7f1de6 Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Fri, 16 Feb 2024 10:36:19 +0530 Subject: [PATCH 18/31] Configure global prettier --- .prettierignore | 7 ++++++- package.json | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.prettierignore b/.prettierignore index 5a9cab29f..948ba8a19 100644 --- a/.prettierignore +++ b/.prettierignore @@ -2,4 +2,9 @@ thirdparty/ public/ node_modules/ *.md -*.yml \ No newline at end of file +*.yml + +# TODO (MR): This file might not be needed after we update prettier to v3, since +# v3 respects .gitignore +.next/ +out/ diff --git a/package.json b/package.json index 29b91c705..96f159bf9 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,8 @@ "lint": "turbo run lint", "albums": "turbo run albums", "prepare": "husky install", - "photos:dev": "TURBO_NO_UPDATE_NOTIFIER=true turbo run dev --filter=photos" + "photos:dev": "TURBO_NO_UPDATE_NOTIFIER=true turbo run dev --filter=photos", + "lint-x": "prettier --check ." }, "dependencies": { "@emotion/react": "11.10.6", From ba12c9c0c782cbcfaf38ac88dc262cac3011e5cf Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Fri, 16 Feb 2024 11:07:16 +0530 Subject: [PATCH 19/31] Set up linter for the package --- docs/Dependencies.md | 14 ++++++++++++++ packages/utils/.eslintrc.js | 1 + 2 files changed, 15 insertions(+) create mode 100644 docs/Dependencies.md create mode 100644 packages/utils/.eslintrc.js diff --git a/docs/Dependencies.md b/docs/Dependencies.md new file mode 100644 index 000000000..5047052b0 --- /dev/null +++ b/docs/Dependencies.md @@ -0,0 +1,14 @@ +# Dependencies + +## Global + +These are some global dev dependencies in the root `package.json`. These set the +baseline for how our code be in all the workspaces in the monorepo. + +* "prettier" - Formatter +* "eslint" - Linter +* "typescript" - Type checker + +They also need some support packages: + +* "@typescript-eslint/parser" - Tells ESLint how to read TypeScript syntax diff --git a/packages/utils/.eslintrc.js b/packages/utils/.eslintrc.js new file mode 100644 index 000000000..f053ebf79 --- /dev/null +++ b/packages/utils/.eslintrc.js @@ -0,0 +1 @@ +module.exports = {}; From 378946a6e96a4ef47654bd35915d3095f55229f8 Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Fri, 16 Feb 2024 11:38:58 +0530 Subject: [PATCH 20/31] Switch to a flat config --- packages/utils/.eslintrc.js | 1 - packages/utils/eslint.config.js | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) delete mode 100644 packages/utils/.eslintrc.js create mode 100644 packages/utils/eslint.config.js diff --git a/packages/utils/.eslintrc.js b/packages/utils/.eslintrc.js deleted file mode 100644 index f053ebf79..000000000 --- a/packages/utils/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = {}; diff --git a/packages/utils/eslint.config.js b/packages/utils/eslint.config.js new file mode 100644 index 000000000..1e336fc0f --- /dev/null +++ b/packages/utils/eslint.config.js @@ -0,0 +1,3 @@ +module.exports = { + extends: ["eslint:recommended"], +}; From d0155d1fc241474888d1454650d2e8b3970982ef Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Fri, 16 Feb 2024 12:36:04 +0530 Subject: [PATCH 21/31] Switch to the flat config eslint 8 already supports both formats, and will start defaulting to the new one in 9. https://eslint.org/blog/2022/08/new-config-system-part-2/ --- packages/utils/eslint.config.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/utils/eslint.config.js b/packages/utils/eslint.config.js index 1e336fc0f..f0478a421 100644 --- a/packages/utils/eslint.config.js +++ b/packages/utils/eslint.config.js @@ -1,3 +1 @@ -module.exports = { - extends: ["eslint:recommended"], -}; +export default ["eslint:recommended"]; From a9a810ab99e8a3258aceccf05ab57ca7184355d5 Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Fri, 16 Feb 2024 12:59:12 +0530 Subject: [PATCH 22/31] Add typescript configuration in eslint VSCode still gives an error We had to set the type to module to get the `import` to work. Setting .mjs didn't work (eslint didn't recognize the file). Setting the type to module should be (based on my current understanding) not affect us negatively since we are exporting a TypeScript library not a bundled one, and all the other source files apart from this are intended to be `*.ts`. Refs: - https://jeremyrichardson.dev/blog/saga_of_learning_exports_property_in_packagejson - https://github.com/eslint/eslint/discussions/17021 --- docs/Dependencies.md | 6 ++ packages/utils/README.md | 7 +- packages/utils/eslint.config.js | 12 ++- packages/utils/package.json | 4 + yarn.lock | 145 +++++++++++++++++++++++++++++++- 5 files changed, 171 insertions(+), 3 deletions(-) diff --git a/docs/Dependencies.md b/docs/Dependencies.md index 5047052b0..54bb12c6a 100644 --- a/docs/Dependencies.md +++ b/docs/Dependencies.md @@ -12,3 +12,9 @@ baseline for how our code be in all the workspaces in the monorepo. They also need some support packages: * "@typescript-eslint/parser" - Tells ESLint how to read TypeScript syntax + + TODO(MR): This is no longer needed with the new flat format. + +* "typescript-eslint" - TypeScript support for ESLint + + TODO(MR): Move this to the top level package.json diff --git a/packages/utils/README.md b/packages/utils/README.md index 9bccc5da0..1bba4c1c9 100644 --- a/packages/utils/README.md +++ b/packages/utils/README.md @@ -1,5 +1,10 @@ -### @/utils +## @/utils Utility functions, types and assortments. > "Life is like a box of chocolates" - _Forrest Gump_ + +### Packaging + +This (internal) package exports a vanilla TypeScript library. We rely on the +importing project to transpile and bundle it. diff --git a/packages/utils/eslint.config.js b/packages/utils/eslint.config.js index f0478a421..4b109c208 100644 --- a/packages/utils/eslint.config.js +++ b/packages/utils/eslint.config.js @@ -1 +1,11 @@ -export default ["eslint:recommended"]; +// @ts-check + +import eslint from "@eslint/js"; +import tseslint from "typescript-eslint"; + +console.log(tseslint); + +export default tseslint.config( + eslint.configs.recommended, + ...tseslint.configs.recommended +); diff --git a/packages/utils/package.json b/packages/utils/package.json index 3015b3295..a9f9e64e1 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -2,8 +2,12 @@ "name": "@/utils", "version": "0.0.0", "private": true, + "type": "module", "exports": { "./components/*": "./src/components/*.tsx", "./*": "./src/*.ts" + }, + "devDependencies": { + "typescript-eslint": "^7.0.1" } } diff --git a/yarn.lock b/yarn.lock index 94bea2706..af96028c6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -206,7 +206,7 @@ resolved "https://registry.npmjs.org/@emotion/weak-memoize/-/weak-memoize-0.3.0.tgz" integrity sha512-AHPmaAx+RYfZz0eYu6Gviiagpmiyw98ySSlQvCUhVGDRtDFe4DBS0x1bSjdF3gqUDYOczB+yYvBTtEylYSdRhg== -"@eslint-community/eslint-utils@^4.2.0": +"@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0": version "4.4.0" resolved "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz" integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA== @@ -218,6 +218,11 @@ resolved "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.5.0.tgz" integrity sha512-vITaYzIcNmjn5tF5uxcZ/ft7/RXGrMUIS9HalWckEOF6ESiwXKoMzAQf2UW0aVd6rnOeExTJVd5hmWXucBKGXQ== +"@eslint-community/regexpp@^4.5.1": + version "4.10.0" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.10.0.tgz#548f6de556857c8bb73bbee70c35dc82a2e74d63" + integrity sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA== + "@eslint/eslintrc@^2.0.2": version "2.0.2" resolved "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.2.tgz" @@ -739,6 +744,11 @@ resolved "https://registry.npmjs.org/@types/invariant/-/invariant-2.2.35.tgz" integrity sha512-DxX1V9P8zdJPYQat1gHyY0xj3efl8gnMVjiM9iCY6y27lj+PoQWkgjt8jDqmovPqULkKVpKRg8J36iQiA+EtEg== +"@types/json-schema@^7.0.12": + version "7.0.15" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" + integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== + "@types/json-schema@^7.0.9": version "7.0.11" resolved "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz" @@ -932,6 +942,11 @@ resolved "https://registry.npmjs.org/@types/semver/-/semver-7.3.13.tgz" integrity sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw== +"@types/semver@^7.5.0": + version "7.5.7" + resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.7.tgz#326f5fdda70d13580777bcaa1bc6fa772a5aef0e" + integrity sha512-/wdoPq1QqkSj9/QOeKkFquEuPzQbHTWAMPH/PaUMB+JuR31lXhlWXRZ52IpfDYVlDOUBvX09uBrPwxGT1hjNBg== + "@types/uuid@^9.0.2": version "9.0.2" resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-9.0.2.tgz#ede1d1b1e451548d44919dc226253e32a6952c4b" @@ -962,6 +977,23 @@ resolved "https://registry.npmjs.org/@types/zxcvbn/-/zxcvbn-4.4.1.tgz" integrity sha512-3NoqvZC2W5gAC5DZbTpCeJ251vGQmgcWIHQJGq2J240HY6ErQ9aWKkwfoKJlHLx+A83WPNTZ9+3cd2ILxbvr1w== +"@typescript-eslint/eslint-plugin@7.0.1": + version "7.0.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.0.1.tgz#407daffe09d964d57aceaf3ac51846359fbe61b0" + integrity sha512-OLvgeBv3vXlnnJGIAgCLYKjgMEU+wBGj07MQ/nxAaON+3mLzX7mJbhRYrVGiVvFiXtwFlkcBa/TtmglHy0UbzQ== + dependencies: + "@eslint-community/regexpp" "^4.5.1" + "@typescript-eslint/scope-manager" "7.0.1" + "@typescript-eslint/type-utils" "7.0.1" + "@typescript-eslint/utils" "7.0.1" + "@typescript-eslint/visitor-keys" "7.0.1" + debug "^4.3.4" + graphemer "^1.4.0" + ignore "^5.2.4" + natural-compare "^1.4.0" + semver "^7.5.4" + ts-api-utils "^1.0.1" + "@typescript-eslint/eslint-plugin@^5.43.0": version "5.59.1" resolved "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.59.1.tgz" @@ -978,6 +1010,17 @@ semver "^7.3.7" tsutils "^3.21.0" +"@typescript-eslint/parser@7.0.1": + version "7.0.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-7.0.1.tgz#e9c61d9a5e32242477d92756d36086dc40322eed" + integrity sha512-8GcRRZNzaHxKzBPU3tKtFNing571/GwPBeCvmAUw0yBtfE2XVd0zFKJIMSWkHJcPQi0ekxjIts6L/rrZq5cxGQ== + dependencies: + "@typescript-eslint/scope-manager" "7.0.1" + "@typescript-eslint/types" "7.0.1" + "@typescript-eslint/typescript-estree" "7.0.1" + "@typescript-eslint/visitor-keys" "7.0.1" + debug "^4.3.4" + "@typescript-eslint/parser@^5.42.0", "@typescript-eslint/parser@^5.59.2": version "5.59.7" resolved "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.59.7.tgz" @@ -1004,6 +1047,14 @@ "@typescript-eslint/types" "5.59.7" "@typescript-eslint/visitor-keys" "5.59.7" +"@typescript-eslint/scope-manager@7.0.1": + version "7.0.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-7.0.1.tgz#611ec8e78c70439b152a805e1b10aaac36de7c00" + integrity sha512-v7/T7As10g3bcWOOPAcbnMDuvctHzCFYCG/8R4bK4iYzdFqsZTbXGln0cZNVcwQcwewsYU2BJLay8j0/4zOk4w== + dependencies: + "@typescript-eslint/types" "7.0.1" + "@typescript-eslint/visitor-keys" "7.0.1" + "@typescript-eslint/type-utils@5.59.1": version "5.59.1" resolved "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.59.1.tgz" @@ -1014,6 +1065,16 @@ debug "^4.3.4" tsutils "^3.21.0" +"@typescript-eslint/type-utils@7.0.1": + version "7.0.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-7.0.1.tgz#0fba92c1f81cad561d7b3adc812aa1cc0e35cdae" + integrity sha512-YtT9UcstTG5Yqy4xtLiClm1ZpM/pWVGFnkAa90UfdkkZsR1eP2mR/1jbHeYp8Ay1l1JHPyGvoUYR6o3On5Nhmw== + dependencies: + "@typescript-eslint/typescript-estree" "7.0.1" + "@typescript-eslint/utils" "7.0.1" + debug "^4.3.4" + ts-api-utils "^1.0.1" + "@typescript-eslint/types@5.59.1": version "5.59.1" resolved "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.59.1.tgz" @@ -1024,6 +1085,11 @@ resolved "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.59.7.tgz" integrity sha512-UnVS2MRRg6p7xOSATscWkKjlf/NDKuqo5TdbWck6rIRZbmKpVNTLALzNvcjIfHBE7736kZOFc/4Z3VcZwuOM/A== +"@typescript-eslint/types@7.0.1": + version "7.0.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-7.0.1.tgz#dcfabce192db5b8bf77ea3c82cfaabe6e6a3c901" + integrity sha512-uJDfmirz4FHib6ENju/7cz9SdMSkeVvJDK3VcMFvf/hAShg8C74FW+06MaQPODHfDJp/z/zHfgawIJRjlu0RLg== + "@typescript-eslint/typescript-estree@5.59.1": version "5.59.1" resolved "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.59.1.tgz" @@ -1050,6 +1116,20 @@ semver "^7.3.7" tsutils "^3.21.0" +"@typescript-eslint/typescript-estree@7.0.1": + version "7.0.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-7.0.1.tgz#1d52ac03da541693fa5bcdc13ad655def5046faf" + integrity sha512-SO9wHb6ph0/FN5OJxH4MiPscGah5wjOd0RRpaLvuBv9g8565Fgu0uMySFEPqwPHiQU90yzJ2FjRYKGrAhS1xig== + dependencies: + "@typescript-eslint/types" "7.0.1" + "@typescript-eslint/visitor-keys" "7.0.1" + debug "^4.3.4" + globby "^11.1.0" + is-glob "^4.0.3" + minimatch "9.0.3" + semver "^7.5.4" + ts-api-utils "^1.0.1" + "@typescript-eslint/utils@5.59.1": version "5.59.1" resolved "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.59.1.tgz" @@ -1064,6 +1144,19 @@ eslint-scope "^5.1.1" semver "^7.3.7" +"@typescript-eslint/utils@7.0.1": + version "7.0.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-7.0.1.tgz#b8ceac0ba5fef362b4a03a33c0e1fedeea3734ed" + integrity sha512-oe4his30JgPbnv+9Vef1h48jm0S6ft4mNwi9wj7bX10joGn07QRfqIqFHoMiajrtoU88cIhXf8ahwgrcbNLgPA== + dependencies: + "@eslint-community/eslint-utils" "^4.4.0" + "@types/json-schema" "^7.0.12" + "@types/semver" "^7.5.0" + "@typescript-eslint/scope-manager" "7.0.1" + "@typescript-eslint/types" "7.0.1" + "@typescript-eslint/typescript-estree" "7.0.1" + semver "^7.5.4" + "@typescript-eslint/visitor-keys@5.59.1": version "5.59.1" resolved "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.59.1.tgz" @@ -1080,6 +1173,14 @@ "@typescript-eslint/types" "5.59.7" eslint-visitor-keys "^3.3.0" +"@typescript-eslint/visitor-keys@7.0.1": + version "7.0.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-7.0.1.tgz#864680ac5a8010ec4814f8a818e57595f79f464e" + integrity sha512-hwAgrOyk++RTXrP4KzCg7zB2U0xt7RUU0ZdMSCsqF3eKUwkdXUMyTb0qdCuji7VIbcpG62kKTU9M1J1c9UpFBw== + dependencies: + "@typescript-eslint/types" "7.0.1" + eslint-visitor-keys "^3.4.1" + "@webgpu/types@0.1.30": version "0.1.30" resolved "https://registry.yarnpkg.com/@webgpu/types/-/types-0.1.30.tgz#b6406dc4a1c1e0d469028ceb30ddffbbd2fa706c" @@ -2042,6 +2143,11 @@ eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.0: resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.0.tgz" integrity sha512-HPpKPUBQcAsZOsHAFwTtIKcYlCje62XB7SEAcxjtmW6TD1WVpkS6i6/hOVtTZIl4zGj/mBqpFVGvaDneik+VoQ== +eslint-visitor-keys@^3.4.1: + version "3.4.3" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" + integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== + eslint@^8.28.0, eslint@latest: version "8.39.0" resolved "https://registry.npmjs.org/eslint/-/eslint-8.39.0.tgz" @@ -2473,6 +2579,11 @@ grapheme-splitter@^1.0.4: resolved "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz" integrity sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ== +graphemer@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6" + integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag== + gzip-size@^6.0.0: version "6.0.0" resolved "https://registry.npmjs.org/gzip-size/-/gzip-size-6.0.0.tgz" @@ -2637,6 +2748,11 @@ ignore@^5.2.0: resolved "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz" integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ== +ignore@^5.2.4: + version "5.3.1" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.1.tgz#5073e554cd42c5b33b394375f538b8593e34d4ef" + integrity sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw== + immediate@~3.0.5: version "3.0.6" resolved "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz" @@ -3242,6 +3358,13 @@ mimic-fn@^4.0.0: resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-4.0.0.tgz#60a90550d5cb0b239cca65d893b1a53b29871ecc" integrity sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw== +minimatch@9.0.3: + version "9.0.3" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.3.tgz#a6e00c3de44c3a542bfaae70abfc22420a6da825" + integrity sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg== + dependencies: + brace-expansion "^2.0.1" + minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz" @@ -4106,6 +4229,13 @@ semver@^7.3.7: dependencies: lru-cache "^6.0.0" +semver@^7.5.4: + version "7.6.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.0.tgz#1a46a4db4bffcccd97b743b5005c8325f23d4e2d" + integrity sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg== + dependencies: + lru-cache "^6.0.0" + setimmediate@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" @@ -4481,6 +4611,11 @@ truncate-utf8-bytes@^1.0.0: dependencies: utf8-byte-length "^1.0.1" +ts-api-utils@^1.0.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.2.1.tgz#f716c7e027494629485b21c0df6180f4d08f5e8b" + integrity sha512-RIYA36cJn2WiH9Hy77hdF9r7oEwxAtB/TS9/S4Qd90Ap4z5FSiin5zEiTL44OII1Y3IIlEvxwxFUVgrHSZ/UpA== + tsconfig-paths@^3.14.1: version "3.14.1" resolved "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz" @@ -4586,6 +4721,14 @@ typed-array-length@^1.0.4: for-each "^0.3.3" is-typed-array "^1.1.9" +typescript-eslint@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/typescript-eslint/-/typescript-eslint-7.0.1.tgz#b5b960b07f8be39015f3ec8b9ebd4f35679af901" + integrity sha512-aIquOfwHkGHrMSH57HxLT+1Qzp99YtGxEHXMRD+BXOc8fkuFBbA5BXsMYnoVXFuXOWBdXg8U2rN9Xe4p7LrPSQ== + dependencies: + "@typescript-eslint/eslint-plugin" "7.0.1" + "@typescript-eslint/parser" "7.0.1" + typescript@^5.1.3: version "5.1.3" resolved "https://registry.npmjs.org/typescript/-/typescript-5.1.3.tgz" From f6e31f0987d23b8755a2d3c401aa04df06ac8159 Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Fri, 16 Feb 2024 13:14:39 +0530 Subject: [PATCH 23/31] Update to a newer eslint --- package.json | 2 +- yarn.lock | 130 +++++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 127 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 96f159bf9..0b0f49b48 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "devDependencies": { "@ente/eslint-config": "*", "@typescript-eslint/parser": "^5.59.2", - "eslint": "^8.28.0", + "eslint": "^8.56", "husky": "^7.0.1", "lint-staged": "^13.2.3", "prettier": "2.3.2", diff --git a/yarn.lock b/yarn.lock index af96028c6..d33bd2e75 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,6 +2,11 @@ # yarn lockfile v1 +"@aashutoshrathi/word-wrap@^1.2.3": + version "1.2.6" + resolved "https://registry.yarnpkg.com/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz#bd9154aec9983f77b3a034ecaa015c2e4201f6cf" + integrity sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA== + "@babel/code-frame@^7.0.0": version "7.22.5" resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.5.tgz" @@ -218,7 +223,7 @@ resolved "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.5.0.tgz" integrity sha512-vITaYzIcNmjn5tF5uxcZ/ft7/RXGrMUIS9HalWckEOF6ESiwXKoMzAQf2UW0aVd6rnOeExTJVd5hmWXucBKGXQ== -"@eslint-community/regexpp@^4.5.1": +"@eslint-community/regexpp@^4.5.1", "@eslint-community/regexpp@^4.6.1": version "4.10.0" resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.10.0.tgz#548f6de556857c8bb73bbee70c35dc82a2e74d63" integrity sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA== @@ -238,11 +243,40 @@ minimatch "^3.1.2" strip-json-comments "^3.1.1" +"@eslint/eslintrc@^2.1.4": + version "2.1.4" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.1.4.tgz#388a269f0f25c1b6adc317b5a2c55714894c70ad" + integrity sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ== + dependencies: + ajv "^6.12.4" + debug "^4.3.2" + espree "^9.6.0" + globals "^13.19.0" + ignore "^5.2.0" + import-fresh "^3.2.1" + js-yaml "^4.1.0" + minimatch "^3.1.2" + strip-json-comments "^3.1.1" + "@eslint/js@8.39.0": version "8.39.0" resolved "https://registry.npmjs.org/@eslint/js/-/js-8.39.0.tgz" integrity sha512-kf9RB0Fg7NZfap83B3QOqOGg9QmD9yBudqQXzzOtn3i4y7ZUXe5ONeW34Gwi+TxhH4mvj72R1Zc300KUMa9Bng== +"@eslint/js@8.56.0": + version "8.56.0" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.56.0.tgz#ef20350fec605a7f7035a01764731b2de0f3782b" + integrity sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A== + +"@humanwhocodes/config-array@^0.11.13": + version "0.11.14" + resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.14.tgz#d78e481a039f7566ecc9660b4ea7fe6b1fec442b" + integrity sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg== + dependencies: + "@humanwhocodes/object-schema" "^2.0.2" + debug "^4.3.1" + minimatch "^3.0.5" + "@humanwhocodes/config-array@^0.11.8": version "0.11.8" resolved "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz" @@ -262,6 +296,11 @@ resolved "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz" integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== +"@humanwhocodes/object-schema@^2.0.2": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz#d9fae00a2d5cb40f92cfe64b47ad749fbc38f917" + integrity sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw== + "@jridgewell/sourcemap-codec@^1.4.13": version "1.4.15" resolved "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz" @@ -1181,6 +1220,11 @@ "@typescript-eslint/types" "7.0.1" eslint-visitor-keys "^3.4.1" +"@ungap/structured-clone@^1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-1.2.0.tgz#756641adb587851b5ccb3e095daf27ae581c8406" + integrity sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ== + "@webgpu/types@0.1.30": version "0.1.30" resolved "https://registry.yarnpkg.com/@webgpu/types/-/types-0.1.30.tgz#b6406dc4a1c1e0d469028ceb30ddffbbd2fa706c" @@ -1206,6 +1250,11 @@ acorn@^8.0.4, acorn@^8.8.0: resolved "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz" integrity sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw== +acorn@^8.9.0: + version "8.11.3" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.3.tgz#71e0b14e13a4ec160724b38fb7b0f233b1b81d7a" + integrity sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg== + agent-base@6: version "6.0.2" resolved "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz" @@ -1749,7 +1798,7 @@ debounce@^2.0.0: resolved "https://registry.yarnpkg.com/debounce/-/debounce-2.0.0.tgz#b2f914518a1481466f4edaee0b063e4d473ad549" integrity sha512-xRetU6gL1VJbs85Mc4FoEGSjQxzpdxRyFhe3lmWFyy2EzydIcD4xzUvRJMD+NPDfMwKNhxa3PvsIOU32luIWeA== -debug@4, debug@^4.1.1, debug@^4.3.2, debug@^4.3.4: +debug@4, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4: version "4.3.4" resolved "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== @@ -2138,17 +2187,69 @@ eslint-scope@^7.2.0: esrecurse "^4.3.0" estraverse "^5.2.0" +eslint-scope@^7.2.2: + version "7.2.2" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.2.2.tgz#deb4f92563390f32006894af62a22dba1c46423f" + integrity sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg== + dependencies: + esrecurse "^4.3.0" + estraverse "^5.2.0" + eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.0: version "3.4.0" resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.0.tgz" integrity sha512-HPpKPUBQcAsZOsHAFwTtIKcYlCje62XB7SEAcxjtmW6TD1WVpkS6i6/hOVtTZIl4zGj/mBqpFVGvaDneik+VoQ== -eslint-visitor-keys@^3.4.1: +eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4.3: version "3.4.3" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== -eslint@^8.28.0, eslint@latest: +eslint@^8.56: + version "8.56.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.56.0.tgz#4957ce8da409dc0809f99ab07a1b94832ab74b15" + integrity sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ== + dependencies: + "@eslint-community/eslint-utils" "^4.2.0" + "@eslint-community/regexpp" "^4.6.1" + "@eslint/eslintrc" "^2.1.4" + "@eslint/js" "8.56.0" + "@humanwhocodes/config-array" "^0.11.13" + "@humanwhocodes/module-importer" "^1.0.1" + "@nodelib/fs.walk" "^1.2.8" + "@ungap/structured-clone" "^1.2.0" + ajv "^6.12.4" + chalk "^4.0.0" + cross-spawn "^7.0.2" + debug "^4.3.2" + doctrine "^3.0.0" + escape-string-regexp "^4.0.0" + eslint-scope "^7.2.2" + eslint-visitor-keys "^3.4.3" + espree "^9.6.1" + esquery "^1.4.2" + esutils "^2.0.2" + fast-deep-equal "^3.1.3" + file-entry-cache "^6.0.1" + find-up "^5.0.0" + glob-parent "^6.0.2" + globals "^13.19.0" + graphemer "^1.4.0" + ignore "^5.2.0" + imurmurhash "^0.1.4" + is-glob "^4.0.0" + is-path-inside "^3.0.3" + js-yaml "^4.1.0" + json-stable-stringify-without-jsonify "^1.0.1" + levn "^0.4.1" + lodash.merge "^4.6.2" + minimatch "^3.1.2" + natural-compare "^1.4.0" + optionator "^0.9.3" + strip-ansi "^6.0.1" + text-table "^0.2.0" + +eslint@latest: version "8.39.0" resolved "https://registry.npmjs.org/eslint/-/eslint-8.39.0.tgz" integrity sha512-mwiok6cy7KTW7rBpo05k6+p4YVZByLNjAZ/ACB9DRCu4YDRwjXI01tWHp6KAUWelsBetTxKK/2sHB0vdS8Z2Og== @@ -2203,6 +2304,15 @@ espree@^9.5.1: acorn-jsx "^5.3.2" eslint-visitor-keys "^3.4.0" +espree@^9.6.0, espree@^9.6.1: + version "9.6.1" + resolved "https://registry.yarnpkg.com/espree/-/espree-9.6.1.tgz#a2a17b8e434690a5432f2f8018ce71d331a48c6f" + integrity sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ== + dependencies: + acorn "^8.9.0" + acorn-jsx "^5.3.2" + eslint-visitor-keys "^3.4.1" + esquery@^1.4.2: version "1.5.0" resolved "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz" @@ -3631,6 +3741,18 @@ optionator@^0.9.1: type-check "^0.4.0" word-wrap "^1.2.3" +optionator@^0.9.3: + version "0.9.3" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.3.tgz#007397d44ed1872fdc6ed31360190f81814e2c64" + integrity sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg== + dependencies: + "@aashutoshrathi/word-wrap" "^1.2.3" + deep-is "^0.1.3" + fast-levenshtein "^2.0.6" + levn "^0.4.1" + prelude-ls "^1.2.1" + type-check "^0.4.0" + otpauth@^9.0.2: version "9.0.2" resolved "https://registry.npmjs.org/otpauth/-/otpauth-9.0.2.tgz" From 9bb2fbb6e15726582d83a7bec34afec76ffdef3c Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Fri, 16 Feb 2024 13:36:23 +0530 Subject: [PATCH 24/31] Go back to existing config The flat config requires enabling a flag in the VS code plugin, it in not enabled by default. "eslint.experimental.useFlatConfig": true This is an unnecessary expectation from all developers on the project, so we for now live with the old format. --- packages/utils/eslint.config.js | 11 --- packages/utils/package.json | 4 - yarn.lock | 132 +------------------------------- 3 files changed, 2 insertions(+), 145 deletions(-) delete mode 100644 packages/utils/eslint.config.js diff --git a/packages/utils/eslint.config.js b/packages/utils/eslint.config.js deleted file mode 100644 index 4b109c208..000000000 --- a/packages/utils/eslint.config.js +++ /dev/null @@ -1,11 +0,0 @@ -// @ts-check - -import eslint from "@eslint/js"; -import tseslint from "typescript-eslint"; - -console.log(tseslint); - -export default tseslint.config( - eslint.configs.recommended, - ...tseslint.configs.recommended -); diff --git a/packages/utils/package.json b/packages/utils/package.json index a9f9e64e1..3015b3295 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -2,12 +2,8 @@ "name": "@/utils", "version": "0.0.0", "private": true, - "type": "module", "exports": { "./components/*": "./src/components/*.tsx", "./*": "./src/*.ts" - }, - "devDependencies": { - "typescript-eslint": "^7.0.1" } } diff --git a/yarn.lock b/yarn.lock index d33bd2e75..982d1ef2f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -211,7 +211,7 @@ resolved "https://registry.npmjs.org/@emotion/weak-memoize/-/weak-memoize-0.3.0.tgz" integrity sha512-AHPmaAx+RYfZz0eYu6Gviiagpmiyw98ySSlQvCUhVGDRtDFe4DBS0x1bSjdF3gqUDYOczB+yYvBTtEylYSdRhg== -"@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0": +"@eslint-community/eslint-utils@^4.2.0": version "4.4.0" resolved "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz" integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA== @@ -223,7 +223,7 @@ resolved "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.5.0.tgz" integrity sha512-vITaYzIcNmjn5tF5uxcZ/ft7/RXGrMUIS9HalWckEOF6ESiwXKoMzAQf2UW0aVd6rnOeExTJVd5hmWXucBKGXQ== -"@eslint-community/regexpp@^4.5.1", "@eslint-community/regexpp@^4.6.1": +"@eslint-community/regexpp@^4.6.1": version "4.10.0" resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.10.0.tgz#548f6de556857c8bb73bbee70c35dc82a2e74d63" integrity sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA== @@ -783,11 +783,6 @@ resolved "https://registry.npmjs.org/@types/invariant/-/invariant-2.2.35.tgz" integrity sha512-DxX1V9P8zdJPYQat1gHyY0xj3efl8gnMVjiM9iCY6y27lj+PoQWkgjt8jDqmovPqULkKVpKRg8J36iQiA+EtEg== -"@types/json-schema@^7.0.12": - version "7.0.15" - resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" - integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== - "@types/json-schema@^7.0.9": version "7.0.11" resolved "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz" @@ -981,11 +976,6 @@ resolved "https://registry.npmjs.org/@types/semver/-/semver-7.3.13.tgz" integrity sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw== -"@types/semver@^7.5.0": - version "7.5.7" - resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.7.tgz#326f5fdda70d13580777bcaa1bc6fa772a5aef0e" - integrity sha512-/wdoPq1QqkSj9/QOeKkFquEuPzQbHTWAMPH/PaUMB+JuR31lXhlWXRZ52IpfDYVlDOUBvX09uBrPwxGT1hjNBg== - "@types/uuid@^9.0.2": version "9.0.2" resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-9.0.2.tgz#ede1d1b1e451548d44919dc226253e32a6952c4b" @@ -1016,23 +1006,6 @@ resolved "https://registry.npmjs.org/@types/zxcvbn/-/zxcvbn-4.4.1.tgz" integrity sha512-3NoqvZC2W5gAC5DZbTpCeJ251vGQmgcWIHQJGq2J240HY6ErQ9aWKkwfoKJlHLx+A83WPNTZ9+3cd2ILxbvr1w== -"@typescript-eslint/eslint-plugin@7.0.1": - version "7.0.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.0.1.tgz#407daffe09d964d57aceaf3ac51846359fbe61b0" - integrity sha512-OLvgeBv3vXlnnJGIAgCLYKjgMEU+wBGj07MQ/nxAaON+3mLzX7mJbhRYrVGiVvFiXtwFlkcBa/TtmglHy0UbzQ== - dependencies: - "@eslint-community/regexpp" "^4.5.1" - "@typescript-eslint/scope-manager" "7.0.1" - "@typescript-eslint/type-utils" "7.0.1" - "@typescript-eslint/utils" "7.0.1" - "@typescript-eslint/visitor-keys" "7.0.1" - debug "^4.3.4" - graphemer "^1.4.0" - ignore "^5.2.4" - natural-compare "^1.4.0" - semver "^7.5.4" - ts-api-utils "^1.0.1" - "@typescript-eslint/eslint-plugin@^5.43.0": version "5.59.1" resolved "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.59.1.tgz" @@ -1049,17 +1022,6 @@ semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/parser@7.0.1": - version "7.0.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-7.0.1.tgz#e9c61d9a5e32242477d92756d36086dc40322eed" - integrity sha512-8GcRRZNzaHxKzBPU3tKtFNing571/GwPBeCvmAUw0yBtfE2XVd0zFKJIMSWkHJcPQi0ekxjIts6L/rrZq5cxGQ== - dependencies: - "@typescript-eslint/scope-manager" "7.0.1" - "@typescript-eslint/types" "7.0.1" - "@typescript-eslint/typescript-estree" "7.0.1" - "@typescript-eslint/visitor-keys" "7.0.1" - debug "^4.3.4" - "@typescript-eslint/parser@^5.42.0", "@typescript-eslint/parser@^5.59.2": version "5.59.7" resolved "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.59.7.tgz" @@ -1086,14 +1048,6 @@ "@typescript-eslint/types" "5.59.7" "@typescript-eslint/visitor-keys" "5.59.7" -"@typescript-eslint/scope-manager@7.0.1": - version "7.0.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-7.0.1.tgz#611ec8e78c70439b152a805e1b10aaac36de7c00" - integrity sha512-v7/T7As10g3bcWOOPAcbnMDuvctHzCFYCG/8R4bK4iYzdFqsZTbXGln0cZNVcwQcwewsYU2BJLay8j0/4zOk4w== - dependencies: - "@typescript-eslint/types" "7.0.1" - "@typescript-eslint/visitor-keys" "7.0.1" - "@typescript-eslint/type-utils@5.59.1": version "5.59.1" resolved "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.59.1.tgz" @@ -1104,16 +1058,6 @@ debug "^4.3.4" tsutils "^3.21.0" -"@typescript-eslint/type-utils@7.0.1": - version "7.0.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-7.0.1.tgz#0fba92c1f81cad561d7b3adc812aa1cc0e35cdae" - integrity sha512-YtT9UcstTG5Yqy4xtLiClm1ZpM/pWVGFnkAa90UfdkkZsR1eP2mR/1jbHeYp8Ay1l1JHPyGvoUYR6o3On5Nhmw== - dependencies: - "@typescript-eslint/typescript-estree" "7.0.1" - "@typescript-eslint/utils" "7.0.1" - debug "^4.3.4" - ts-api-utils "^1.0.1" - "@typescript-eslint/types@5.59.1": version "5.59.1" resolved "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.59.1.tgz" @@ -1124,11 +1068,6 @@ resolved "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.59.7.tgz" integrity sha512-UnVS2MRRg6p7xOSATscWkKjlf/NDKuqo5TdbWck6rIRZbmKpVNTLALzNvcjIfHBE7736kZOFc/4Z3VcZwuOM/A== -"@typescript-eslint/types@7.0.1": - version "7.0.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-7.0.1.tgz#dcfabce192db5b8bf77ea3c82cfaabe6e6a3c901" - integrity sha512-uJDfmirz4FHib6ENju/7cz9SdMSkeVvJDK3VcMFvf/hAShg8C74FW+06MaQPODHfDJp/z/zHfgawIJRjlu0RLg== - "@typescript-eslint/typescript-estree@5.59.1": version "5.59.1" resolved "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.59.1.tgz" @@ -1155,20 +1094,6 @@ semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/typescript-estree@7.0.1": - version "7.0.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-7.0.1.tgz#1d52ac03da541693fa5bcdc13ad655def5046faf" - integrity sha512-SO9wHb6ph0/FN5OJxH4MiPscGah5wjOd0RRpaLvuBv9g8565Fgu0uMySFEPqwPHiQU90yzJ2FjRYKGrAhS1xig== - dependencies: - "@typescript-eslint/types" "7.0.1" - "@typescript-eslint/visitor-keys" "7.0.1" - debug "^4.3.4" - globby "^11.1.0" - is-glob "^4.0.3" - minimatch "9.0.3" - semver "^7.5.4" - ts-api-utils "^1.0.1" - "@typescript-eslint/utils@5.59.1": version "5.59.1" resolved "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.59.1.tgz" @@ -1183,19 +1108,6 @@ eslint-scope "^5.1.1" semver "^7.3.7" -"@typescript-eslint/utils@7.0.1": - version "7.0.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-7.0.1.tgz#b8ceac0ba5fef362b4a03a33c0e1fedeea3734ed" - integrity sha512-oe4his30JgPbnv+9Vef1h48jm0S6ft4mNwi9wj7bX10joGn07QRfqIqFHoMiajrtoU88cIhXf8ahwgrcbNLgPA== - dependencies: - "@eslint-community/eslint-utils" "^4.4.0" - "@types/json-schema" "^7.0.12" - "@types/semver" "^7.5.0" - "@typescript-eslint/scope-manager" "7.0.1" - "@typescript-eslint/types" "7.0.1" - "@typescript-eslint/typescript-estree" "7.0.1" - semver "^7.5.4" - "@typescript-eslint/visitor-keys@5.59.1": version "5.59.1" resolved "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.59.1.tgz" @@ -1212,14 +1124,6 @@ "@typescript-eslint/types" "5.59.7" eslint-visitor-keys "^3.3.0" -"@typescript-eslint/visitor-keys@7.0.1": - version "7.0.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-7.0.1.tgz#864680ac5a8010ec4814f8a818e57595f79f464e" - integrity sha512-hwAgrOyk++RTXrP4KzCg7zB2U0xt7RUU0ZdMSCsqF3eKUwkdXUMyTb0qdCuji7VIbcpG62kKTU9M1J1c9UpFBw== - dependencies: - "@typescript-eslint/types" "7.0.1" - eslint-visitor-keys "^3.4.1" - "@ungap/structured-clone@^1.2.0": version "1.2.0" resolved "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-1.2.0.tgz#756641adb587851b5ccb3e095daf27ae581c8406" @@ -2858,11 +2762,6 @@ ignore@^5.2.0: resolved "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz" integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ== -ignore@^5.2.4: - version "5.3.1" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.1.tgz#5073e554cd42c5b33b394375f538b8593e34d4ef" - integrity sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw== - immediate@~3.0.5: version "3.0.6" resolved "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz" @@ -3468,13 +3367,6 @@ mimic-fn@^4.0.0: resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-4.0.0.tgz#60a90550d5cb0b239cca65d893b1a53b29871ecc" integrity sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw== -minimatch@9.0.3: - version "9.0.3" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.3.tgz#a6e00c3de44c3a542bfaae70abfc22420a6da825" - integrity sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg== - dependencies: - brace-expansion "^2.0.1" - minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz" @@ -4351,13 +4243,6 @@ semver@^7.3.7: dependencies: lru-cache "^6.0.0" -semver@^7.5.4: - version "7.6.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.0.tgz#1a46a4db4bffcccd97b743b5005c8325f23d4e2d" - integrity sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg== - dependencies: - lru-cache "^6.0.0" - setimmediate@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" @@ -4733,11 +4618,6 @@ truncate-utf8-bytes@^1.0.0: dependencies: utf8-byte-length "^1.0.1" -ts-api-utils@^1.0.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.2.1.tgz#f716c7e027494629485b21c0df6180f4d08f5e8b" - integrity sha512-RIYA36cJn2WiH9Hy77hdF9r7oEwxAtB/TS9/S4Qd90Ap4z5FSiin5zEiTL44OII1Y3IIlEvxwxFUVgrHSZ/UpA== - tsconfig-paths@^3.14.1: version "3.14.1" resolved "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz" @@ -4843,14 +4723,6 @@ typed-array-length@^1.0.4: for-each "^0.3.3" is-typed-array "^1.1.9" -typescript-eslint@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/typescript-eslint/-/typescript-eslint-7.0.1.tgz#b5b960b07f8be39015f3ec8b9ebd4f35679af901" - integrity sha512-aIquOfwHkGHrMSH57HxLT+1Qzp99YtGxEHXMRD+BXOc8fkuFBbA5BXsMYnoVXFuXOWBdXg8U2rN9Xe4p7LrPSQ== - dependencies: - "@typescript-eslint/eslint-plugin" "7.0.1" - "@typescript-eslint/parser" "7.0.1" - typescript@^5.1.3: version "5.1.3" resolved "https://registry.npmjs.org/typescript/-/typescript-5.1.3.tgz" From c1244142422e1b0aaf5502f3c9cac670e191cf3c Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Fri, 16 Feb 2024 15:14:32 +0530 Subject: [PATCH 25/31] Get the typeaware rules working --- package.json | 3 +- packages/utils/.eslintrc.js | 15 +++++ yarn.lock | 124 +++++++++++++++++++++++++++++++++++- 3 files changed, 139 insertions(+), 3 deletions(-) create mode 100644 packages/utils/.eslintrc.js diff --git a/package.json b/package.json index 0b0f49b48..5c7bc4c61 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,8 @@ }, "devDependencies": { "@ente/eslint-config": "*", - "@typescript-eslint/parser": "^5.59.2", + "@typescript-eslint/eslint-plugin": "^7.0.1", + "@typescript-eslint/parser": "^7.0.1", "eslint": "^8.56", "husky": "^7.0.1", "lint-staged": "^13.2.3", diff --git a/packages/utils/.eslintrc.js b/packages/utils/.eslintrc.js new file mode 100644 index 000000000..60e7ac230 --- /dev/null +++ b/packages/utils/.eslintrc.js @@ -0,0 +1,15 @@ +/* eslint-env node */ +module.exports = { + extends: [ + "eslint:recommended", + "plugin:@typescript-eslint/recommended-type-checked", + ], + plugins: ["@typescript-eslint"], + parser: "@typescript-eslint/parser", + parserOptions: { + project: true, + tsconfigRootDir: __dirname, + }, + ignorePatterns: [".eslintrc.js"], + root: true, +}; diff --git a/yarn.lock b/yarn.lock index 982d1ef2f..12794b3d1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -211,7 +211,7 @@ resolved "https://registry.npmjs.org/@emotion/weak-memoize/-/weak-memoize-0.3.0.tgz" integrity sha512-AHPmaAx+RYfZz0eYu6Gviiagpmiyw98ySSlQvCUhVGDRtDFe4DBS0x1bSjdF3gqUDYOczB+yYvBTtEylYSdRhg== -"@eslint-community/eslint-utils@^4.2.0": +"@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0": version "4.4.0" resolved "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz" integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA== @@ -223,7 +223,7 @@ resolved "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.5.0.tgz" integrity sha512-vITaYzIcNmjn5tF5uxcZ/ft7/RXGrMUIS9HalWckEOF6ESiwXKoMzAQf2UW0aVd6rnOeExTJVd5hmWXucBKGXQ== -"@eslint-community/regexpp@^4.6.1": +"@eslint-community/regexpp@^4.5.1", "@eslint-community/regexpp@^4.6.1": version "4.10.0" resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.10.0.tgz#548f6de556857c8bb73bbee70c35dc82a2e74d63" integrity sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA== @@ -783,6 +783,11 @@ resolved "https://registry.npmjs.org/@types/invariant/-/invariant-2.2.35.tgz" integrity sha512-DxX1V9P8zdJPYQat1gHyY0xj3efl8gnMVjiM9iCY6y27lj+PoQWkgjt8jDqmovPqULkKVpKRg8J36iQiA+EtEg== +"@types/json-schema@^7.0.12": + version "7.0.15" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" + integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== + "@types/json-schema@^7.0.9": version "7.0.11" resolved "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz" @@ -976,6 +981,11 @@ resolved "https://registry.npmjs.org/@types/semver/-/semver-7.3.13.tgz" integrity sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw== +"@types/semver@^7.5.0": + version "7.5.7" + resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.7.tgz#326f5fdda70d13580777bcaa1bc6fa772a5aef0e" + integrity sha512-/wdoPq1QqkSj9/QOeKkFquEuPzQbHTWAMPH/PaUMB+JuR31lXhlWXRZ52IpfDYVlDOUBvX09uBrPwxGT1hjNBg== + "@types/uuid@^9.0.2": version "9.0.2" resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-9.0.2.tgz#ede1d1b1e451548d44919dc226253e32a6952c4b" @@ -1022,6 +1032,23 @@ semver "^7.3.7" tsutils "^3.21.0" +"@typescript-eslint/eslint-plugin@^7.0.1": + version "7.0.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.0.1.tgz#407daffe09d964d57aceaf3ac51846359fbe61b0" + integrity sha512-OLvgeBv3vXlnnJGIAgCLYKjgMEU+wBGj07MQ/nxAaON+3mLzX7mJbhRYrVGiVvFiXtwFlkcBa/TtmglHy0UbzQ== + dependencies: + "@eslint-community/regexpp" "^4.5.1" + "@typescript-eslint/scope-manager" "7.0.1" + "@typescript-eslint/type-utils" "7.0.1" + "@typescript-eslint/utils" "7.0.1" + "@typescript-eslint/visitor-keys" "7.0.1" + debug "^4.3.4" + graphemer "^1.4.0" + ignore "^5.2.4" + natural-compare "^1.4.0" + semver "^7.5.4" + ts-api-utils "^1.0.1" + "@typescript-eslint/parser@^5.42.0", "@typescript-eslint/parser@^5.59.2": version "5.59.7" resolved "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.59.7.tgz" @@ -1032,6 +1059,17 @@ "@typescript-eslint/typescript-estree" "5.59.7" debug "^4.3.4" +"@typescript-eslint/parser@^7.0.1": + version "7.0.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-7.0.1.tgz#e9c61d9a5e32242477d92756d36086dc40322eed" + integrity sha512-8GcRRZNzaHxKzBPU3tKtFNing571/GwPBeCvmAUw0yBtfE2XVd0zFKJIMSWkHJcPQi0ekxjIts6L/rrZq5cxGQ== + dependencies: + "@typescript-eslint/scope-manager" "7.0.1" + "@typescript-eslint/types" "7.0.1" + "@typescript-eslint/typescript-estree" "7.0.1" + "@typescript-eslint/visitor-keys" "7.0.1" + debug "^4.3.4" + "@typescript-eslint/scope-manager@5.59.1": version "5.59.1" resolved "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.59.1.tgz" @@ -1048,6 +1086,14 @@ "@typescript-eslint/types" "5.59.7" "@typescript-eslint/visitor-keys" "5.59.7" +"@typescript-eslint/scope-manager@7.0.1": + version "7.0.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-7.0.1.tgz#611ec8e78c70439b152a805e1b10aaac36de7c00" + integrity sha512-v7/T7As10g3bcWOOPAcbnMDuvctHzCFYCG/8R4bK4iYzdFqsZTbXGln0cZNVcwQcwewsYU2BJLay8j0/4zOk4w== + dependencies: + "@typescript-eslint/types" "7.0.1" + "@typescript-eslint/visitor-keys" "7.0.1" + "@typescript-eslint/type-utils@5.59.1": version "5.59.1" resolved "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.59.1.tgz" @@ -1058,6 +1104,16 @@ debug "^4.3.4" tsutils "^3.21.0" +"@typescript-eslint/type-utils@7.0.1": + version "7.0.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-7.0.1.tgz#0fba92c1f81cad561d7b3adc812aa1cc0e35cdae" + integrity sha512-YtT9UcstTG5Yqy4xtLiClm1ZpM/pWVGFnkAa90UfdkkZsR1eP2mR/1jbHeYp8Ay1l1JHPyGvoUYR6o3On5Nhmw== + dependencies: + "@typescript-eslint/typescript-estree" "7.0.1" + "@typescript-eslint/utils" "7.0.1" + debug "^4.3.4" + ts-api-utils "^1.0.1" + "@typescript-eslint/types@5.59.1": version "5.59.1" resolved "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.59.1.tgz" @@ -1068,6 +1124,11 @@ resolved "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.59.7.tgz" integrity sha512-UnVS2MRRg6p7xOSATscWkKjlf/NDKuqo5TdbWck6rIRZbmKpVNTLALzNvcjIfHBE7736kZOFc/4Z3VcZwuOM/A== +"@typescript-eslint/types@7.0.1": + version "7.0.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-7.0.1.tgz#dcfabce192db5b8bf77ea3c82cfaabe6e6a3c901" + integrity sha512-uJDfmirz4FHib6ENju/7cz9SdMSkeVvJDK3VcMFvf/hAShg8C74FW+06MaQPODHfDJp/z/zHfgawIJRjlu0RLg== + "@typescript-eslint/typescript-estree@5.59.1": version "5.59.1" resolved "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.59.1.tgz" @@ -1094,6 +1155,20 @@ semver "^7.3.7" tsutils "^3.21.0" +"@typescript-eslint/typescript-estree@7.0.1": + version "7.0.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-7.0.1.tgz#1d52ac03da541693fa5bcdc13ad655def5046faf" + integrity sha512-SO9wHb6ph0/FN5OJxH4MiPscGah5wjOd0RRpaLvuBv9g8565Fgu0uMySFEPqwPHiQU90yzJ2FjRYKGrAhS1xig== + dependencies: + "@typescript-eslint/types" "7.0.1" + "@typescript-eslint/visitor-keys" "7.0.1" + debug "^4.3.4" + globby "^11.1.0" + is-glob "^4.0.3" + minimatch "9.0.3" + semver "^7.5.4" + ts-api-utils "^1.0.1" + "@typescript-eslint/utils@5.59.1": version "5.59.1" resolved "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.59.1.tgz" @@ -1108,6 +1183,19 @@ eslint-scope "^5.1.1" semver "^7.3.7" +"@typescript-eslint/utils@7.0.1": + version "7.0.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-7.0.1.tgz#b8ceac0ba5fef362b4a03a33c0e1fedeea3734ed" + integrity sha512-oe4his30JgPbnv+9Vef1h48jm0S6ft4mNwi9wj7bX10joGn07QRfqIqFHoMiajrtoU88cIhXf8ahwgrcbNLgPA== + dependencies: + "@eslint-community/eslint-utils" "^4.4.0" + "@types/json-schema" "^7.0.12" + "@types/semver" "^7.5.0" + "@typescript-eslint/scope-manager" "7.0.1" + "@typescript-eslint/types" "7.0.1" + "@typescript-eslint/typescript-estree" "7.0.1" + semver "^7.5.4" + "@typescript-eslint/visitor-keys@5.59.1": version "5.59.1" resolved "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.59.1.tgz" @@ -1124,6 +1212,14 @@ "@typescript-eslint/types" "5.59.7" eslint-visitor-keys "^3.3.0" +"@typescript-eslint/visitor-keys@7.0.1": + version "7.0.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-7.0.1.tgz#864680ac5a8010ec4814f8a818e57595f79f464e" + integrity sha512-hwAgrOyk++RTXrP4KzCg7zB2U0xt7RUU0ZdMSCsqF3eKUwkdXUMyTb0qdCuji7VIbcpG62kKTU9M1J1c9UpFBw== + dependencies: + "@typescript-eslint/types" "7.0.1" + eslint-visitor-keys "^3.4.1" + "@ungap/structured-clone@^1.2.0": version "1.2.0" resolved "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-1.2.0.tgz#756641adb587851b5ccb3e095daf27ae581c8406" @@ -2762,6 +2858,11 @@ ignore@^5.2.0: resolved "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz" integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ== +ignore@^5.2.4: + version "5.3.1" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.1.tgz#5073e554cd42c5b33b394375f538b8593e34d4ef" + integrity sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw== + immediate@~3.0.5: version "3.0.6" resolved "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz" @@ -3367,6 +3468,13 @@ mimic-fn@^4.0.0: resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-4.0.0.tgz#60a90550d5cb0b239cca65d893b1a53b29871ecc" integrity sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw== +minimatch@9.0.3: + version "9.0.3" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.3.tgz#a6e00c3de44c3a542bfaae70abfc22420a6da825" + integrity sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg== + dependencies: + brace-expansion "^2.0.1" + minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz" @@ -4243,6 +4351,13 @@ semver@^7.3.7: dependencies: lru-cache "^6.0.0" +semver@^7.5.4: + version "7.6.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.0.tgz#1a46a4db4bffcccd97b743b5005c8325f23d4e2d" + integrity sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg== + dependencies: + lru-cache "^6.0.0" + setimmediate@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" @@ -4618,6 +4733,11 @@ truncate-utf8-bytes@^1.0.0: dependencies: utf8-byte-length "^1.0.1" +ts-api-utils@^1.0.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.2.1.tgz#f716c7e027494629485b21c0df6180f4d08f5e8b" + integrity sha512-RIYA36cJn2WiH9Hy77hdF9r7oEwxAtB/TS9/S4Qd90Ap4z5FSiin5zEiTL44OII1Y3IIlEvxwxFUVgrHSZ/UpA== + tsconfig-paths@^3.14.1: version "3.14.1" resolved "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz" From 82fbe55e5a6b3707b82a544207665a23017ab32d Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Fri, 16 Feb 2024 15:25:18 +0530 Subject: [PATCH 26/31] Remove debugging package --- apps/photos/package.json | 1 - apps/photos/src/pages/_app.tsx | 1 - package.json | 2 +- packages/shared/next/next.config.base.js | 1 - packages/ui/package.json | 15 --------------- packages/ui/src/card.tsx | 14 -------------- packages/ui/src/hello.ts | 2 -- packages/ui/tsconfig.json | 23 ----------------------- packages/utils/package.json | 3 +++ 9 files changed, 4 insertions(+), 58 deletions(-) delete mode 100644 packages/ui/package.json delete mode 100644 packages/ui/src/card.tsx delete mode 100644 packages/ui/src/hello.ts delete mode 100644 packages/ui/tsconfig.json diff --git a/apps/photos/package.json b/apps/photos/package.json index dcfa5ff42..653824296 100644 --- a/apps/photos/package.json +++ b/apps/photos/package.json @@ -13,7 +13,6 @@ "@/utils": "*", "@date-io/date-fns": "^2.14.0", "@mui/x-date-pickers": "^5.0.0-alpha.6", - "@repo/ui": "*", "@sentry/nextjs": "^7.77.0", "@stripe/stripe-js": "^1.13.2", "@tensorflow-models/coco-ssd": "^2.2.2", diff --git a/apps/photos/src/pages/_app.tsx b/apps/photos/src/pages/_app.tsx index acd30e17a..3b2745237 100644 --- a/apps/photos/src/pages/_app.tsx +++ b/apps/photos/src/pages/_app.tsx @@ -81,7 +81,6 @@ import { AppUpdateInfo } from '@ente/shared/electron/types'; import DownloadManager from 'services/download'; import { sayHello } from '@/utils/hello'; import { Card } from '@/utils/components/Card'; -// import { sayHello } from '@repo/ui/hello'; const redirectMap = new Map([ [REDIRECTS.ROADMAP, getRoadmapRedirectURL], diff --git a/package.json b/package.json index 5c7bc4c61..4e980f5e1 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "albums": "turbo run albums", "prepare": "husky install", "photos:dev": "TURBO_NO_UPDATE_NOTIFIER=true turbo run dev --filter=photos", - "lint-x": "prettier --check ." + "lint-x": "yarn prettier --check . && yarn workspaces run eslint ." }, "dependencies": { "@emotion/react": "11.10.6", diff --git a/packages/shared/next/next.config.base.js b/packages/shared/next/next.config.base.js index 1c2216667..5c7c212ba 100644 --- a/packages/shared/next/next.config.base.js +++ b/packages/shared/next/next.config.base.js @@ -36,7 +36,6 @@ const nextConfig = { }, }, transpilePackages: [ - '@repo/ui', '@/utils', '@mui/material', '@mui/system', diff --git a/packages/ui/package.json b/packages/ui/package.json deleted file mode 100644 index 423bf6c24..000000000 --- a/packages/ui/package.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "name": "@repo/ui", - "version": "0.0.0", - "private": true, - "exports": { - "./hello": "./src/hello.ts", - "./card": "./src/card.tsx" - }, - "devDependencies": { - "@types/react": "^18.2.46", - "@types/react-dom": "^18.2.18", - "react": "^18.2.0", - "typescript": "^5.3.3" - } -} diff --git a/packages/ui/src/card.tsx b/packages/ui/src/card.tsx deleted file mode 100644 index d9760148d..000000000 --- a/packages/ui/src/card.tsx +++ /dev/null @@ -1,14 +0,0 @@ -/** Test comment */ -export function Card({ - href, - children, -}: { - href: string; - children: React.ReactNode; -}): JSX.Element { - return ( - -

{children}

-
- ); -} diff --git a/packages/ui/src/hello.ts b/packages/ui/src/hello.ts deleted file mode 100644 index 803501816..000000000 --- a/packages/ui/src/hello.ts +++ /dev/null @@ -1,2 +0,0 @@ -/** Howdy! */ -export const sayHello = () => console.log("Hello, world"); diff --git a/packages/ui/tsconfig.json b/packages/ui/tsconfig.json deleted file mode 100644 index cabd12f4a..000000000 --- a/packages/ui/tsconfig.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "compilerOptions": { - "declaration": true, - "declarationMap": true, - "esModuleInterop": true, - "incremental": false, - "isolatedModules": true, - "lib": ["es2022", "DOM", "DOM.Iterable"], - "module": "NodeNext", - "moduleDetection": "force", - "moduleResolution": "NodeNext", - "noUncheckedIndexedAccess": true, - "resolveJsonModule": true, - "skipLibCheck": true, - "strict": true, - "target": "ES2022", - "jsx": "preserve", - - "outDir": "dist" - }, - "include": ["src"], - "exclude": ["node_modules", "dist"] -} diff --git a/packages/utils/package.json b/packages/utils/package.json index 3015b3295..1b01527e0 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -5,5 +5,8 @@ "exports": { "./components/*": "./src/components/*.tsx", "./*": "./src/*.ts" + }, + "scripts": { + "lint": "eslint --debug " } } From 779d3b4e8a0a59052dd8ae3520e09f19561bd9ba Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Fri, 16 Feb 2024 16:18:17 +0530 Subject: [PATCH 27/31] Update yarn.lock after rebasing from main --- yarn.lock | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/yarn.lock b/yarn.lock index 12794b3d1..262a5a04a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -886,13 +886,6 @@ dependencies: "@types/react" "*" -"@types/react-dom@^18.2.18": - version "18.2.19" - resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-18.2.19.tgz#b84b7c30c635a6c26c6a6dfbb599b2da9788be58" - integrity sha512-aZvQL6uUbIJpjZk4U8JZGbau9KDeAwMfmhyWorxgBkqDIEf6ROjRozcmPIicqsUwPUjbkDfHKgGee1Lq65APcA== - dependencies: - "@types/react" "*" - "@types/react-is@^16.7.1 || ^17.0.0": version "17.0.3" resolved "https://registry.npmjs.org/@types/react-is/-/react-is-17.0.3.tgz" @@ -957,15 +950,6 @@ "@types/scheduler" "*" csstype "^3.0.2" -"@types/react@^18.2.46": - version "18.2.55" - resolved "https://registry.yarnpkg.com/@types/react/-/react-18.2.55.tgz#38141821b7084404b5013742bc4ae08e44da7a67" - integrity sha512-Y2Tz5P4yz23brwm2d7jNon39qoAtMMmalOQv6+fEFt1mT+FcM3D841wDpoUvFXhaYenuROCy3FZYqdTjM7qVyA== - dependencies: - "@types/prop-types" "*" - "@types/scheduler" "*" - csstype "^3.0.2" - "@types/scheduler@*": version "0.16.2" resolved "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz" @@ -4138,7 +4122,7 @@ react-window@^1.8.6: "@babel/runtime" "^7.0.0" memoize-one ">=3.1.1 <6" -react@18.2.0, react@^18.2.0: +react@18.2.0: version "18.2.0" resolved "https://registry.yarnpkg.com/react/-/react-18.2.0.tgz#555bd98592883255fa00de14f1151a917b5d77d5" integrity sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ== @@ -4848,11 +4832,6 @@ typescript@^5.1.3: resolved "https://registry.npmjs.org/typescript/-/typescript-5.1.3.tgz" integrity sha512-XH627E9vkeqhlZFQuL+UsyAXEnibT0kWR2FWONlr4sTjvxyJYnyefgrkyECLzM5NenmKzRAy2rR/OlYLA1HkZw== -typescript@^5.3.3: - version "5.3.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.3.3.tgz#b3ce6ba258e72e6305ba66f5c9b452aaee3ffe37" - integrity sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw== - unbox-primitive@^1.0.2: version "1.0.2" resolved "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz" From 97ff657ba6ea70b8db9b6a298eae3ee77b2db7a3 Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Fri, 16 Feb 2024 16:20:16 +0530 Subject: [PATCH 28/31] Add a lint-fix command --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 4e980f5e1..4d94e1961 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,8 @@ "albums": "turbo run albums", "prepare": "husky install", "photos:dev": "TURBO_NO_UPDATE_NOTIFIER=true turbo run dev --filter=photos", - "lint-x": "yarn prettier --check . && yarn workspaces run eslint ." + "lint-x": "yarn prettier --check . && yarn workspaces run eslint .", + "lint-fix": "yarn prettier --write . && yarn workspaces run eslint --fix ." }, "dependencies": { "@emotion/react": "11.10.6", From a99903e3e9d5c48c43665feabac12751b4d68d33 Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Fri, 16 Feb 2024 21:29:29 +0530 Subject: [PATCH 29/31] next export is deprecated in Next 14 --- package.json | 28 ++++++++++-------------- packages/shared/next/next.config.base.js | 2 ++ scripts/deploy.sh | 6 ++--- 3 files changed, 16 insertions(+), 20 deletions(-) diff --git a/package.json b/package.json index 4d94e1961..0e88e4bd8 100644 --- a/package.json +++ b/package.json @@ -1,29 +1,23 @@ { "name": "ente-web", - "version": "1.0.0", + "version": "0.0.0", "private": true, "workspaces": [ - "packages/*", - "apps/*" + "apps/*", + "packages/*" ], "scripts": { - "build:photos": "turbo run build --filter=photos", - "build:auth": "turbo run build --filter=auth", - "build:cast": "turbo run build --filter=cast", - "build:accounts": "turbo run build --filter=accounts", - "dev:auth": "turbo run dev --filter=auth", - "dev:photos": "turbo run dev --filter=photos", - "dev:accounts": "turbo run dev --filter=accounts", - "dev:web": "turbo run dev --filter=web", - "dev:cast": "turbo run dev --filter=cast", - "export:photos": "turbo run export --filter=photos", - "export:auth": "turbo run export --filter=auth", - "export:cast": "turbo run export --filter=cast", - "export:accounts": "turbo run export --filter=accounts", + "build:accounts": "TURBO_NO_UPDATE_NOTIFIER=true turbo run build --filter=accounts", + "build:auth": "TURBO_NO_UPDATE_NOTIFIER=true turbo run build --filter=auth", + "build:cast": "TURBO_NO_UPDATE_NOTIFIER=true turbo run build --filter=cast", + "build:photos": "TURBO_NO_UPDATE_NOTIFIER=true turbo run build --filter=photos", + "dev:accounts": "TURBO_NO_UPDATE_NOTIFIER=true turbo run dev --filter=accounts", + "dev:auth": "TURBO_NO_UPDATE_NOTIFIER=true turbo run dev --filter=auth", + "dev:cast": "TURBO_NO_UPDATE_NOTIFIER=true turbo run dev --filter=cast", + "dev:photos": "TURBO_NO_UPDATE_NOTIFIER=true turbo run dev --filter=photos", "lint": "turbo run lint", "albums": "turbo run albums", "prepare": "husky install", - "photos:dev": "TURBO_NO_UPDATE_NOTIFIER=true turbo run dev --filter=photos", "lint-x": "yarn prettier --check . && yarn workspaces run eslint .", "lint-fix": "yarn prettier --write . && yarn workspaces run eslint --fix ." }, diff --git a/packages/shared/next/next.config.base.js b/packages/shared/next/next.config.base.js index 5c7c212ba..cabf4929d 100644 --- a/packages/shared/next/next.config.base.js +++ b/packages/shared/next/next.config.base.js @@ -17,6 +17,8 @@ const gitSHA = cp.execSync('git rev-parse --short HEAD', { }); const nextConfig = { + /* generate a static export when we run `next build` */ + output: 'export', compiler: { emotion: { importMap: { diff --git a/scripts/deploy.sh b/scripts/deploy.sh index 90facb1e7..38883a63b 100755 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -17,15 +17,15 @@ rm -rf out case "$CF_PAGES_BRANCH" in accounts-*) - yarn export:accounts + yarn build:accounts cp -R apps/accounts/out . ;; auth-*) - yarn export:auth + yarn build:auth cp -R apps/auth/out . ;; *) - yarn export:photos + yarn build:photos cp -R apps/photos/out . ;; esac From 242bb5a89071526be65db14d12fbb37079351755 Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Fri, 16 Feb 2024 21:58:42 +0530 Subject: [PATCH 30/31] Remove debugging code --- apps/photos/src/pages/_app.tsx | 4 ---- 1 file changed, 4 deletions(-) diff --git a/apps/photos/src/pages/_app.tsx b/apps/photos/src/pages/_app.tsx index 3b2745237..7c9b09b95 100644 --- a/apps/photos/src/pages/_app.tsx +++ b/apps/photos/src/pages/_app.tsx @@ -79,8 +79,6 @@ import { PHOTOS_PAGES as PAGES } from '@ente/shared/constants/pages'; import { getTheme } from '@ente/shared/themes'; import { AppUpdateInfo } from '@ente/shared/electron/types'; import DownloadManager from 'services/download'; -import { sayHello } from '@/utils/hello'; -import { Card } from '@/utils/components/Card'; const redirectMap = new Map([ [REDIRECTS.ROADMAP, getRoadmapRedirectURL], @@ -172,7 +170,6 @@ export default function App(props: EnteAppProps) { // setup logging clearLogsIfLocalStorageLimitExceeded(); logStartupMessage(); - sayHello(); }, []); useEffect(() => { @@ -412,7 +409,6 @@ export default function App(props: EnteAppProps) { - {showNavbar && } {offline && t('OFFLINE_MSG')} From 5b673167209a7d785bd84f78ccf30f67760b62f5 Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Fri, 16 Feb 2024 22:05:15 +0530 Subject: [PATCH 31/31] Update docs Ref: https://www.joshuakgoldberg.com/blog/configuring-eslint-prettier-and-typescript-together/ --- docs/Dependencies.md | 6 +----- docs/README.md | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/docs/Dependencies.md b/docs/Dependencies.md index 54bb12c6a..ba34c3292 100644 --- a/docs/Dependencies.md +++ b/docs/Dependencies.md @@ -12,9 +12,5 @@ baseline for how our code be in all the workspaces in the monorepo. They also need some support packages: * "@typescript-eslint/parser" - Tells ESLint how to read TypeScript syntax +* "@typescript-eslint/eslint-plugin" - Provides TypeScript rules and presets - TODO(MR): This is no longer needed with the new flat format. - -* "typescript-eslint" - TypeScript support for ESLint - - TODO(MR): Move this to the top level package.json diff --git a/docs/README.md b/docs/README.md index 756f0bdcd..4c4fa1a07 100644 --- a/docs/README.md +++ b/docs/README.md @@ -3,7 +3,7 @@ If you just want to run ente locally or develop on it, you can do yarn - yarn photos:dev + yarn dev:photos The notes in this directory are for maintainers to note down more advanced or infrequently needed details.