uom-types 3.1.1 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,119 @@
1
+ # Changelog
2
+ All notable changes to this project will be documented in this file. Dates are displayed in UTC.
3
+
4
+ # [4.0.0](https://github.com/RebeccaStevens/uom-types/compare/v3.1.1...v4.0.0) (2024-10-14)
5
+
6
+
7
+ ### Bug Fixes
8
+
9
+ * remove things labelled deprecated ([a74dd3d](https://github.com/RebeccaStevens/uom-types/commit/a74dd3d5b845ac550a09364c65bb0a704536ded1))
10
+ * use US english spelling for units ([37d070f](https://github.com/RebeccaStevens/uom-types/commit/37d070f311389808683a37ba16b46167a3ea5c2a))
11
+ * WattPerSteradianquareMeter => WattPerSteradianSquareMeter ([30639fe](https://github.com/RebeccaStevens/uom-types/commit/30639fe795ecc2357d59b67fdb774b23d98baf56))
12
+
13
+
14
+ ### Features
15
+
16
+ * merge all subpackages into toplevel package ([90525a2](https://github.com/RebeccaStevens/uom-types/commit/90525a23537bb37fd97db08215aee2bb92bb79e5))
17
+ * merge high-order functions into regular functions ([67ecca0](https://github.com/RebeccaStevens/uom-types/commit/67ecca0b8c6e83dbb932d026eaf3cdc30ab54816))
18
+
19
+
20
+ ### Performance Improvements
21
+
22
+ * improve type speed ([10a86df](https://github.com/RebeccaStevens/uom-types/commit/10a86dfebce3fbb8fed0f13ca8d841191d4a4a83))
23
+
24
+
25
+ ### BREAKING CHANGES
26
+
27
+ * remove things labelled deprecated
28
+ * WattPerSteradianquareMeter => WattPerSteradianSquareMeter
29
+ * Metre => Meter, Litre => Liter
30
+
31
+ ## [3.1.1](https://github.com/RebeccaStevens/uom-types/compare/v3.1.0...v3.1.1) (2023-08-11)
32
+
33
+
34
+ ### Bug Fixes
35
+
36
+ * improve core unit and prefix logic ([9bf4c9f](https://github.com/RebeccaStevens/uom-types/commit/9bf4c9f92609177b37ebc157dfc0d819e5eac995))
37
+ * improve modifer logic ([673f0b4](https://github.com/RebeccaStevens/uom-types/commit/673f0b44d277e3b7c188a01338e8e88d7bb2cd69))
38
+ * improve unit function logic ([1350c8e](https://github.com/RebeccaStevens/uom-types/commit/1350c8ee2150553abb59a13658fc5279ecae89a7))
39
+ * update UnitConversionRate type and create UnknownUnitConversionRate type ([ee942be](https://github.com/RebeccaStevens/uom-types/commit/ee942bed8a8c31101474c28f92b1cfede2f9d629))
40
+
41
+ # [3.1.0](https://github.com/RebeccaStevens/uom-types/compare/v3.0.1...v3.1.0) (2023-08-09)
42
+
43
+
44
+ ### Bug Fixes
45
+
46
+ * `Pow` and `Root` now ensure that zero exponents are removed ([0929ef3](https://github.com/RebeccaStevens/uom-types/commit/0929ef3bfc113c50028bf87060c98a07efde9cd4))
47
+
48
+
49
+ ### Features
50
+
51
+ * add `root` functions ([6d92a98](https://github.com/RebeccaStevens/uom-types/commit/6d92a9818fe99c43a22801c4e2e2dffc1167fe8f))
52
+ * add PosExponent and NegExponent and depreate NegativeExponent infavor of NegateExponent ([f3e96e1](https://github.com/RebeccaStevens/uom-types/commit/f3e96e1d4c2035464399bb0a6d40dd6c5b9df8fd))
53
+ * add Unit Functions Pow and Root ([ae679dc](https://github.com/RebeccaStevens/uom-types/commit/ae679dc18d59c6a71dca7841271537a2bb7f1671))
54
+
55
+ ## [3.0.1](https://github.com/RebeccaStevens/uom-types/compare/v3.0.0...v3.0.1) (2023-08-08)
56
+
57
+
58
+ ### Bug Fixes
59
+
60
+ * multiplyUnitExponents and DivideUnitExponents support for AbstractUnit ([#52](https://github.com/RebeccaStevens/uom-types/issues/52)) ([88fce9e](https://github.com/RebeccaStevens/uom-types/commit/88fce9e9563f2f25bb9f53f58fde12d8aec3eaad))
61
+
62
+ # [3.0.0](https://github.com/RebeccaStevens/uom-types/compare/v2.0.0...v3.0.0) (2023-08-07)
63
+
64
+
65
+ * Merge pull request #3 from RebeccaStevens/uom-types ([d6f0c76](https://github.com/RebeccaStevens/uom-types/commit/d6f0c7641ec072388c336b4547862e73f8fefc42)), closes [#3](https://github.com/RebeccaStevens/uom-types/issues/3)
66
+
67
+
68
+ ### BREAKING CHANGES
69
+
70
+ * Extra details of a unit, such as its scalar factor, are now stored as part of the unit's meta, not on a subcomponent of the unit.
71
+ * "si-units" submodule removed. It has been replaced by "units".
72
+
73
+ # [2.0.0](https://github.com/RebeccaStevens/uom-types/compare/v1.0.3...v2.0.0) (2023-07-08)
74
+
75
+
76
+ ### Bug Fixes
77
+
78
+ * type issues found from tests ([6f15ac9](https://github.com/RebeccaStevens/uom-types/commit/6f15ac92642ef6e22a7de11667add3bf398beee1))
79
+
80
+
81
+ * Merge pull request #2 from RebeccaStevens/type-tests ([4b590d3](https://github.com/RebeccaStevens/uom-types/commit/4b590d30a7e2a3e509c5200740db54dd05720b57)), closes [#2](https://github.com/RebeccaStevens/uom-types/issues/2)
82
+
83
+
84
+ ### BREAKING CHANGES
85
+
86
+ * drop product function
87
+
88
+ ## [1.0.3](https://github.com/RebeccaStevens/uom-types/compare/v1.0.2...v1.0.3) (2023-07-07)
89
+
90
+
91
+ ### Bug Fixes
92
+
93
+ * re-fix dist file import paths ([137b8df](https://github.com/RebeccaStevens/uom-types/commit/137b8dff09690891e041be0ff8933e94e10a9451))
94
+
95
+ ## [1.0.2](https://github.com/RebeccaStevens/uom-types/compare/v1.0.1...v1.0.2) (2023-07-07)
96
+
97
+
98
+ ### Bug Fixes
99
+
100
+ * dist file import paths ([7fcf7b7](https://github.com/RebeccaStevens/uom-types/commit/7fcf7b74cbe18dd8ff9c87348294cc1caecd8933))
101
+
102
+ ## [1.0.1](https://github.com/RebeccaStevens/uom-types/compare/v1.0.0...v1.0.1) (2023-07-07)
103
+
104
+
105
+ ### Bug Fixes
106
+
107
+ * critical type bugs ([46ef7b9](https://github.com/RebeccaStevens/uom-types/commit/46ef7b928dbf217bf660af48a560ea7d0759c882))
108
+
109
+
110
+ ### Reverts
111
+
112
+ * Revert "build: package.json" ([142c812](https://github.com/RebeccaStevens/uom-types/commit/142c81245086ff76aa22b477292df70159cd0674))
113
+
114
+ # 1.0.0 (2023-07-06)
115
+
116
+
117
+ ### Features
118
+
119
+ * initial implementation ([3547c44](https://github.com/RebeccaStevens/uom-types/commit/3547c4483ac747c2884b2284df4b81161ff18ac9))
package/README.md CHANGED
@@ -5,12 +5,12 @@
5
5
  Typesafe units with no runtime overhead.
6
6
 
7
7
  [![npm version](https://img.shields.io/npm/v/uom-types.svg)](https://www.npmjs.com/package/uom-types)
8
- [![CI](https://github.com/RebeccaStevens/uom-types/actions/workflows/release.yml/badge.svg)](https://github.com/RebeccaStevens/uom-types/actions/workflows/release.yml)
9
- [![Coverage Status](https://codecov.io/gh/RebeccaStevens/uom-types/branch/main/graph/badge.svg?token=MVpR1oAbIT)](https://codecov.io/gh/RebeccaStevens/uom-types)
10
- [![Documentation](./docs/coverage.svg)](https://RebeccaStevens.github.io/uom-types/stable/)\
8
+ [![jsr Version](https://img.shields.io/jsr/v/@rebeccastevens/uom-types.svg)](https://jsr.io/@rebeccastevens/uom-types)
9
+ [![CI](https://github.com/RebeccaStevens/template-typescript-node-package/actions/workflows/release.yml/badge.svg)](https://github.com/RebeccaStevens/template-typescript-node-package/actions/workflows/release.yml)
10
+ [![Coverage Status](https://codecov.io/gh/RebeccaStevens/template-typescript-node-package/branch/main/graph/badge.svg?token=MVpR1oAbIT)](https://codecov.io/gh/RebeccaStevens/template-typescript-node-package)\
11
11
  [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
12
- [![GitHub Discussions](https://img.shields.io/github/discussions/RebeccaStevens/uom-types?style=flat-square)](https://github.com/RebeccaStevens/uom-types/discussions)
13
- [![BSD 3 Clause license](https://img.shields.io/github/license/RebeccaStevens/uom-types.svg?style=flat-square)](https://opensource.org/licenses/BSD-3-Clause)
12
+ [![GitHub Discussions](https://img.shields.io/github/discussions/RebeccaStevens/template-typescript-node-package?style=flat-square)](https://github.com/RebeccaStevens/template-typescript-node-package/discussions)
13
+ [![BSD 3 Clause license](https://img.shields.io/github/license/RebeccaStevens/template-typescript-node-package.svg?style=flat-square)](https://opensource.org/licenses/BSD-3-Clause)
14
14
  [![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=flat-square)](https://commitizen.github.io/cz-cli/)
15
15
  [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat-square)](https://github.com/semantic-release/semantic-release)
16
16
 
@@ -22,47 +22,46 @@ Typesafe units with no runtime overhead.
22
22
 
23
23
  ### Enterprise Users
24
24
 
25
- `uom-types` is available as part of the Tidelift Subscription.
25
+ `uom-types` is available as part of the [Tidelift Subscription](https://tidelift.com/funding/github/npm/uom-types).
26
26
 
27
- Tidelift is working with the maintainers of `uom-types` and a growing network of open source maintainers to ensure your open source software supply chain meets enterprise standards now and into the future.
27
+ Tidelift is working with the maintainers of `uom-types` and a growing network of open source maintainers
28
+ to ensure your open source software supply chain meets enterprise standards now and into the future.
28
29
  [Learn more.](https://tidelift.com/subscription/pkg/npm-uom-types?utm_source=npm-uom-types&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)
29
30
 
30
31
  ## Installation
31
32
 
33
+ ### npm
34
+
32
35
  ```sh
33
36
  # Install with npm
34
- npm install -D uom-types
37
+ npm install uom-types
35
38
 
36
39
  # Install with pnpm
37
- pnpm add -D uom-types
40
+ pnpm add uom-types
38
41
 
39
42
  # Install with yarn
40
- yarn add -D uom-types
41
- ```
42
-
43
- ### Library Structure
44
-
45
- This library is split into several submodules.
43
+ yarn add uom-types
46
44
 
47
- - `uom-types`\
48
- Defines the core types of this library. You'll only need to use if if you are defining your own custom types.
45
+ # Install with bun
46
+ bun add uom-types
47
+ ```
49
48
 
50
- - `uom-types/functions`\
51
- Defines runtime mathematical functions that are type-aware of this library's type.
49
+ ### jsr
52
50
 
53
- - `uom-types/functions/higher-order`\
54
- Defines runtime higher order mathematical functions that are type-aware of this library's type.
51
+ ```sh
52
+ # Install in a node project
53
+ npx jsr add @rebeccastevens/uom-types
55
54
 
56
- - `uom-types/units`\
57
- Defines common units.\
58
- Note: does not currently define any imperial types.
55
+ # Install in a deno project
56
+ deno add jsr:@rebeccastevens/uom-types
59
57
 
60
- - `uom-types/units/converters`\
61
- Defines runtime functions for converting between different units of the same `UnitClass`.
58
+ # Install in a bun project
59
+ bunx jsr add @rebeccastevens/uom-types
60
+ ```
62
61
 
63
62
  ## Documentation
64
63
 
65
- Check out [RebeccaStevens.github.io/uom-types](https://RebeccaStevens.github.io/uom-types/stable/) for the documentation.
64
+ Check out [RebeccaStevens.github.io/uom-types](https://RebeccaStevens.github.io/uom-types/) for the documentation.
66
65
 
67
66
  ## Inspiration
68
67