Skip to content

Commit a772c6c

Browse files
Merge branch 'main' into renovate/nrwl-monorepo
2 parents 43cd137 + a5b5760 commit a772c6c

File tree

5 files changed

+40
-19
lines changed

5 files changed

+40
-19
lines changed

.eslintrc.js

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
const { overrides } = require('@netlify/eslint-config-node/react_config')
1+
const { overrides } = require('@netlify/eslint-config-node')
22

33
module.exports = {
4-
extends: '@netlify/eslint-config-node/react_config',
4+
extends: '@netlify/eslint-config-node',
55
rules: {
66
'max-depth': 0,
77
complexity: 0,
@@ -19,11 +19,9 @@ module.exports = {
1919
'no-param-reassign': 0,
2020
'no-promise-executor-return': 0,
2121
'no-prototype-builtins': 0,
22-
'no-shadow': 0,
2322
'no-unused-vars': 0,
2423
'prefer-regex-literals': 0,
2524
'promise/prefer-await-to-callbacks': 0,
26-
'require-await': 0,
2725
'unicorn/consistent-function-scoping': 0,
2826
'unicorn/filename-case': 0,
2927
'unicorn/no-array-push-push': 0,

package-lock.json

+30-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
"@babel/preset-env": "^7.15.8",
7777
"@babel/preset-typescript": "^7.16.0",
7878
"@netlify/build": "^20.1.0",
79-
"@netlify/eslint-config-node": "^3.3.11",
79+
"@netlify/eslint-config-node": "^4.0.0",
8080
"@testing-library/cypress": "^8.0.1",
8181
"@types/fs-extra": "^9.0.13",
8282
"@types/jest": "^27.0.2",

src/helpers/files.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,12 @@ exports.moveStaticPages = async ({ netlifyConfig, target, i18n }) => {
104104
const moveFile = async (file) => {
105105
const isData = file.endsWith('.json')
106106
const source = join(root, file)
107-
const target = isData ? join(dataDir, file) : file
107+
const targetFile = isData ? join(dataDir, file) : file
108108

109109
files.push(file)
110-
filesManifest[file] = target
110+
filesManifest[file] = targetFile
111111

112-
const dest = join(netlifyConfig.build.publish, target)
112+
const dest = join(netlifyConfig.build.publish, targetFile)
113113

114114
try {
115115
await move(source, dest)
@@ -130,7 +130,7 @@ exports.moveStaticPages = async ({ netlifyConfig, target, i18n }) => {
130130

131131
// Limit concurrent file moves to number of cpus or 2 if there is only 1
132132
const limit = pLimit(Math.max(2, cpus().length))
133-
const promises = pages.map(async (rawPath) => {
133+
const promises = pages.map((rawPath) => {
134134
const filePath = slash(rawPath)
135135
// Don't move ISR files, as they're used for the first request
136136
if (isrFiles.has(filePath)) {

src/helpers/verification.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,15 @@ exports.checkZipSize = async (file, maxSize = LAMBDA_MAX_SIZE) => {
7878
console.warn(`Could not check zip size because ${file} does not exist`)
7979
return
8080
}
81-
const size = await promises.stat(file).then(({ size }) => size)
82-
if (size < maxSize) {
81+
const fileSize = await promises.stat(file).then(({ size }) => size)
82+
if (fileSize < maxSize) {
8383
return
8484
}
8585
// We don't fail the build, because the actual hard max size is larger so it might still succeed
8686
console.log(
8787
redBright(outdent`
8888
The function zip ${yellowBright(relative(process.cwd(), file))} size is ${prettyBytes(
89-
size,
89+
fileSize,
9090
)}, which is larger than the maximum supported size of ${prettyBytes(maxSize)}.
9191
There are a few reasons this could happen. You may have accidentally bundled a large dependency, or you might have a
9292
large number of pre-rendered pages included.

0 commit comments

Comments
 (0)