Skip to content

Commit

Permalink
chore: update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
thetutlage committed Sep 25, 2023
1 parent d41040c commit 9a425df
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 28 deletions.
46 changes: 26 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,38 +32,44 @@
"sync-labels": "github-label-sync --labels .github/labels.json japa/file-system"
},
"devDependencies": {
"@adonisjs/eslint-config": "^1.1.6",
"@adonisjs/prettier-config": "^1.1.6",
"@adonisjs/tsconfig": "^1.1.6",
"@commitlint/cli": "^17.6.6",
"@commitlint/config-conventional": "^17.6.6",
"@japa/assert": "^2.0.0-1",
"@japa/runner": "^3.0.0-1",
"@swc/core": "^1.3.67",
"@types/cookie": "^0.5.1",
"@types/node": "^20.3.3",
"@types/set-cookie-parser": "^2.4.2",
"c8": "^8.0.0",
"@adonisjs/eslint-config": "^1.1.8",
"@adonisjs/prettier-config": "^1.1.8",
"@adonisjs/tsconfig": "^1.1.8",
"@commitlint/cli": "^17.7.1",
"@commitlint/config-conventional": "^17.7.0",
"@japa/assert": "^2.0.0-2",
"@japa/runner": "^3.0.0-8",
"@swc/core": "1.3.82",
"@types/cookie": "^0.5.2",
"@types/node": "^20.6.5",
"@types/set-cookie-parser": "^2.4.3",
"c8": "^8.0.1",
"cheerio": "^1.0.0-rc.12",
"del-cli": "^5.0.0",
"eslint": "^8.43.0",
"del-cli": "^5.1.0",
"eslint": "^8.50.0",
"github-label-sync": "^2.3.1",
"husky": "^8.0.3",
"np": "^8.0.4",
"prettier": "^2.8.8",
"prettier": "^3.0.3",
"ts-node": "^10.9.1",
"typescript": "^5.1.6"
"typescript": "^5.2.2"
},
"dependencies": {
"@poppinss/hooks": "^7.1.1-4",
"@poppinss/macroable": "^1.0.0-7",
"@poppinss/hooks": "^7.1.1-5",
"@poppinss/macroable": "^1.0.0-8",
"@types/superagent": "^4.1.16",
"cookie": "^0.5.0",
"set-cookie-parser": "^2.6.0",
"superagent": "^8.0.9"
"superagent": "^8.1.2"
},
"peerDependencies": {
"@japa/runner": "^3.0.0-1"
"@japa/assert": "^2.0.0-2",
"@japa/runner": "^3.0.0-8"
},
"peerDependenciesMeta": {
"@japa/assert": {
"optional": true
}
},
"author": "virk,japa",
"license": "MIT",
Expand Down
7 changes: 5 additions & 2 deletions src/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
*/

import cookie from 'cookie'
import Macroable from '@poppinss/macroable'
import Hooks from '@poppinss/hooks'
import type { Assert } from '@japa/assert'
import Macroable from '@poppinss/macroable'
import superagent, { Response, SuperAgentRequest } from 'superagent'

import { ApiResponse } from './response.js'
Expand Down Expand Up @@ -87,7 +87,10 @@ export class ApiRequest extends Macroable {
*/
cookiesJar: RequestCookies = {}

constructor(public config: RequestConfig, assert?: Assert) {
constructor(
public config: RequestConfig,
assert?: Assert
) {
super()
this.#assert = assert
this.request = this.#createRequest()
Expand Down
2 changes: 1 addition & 1 deletion src/response.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
* file that was distributed with this source code.
*/

import { Assert } from '@japa/assert'
import { Response } from 'superagent'
import Macroable from '@poppinss/macroable'
import { Assert } from '@japa/assert'
import setCookieParser from 'set-cookie-parser'

import { ApiRequest } from './request.js'
Expand Down
3 changes: 2 additions & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@
*/

import { ReadStream } from 'node:fs'
import { EventEmitter } from 'node:events'
import { Response } from 'superagent'
import { EventEmitter } from 'node:events'

import { ApiRequest } from './request.js'
import { ApiResponse } from './response.js'

Expand Down
11 changes: 7 additions & 4 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,13 @@ export function dumpResponseBody(response: ApiResponse) {
}

if (response.hasFiles()) {
const files = Object.keys(response.files()).reduce((result, fileName) => {
result[fileName] = response.files()[fileName].toJSON()
return result
}, {} as Record<string, any>)
const files = Object.keys(response.files()).reduce(
(result, fileName) => {
result[fileName] = response.files()[fileName].toJSON()
return result
},
{} as Record<string, any>
)
console.log(`"files" => ${inspect(files, INSPECT_OPTIONS)}`)
}
}
Expand Down

0 comments on commit 9a425df

Please sign in to comment.