Fix dependabot issues

This commit is contained in:
Andrew Eisenberg 2021-10-21 15:24:20 -07:00
parent c89d9bd8b0
commit 531c6ba7c8
705 changed files with 53406 additions and 20466 deletions

View file

@ -10,7 +10,7 @@ function describe (props) {
return new DescribedArgumentsValue(Object.assign({
// Treat as an array, to allow comparisons with arrays
isArray: true,
isList: true
isList: true,
}, props, { ctor: 'Arguments' }))
}
exports.describe = describe

View file

@ -7,7 +7,7 @@ function describe (props) {
buffer: Buffer.from(props.value),
// Set isArray and isList so the property recursor excludes the byte accessors
isArray: true,
isList: true
isList: true,
}, props))
}
exports.describe = describe

View file

@ -1,7 +1,7 @@
'use strict'
const recursorUtils = require('../recursorUtils')
const stringPrimitive = require('../primitiveValues/string').tag
const recursorUtils = require('../recursorUtils')
const object = require('./object')
function describe (props) {
@ -18,7 +18,7 @@ const tag = Symbol('BoxedValue')
exports.tag = tag
class BoxedValue extends object.ObjectValue {}
Object.defineProperty(BoxedValue.prototype, 'tag', {value: tag})
Object.defineProperty(BoxedValue.prototype, 'tag', { value: tag })
class DescribedBoxedValue extends object.DescribedMixin(BoxedValue) {
constructor (props) {

View file

@ -7,7 +7,7 @@ function describe (props) {
buffer: typedArray.getBuffer(props.value),
// Set isArray and isList so the property recursor excludes the byte accessors
isArray: true,
isList: true
isList: true,
}, props))
}
exports.describe = describe

View file

@ -13,7 +13,7 @@ const UNEQUAL = constants.UNEQUAL
function describe (props) {
const date = props.value
const invalid = isNaN(date.valueOf())
return new DescribedDateValue(Object.assign({}, props, {invalid}))
return new DescribedDateValue(Object.assign({}, props, { invalid }))
}
exports.describe = describe
@ -32,7 +32,7 @@ function formatDate (date) {
date,
local: false,
showTimeZone: true,
showMilliseconds: true
showMilliseconds: true,
})
}
@ -61,13 +61,13 @@ class DateValue extends object.ObjectValue {
return innerLines.isEmpty
? lineBuilder.single(string + theme.object.closeBracket)
: lineBuilder.first(string)
.concat(innerLines.withFirstPrefixed(indent.increase()).stripFlags())
.append(lineBuilder.last(indent + theme.object.closeBracket))
.concat(innerLines.withFirstPrefixed(indent.increase()).stripFlags())
.append(lineBuilder.last(indent + theme.object.closeBracket))
},
maxDepth () {
return lineBuilder.single(string + ' ' + theme.maxDepth + ' ' + theme.object.closeBracket)
}
},
})
}

View file

@ -1,8 +1,8 @@
'use strict'
const constants = require('../constants')
const isEnumerable = require('../isEnumerable')
const formatUtils = require('../formatUtils')
const isEnumerable = require('../isEnumerable')
const lineBuilder = require('../lineBuilder')
const NOOP_RECURSOR = require('../recursorUtils').NOOP_RECURSOR
const object = require('./object')
@ -15,7 +15,7 @@ function describe (props) {
nameIsEnumerable: isEnumerable(error, 'name'),
name: error.name,
messageIsEnumerable: isEnumerable(error, 'message'),
message: error.message
message: error.message,
}, props))
}
exports.describe = describe
@ -59,13 +59,13 @@ class ErrorValue extends object.ObjectValue {
return innerLines.isEmpty
? lineBuilder.single(string + theme.object.closeBracket)
: lineBuilder.first(string)
.concat(innerLines.withFirstPrefixed(indent.increase()).stripFlags())
.append(lineBuilder.last(indent + theme.object.closeBracket))
.concat(innerLines.withFirstPrefixed(indent.increase()).stripFlags())
.append(lineBuilder.last(indent + theme.object.closeBracket))
},
maxDepth () {
return lineBuilder.single(string + ' ' + theme.maxDepth + ' ' + theme.object.closeBracket)
}
},
})
}

View file

@ -1,8 +1,8 @@
'use strict'
const constants = require('../constants')
const isEnumerable = require('../isEnumerable')
const formatUtils = require('../formatUtils')
const isEnumerable = require('../isEnumerable')
const lineBuilder = require('../lineBuilder')
const NOOP_RECURSOR = require('../recursorUtils').NOOP_RECURSOR
const object = require('./object')
@ -14,7 +14,7 @@ function describe (props) {
const fn = props.value
return new DescribedFunctionValue(Object.assign({
nameIsEnumerable: isEnumerable(fn, 'name'),
name: typeof fn.name === 'string' ? fn.name : null
name: typeof fn.name === 'string' ? fn.name : null,
}, props))
}
exports.describe = describe
@ -43,13 +43,13 @@ class FunctionValue extends object.ObjectValue {
return innerLines.isEmpty
? lineBuilder.single(string + theme.object.closeBracket)
: lineBuilder.first(string)
.concat(innerLines.withFirstPrefixed(indent.increase()).stripFlags())
.append(lineBuilder.last(indent + theme.object.closeBracket))
.concat(innerLines.withFirstPrefixed(indent.increase()).stripFlags())
.append(lineBuilder.last(indent + theme.object.closeBracket))
},
maxDepth () {
return lineBuilder.single(string + ' ' + theme.maxDepth + ' ' + theme.object.closeBracket)
}
},
})
}
}

View file

@ -9,7 +9,7 @@ const UNEQUAL = constants.UNEQUAL
function describe (props) {
return new DescribedMapValue(Object.assign({
size: props.value.size
size: props.value.size,
}, props))
}
exports.describe = describe
@ -39,7 +39,7 @@ class MapValue extends object.ObjectValue {
prepareDiff (expected) {
// Maps should be compared, even if they have a different number of entries.
return {compareResult: super.compare(expected)}
return { compareResult: super.compare(expected) }
}
serialize () {

View file

@ -1,11 +1,11 @@
'use strict'
const constants = require('../constants')
const getObjectKeys = require('../getObjectKeys')
const ObjectFormatter = require('../formatUtils').ObjectFormatter
const getObjectKeys = require('../getObjectKeys')
const hasLength = require('../hasLength')
const recursorUtils = require('../recursorUtils')
const stats = require('../metaDescriptors/stats')
const recursorUtils = require('../recursorUtils')
const DEEP_EQUAL = constants.DEEP_EQUAL
const SHALLOW_EQUAL = constants.SHALLOW_EQUAL
@ -17,7 +17,7 @@ function describe (props) {
return new DescribedObjectValue(Object.assign({
isArray,
isIterable: object[Symbol.iterator] !== undefined,
isList: isArray || hasLength(object)
isList: isArray || hasLength(object),
}, props))
}
exports.describe = describe
@ -58,7 +58,7 @@ class ObjectValue {
serialize () {
return [
this.ctor, this.pointer, this.stringTag,
this.isArray, this.isIterable, this.isList
this.isArray, this.isIterable, this.isList,
]
}
}
@ -231,7 +231,7 @@ function DeserializedMixin (base) {
stringTag: state[2],
isArray: state[3],
isIterable: state[4],
isList: state[5]
isList: state[5],
})
this.deserializedRecursor = recursor

View file

@ -11,7 +11,7 @@ function describe (props) {
const regexp = props.value
return new DescribedRegexpValue(Object.assign({
flags: getSortedFlags(regexp),
source: regexp.source
source: regexp.source,
}, props))
}
exports.describe = describe
@ -69,7 +69,7 @@ class RegexpValue extends object.ObjectValue {
regexp + ' ' +
theme.maxDepth + ' ' +
theme.object.closeBracket)
}
},
})
}

View file

@ -9,7 +9,7 @@ const UNEQUAL = constants.UNEQUAL
function describe (props) {
return new DescribedSetValue(Object.assign({
size: props.value.size
size: props.value.size,
}, props))
}
exports.describe = describe
@ -39,7 +39,7 @@ class SetValue extends object.ObjectValue {
prepareDiff (expected) {
// Sets should be compared, even if they have a different number of items.
return {compareResult: super.compare(expected)}
return { compareResult: super.compare(expected) }
}
serialize () {

View file

@ -3,8 +3,8 @@
const constants = require('../constants')
const formatUtils = require('../formatUtils')
const lineBuilder = require('../lineBuilder')
const recursorUtils = require('../recursorUtils')
const propertyStatsTag = require('../metaDescriptors/stats').propertyTag
const recursorUtils = require('../recursorUtils')
const object = require('./object')
const DEEP_EQUAL = constants.DEEP_EQUAL
@ -23,7 +23,7 @@ function describe (props) {
buffer: getBuffer(props.value),
// Set isArray and isList so the property recursor excludes the byte accessors
isArray: true,
isList: true
isList: true,
}, props))
}
exports.describe = describe
@ -103,7 +103,7 @@ class TypedArrayValue extends object.ObjectValue {
if (subject.isProperty === true) return subject.key.value !== 'byteLength'
if (subject.tag === bytesTag) return subject.buffer.byteLength > 0
return true
}
},
})
}
}