Update checked-in dependencies

This commit is contained in:
github-actions[bot] 2023-07-13 09:09:17 +00:00
parent 4fad06f438
commit 40a500c743
4168 changed files with 298222 additions and 374905 deletions

View file

@ -1,5 +1,6 @@
'use strict'
const mapValues = require('lodash/mapValues')
const querystring = require('querystring')
const common = require('./common')
@ -43,7 +44,7 @@ module.exports = function matchBody(options, spec, body) {
}
// strip line endings from both so that we get a match no matter what OS we are running on
// if Content-Type does not contains 'multipart'
// if Content-Type does not contain 'multipart'
if (!isMultipart && typeof body === 'string') {
body = body.replace(/\r?\n|\r/g, '')
}
@ -52,8 +53,8 @@ module.exports = function matchBody(options, spec, body) {
spec = spec.replace(/\r?\n|\r/g, '')
}
// Because the nature of URL encoding, all the values in the body have been cast to strings.
// dataEqual does strict checking so we we have to cast the non-regexp values in the spec too.
// Because the nature of URL encoding, all the values in the body must be cast to strings.
// dataEqual does strict checking, so we have to cast the non-regexp values in the spec too.
if (isUrlencoded) {
spec = mapValuesDeep(spec, val => (val instanceof RegExp ? val : `${val}`))
}
@ -70,7 +71,7 @@ function mapValuesDeep(obj, cb) {
return obj.map(v => mapValuesDeep(v, cb))
}
if (common.isPlainObject(obj)) {
return common.mapValue(obj, v => mapValuesDeep(v, cb))
return mapValues(obj, v => mapValuesDeep(v, cb))
}
return cb(obj)
}