mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Cache versions that do not match the range
This commit is contained in:
@@ -7,12 +7,17 @@ class Range extends semver.Range
|
||||
constructor: ->
|
||||
super
|
||||
@matchedVersions = new Set()
|
||||
@unmatchedVersions = new Set()
|
||||
|
||||
test: (version) ->
|
||||
return true if @matchedVersions.has(version)
|
||||
return false if @unmatchedVersions.has(version)
|
||||
|
||||
matches = super
|
||||
@matchedVersions.add(version) if matches
|
||||
if matches
|
||||
@matchedVersions.add(version)
|
||||
else
|
||||
@unmatchedVersions.add(version)
|
||||
matches
|
||||
|
||||
nativeModules = process.binding('natives')
|
||||
|
||||
Reference in New Issue
Block a user