Skip to content
This repository was archived by the owner on Oct 10, 2022. It is now read-only.

Commit 5db4dc5

Browse files
committed
Remove lodash.flatten
1 parent 26be6aa commit 5db4dc5

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

.eslintrc.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ module.exports = {
2828
'promise/prefer-await-to-callbacks': 0,
2929
'promise/prefer-await-to-then': 0,
3030
'unicorn/filename-case': 0,
31-
'you-dont-need-lodash-underscore/flatten': 0,
3231
},
3332
overrides: [...overrides],
3433
}

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@
7575
"from2-array": "0.0.4",
7676
"hasha": "^5.0.0",
7777
"lodash.camelcase": "^4.3.0",
78-
"lodash.flatten": "^4.4.0",
7978
"lodash.get": "^4.4.2",
8079
"lodash.set": "^4.3.2",
8180
"micro-api-client": "^3.3.0",

src/deploy/util.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
const path = require('path')
22

3-
const flatten = require('lodash.flatten')
43
const pWaitFor = require('p-wait-for')
54

65
// Default filter when scanning for files
@@ -106,7 +105,8 @@ const waitForDeploy = async (api, deployId, siteId, timeout) => {
106105
// Transform the fileShaMap and fnShaMap into a generic shaMap that file-uploader.js can use
107106
const getUploadList = (required, shaMap) => {
108107
if (!required || !shaMap) return []
109-
return flatten(required.map((sha) => shaMap[sha]))
108+
// TODO: use `Array.flatMap()` instead once we remove support for Node <11.0.0
109+
return [].concat(...required.map((sha) => shaMap[sha]))
110110
}
111111

112112
module.exports = {

0 commit comments

Comments
 (0)