Skip to content

Commit da3a93f

Browse files
committed
yarn 4.9.4 update related fixes
1 parent 7e1df86 commit da3a93f

File tree

12 files changed

+31
-4
lines changed

12 files changed

+31
-4
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
55
"ghcr.io/devcontainers/features/azure-cli:1": {}
66
},
7-
"postCreateCommand": "corepack enable && corepack prepare yarn@4.9.4 --activate && npm install -g @devcontainers/cli",
7+
"postCreateCommand": "sudo corepack enable && corepack prepare yarn@4.9.4 --activate && npm install -g @devcontainers/cli",
88
"customizations": {
99
"vscode": {
1010
"extensions": [

.github/workflows/push-again.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ jobs:
6060
6161
# Setup build CLI
6262
cd "$GITHUB_WORKSPACE/ref"
63+
# This is required to set yarn 4.9.4 as the global yarn version in the runner is 1.22.22
64+
corepack enable
65+
corepack prepare yarn@4.9.4 --activate
6366
yarn install
6467
npm install -g @devcontainers/cli
6568

.github/workflows/push-dev.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ jobs:
4848
ACR_REGISTRY_NAME=$(echo "$REGISTRY" | grep -oP '(.+)(?=\.azurecr\.io)')
4949
az acr login --name $ACR_REGISTRY_NAME --username $TOKEN_NAME --password $PASSWORD
5050
51+
# This is required to set yarn 4.9.4 as the global yarn version in the runner is 1.22.22
52+
corepack enable
53+
corepack prepare yarn@4.9.4 --activate
5154
# Build and push dev images
5255
yarn install
5356
npm install -g @devcontainers/cli

.github/workflows/push-manual-dev.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ jobs:
5656
5757
# Setup build CLI
5858
cd "$GITHUB_WORKSPACE/ref"
59+
# This is required to set yarn 4.9.4 as the global yarn version in the runner is 1.22.22
60+
corepack enable
61+
corepack prepare yarn@4.9.4 --activate
5962
yarn install
6063
npm install -g @devcontainers/cli
6164

.github/workflows/push.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ jobs:
5151
ACR_REGISTRY_NAME=$(echo "$REGISTRY" | grep -oP '(.+)(?=\.azurecr\.io)')
5252
az acr login --name $ACR_REGISTRY_NAME --username $TOKEN_NAME --password $PASSWORD
5353
54+
# This is required to set yarn 4.9.4 as the global yarn version in the runner is 1.22.22
55+
corepack enable
56+
corepack prepare yarn@4.9.4 --activate
5457
# Build and push images
5558
yarn install
5659
npm install -g @devcontainers/cli

.github/workflows/version-history.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ jobs:
6464
ACR_REGISTRY_NAME=$(echo "$REGISTRY" | grep -oP '(.+)(?=\.azurecr\.io)')
6565
az acr login --name $ACR_REGISTRY_NAME --username $TOKEN_NAME --password $PASSWORD
6666
67+
# This is required to set yarn 4.9.4 as the global yarn version in the runner is 1.22.22
68+
corepack enable
69+
corepack prepare yarn@4.9.4 --activate
6770
yarn install
6871
RELEASE_STRING=$(echo "${{ inputs.release }}" | grep -oP 'refs/(heads|tags)/\K(.+)')
6972
OVERWRITE_STRING=$(if [ "${{ inputs.overwrite }}" = "false" ]; then echo '--no-overwrite'; else echo '--overwrite'; fi)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
.yarn/*
12
package-lock.json
23
yarn.lock

src/javascript-node/test-project/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@
1010
},
1111
"dependencies": {
1212
"express": "^4.16.1"
13-
}
13+
},
14+
"packageManager": "yarn@4.9.4"
1415
}

src/javascript-node/test-project/test.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
cd $(dirname "$0")
33

44
source test-utils.sh node
5+
check "yarn_version" yarn --version
6+
sudo corepack enable && corepack prepare yarn@4.9.4 --activate
7+
check "yarn_version_new" yarn --version
58

69
# Run common tests
710
checkCommon
@@ -11,6 +14,7 @@ check "node" node --version
1114
npm_version=$(npm --version)
1215
check-version-ge "npm-requirement" "${npm_version}" "9.8.1"
1316
sudo rm -f yarn.lock
17+
sudo touch yarn.lock
1418
check "yarn" yarn install
1519
sudo rm -f package-lock.json
1620
check "npm" npm install
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
.yarn/*
12
package-lock.json
23
yarn.lock

0 commit comments

Comments
 (0)