Skip to content

style: remove unnecessary Boolean wrapper in number/float32/base/assert/is-almost-same-value - #15105

Draft
Planeshifter wants to merge 1 commit into
developfrom
philipp/fix-commit-review-2026-09-08
Draft

style: remove unnecessary Boolean wrapper in number/float32/base/assert/is-almost-same-value#15105
Planeshifter wants to merge 1 commit into
developfrom
philipp/fix-commit-review-2026-09-08

Conversation

@Planeshifter

Copy link
Copy Markdown
Member

Description

What is the purpose of this pull request?

This pull request:

  • provides follow-up fixes for commits merged to develop between b74c2687 (2026-09-07T14:54:49-07:00) and 02db01b3 (2026-09-07T23:32:32-07:00).

Fixes by package:

number/float32/base/assert/is-almost-same-value

  • In lib/node_modules/@stdlib/number/float32/base/assert/is-almost-same-value/lib/native.js (f2e4c4f), the addon result is wrapped in Boolean( addon( a, b, maxULP ) ) and @stdlib/boolean/ctor is imported for it, but the addon already uses STDLIB_NAPI_CREATE_BOOLEAN, which returns a real JS boolean via napi_get_boolean. Drop the import and return addon( a, b, maxULP ) directly, matching every other STDLIB_NAPI_CREATE_BOOLEAN wrapper in the codebase and the float64 companion (02db01b).

Related Issues

Does this pull request have any related issues?

No.

Questions

Any questions for reviewers of this pull request?

No.

Other

Any other information relevant to this pull request? This may include screenshots, references, and/or implementation notes.

Validation performed on the reviewed commit window (14 commits, 58 files):

  • Style guide compliance: changed code audited against docs/style-guides and established reference packages (number/float64/base/assert/is-same-value, blas/ext/base/dany); repo-wide survey confirmed 9 of 9 other STDLIB_NAPI_CREATE_BOOLEAN-based addon wrappers return the addon result unwrapped.
  • Bug scan: new C implementations checked for logic errors, UB, and doc/annotation mismatches (epsilon constants verified exact for both precisions); all migrated ULP-based test assertions re-run against fixture data with zero mismatches.
  • Deliberately excluded: anything requiring interpretation or context outside the diff window — notably concerns about tightened tolerances in migrated test.native.js files, which cannot be validated without building the native add-ons and whose ULP values were empirically confirmed against fixtures on the JS implementations.

Checklist

Please ensure the following tasks are completed before submitting this pull request.

AI Assistance

When authoring the changes proposed in this PR, did you use any kind of AI assistance?

  • Yes
  • No

If you answered "yes" above, how did you use AI assistance?

  • Code generation (e.g., when writing an implementation or fixing a bug)
  • Test/benchmark generation
  • Documentation (including examples)
  • Research and understanding

Disclosure

If you answered "yes" to using AI assistance, please provide a short disclosure indicating how you used AI assistance. This helps reviewers determine how much scrutiny to apply when reviewing your contribution. Example disclosures: "This PR was written primarily by Claude Code." or "I consulted ChatGPT to understand the codebase, but the proposed changes were fully authored manually by myself.".

This PR was authored by Claude Code as part of an automated review of commits recently merged to develop; findings were cross-validated by multiple independent review passes before inclusion.


🤖 Generated with Claude Code

https://claude.ai/code/session_01Cqui9ZeHrFTj5SaDNvZHet


Generated by Claude Code

…ssert/is-almost-same-value`

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cqui9ZeHrFTj5SaDNvZHet
@stdlib-bot

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
number/float32/base/assert/is-almost-same-value $\\color{green}196/196$
$\\color{green}+100.00\\%$
$\\color{green}9/9$
$\\color{green}+100.00\\%$
$\\color{green}2/2$
$\\color{green}+100.00\\%$
$\\color{green}196/196$
$\\color{green}+100.00\\%$

The above coverage report was generated for the changes in this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants