@tryghost/mg-curated-members-csv 0.4.16 → 0.4.18
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/lib/process.js +2 -5
- package/package.json +4 -8
package/lib/process.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import {parse, parseISO} from 'date-fns';
|
|
2
|
-
|
|
3
1
|
const processOptions = (member, options) => {
|
|
4
2
|
if (options.freeLabel) {
|
|
5
3
|
member.labels = options.freeLabel;
|
|
@@ -9,15 +7,14 @@ const processOptions = (member, options) => {
|
|
|
9
7
|
};
|
|
10
8
|
|
|
11
9
|
const processMember = (sMember, options) => {
|
|
12
|
-
|
|
13
|
-
const createdAtDate = parse(sMember['Subscribed at'], 'yyyy-MM-dd HH:mm:ss xx', new Date());
|
|
10
|
+
const createdAtDate = sMember['Subscribed at'] ? new Date(sMember['Subscribed at']) : new Date();
|
|
14
11
|
|
|
15
12
|
let member = {
|
|
16
13
|
email: sMember['Email Address'],
|
|
17
14
|
subscribed_to_emails: true,
|
|
18
15
|
complimentary_plan: false,
|
|
19
16
|
stripe_customer_id: null,
|
|
20
|
-
created_at: createdAtDate
|
|
17
|
+
created_at: createdAtDate,
|
|
21
18
|
expiry: null,
|
|
22
19
|
type: 'free'
|
|
23
20
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tryghost/mg-curated-members-csv",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.18",
|
|
4
4
|
"repository": "https://github.com/TryGhost/migrate/tree/main/packages/mg-curated-members-csv",
|
|
5
5
|
"author": "Ghost Foundation",
|
|
6
6
|
"license": "MIT",
|
|
@@ -20,16 +20,12 @@
|
|
|
20
20
|
"access": "public"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"eslint": "8.
|
|
23
|
+
"eslint": "8.57.0",
|
|
24
24
|
"jest": "29.7.0",
|
|
25
25
|
"jest-extended": "4.0.2"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"
|
|
29
|
-
"csv-parser": "3.0.0",
|
|
30
|
-
"date-fns": "2.30.0",
|
|
31
|
-
"ghost-ignition": "4.6.3",
|
|
32
|
-
"lodash": "4.17.21"
|
|
28
|
+
"@tryghost/mg-fs-utils": "^0.13.2"
|
|
33
29
|
},
|
|
34
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "6d66ced5547ace4095b32d0662b158b119a44fa9"
|
|
35
31
|
}
|