{{ message }}
4.4 branch: Guard against odd object prototypes triggered by changes in TOML 4.0#916
Merged
Conversation
jdmarshall
commented
Jun 10, 2026
There was a problem hiding this comment.
🧹 Nitpick comments (1)
lib/util.js (1)
189-191: ⚡ Quick winRemove unused
ownPropsvariable.The
ownPropsarray is computed but never referenced. This appears to be leftover code from refactoring.🧹 Proposed fix to remove dead code
- const ownProps = [ - ...Object.getOwnPropertyNames(target), - ] - // Bypass proxy receiver for properties directly on the target (e.g., RegExp.prototype.source)🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@lib/util.js` around lines 189 - 191, Remove the dead-variable declaration for ownProps in the function where target is used: delete the const ownProps = [...Object.getOwnPropertyNames(target)] line (and any related unused references) so the code no longer computes an unused array; ensure no other logic depends on ownProps and keep existing behavior of the surrounding function (refer to the ownProps identifier and the target parameter to locate the statement).
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@lib/util.js`:
- Around line 189-191: Remove the dead-variable declaration for ownProps in the
function where target is used: delete the const ownProps =
[...Object.getOwnPropertyNames(target)] line (and any related unused references)
so the code no longer computes an unused array; ensure no other logic depends on
ownProps and keep existing behavior of the surrounding function (refer to the
ownProps identifier and the target parameter to locate the statement).
2b9786c to
93755f2
Compare
Note that test in 0-util.js:
assert.deepStrictEqual(result.config.messages, [...
Still fails with toml 4.1 because there is no prototype on messages, which is problematic
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Note that test in 0-util.js:
Still fails with toml 4.1 because there is no prototype on messages, which is problematic
Fixes #911
Summary by CodeRabbit
Bug Fixes
Chores