@adobe/spacecat-shared-utils 1.50.2 → 1.50.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/CHANGELOG.md +7 -0
- package/package.json +4 -5
- package/src/functions.js +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [@adobe/spacecat-shared-utils-v1.50.3](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-utils-v1.50.2...@adobe/spacecat-shared-utils-v1.50.3) (2025-09-09)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **deps:** update external major (major) ([#795](https://github.com/adobe/spacecat-shared/issues/795)) ([b020e88](https://github.com/adobe/spacecat-shared/commit/b020e884bfcad48667da87ad9caee7a3669e43d0))
|
|
7
|
+
|
|
1
8
|
# [@adobe/spacecat-shared-utils-v1.50.2](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-utils-v1.50.1...@adobe/spacecat-shared-utils-v1.50.2) (2025-09-06)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/spacecat-shared-utils",
|
|
3
|
-
"version": "1.50.
|
|
3
|
+
"version": "1.50.3",
|
|
4
4
|
"description": "Shared modules of the Spacecat Services - utils",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -36,12 +36,12 @@
|
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@adobe/helix-shared-wrap": "2.0.2",
|
|
38
38
|
"@types/validator": "^13.15.2",
|
|
39
|
-
"chai": "
|
|
39
|
+
"chai": "6.0.1",
|
|
40
40
|
"chai-as-promised": "8.0.2",
|
|
41
41
|
"esmock": "2.7.2",
|
|
42
42
|
"husky": "9.1.7",
|
|
43
43
|
"nock": "14.0.10",
|
|
44
|
-
"sinon": "
|
|
44
|
+
"sinon": "21.0.0",
|
|
45
45
|
"sinon-chai": "4.0.1"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
@@ -53,8 +53,7 @@
|
|
|
53
53
|
"@aws-sdk/client-sqs": "3.883.0",
|
|
54
54
|
"@json2csv/plainjs": "7.0.6",
|
|
55
55
|
"aws-xray-sdk": "3.10.3",
|
|
56
|
-
"date-fns": "
|
|
57
|
-
"uuid": "11.1.0",
|
|
56
|
+
"date-fns": "4.1.0",
|
|
58
57
|
"validator": "^13.15.15"
|
|
59
58
|
}
|
|
60
59
|
}
|
package/src/functions.js
CHANGED
|
@@ -10,13 +10,13 @@
|
|
|
10
10
|
* governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
import { validate as uuidValidate } from 'uuid';
|
|
14
13
|
import isEmail from 'validator/lib/isEmail.js';
|
|
15
14
|
|
|
16
15
|
// Precompile regular expressions
|
|
17
16
|
const REGEX_ISO_DATE = /\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/;
|
|
18
17
|
const REGEX_TIME_OFFSET_DATE = /\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}(Z|[+-]\d{2}:\d{2})/;
|
|
19
18
|
const IMS_ORG_ID_REGEX = /[a-z0-9]{24}@AdobeOrg/i;
|
|
19
|
+
const UUID_V4_REGEX = /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
22
|
* Determines if the given parameter is an array.
|
|
@@ -204,7 +204,7 @@ function isValidUrl(urlString) {
|
|
|
204
204
|
* @return {boolean} True if the given string is a valid UUID.
|
|
205
205
|
*/
|
|
206
206
|
function isValidUUID(uuid) {
|
|
207
|
-
return
|
|
207
|
+
return UUID_V4_REGEX.test(uuid);
|
|
208
208
|
}
|
|
209
209
|
|
|
210
210
|
/**
|