Uh oh!
There was an error while loading. Please reload this page.
Remove unused originalIndex from acceptParams - #5119
Conversation
dougwilson
commented
Feb 8, 2023
Hello, and thank you for your pull request. Unfortunately even though Express.js itself may not use this param, external code commonly uses the functils in our utils, so the API for them is frozen due to external usage. I hope that makes sense. |
dougwilson
commented
Feb 8, 2023
Apologies, |
commented
Feb 8, 2023
Thanks @dougwilson! |
Uh oh!
There was an error while loading. Please reload this page.
left a comment
There was a problem hiding this comment.
From my analysis, the only way to observe originalIndex from outside of Express is if you are doing a deep require into the utils file, and are calling normalizeType directly. Even so, originalIndex is always undefined, so it's only observable if doing 'originalIndex' in result.
Since we don't support deep requires into internals, and since even if someone did this it's very unlikely to affect anyone, I think that we can merge this 👍
constutils=require('express/lib/utils')'originalIndex'inutils.normalizeType('foo/bar')The code above previously evaluated to true, but will become false with this patch.
commented
Feb 21, 2023
Annoyingly we do in 4.x, but it doesn't matter, as like you observed, the functionality doesn't actually "produce" anything -- a property that is defined on the object in a technical sense, but extremely unlikely to actually break anything with it's removal 👍 |
commented
Feb 21, 2023
Whoops, my bad. Good to know 👍 |
84fe482 to
a1efd9dCompare
Remove unused originalIndex from acceptParams in express/lib/utils.js