Skip to content
This repository has been archived by the owner on May 22, 2024. It is now read-only.

Commit

Permalink
chore(deps): update dependency @netlify/eslint-config-node to ^3.0.3 (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
renovate[bot] authored May 30, 2021
1 parent 73bf246 commit 57e57ab
Show file tree
Hide file tree
Showing 8 changed files with 263 additions and 579 deletions.
824 changes: 259 additions & 565 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
"yargs": "^15.4.1"
},
"devDependencies": {
"@netlify/eslint-config-node": "^3.0.1",
"@netlify/eslint-config-node": "^3.0.3",
"adm-zip": "^0.5.0",
"ava": "^2.4.0",
"cpy": "^8.0.0",
Expand Down
1 change: 0 additions & 1 deletion src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ const getConfigForFunction = ({ config, func }) => {
}

// It's safe to mutate the array because it's local to this function.
// eslint-disable-next-line fp/no-mutating-methods
const matches = Object.keys(config)
.filter((expression) => minimatch(func.name, expression))
.map((expression) => {
Expand Down
1 change: 0 additions & 1 deletion src/node_dependencies/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ const listFilesUsingLegacyBundler = async function ({ srcPath, mainFile, srcDir,

// We sort so that the archive's checksum is deterministic.
// Mutating is fine since `Array.filter()` returns a shallow copy
// eslint-disable-next-line fp/no-mutating-methods
const filteredFiles = uniqueFiles.filter(isNotJunk).sort()
return filteredFiles
}
Expand Down
3 changes: 0 additions & 3 deletions src/node_dependencies/resolve.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,12 @@ const resolvePathPreserveSymlinksForDir = function (path, basedir) {
// see https://github.com/browserify/resolve/issues/188#issuecomment-679010477
// we return the first resolved location or the first error if all failed
const resolvePathPreserveSymlinks = async function (path, baseDirs) {
// eslint-disable-next-line fp/no-let
let firstError
// eslint-disable-next-line fp/no-loops
for (const basedir of baseDirs) {
try {
// eslint-disable-next-line no-await-in-loop
return await resolvePathPreserveSymlinksForDir(path, basedir)
} catch (error) {
// eslint-disable-next-line fp/no-mutation
firstError = firstError || error
}
}
Expand Down
1 change: 0 additions & 1 deletion src/runtimes/node/finder.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ const findFunctionsInPaths = async function (paths) {
const functions = await Promise.all(paths.map(getFunctionAtPath))

// It's fine to mutate the array since its scope is local to this function.
// eslint-disable-next-line fp/no-mutating-methods
const sortedFunctions = functions.filter(Boolean).sort((fA, fB) => {
// We first sort the functions array to put directories first. This is so
// that `{name}/{name}.js` takes precedence over `{name}.js`.
Expand Down
9 changes: 3 additions & 6 deletions src/runtimes/node/native_modules/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const packageName = /^([^@][^/]*|@[^/]*\/[^/]+)(?:\/|$)/

const findNativeModule = (packageJsonPath, cache) => {
if (cache[packageJsonPath] === undefined) {
// eslint-disable-next-line fp/no-mutation, no-param-reassign, promise/prefer-await-to-then
// eslint-disable-next-line no-param-reassign, promise/prefer-await-to-then
cache[packageJsonPath] = readPackageJson(packageJsonPath).then(
(data) => [Boolean(isNativeModule(data), data), data],
() => [],
Expand All @@ -33,10 +33,8 @@ const externalNativeModulesPlugin = (externalizedModules) => ({

if (!package) return

// eslint-disable-next-line fp/no-let
let directory = args.resolveDir

// eslint-disable-next-line fp/no-loops
while (true) {
if (path.basename(directory) !== 'node_modules') {
const modulePath = path.join(directory, 'node_modules', package[1])
Expand All @@ -48,11 +46,11 @@ const externalNativeModulesPlugin = (externalizedModules) => ({
if (isNative === true) {
// eslint-disable-next-line max-depth
if (externalizedModules[args.path] === undefined) {
// eslint-disable-next-line fp/no-mutation, no-param-reassign
// eslint-disable-next-line no-param-reassign
externalizedModules[args.path] = {}
}

// eslint-disable-next-line fp/no-mutation, no-param-reassign
// eslint-disable-next-line no-param-reassign
externalizedModules[args.path][modulePath] = packageJsonData.version

return { path: args.path, external: true }
Expand All @@ -70,7 +68,6 @@ const externalNativeModulesPlugin = (externalizedModules) => ({
break
}

// eslint-disable-next-line fp/no-mutation
directory = parentDirectory
}
})
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
// eslint-disable-next-line import/no-extraneous-dependencies
module.exports = require('@org/test')

2 comments on commit 57e57ab

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⏱ Benchmark results

largeDepsEsbuild: 11.4s

undefined

largeDepsZisi: 1m 2.9s

undefined

@erezrokah
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

giphy

Please sign in to comment.