Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(deps): bump process-warning from 2.3.2 to 3.0.0 #277

Merged
merged 2 commits into from
Mar 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading