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

Commit a2f9366

Browse files
chore(deps): update dependency @netlify/eslint-config-node to ^2.2.7 (#324)
1 parent 8b01b76 commit a2f9366

File tree

6 files changed

+61
-93
lines changed

6 files changed

+61
-93
lines changed

package-lock.json

Lines changed: 52 additions & 89 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
"@babel/plugin-transform-runtime": "^7.12.15",
9393
"@babel/preset-env": "^7.12.16",
9494
"@babel/runtime": "^7.12.13",
95-
"@netlify/eslint-config-node": "^2.2.5",
95+
"@netlify/eslint-config-node": "^2.2.7",
9696
"ava": "^2.4.0",
9797
"babel-loader": "^8.2.2",
9898
"from2-string": "^1.1.0",

src/deploy/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,9 @@ const deploySite = async (
111111
phase: 'stop',
112112
})
113113

114-
const uploadList = getUploadList(requiredFiles, filesShaMap).concat(getUploadList(requiredFns, fnShaMap))
114+
const filesUploadList = getUploadList(requiredFiles, filesShaMap)
115+
const functionsUploadList = getUploadList(requiredFns, fnShaMap)
116+
const uploadList = [...filesUploadList, ...functionsUploadList]
115117

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

src/deploy/upload_files.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ const uploadFiles = async (api, deployId, uploadList, { concurrentUpload, status
1414
})
1515

1616
const uploadFile = async (fileObj, index) => {
17-
const { normalizedPath, assetType, runtime } = fileObj
18-
const readStreamCtor = () => fs.createReadStream(fileObj.filepath)
17+
const { normalizedPath, assetType, runtime, filepath } = fileObj
18+
const readStreamCtor = () => fs.createReadStream(filepath)
1919

2020
statusCb({
2121
type: 'upload',

src/deploy/util.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ const waitForDeploy = async (api, deployId, siteId, timeout) => {
111111
const getUploadList = (required, shaMap) => {
112112
if (!required || !shaMap) return []
113113
// TODO: use `Array.flatMap()` instead once we remove support for Node <11.0.0
114+
// eslint-disable-next-line unicorn/prefer-spread
114115
return [].concat(...required.map((sha) => shaMap[sha]))
115116
}
116117

src/operations.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ const omit = require('omit.js').default
33

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

0 commit comments

Comments
 (0)