@lhncbc/ucum-lhc 4.1.6 → 4.1.8
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/browser-dist/ucum-lhc.js +65 -24
- package/data/ucumDefs.min.json +1 -1
- package/package.json +10 -11
- package/source/dimension.js +0 -0
- package/source/ucumLhcUtils.js +0 -0
- package/source/unit.js +13 -2
- package/source/unitString.js +39 -13
- package/source-cjs/unit.js +13 -2
- package/source-cjs/unit.js.map +1 -1
- package/source-cjs/unitString.js +40 -13
- package/source-cjs/unitString.js.map +1 -1
- package/CHANGELOG.md +0 -322
package/CHANGELOG.md
DELETED
|
@@ -1,322 +0,0 @@
|
|
|
1
|
-
# Change Log
|
|
2
|
-
All notable changes to this project will be documented in this file.
|
|
3
|
-
|
|
4
|
-
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
|
5
|
-
and this project adheres to [Semantic Versioning](http://semver.org/).
|
|
6
|
-
|
|
7
|
-
## [4.1.6] 2022-09-13
|
|
8
|
-
### Changed
|
|
9
|
-
- Update version to 4.1.6 for tagging the last merge, which was to update
|
|
10
|
-
generated files but was not given a new version number and not tagged.
|
|
11
|
-
|
|
12
|
-
## [4.1.5] 2021-05-20
|
|
13
|
-
### Fixed
|
|
14
|
-
- Fixed generated name issue for complex units, https://github.com/lhncbc/ucum-lhc/issues/29
|
|
15
|
-
|
|
16
|
-
## [4.1.4] 2021-01-05
|
|
17
|
-
### Fixed
|
|
18
|
-
- Moved grunt-extract-sourcemap to devDependencies.
|
|
19
|
-
- Updated dependencies to avoid issues raised by npm audit (except one
|
|
20
|
-
on a devDependency).
|
|
21
|
-
|
|
22
|
-
## [4.1.3] 2020-04-20
|
|
23
|
-
### Fixed
|
|
24
|
-
- Fixed to work in IE 11.
|
|
25
|
-
|
|
26
|
-
## [4.1.2] 2020-04-03
|
|
27
|
-
### Changes
|
|
28
|
-
- Updated dependencies to get patches for security vulnerabilities.
|
|
29
|
-
|
|
30
|
-
## [4.1.1] 2020-03-09
|
|
31
|
-
### Changes
|
|
32
|
-
- removed unnecessary index.html
|
|
33
|
-
|
|
34
|
-
## [4.1.0] 2020-03-05
|
|
35
|
-
### Changes
|
|
36
|
-
- the sizes of ucumDefs.json and related files reduced
|
|
37
|
-
|
|
38
|
-
## [4.0.2] 2020-03-02
|
|
39
|
-
### Fixed
|
|
40
|
-
- ucumDefs.json generation: baseFactor_ and magnitude_ should be numbers
|
|
41
|
-
### Added
|
|
42
|
-
- added impexp/README.md about generating ucumDef.json
|
|
43
|
-
|
|
44
|
-
## [4.0.1] 2020-02-14
|
|
45
|
-
### Fixed
|
|
46
|
-
- 4.0.0 was just published today, and is missing a data file in the npm package.
|
|
47
|
-
This version fixes that.
|
|
48
|
-
|
|
49
|
-
## [4.0.0] 2020-01-27
|
|
50
|
-
### Changed
|
|
51
|
-
- This main file of the npm package is now a file that uses CommonJS modules
|
|
52
|
-
(i.e., NodeJs-compatible) instead of a browserified bundle. The problem with
|
|
53
|
-
serving a browserfied bundle via npm was that if you pulled it in and then
|
|
54
|
-
tried to browserify it along with application code, an exception would be thrown
|
|
55
|
-
because browserify has already run on part of the code. The change should be
|
|
56
|
-
transparent to the user of the package, but just in case there is some
|
|
57
|
-
unforeseen consequence, I am incrementing the major version. If your
|
|
58
|
-
application needs the browserified version, that is still available in the
|
|
59
|
-
browser-dist directory.
|
|
60
|
-
|
|
61
|
-
## [3.0.1] 2020-01-07
|
|
62
|
-
### Fixed
|
|
63
|
-
- Corrected processing so that strings like "1e2" are no longer considered valid
|
|
64
|
-
units.
|
|
65
|
-
|
|
66
|
-
## [3.0.0] - 2019-09-26
|
|
67
|
-
### Fixed
|
|
68
|
-
- Updated dependencies to get patches for security vulnerabilities.
|
|
69
|
-
- Minor corrections to the UCUM data (mostly with regard to extra properties we
|
|
70
|
-
added like "guidance").
|
|
71
|
-
### Changed
|
|
72
|
-
- As result of the dependency update, the build process needed to be revised,
|
|
73
|
-
and the individual transpiled files were removed. The package.json "main"
|
|
74
|
-
file has changed. This is not expected to cause a problem for normal usage of
|
|
75
|
-
the package (relying on the "main" file), and the API has not changed, but due
|
|
76
|
-
to the upheaval, a semver-major change seemed warranted.
|
|
77
|
-
|
|
78
|
-
## [2.6.4] - 2019-06-05
|
|
79
|
-
### Fixed
|
|
80
|
-
- Updated dependencies to get patches for security vulnerabilities.
|
|
81
|
-
|
|
82
|
-
## [2.6.3] - 2019-04-29
|
|
83
|
-
### Fixed
|
|
84
|
-
- Demo page: The validation message on the Validator tab was displayed
|
|
85
|
-
vertically when the unit was valid.
|
|
86
|
-
|
|
87
|
-
## [2.6.2] - 2019-03-29
|
|
88
|
-
### Fixed
|
|
89
|
-
- Demo page changes: fixed processing flow problem that allowed an attempt to
|
|
90
|
-
convert an invalid unit; tweaked flow on initial display of converter tab;
|
|
91
|
-
added meta data to the page to increase visibility to search engines.
|
|
92
|
-
|
|
93
|
-
## [2.6.1] - 2019-03-22
|
|
94
|
-
### Added
|
|
95
|
-
- Added mass<-> moles conversion to the UCUM Demo page, with a request to the
|
|
96
|
-
user to supply a molecular weight when such a conversion is requested.
|
|
97
|
-
|
|
98
|
-
## [2.6.0] - 2019-03-08
|
|
99
|
-
### Added
|
|
100
|
-
- Added capability to existing convertUnitTo library function to convert mass
|
|
101
|
-
to moles expression.
|
|
102
|
-
|
|
103
|
-
## [2.5.5] - 2019-02-28
|
|
104
|
-
### Fixed
|
|
105
|
-
- Fixed mismatches with version numbers as well as problem with library
|
|
106
|
-
distribution on 2.5.2.
|
|
107
|
-
|
|
108
|
-
## [2.5.2] - 2019-02-05
|
|
109
|
-
### Fixed
|
|
110
|
-
- Fixed problem with 2.5.0 where not all files were being included in the
|
|
111
|
-
source-es5/ucumPkg.js package.
|
|
112
|
-
|
|
113
|
-
## [2.5.0] - 2019-01-07
|
|
114
|
-
### Changed
|
|
115
|
-
- The changes made by browserify have been removed from the ucum-lhc package
|
|
116
|
-
available to node.js users, necessitating the creation of separate distributions.
|
|
117
|
-
The distribution of the library code starts at the source-es5/ucumPkg.js file.
|
|
118
|
-
The distribution in the browser-dist directory contains server side code that
|
|
119
|
-
includes browser related code. The distribution in the demo-dist directory
|
|
120
|
-
continues to contain the code related to the UCUM-LHC demo page.
|
|
121
|
-
|
|
122
|
-
## [2.4.4] - 2018-12-13
|
|
123
|
-
### Fixed
|
|
124
|
-
- fixed bug where validation of a unit string that contains an operator, such
|
|
125
|
-
as B[10.nV] is a valid string and validates correctly as a single valid UCUM
|
|
126
|
-
code, but did not validate correctly when preceded by a prefix, e.g., dB[10.nV].
|
|
127
|
-
|
|
128
|
-
## [2.4.3] - 2018-11-06
|
|
129
|
-
### Fixed
|
|
130
|
-
- fixed bug where validation of a unit string terminated with an operator
|
|
131
|
-
returned an incorrect response. It correctly flagged the string as an
|
|
132
|
-
invalid unit expression but included a coding error message that should
|
|
133
|
-
not have been included.
|
|
134
|
-
|
|
135
|
-
## [2.4.2] - 2018-11-05
|
|
136
|
-
### Fixed
|
|
137
|
-
- blocked division and multiplication operations as well as conversion
|
|
138
|
-
operations on arbitrary units
|
|
139
|
-
|
|
140
|
-
## [2.4.1] - 2018-10-25
|
|
141
|
-
### Added
|
|
142
|
-
- Added capability to open directly to converter page using url
|
|
143
|
-
https://ucum.nlm.nih.gov/ucum-lhc/demo.html#converter
|
|
144
|
-
|
|
145
|
-
## [2.4.0] - 2018-10-10
|
|
146
|
-
### Changed
|
|
147
|
-
- redesigned validator tab on Demo page to move messages closer to the
|
|
148
|
-
unit expression input field
|
|
149
|
-
- redesigned converter tab on Demo page to resemble an equation for the
|
|
150
|
-
conversion
|
|
151
|
-
|
|
152
|
-
## [2.3.4] - 2018-08-15
|
|
153
|
-
### Fixed
|
|
154
|
-
- Updated npm packages growl and semver to avoid critical security
|
|
155
|
-
vulnerabilities flagged by GitHub
|
|
156
|
-
|
|
157
|
-
## [2.3.3] - 2018-08-15
|
|
158
|
-
### Fixed
|
|
159
|
-
- Updated conversion code to properly handle conversion of unitless
|
|
160
|
-
measurements, such as moles.
|
|
161
|
-
- Updated code to make text for combined units, e.g., 2.(mmol/L), more
|
|
162
|
-
explicit in regards to evaluation order.
|
|
163
|
-
|
|
164
|
-
## [2.3.2] - 2018-06-27
|
|
165
|
-
### Fixed
|
|
166
|
-
- fixed appearance of the demo page converter tab so that when the page is
|
|
167
|
-
widened in the browser the text all anchors on the left. One portion
|
|
168
|
-
of the text was anchored to the right, which made a widened version look
|
|
169
|
-
wrong.
|
|
170
|
-
|
|
171
|
-
## [2.3.1] - 2018-06-13
|
|
172
|
-
### Fixed
|
|
173
|
-
- modifications to ensure that plain numbers, e.g., 7, are reported correctly.
|
|
174
|
-
### Added
|
|
175
|
-
- added unit name to demo output messages, where available, to make sure user
|
|
176
|
-
knows what unit is being reported as valid.
|
|
177
|
-
|
|
178
|
-
## [2.3.0] - 2018-05-23
|
|
179
|
-
### Added
|
|
180
|
-
- added information related to version number of the ucum-essence.xml
|
|
181
|
-
file used as well as changes made to it
|
|
182
|
-
|
|
183
|
-
## [2.2.1] - 2018-05-22
|
|
184
|
-
### Changed
|
|
185
|
-
- reformatted display of suggestions lists for the demo site to use a bulleted
|
|
186
|
-
list of suggestions rather than a plain text list.
|
|
187
|
-
## Fixed
|
|
188
|
-
- fixed a bug that prevented suggestion lists from being created for more than
|
|
189
|
-
one unit.
|
|
190
|
-
|
|
191
|
-
## [2.2.0] - 2018-05-02
|
|
192
|
-
### Changed
|
|
193
|
-
- added list selection listener to unit expression field on validation
|
|
194
|
-
tab of the demo page
|
|
195
|
-
### Fixed
|
|
196
|
-
- fixed autofill problem on Edge browser.
|
|
197
|
-
|
|
198
|
-
## [2.3.4] - 2018-05-?
|
|
199
|
-
- fixed positioning of text on converter tab of the demo page so that
|
|
200
|
-
it is consistent in how it lines up when the page is widened.
|
|
201
|
-
|
|
202
|
-
## [2.1.12] - 2018-04-26
|
|
203
|
-
### Changed
|
|
204
|
-
- changed unit name (not code) creation for constructed units to enclose
|
|
205
|
-
the name in square brackets and use an asterisk (*) for multiplication
|
|
206
|
-
instead of a period.
|
|
207
|
-
|
|
208
|
-
## [2.1.11] - 2018-04-23
|
|
209
|
-
### Fixed
|
|
210
|
-
- fix for overwritten units during data update process
|
|
211
|
-
|
|
212
|
-
## [2.1.10] - 2018-04-12
|
|
213
|
-
### Changed
|
|
214
|
-
- updates to register bower package
|
|
215
|
-
|
|
216
|
-
## [2.1.9] - 2018-04-03
|
|
217
|
-
### Changed
|
|
218
|
-
- updates to third party and UCUM LHC license information
|
|
219
|
-
|
|
220
|
-
## [2.1.8] - 2018-03-28
|
|
221
|
-
### Fixed
|
|
222
|
-
- fixes to csv file validator
|
|
223
|
-
|
|
224
|
-
## [2.1.7] - 2018-03-12
|
|
225
|
-
### Changed
|
|
226
|
-
- cosmetic updates to overview and demo pages related to banner, titles
|
|
227
|
-
|
|
228
|
-
## [2.1.6] - 2018-03-07
|
|
229
|
-
### Changed
|
|
230
|
-
- created npm package
|
|
231
|
-
|
|
232
|
-
## [2.1.5] - 2018-02-21
|
|
233
|
-
### Changed
|
|
234
|
-
- shifts module tests to use distribution package
|
|
235
|
-
- moves ucumFileValidator to demo directory
|
|
236
|
-
- updates README
|
|
237
|
-
|
|
238
|
-
## [2.1.4] - 2018-02-16
|
|
239
|
-
### Changed
|
|
240
|
-
- removes guidance text for constructed units, e.g., units that are created
|
|
241
|
-
on the fly, as they are specified for validation or conversion. For example,
|
|
242
|
-
m\[H2O\]/cm is constructed from m\[H2O\] (meter of water column) divided by
|
|
243
|
-
cm (centimeter). No guidance data is provided for this constructed unit.
|
|
244
|
-
|
|
245
|
-
## [2.1.3] - 2018-02-15
|
|
246
|
-
### Changed
|
|
247
|
-
- added disclaimer concerning conversion results to demo page convert
|
|
248
|
-
tab and to README.md page
|
|
249
|
-
|
|
250
|
-
## [2.1.2] - 2018-02-15
|
|
251
|
-
### Fixed
|
|
252
|
-
- completed bug fix for zero and negative number of units for conversions.
|
|
253
|
-
|
|
254
|
-
## [2.1.1] - 2018-01-25
|
|
255
|
-
### Changed
|
|
256
|
-
- updated link at the top of the demo page to refer back to the
|
|
257
|
-
overview page - and the link at the top of the overview page to
|
|
258
|
-
refer back to itself.
|
|
259
|
-
- added text to the demo file validation to clarify that only
|
|
260
|
-
units are validated. Prefixes on their own are not validated.
|
|
261
|
-
- updated the ucumDefs.json with version 2.1 (November 21, 2017) of the
|
|
262
|
-
ucum-essence.xml file from unitsofmeasure.org
|
|
263
|
-
### Fixed
|
|
264
|
-
- started fixes on a bug where a zero or negative number of units was considered an error.
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
## [2.1.0] - 2017-12-21
|
|
268
|
-
### Changed
|
|
269
|
-
- Upgraded the validation processing for conversion request on the
|
|
270
|
-
demo page; validation is now performed on the fly as each element
|
|
271
|
-
is entered. This is a change only to the demo page.
|
|
272
|
-
|
|
273
|
-
## [2.0.0] - 2017-12-01
|
|
274
|
-
### Added
|
|
275
|
-
- Added ability to get suggestions for invalid unit expressions.
|
|
276
|
-
|
|
277
|
-
## [1.2.0] - 2017-10-06
|
|
278
|
-
### Fixed
|
|
279
|
-
- Enhanced unit string validation to accommodate/correct:
|
|
280
|
-
- missing multiplication operators, e.g., **2mg** instead of **2.mg**;
|
|
281
|
-
- unit name specified instead of ucum code, e.g., **day** instead of **d**;
|
|
282
|
-
- misplaced annotations, e.g., **{creatine}**mol** instead of mol**{creatine}**;
|
|
283
|
-
- missing square brackets, e.g., **in_i** instead of **[in_i]**; and
|
|
284
|
-
- braces instead of brackets, e.g., **{degF}** instead of **[degF]**.
|
|
285
|
-
|
|
286
|
-
## [1.1.2] - 2017-08-07
|
|
287
|
-
### Changed
|
|
288
|
-
- Updated unit creation process to include updates to case-insensitve codes
|
|
289
|
-
and print symbol values when creating a unit from multiple units.
|
|
290
|
-
- Updated treatment of prefixes for special units that use conversion
|
|
291
|
-
functions to record prefix values in the separate conversion prefix field.
|
|
292
|
-
|
|
293
|
-
## [1.1.1] - 2017-07-13
|
|
294
|
-
### Changed
|
|
295
|
-
- Data file has been updated with enhanced synonyms and is also now written
|
|
296
|
-
in a a readable JSON format.
|
|
297
|
-
|
|
298
|
-
## [1.1.0] - 2017-07-06
|
|
299
|
-
### Changed
|
|
300
|
-
- Autocompleters no longer return multiple-unit strings, e.g., kg/cm.
|
|
301
|
-
Multiple-unit strings are still (very) valid, but the autocompleters just
|
|
302
|
-
return one list single-unit strings at a time.
|
|
303
|
-
- The commensurables list on the conversion tab's "convert to" field has been
|
|
304
|
-
changed to just use the same autocompleter as used for the "convert from" field.
|
|
305
|
-
The list will now include units that cannot be converted.
|
|
306
|
-
|
|
307
|
-
## [1.0.2] - 2017-06-23
|
|
308
|
-
### Fixed
|
|
309
|
-
- Allowed conversion of units with no dimensions
|
|
310
|
-
- added testing for the Unit.convertFrom and Unit.convertTo functions
|
|
311
|
-
|
|
312
|
-
## [1.0.1] - 2017-05-30
|
|
313
|
-
### Added
|
|
314
|
-
- This change log.
|
|
315
|
-
### Changed
|
|
316
|
-
- Streamlined divString function in Unit.js
|
|
317
|
-
- Moved parenthesized unit string processing to separate function
|
|
318
|
-
in UnitString.js (processParens).
|
|
319
|
-
- Added testing for the processParens function in testUnitString.spec.js
|
|
320
|
-
### Fixed
|
|
321
|
-
- Updated UcumFileValidator.js with previously changed function name
|
|
322
|
-
(validUnitString -> validateUnitString in UcumLhcUtils.js).
|