Skip to content

Conversation

@mhlz
Copy link
Contributor

@mhlz mhlz commented Sep 26, 2025

📦 Published PR as canary version: 2.8.0--canary.41.18048226372.0

✨ Test out this PR locally via:

npm install @opencreek/ext@2.8.0--canary.41.18048226372.0
# or 
yarn add @opencreek/ext@2.8.0--canary.41.18048226372.0

@mhlz mhlz requested review from Copilot and reckter September 26, 2025 19:53
@mhlz mhlz self-assigned this Sep 26, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR improves error handling in the BigDecimal constructor to provide more descriptive error messages when parsing invalid input strings.

  • Adds validation to catch multiple decimal points in input strings
  • Enhances error handling for invalid numeric formats with specific error messages
  • Includes comprehensive test coverage for various invalid input scenarios

Reviewed Changes

Copilot reviewed 3 out of 5 changed files in this pull request and generated 1 comment.

File Description
src/BigDecimal.ts Adds validation for multiple decimal points and wraps BigInt conversion in try-catch for better error messages
src/BigDecimal.test.ts Adds new test cases covering various invalid input scenarios including multiple decimals and non-numeric strings
src/BigDecimal.test.ts.md Test snapshots for the new error message validation tests

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@mhlz mhlz added the minor Increment the minor version when merged label Sep 26, 2025
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@mhlz mhlz requested a review from Copilot September 26, 2025 20:06
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 3 out of 5 changed files in this pull request and generated 1 comment.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@mhlz mhlz requested a review from Copilot September 26, 2025 20:08
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 3 out of 5 changed files in this pull request and generated 1 comment.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@mhlz mhlz requested a review from Copilot September 26, 2025 20:10
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 3 out of 5 changed files in this pull request and generated no new comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@mhlz mhlz merged commit d437914 into main Sep 27, 2025
6 of 7 checks passed
@mhlz mhlz deleted the better-big-decimal-errors branch September 27, 2025 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

minor Increment the minor version when merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants