Skip to content

Commit

Permalink
build(deps): bump process-warning from 2.3.2 to 3.0.0 (#277)
Browse files Browse the repository at this point in the history
  • Loading branch information
dependabot[bot] authored Mar 2, 2024
1 parent 0533a81 commit ef51ff3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions lib/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ const { Readable, addAbortSignal } = require('node:stream')
const util = require('node:util')
const cookie = require('cookie')
const assert = require('node:assert')
const warning = require('process-warning')()
const { createDeprecation } = require('process-warning')

const parseURL = require('./parse-url')
const { EventEmitter } = require('node:events')

// request.connectin deprecation https://nodejs.org/api/http.html#http_request_connection
warning.create('FastifyDeprecationLightMyRequest', 'FST_LIGHTMYREQUEST_DEP01', 'You are accessing "request.connection", use "request.socket" instead.')
const FST_LIGHTMYREQUEST_DEP01 = createDeprecation({ name: 'FastifyDeprecationLightMyRequest', code: 'FST_LIGHTMYREQUEST_DEP01', message: 'You are accessing "request.connection", use "request.socket" instead.' })

/**
* Get hostname:port
Expand Down Expand Up @@ -138,7 +138,7 @@ function Request (options) {

Object.defineProperty(this, 'connection', {
get () {
warning.emit('FST_LIGHTMYREQUEST_DEP01')
FST_LIGHTMYREQUEST_DEP01()
return this.socket
},
configurable: true
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"types": "types/index.d.ts",
"dependencies": {
"cookie": "^0.6.0",
"process-warning": "^2.0.0",
"process-warning": "^3.0.0",
"set-cookie-parser": "^2.4.1"
},
"devDependencies": {
Expand Down

0 comments on commit ef51ff3

Please sign in to comment.