Forráskód Böngészése

Remove all dependencies from the top level package.json

Manav Rathi 1 éve
szülő
commit
8d571a0f52

+ 5 - 6
apps/accounts/package.json

@@ -2,14 +2,13 @@
     "name": "accounts",
     "version": "0.0.0",
     "private": true,
-    "scripts": {
-        "dev": "next dev",
-        "build": "next build"
+    "dependencies": {
+        "@/next": "*",
+        "@ente/accounts": "*",
+        "@ente/shared": "*"
     },
-    "dependencies": {},
     "devDependencies": {
         "@types/node": "^14.6.4",
         "@types/react": "^18"
-    },
-    "types": "src/index.ts"
+    }
 }

+ 4 - 3
apps/auth/package.json

@@ -2,8 +2,9 @@
     "name": "auth",
     "version": "0.0.0",
     "private": true,
-    "scripts": {
-        "dev": "next dev",
-        "build": "next build"
+    "dependencies": {
+        "@/next": "*",
+        "@ente/accounts": "*",
+        "@ente/shared": "*"
     }
 }

+ 5 - 6
apps/cast/package.json

@@ -2,13 +2,12 @@
     "name": "cast",
     "version": "0.0.0",
     "private": true,
-    "scripts": {
-        "dev": "next dev",
-        "build": "next build"
-    },
     "dependencies": {
-        "mime-types": "^2.1.35",
-        "jszip": "3.10.1"
+        "@/next": "*",
+        "@ente/accounts": "*",
+        "@ente/shared": "*",
+        "jszip": "3.10.1",
+        "mime-types": "^2.1.35"
     },
     "devDependencies": {
         "sass": "^1.69.5"

+ 3 - 2
apps/photos/package.json

@@ -3,9 +3,10 @@
     "version": "0.0.0",
     "private": true,
     "dependencies": {
-        "@/ui": "*",
-        "@/utils": "*",
+        "@/next": "*",
         "@date-io/date-fns": "^2.14.0",
+        "@ente/accounts": "*",
+        "@ente/shared": "*",
         "@mui/x-date-pickers": "^5.0.0-alpha.6",
         "@stripe/stripe-js": "^1.13.2",
         "@tensorflow-models/coco-ssd": "^2.2.2",

+ 1 - 5
package.json

@@ -21,11 +21,7 @@
         "lint": "yarn prettier --check . && yarn workspaces run eslint .",
         "lint-fix": "yarn prettier --write . && yarn workspaces run eslint --fix ."
     },
-    "dependencies": {
-        "@ente/accounts": "*",
-        "@ente/shared": "*",
-        "next": "^14.1"
-    },
+    "dependencies": {},
     "devDependencies": {
         "@ente/eslint-config": "*",
         "@typescript-eslint/eslint-plugin": "^7",

+ 4 - 1
packages/accounts/package.json

@@ -6,6 +6,9 @@
         "lint": "eslint .",
         "build": "yarn lint && tsc"
     },
-    "dependencies": {},
+    "dependencies": {
+        "@/next": "*",
+        "@ente/shared": "*"
+    },
     "devDependencies": {}
 }

+ 6 - 0
packages/next/.eslintrc.js

@@ -0,0 +1,6 @@
+module.exports = {
+    extends: ["@/build-config/eslintrc-typescript"],
+    parserOptions: {
+        tsconfigRootDir: __dirname,
+    },
+};

+ 3 - 0
packages/next/.prettierrc.json

@@ -0,0 +1,3 @@
+{
+    "tabWidth": 4
+}

+ 8 - 0
packages/next/README.md

@@ -0,0 +1,8 @@
+## @/next
+
+Like [@/ui](../ui/README.md), but for things that require Next.
+
+### Packaging
+
+This (internal) package exports a React TypeScript library. We rely on the
+importing project to transpile and bundle it.

+ 0 - 0
packages/ui/hello.ts → packages/next/hello.ts


+ 12 - 0
packages/next/package.json

@@ -0,0 +1,12 @@
+{
+    "name": "@/next",
+    "version": "0.0.0",
+    "private": true,
+    "devDependencies": {
+        "@/build-config": "*"
+    },
+    "dependencies": {
+        "@/ui": "*",
+        "next": "^14.1"
+    }
+}

+ 5 - 0
packages/next/tsconfig.json

@@ -0,0 +1,5 @@
+{
+    "extends": "@/build-config/tsconfig.transpile.json",
+    /* Typecheck all files with the given extensions (here or in subfolders) */
+    "include": ["**/*.ts", "**/*.tsx"]
+}

+ 1 - 0
packages/shared/next/next.config.base.js

@@ -33,6 +33,7 @@ const nextConfig = {
         emotion: true,
     },
     transpilePackages: [
+        '@/next',
         '@/ui',
         '@/utils',
         '@mui/material',

+ 1 - 2
packages/shared/package.json

@@ -3,8 +3,7 @@
     "version": "0.0.0",
     "private": true,
     "dependencies": {
-        "@/ui": "*",
-        "@/utils": "*",
+        "@/next": "*",
         "@sentry/nextjs": "7.77.0",
         "axios": "^1.6.7"
     }

+ 6 - 6
packages/ui/package.json

@@ -2,20 +2,20 @@
     "name": "@/ui",
     "version": "0.0.0",
     "private": true,
-    "devDependencies": {
-        "@/build-config": "*"
-    },
     "dependencies": {
         "@emotion/react": "^11.11",
         "@emotion/server": "^11.11",
         "@emotion/styled": "^11.11",
         "@mui/icons-material": "^5.15",
         "@mui/material": "^5.15",
-        "get-user-locale": "^2.3.1",
-        "i18next": "^23.10.0",
-        "i18next-http-backend": "^2.5.0",
+        "get-user-locale": "^2.3",
+        "i18next": "^23.10",
+        "i18next-http-backend": "^2.5",
         "react": "18.2.0",
         "react-dom": "18.2.0",
         "react-i18next": "^14"
+    },
+    "devDependencies": {
+        "@/build-config": "*"
     }
 }

+ 4 - 4
packages/utils/package.json

@@ -2,12 +2,12 @@
     "name": "@/utils",
     "version": "0.0.0",
     "private": true,
+    "dependencies": {
+        "is-electron": "^2.2",
+        "libsodium-wrappers": "0.7.9"
+    },
     "devDependencies": {
         "@/build-config": "*",
         "@types/libsodium-wrappers": "0.7.9"
-    },
-    "dependencies": {
-        "is-electron": "^2.2.2",
-        "libsodium-wrappers": "0.7.9"
     }
 }

+ 6 - 6
yarn.lock

@@ -579,7 +579,7 @@
     "@sentry/types" "7.77.0"
     "@sentry/utils" "7.77.0"
 
-"@sentry/cli@1.75.0", "@sentry/cli@^1.74.6":
+"@sentry/cli@^1.74.6":
   version "1.75.0"
   resolved "https://registry.yarnpkg.com/@sentry/cli/-/cli-1.75.0.tgz#4a5e71b5619cd4e9e6238cc77857c66f6b38d86a"
   integrity sha512-vT8NurHy00GcN8dNqur4CMIYvFH3PaKdkX3qllVvi4syybKqjwoz+aWRCvprbYv0knweneFkLt1SmBWqazUMfA==
@@ -2322,7 +2322,7 @@ get-tsconfig@^4.5.0:
   dependencies:
     resolve-pkg-maps "^1.0.0"
 
-get-user-locale@^2.3.1:
+get-user-locale@^2.3:
   version "2.3.1"
   resolved "https://registry.yarnpkg.com/get-user-locale/-/get-user-locale-2.3.1.tgz#fc7319429c8a70fac01b3b2a0b08b0c71c1d3fe2"
   integrity sha512-VEvcsqKYx7zhZYC1CjecrDC5ziPSpl1gSm0qFFJhHSGDrSC+x4+p1KojWC/83QX//j476gFhkVXP/kNUc9q+bQ==
@@ -2535,14 +2535,14 @@ https-proxy-agent@^5.0.0:
     agent-base "6"
     debug "4"
 
-i18next-http-backend@^2.5.0:
+i18next-http-backend@^2.5:
   version "2.5.0"
   resolved "https://registry.yarnpkg.com/i18next-http-backend/-/i18next-http-backend-2.5.0.tgz#8396a7df30bfe722eff7a65f629df32a61720414"
   integrity sha512-Z/aQsGZk1gSxt2/DztXk92DuDD20J+rNudT7ZCdTrNOiK8uQppfvdjq9+DFQfpAnFPn3VZS+KQIr1S/W1KxhpQ==
   dependencies:
     cross-fetch "4.0.0"
 
-i18next@^23.10.0:
+i18next@^23.10:
   version "23.10.0"
   resolved "https://registry.yarnpkg.com/i18next/-/i18next-23.10.0.tgz#fb328794ae692e6fdde0564259e421f4203c4a2c"
   integrity sha512-/TgHOqsa7/9abUKJjdPeydoyDc0oTi/7u9F8lMSj6ufg4cbC1Oj3f/Jja7zj7WRIhEQKB7Q4eN6y68I9RDxxGQ==
@@ -2682,7 +2682,7 @@ is-date-object@^1.0.1, is-date-object@^1.0.5:
   dependencies:
     has-tostringtag "^1.0.0"
 
-is-electron@^2.2.2:
+is-electron@^2.2:
   version "2.2.2"
   resolved "https://registry.yarnpkg.com/is-electron/-/is-electron-2.2.2.tgz#3778902a2044d76de98036f5dc58089ac4d80bb9"
   integrity sha512-FO/Rhvz5tuw4MCWkpMzHFKWD2LsfHzIb7i6MdPYZ/KW7AlxawyLkqdy+jPZP1WubqEADE3O4FUENlJHDfQASRg==
@@ -2986,7 +2986,7 @@ libsodium-wrappers@0.7.9:
   dependencies:
     libsodium "^0.7.0"
 
-libsodium@0.7.9, libsodium@^0.7.0:
+libsodium@^0.7.0:
   version "0.7.9"
   resolved "https://registry.yarnpkg.com/libsodium/-/libsodium-0.7.9.tgz#4bb7bcbf662ddd920d8795c227ae25bbbfa3821b"
   integrity sha512-gfeADtR4D/CM0oRUviKBViMGXZDgnFdMKMzHsvBdqLBHd9ySi6EtYnmuhHVDDYgYpAO8eU8hEY+F8vIUAPh08A==