Skip to content
This repository was archived by the owner on Oct 10, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ module.exports = {
'promise/prefer-await-to-callbacks': 0,
'promise/prefer-await-to-then': 0,
'unicorn/filename-case': 0,
'you-dont-need-lodash-underscore/flatten': 0,
},
overrides: [...overrides],
}
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@
"from2-array": "0.0.4",
"hasha": "^5.0.0",
"lodash.camelcase": "^4.3.0",
"lodash.flatten": "^4.4.0",
"lodash.get": "^4.4.2",
"lodash.set": "^4.3.2",
"micro-api-client": "^3.3.0",
Expand Down
4 changes: 2 additions & 2 deletions src/deploy/util.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
const path = require('path')

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

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

module.exports = {
Expand Down