Skip to content

Commit e3a567a

Browse files
authored
chore: delete global folder in benchmarks (#5523)
**What's the problem this PR addresses?** - 07b4ceb changed the metadata cache structure but didn't update the benchmark script to match. - We're not removing the `$globalFolder/index` folder so `install-full-cold` is skipping some work. Follow-up to #5491 **How did you fix it?** Clear the entire global folder. **Checklist** - [x] I have read the [Contributing Guide](https://yarnpkg.com/advanced/contributing). - [x] I have set the packages that need to be released for my changes to be effective. - [x] I will check that all automated PR checks pass before the PR gets reviewed.
1 parent 4897712 commit e3a567a

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

scripts/bench-run.sh

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,8 @@ case $PACKAGE_MANAGER in
7979
;;
8080
yarn)
8181
setup-yarn2
82-
# TODO: Use `yarn cache clean` instead of manually removing the npm metadata once the feature is implemented
8382
bench install-full-cold \
84-
--prepare 'rm -rf .yarn .pnp.* yarn.lock "$(yarn config get globalFolder)/npm-metadata" && yarn cache clean --all' \
83+
--prepare 'rm -rf .yarn .pnp.* yarn.lock .yarn-global' \
8584
'yarn install'
8685
bench install-cache-only \
8786
--prepare 'rm -rf .yarn .pnp.* yarn.lock' \
@@ -96,9 +95,8 @@ case $PACKAGE_MANAGER in
9695
yarn-nm)
9796
setup-yarn2
9897
setup-yarn2-nm
99-
# TODO: Use `yarn cache clean` instead of manually removing the npm metadata once the feature is implemented
10098
bench install-full-cold \
101-
--prepare 'rm -rf .yarn node_modules yarn.lock "$(yarn config get globalFolder)/npm-metadata" && yarn cache clean --all' \
99+
--prepare 'rm -rf .yarn node_modules yarn.lock .yarn-global' \
102100
'yarn install'
103101
bench install-cache-only \
104102
--prepare 'rm -rf .yarn node_modules yarn.lock' \
@@ -113,9 +111,8 @@ case $PACKAGE_MANAGER in
113111
yarn-pnpm)
114112
setup-yarn2
115113
setup-yarn2-pnpm
116-
# TODO: Use `yarn cache clean` instead of manually removing the npm metadata once the feature is implemented
117114
bench install-full-cold \
118-
--prepare 'rm -rf .yarn node_modules yarn.lock "$(yarn config get globalFolder)/npm-metadata" && yarn cache clean --all' \
115+
--prepare 'rm -rf .yarn node_modules yarn.lock .yarn-global' \
119116
'yarn install'
120117
bench install-cache-only \
121118
--prepare 'rm -rf .yarn node_modules yarn.lock' \

0 commit comments

Comments
 (0)