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

Commit

Permalink
chore(deps): update dependency @netlify/eslint-config-node to ^2.2.7 (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
renovate[bot] committed Feb 15, 2021
1 parent 8b01b76 commit a2f9366
Show file tree
Hide file tree
Showing 6 changed files with 61 additions and 93 deletions.
141 changes: 52 additions & 89 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
"@babel/plugin-transform-runtime": "^7.12.15",
"@babel/preset-env": "^7.12.16",
"@babel/runtime": "^7.12.13",
"@netlify/eslint-config-node": "^2.2.5",
"@netlify/eslint-config-node": "^2.2.7",
"ava": "^2.4.0",
"babel-loader": "^8.2.2",
"from2-string": "^1.1.0",
Expand Down
4 changes: 3 additions & 1 deletion src/deploy/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,9 @@ const deploySite = async (
phase: 'stop',
})

const uploadList = getUploadList(requiredFiles, filesShaMap).concat(getUploadList(requiredFns, fnShaMap))
const filesUploadList = getUploadList(requiredFiles, filesShaMap)
const functionsUploadList = getUploadList(requiredFns, fnShaMap)
const uploadList = [...filesUploadList, ...functionsUploadList]

await uploadFiles(api, deployId, uploadList, { concurrentUpload, statusCb, maxRetry })

Expand Down
4 changes: 2 additions & 2 deletions src/deploy/upload_files.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ const uploadFiles = async (api, deployId, uploadList, { concurrentUpload, status
})

const uploadFile = async (fileObj, index) => {
const { normalizedPath, assetType, runtime } = fileObj
const readStreamCtor = () => fs.createReadStream(fileObj.filepath)
const { normalizedPath, assetType, runtime, filepath } = fileObj
const readStreamCtor = () => fs.createReadStream(filepath)

statusCb({
type: 'upload',
Expand Down
1 change: 1 addition & 0 deletions src/deploy/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ const waitForDeploy = async (api, deployId, siteId, timeout) => {
const getUploadList = (required, shaMap) => {
if (!required || !shaMap) return []
// TODO: use `Array.flatMap()` instead once we remove support for Node <11.0.0
// eslint-disable-next-line unicorn/prefer-spread
return [].concat(...required.map((sha) => shaMap[sha]))
}

Expand Down
2 changes: 2 additions & 0 deletions src/operations.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ const omit = require('omit.js').default

// Retrieve all OpenAPI operations
const getOperations = function () {
// TODO: switch to Array.flat() once we drop support for Node.js < 11.0.0
// eslint-disable-next-line unicorn/prefer-spread
return [].concat(
...Object.entries(paths).map(([path, pathItem]) => {
const operations = omit(pathItem, ['parameters'])
Expand Down

0 comments on commit a2f9366

Please sign in to comment.