@tryghost/mg-json 0.11.1 → 0.11.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.
|
@@ -15,7 +15,6 @@ import Entities from 'html-entities';
|
|
|
15
15
|
* - a name
|
|
16
16
|
* - an email address
|
|
17
17
|
*/
|
|
18
|
-
|
|
19
18
|
const fakeName = 'Example User';
|
|
20
19
|
const fakeEmailDomain = `example.com`;
|
|
21
20
|
const fakeEmail = (nameSlug, domain) => `${nameSlug}@${domain}`;
|
|
@@ -36,7 +35,7 @@ const hydrateUser = (input, options) => {
|
|
|
36
35
|
|
|
37
36
|
// Handle the case where there is no email by generating one based on slug or name
|
|
38
37
|
if (!input.email) {
|
|
39
|
-
input.email = fakeEmail(input.slug || _.kebabCase(input.name), options
|
|
38
|
+
input.email = fakeEmail(input.slug || _.kebabCase(input.name), options?.email || fakeEmailDomain);
|
|
40
39
|
}
|
|
41
40
|
|
|
42
41
|
// @TODO: log some sort of warning for things like this?
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tryghost/mg-json",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.3",
|
|
4
4
|
"repository": "https://github.com/TryGhost/migrate/tree/main/packages/mg-json",
|
|
5
5
|
"author": "Ghost Foundation",
|
|
6
6
|
"license": "MIT",
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
"jest-extended": "4.0.2"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@tryghost/string": "0.2.
|
|
28
|
+
"@tryghost/string": "0.2.12",
|
|
29
29
|
"bson-objectid": "2.0.4",
|
|
30
30
|
"html-entities": "2.5.2",
|
|
31
31
|
"lodash": "4.17.21"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "c1d13ccea270adcaf60dfc9d1e371ef25dfad31e"
|
|
34
34
|
}
|