1
0
mirror of https://github.com/JuanCanham/HackMyResume.git synced 2025-07-03 00:41:06 +01:00

chore: update project dependencies

This commit is contained in:
hacksalot
2018-02-12 00:05:29 -05:00
parent 7144126175
commit c4f7350528
71 changed files with 1600 additions and 1737 deletions

View File

@ -12,15 +12,15 @@ module.exports = ( file ) ->
try
ret.raw = FS.readFileSync( file, 'utf8' );
ret.json = JSON.parse( ret.raw );
catch
catch err
# If we get here, either FS.readFileSync or JSON.parse failed.
# We'll return HMSTATUS.readError or HMSTATUS.parseError.
retRaw = ret.raw && ret.raw.trim()
ret.ex =
op: if retRaw then 'parse' else 'read'
inner:
if SyntaxErrorEx.is( _error )
then (new SyntaxErrorEx( _error, retRaw ))
else _error
if SyntaxErrorEx.is( err )
then (new SyntaxErrorEx( err, retRaw ))
else err
file: file
ret

View File

@ -24,6 +24,6 @@ module.exports = ( cmd, args, isSync, callback, param ) ->
callback?(info.error, param)
return cmd: cmd, inner: info.error
catch
callback?(_error, param)
_error
catch ex
callback?(ex, param)
ex

View File

@ -26,8 +26,8 @@ class SyntaxErrorEx
JSONLint = require 'jsonlint'
try
JSONLint.parse rawData
catch
@line = (/on line (\d+)/.exec _error)[1]
catch err
@line = (/on line (\d+)/.exec err)[1]
# Return true if the supplied parameter is a JavaScript SyntaxError