File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# Changelog
22
3+ ## next
4+
5+ - refactor(dependency): replace is-plain-obj with is-plain-object
6+
37## [ v3.0.1] ( https://github.com/chimurai/http-proxy-middleware/releases/tag/v3.0.1 )
48
59- fix(type): fix RequestHandler return type ([ #980 ] ( https://github.com/chimurai/http-proxy-middleware/pull/980 ) )
Original file line number Diff line number Diff line change 9090 "debug" : " ^4.3.6" ,
9191 "http-proxy" : " ^1.18.1" ,
9292 "is-glob" : " ^4.0.3" ,
93- "is-plain-obj " : " ^3 .0.0" ,
93+ "is-plain-object " : " ^5 .0.0" ,
9494 "micromatch" : " ^4.0.8"
9595 },
9696 "engines" : {
Original file line number Diff line number Diff line change 1- import isPlainObj = require ( 'is-plain-obj' ) ;
1+ import { isPlainObject } from 'is-plain-object' ;
22import { ERRORS } from './errors' ;
33import { Debug } from './debug' ;
44
@@ -45,7 +45,7 @@ export function createPathRewriter(rewriteConfig) {
4545function isValidRewriteConfig ( rewriteConfig ) {
4646 if ( typeof rewriteConfig === 'function' ) {
4747 return true ;
48- } else if ( isPlainObj ( rewriteConfig ) ) {
48+ } else if ( isPlainObject ( rewriteConfig ) ) {
4949 return Object . keys ( rewriteConfig ) . length !== 0 ;
5050 } else if ( rewriteConfig === undefined || rewriteConfig === null ) {
5151 return false ;
@@ -57,7 +57,7 @@ function isValidRewriteConfig(rewriteConfig) {
5757function parsePathRewriteRules ( rewriteConfig : Record < string , string > ) {
5858 const rules : RewriteRule [ ] = [ ] ;
5959
60- if ( isPlainObj ( rewriteConfig ) ) {
60+ if ( isPlainObject ( rewriteConfig ) ) {
6161 for ( const [ key , value ] of Object . entries ( rewriteConfig ) ) {
6262 rules . push ( {
6363 regex : new RegExp ( key ) ,
Original file line number Diff line number Diff line change 1- import isPlainObj = require ( 'is-plain-obj' ) ;
1+ import { isPlainObject } from 'is-plain-object' ;
22import { Debug } from './debug' ;
33
44const debug = Debug . extend ( 'router' ) ;
@@ -7,7 +7,7 @@ export async function getTarget(req, config) {
77 let newTarget ;
88 const router = config . router ;
99
10- if ( isPlainObj ( router ) ) {
10+ if ( isPlainObject ( router ) ) {
1111 newTarget = getTargetFromProxyTable ( req , router ) ;
1212 } else if ( typeof router === 'function' ) {
1313 newTarget = await router ( req ) ;
Original file line number Diff line number Diff line change @@ -2959,10 +2959,10 @@ is-path-inside@^3.0.3:
29592959 resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283"
29602960 integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==
29612961
2962- is-plain-obj@^3 .0.0 :
2963- version "3 .0.0"
2964- resolved "https://registry.yarnpkg.com/is-plain-obj /-/is-plain-obj-3 .0.0.tgz#af6f2ea14ac5a646183a5bbdb5baabbc156ad9d7 "
2965- integrity sha512-gwsOE28k+23GP1B6vFl1oVh/WOzmawBrKwo5Ev6wMKzPkaXaCDIQKzLnvsA42DRlbVTWorkgTKIviAKCWkfUwA ==
2962+ is-plain-object@^5 .0.0 :
2963+ version "5 .0.0"
2964+ resolved "https://registry.yarnpkg.com/is-plain-object /-/is-plain-object-5 .0.0.tgz#4427f50ab3429e9025ea7d52e9043a9ef4159344 "
2965+ integrity sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q ==
29662966
29672967is-stream@^2.0.0 :
29682968 version "2.0.1"
You can’t perform that action at this time.
0 commit comments