Skip to content

Fix: prevent default installation of JetBrains pre-releases #859

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

priyagupta108
Copy link
Contributor

Description:
This update ensures that JetBrains Runtime pre-release (EA) versions are excluded by default unless explicitly requested. This prevents unintended installation of EA builds when specifying a standard version like 21.

Related issue:
#829

Check list:

  • Mark if documentation changes are required.
  • Mark if tests were added or updated to cover the changes.

@Copilot Copilot AI review requested due to automatic review settings June 17, 2025 09:58
@priyagupta108 priyagupta108 requested a review from a team as a code owner June 17, 2025 09:58
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the JetBrains distributions handling to prevent the default installation of pre-release (EA) versions unless explicitly requested. Key changes include updating the raw version interface to include a prerelease flag and changing the build property type, and modifying the installer logic to filter versions based on the stability setting.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/distributions/jetbrains/models.ts Added the prerelease flag and changed the build property from a number to a string.
src/distributions/jetbrains/installer.ts Adjusted version filtering logic to include the new prerelease field and updated build parsing.
Comments suppressed due to low confidence (3)

src/distributions/jetbrains/models.ts:12

  • Changing the build property type from number to string may affect consumers of this API. Please verify that all dependent logic now correctly treats build as a string.
build: string;

src/distributions/jetbrains/installer.ts:164

  • [nitpick] With the build property now being a string, ensure that all logic relying on the build value (e.g., version comparisons) correctly handles string values instead of numbers.
const build = vsplit[1];

src/distributions/jetbrains/installer.ts:126

  • [nitpick] The filtering logic based on the stable flag now directly uses the prerelease field. Ensure this behavior is well-tested so that only the intended versions are selected based on the stability preference.
this.stable ? !version.prerelease : version.prerelease

@priyagupta108 priyagupta108 self-assigned this Jun 23, 2025
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.

1 participant