Skip to content

fix: filter out unsupported atom-shell era Electron versions - #214

Merged
MarshallOfSound merged 2 commits into
mainfrom
fix/issue-137-filter-unsupported-versions
Jun 29, 2026
Merged

fix: filter out unsupported atom-shell era Electron versions#214
MarshallOfSound merged 2 commits into
mainfrom
fix/issue-137-filter-unsupported-versions

Conversation

@claude

@claude claude Bot commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Requested by Samuel Attard · Slack thread

Before / After

Before: BaseVersions.setVersions() parsed every version it was handed, so very old 0.2x releases (the atom-shell era, e.g. 0.20.0, 0.24.0, 0.29.2) leaked into .versions and getReleaseInfo(). These releases cannot be downloaded with @electron/get, yet Electron Fiddle itself already hides them from users — so consumers of fiddle-core saw versions Fiddle does not.

After: Any release whose version starts with 0.2 is dropped during parsing. Everything 0.30.0 and newer (the oldest supported, Aug 2015) is kept. The leaked 0.2x versions no longer appear in .versions and have no ReleaseInfo.

How

A small isSupportedVersion() helper sits next to the other version type-guards and returns !version.startsWith('0.2'). It is applied at the two entry points of the existing parse pipeline in setVersions() — the version-object path and the string path — and gates releaseInfo population so filtered versions get no release info either. No new dependency and no change to sorting or the public API.

Cutoff / approach: This mirrors Electron Fiddle's own filter (getReleasedVersions), which is the authoritative source referenced in #137 — Fiddle filters solely on the 0.2 prefix. The 0.30.0 / atom-shell rationale lives in the helper's doc comment for context.

Addresses the #139 feedback: PR #139 was rejected because it combined semver.gte(sem, '0.30.0') with a separate !startsWith('0.2') check, which the maintainer noted is redundant (a version >= 0.30.0 can never start with 0.2), and it shipped no tests. This PR uses the single 0.2 prefix filter that Fiddle actually uses — no redundant comparison — and adds unit-test coverage for both input shapes plus the release-info path.

Fixes #137


Generated by Claude Code

claude and others added 2 commits June 28, 2026 17:19
BaseVersions.setVersions() now drops 0.2x releases (the atom-shell era)
in the parse pipeline, mirroring the filtering Electron Fiddle already
does. These old versions cannot be downloaded with @electron/get, so
they should not appear in the version list.

Fixes #137
Using the point-free `.map(semverParse)` passed the array index as
semverParse's second `optionsOrLoose` argument, which failed the tsc
build. Wrap it in an arrow so only the version string is passed.
@MarshallOfSound
MarshallOfSound marked this pull request as ready for review June 28, 2026 17:25
@MarshallOfSound
MarshallOfSound requested a review from a team as a code owner June 28, 2026 17:25
@MarshallOfSound
MarshallOfSound merged commit c03a2cb into main Jun 29, 2026
11 checks passed
@MarshallOfSound
MarshallOfSound deleted the fix/issue-137-filter-unsupported-versions branch June 29, 2026 18:06
@electron-npm-package-publisher

Copy link
Copy Markdown

🎉 This PR is included in version 2.2.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix Minimum Supported Version Logic for Electron Versions

3 participants