Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pin Node.JS version in GitHub Actions/Netlify to v18.18.2 using NVM (removes volta) #5097

Closed
Closed
Show file tree
Hide file tree
Changes from all 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/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
uses: actions/setup-node@v4
with:
cache: pnpm
node-version: 18
node-version-file: '.nvmrc'

- name: Install Packages
run: pnpm install --frozen-lockfile
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
node-version: [18.18.2]
steps:
- uses: actions/checkout@v4

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e-applitools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
node-version: [18.18.2]
steps:
- if: ${{ ! env.USE_APPLI }}
name: Warn if not using Applitools
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node-version: [18.x]
node-version: [18.18.2]
containers: [1, 2, 3, 4]
steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
node-version: [18.18.2]
steps:
- uses: actions/checkout@v4

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
uses: actions/setup-node@v4
with:
cache: pnpm
node-version: 18
node-version-file: '.nvmrc'

- name: Install Packages
run: pnpm install --frozen-lockfile
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-preview-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
uses: actions/setup-node@v4
with:
cache: pnpm
node-version: 18.x
node-version-file: '.nvmrc'

- name: Install Packages
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
uses: actions/setup-node@v4
with:
cache: pnpm
node-version: 18.x
node-version-file: '.nvmrc'

- name: Install Packages
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
node-version: [18.18.2]
steps:
- uses: actions/checkout@v4

Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v18.18.2
9 changes: 4 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ Please read in detail about how to contribute documentation and code on the [Mer

## Requirements

- [volta](https://volta.sh/) to manage node versions.
- [Node.js](https://nodejs.org/en/). `volta install node`
- [pnpm](https://pnpm.io/) package manager. `volta install pnpm`
- [nvm](https://github.com/nvm-sh/nvm) to manage node versions.
- [Node.js](https://nodejs.org/en/). `nvm install`
- [pnpm](https://pnpm.io/) package manager. `corepack enable`

## Development Installation

Expand All @@ -24,8 +24,7 @@ cd mermaid
Install required packages:

```bash
# npx is required for first install as volta support for pnpm is not added yet.
npx pnpm install
pnpm install
pnpm test # run unit tests
pnpm dev # starts a dev server
```
Expand Down
13 changes: 7 additions & 6 deletions docs/community/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,9 @@ Then you **clone** a copy to your local development machine (e.g. where you code

These are the tools we use for working with the code and documentation:

- [volta](https://volta.sh/) to manage node versions.
- [Node.js](https://nodejs.org/en/). `volta install node`
- [pnpm](https://pnpm.io/) package manager. `volta install pnpm`
- [npx](https://docs.npmjs.com/cli/v8/commands/npx) the packaged executor in npm. This is needed [to install pnpm.](#install-packages)
- [nvm](https://github.com/nvm-sh/nvm) to manage node versions.
- [Node.js](https://nodejs.org/en/). `nvm install`
- [pnpm](https://pnpm.io/) package manager. `corepack enable`

Follow the setup steps below to install them and start the development.

Expand All @@ -53,10 +52,12 @@ cd mermaid

### Install packages

Run `npx pnpm install`. You will need `npx` for this because volta doesn't support it yet.
Run `pnpm install`.
Assuming you've ran [`corepack enable`](https://nodejs.org/api/corepack.html#how-does-corepack-interact-with-npm),
Node.JS will automatically install the correct version of `pnpm` for you.

```bash
npx pnpm install # npx is required for first install
pnpm install
```

### Launch
Expand Down
9 changes: 4 additions & 5 deletions docs/intro/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -382,17 +382,16 @@ Detailed information about how to contribute can be found in the [contribution g

### Requirements

- [volta](https://volta.sh/) to manage node versions.
- [Node.js](https://nodejs.org/en/). `volta install node`
- [pnpm](https://pnpm.io/) package manager. `volta install pnpm`
- [nvm](https://github.com/nvm-sh/nvm) to manage node versions.
- [Node.js](https://nodejs.org/en/). `nvm install`
- [pnpm](https://pnpm.io/) package manager. `corepack enable`

### Development Installation

```bash
git clone git@github.com:mermaid-js/mermaid.git
cd mermaid
# npx is required for first install as volta support for pnpm is not added yet.
npx pnpm install
pnpm install # if pnpm is not installed, use `corepack enable` to tell Node.JS to auto-install it
pnpm test
```

Expand Down
3 changes: 0 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,6 @@
"vite-plugin-istanbul": "^4.1.0",
"vitest": "^0.34.0"
},
"volta": {
"node": "18.18.2"
},
"nyc": {
"report-dir": "coverage/cypress"
}
Expand Down
13 changes: 7 additions & 6 deletions packages/mermaid/src/docs/community/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,9 @@ Then you **clone** a copy to your local development machine (e.g. where you code

These are the tools we use for working with the code and documentation:

- [volta](https://volta.sh/) to manage node versions.
- [Node.js](https://nodejs.org/en/). `volta install node`
- [pnpm](https://pnpm.io/) package manager. `volta install pnpm`
- [npx](https://docs.npmjs.com/cli/v8/commands/npx) the packaged executor in npm. This is needed [to install pnpm.](#install-packages)
- [nvm](https://github.com/nvm-sh/nvm) to manage node versions.
- [Node.js](https://nodejs.org/en/). `nvm install`
- [pnpm](https://pnpm.io/) package manager. `corepack enable`

Follow the setup steps below to install them and start the development.

Expand All @@ -47,10 +46,12 @@ cd mermaid

### Install packages

Run `npx pnpm install`. You will need `npx` for this because volta doesn't support it yet.
Run `pnpm install`.
Assuming you've ran [`corepack enable`](https://nodejs.org/api/corepack.html#how-does-corepack-interact-with-npm),
Node.JS will automatically install the correct version of `pnpm` for you.

```bash
npx pnpm install # npx is required for first install
pnpm install
```

### Launch
Expand Down
9 changes: 4 additions & 5 deletions packages/mermaid/src/docs/intro/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,17 +139,16 @@ Detailed information about how to contribute can be found in the [contribution g

### Requirements

- [volta](https://volta.sh/) to manage node versions.
- [Node.js](https://nodejs.org/en/). `volta install node`
- [pnpm](https://pnpm.io/) package manager. `volta install pnpm`
- [nvm](https://github.com/nvm-sh/nvm) to manage node versions.
- [Node.js](https://nodejs.org/en/). `nvm install`
- [pnpm](https://pnpm.io/) package manager. `corepack enable`

### Development Installation

```bash
git clone git@github.com:mermaid-js/mermaid.git
cd mermaid
# npx is required for first install as volta support for pnpm is not added yet.
npx pnpm install
pnpm install # if pnpm is not installed, use `corepack enable` to tell Node.JS to auto-install it
pnpm test
```

Expand Down