Skip to content

Commit

Permalink
bug(recorder): replace qs lib with native querystring. (#1653)
Browse files Browse the repository at this point in the history
The `qs` dependency was removed, however, recorder.js retained usage
of it. Replacing it with `querystring` from the std lib is sufficient.

Introduced: #1632
Fixes: #1651
  • Loading branch information
mastermatt committed Aug 6, 2019
1 parent 05ae31e commit e661d0d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/recorder.js
@@ -1,7 +1,7 @@
'use strict'

const debug = require('debug')('nock.recorder')
const qs = require('qs')
const querystring = require('querystring')
const { inspect } = require('util')

const common = require('./common')
Expand Down Expand Up @@ -112,7 +112,7 @@ function generateRequestAndResponse(

// Create the query() object
const queryStr = req.path.slice(queryIndex + 1)
queryObj = qs.parse(queryStr)
queryObj = querystring.parse(queryStr)
}
// Always encoding the query parameters when recording.
const encodedQueryObj = {}
Expand Down

0 comments on commit e661d0d

Please sign in to comment.