Skip to content
Myr

Fix syntax errors in migration example (#1692)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by John Gee · committed by GitHub · parent 47e8b20 · Browse files · 1 file+4 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+4 added−4 removed

  • other:+4 added−4 removed

1 file+4 added−4 removed

modified:CHANGELOG.md+4 added-4 removed
279 unmodified lines
280program281 .command('compress <filename>')282 .option('-t, --trace')283 // Old code before Commander 7284 .action((filename, cmd)) => {284 .action((filename, cmd) => {285 if (cmd.trace) console.log(`Command name is ${cmd.name()}`);286 });287```288289```js290 // New code291 .action((filename, options, command)) => {291 .action((filename, options, command) => {292 if (options.trace) console.log(`Command name is ${command.name()}`);293 });294```295
4 unmodified lines
300 .command('compress <filename>')301 .storeOptionsAsProperties(false)302 .option('-t, --trace')303 // Old code before Commander 7304 .action((filename, command)) => {304 .action((filename, command) => {305 if (command.opts().trace) console.log(`Command name is ${command.name()}`);306 });307```308309```js310 // New code311 .action((filename, options, command)) => {311 .action((filename, options, command) => {312 if (command.opts().trace) console.log(`Command name is ${command.name()}`);313 });314```315
832 unmodified lines