Skip to content

chore: upgrade nodejs tooling #14134

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

Merged
merged 14 commits into from
Aug 2, 2024
6 changes: 3 additions & 3 deletions .github/actions/setup-node/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ runs:
- name: Install pnpm
uses: pnpm/action-setup@v3
with:
version: 9
version: 9.6
- name: Setup Node
uses: actions/setup-node@v4.0.1
uses: actions/setup-node@v4.0.3
with:
node-version: 18.19.0
node-version: 20.16.0
# See https://github.com/actions/setup-node#caching-global-packages-data
cache: "pnpm"
cache-dependency-path: ${{ inputs.directory }}/pnpm-lock.yaml
Expand Down
40 changes: 16 additions & 24 deletions dogfood/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ COPY files /
# We used to copy /etc/sudoers.d/* in from files/ but this causes issues with
# permissions and layer caching. Instead, create the file directly.
RUN mkdir -p /etc/sudoers.d && \
echo 'coder ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/nopasswd && \
echo 'coder ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/nopasswd && \
chmod 750 /etc/sudoers.d/ && \
chmod 640 /etc/sudoers.d/nopasswd

Expand Down Expand Up @@ -178,10 +178,10 @@ RUN apt-get update --quiet && apt-get install --yes \
# NOTE: In scripts/Dockerfile.base we specifically install Terraform version 1.9.2.
# Installing the same version here to match.
RUN wget -O /tmp/terraform.zip "https://releases.hashicorp.com/terraform/1.9.2/terraform_1.9.2_linux_amd64.zip" && \
unzip /tmp/terraform.zip -d /usr/local/bin && \
rm -f /tmp/terraform.zip && \
chmod +x /usr/local/bin/terraform && \
terraform --version
unzip /tmp/terraform.zip -d /usr/local/bin && \
rm -f /tmp/terraform.zip && \
chmod +x /usr/local/bin/terraform && \
terraform --version

# Install the docker buildx component.
RUN DOCKER_BUILDX_VERSION=$(curl -s "https://api.github.com/repos/docker/buildx/releases/latest" | grep '"tag_name":' | sed -E 's/.*"(v[^"]+)".*/\1/') && \
Expand All @@ -203,16 +203,17 @@ RUN LAZYGIT_VERSION=$(curl -s "https://api.github.com/repos/jesseduffield/lazygi
tar xf lazygit.tar.gz -C /usr/local/bin lazygit

# Install frontend utilities
RUN apt-get update && \
# Node.js (from nodesource) and Yarn (from yarnpkg)
apt-get install --yes --quiet \
nodejs yarn \
# Install browsers for e2e testing
google-chrome-stable microsoft-edge-beta && \
# Pre-install system dependencies that Playwright needs. npx doesn't work here
# for some reason. See https://github.com/microsoft/playwright-cli/issues/136
npm i -g playwright@1.36.2 pnpm@^9 corepack && playwright install-deps && \
npm cache clean --force
ENV NVM_DIR=/usr/local/nvm
ENV NODE_VERSION=20.16.0
RUN mkdir -p $NVM_DIR
RUN curl https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh | bash
RUN source $NVM_DIR/nvm.sh && \
nvm install $NODE_VERSION && \
nvm use $NODE_VERSION
ENV PATH=$NVM_DIR/versions/node/v$NODE_VERSION/bin:$PATH
# Allow patch updates for npm and pnpm
RUN npm install -g npm@^10.8
RUN npm install -g pnpm@^9.6

# Ensure PostgreSQL binaries are in the users $PATH.
RUN update-alternatives --install /usr/local/bin/initdb initdb /usr/lib/postgresql/16/bin/initdb 100 && \
Expand Down Expand Up @@ -284,15 +285,6 @@ RUN curl --silent --show-error --location --output /usr/local/bin/cloud_sql_prox
curl --silent --show-error --location "https://github.com/aquasecurity/trivy/releases/download/v${TRIVY_VERSION}/trivy_${TRIVY_VERSION}_Linux-64bit.tar.gz" | \
tar --extract --gzip --directory=/usr/local/bin --file=- trivy

# Add Vercel globally. We can't install it in packages.json, because it
# includes Go files which make golangci-lint unhappy.
RUN yarn global add --prefix=/usr/local \
vercel \
typescript \
typescript-language-server \
prettier && \
yarn cache clean

# We use yq during "make deploy" to manually substitute out fields in
# our helm values.yaml file. See https://github.com/helm/helm/issues/3141
#
Expand Down
16 changes: 0 additions & 16 deletions dogfood/files/etc/apt/preferences.d/google-chrome

This file was deleted.

12 changes: 0 additions & 12 deletions dogfood/files/etc/apt/preferences.d/microsoft-edge

This file was deleted.

9 changes: 0 additions & 9 deletions dogfood/files/etc/apt/preferences.d/nodesource

This file was deleted.

9 changes: 0 additions & 9 deletions dogfood/files/etc/apt/preferences.d/yarnpkg

This file was deleted.

1 change: 0 additions & 1 deletion dogfood/files/etc/apt/sources.list.d/google-chrome.list

This file was deleted.

1 change: 0 additions & 1 deletion dogfood/files/etc/apt/sources.list.d/microsoft-edge.list

This file was deleted.

1 change: 0 additions & 1 deletion dogfood/files/etc/apt/sources.list.d/nodesource.list

This file was deleted.

1 change: 0 additions & 1 deletion dogfood/files/etc/apt/sources.list.d/yarnpkg.list

This file was deleted.

4 changes: 0 additions & 4 deletions dogfood/files/etc/default/google-chrome

This file was deleted.

4 changes: 0 additions & 4 deletions dogfood/files/etc/default/microsoft-edge-beta

This file was deleted.

Binary file not shown.
Binary file removed dogfood/files/usr/share/keyrings/microsoft.gpg
Binary file not shown.
Binary file removed dogfood/files/usr/share/keyrings/nodesource.gpg
Binary file not shown.
Binary file removed dogfood/files/usr/share/keyrings/yarnpkg.gpg
Binary file not shown.
2 changes: 1 addition & 1 deletion offlinedocs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@
},
"engines": {
"npm": ">=9.0.0 <10.0.0",
"node": ">=18.0.0 <19.0.0"
"node": ">=18.0.0 <21.0.0"
}
}
2 changes: 1 addition & 1 deletion site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"@xterm/xterm": "5.5.0",
"ansi-to-html": "0.7.2",
"axios": "1.7.2",
"canvas": "2.11.0",
"canvas": "3.0.0-rc2",
"chart.js": "4.4.0",
"chartjs-adapter-date-fns": "3.0.0",
"chartjs-plugin-annotation": "3.0.1",
Expand Down
Loading
Loading