mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-11-10 18:24:09 +03:00
Merge pull request #6295 from atom/ks-require-package-dot-json
Use require to read/parse package.json
This commit is contained in:
commit
e39e25a92e
@ -276,8 +276,7 @@ class PackageManager
|
||||
getPackageDependencies: ->
|
||||
unless @packageDependencies?
|
||||
try
|
||||
metadataPath = path.join(@resourcePath, 'package.json')
|
||||
{@packageDependencies} = JSON.parse(fs.readFileSync(metadataPath)) ? {}
|
||||
@packageDependencies = require('../package.json')?.packageDependencies
|
||||
@packageDependencies ?= {}
|
||||
|
||||
@packageDependencies
|
||||
|
Loading…
Reference in New Issue
Block a user