fix: filter out unsupported atom-shell era Electron versions - #214
Merged
Conversation
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
approved these changes
Jun 28, 2026
MarshallOfSound
marked this pull request as ready for review
June 28, 2026 17:25
ckerr
approved these changes
Jun 29, 2026
|
🎉 This PR is included in version 2.2.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Samuel Attard · Slack thread
Before / After
Before:
BaseVersions.setVersions()parsed every version it was handed, so very old0.2xreleases (theatom-shellera, e.g.0.20.0,0.24.0,0.29.2) leaked into.versionsandgetReleaseInfo(). 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.2is dropped during parsing. Everything0.30.0and newer (the oldest supported, Aug 2015) is kept. The leaked0.2xversions no longer appear in.versionsand have noReleaseInfo.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 insetVersions()— the version-object path and the string path — and gatesreleaseInfopopulation 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 the0.2prefix. 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.0can never start with0.2), and it shipped no tests. This PR uses the single0.2prefix 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