Skip to content

Commit 4a8a070

Browse files
committed
chore: dropped moment and use dayjs, bump deps
1 parent 6b83d55 commit 4a8a070

File tree

4 files changed

+1408
-1230
lines changed

4 files changed

+1408
-1230
lines changed

package.json

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -20,36 +20,36 @@
2020
"Nick Baugh <niftylettuce@gmail.com> (http://niftylettuce.com/)"
2121
],
2222
"dependencies": {
23-
"@babel/runtime": "^7.4.5",
23+
"@babel/runtime": "^7.6.3",
24+
"dayjs": "^1.8.16",
2425
"debug": "^4.1.1",
25-
"moment": "^2.24.0",
26-
"nodemailer": "^6.2.1",
27-
"open": "^6.3.0",
26+
"nodemailer": "^6.3.1",
27+
"open": "^6.4.0",
2828
"pify": "^4.0.1",
2929
"pug": "^2.0.4",
30-
"uuid": "^3.3.2"
30+
"uuid": "^3.3.3"
3131
},
3232
"devDependencies": {
33-
"@babel/cli": "^7.4.4",
34-
"@babel/core": "^7.4.5",
35-
"@babel/plugin-transform-runtime": "^7.4.4",
36-
"@babel/preset-env": "^7.4.5",
37-
"@commitlint/cli": "^8.0.0",
38-
"@commitlint/config-conventional": "^8.0.0",
39-
"auto-bind": "^2.1.0",
40-
"ava": "^2.1.0",
41-
"codecov": "^3.5.0",
42-
"cross-env": "^5.2.0",
43-
"eslint": "^6.0.0",
33+
"@babel/cli": "^7.6.4",
34+
"@babel/core": "^7.6.4",
35+
"@babel/plugin-transform-runtime": "^7.6.2",
36+
"@babel/preset-env": "^7.6.3",
37+
"@commitlint/cli": "^8.2.0",
38+
"@commitlint/config-conventional": "^8.2.0",
39+
"auto-bind": "^2.1.1",
40+
"ava": "^2.4.0",
41+
"codecov": "^3.6.1",
42+
"cross-env": "^6.0.3",
43+
"eslint": "^6.5.1",
4444
"eslint-config-xo-lass": "^1.0.3",
45-
"eslint-plugin-node": "^9.1.0",
46-
"husky": "^2.4.1",
47-
"lint-staged": "^8.2.1",
45+
"eslint-plugin-node": "^10.0.0",
46+
"husky": "^3.0.8",
47+
"lint-staged": "^9.4.2",
4848
"nyc": "^14.1.1",
49-
"remark-cli": "^6.0.1",
50-
"remark-preset-github": "^0.0.14",
51-
"rimraf": "^2.6.3",
52-
"xo": "^0.24.0"
49+
"remark-cli": "^7.0.0",
50+
"remark-preset-github": "^0.0.16",
51+
"rimraf": "^3.0.0",
52+
"xo": "^0.25.3"
5353
},
5454
"engines": {
5555
"node": ">=8"

src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const fs = require('fs');
22
const os = require('os');
33
const path = require('path');
44
const debug = require('debug')('preview-email');
5-
const moment = require('moment');
5+
const dayjs = require('dayjs');
66
const nodemailer = require('nodemailer');
77
const open = require('open');
88
const pify = require('pify');
@@ -41,7 +41,7 @@ const previewEmail = async (message, options) => {
4141
Object.assign(res.message, {
4242
cache: true,
4343
pretty: true,
44-
moment
44+
dayjs
4545
})
4646
);
4747

template.pug

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ html
137137
- date = new Date()
138138
tr
139139
th date
140-
td= moment(date).format('ddd, MMM D, YYYY') + ' at ' + moment(date).format('h:mm A')
140+
td= dayjs(date).format('ddd, MMM D, YYYY') + ' at ' + dayjs(date).format('h:mm A')
141141
if headers && typeof headers === 'object' && Object.keys(headers).length > 0
142142
tr
143143
th headers

0 commit comments

Comments
 (0)