Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
yarn 4.9.4 update related fixes
  • Loading branch information
Kaniska244 committed Sep 23, 2025
commit da3a93fab16caae4aaa14c288cac15a9fc575dda
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
"ghcr.io/devcontainers/features/azure-cli:1": {}
},
"postCreateCommand": "corepack enable && corepack prepare yarn@4.9.4 --activate && npm install -g @devcontainers/cli",
"postCreateCommand": "sudo corepack enable && corepack prepare yarn@4.9.4 --activate && npm install -g @devcontainers/cli",
"customizations": {
"vscode": {
"extensions": [
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/push-again.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ jobs:

# Setup build CLI
cd "$GITHUB_WORKSPACE/ref"
# This is required to set yarn 4.9.4 as the global yarn version in the runner is 1.22.22
corepack enable
corepack prepare yarn@4.9.4 --activate
yarn install
npm install -g @devcontainers/cli

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/push-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ jobs:
ACR_REGISTRY_NAME=$(echo "$REGISTRY" | grep -oP '(.+)(?=\.azurecr\.io)')
az acr login --name $ACR_REGISTRY_NAME --username $TOKEN_NAME --password $PASSWORD

# This is required to set yarn 4.9.4 as the global yarn version in the runner is 1.22.22
corepack enable
corepack prepare yarn@4.9.4 --activate
# Build and push dev images
yarn install
npm install -g @devcontainers/cli
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/push-manual-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ jobs:

# Setup build CLI
cd "$GITHUB_WORKSPACE/ref"
# This is required to set yarn 4.9.4 as the global yarn version in the runner is 1.22.22
corepack enable
corepack prepare yarn@4.9.4 --activate
yarn install
npm install -g @devcontainers/cli

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ jobs:
ACR_REGISTRY_NAME=$(echo "$REGISTRY" | grep -oP '(.+)(?=\.azurecr\.io)')
az acr login --name $ACR_REGISTRY_NAME --username $TOKEN_NAME --password $PASSWORD

# This is required to set yarn 4.9.4 as the global yarn version in the runner is 1.22.22
corepack enable
corepack prepare yarn@4.9.4 --activate
# Build and push images
yarn install
npm install -g @devcontainers/cli
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/version-history.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ jobs:
ACR_REGISTRY_NAME=$(echo "$REGISTRY" | grep -oP '(.+)(?=\.azurecr\.io)')
az acr login --name $ACR_REGISTRY_NAME --username $TOKEN_NAME --password $PASSWORD

# This is required to set yarn 4.9.4 as the global yarn version in the runner is 1.22.22
corepack enable
corepack prepare yarn@4.9.4 --activate
yarn install
RELEASE_STRING=$(echo "${{ inputs.release }}" | grep -oP 'refs/(heads|tags)/\K(.+)')
OVERWRITE_STRING=$(if [ "${{ inputs.overwrite }}" = "false" ]; then echo '--no-overwrite'; else echo '--overwrite'; fi)
Expand Down
1 change: 1 addition & 0 deletions src/javascript-node/test-project/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.yarn/*
package-lock.json
yarn.lock
3 changes: 2 additions & 1 deletion src/javascript-node/test-project/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
},
"dependencies": {
"express": "^4.16.1"
}
},
"packageManager": "yarn@4.9.4"
}
4 changes: 4 additions & 0 deletions src/javascript-node/test-project/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
cd $(dirname "$0")

source test-utils.sh node
check "yarn_version" yarn --version
sudo corepack enable && corepack prepare yarn@4.9.4 --activate
check "yarn_version_new" yarn --version

# Run common tests
checkCommon
Expand All @@ -11,6 +14,7 @@ check "node" node --version
npm_version=$(npm --version)
check-version-ge "npm-requirement" "${npm_version}" "9.8.1"
sudo rm -f yarn.lock
sudo touch yarn.lock
check "yarn" yarn install
sudo rm -f package-lock.json
check "npm" npm install
Expand Down
1 change: 1 addition & 0 deletions src/typescript-node/test-project/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.yarn/*
package-lock.json
yarn.lock
4 changes: 2 additions & 2 deletions src/typescript-node/test-project/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
"@types/node": "^18.7.18",
"@typescript-eslint/eslint-plugin": "^5.38.0",
"@typescript-eslint/parser": "^5.38.0",
"vscode-nls-dev": "^4.0.1",
"eslint": "^8.23.1",
"typescript": "^4.8.3"
"typescript": "^4.8.3",
"vscode-nls-dev": "^4.0.1"
}
}
5 changes: 5 additions & 0 deletions src/typescript-node/test-project/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,18 @@
cd $(dirname "$0")

source test-utils.sh node
check "yarn_version" yarn --version
sudo corepack enable && corepack prepare yarn@4.9.4 --activate
check "yarn_version_new" yarn --version

# Run common tests
checkCommon

# Image specific tests
check "node" node --version
sudo rm -f yarn.lock
sudo rm -rf .yarn/*
sudo touch yarn.lock
check "yarn" yarn install
sudo rm -f package-lock.json
check "eslint" eslint --no-warn-ignored src/server.ts
Expand Down
Loading