Skip to content

fix: --compact with --json depUrl #347

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

Merged
merged 3 commits into from
Mar 28, 2025
Merged

fix: --compact with --json depUrl #347

merged 3 commits into from
Mar 28, 2025

Conversation

AmirSa12
Copy link
Member

fixes #340

Copy link

continuous-releases-staging bot commented Mar 28, 2025

Open in Stackblitzexample-1example-2

npm i https://639758f7.stackblitz-cr.pages.dev/stackblitz-labs/pkg.pr.new/pkg-pr-new@347
npm i https://639758f7.stackblitz-cr.pages.dev/stackblitz-labs/pkg.pr.new/playground-a@347
npm i https://639758f7.stackblitz-cr.pages.dev/stackblitz-labs/pkg.pr.new/playground-b@347

commit: 9c828be

@@ -222,7 +222,7 @@ const main = defineCommand({
}

const depUrl = new URL(
`/${owner}/${repo}/${pJson.name}@${sha}`,
`/${owner}/${repo}/${pJson.name}@${isCompact ? abbreviateCommitHash(sha) : sha}`,
Copy link
Member

Choose a reason for hiding this comment

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

i think the condition part can be DRYed with the the change in the bottom

Copy link
Member Author

Choose a reason for hiding this comment

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

Yup! good catch

@Aslemammad Aslemammad merged commit 475e5de into main Mar 28, 2025
6 checks passed
@Aslemammad Aslemammad deleted the fix/compact-json branch March 28, 2025 12:35
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.

The flag --compact with --json doesn't return the short SHA
2 participants