zsh-users / zsh-completions

Additional completion definitions for Zsh.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`yarn run` package script completions fail for Yarn v4

bitjson opened this issue · comments

When upgrading a project to use Yarn v3's zero-install strategy, completions stop working for package scripts.

E.g. using create-react-app:

❯ yarn create react-app yarn-v3-test-project
[...]

❯ cd yarn-v3-test
❯ yarn --version
1.22.19

❯  yarn run [tab]
build                     -- react-scripts build
eject                     -- react-scripts eject
start                     -- react-scripts start
test                      -- react-scripts test

❯ yarn set version stable
➤ YN0000: Retrieving https://repo.yarnpkg.com/3.3.1/packages/yarnpkg-cli/bin/yarn.js
➤ YN0000: Saving the new release in .yarn/releases/yarn-3.3.1.cjs
➤ YN0000: Done in 0s 371ms

❯ yarn --version
3.3.1

❯ yarn run [tab]
# (error sound plays)

@bitjson Thanks for reporting issue. However I can't reproduce. Do you have perl command in your machine ? yarn completion uses perl.

Thanks for reviewing!

Yes:

❯ perl --version

This is perl 5, version 30, subversion 3 (v5.30.3) built for darwin-thread-multi-2level

Note, completions are working properly for me in repos where I haven't upgraded to Yarn v3, it only fails after I run yarn set version stable in a particular repo.

Are you able to use completions with Yarn v3? (Any recommendations for how I can debug what's happening?)

Thanks I see. I'll try to reproduce this.

Are you able to use completions with Yarn v3? (Any recommendations for how I can debug what's happening?)

I'll check it later. I checked only that I couldn't reproduce the issue by the above procedure.

Closing, as this seems to be working correctly now. (Unsure where the fix occurred, it may have started working in Yarn v4)