From db376a8b16b9de2f0293dffcd6c203e1f0be5914 Mon Sep 17 00:00:00 2001 From: brandonlenz Date: Fri, 21 Jul 2023 11:14:39 -0400 Subject: [PATCH 1/2] Support asdf (add .tool-versions) --- .tool-versions | 1 + README.md | 2 +- docs/contributing.md | 4 +++- 3 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 .tool-versions diff --git a/.tool-versions b/.tool-versions new file mode 100644 index 0000000000..27552eba72 --- /dev/null +++ b/.tool-versions @@ -0,0 +1 @@ +nodejs 18.15.0 diff --git a/README.md b/README.md index 03a958e6fd..354688aadd 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,7 @@ Having issues? See [FAQs](./docs/faqs.md). ### NodeJS -We develop on this library with the version of node defined in `.node-version`. We run the test suite against the major released versions of node that are still in active LTS and not development releases. Specific versions are defined in the workflow: `.github/workflows/build-and-test.yml`. Those are the versions we exxpect to support, if you are using a pre-release or development version of node you may run into unexpected issues. +We develop on this library with the version of node defined in [`.node-version`](.node-version) and [`.tool-versions`](.tool-versions) . We run the test suite against the major released versions of node that are still in active LTS and not development releases. Specific versions are defined in the workflow: `.github/workflows/build-and-test.yml`. Those are the versions we expect to support, if you are using a pre-release or development version of node you may run into unexpected issues. Having issues? See [FAQs](./docs/faqs.md). diff --git a/docs/contributing.md b/docs/contributing.md index 20c6fed1c5..e71c91a7ed 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -25,7 +25,9 @@ We welcome contributions in the form of comments, issues, or pull requests with ## Environment setup -1. Use the node environment manager of your choice, but make sure you have the required version specified in `.node-version`. We recommend using [nodenv](https://github.com/nodenv/nodenv) to manage your node versions, but you can also use [homebrew](https://brew.sh/). More info can be found here: [how to install Node.js](https://nodejs.dev/how-to-install-nodejs) +1. Use the node environment manager of your choice, but make sure you have the required version specified by the project. + - The version required by the project can be found in [`.node-version`](../.node-version) or [`.tool-versions`](../.tool-versions). + - We recommend using [nodenv](https://github.com/nodenv/nodenv) OR [asdf](https://asdf-vm.com/) to manage your node versions, but not both. If you already have a preferred node version manager installed, use it. 2. Use [yarn](https://yarnpkg.com) to manage JS packages. From c1041aa5ce56397456ccdf66e6d1cabb80e5417a Mon Sep 17 00:00:00 2001 From: brandonlenz Date: Mon, 6 Jan 2025 09:27:21 -0500 Subject: [PATCH 2/2] Update documentation for mise and asdf --- .tool-versions | 1 - README.md | 2 +- docs/contributing.md | 9 +++++++-- 3 files changed, 8 insertions(+), 4 deletions(-) delete mode 100644 .tool-versions diff --git a/.tool-versions b/.tool-versions deleted file mode 100644 index 27552eba72..0000000000 --- a/.tool-versions +++ /dev/null @@ -1 +0,0 @@ -nodejs 18.15.0 diff --git a/README.md b/README.md index fbbc72ab6d..0d1c1866de 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,7 @@ Having issues? See [FAQs](./docs/faqs.md). ### NodeJS -We develop on this library with the version of node defined in [`.node-version`](.node-version) and [`.tool-versions`](.tool-versions) . We run the test suite against the major released versions of node that are still in active LTS and not development releases. Specific versions are defined in the workflow: `.github/workflows/build-and-test.yml`. Those are the versions we expect to support, if you are using a pre-release or development version of node you may run into unexpected issues. +We develop on this library with the version of node defined in [`.node-version`](.node-version). We run the test suite against the major released versions of node that are still in active LTS and not development releases. Specific versions are defined in the workflow: `.github/workflows/build-and-test.yml`. Those are the versions we expect to support, if you are using a pre-release or development version of node you may run into unexpected issues. Having issues? See [FAQs](./docs/faqs.md). diff --git a/docs/contributing.md b/docs/contributing.md index 41e44e2496..dc142e6e85 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -27,8 +27,13 @@ We welcome contributions in the form of comments, issues, or pull requests with ## Environment setup 1. Use the node environment manager of your choice, but make sure you have the required version specified by the project. - - The version required by the project can be found in [`.node-version`](../.node-version) or [`.tool-versions`](../.tool-versions). - - We recommend using [nodenv](https://github.com/nodenv/nodenv) OR [asdf](https://asdf-vm.com/) to manage your node versions, but not both. If you already have a preferred node version manager installed, use it. + - The version required by the project can be found in [`.node-version`](../.node-version). + - We recommend using a single tool version manager such as [mise-en-place](https://mise.jdx.dev/), [asdf](https://asdf-vm.com/), or (specific to just Node) [nodenv](https://github.com/nodenv/nodenv) to manage your node version on this project. + If you already have a preferred node version manager installed, use it. + + > [!NOTE] + > If using asdf, you must [enable `legacy_version_file`](https://asdf-vm.com/manage/configuration.html#legacy-version-file) to have the tool version picked up from `.node-version` + > Mise supports `.node-version` [as a default](https://mise.jdx.dev/configuration.html#idiomatic-version-files). If you're having trouble, make sure that setting is not set to false. 2. Use [yarn](https://yarnpkg.com) to manage JS packages.