Skip to content

Commit 046e6b9

Browse files
renovate[bot]danezkodiakhq[bot]
authored
chore(deps): update dependency eslint-plugin-sort-destructure-keys to v1.5.0 (#5507)
* chore(deps): update dependency eslint-plugin-sort-destructure-keys to v1.5.0 * chore: fix lint --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Daniel Tschinder <[email protected]> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
1 parent 0c3fd0a commit 046e6b9

15 files changed

+47
-41
lines changed

npm-shrinkwrap.json

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

site/src/_layout.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ export default class Layout extends React.Component {
367367
}
368368

369369
render() {
370-
const { routes = [], children, route, title = 'Netlify CLI', logo } = this.props
370+
const { children, logo, route, routes = [], title = 'Netlify CLI' } = this.props
371371

372372
const { menu, update } = this.state
373373

src/commands/deploy/deploy.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ const deploy = async (options, command) => {
567567
return triggerDeploy({ api, options, siteData, siteId })
568568
}
569569

570-
const { newConfig, configMutations = [] } = await handleBuild({
570+
const { configMutations = [], newConfig } = await handleBuild({
571571
cachedConfig: command.netlify.cachedConfig,
572572
options,
573573
})

src/commands/functions/functions-create.mjs

+2-2
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ const downloadFromURL = async function (command, options, argumentName, function
361361
const fnTemplateFile = path.join(fnFolder, '.netlify-function-template.mjs')
362362
if (await fileExistsAsync(fnTemplateFile)) {
363363
const {
364-
default: { onComplete, addons = [] },
364+
default: { addons = [], onComplete },
365365
// eslint-disable-next-line import/no-dynamic-require
366366
} = await import(pathToFileURL(fnTemplateFile).href)
367367

@@ -463,7 +463,7 @@ const scaffoldFromTemplate = async function (command, options, argumentName, fun
463463
} else if (chosenTemplate === 'report') {
464464
log(`${NETLIFYDEVLOG} Open in browser: https://github.com/netlify/cli/issues/new`)
465465
} else {
466-
const { onComplete, name: templateName, lang, addons = [] } = chosenTemplate
466+
const { addons = [], lang, name: templateName, onComplete } = chosenTemplate
467467
const pathToTemplate = path.join(templatesDir, lang, templateName)
468468
if (!fs.existsSync(pathToTemplate)) {
469469
throw new Error(

src/lib/api.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const FIRST_PAGE = 1
1212
const MAX_PAGES = 10
1313
const MAX_PER_PAGE = 100
1414
export const listSites = async ({ api, options }) => {
15-
const { page = FIRST_PAGE, maxPages = MAX_PAGES, ...rest } = options
15+
const { maxPages = MAX_PAGES, page = FIRST_PAGE, ...rest } = options
1616
const sites = await api.listSites({ page, per_page: MAX_PER_PAGE, ...rest })
1717
// TODO: use pagination headers when js-client returns them
1818
if (sites.length === MAX_PER_PAGE && page + 1 <= maxPages) {

src/utils/deploy/deploy-site.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,14 @@ export const deploySite = async (
3939
maxRetry = DEFAULT_MAX_RETRY,
4040
// API calls this the 'title'
4141
message: title,
42+
rootDir,
4243
siteEnv,
4344
skipFunctionsCache,
4445
statusCb = () => {
4546
/* default to noop */
4647
},
4748
syncFileLimit = DEFAULT_SYNC_LIMIT,
4849
tmpDir = temporaryDirectory(),
49-
rootDir,
5050
} = {},
5151
) => {
5252
statusCb({

src/utils/detect-server-settings.mjs

+5-5
Original file line numberDiff line numberDiff line change
@@ -160,13 +160,13 @@ const getSettingsFromFramework = (framework) => {
160160
build: { directory: dist },
161161
dev: {
162162
commands: [command],
163-
port: frameworkPort,
164163
pollingStrategies = [],
164+
port: frameworkPort,
165165
},
166-
name: frameworkName,
167-
staticAssetsDirectory: staticDir,
168166
env = {},
167+
name: frameworkName,
169168
plugins,
169+
staticAssetsDirectory: staticDir,
170170
} = framework
171171

172172
return {
@@ -246,10 +246,10 @@ const handleCustomFramework = ({ devConfig }) => {
246246
const mergeSettings = async ({ devConfig, frameworkSettings = {} }) => {
247247
const {
248248
command: frameworkCommand,
249-
frameworkPort: frameworkDetectedPort,
250249
dist,
251-
framework,
252250
env,
251+
framework,
252+
frameworkPort: frameworkDetectedPort,
253253
pollingStrategies = [],
254254
} = frameworkSettings
255255

src/utils/dev.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ export const getSiteInformation = async ({ api, offline, site, siteInfo }) => {
132132
}
133133

134134
const getEnvSourceName = (source) => {
135-
const { printFn = chalk.green, name = source } = ENV_VAR_SOURCES[source] || {}
135+
const { name = source, printFn = chalk.green } = ENV_VAR_SOURCES[source] || {}
136136

137137
return printFn(name)
138138
}

src/utils/dot-env.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export const loadDotEnvFiles = async function ({ envFiles, projectDir }) {
2222
// in the user configuration, the order is highest to lowest
2323
const defaultEnvFiles = ['.env.development.local', '.env.local', '.env.development', '.env']
2424

25-
export const tryLoadDotEnvFiles = async ({ projectDir, dotenvFiles = defaultEnvFiles }) => {
25+
export const tryLoadDotEnvFiles = async ({ dotenvFiles = defaultEnvFiles, projectDir }) => {
2626
const results = await Promise.all(
2727
dotenvFiles.map(async (file) => {
2828
const filepath = path.resolve(projectDir, file)

src/utils/init/utils.mjs

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ const getDefaultSettings = ({
4040
const recommendedPlugins = getRecommendPlugins(frameworkPlugins, config)
4141
const {
4242
command: defaultBuildCmd = frameworkBuildCommand,
43-
publish: defaultBuildDir = frameworkBuildDir,
4443
functions: defaultFunctionsDir,
44+
publish: defaultBuildDir = frameworkBuildDir,
4545
} = config.build
4646

4747
return {
@@ -87,9 +87,9 @@ export const getBuildSettings = async ({ config, env, repositoryRoot, siteRoot }
8787
const baseDirectory = getBaseDirectory({ repositoryRoot, siteRoot })
8888
const nodeVersion = await detectNodeVersion({ baseDirectory, env })
8989
const {
90-
frameworkName,
9190
frameworkBuildCommand,
9291
frameworkBuildDir,
92+
frameworkName,
9393
frameworkPlugins = [],
9494
} = await getFrameworkInfo({
9595
baseDirectory,

tests/integration/110.command.build.test.cjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const defaultEnvs = {
1818
const runBuildCommand = async function (
1919
t,
2020
cwd,
21-
{ apiUrl, exitCode: expectedExitCode = 0, output: outputs, flags = [], env = defaultEnvs } = {},
21+
{ apiUrl, env = defaultEnvs, exitCode: expectedExitCode = 0, flags = [], output: outputs } = {},
2222
) {
2323
const { all, exitCode } = await execa(cliPath, ['build', ...flags], {
2424
reject: false,

tests/integration/20.command.functions.test.cjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const test = isCI ? avaTest.serial.bind(avaTest) : avaTest
1616
const DEFAULT_PORT = 9999
1717
const SERVE_TIMEOUT = 180_000
1818

19-
const withFunctionsServer = async ({ builder, args = [], port = DEFAULT_PORT }, testHandler) => {
19+
const withFunctionsServer = async ({ args = [], builder, port = DEFAULT_PORT }, testHandler) => {
2020
let ps
2121
try {
2222
ps = execa(cliPath, ['functions:serve', ...args], {

tests/integration/utils/dev-server.cjs

+4-4
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ const getExecaOptions = ({ cwd, env }) => {
2323
}
2424

2525
const startServer = async ({
26-
cwd,
26+
args = [],
2727
context = 'dev',
28-
offline = true,
28+
cwd,
2929
env = {},
30-
args = [],
3130
expectFailure = false,
32-
serve = false,
31+
offline = true,
3332
prompt,
33+
serve = false,
3434
}) => {
3535
const port = await getPort()
3636
const staticPort = await getPort()

tests/integration/utils/mock-api.cjs

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const startMockApi = ({ routes, silent }) => {
1818
app.use(express.json())
1919
app.use(express.raw())
2020

21-
routes.forEach(({ method = 'get', path, response = {}, status = 200, requestBody }) => {
21+
routes.forEach(({ method = 'get', path, requestBody, response = {}, status = 200 }) => {
2222
app[method.toLowerCase()](`/api/v1/${path}`, function onRequest(req, res) {
2323
// validate request body
2424
if (requestBody !== undefined && !isDeepStrictEqual(requestBody, req.body)) {
@@ -73,7 +73,7 @@ const getEnvironmentVariables = ({ apiUrl }) => ({
7373
NETLIFY_API_URL: apiUrl,
7474
})
7575

76-
const getCLIOptions = ({ apiUrl, builder: { directory: cwd }, extendEnv = true, env = {} }) => ({
76+
const getCLIOptions = ({ apiUrl, builder: { directory: cwd }, env = {}, extendEnv = true }) => ({
7777
cwd,
7878
env: { ...getEnvironmentVariables({ apiUrl }), ...env },
7979
extendEnv,

tests/integration/utils/site-builder.cjs

+2-2
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ const createSiteBuilder = ({ siteName }) => {
8888
})
8989
return builder
9090
},
91-
withRedirectsFile: ({ redirects = [], pathPrefix = '' }) => {
91+
withRedirectsFile: ({ pathPrefix = '', redirects = [] }) => {
9292
const dest = path.join(directory, pathPrefix, '_redirects')
9393
tasks.push(async () => {
9494
const content = redirects
@@ -133,7 +133,7 @@ const createSiteBuilder = ({ siteName }) => {
133133
files.forEach(builder.withContentFile)
134134
return builder
135135
},
136-
withEnvFile: ({ path: filePath = '.env', pathPrefix = '', env = {} }) => {
136+
withEnvFile: ({ env = {}, path: filePath = '.env', pathPrefix = '' }) => {
137137
const dest = path.join(directory, pathPrefix, filePath)
138138
tasks.push(async () => {
139139
await ensureDir(path.dirname(dest))

0 commit comments

Comments
 (0)