Skip to content
This repository has been archived by the owner on Apr 3, 2019. It is now read-only.

Commit

Permalink
fix(deps): update dev deps and latest eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
vladikoff committed Sep 14, 2016
1 parent b3adbcf commit a929f9c
Show file tree
Hide file tree
Showing 21 changed files with 1,972 additions and 1,039 deletions.
12 changes: 6 additions & 6 deletions grunttasks/eslint.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ module.exports = function (grunt) {
'use strict'

grunt.config('eslint', {
options: {
eslintrc: '.eslintrc'
},
files: [
'{,bin/,config/,grunttasks/,lib/**/,scripts/**/,test/**/}*.js'
]
options: {
eslintrc: '.eslintrc'
},
files: [
'{,bin/,config/,grunttasks/,lib/**/,scripts/**/,test/**/}*.js'
]
})
grunt.registerTask('quicklint', 'lint the modified files', 'newer:eslint')
}
20 changes: 11 additions & 9 deletions lib/error.js
Original file line number Diff line number Diff line change
Expand Up @@ -406,15 +406,17 @@ AppError.gone = function () {
}

AppError.mustResetAccount = function (email) {
return new AppError({
code: 400,
error: 'Bad Request',
errno: ERRNO.ACCOUNT_RESET,
message: 'Account must be reset'
},
{
email: email
})
return new AppError(
{
code: 400,
error: 'Bad Request',
errno: ERRNO.ACCOUNT_RESET,
message: 'Account must be reset'
},
{
email: email
}
)
}

AppError.unknownDevice = function () {
Expand Down
2 changes: 1 addition & 1 deletion lib/log.js
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ module.exports = function (level, name, options) {

Object.keys(console).forEach(
function (key) {
console[key] = function () {
console[key] = function () { // eslint-disable-line no-console
var json = { op: 'console', message: util.format.apply(null, arguments) }
if(log[key]) {
log[key](json)
Expand Down
12 changes: 6 additions & 6 deletions lib/metrics/statsd.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ function getGenericTags(info) {
if (agent) {
if (agent.ua) {
tags = tags.concat([
'agent_ua_family:' + agent.ua.family, // -> "Safari"
'agent_ua_version:' + agent.ua.toVersionString(), // -> "5.0.1"
'agent_ua_version_major:' + agent.ua.major // -> "5"
'agent_ua_family:' + agent.ua.family, // -> "Safari"
'agent_ua_version:' + agent.ua.toVersionString(), // -> "5.0.1"
'agent_ua_version_major:' + agent.ua.major // -> "5"
])
}

if (agent.os) {
tags = tags.concat([
'agent_os_version:' + agent.os.toVersionString(), // -> "5.1"
'agent_os_family:' + agent.os.family, // -> "iOS"
'agent_os_major:' + agent.os.major // -> "5"
'agent_os_version:' + agent.os.toVersionString(), // -> "5.1"
'agent_os_family:' + agent.os.family, // -> "iOS"
'agent_os_major:' + agent.os.major // -> "5"
])
}
}
Expand Down
38 changes: 19 additions & 19 deletions lib/routes/account.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,15 +213,15 @@ module.exports = function (
}

return db.createSessionToken({
uid: account.uid,
email: account.email,
emailCode: account.emailCode,
emailVerified: account.emailVerified,
verifierSetAt: account.verifierSetAt,
createdAt: parseInt(query._createdAt),
mustVerify: enableTokenVerification && requestHelper.wantsKeys(request),
tokenVerificationId: tokenVerificationId
}, userAgentString)
uid: account.uid,
email: account.email,
emailCode: account.emailCode,
emailVerified: account.emailVerified,
verifierSetAt: account.verifierSetAt,
createdAt: parseInt(query._createdAt),
mustVerify: enableTokenVerification && requestHelper.wantsKeys(request),
tokenVerificationId: tokenVerificationId
}, userAgentString)
.then(
function (result) {
sessionToken = result
Expand Down Expand Up @@ -1561,16 +1561,16 @@ module.exports = function (
throw error.missingRequestParameter('sessionToken')
}
return db.createKeyFetchToken({
uid: account.uid,
kA: account.kA,
wrapKb: wrapKb,
emailVerified: account.emailVerified
})
.then(
function (result) {
keyFetchToken = result
}
)
uid: account.uid,
kA: account.kA,
wrapKb: wrapKb,
emailVerified: account.emailVerified
})
.then(
function (result) {
keyFetchToken = result
}
)
}
}

Expand Down
27 changes: 13 additions & 14 deletions lib/routes/password.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,8 @@ module.exports = function (
.then(
function (keyFetchToken) {
return db.createPasswordChangeToken({
uid: emailRecord.uid
}
)
uid: emailRecord.uid
})
.then(
function (passwordChangeToken) {
return {
Expand Down Expand Up @@ -146,7 +145,7 @@ module.exports = function (
var password = new Password(authPW, authSalt, verifierVersion)
var wantsKeys = requestHelper.wantsKeys(request)
var account, verifyHash, sessionToken, keyFetchToken, verifiedStatus,
devicesToNotify
devicesToNotify

getSessionVerificationStatus()
.then(fetchDevicesToNotify)
Expand Down Expand Up @@ -259,16 +258,16 @@ module.exports = function (
// Create a verified keyFetchToken. This is deliberately verified because we don't
// want to perform an email confirmation loop.
return db.createKeyFetchToken({
uid: account.uid,
kA: account.kA,
wrapKb: wrapKb,
emailVerified: account.emailVerified
})
.then(
function (result) {
keyFetchToken = result
}
)
uid: account.uid,
kA: account.kA,
wrapKb: wrapKb,
emailVerified: account.emailVerified
})
.then(
function (result) {
keyFetchToken = result
}
)
}
}

Expand Down
Loading

0 comments on commit a929f9c

Please sign in to comment.