mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Ignore invalid ranges
They cannot be cache since multiple commits/branches may map to the same version number which would lead to unpredictable results.
This commit is contained in:
committed by
Kevin Sawicki
parent
1bf8f516c3
commit
2954aacb1c
@@ -45,10 +45,8 @@ loadFolderCompatibility = (modulePath, rootPath, rootMetadata, moduleCache) ->
|
||||
try
|
||||
new semver.Range(version)
|
||||
catch error
|
||||
invalidVersion = version
|
||||
version = JSON.parse(fs.readFileSync(path.join(nodeModulesPath, name, 'package.json')))?.version
|
||||
dependencies[name] = version
|
||||
console.log "Normalized #{name}: #{invalidVersion} -> #{version}"
|
||||
delete dependencies[name]
|
||||
console.log "Ignoring invalid range: #{name} #{version}"
|
||||
|
||||
onDirectory = (childPath) ->
|
||||
path.basename(childPath) isnt 'node_modules'
|
||||
|
||||
Reference in New Issue
Block a user