@cosmotech/core 1.5.0-dev.2 → 1.5.3

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/dist/index.cjs.js CHANGED
@@ -13,14 +13,9 @@ function ownKeys(object, enumerableOnly) {
13
13
 
14
14
  if (Object.getOwnPropertySymbols) {
15
15
  var symbols = Object.getOwnPropertySymbols(object);
16
-
17
- if (enumerableOnly) {
18
- symbols = symbols.filter(function (sym) {
19
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
20
- });
21
- }
22
-
23
- keys.push.apply(keys, symbols);
16
+ enumerableOnly && (symbols = symbols.filter(function (sym) {
17
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
18
+ })), keys.push.apply(keys, symbols);
24
19
  }
25
20
 
26
21
  return keys;
@@ -28,19 +23,12 @@ function ownKeys(object, enumerableOnly) {
28
23
 
29
24
  function _objectSpread2(target) {
30
25
  for (var i = 1; i < arguments.length; i++) {
31
- var source = arguments[i] != null ? arguments[i] : {};
32
-
33
- if (i % 2) {
34
- ownKeys(Object(source), true).forEach(function (key) {
35
- _defineProperty(target, key, source[key]);
36
- });
37
- } else if (Object.getOwnPropertyDescriptors) {
38
- Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
39
- } else {
40
- ownKeys(Object(source)).forEach(function (key) {
41
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
42
- });
43
- }
26
+ var source = null != arguments[i] ? arguments[i] : {};
27
+ i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
28
+ _defineProperty(target, key, source[key]);
29
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
30
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
31
+ });
44
32
  }
45
33
 
46
34
  return target;
@@ -65,6 +53,9 @@ function _defineProperties(target, props) {
65
53
  function _createClass(Constructor, protoProps, staticProps) {
66
54
  if (protoProps) _defineProperties(Constructor.prototype, protoProps);
67
55
  if (staticProps) _defineProperties(Constructor, staticProps);
56
+ Object.defineProperty(Constructor, "prototype", {
57
+ writable: false
58
+ });
68
59
  return Constructor;
69
60
  }
70
61
 
@@ -7995,7 +7986,7 @@ function buildLocalizeFn(args) {
7995
7986
  valuesArray = args.values[_width] || args.values[_defaultWidth];
7996
7987
  }
7997
7988
 
7998
- var index = args.argumentCallback ? args.argumentCallback(dirtyIndex) : dirtyIndex; // @ts-ignore: For some reason TypeScript just don't want to match it, no matter how hard we try. I challange you to try to remove it!
7989
+ var index = args.argumentCallback ? args.argumentCallback(dirtyIndex) : dirtyIndex; // @ts-ignore: For some reason TypeScript just don't want to match it, no matter how hard we try. I challenge you to try to remove it!
7999
7990
 
8000
7991
  return valuesArray[index];
8001
7992
  };
@@ -8562,7 +8553,7 @@ function startOfUTCWeek(dirtyDate, dirtyOptions) {
8562
8553
 
8563
8554
  function getUTCWeekYear(dirtyDate, dirtyOptions) {
8564
8555
  requiredArgs(1, arguments);
8565
- var date = toDate(dirtyDate, dirtyOptions);
8556
+ var date = toDate(dirtyDate);
8566
8557
  var year = date.getUTCFullYear();
8567
8558
  var options = dirtyOptions || {};
8568
8559
  var locale = options.locale;
@@ -9448,7 +9439,7 @@ var formatters = {
9448
9439
  }
9449
9440
  };
9450
9441
 
9451
- function formatTimezoneShort(offset, dirtyDelimiter) {
9442
+ function formatTimezoneShort(offset, delimiter) {
9452
9443
  var sign = offset > 0 ? '-' : '+';
9453
9444
  var absOffset = Math.abs(offset);
9454
9445
  var hours = Math.floor(absOffset / 60);
@@ -9458,7 +9449,6 @@ function formatTimezoneShort(offset, dirtyDelimiter) {
9458
9449
  return sign + String(hours);
9459
9450
  }
9460
9451
 
9461
- var delimiter = dirtyDelimiter || '';
9462
9452
  return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);
9463
9453
  }
9464
9454
 
@@ -9533,7 +9523,7 @@ function timeLongFormatter(pattern, formatLong) {
9533
9523
  }
9534
9524
 
9535
9525
  function dateTimeLongFormatter(pattern, formatLong) {
9536
- var matchResult = pattern.match(/(P+)(p+)?/);
9526
+ var matchResult = pattern.match(/(P+)(p+)?/) || [];
9537
9527
  var datePattern = matchResult[1];
9538
9528
  var timePattern = matchResult[2];
9539
9529
 
package/dist/index.esm.js CHANGED
@@ -5,14 +5,9 @@ function ownKeys(object, enumerableOnly) {
5
5
 
6
6
  if (Object.getOwnPropertySymbols) {
7
7
  var symbols = Object.getOwnPropertySymbols(object);
8
-
9
- if (enumerableOnly) {
10
- symbols = symbols.filter(function (sym) {
11
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
12
- });
13
- }
14
-
15
- keys.push.apply(keys, symbols);
8
+ enumerableOnly && (symbols = symbols.filter(function (sym) {
9
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
10
+ })), keys.push.apply(keys, symbols);
16
11
  }
17
12
 
18
13
  return keys;
@@ -20,19 +15,12 @@ function ownKeys(object, enumerableOnly) {
20
15
 
21
16
  function _objectSpread2(target) {
22
17
  for (var i = 1; i < arguments.length; i++) {
23
- var source = arguments[i] != null ? arguments[i] : {};
24
-
25
- if (i % 2) {
26
- ownKeys(Object(source), true).forEach(function (key) {
27
- _defineProperty(target, key, source[key]);
28
- });
29
- } else if (Object.getOwnPropertyDescriptors) {
30
- Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
31
- } else {
32
- ownKeys(Object(source)).forEach(function (key) {
33
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
34
- });
35
- }
18
+ var source = null != arguments[i] ? arguments[i] : {};
19
+ i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
20
+ _defineProperty(target, key, source[key]);
21
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
22
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
23
+ });
36
24
  }
37
25
 
38
26
  return target;
@@ -57,6 +45,9 @@ function _defineProperties(target, props) {
57
45
  function _createClass(Constructor, protoProps, staticProps) {
58
46
  if (protoProps) _defineProperties(Constructor.prototype, protoProps);
59
47
  if (staticProps) _defineProperties(Constructor, staticProps);
48
+ Object.defineProperty(Constructor, "prototype", {
49
+ writable: false
50
+ });
60
51
  return Constructor;
61
52
  }
62
53
 
@@ -7987,7 +7978,7 @@ function buildLocalizeFn(args) {
7987
7978
  valuesArray = args.values[_width] || args.values[_defaultWidth];
7988
7979
  }
7989
7980
 
7990
- var index = args.argumentCallback ? args.argumentCallback(dirtyIndex) : dirtyIndex; // @ts-ignore: For some reason TypeScript just don't want to match it, no matter how hard we try. I challange you to try to remove it!
7981
+ var index = args.argumentCallback ? args.argumentCallback(dirtyIndex) : dirtyIndex; // @ts-ignore: For some reason TypeScript just don't want to match it, no matter how hard we try. I challenge you to try to remove it!
7991
7982
 
7992
7983
  return valuesArray[index];
7993
7984
  };
@@ -8554,7 +8545,7 @@ function startOfUTCWeek(dirtyDate, dirtyOptions) {
8554
8545
 
8555
8546
  function getUTCWeekYear(dirtyDate, dirtyOptions) {
8556
8547
  requiredArgs(1, arguments);
8557
- var date = toDate(dirtyDate, dirtyOptions);
8548
+ var date = toDate(dirtyDate);
8558
8549
  var year = date.getUTCFullYear();
8559
8550
  var options = dirtyOptions || {};
8560
8551
  var locale = options.locale;
@@ -9440,7 +9431,7 @@ var formatters = {
9440
9431
  }
9441
9432
  };
9442
9433
 
9443
- function formatTimezoneShort(offset, dirtyDelimiter) {
9434
+ function formatTimezoneShort(offset, delimiter) {
9444
9435
  var sign = offset > 0 ? '-' : '+';
9445
9436
  var absOffset = Math.abs(offset);
9446
9437
  var hours = Math.floor(absOffset / 60);
@@ -9450,7 +9441,6 @@ function formatTimezoneShort(offset, dirtyDelimiter) {
9450
9441
  return sign + String(hours);
9451
9442
  }
9452
9443
 
9453
- var delimiter = dirtyDelimiter || '';
9454
9444
  return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);
9455
9445
  }
9456
9446
 
@@ -9525,7 +9515,7 @@ function timeLongFormatter(pattern, formatLong) {
9525
9515
  }
9526
9516
 
9527
9517
  function dateTimeLongFormatter(pattern, formatLong) {
9528
- var matchResult = pattern.match(/(P+)(p+)?/);
9518
+ var matchResult = pattern.match(/(P+)(p+)?/) || [];
9529
9519
  var datePattern = matchResult[1];
9530
9520
  var timePattern = matchResult[2];
9531
9521
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cosmotech/core",
3
3
  "private": false,
4
- "version": "1.5.0-dev.2",
4
+ "version": "1.5.3",
5
5
  "description": "",
6
6
  "main": "dist/index.cjs.js",
7
7
  "module": "dist/index.esm.js",
@@ -37,13 +37,16 @@
37
37
  "@rollup/plugin-image": "^2.0.5",
38
38
  "@rollup/plugin-node-resolve": "^13.0.0",
39
39
  "eslint": "^7.27.0",
40
+ "eslint-config-prettier": "^8.3.0",
40
41
  "eslint-config-standard": "^16.0.2",
41
42
  "eslint-plugin-import": "^2.23.3",
42
43
  "eslint-plugin-jest": "^25.2.4",
43
44
  "eslint-plugin-node": "^11.1.0",
45
+ "eslint-plugin-prettier": "^4.0.0",
44
46
  "eslint-plugin-promise": "^5.1.0",
45
47
  "jest": "^27.3.1",
46
48
  "postcss": "^8.1.0",
49
+ "prettier": "^2.5.1",
47
50
  "rollup": "^2.49.0",
48
51
  "rollup-plugin-peer-deps-external": "^2.2.4",
49
52
  "rollup-plugin-postcss": "^4.0.0",
@@ -53,10 +56,7 @@
53
56
  "dependencies": {
54
57
  "csv-string": "^4.0.1",
55
58
  "date-fns": "^2.25.0",
56
- "eslint-config-prettier": "^8.3.0",
57
- "eslint-plugin-prettier": "^4.0.0",
58
59
  "js-file-download": "^0.4.12",
59
- "prettier": "^2.4.1",
60
60
  "validator": "^13.7.0"
61
61
  }
62
62
  }