Skip to content
This repository has been archived by the owner on Jan 15, 2025. It is now read-only.

Clean up NPM package #59

Merged
merged 11 commits into from
Dec 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.idea/
coverage/
node_modules/
tests/
.github/
.prettierignore
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Rounding modes for all operations (#54)

## [7.0.1] - 2023-12-21

### Added

- LICENSE file

### Fixed

- Ensure that the NPM package is nice and lean (#57) by removing unnecessary files and dependencies

## [7.0.0] - 2023-12-21

### Added
Expand Down
25 changes: 25 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Copyright 2023 Jesse Alama

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list
of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3,264 changes: 2,839 additions & 425 deletions package-lock.json

Large diffs are not rendered by default.

18 changes: 15 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
"directories": {
"test": "tests"
},
"repository": {
"type": "git",
"url": "https://github.com/jessealama/decimal128.js.git"
},
"sideEffects": false,
"scripts": {
"test": "jest",
"format": "yarn prettier . --write",
Expand All @@ -30,13 +35,20 @@
"license": "ISC",
"devDependencies": {
"@types/jest": "^29.5.1",
"c8": "^8.0.1",
"jest": "^29.5.0",
"jest-light-runner": "^0.6.0",
"prettier": "^3.0.0",
"ts-jest": "^29.1.0",
"typescript": "^5.1.3"
},
"dependencies": {
"c8": "^8.0.0",
"jest-light-runner": "^0.5.0"
"licenses": [
{
"type": "BSD-2-Clause",
"url": "https://opensource.org/license/bsd-2-clause/"
}
],
"exports": {
".": "./src/decimal128.mjs"
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 2 additions & 4 deletions tests/round.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,10 @@ describe("rounding", () => {
expect(new Decimal128("-42").round().toString()).toStrictEqual("-42");
});
test("negative number of digits requested", () => {
expect(() => new Decimal128("1.5").round(-42)).toThrowError(RangeError);
expect(() => new Decimal128("1.5").round(-42)).toThrow(RangeError);
});
test("too many digits requested", () => {
expect(() => new Decimal128("1.5").round(2 ** 53)).toThrowError(
RangeError
);
expect(() => new Decimal128("1.5").round(2 ** 53)).toThrow(RangeError);
});
});

Expand Down