Skip to content

Conversation

@PascalHonegger
Copy link
Contributor

This is my first attempt at contributing to Lichess, feedback is welcome 😄

What this PR changes

  • Specifies the used pnpm version in the packageManager field which is used by corepack
  • Removes the version from the GitHub worklows, as pnpm/ctions-setup uses the exact version specified in packageManager
  • Switches from pnpm v8 to v9 and node from v14 to v20 (because of corepack and pnpm)
  • Upgrades the pnpm-lock.yaml to the latest format without changing any version (I just ran pnpm install locally)

How to update this PR (if it was sitting stale for a while

  • rebase from latest master, taking the pnpm-lock.yaml from the current master
  • update to latest pnpm: corepack use pnpm@latest
  • migrate pnpm-lock.yaml to latest format: pnpm install

Open tasks

If this is merged, the Lichess Development Onboarding must be updated, I recommend to use the latest LST (e.g. 20) and run corepack enable once so you'll always have the correct version of pnpm, which is also described on the pnpm documentation.

@schlawg
Copy link
Contributor

schlawg commented Apr 20, 2024

Thanks, looks good. As we discussed, I'm going to give pnpm 9 a bit more bake time. And we'll merge this soon.

@ornicar
Copy link
Collaborator

ornicar commented May 7, 2024

pnpm 9 is the archlinux repos, I'm ready :D

@PascalHonegger
Copy link
Contributor Author

I just rebased and used the latest version of pnpm currently available (corepack use pnpm@latest, which resulted in PNPM 9.1). If any other version is prefered for some reason I'm happy to change it.

By the way, if you don't plan on using corepack to always have the exact matching version of pnpm, maybe disabling the new default package-manager-strict option would be a good idea?

pnpm will now check the package.json file for a packageManager field. If this field is present and specifies a different package manager or a different version of pnpm than the one you're currently using, pnpm will not proceed. This ensures that you're always using the correct package manager and version that the project requires.

@ornicar
Copy link
Collaborator

ornicar commented May 7, 2024

Why do we need to enforce a precise version of pnpm?
Can we just enforce a minimum version "pnpm": ">=8.7"

@PascalHonegger
Copy link
Contributor Author

The new pnpm-lock format used here requires pnpm 9, which is why I specified ^9 in the 'engines' - but pnpm 9 itself defaults to using the exact version unless the strict setting I mentioned is disabled.

I think the idea is that when using corepack, everybody will always be using the exact same version of the package manager to prevent any unexpected behavior, but this might be too strict here - hence why I mentioned to disable this new strict behavior if corepack will not be used by everybody 🙂

@ornicar
Copy link
Collaborator

ornicar commented May 7, 2024

hmm I suppose we should all go for corepack then 🤔

@schlawg
Copy link
Contributor

schlawg commented May 7, 2024

We are OK with node 20 being the new baseline then?

@ornicar
Copy link
Collaborator

ornicar commented May 8, 2024

I don't see why not. It's an LTS and they're already at v22.

ornicar added 2 commits May 8, 2024 10:58
* master: (29 commits)
  move single functions up to package root
  lila.racer.ui
  tv scala tweaks
  use Language type in routing
  type safe StudyOrder in routing - closes lichess-org#15255
  Add "outlook.com.au" to email whitelist
  partial fix for gif exports
  Update sbt to 1.10.0
  more router type safety
  background-image in %metal also conflicts with %active, so just revert it
  more router type safety
  fix forum post redirect
  add missing import
  forum router type safety
  arena/swiss/simul router type safety
  fix blue lobby buttons (and others) in transparent mode
  study routing types
  repair unfocused search & replace
  fix UblogPostId typing
  UblogPostId in routes, delete historical blog timeline events
  ...
@ornicar ornicar merged commit a9b0f5e into lichess-org:master May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants