@@ -3,64 +3,37 @@ FROM ghcr.io/dependabot/dependabot-updater-core
33# Check for updates at https://github.com/nodejs/corepack/releases
44ARG COREPACK_VERSION=0.33.0
55
6- # Check for updates at https://github.com/pnpm/pnpm/releases
7- ARG PNPM_VERSION=9.15.5
8-
9- # Check for updates at https://github.com/yarnpkg/berry/releases
10- ARG YARN_VERSION=4.5.3
11-
126# Check for updates at https://github.com/oven-sh/bun/releases
137ARG BUN_VERSION=1.2.5
148
159# See https://github.com/nodesource/distributions#installation-instructions
1610ARG NODEJS_VERSION=20
1711
18- # Check for updates at https://github.com/npm/cli/releases
19- # This version should be compatible with the Node.js version declared above. See https://nodejs.org/en/download/releases as well
20- # TODO: Upgrade to 9.6.7 depending on the outcome of https://github.com/npm/cli/issues/6742
21- ARG NPM_VERSION=9.6.5
22-
23- # Install Node and npm
12+ # Install Node and bun
2413RUN mkdir -p /etc/apt/keyrings \
2514 && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
2615 && echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_${NODEJS_VERSION}.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \
2716 && apt-get update \
2817 && apt-get install -y --no-install-recommends \
2918 nodejs \
3019 && rm -rf /var/lib/apt/lists/* \
31- && npm install -g corepack@$COREPACK_VERSION \
3220 && npm install -g corepack@$COREPACK_VERSION bun@$BUN_VERSION \
3321 && rm -rf ~/.npm
3422
3523USER dependabot
3624
37- # Install pnpm and set it to a stable version
38- RUN corepack install pnpm@$PNPM_VERSION --global
39-
40- # Install yarn berry and set it to a stable version
41- RUN corepack install yarn@$YARN_VERSION --global
42-
43- # Install npm and set it to a stable version
44- RUN corepack install npm@$NPM_VERSION --global
45-
4625ENV DEPENDABOT_NATIVE_HELPERS_PATH="/opt"
4726COPY --chown=dependabot:dependabot bun/helpers /opt/bun/helpers
4827RUN bash /opt/bun/helpers/build
4928
50- # START: HACKY WORKAROUND FOR NPM GIT INSTALLS SPAWNING CHILD PROCESS
51-
52- # TODO: Remove these hacks once we've deprecated npm 6 support as it no longer
53- # spawns a child process to npm install git dependencies.
54-
5529# Create the config file manually instead of using yarn/npm config set as this
5630# executes the package manager outputs to every job log
57- COPY --chown=dependabot:dependabot updater/config/.yarnrc updater/config/.npmrc $DEPENDABOT_HOME/
31+ # This is here because bun supports .npmrc as well. See https://bun.com/docs/pm/npmrc#npmrc-support
32+ COPY --chown=dependabot:dependabot updater/config/.npmrc $DEPENDABOT_HOME/
5833
59- # For Yarn Berry we can set this via an environment variable
34+ # Configure Node to use our custom CA bundle
6035ENV NODE_EXTRA_CA_CERTS=/etc/ssl/certs/ca-certificates.crt
6136
62- # END: HACKY WORKAROUND FOR NPM GIT INSTALLS SPAWNING CHILD PROCESS
63-
6437COPY --chown=dependabot:dependabot bun $DEPENDABOT_HOME/bun
6538COPY --chown=dependabot:dependabot common $DEPENDABOT_HOME/common
6639COPY --chown=dependabot:dependabot updater $DEPENDABOT_HOME/dependabot-updater
0 commit comments