Commit graph

9800 commits

Author SHA1 Message Date
Manav Rathi 97ff657ba6 Add a lint-fix command 2024-02-16 20:48:26 +05:30
Manav Rathi 779d3b4e8a Update yarn.lock after rebasing from main 2024-02-16 20:48:26 +05:30
Manav Rathi 82fbe55e5a Remove debugging package 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 d0155d1fc2 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/
2024-02-16 20:48:26 +05:30
Manav Rathi 378946a6e9 Switch to a flat config 2024-02-16 20:48:26 +05:30
Manav Rathi ba12c9c0c7 Set up linter for the package 2024-02-16 20:48:26 +05:30
Manav Rathi 21b8c4e77a Configure global prettier 2024-02-16 20:48:26 +05:30
Manav Rathi 6b5859dca7 Funnel .tsx extensions via subfolders 2024-02-16 20:48:26 +05:30
Manav Rathi 703031f73c Add development notes 2024-02-16 20:48:25 +05:30
Manav Rathi 3720abe0ed Integrate the actual one 2024-02-16 20:47:25 +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 386c31310c Remove unused project I used to isolate the issue 2024-02-16 20:47:25 +05:30
Manav Rathi 3289d137bf forceConsistentCasingInFileNames is true by default with TS 5 2024-02-16 20:47:25 +05:30
Manav Rathi a2fa7d3716 Find the bit that was causing trouble in VSCode 2024-02-16 20:47:25 +05:30
Manav Rathi 632af065fe Add a working WIP example 2024-02-16 20:47:25 +05:30
Manav Rathi 41351e71d2 next start can already do this 2024-02-16 20:47:25 +05:30
Manav Rathi 7263969953 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
2024-02-16 20:47:25 +05:30
Manav Rathi 3fad0427a7 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
2024-02-16 20:47:25 +05:30
Manav Rathi f3340db57e Make it work with src 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
Manav Rathi 3aa0f4d0b8 Make it work with yarn workspace 2024-02-16 20:47:25 +05:30
Manav Rathi 9723f818e0 Add tsconfig 2024-02-16 20:47:25 +05:30
Manav Rathi c56f11fb8f Scaffold utils project 2024-02-16 20:47:25 +05:30
Manav Rathi 90c95d0528
Accounts UI tweaks (#1619) 2024-02-16 18:18:05 +05:30
Manav Rathi 548b4c1a61 Reset the form on submit 2024-02-16 18:15:30 +05:30
Manav Rathi 6f086c478f Add a page title 2024-02-16 17:08:47 +05:30
Manav Rathi 63fb517f12
Prefix match the branch name to decide what app to build (#1618) 2024-02-16 16:53:49 +05:30
Manav Rathi 1a9aec23f7 Prefix match the branch name to decide what app to build
This allows us to perform test deployments of any of the supported apps.

Refs:
- https://bash.cyberciti.biz/guide/The_case_statement
- https://stackoverflow.com/questions/2172352/in-bash-how-can-i-check-if-a-string-begins-with-some-value
2024-02-16 16:47:49 +05:30
Manav Rathi 7a35bc5391
Handle the deployment for accounts app (#1616) 2024-02-16 15:46:54 +05:30
Manav Rathi 1c2d781cba Always connect to production 2024-02-16 15:40:23 +05:30
Manav Rathi 2c0fc15694 Create a deployment for accounts 2024-02-16 15:29:34 +05:30
Manav Rathi 1c18fb8392
Accounts-passkeys (#1523) 2024-02-16 15:29:01 +05:30
Neeraj Gupta 33faadf83e accounts: Fixed bad merge 2024-02-16 15:17:03 +05:30
Neeraj Gupta 5df7a2a10f Specify timeout for passkey 2024-02-16 15:08:03 +05:30
Neeraj Gupta 5d7d166976 Merge branch 'main' into accounts-passkeys 2024-02-16 14:53:04 +05:30
Manav Rathi 6797dde517
Unify and prune environment variables (#1613) 2024-02-14 18:13:00 +05:30
Manav Rathi 6e7e214d01 Improve comment 2024-02-13 13:17:13 +05:30
Manav Rathi c2523c695d Mimic an approach that also works with the desktop app build 2024-02-13 13:14:31 +05:30
Manav Rathi 07faec7851 Improve readability 2024-02-13 12:12:48 +05:30
Manav Rathi bf70857a41 Don't initialize Sentry on dev builds 2024-02-13 12:11:14 +05:30
Manav Rathi 043b7d3964
New Translations (#1611) 2024-02-13 11:57:44 +05:30
Crowdin Bot d5765a2c3b New Crowdin translations by GitHub Action 2024-02-13 06:26:58 +00:00
Manav Rathi 08d5f318a9
ente Cast (#1460) 2024-02-13 11:56:12 +05:30
Manav Rathi 8a769ea08b Specify the release in Sentry.init instead of the webpack plugin 2024-02-13 11:25:31 +05:30
Neeraj Gupta 13f628aaac Fix build errors 2024-02-13 10:54:24 +05:30