Skip to content

refactor(vite_install): centralize Yarn v1/berry branching with is_yarn_berry#1897

Merged
fengmk2 merged 1 commit into
voidzero-dev:mainfrom
jong-kyung:refactor/yarn-helper
Jun 21, 2026
Merged

refactor(vite_install): centralize Yarn v1/berry branching with is_yarn_berry#1897
fengmk2 merged 1 commit into
voidzero-dev:mainfrom
jong-kyung:refactor/yarn-helper

Conversation

@jong-kyung

Copy link
Copy Markdown
Collaborator

Summary

Refactor Yarn version branching in vite_install command handlers to use the shared helper self.is_yarn_berry() instead of direct version string checks (self.version.starts_with("1.") / is_yarn_v1).

Why

Yarn version branching logic (v1 vs berry) was duplicated across many commands.
This change centralizes the check via is_yarn_berry() for better readability and consistency, while keeping behavior unchanged.

What changed

Replaced direct Yarn v1 checks with let is_berry = self.is_yarn_berry();

@netlify

netlify Bot commented Jun 21, 2026

Copy link
Copy Markdown

Deploy Preview for viteplus-preview canceled.

Name Link
🔨 Latest commit 61aa167
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-preview/deploys/6a37967dc267340008b8281d

@jong-kyung jong-kyung self-assigned this Jun 21, 2026
@jong-kyung jong-kyung marked this pull request as ready for review June 21, 2026 07:47
@jong-kyung jong-kyung requested a review from fengmk2 June 21, 2026 07:47

@fengmk2 fengmk2 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@jong-kyung Nice!

@jong-kyung

Copy link
Copy Markdown
Collaborator Author

Managing Yarn seems pretty complicated🥲

@fengmk2 fengmk2 merged commit 111d743 into voidzero-dev:main Jun 21, 2026
40 checks passed
@jong-kyung jong-kyung deleted the refactor/yarn-helper branch June 21, 2026 08:41
@fengmk2

fengmk2 commented Jun 21, 2026

Copy link
Copy Markdown
Member

@jong-kyung Each new package manager doubles the maintenance complexity. 😄

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.

2 participants