fabricjs / fabricjs.github.io

fabricjs website work in progress
14 stars 9 forks source link

`yarn` v1 ➝ `pnpm`, `yarn` v3? #116

Closed mrienstra closed 3 months ago

mrienstra commented 3 months ago

Astro uses pnpm internally, not that it particularly matters, just saying... :)

yarn v1 hasn't been actively developed for many years, though it is still getting minor updates.

Might be worth trying a switch to pnpm or yarn v3, given that you're starting fresh with a new stack.

https://pnpm.io/cli/import

https://yarnpkg.com/migration/overview

Edit: oh, whoops, I guess you're using npm... Not sure why there is a dependency on yarn in package.json. Might be nice to add a packageManager field to package.json: https://nodejs.org/docs/latest-v20.x/api/packages.html#packagemanager

... and one of these doohickies:

  "engines": {
    "node": "^18.17.1 || ^20.3.0 || >=21.0.0"
  },
asturur commented 3 months ago

i m not sure i just followed astro docs earlier this year.

mrienstra commented 3 months ago

You can add a line like:

  "packageManager": "npm@10.8.1+sha512.0e9d42e92bd2318408ed81eaff2da5f78baf23ee7d12a6eed44a6e2901d0f29d7ab715d1b918ade601f72e769a824d9a5c322383f22bbbda5dd396e79de2a077"

... using: corepack use npm

As per: https://nodejs.org/docs/latest-v20.x/api/corepack.html#configuring-a-package