Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update ecmaScript to 11 #59

Merged
merged 1 commit into from
Apr 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"mocha": true
},
"parserOptions": {
"ecmaVersion": 6
"ecmaVersion": 11
},
"extends": "google",
"rules": {
Expand Down
2 changes: 1 addition & 1 deletion lib/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ module.exports = class App {
lando.events,
this.log,
this.shell,
lando.config.instance
lando.config.instance,
);
this.metrics = bootstrap.setupMetrics(this.log, lando.config);
this.Promise = lando.Promise;
Expand Down
2 changes: 1 addition & 1 deletion lib/daemon.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ module.exports = class LandoDaemon {
docker = env.getDockerExecutable(),
log = new Log(),
context = 'node',
compose = env.getComposeExecutable()
compose = env.getComposeExecutable(),
) {
this.cache = cache;
this.compose = compose;
Expand Down
2 changes: 1 addition & 1 deletion lib/engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ module.exports = class Engine {
daemon,
daemon.events,
data,
run
run,
);
// Determine install status
this.composeInstalled = config.composeBin !== false;
Expand Down
4 changes: 2 additions & 2 deletions lib/env.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ exports.getComposeExecutable = () => {
const programFiles = process.env.ProgramW6432 || process.env.ProgramFiles;
possiblePaths.push(
programFiles + '\\Docker\\Docker\\resources\\bin',
process.env.SystemRoot + '\\System32'
process.env.SystemRoot + '\\System32',
);

if (process.env.ChocolateyInstall) {
Expand Down Expand Up @@ -94,7 +94,7 @@ exports.getDockerExecutable = () => {

possiblePaths.push(
programFiles + '\\Docker\\Docker\\resources\\bin',
process.env.SystemRoot + '\\System32'
process.env.SystemRoot + '\\System32',
);

if (process.env.ChocolateyInstall) {
Expand Down
4 changes: 2 additions & 2 deletions lib/lando.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ const bootstrapTasks = lando => {
.map(plugin => _(fs.readdirSync(plugin.tasks))
.map(file => path.join(plugin.tasks, file))
.filter(path => _.endsWith(path, '.js'))
.value()
.value(),
)
// Loadem and loggem
.then(tasks => _.flatten(tasks))
Expand All @@ -101,7 +101,7 @@ const bootstrapEngine = lando => {
lando.events,
lando.log,
lando.shell,
lando.config.instance
lando.config.instance,
);
lando.utils = _.merge({}, require('./utils'), require('./config'));

Expand Down
2 changes: 1 addition & 1 deletion lib/plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ module.exports = class Plugins {
.map(plugin => ({name: plugin.name, path: path.join(plugin.path, 'index.js'), dir: plugin.path}))
// Filter again to make sure we have an index.js
.filter(plugin => fs.existsSync(plugin.path))
.value()
.value(),
))
// Then remove any that are flagged as disabled
.filter(plugin => !_.includes(disablePlugins, plugin.name))
Expand Down
2 changes: 1 addition & 1 deletion lib/shell.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const parseCmd = meta => _.merge({}, meta, {
* Helper to parse and add a command to our running process log
*/
const addCommand = ({cmd, id, mode = 'exec', process = {}} = {}) => _.merge({},
parseCmd(parse(cmd)), {id, mode, process}
parseCmd(parse(cmd)), {id, mode, process},
);

/*
Expand Down
4 changes: 2 additions & 2 deletions plugins/lando-core/tasks/info.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ module.exports = lando => ({
return app.init().then(() => lando.engine.list({project: app.project})
.filter(container => filterServices(container.service, options.service))
.each(container => lando.engine.scan(container)
.then(data => console.log(lando.cli.formatData(data, options))))
.then(data => console.log(lando.cli.formatData(data, options)))),
);
} else if (app && !options.deep) {
return app.init().then(() => console.log(lando.cli.formatData(
_.filter(app.info, service => filterServices(service.service, options.service)),
options
options,
)));
}
},
Expand Down
2 changes: 1 addition & 1 deletion plugins/lando-core/tasks/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module.exports = lando => {
_(containers)
.map(container => _.omit(container, ['lando', 'id', 'instance']))
.value(),
options
options,
)));
},
};
Expand Down
2 changes: 1 addition & 1 deletion plugins/lando-proxy/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ module.exports = (app, lando) => {
.flatMap(s => s.urls = _.uniq(s.urls.concat(utils.parse2Info(
app.config.proxy[s.service],
ports,
_.get(s, 'hasCerts', false)
_.get(s, 'hasCerts', false),
))))
.value();
}
Expand Down
2 changes: 1 addition & 1 deletion plugins/lando-recipes/lib/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ exports.runDefaults = (lando, options) => {
options.destination,
_.cloneDeep(lando.config.appEnv),
_.cloneDeep(lando.config.appLabels),
_.get(options, 'initImage', 'devwithlando/util:4')
_.get(options, 'initImage', 'devwithlando/util:4'),
);
const initDir = path.join(lando.config.userConfRoot, 'init', options.name);
const initFiles = lando.utils.dumpComposeData(initData, initDir);
Expand Down
2 changes: 1 addition & 1 deletion plugins/lando-recipes/lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ exports.getDrush = (version, status) => exports.getPhar(
getDrushUrl(version),
'/tmp/drush.phar',
'/usr/local/bin/drush',
status
status,
);

/*
Expand Down
2 changes: 1 addition & 1 deletion test/cache.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ describe('cache', () => {
cache.set(
'subdivisions',
'Sprawling on the fringes of the city',
{persist: true}
{persist: true},
);

fs.existsSync('/tmp/cache/subdivisions').should.be.true;
Expand Down
24 changes: 12 additions & 12 deletions test/compose.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ describe('compose', () => {
const buildResult = compose.build(
['string1', 'string2'],
'my_project',
myOpts
myOpts,
);
expect(buildResult).to.be.an('object');
});
Expand All @@ -67,7 +67,7 @@ describe('compose', () => {
compose.build(
['string test'],
null,
myOpts
myOpts,
);
}).to.throw(Error);
});
Expand All @@ -79,7 +79,7 @@ describe('compose', () => {
const getIdResult = compose.getId(
['string1', 'string2'],
'my_project',
myOpts
myOpts,
);
expect(getIdResult).to.be.an('object');
});
Expand All @@ -101,7 +101,7 @@ describe('compose', () => {
const pullResult = compose.pull(
['string1', 'string2'],
'my_project',
myOpts
myOpts,
);
expect(pullResult).to.be.an('object');
});
Expand All @@ -117,7 +117,7 @@ describe('compose', () => {
const removeResult = compose.remove(
['string1', 'string2'],
'my_project',
myOpts
myOpts,
);
expect(removeResult).to.be.an('object');
});
Expand All @@ -132,7 +132,7 @@ describe('compose', () => {
const runResult = compose.run(
['string1', 'string2'],
'my_project',
myOpts
myOpts,
);
expect(runResult).to.be.an('object');
});
Expand All @@ -144,7 +144,7 @@ describe('compose', () => {
const startResult = compose.start(
['string1', 'string2'],
'my_project',
myOpts
myOpts,
);
expect(startResult).to.be.an('object');
});
Expand All @@ -153,7 +153,7 @@ describe('compose', () => {
const startResult = compose.start(
['string'],
'a_project',
false
false,
);
expect(startResult).to.be.an('object');
});
Expand All @@ -164,7 +164,7 @@ describe('compose', () => {
const startResult = compose.start(
['string test'],
'another_project',
myOpts
myOpts,
);
expect(startResult).to.be.an('object');
myOpts.entrypoint = [];
Expand All @@ -174,7 +174,7 @@ describe('compose', () => {
const startResult = compose.start(
['string test'],
'another_project',
myOpts
myOpts,
);
expect(startResult).to.be.an('object');
});
Expand All @@ -184,7 +184,7 @@ describe('compose', () => {
const startResult = compose.start(
['string test'],
'one_project_more',
myOpts
myOpts,
);
expect(startResult).to.be.an('object');
myOpts.cmd = ['one', 'two'];
Expand All @@ -197,7 +197,7 @@ describe('compose', () => {
const stopResult = compose.stop(
['string1', 'string2'],
'my_project',
myOpts
myOpts,
);
expect(stopResult).to.be.an('object');
});
Expand Down
2 changes: 1 addition & 1 deletion test/docker.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const dummyContainer = (overrides = {}) => {
'io.lando.service-container': 'no',
},
},
overrides
overrides,
);
};

Expand Down
Loading