Commit graph

343 commits

Author SHA1 Message Date
Manav Rathi
e15c7e1642 Move into web/ 2024-03-01 12:21:07 +05:30
Manav Rathi
d15deb1cb0 Document NODE_VERSION 2024-02-24 17:01:25 +05:30
Manav Rathi
e72e7e2f3a Omit patch numbers 2024-02-24 16:40:19 +05:30
Manav Rathi
990e51a904 Move down react dependencies 2024-02-24 16:35:37 +05:30
Manav Rathi
8f5b462736 Add eslint-plugin-react-hooks 2024-02-24 15:13:57 +05:30
Manav Rathi
5b74c81c6c Remove unnecessary scripts section 2024-02-24 15:10:48 +05:30
Manav Rathi
7a6ff68eb1 prettier-plugin-packagejson 2024-02-24 14:48:48 +05:30
Manav Rathi
8dac7e4940 Lint React imports
Refs:
https://github.com/jsx-eslint/eslint-plugin-react/issues/2628
https://github.com/gonstoll/eslint-plugin-react-namespace-import
2024-02-24 14:29:32 +05:30
Manav Rathi
e54fe2b15c Move dev dependency down 2024-02-24 11:12:42 +05:30
Manav Rathi
0d70e8d103 Update yarn (whilst satisfying package.lock) 2024-02-24 11:09:54 +05:30
Manav Rathi
1689c1ce7a Add prettier-plugin-organize-imports
https://github.com/simonhaenisch/prettier-plugin-organize-imports
2024-02-24 11:08:12 +05:30
Manav Rathi
c81ecd1ec1 WIP Handle migration 2024-02-24 08:56:23 +05:30
Manav Rathi
8d571a0f52 Remove all dependencies from the top level package.json 2024-02-23 18:19:11 +05:30
Manav Rathi
bc74951a99 Move axios to shared 2024-02-23 17:03:35 +05:30
Manav Rathi
adb2c50a4a Match the libsodium version that was previously resolved
The @types package uses a caret import which is bringing a newer libsodium with
it, so add an explicit override to pin it to the version that we want.
2024-02-23 11:58:23 +05:30
Manav Rathi
316e18ceaa Try pinning to 0.7.8
We're getting `sodium.crypto_pwhash_SALTBYTES` as undefined.

https://github.com/jedisct1/libsodium.js/issues/326
2024-02-23 11:49:37 +05:30
Manav Rathi
6b5e3c6a5e Pin libsodium to previously used version "libsodium-wrappers": "0.7.9",
The latest one is causing password generation issues (e.g. when creating an account):

 TypeError: length cannot be null or undefined
    at f (webpack-internal:///../../node_modules/libsodium-wrappers/dist/modules/libsodium-wrappers.js:1:18896)
    at m (webpack-internal:///../../node_modules/libsodium-wrappers/dist/modules/libsodium-wrappers.js:1:18940)
    at Object.Lt [as randombytes_buf] (webpack-internal:///../../node_modules/libsodium-wrappers/dist/modules/libsodium-wrappers.js:1:93208)
    at Module.generateSaltToDeriveKey (webpack-internal:///../../packages/shared/crypto/internal/libsodium.ts:261:82)

We can investigate them and fix them in a subsequent PR, for now it is more
prudent to stick with the version that we've been using and upgrade more
carefully.
2024-02-23 11:24:10 +05:30
Manav Rathi
1b6f020b23 Move to new enum 2024-02-23 10:57:27 +05:30
Manav Rathi
7441883a9c Move the UI dependencies down to the ui package from the top level 2024-02-22 21:52:08 +05:30
Manav Rathi
6018806e23 Move isDevBuild to new package 2024-02-22 20:15:43 +05:30
Manav Rathi
6e0606e5fc Remove another unused library 2024-02-22 15:15:07 +05:30
Manav Rathi
53d04dcf9c Remove unused package next-transpile-modules
yarn workspace photos remove next-transpile-modules
2024-02-22 15:07:25 +05:30
Manav Rathi
35d7f7dff8 Repin sentry cli version to workaround bug when using SENTRY_AUTH_TOKEN 2024-02-22 14:54:14 +05:30
Manav Rathi
a21836c3b9 Pin zip.js version to not deal with type errors
This code might anyways be replaced by ONNX
2024-02-22 13:06:00 +05:30
Manav Rathi
0cbc5144a0 Pin tflite to fix build errors 2024-02-22 13:00:23 +05:30
Manav Rathi
46720e8fcd Update mui 2024-02-22 12:17:27 +05:30
Manav Rathi
bac4601ccb Update types to match our React version 2024-02-22 12:14:19 +05:30
Manav Rathi
cfa630a620 Update to latest emotion
yarn upgrade "@emotion/react" "@emotion/server" "@emotion/styled" --latest

This is to pull in the bugfix for this issue:
https://github.com/emotion-js/emotion/issues/3049
2024-02-22 12:09:56 +05:30
Manav Rathi
f1cf014004 Update to Prettier 3 2024-02-22 11:41:13 +05:30
Manav Rathi
c9bb6d443b Fix yarn workspace photos add foo
This was likely happening because the package versions in the top level
package.json and the eslint-config package.json were different. I've synced them
for now.

> On a longer time frame, the idea is not have such conflicting cases, and
remove mostly all the top level package.json dependencies and for the rest rely
on them solely being in the top level package.json and not duplicated in two
places.
2024-02-21 21:12:11 +05:30
Manav Rathi
8fbe5fa323 Remove husky 2024-02-17 12:52:18 +05:30
Manav Rathi
64d5834b6a Remove Turbo
- yarn classic workspaces already do what we need

- The main benefit of turbo, the cache, is already disabled on dev builds. On
  production builds, turbo doesn't support `next build` (this is mentioned in
  Vercel's docs).

- We're not using their remote cache

- Maybe there is a monorepo size when the yarn workspace approach gets
  unwieldly, but I feel we're not near that point.

Will bring it back if it gets missed.
2024-02-17 09:21:25 +05:30
Manav Rathi
779d3b4e8a Update yarn.lock after rebasing from main 2024-02-16 20:48:26 +05:30
Manav Rathi
c124414242 Get the typeaware rules working 2024-02-16 20:48:26 +05:30
Manav Rathi
9bb2fbb6e1 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.
2024-02-16 20:48:26 +05:30
Manav Rathi
f6e31f0987 Update to a newer eslint 2024-02-16 20:48:26 +05:30
Manav Rathi
a9a810ab99 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
2024-02-16 20:48:26 +05:30
Manav Rathi
0c7beceece 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)
2024-02-16 20:47:25 +05:30
Manav Rathi
2e926ed60f 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.
2024-02-16 20:47:25 +05:30
Manav Rathi
c87aca72ad 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.
2024-02-16 20:47:25 +05:30
Neeraj Gupta
de163b79db
Merge branch 'main' into cast 2024-02-13 09:35:00 +05:30
Manav Rathi
b4946693f8 Remove unused workbox-* dependencies
yarn workspace photos remove workbox-precaching workbox-recipes workbox-routing workbox-strategies workbox-window
2024-02-08 14:46:26 +05:30
Neeraj Gupta
6572314657 Add yarn.lock 2024-01-30 12:00:10 +05:30
Abhinav
dc57d4509e update yarn lock 2024-01-30 10:52:48 +05:30
Neeraj Gupta
36cad03c71 Merge branch 'main' into cast 2024-01-29 11:09:58 +05:30
dependabot[bot]
9afd108812
Bump follow-redirects from 1.15.2 to 1.15.4
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.2 to 1.15.4.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.2...v1.15.4)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-10 21:51:56 +00:00
Abhinav
4501c719d7 Merge branch 'main' into cast 2024-01-08 12:07:37 +05:30
httpjamesm
a26ad05fac
fix: next font dep 2024-01-06 23:11:35 -05:00
Abhinav
c847865e75 update yarn lock 2023-11-29 12:51:57 +05:30
Abhinav
822c8dbdd5 replace debounce package 2023-11-29 11:51:05 +05:30