Merge branch 'nvm-sh:master' into issue3234

This commit is contained in:
Victor Mihalache 2024-03-08 20:00:36 +01:00 committed by GitHub
commit 0f655cd37f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 36 additions and 29 deletions

View File

@ -9,11 +9,12 @@ jobs:
latest: ${{ steps.set-matrix.outputs.requireds }} latest: ${{ steps.set-matrix.outputs.requireds }}
steps: steps:
- name: Harden Runner - name: Harden Runner
uses: step-security/harden-runner@v1 uses: step-security/harden-runner@v2
with: with:
allowed-endpoints: allowed-endpoints:
iojs.org:443 iojs.org:443
nodejs.org:443 nodejs.org:443
raw.githubusercontent.com:443
- uses: ljharb/actions/node/matrix@main - uses: ljharb/actions/node/matrix@main
id: set-matrix id: set-matrix
with: with:
@ -46,7 +47,7 @@ jobs:
steps: steps:
- name: Harden Runner - name: Harden Runner
uses: step-security/harden-runner@v1 uses: step-security/harden-runner@v2
with: with:
allowed-endpoints: allowed-endpoints:
github.com:443 github.com:443
@ -54,7 +55,7 @@ jobs:
iojs.org:443 iojs.org:443
nodejs.org:443 nodejs.org:443
registry.npmjs.org:443 registry.npmjs.org:443
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: ljharb/actions/node/install@main - uses: ljharb/actions/node/install@main
name: 'install node' name: 'install node'
with: with:
@ -75,7 +76,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Harden Runner - name: Harden Runner
uses: step-security/harden-runner@v1 uses: step-security/harden-runner@v2
with: with:
egress-policy: block egress-policy: block
- run: 'echo tests completed' - run: 'echo tests completed'

View File

@ -8,14 +8,14 @@ jobs:
contents: read contents: read
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: step-security/harden-runner@v1 - uses: step-security/harden-runner@v2
with: with:
allowed-endpoints: allowed-endpoints:
github.com:443 github.com:443
raw.githubusercontent.com:443 raw.githubusercontent.com:443
nodejs.org:443 nodejs.org:443
registry.npmjs.org:443 registry.npmjs.org:443
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: ljharb/actions/node/install@main - uses: ljharb/actions/node/install@main
name: 'nvm install ${{ matrix.node-version }} && npm install' name: 'nvm install ${{ matrix.node-version }} && npm install'
with: with:
@ -27,7 +27,7 @@ jobs:
contents: read contents: read
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: step-security/harden-runner@v1 - uses: step-security/harden-runner@v2
with: with:
allowed-endpoints: allowed-endpoints:
ghcr.io:443 ghcr.io:443
@ -36,7 +36,7 @@ jobs:
pkg-containers.githubusercontent.com:443 pkg-containers.githubusercontent.com:443
nodejs.org:443 nodejs.org:443
registry.npmjs.org:443 registry.npmjs.org:443
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: ljharb/actions/node/install@main - uses: ljharb/actions/node/install@main
name: 'nvm install ${{ matrix.node-version }} && npm install' name: 'nvm install ${{ matrix.node-version }} && npm install'
with: with:
@ -48,14 +48,14 @@ jobs:
contents: read contents: read
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: step-security/harden-runner@v1 - uses: step-security/harden-runner@v2
with: with:
allowed-endpoints: allowed-endpoints:
github.com:443 github.com:443
raw.githubusercontent.com:443 raw.githubusercontent.com:443
nodejs.org:443 nodejs.org:443
registry.npmjs.org:443 registry.npmjs.org:443
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: ljharb/actions/node/install@main - uses: ljharb/actions/node/install@main
name: 'nvm install ${{ matrix.node-version }} && npm install' name: 'nvm install ${{ matrix.node-version }} && npm install'
with: with:
@ -67,11 +67,11 @@ jobs:
contents: read contents: read
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: step-security/harden-runner@v1 - uses: step-security/harden-runner@v2
with: with:
allowed-endpoints: allowed-endpoints:
github.com:443 github.com:443
raw.githubusercontent.com:443 raw.githubusercontent.com:443
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: check tests filenames - name: check tests filenames
run: ./rename_test.sh --check run: ./rename_test.sh --check

View File

@ -12,12 +12,12 @@ jobs:
steps: steps:
- name: Harden Runner - name: Harden Runner
uses: step-security/harden-runner@v1 uses: step-security/harden-runner@v2
with: with:
allowed-endpoints: allowed-endpoints:
api.github.com:443 api.github.com:443
github.com:443 github.com:443
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: ljharb/rebase@master - uses: ljharb/rebase@master
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@ -9,13 +9,16 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Harden Runner - name: Harden Runner
uses: step-security/harden-runner@v1 uses: step-security/harden-runner@v2
with: with:
allowed-endpoints: allowed-endpoints:
github.com:443 github.com:443
api.github.com:443
objects.githubusercontent.com:443
raw.githubusercontent.com:443
registry.npmjs.org:443 registry.npmjs.org:443
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: actions/setup-node@v3 - uses: actions/setup-node@v4
with: with:
node-version: "14" node-version: "14"
- run: npm install - run: npm install

View File

@ -12,7 +12,7 @@ jobs:
steps: steps:
- name: Harden Runner - name: Harden Runner
uses: step-security/harden-runner@v1 uses: step-security/harden-runner@v2
with: with:
allowed-endpoints: allowed-endpoints:
api.github.com:443 api.github.com:443

View File

@ -27,13 +27,14 @@ jobs:
steps: steps:
- name: Harden Runner - name: Harden Runner
uses: step-security/harden-runner@v1 uses: step-security/harden-runner@v2
with: with:
allowed-endpoints: allowed-endpoints:
ghcr.io:443 ghcr.io:443
github.com:443 github.com:443
pkg-containers.githubusercontent.com:443 pkg-containers.githubusercontent.com:443
- uses: actions/checkout@v3 formulae.brew.sh:443
- uses: actions/checkout@v4
- name: Set up Homebrew - name: Set up Homebrew
uses: Homebrew/actions/setup-homebrew@master uses: Homebrew/actions/setup-homebrew@master
- name: Install latest shellcheck - name: Install latest shellcheck
@ -52,7 +53,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Harden Runner - name: Harden Runner
uses: step-security/harden-runner@v1 uses: step-security/harden-runner@v2
with: with:
egress-policy: block egress-policy: block
- run: 'echo tests completed' - run: 'echo tests completed'

View File

@ -26,7 +26,7 @@ jobs:
steps: steps:
- name: Harden Runner - name: Harden Runner
uses: step-security/harden-runner@v1 uses: step-security/harden-runner@v2
with: with:
allowed-endpoints: allowed-endpoints:
github.com:443 github.com:443
@ -34,7 +34,7 @@ jobs:
raw.githubusercontent.com:443 raw.githubusercontent.com:443
nodejs.org:443 nodejs.org:443
iojs.org:443 iojs.org:443
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- run: sudo ${{ matrix.shell }} --version 2> /dev/null || dpkg -s ${{ matrix.shell }} 2> /dev/null || which ${{ matrix.shell }} - run: sudo ${{ matrix.shell }} --version 2> /dev/null || dpkg -s ${{ matrix.shell }} 2> /dev/null || which ${{ matrix.shell }}
- run: curl --version - run: curl --version
- run: wget --version - run: wget --version

View File

@ -12,12 +12,12 @@ jobs:
steps: steps:
- name: Harden Runner - name: Harden Runner
uses: step-security/harden-runner@v1 uses: step-security/harden-runner@v2
with: with:
allowed-endpoints: allowed-endpoints:
github.com:443 github.com:443
registry.npmjs.org:443 registry.npmjs.org:443
- uses: actions/checkout@v3 - uses: actions/checkout@v4
with: with:
# https://github.com/actions/checkout/issues/217#issue-599945005 # https://github.com/actions/checkout/issues/217#issue-599945005
# pulls all commits (needed for lerna / semantic release to correctly version) # pulls all commits (needed for lerna / semantic release to correctly version)
@ -25,7 +25,7 @@ jobs:
# pulls all tags (needed for lerna / semantic release to correctly version) # pulls all tags (needed for lerna / semantic release to correctly version)
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* - run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- uses: actions/setup-node@v3 - uses: actions/setup-node@v4
with: with:
node-version: '16' node-version: '16'
- run: npm install - run: npm install

View File

@ -844,10 +844,12 @@ As a potential alternative, @mhart (a Node contributor) has some [Docker images
To remove `nvm` manually, execute the following: To remove `nvm` manually, execute the following:
First, use `nvm unload` to remove the nvm command from your terminal session. then: First, use `nvm unload` to remove the nvm command from your terminal session and delete the installation directory:
```sh ```sh
$ rm -rf "$NVM_DIR" $ nvm_dir="${NVM_DIR:-~/.nvm}"
$ nvm unload
$ rm -rf "$nvm_dir"
``` ```
Edit `~/.bashrc` (or other shell resource config) and remove the lines below: Edit `~/.bashrc` (or other shell resource config) and remove the lines below:
@ -1037,7 +1039,7 @@ This could simply be solved by running this in your root directory:
sudo chattr +i /etc/resolv.conf sudo chattr +i /etc/resolv.conf
``` ```
This deletes your `resolv.conf` file that is automatically generated when u run WSL, creates a new file and puts `nameserver 8.8.8.8`, then creates a `wsl.conf` file and adds `[network]` and `generateResolveConf = false` to prevent auto-generation of that file. This deletes your `resolv.conf` file that is automatically generated when you run WSL, creates a new file and puts `nameserver 8.8.8.8`, then creates a `wsl.conf` file and adds `[network]` and `generateResolveConf = false` to prevent auto-generation of that file.
You can check the contents of the file by running: You can check the contents of the file by running: