Switch from Yarn to npm to manage project dependencies
Antora is organized as a multi-package project and thus relies on the built recognizing these packages (workspaces) and their relationships. At the time the Antora project was started, npm did not support workspaces, but Yarn did. Therefore, we choose to build the project with Yarn (with help from Lerna). Since then, npm 8 has been released with support for npm workspaces, which are compatible with Yarn workspaces. Using npm has the advantage of being bundled with Node.js. Therefore, we should eliminate the use of Yarn to manage dependencies for the project and use npm instead.
Reconfigure the project to install development dependencies using npm i
instead of yarn
. Remove the yarn.lock file and commit the package-lock.json file that the npm i
command creates. Update the contributing guide by removing the section about Yarn and updating instructions for how to install dependencies using npm i
. Also add a note that if you aren't using a version of Node.js that provides at least npm 8, you'll need to install npm 8 or greater locally and install dependencies using npx npm i
.
Finally, write this up in an ADR.