Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .claude/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,12 @@
"ask": [
"Bash(yarn install:*)",
"Bash(yarn add:*)",
"Bash(yarn upgrade:*)",
"Bash(yarn up:*)",
"Bash(npm install:*)",
"Bash(npm i:*)",
"Bash(go get:*)",
"Bash(go mod:*)",

"Bash(oc delete:*)",
"Bash(oc apply:*)",
"Bash(oc create:*)",
Expand Down Expand Up @@ -129,4 +129,4 @@
"Bash(yarn dev)"
]
}
}
}
2 changes: 1 addition & 1 deletion .claude/skills/update-package/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Update the specified package to its reasonably latest stable version or to the v

### Phase 1: Analysis & Update
1. **Identify**: Read `package.json` for current version (dependencies/devDependencies/resolutions)
2. **Research**: Use `yarn info <package> version` for latest version
2. **Research**: Use `yarn npm info <package> --json | jq -r '.["dist-tags"].latest'` to find latest version; compare with current version; determine if update is needed
3. **Interactive Gather**: Ask user:
- "Do you have a migration guide URL for this update?" (optional)
- "Do you have a changelog/release notes URL?" (optional)
Expand Down
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
vendor/* linguist-generated=true
.yarn/releases/** binary
.yarn/plugins/** binary
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
.env
.idea
.vscode

# Yarn v4 (Berry)
.yarn/*
install-state.gz
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
!/vendor/**
!.vscode/settings.json
.DS_Store
Expand Down
19 changes: 12 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,21 @@ ADD . .

USER 0

ARG YARN_VERSION=v1.22.22
ARG COREPACK_VERSION=0.34.6

# bootstrap yarn so we can install and run the other tools.
RUN CACHED_YARN=./artifacts/yarn-${YARN_VERSION}.tar.gz; \
if [ -f ${CACHED_YARN} ]; then \
npm install ${CACHED_YARN}; \
# bootstrap corepack so we can install and run the other tools.
RUN CACHED_COREPACK=./artifacts/corepack-${COREPACK_VERSION}.tar.gz; \
if [ -f ${CACHED_COREPACK} ]; then \
npm install --global ${CACHED_COREPACK}; \
else \
npm install https://github.com/yarnpkg/yarn/releases/download/${YARN_VERSION}/yarn-${YARN_VERSION}.tar.gz; \
npm install --global https://github.com/nodejs/corepack/releases/download/v${COREPACK_VERSION}/corepack.tgz; \
fi

RUN npx corepack enable
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By default, Corepack will setup all supported package managers - we just need Yarn.

Suggested change
RUN npx corepack enable
RUN npx corepack enable yarn

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was hoping by making it generic we won't need to change this again for when we want pnpm

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, in that case we can keep it generic.


# assume our package manager is safe to download
ENV COREPACK_ENABLE_DOWNLOAD_PROMPT=0

# The REMOTE_SOURCES value is set by the build system to indicate the location of the cachito-backed artifacts cache.
# As cachito might not be available in all environments, we need to make sure the value is set before trying to use it and
# that the COPY layer below doesn't fail. Setting it to be the Dockerfile itself is fairly safe, as it will always be
Expand All @@ -39,7 +44,7 @@ COPY $REMOTE_SOURCES $REMOTE_SOURCES_DIR
# use dependencies provided by Cachito
RUN test -d ${REMOTE_SOURCES}/cachito-gomod-with-deps || exit 0; \
cp -f $REMOTE_SOURCES_DIR/cachito-gomod-with-deps/app/registry-ca.pem . \
&& cp -f $REMOTE_SOURCES_DIR/cachito-gomod-with-deps/app/frontend/{.npmrc,.yarnrc,yarn.lock} frontend/
&& cp -f $REMOTE_SOURCES_DIR/cachito-gomod-with-deps/app/frontend/{.npmrc,.yarnrc.yml,yarn.lock} frontend/

# prevent download of cypress binary as part of module installs
ENV CYPRESS_INSTALL_BINARY=0
Expand Down
16 changes: 8 additions & 8 deletions Dockerfile.builder
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@

FROM golang:1.22-bullseye

### Install NodeJS and yarn
### Install NodeJS and corepack
ENV NODE_VERSION="v22.14.0"
ENV YARN_VERSION="v1.22.22"
ENV COREPACK_VERSION="0.34.6"

# assume our package manager is safe to download
ENV COREPACK_ENABLE_DOWNLOAD_PROMPT=0

# yarn needs a home writable by any user running the container
ENV HOME=/opt/home
Expand Down Expand Up @@ -43,9 +46,6 @@ RUN chmod 777 /usr/local/lib/node_modules
# cleanup
RUN rm -rf /tmp/node-v*

RUN cd /tmp && \
wget --quiet -O /tmp/yarn.tar.gz https://github.com/yarnpkg/yarn/releases/download/${YARN_VERSION}/yarn-${YARN_VERSION}.tar.gz && \
tar xf yarn.tar.gz && \
rm -f /tmp/yarn.tar.gz && \
mv /tmp/yarn-${YARN_VERSION} /usr/local/yarn && \
ln -s /usr/local/yarn/bin/yarn /usr/local/bin/yarn
# Install corepack
RUN npm install -g corepack@${COREPACK_VERSION} && \
corepack enable
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The console is a more friendly `kubectl` in the form of a single page webapp. It

### Dependencies:

1. [node.js](https://nodejs.org/) >= 22 & [yarn classic](https://classic.yarnpkg.com/en/docs/install) >= 1.20
1. [node.js](https://nodejs.org/) >= 22 with [corepack](https://npmjs.com/package/corepack) enabled for [yarn berry](https://yarnpkg.com/)
2. [go](https://golang.org/) >= 1.22+
3. [oc](https://mirror.openshift.com/pub/openshift-v4/clients/oc/latest/) or [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/) and an OpenShift or Kubernetes cluster
4. [jq](https://stedolan.github.io/jq/download/) (for `contrib/environment.sh`)
Expand Down Expand Up @@ -407,20 +407,19 @@ yarn add <package@version>
Update existing frontend dependencies:

```
yarn upgrade <package@version>
yarn up <package@version>
```

To upgrade yarn itself, download a new yarn release from
<https://github.com/yarnpkg/yarn/releases>, replace the release in
`frontend/.yarn/releases` with the new version, and update `yarn-path` in
`frontend/.yarnrc`.
To upgrade yarn itself, run `yarn set version <version>` in `frontend` directory. This will update the yarn
release file in `frontend/.yarn/releases` and the `yarnPath` in `frontend/.yarnrc.yml`, as well as the
`packageManager` field in `frontend/package.json`.

##### @patternfly

Note that when upgrading @patternfly packages, we've seen in the past that it can cause the JavaScript heap to run out of memory, or the bundle being too large if multiple versions of the same @patternfly package is pulled in. To increase efficiency, run the following after updating packages:

```
yarn run dedupe-deps --scopes @patternfly
yarn dedupe --strategy highest
```

Please note that PatternFly releases do not strictly follow semantic versioning. Therefore, it's important
Expand Down
1 change: 1 addition & 0 deletions dynamic-demo-plugin/.yarn/releases
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this link really needed? Why not just update demo plugin .yarnrc.yml

yarnPath: ../frontend/.yarn/releases/yarn-4.12.0.cjs

Copy link
Member Author

@logonoff logonoff Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is to reduce config file duplication of .yarnrc.yml

7 changes: 0 additions & 7 deletions dynamic-demo-plugin/.yarnrc

This file was deleted.

1 change: 1 addition & 0 deletions dynamic-demo-plugin/.yarnrc.yml
13 changes: 7 additions & 6 deletions dynamic-demo-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
"build": "yarn clean && NODE_ENV=production yarn ts-node node_modules/.bin/webpack",
"build-dev": "yarn clean && yarn ts-node node_modules/.bin/webpack",
"build-plugin-sdk": "yarn --cwd ../frontend build-plugin-sdk && yarn install-plugin-sdk",
"install-plugin-sdk": "rm -rf node_modules/@openshift-console && yarn install --check-files",
"install-plugin-sdk": "rm -rf node_modules/@openshift-console && yarn install",
"start-console": "./start-console.sh",
"http-server": "./http-server.sh dist",
"i18n": "i18next \"src/**/*.{js,jsx,ts,tsx}\" [-oc] -c i18next-parser.config.js",
"ts-node": "ts-node -O '{\"module\":\"commonjs\"}'"
"i18n": "i18next \"src/**/*.{js,jsx,ts,tsx}\" -c i18next-parser.config.js",
"ts-node": "NODE_OPTIONS='--preserve-symlinks' ts-node -O '{\"module\":\"commonjs\"}'"
},
"devDependencies": {
"@openshift-console/dynamic-plugin-sdk": "file:../frontend/packages/console-dynamic-plugin-sdk/dist/core",
"@openshift-console/dynamic-plugin-sdk-webpack": "file:../frontend/packages/console-dynamic-plugin-sdk/dist/webpack",
"@openshift-console/dynamic-plugin-sdk": "portal:../frontend/packages/console-dynamic-plugin-sdk/dist/core",
"@openshift-console/dynamic-plugin-sdk-webpack": "portal:../frontend/packages/console-dynamic-plugin-sdk/dist/webpack",
"@patternfly/react-core": "^6.2.2",
"@patternfly/react-icons": "^6.2.2",
"@patternfly/react-table": "^6.2.2",
Expand Down Expand Up @@ -77,5 +77,6 @@
"utilityConsumer": "./components/UtilityConsumer.tsx",
"yamlEditor": "./components/YAMLEditorPage.tsx"
}
}
},
"packageManager": "yarn@4.12.0"
}
Loading