@cumulus/common 15.0.3 → 16.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/env.d.ts CHANGED
@@ -2,5 +2,6 @@
2
2
  /// <reference types="node" />
3
3
  /// <reference types="node" />
4
4
  /// <reference types="node" />
5
+ /// <reference types="node" />
5
6
  export declare const getRequiredEnvVar: (name: string, env?: NodeJS.ProcessEnv) => string;
6
7
  //# sourceMappingURL=env.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cumulus/common",
3
- "version": "15.0.3",
3
+ "version": "16.0.0",
4
4
  "description": "Common utilities used across tasks",
5
5
  "keywords": [
6
6
  "GIBS",
@@ -43,9 +43,9 @@
43
43
  "dependencies": {
44
44
  "@aws-sdk/client-s3": "^3.58.0",
45
45
  "@aws-sdk/signature-v4-crt": "^3.58.0",
46
- "@cumulus/aws-client": "15.0.3",
47
- "@cumulus/errors": "15.0.3",
48
- "@cumulus/logger": "15.0.3",
46
+ "@cumulus/aws-client": "16.0.0",
47
+ "@cumulus/errors": "16.0.0",
48
+ "@cumulus/logger": "16.0.0",
49
49
  "ajv": "^6.12.3",
50
50
  "aws-sdk": "^2.585.0",
51
51
  "follow-redirects": "^1.2.4",
@@ -67,5 +67,5 @@
67
67
  "@types/node-forge": "^0.9.5",
68
68
  "@types/url-join": "^4.0.0"
69
69
  },
70
- "gitHead": "5fd5febe740ef96f365d1defc7b9f76ae64c9cc0"
70
+ "gitHead": "f73d94f869ff8c234db26cb0ec939b50b3de1d19"
71
71
  }
package/test-utils.d.ts CHANGED
@@ -2,6 +2,7 @@
2
2
  /// <reference types="node" />
3
3
  /// <reference types="node" />
4
4
  /// <reference types="node" />
5
+ /// <reference types="node" />
5
6
  import { ExecutionContext } from 'ava';
6
7
  export { readJsonFile as readJsonFixture } from './FileUtils';
7
8
  export declare const inTestMode: (env?: NodeJS.ProcessEnv) => boolean;
package/util.d.ts CHANGED
@@ -41,4 +41,5 @@ export declare const removeNilProperties: <T extends object>(obj: T) => { [P in
41
41
  * @kind function
42
42
  */
43
43
  export declare const isOneOf: import("lodash").CurriedFunction2<unknown[], unknown, boolean>;
44
+ export declare const returnNullOrUndefinedOrDate: (dateVal: string | number | null | undefined) => Date | null | undefined;
44
45
  //# sourceMappingURL=util.d.ts.map
package/util.js CHANGED
@@ -30,7 +30,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
30
30
  return (mod && mod.__esModule) ? mod : { "default": mod };
31
31
  };
32
32
  Object.defineProperty(exports, "__esModule", { value: true });
33
- exports.isOneOf = exports.removeNilProperties = exports.deprecate = void 0;
33
+ exports.returnNullOrUndefinedOrDate = exports.isOneOf = exports.removeNilProperties = exports.deprecate = void 0;
34
34
  const curry_1 = __importDefault(require("lodash/curry"));
35
35
  const isNil_1 = __importDefault(require("lodash/isNil"));
36
36
  const omitBy_1 = __importDefault(require("lodash/omitBy"));
@@ -86,4 +86,6 @@ exports.removeNilProperties = removeNilProperties;
86
86
  * @kind function
87
87
  */
88
88
  exports.isOneOf = (0, curry_1.default)((collection, val) => collection.includes(val), 2);
89
+ const returnNullOrUndefinedOrDate = (dateVal) => ((0, isNil_1.default)(dateVal) ? dateVal : new Date(dateVal));
90
+ exports.returnNullOrUndefinedOrDate = returnNullOrUndefinedOrDate;
89
91
  //# sourceMappingURL=util.js.map