Set Node version in a single place (#6534)
This should make it much easier to update. Also use 18.15.0 specifically since that is what VS Code ships with. Additionally, it fixes the post-install script being skipped due to a Yarn v1 bug that happens when Yarn installs node-gyp, which it does because 18.18 onward stopped bundling node-gyp.
This commit is contained in:
parent
239df56634
commit
da254c39ee
24
.github/workflows/build.yaml
vendored
24
.github/workflows/build.yaml
vendored
@ -50,11 +50,11 @@ jobs:
|
|||||||
files: |
|
files: |
|
||||||
docs/**
|
docs/**
|
||||||
|
|
||||||
- name: Install Node.js v18
|
- name: Install Node.js
|
||||||
if: steps.changed-files.outputs.any_changed == 'true'
|
if: steps.changed-files.outputs.any_changed == 'true'
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: "18"
|
node-version-file: .node-version
|
||||||
cache: "yarn"
|
cache: "yarn"
|
||||||
|
|
||||||
- name: Install doctoc
|
- name: Install doctoc
|
||||||
@ -115,11 +115,11 @@ jobs:
|
|||||||
files_ignore: |
|
files_ignore: |
|
||||||
lib/vscode/**
|
lib/vscode/**
|
||||||
|
|
||||||
- name: Install Node.js v18
|
- name: Install Node.js
|
||||||
if: steps.changed-files.outputs.any_changed == 'true'
|
if: steps.changed-files.outputs.any_changed == 'true'
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: "18"
|
node-version-file: .node-version
|
||||||
|
|
||||||
- name: Fetch dependencies from cache
|
- name: Fetch dependencies from cache
|
||||||
if: steps.changed-files.outputs.any_changed == 'true'
|
if: steps.changed-files.outputs.any_changed == 'true'
|
||||||
@ -170,11 +170,11 @@ jobs:
|
|||||||
files_ignore: |
|
files_ignore: |
|
||||||
lib/vscode/**
|
lib/vscode/**
|
||||||
|
|
||||||
- name: Install Node.js v18
|
- name: Install Node.js
|
||||||
if: steps.changed-files.outputs.any_changed == 'true'
|
if: steps.changed-files.outputs.any_changed == 'true'
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: "18"
|
node-version-file: .node-version
|
||||||
|
|
||||||
- name: Fetch dependencies from cache
|
- name: Fetch dependencies from cache
|
||||||
if: steps.changed-files.outputs.any_changed == 'true'
|
if: steps.changed-files.outputs.any_changed == 'true'
|
||||||
@ -224,10 +224,10 @@ jobs:
|
|||||||
- name: Patch Code
|
- name: Patch Code
|
||||||
run: quilt push -a
|
run: quilt push -a
|
||||||
|
|
||||||
- name: Install Node.js v18
|
- name: Install Node.js
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: "18"
|
node-version-file: .node-version
|
||||||
|
|
||||||
- name: Fetch dependencies from cache
|
- name: Fetch dependencies from cache
|
||||||
id: cache-node-modules
|
id: cache-node-modules
|
||||||
@ -298,10 +298,10 @@ jobs:
|
|||||||
- name: Install system dependencies
|
- name: Install system dependencies
|
||||||
run: sudo apt update && sudo apt install -y libkrb5-dev
|
run: sudo apt update && sudo apt install -y libkrb5-dev
|
||||||
|
|
||||||
- name: Install Node.js v18
|
- name: Install Node.js
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: "18"
|
node-version-file: .node-version
|
||||||
|
|
||||||
- name: Fetch dependencies from cache
|
- name: Fetch dependencies from cache
|
||||||
id: cache-node-modules
|
id: cache-node-modules
|
||||||
@ -357,10 +357,10 @@ jobs:
|
|||||||
- name: Install system dependencies
|
- name: Install system dependencies
|
||||||
run: sudo apt update && sudo apt install -y libkrb5-dev
|
run: sudo apt update && sudo apt install -y libkrb5-dev
|
||||||
|
|
||||||
- name: Install Node.js v18
|
- name: Install Node.js
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: "18"
|
node-version-file: .node-version
|
||||||
|
|
||||||
- name: Fetch dependencies from cache
|
- name: Fetch dependencies from cache
|
||||||
id: cache-node-modules
|
id: cache-node-modules
|
||||||
|
4
.github/workflows/publish.yaml
vendored
4
.github/workflows/publish.yaml
vendored
@ -29,10 +29,10 @@ jobs:
|
|||||||
- name: Checkout code-server
|
- name: Checkout code-server
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install Node.js v18
|
- name: Install Node.js
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: "18"
|
node-version-file: .node-version
|
||||||
cache: "yarn"
|
cache: "yarn"
|
||||||
|
|
||||||
- name: Download npm package from release artifacts
|
- name: Download npm package from release artifacts
|
||||||
|
18
.github/workflows/release.yaml
vendored
18
.github/workflows/release.yaml
vendored
@ -35,10 +35,10 @@ jobs:
|
|||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install Node.js v18
|
- name: Install Node.js
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: "18.15.0"
|
node-version-file: .node-version
|
||||||
|
|
||||||
- name: Install development tools
|
- name: Install development tools
|
||||||
run: |
|
run: |
|
||||||
@ -128,7 +128,6 @@ jobs:
|
|||||||
PKG_CONFIG_PATH: ${{ format('/usr/lib/{0}/pkgconfig', matrix.prefix) }}
|
PKG_CONFIG_PATH: ${{ format('/usr/lib/{0}/pkgconfig', matrix.prefix) }}
|
||||||
TARGET_ARCH: ${{ matrix.apt_arch }}
|
TARGET_ARCH: ${{ matrix.apt_arch }}
|
||||||
npm_config_arch: ${{ matrix.npm_arch }}
|
npm_config_arch: ${{ matrix.npm_arch }}
|
||||||
NODE_VERSION: v18.15.0
|
|
||||||
# Not building from source results in an x86_64 argon2, as if
|
# Not building from source results in an x86_64 argon2, as if
|
||||||
# npm_config_arch is being ignored.
|
# npm_config_arch is being ignored.
|
||||||
npm_config_build_from_source: true
|
npm_config_build_from_source: true
|
||||||
@ -137,10 +136,10 @@ jobs:
|
|||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install Node.js v18
|
- name: Install Node.js
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: "18.15.0"
|
node-version-file: .node-version
|
||||||
|
|
||||||
- name: Install cross-compiler and system dependencies
|
- name: Install cross-compiler and system dependencies
|
||||||
run: |
|
run: |
|
||||||
@ -174,8 +173,9 @@ jobs:
|
|||||||
|
|
||||||
- name: Replace node with cross-compile equivalent
|
- name: Replace node with cross-compile equivalent
|
||||||
run: |
|
run: |
|
||||||
wget https://nodejs.org/dist/${NODE_VERSION}/node-${NODE_VERSION}-linux-${npm_config_arch}.tar.xz
|
node_version=$(node --version)
|
||||||
tar -xf node-${NODE_VERSION}-linux-${npm_config_arch}.tar.xz node-${NODE_VERSION}-linux-${npm_config_arch}/bin/node --strip-components=2
|
wget https://nodejs.org/dist/${node_version}/node-${node_version}-linux-${npm_config_arch}.tar.xz
|
||||||
|
tar -xf node-${node_version}-linux-${npm_config_arch}.tar.xz node-${node_version}-linux-${npm_config_arch}/bin/node --strip-components=2
|
||||||
mv ./node ./release-standalone/lib/node
|
mv ./node ./release-standalone/lib/node
|
||||||
|
|
||||||
# NOTE@jsjoeio - we do this so we can strip out the v
|
# NOTE@jsjoeio - we do this so we can strip out the v
|
||||||
@ -205,10 +205,10 @@ jobs:
|
|||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install Node.js v18
|
- name: Install Node.js
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: "18.15.0"
|
node-version-file: .node-version
|
||||||
|
|
||||||
- name: Install nfpm
|
- name: Install nfpm
|
||||||
run: |
|
run: |
|
||||||
|
4
.github/workflows/security.yaml
vendored
4
.github/workflows/security.yaml
vendored
@ -29,10 +29,10 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Install Node.js v18
|
- name: Install Node.js
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: "18"
|
node-version-file: .node-version
|
||||||
|
|
||||||
- name: Audit yarn for vulnerabilities
|
- name: Audit yarn for vulnerabilities
|
||||||
run: yarn audit
|
run: yarn audit
|
||||||
|
@ -1 +1 @@
|
|||||||
18
|
18.15.0
|
||||||
|
Reference in New Issue
Block a user