Skip to content

feat: add pnpm completion script #23

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

feat: add pnpm completion script #23

wants to merge 4 commits into from

Conversation

AmirSa12
Copy link
Member

No description provided.

@AmirSa12 AmirSa12 marked this pull request as draft April 12, 2025 11:45
Copy link

pkg-pr-new bot commented Apr 12, 2025

Open in StackBlitz

npm i https://pkg.pr.new/bombshell-dev/tab@23

commit: 07acf01

Copy link
Collaborator

@Aslemammad Aslemammad left a comment

Choose a reason for hiding this comment

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

Amazing work, this made me way more excited on tab again.

The reason is that we cover all of the ecosystem now, even those who do not use tab for their libraries like regular users can benefit from tab in a tangible way.

Copy link

changeset-bot bot commented Apr 15, 2025

⚠️ No Changeset found

Latest commit: 07acf01

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@AmirSa12 AmirSa12 requested review from 43081j and dreyfus92 April 15, 2025 20:24
Copy link
Member

@dreyfus92 dreyfus92 left a comment

Choose a reason for hiding this comment

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

this looks really good, i just left a suggestion in your script dunno if we should leave it for later on or it could be manageable to handle it in this same pr, i also would like to add is a bit of docs, like adding a section in the README.md

Comment on lines +118 to +143
case $state in
filter)
if [[ -f ./pnpm-workspace.yaml ]] && [[ -x "$pnpm_comp_bin" ]]; then
_pnpm_tab_debug "Using pnpm-shell-completion for filter packages"
_values 'filter packages' $(FEATURE=filter $pnpm_comp_bin)
else
_pnpm_tab_debug "No workspace or pnpm-shell-completion for filter"
_message "package filter"
fi
;;
scripts)
if [[ -x "$pnpm_comp_bin" ]]; then
_pnpm_tab_debug "Using pnpm-shell-completion for scripts"
_values 'scripts' $(FEATURE=scripts TARGET_PKG=$target_pkg ZSH=true $pnpm_comp_bin) \
add remove install update publish
else
_pnpm_tab_debug "Using basic pnpm commands (no pnpm-shell-completion)"
_values 'scripts' \
'add:Add a dependency' \
'install:Install dependencies' \
'remove:Remove a dependency' \
'update:Update dependencies' \
'publish:Publish package' \
'run:Run script'
fi
;;
Copy link
Member

@dreyfus92 dreyfus92 Apr 30, 2025

Choose a reason for hiding this comment

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

i'm just throwing an idea here, but dunno if you explored the possibility of having a caching utility, then use it within the filter completion case to use the cache and finally clean that cache file when the script exits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants