Skip to content

util,assert: expose util.isPartialDeepStrictEqual() - #66118

Open
tlhunter wants to merge 1 commit into
nodejs:mainfrom
tlhunter:tlhunter/util-isPartialDeepStrictEqual
Open

tlhunter wants to merge 1 commit into
nodejs:mainfrom
tlhunter:tlhunter/util-isPartialDeepStrictEqual

Conversation

@tlhunter

@tlhunter tlhunter commented Sep 18, 2026

Copy link
Copy Markdown
Contributor
  • adds a non-throwing variant of assert.partialDeepStrictEqual()
  • follows the same pattern as util.isDeepStrictEqual()

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. util Issues and PRs related to the built-in util module. labels Sep 18, 2026
@codecov

codecov Bot commented Sep 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.28%. Comparing base (dd5dfb5) to head (7726942).
⚠️ Report is 77 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##             main   #66118     +/-   ##
=========================================
  Coverage   90.27%   90.28%             
=========================================
  Files         790      789      -1     
  Lines      271651   272885   +1234     
  Branches    51842    52118    +276     
=========================================
+ Hits       245228   246366   +1138     
- Misses      16928    16970     +42     
- Partials     9495     9549     +54     
Files with missing lines Coverage Δ
lib/util.js 100.00% <100.00%> (ø)

... and 91 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@tlhunter

Copy link
Copy Markdown
Contributor Author

FYI @BridgeAR

@BridgeAR BridgeAR left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you for the PR! I think it is nice to also expose this API

The only thing that should be adjusted is the module scope. Mind updating the commit message accordingly by rebasing (it has to be the first commit)? :)

@BridgeAR BridgeAR changed the title lib: add util.isPartialDeepStrictEqual util: add non-throwing util.isPartialDeepStrictEqual Sep 22, 2026
@jasnell

jasnell commented Sep 22, 2026

Copy link
Copy Markdown
Member

Nit: Calling this "non-throwing" is misleading. It can throw, it just doesn't assert if the inputs aren't partially deep-strict equal.

@MoLow MoLow added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Sep 23, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Sep 23, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@tlhunter

Copy link
Copy Markdown
Contributor Author

@BridgeAR @jasnell I can format it like Rich's equivalent PR (3673208):

util,assert: expose util.isPartialDeepStrictEqual()

Signed-off-by: Thomas Hunter II <tlhunter@datadog.com>
@tlhunter
tlhunter force-pushed the tlhunter/util-isPartialDeepStrictEqual branch from 3f0d440 to 7726942 Compare September 23, 2026 16:24
@tlhunter tlhunter changed the title util: add non-throwing util.isPartialDeepStrictEqual util,assert: expose util.isPartialDeepStrictEqual() Sep 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ci PRs that need a full CI run. util Issues and PRs related to the built-in util module.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants