Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

Backfill accounts release into main #1637

Merged
merged 46 commits into from
Feb 20, 2024
Merged

Backfill accounts release into main #1637

merged 46 commits into from
Feb 20, 2024

Conversation

mnvr
Copy link
Member

@mnvr mnvr commented Feb 20, 2024

Description

@ua741 There seem to be some changes in accounts-release which were not in main. This backports them back to main (We'll try to figure out a better workflow for this later).

Please review once, if these changes are correct.

Test Plan

Untested

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.
> Compiling using Next.js compiler instead of Babel is enabled by default since v12

https://nextjs.org/docs/architecture/nextjs-compiler
- The star in package.json matches any version
  https://docs.npmjs.com/cli/v10/configuring-npm/package-json

- VSCode is still giving errors
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:
vercel/next.js#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.
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)
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/
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
- eslint/eslint#17021
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.
@mnvr mnvr requested a review from ua741 February 20, 2024 04:30
Copy link

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 27b98bc
Status:🚫  Build failed.

View logs

@mnvr
Copy link
Member Author

mnvr commented Feb 20, 2024

Not sure why so many of those commits are showing up, maybe I can do a squash merge once this is approved.

@mnvr mnvr merged commit f90038d into main Feb 20, 2024
4 of 5 checks passed
@mnvr mnvr deleted the accounts-backport branch February 20, 2024 04:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants