Skip to content

Commit

Permalink
Rename runnerConfig to runner.config
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed Sep 12, 2021
1 parent 4ae3867 commit 0839f87
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
4 changes: 2 additions & 2 deletions src/combination/tasks/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import { lookupFiles } from '../../config/lookup.js'
// - This can be useful in programmatic usage
// - This is only useful when using several runners. If all runners have no
// tasks, the run will fail.
export const applyDefaultTasks = async function ({ runnerConfig }) {
const { tasks = await resolveDefaultTasks() } = runnerConfig
export const applyDefaultTasks = async function ({ config }) {
const { tasks = await resolveDefaultTasks() } = config
return tasks
}

Expand Down
14 changes: 5 additions & 9 deletions src/combination/tasks/load.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,19 @@ import { UserError, PluginError } from '../../error/main.js'

// Select the runners and retrieve their related spawn options using
// `runner.launch()`
export const loadRunner = async function ({
id,
config: runnerConfig,
launch,
}) {
export const loadRunner = async function ({ id, config, launch }) {
const {
spawn,
spawnOptions = {},
versions,
} = await launchRunner({ id, runnerConfig, launch })
return { id, spawn, spawnOptions, versions, runnerConfig }
} = await launchRunner({ id, config, launch })
return { id, spawn, spawnOptions, versions, config }
}

// Fire `runner.launch()`
const launchRunner = async function ({ id, runnerConfig, launch }) {
const launchRunner = async function ({ id, config, launch }) {
try {
return await launch(runnerConfig)
return await launch(config)
} catch (error) {
throw getLaunchError(error, id)
}
Expand Down
4 changes: 2 additions & 2 deletions src/run/measure/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const startCombination = async function (
{
dimensions: {
task: { id, path },
runner: { runnerConfig },
runner: { config },
},
inputs,
},
Expand All @@ -34,7 +34,7 @@ const startCombination = async function (
const { tasks: taskIds } = await sendAndReceive(
{
event: 'start',
runnerConfig,
runnerConfig: config,
taskId: id,
taskPath: path,
inputs: inputsObj,
Expand Down

0 comments on commit 0839f87

Please sign in to comment.