Skip to content

Commit 9d107fc

Browse files
committed
chore: bump deps
1 parent 90a24b6 commit 9d107fc

File tree

3 files changed

+995
-1169
lines changed

3 files changed

+995
-1169
lines changed

index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ const writeFile = promisify(fs.writeFile).bind(fs);
2222
const gzip = promisify(zlib.gzip).bind(zlib);
2323
const cache = {};
2424

25-
const base64ToS3 = opts => {
25+
const base64ToS3 = (options = {}) => {
2626
// set defaults
27-
opts = _.defaults(opts, {
27+
const opts = _.defaults(options, {
2828
aws: {},
2929
maxAge: ms('1yr'),
3030
dir: '/',
@@ -41,7 +41,7 @@ const base64ToS3 = opts => {
4141
throw new Error('Directory name `dir` must be a String');
4242
else if (!_.endsWith(opts.dir, '/')) opts.dir += '/';
4343

44-
if (_.startsWith(opts.dir, '/')) opts.dir = opts.dir.substring(1);
44+
if (_.startsWith(opts.dir, '/')) opts.dir = opts.dir.slice(1);
4545

4646
// prepare AWS upload using config
4747
const s3 = new AWS.S3(opts.aws);
@@ -81,8 +81,8 @@ const base64ToS3 = opts => {
8181
);
8282

8383
// go through each replacement and replace original with new
84-
for (let i = 0; i < replacements.length; i++) {
85-
html = html.replace(...replacements[i]);
84+
for (const element of replacements) {
85+
html = html.replace(...element);
8686
}
8787

8888
// update the HTML of the email

package.json

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,37 +20,36 @@
2020
"Nick Baugh <niftylettuce@gmail.com> (http://niftylettuce.com/)"
2121
],
2222
"dependencies": {
23-
"aws-sdk": "^2.528.0",
23+
"aws-sdk": "^2.588.0",
2424
"debug": "^4.1.1",
2525
"is-string-and-not-blank": "^0.0.2",
26-
"lipo": "^0.0.10",
26+
"lipo": "^1.0.1",
2727
"lodash": "^4.17.15",
28-
"mime-types": "^2.1.24",
28+
"mime-types": "^2.1.25",
2929
"rev-hash": "^3.0.0"
3030
},
3131
"devDependencies": {
32-
"@commitlint/cli": "^8.1.0",
33-
"@commitlint/config-conventional": "^8.1.0",
34-
"auto-bind": "^2.1.0",
32+
"@commitlint/cli": "^8.2.0",
33+
"@commitlint/config-conventional": "^8.2.0",
3534
"ava": "^2.4.0",
3635
"cheerio": "^1.0.0-rc.2",
37-
"codecov": "^3.5.0",
38-
"cross-env": "^5.2.1",
39-
"dotenv": "^8.1.0",
40-
"eslint": "^6.4.0",
36+
"codecov": "^3.6.1",
37+
"cross-env": "^6.0.3",
38+
"dotenv": "^8.2.0",
39+
"eslint": "^6.7.2",
4140
"eslint-config-xo-lass": "^1.0.3",
4241
"eslint-plugin-node": "^10.0.0",
4342
"fixpack": "^2.3.1",
44-
"husky": "^3.0.5",
43+
"husky": "^3.1.0",
4544
"image-to-uri": "^1.0.0",
46-
"lint-staged": "^9.2.5",
45+
"lint-staged": "^9.5.0",
4746
"ms": "^2.1.2",
48-
"nodemailer": "^6.3.0",
47+
"nodemailer": "^6.4.2",
4948
"nyc": "^14.1.1",
50-
"remark-cli": "^7.0.0",
49+
"remark-cli": "^7.0.1",
5150
"remark-preset-github": "^0.0.16",
52-
"validator": "^11.1.0",
53-
"xo": "^0.24.0"
51+
"validator": "^12.1.0",
52+
"xo": "^0.25.3"
5453
},
5554
"engines": {
5655
"node": ">=8.3"

0 commit comments

Comments
 (0)