Skip to content

Commit 7ff6a8a

Browse files
geroplona-agent
andcommitted
[npm] Switch to npm (v11.7) publish with OIDC support
Co-authored-by: Ona <[email protected]>
1 parent ad15590 commit 7ff6a8a

File tree

5 files changed

+1982
-7
lines changed

5 files changed

+1982
-7
lines changed

.devcontainer/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
FROM ubuntu:jammy
22

3+
ENV REBUILD_TRIGGER=1
4+
35
ADD https://raw.githubusercontent.com/gitpod-io/workspace-images/main/base/install-packages /usr/bin/install-packages
46
RUN chmod +x /usr/bin/install-packages
57

@@ -354,6 +356,8 @@ RUN cd /opt/npm-tools && \
354356
ln -sf "$bin" /usr/local/bin/$(basename "$bin"); \
355357
done && \
356358
rm -rf ~/.npm/_cacache
359+
# Install newer version of "npm" separately, so it's not overshadowed by the version installed by nvm
360+
RUN ln -sf /opt/npm-tools/node_modules/.bin/npm /usr/local/bin/npm-11.7
357361

358362
ENV PATH=$PATH:/root/.aws-iam:/root/.terraform:/workspace/bin
359363

components/gitpod-protocol/scripts/publish.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,12 @@ const tag = qualifier.substr(0, qualifier.lastIndexOf("."));
3737

3838
child_process.execSync(
3939
[
40-
"yarn",
41-
"--cwd",
42-
pckDir,
40+
"npm-11.7",
4341
"publish",
4442
"--tag",
4543
tag,
4644
"--access",
4745
"public",
48-
"--ignore-scripts",
49-
"--network-timeout",
50-
"300000",
5146
].join(" "),
52-
{ stdio: "inherit" },
47+
{ stdio: "inherit", cwd: pckDir },
5348
);

dev/image/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,8 @@ RUN sudo chown -R gitpod:gitpod /opt/npm-tools && \
145145
sudo ln -sf "$bin" /usr/local/bin/$(basename "$bin"); \
146146
done && \
147147
rm -rf ~/.npm/_cacache
148+
# Install newer version of "npm" separately, so it's not overshadowed by the version installed by nvm
149+
RUN ln -sf /opt/npm-tools/node_modules/.bin/npm /usr/local/bin/npm-11.7
148150

149151
## Register leeway autocompletion in bashrc
150152
RUN bash -c "echo . \<\(leeway bash-completion\) >> ~/.bashrc"

0 commit comments

Comments
 (0)