breeze-client 2.1.7 → 2.2.0-cjs

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/README.md CHANGED
@@ -17,14 +17,18 @@ Client-side querying, caching, dynamic object graphs, change tracking and notifi
17
17
 
18
18
  ## Install from npm
19
19
 
20
- npm install breeze-client@mjs
20
+ npm install breeze-client
21
21
  or
22
22
 
23
- npm install breeze-client
23
+ npm install breeze-client@cjs
24
+
25
+ The version tagged `cjs` uses an older Angular Package Format, and includes ES5 and ES2015 versions, as well as UMD bundles.
26
+
27
+ The version tagged `latest` (and `mjs`) uses updated [Angular Package Format](https://docs.google.com/document/d/1CZC2rcpxffTDfRDs6p1cfbmKNLA6x5O-NtkJglDaBVs/preview) and ES2022 .mjs modules. It has `esm2022` and `fesm2022` folders, but no UMD `bundles` folder.
24
28
 
25
- The version tagged `mjs` uses updated [Angular Package Format](https://docs.google.com/document/d/1CZC2rcpxffTDfRDs6p1cfbmKNLA6x5O-NtkJglDaBVs/preview) and ES2020 .mjs modules. It has `esm2020` and `fesm2020` folders, but no UMD `bundles` folder.
29
+ If you want the latest module format, and don't care about UMD bundles, use `breeze-client`.
26
30
 
27
- If you want the latest module format, and don't care about UMD bundles, use `breeze-client@mjs`.
31
+ If you need UMD bundles, or need backward compatibility with ES5 or ES2015, use `breeze-client@cjs`.
28
32
 
29
33
  ## Documentation
30
34
 
@@ -3424,8 +3424,9 @@
3424
3424
  var val;
3425
3425
  if (sourceTypeName === "string") {
3426
3426
  var src = source.trim();
3427
- if (src === "")
3427
+ if (!source || !source.trim()) {
3428
3428
  return null;
3429
+ }
3429
3430
  val = new Date(Date.parse(src));
3430
3431
  return core.isDate(val) ? val : source;
3431
3432
  }
@@ -3439,7 +3440,9 @@
3439
3440
  function coerceToDateOnly(source, sourceTypeName) {
3440
3441
  var val;
3441
3442
  if (sourceTypeName === "string") {
3442
- var src = source.trim();
3443
+ if (!source || !source.trim()) {
3444
+ return null;
3445
+ }
3443
3446
  val = DataType.parseDateAsLocal(val);
3444
3447
  return core.isDate(val) ? val : source;
3445
3448
  }