Skip to content

chore: properly filter unsupported Electron versions #139

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 2 commits into
base: main
Choose a base branch
from

Conversation

harshcodesss
Copy link

Description

This PR updates the version filtering logic to properly exclude unsupported Electron versions. Fixes #137

Problem:

  • The current implementation doesn't properly filter out:
    • Versions older than 0.30.0
    • Legacy atom-shell versions (0.2.x series)

Solution:

  • Implemented dual filtering in BaseVersions.setVersions()
    • semver.gte() for minimum version check (≥0.30.0)
    • Explicit 0.2.x exclusion for atom-shell versions
  • Synchronized release info filtering with version criteria

Changes Made

  • Updated semver import to include comparison function(gte):
    import { parse as semverParse, SemVer, gte } from 'semver';
  • Added dual filtering in both object and string version handling paths
    .filter((sem) => sem && gte(sem, '0.30.0'))
    .filter((sem) => !sem.version.startsWith('0.2'))

@harshcodesss harshcodesss requested a review from a team as a code owner March 16, 2025 12:08
Copy link
Member

@dsanders11 dsanders11 left a comment

Choose a reason for hiding this comment

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

This PR includes redundant filtering - if a version is gte 0.30.0 then it can't start with 0.2. It also needs test coverage.

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.

Fix Minimum Supported Version Logic for Electron Versions
2 participants