Skip to content

Honor signDisplay in the native number converter#105

Open
jasperan wants to merge 2 commits intooracle:masterfrom
jasperan:issue-70-sign-display
Open

Honor signDisplay in the native number converter#105
jasperan wants to merge 2 commits intooracle:masterfrom
jasperan:issue-70-sign-display

Conversation

@jasperan
Copy link
Member

@jasperan jasperan commented Mar 15, 2026

Summary

Fixes #70 by threading signDisplay through the native number converter runtime and public option types.

Problem

oj.IntlNumberConverter ignored signDisplay: 'always' even though native Intl.NumberFormat displayed the expected + sign for positive and zero values.

Reproduction

Format positive, zero, and negative values with a JET number converter configured with signDisplay: 'always', then compare the output to native Intl.NumberFormat.

Before this patch, JET returned "5" and "0" where native formatting returned "+5" and "+0".

Changes

  • carry signDisplay through the resolved converter option shape
  • pass signDisplay into the native formatter options
  • update the debug, debug_esm, and minified bundles
  • expose signDisplay in the public TypeScript option types

Verification

  • compared JET formatter output against native Intl.NumberFormat for positive, zero, and negative values
  • confirmed package smoke still passes with npm pack --dry-run

Scope / Caveats

  • this patch is scoped to signDisplay behavior in the native number converter path
  • it does not redesign unrelated converter options or formatting rules

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Mar 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

IntlNumberConverter does not respect "signDisplay" property

1 participant