Skip to content
This repository has been archived by the owner on Apr 12, 2022. It is now read-only.

update to commander@9.0.0, remove negated cli param defaults #2932

Merged
merged 2 commits into from Feb 2, 2022

Conversation

pedroslopez
Copy link
Member

@pedroslopez pedroslopez commented Feb 2, 2022

Change description

Supersedes #2911

In the latest version of commander, the behavior of default values for boolean options has changed (see tj/commander.js#1652). This affects our use of negated options with a default value.

With a param no-exports with default: false...

Previously (8.3.0):

$ roo run
params.export = true 

$ roo run --no-exports
params.export = false

Now (9.0.0):

$ roo run
params.export = false 

$ roo run --no-exports
params.export = false

This meant that roo run by default was no longer exporting records after the commander upgrade. Removing the default value from these negated boolean options returns the expected behavior.

Checklists

Development

  • Application changes have been tested appropriately

Impact

  • Code follows company security practices and guidelines
  • Security impact of change has been considered
  • Performance impact of change has been considered
  • Possible migration needs considered (model migrations, config migrations, etc.)

Please explain any security, performance, migration, or other impacts if relevant:

Code review

  • Pull request has a descriptive title and context useful to a reviewer. Screenshots or screencasts are attached where applicable.
  • Relevant tags have been added to the PR (bug, enhancement, internal, etc.)

dependabot bot and others added 2 commits February 1, 2022 04:11
Bumps [commander](https://github.com/tj/commander.js) from 8.3.0 to 9.0.0.
- [Release notes](https://github.com/tj/commander.js/releases)
- [Changelog](https://github.com/tj/commander.js/blob/master/CHANGELOG.md)
- [Commits](tj/commander.js@v8.3.0...v9.0.0)

---
updated-dependencies:
- dependency-name: commander
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@pedroslopez pedroslopez added the dependencies Pull requests that update a dependency file label Feb 2, 2022
@@ -25,7 +25,6 @@ export class RunCLI extends CLI {
flag: true,
},
"no-export": {
default: false,
Copy link
Member

Choose a reason for hiding this comment

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

Good research figuring this out!

@pedroslopez pedroslopez marked this pull request as ready for review February 2, 2022 16:10
@pedroslopez pedroslopez merged commit aefc814 into main Feb 2, 2022
@pedroslopez pedroslopez deleted the commander-9 branch February 2, 2022 18:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants