Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/install/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ inputs:
node:
description: 'Node version to install'
required: true
default: '18'
default: '20'
runs:
using: 'composite'
steps:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: ['18', '20', '22.4.x', '24']
node: ['20', '22.4.x', '24']
name: Testing on node ${{ matrix.node }}
steps:
- name: Checkout Repo
Expand All @@ -39,7 +39,7 @@ jobs:
with:
node: ${{ matrix.node }}
- run: npm run test
# This is just an additional check to make sure the build passes with our docs
# This is just an additional check to make sure the build passes with our docs
docs:
if: github.actor != 'dependabot[bot]'
runs-on: ubuntu-latest
Expand All @@ -56,7 +56,7 @@ jobs:
- name: Install myst
uses: ./.github/actions/install
with:
node: "20.x"
node: '20.x'
- name: Install docs dependencies
run: |
pip install -r docs/requirements.txt
Expand Down
8 changes: 4 additions & 4 deletions docs/install-node.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Install NodeJS
subject: Advanced Installation
subtitle: Install the NodeJS runtime that powers MyST
subtitle: Install the NodeJS runtime that powers MyST
description: The MyST Command Line Interface (CLI) is built on NodeJS, a JavaScript runtime that is widely used in many projects including well-known Python projects such as Jupyter Lab. MyST can be installed by the package manager npm, PyPI, Conda or Mamba.
---

Expand All @@ -11,16 +11,16 @@ There are a number of ways to install `node` and you can choose one that is suit

:::{important} Node Versions

MyST currently supports `node` v18, v20, and v22. Note that odd-numbered releases of `node` are not long-lived and you should prefer even-numbered releases when installing (see [Node release schedule](https://nodejs.org/en/about/previous-releases)).
MyST currently supports `node` v20+. Note that odd-numbered releases of `node` are not long-lived and you should prefer even-numbered releases when installing (see [Node release schedule](https://nodejs.org/en/about/previous-releases)).
:::

Following any of the install methods below, verify your installation and ensure that `node` and `npm` are available on your system _PATH_ by opening a new terminal window or command line prompt and typing:

```shell
% node -v
v18.16.1
v20.19.5
% npm -v
v9.5.1
10.8.2
```

## Manual Installation (all platforms)
Expand Down
8 changes: 4 additions & 4 deletions docs/installing.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ MyST needs `node` (<https://nodejs.org>) in order to run correctly. If `node` is
```shell
$ myst -v
Node.js (node) is required to run MyST, but could not be found.
Install Node.js in '/root/.local/share/myst/18.0.0'? (y/N): y
Attempting to install Node.js in /root/.local/share/myst/18.0.0 ...
Successfully installed Node.js 18.0.0
Install Node.js in '/root/.local/share/myst/20.0.0'? (y/N): y
Attempting to install Node.js in /root/.local/share/myst/20.0.0 ...
Successfully installed Node.js 20.0.0
v1.3.4
```

Expand All @@ -59,7 +59,7 @@ The `mystmd` package on PyPI ships with the ability to install `node` (<https://
::::
::::{tab-item} NPM

Ensure your `node` (<https://nodejs.org>) is up to date (>v18), see [Installing NodeJS](./install-node.md).
Ensure your `node` (<https://nodejs.org>) is up to date (>v20), see [Installing NodeJS](./install-node.md).

🛠 Then install `mystmd` using npm, yarn or pnpm:

Expand Down
4 changes: 2 additions & 2 deletions packages/citation-js-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
},
"homepage": "https://github.com/jupyter-book/mystmd/tree/main/packages/citation-js-utils",
"engines": {
"node": ">=12",
"npm": ">=6"
"node": ">=20",
"npm": ">=10"
},
"dependencies": {
"@citation-js/core": "^0.7.18",
Expand Down
4 changes: 2 additions & 2 deletions packages/jtex/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
},
"homepage": "https://github.com/jupyter-book/mystmd/tree/main/packages/jtex",
"engines": {
"node": ">=12",
"npm": ">=6"
"node": ">=20",
"npm": ">=10"
},
"dependencies": {
"adm-zip": "^0.5.10",
Expand Down
4 changes: 2 additions & 2 deletions packages/myst-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
"build": "npm-run-all -l clean copy:version -p build:esm"
},
"engines": {
"node": ">=16",
"npm": ">=6"
"node": ">=20",
"npm": ">=10"
},
"dependencies": {
"@jupyterlab/services": "^7.3.0",
Expand Down
7 changes: 4 additions & 3 deletions packages/mystmd-py/src/mystmd_py/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from .nodeenv import find_any_node, PermissionDeniedError, NodeEnvCreationError


NODEENV_VERSION = "18.0.0"
NODEENV_VERSION = "20.0.0"


def ensure_valid_version(node_path, node_env):
Expand All @@ -22,9 +22,10 @@ def ensure_valid_version(node_path, node_env):
if major_version_match is None:
raise SystemExit(f"MyST could not determine the version of Node.js: {_version}")
major_version = int(major_version_match[1])
if not (major_version in {18, 20, 22} or major_version > 22):
# Require an LTS release
if major_version < 20:
raise SystemExit(
f"MyST requires node 18, 20, or 22+; you are running node {major_version}.\n\n"
f"MyST requires Node.js >= 20; you are running node {major_version}.\n\n"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rowanc1 I implemented this check for LTS-like versions.

My feeling is that rather than imposing too strict a check here, we just require a "new-enough" version, and handle any problems for specific non-LTS versions in our issue tracker.

That will make it easier to keep updating this. Long-term, we can pull this from package.json

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I like this better.

"Please update to the latest LTS release, using your preferred package manager\n"
"or following instructions here: https://nodejs.org/en/download"
)
Expand Down
Loading