Commit graph

9800 commits

Author SHA1 Message Date
Manav Rathi e15c7e1642 Move into web/ 2024-03-01 12:21:07 +05:30
Manav Rathi b3193968e7
Packaging related cleanup (#1657) 2024-02-24 20:07:19 +05:30
Manav Rathi 0f800a8011 Update NODE_VERSION 20.10.0 -> 20.11.1 2024-02-24 17:05:49 +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 666cd002c7 Split react and non-react lints 2024-02-24 15:26:47 +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 8b1d33e83d
Switch to prettier defaults (#1656) 2024-02-24 14:16:19 +05:30
Manav Rathi c1bf193211 Switch to prettier defaults
This is unfortunately a huge diff, but now is as good as ever to do this pending chore.

- Move to prettier (v3) defaults. The only thing we tweak is the tabWidth (the
  default is 2, we change it to 4).

- Use the prettier plugin to sort imports.

We were not changing the defaults of prettier much anyway, the main thing that
has changed is the switching from the overridden single quotes to the default
double quotes.
2024-02-24 14:03:53 +05:30
Manav Rathi 0b8d9fafee
Add prettier-plugin-organize-imports (#1655) 2024-02-24 12:32:58 +05:30
Manav Rathi 2d5555441a Document the yarn workspace (classic) bug
I think that's what's happening in the pattern I've seen, but not sure.
2024-02-24 11:21:37 +05:30
Manav Rathi bd24f6a84e Move eslint plugins down into build-config 2024-02-24 11:18:17 +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 9a7d5bb514
New Translations (#1615) 2024-02-24 10:32:55 +05:30
Crowdin Bot 4c6239a6a8 New Crowdin translations by GitHub Action 2024-02-24 04:54:56 +00:00
Manav Rathi 65338e4141
Fix the source file used by Crowdin (#1654) 2024-02-24 10:21:51 +05:30
Manav Rathi 4a31e8cdd4 Fix the source file used by Crowdin 2024-02-24 10:21:17 +05:30
Manav Rathi 662399d665
Support Brazilian Portuguese 🇧🇷 (#1653) 2024-02-24 09:51:41 +05:30
Manav Rathi 1436dafbf2 Support Brazilian Portuguese 2024-02-24 09:37:27 +05:30
Manav Rathi 9d8ec5c60b Update auth locales 2024-02-24 09:27:08 +05:30
Manav Rathi e1f5121b4f Handle updates 2024-02-24 09:21:19 +05:30
Manav Rathi c81ecd1ec1 WIP Handle migration 2024-02-24 08:56:23 +05:30
Manav Rathi 9c58731403 Add a basic local storage wrapper 2024-02-23 21:30:38 +05:30
Manav Rathi 4b38703750 Import translations 2024-02-23 19:04:48 +05:30
Manav Rathi 760552f650 Support locales 2024-02-23 18:49:35 +05:30
Manav Rathi 3e9538f59e Move to @/next package 2024-02-23 18:30:08 +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 9ac2a84465 Move is-electron to utils 2024-02-23 16:55:12 +05:30
Manav Rathi a3f76e529a
Clarify a few things around running shared albums locally (#1652) 2024-02-23 16:41:28 +05:30
Manav Rathi 7682b34d76 The port needs to be different 2024-02-23 16:34:08 +05:30
Manav Rathi 53a92a58e3 Clarify a few things around running shared albums locally
Also, rename the environment variable to match what one would naturally type.
2024-02-23 16:23:11 +05:30
Manav Rathi 9859d4e723
Fix account creation failure (#1651) 2024-02-23 12:22:23 +05:30
Manav Rathi 69652dec76 Move to lower layer 2024-02-23 12:14:08 +05:30
Manav Rathi 02b1f4d376 Document 2024-02-23 12:11:37 +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 62624770c7 Document the minimal localhost setup 2024-02-23 11:11:25 +05:30
Manav Rathi 372a9c979e
Locale changes (#1650) 2024-02-23 11:07:51 +05:30
Manav Rathi 1b6f020b23 Move to new enum 2024-02-23 10:57:27 +05:30
Manav Rathi 85aaf1d27e Deduce type from values
It is indeed possible to have a TypeScript type and an array of all of its
possible values without repeating ourselves.

The trick is - while we cannot go from types to values, we can go the other way
around. The sidetrick is - typeof array[number] gives us type of an array's
elements.

Combined, we get this pattern

    const fruits = ["banana", "orange"] as const;
    type Fruits = (typeof fruits)[number];

Refs:
- https://stackoverflow.com/questions/53154564/how-to-get-all-possible-values-of-a-union-type-to-an-array-or-the-other-way-aro
- https://www.typescriptlang.org/docs/handbook/2/indexed-access-types.html
2024-02-23 10:25:58 +05:30
Manav Rathi 1c2f7a4ba3 Document 2/3 2024-02-23 09:59:29 +05:30
Manav Rathi fd3341f699 Move to ui package 2024-02-23 09:41:42 +05:30