Skip to content

chore(node): update Node.js version in Dockerfile and config.json - #6431

Merged
yhabib merged 2 commits into
mainfrom
yhabib/housekeeping/node-version
Feb 17, 2025
Merged

yhabib merged 2 commits into
mainfrom
yhabib/housekeeping/node-version

Conversation

@yhabib

@yhabib yhabib commented Feb 15, 2025 •

Copy link
Copy Markdown
Contributor

Motivation

We have a version mismatch of Node between our dockerfile and config.json. Node 16 has not been supported for some time. This PR updates both the Dockerfile and config to the same version we use for development.

Additionally, we could upgrade to the latest patch, which addresses some security vulnerabilities (v18.20.6) but this is not done in this PR.

Note: Version 18.20 addressed a "breaking change" introduced in v18 regarding how Date manages the space between the time and AM/PM. This adjustment was made following the update to the standard.

In many formatting patterns, ASCII spaces are replaced with Unicode spaces (e.g., a "thin space").

Screenshot 2025-02-15 at 11 54 06

Changes

  • Bump version of node in dockerfile and config.json to 18.20.5

Tests

  • It should build
  • Tested in devenv

Todos

  • Add entry to changelog (if necessary).
    Not necessary

@yhabib yhabib changed the title update node to 18.20 chore(node): update Node.js version in Dockerfile and dfx Feb 15, 2025
@yhabib
yhabib marked this pull request as ready for review February 17, 2025 06:37
@yhabib
yhabib requested a review from a team as a code owner February 17, 2025 06:37
@yhabib yhabib changed the title chore(node): update Node.js version in Dockerfile and dfx chore(node): update Node.js version in Dockerfile and config.json Feb 17, 2025
Comment thread Dockerfile
@yhabib
yhabib requested a review from dskloetd February 17, 2025 09:06
Comment thread Dockerfile
@yhabib
yhabib added this pull request to the merge queue Feb 17, 2025
Merged via the queue into main with commit 46474ad Feb 17, 2025
@yhabib
yhabib deleted the yhabib/housekeeping/node-version branch February 17, 2025 10:08
github-merge-queue Bot pushed a commit that referenced this pull request Feb 24, 2025
# Motivation

Following up on #6431, we aim to establish a single source of truth for
the node version in the project. To remain consistent with other
versions, we will use the one defined in `config.json`.

Note: Some GitHub actions currently use `.nvmrc` to determine the node
version. These will be changed in a follow-up PR.

# Changes

- Removed `NODE_VERSION` from the `Dockerfile` as it was not used.  
- Added a script to populate `.nvmrc` from `config.json` and exposed it
as an npm script.
- Removes `.nvmrc` from tracked files since it can now be generated
locally.
- Updated the `README` with local development instructions and
information about `.nvmrc`.

# Tests

- GitHub actions should run as before.

# Todos

- [ ] Add entry to changelog (if necessary).
Not necessary
github-merge-queue Bot pushed a commit that referenced this pull request Jun 4, 2025
# Motivation

The project currently depends on Node 18. Some
[jobs](https://github.com/dfinity/nns-dapp/actions/runs/15440734632/job/43458326957?pr=6920)
in the CI are failing because the default Node version being installed
is v20. We want to enforce the Node version defined in config.json
#6431.

# Changes

- Define node version for e2e CI job.

# Tests

- Pipeline should be green.

# Todos

- [ ] Add entry to changelog (if necessary).
Not necessary.
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.

2 participants