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

build(deps): bump commander from 7.2.0 to 12.0.0 #236

Merged
merged 3 commits into from
Mar 1, 2024

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Feb 12, 2024

Bumps commander from 7.2.0 to 12.0.0.

Release notes

Sourced from commander's releases.

v12.0.0

Added

  • .addHelpOption() as another way of configuring built-in help option (#2006)
  • .helpCommand() for configuring built-in help command (#2087)

Fixed

  • Breaking: use non-zero exit code when spawned executable subcommand terminates due to a signal (#2023)
  • Breaking: check passThroughOptions constraints when using .addCommand and throw if parent command does not have .enablePositionalOptions() enabled (#1937)

Changed

  • Breaking: Commander 12 requires Node.js v18 or higher (#2027)
  • Breaking: throw an error if add an option with a flag which is already in use (#2055)
  • Breaking: throw an error if add a command with name or alias which is already in use (#2059)
  • Breaking: throw error when calling .storeOptionsAsProperties() after setting an option value (#1928)
  • replace non-standard JSDoc of @api private with documented @private (#1949)
  • .addHelpCommand() now takes a Command (passing string or boolean still works as before but deprecated) (#2087)
  • refactor internal implementation of built-in help option (#2006)
  • refactor internal implementation of built-in help command (#2087)

Deprecated

  • .addHelpCommand() passing string or boolean (use .helpCommand() or pass a Command) (#2087)

Removed

  • Breaking: removed default export of a global Command instance from CommonJS (use the named program export instead) (#2017)

Migration Tips

global program

If you are using the deprecated default import of the global Command object, you need to switch to using a named import (or create a new Command).

// const program = require('commander');
const { program } = require('commander');

option and command clashes

A couple of configuration problems now throw an error, which will pick up issues in existing programs:

  • adding an option which uses the same flag as a previous option
  • adding a command which uses the same name or alias as a previous command

v12.0.0-1

Added

... (truncated)

Changelog

Sourced from commander's changelog.

[12.0.0] (2024-02-03)

Added

  • .addHelpOption() as another way of configuring built-in help option (#2006)
  • .helpCommand() for configuring built-in help command (#2087)

Fixed

  • Breaking: use non-zero exit code when spawned executable subcommand terminates due to a signal (#2023)
  • Breaking: check passThroughOptions constraints when using .addCommand and throw if parent command does not have .enablePositionalOptions() enabled (#1937)

Changed

  • Breaking: Commander 12 requires Node.js v18 or higher (#2027)
  • Breaking: throw an error if add an option with a flag which is already in use (#2055)
  • Breaking: throw an error if add a command with name or alias which is already in use (#2059)
  • Breaking: throw error when calling .storeOptionsAsProperties() after setting an option value (#1928)
  • replace non-standard JSDoc of @api private with documented @private (#1949)
  • .addHelpCommand() now takes a Command (passing string or boolean still works as before but deprecated) (#2087)
  • refactor internal implementation of built-in help option (#2006)
  • refactor internal implementation of built-in help command (#2087)

Deprecated

  • .addHelpCommand() passing string or boolean (use .helpCommand() or pass a Command) (#2087)

Removed

  • Breaking: removed default export of a global Command instance from CommonJS (use the named program export instead) (#2017)

Migration Tips

global program

If you are using the deprecated default import of the global Command object, you need to switch to using a named import (or create a new Command).

// const program = require('commander');
const { program } = require('commander');

option and command clashes

A couple of configuration problems now throw an error, which will pick up issues in existing programs:

  • adding an option which uses the same flag as a previous option
  • adding a command which uses the same name or alias as a previous command

[12.0.0-1] (2024-01-20)

... (truncated)

Commits
  • 83c3f4e Bump version to 12.0.0
  • e3192a1 Merge pull request #2140 from tj/release/12.x
  • 608eaf0 Update CHANGELOG for v12 (#2133)
  • 3f44d29 Update dependencies preparing for release (#2132)
  • 4d832b2 Merge remote-tracking branch 'origin/develop' into release/12.x
  • b53109b Add links in CHANGELOG
  • 90f3c8a 12.0.0-1
  • eed665d Add 12.0.0-1 changes to CHANGELOG
  • 09244af Refactor help option implementation to hold actual Option (#2006)
  • ff08a02 Refactor help command implementation to hold actual Command (#2087)
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

This affects our actual cli commands so we should put this through paces a bit with init, system, and component install commands.

Bumps [commander](https://github.com/tj/commander.js) from 7.2.0 to 12.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@v7.2.0...v12.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>
@dependabot dependabot bot added the dependencies Pull requests that update a dependency file. label Feb 12, 2024
@mikeethedude mikeethedude added the 👍 Ready for Review Work is ready for review. label Mar 1, 2024
@mikeethedude
Copy link
Contributor

This seems to work for me. This provides our commands to the cli so it isn't a small part. I tweaked some things for deprecations since the original use of this.

Copy link
Contributor

@callinmullaney callinmullaney left a comment

Choose a reason for hiding this comment

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

Looks like we can remove "@types/commander": "^2.12.2", completely. I was getting the following deprecation warning when installing and the package page recommends ditching it completely. https://www.npmjs.com/package/@types/commander

npm WARN deprecated @types/commander@2.12.2: This is a stub types definition for comman

I tried updating .nvmrc to 20 and went through the install without issues. Might be a good idea to bump that as well given emulsify-drupal and emulsify-core are already running with those versions.

Otherwise, the minor refactoring you needed to do here looks good to me.

@callinmullaney callinmullaney added the 🎉 Passes Functional Review Functionality is approved by the reviewer. label Mar 1, 2024
@mikeethedude
Copy link
Contributor

@callinmullaney Done! I agree that we should be using node 20 and it does seem we can get away from that dependency.

Copy link
Contributor

@callinmullaney callinmullaney left a comment

Choose a reason for hiding this comment

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

@callinmullaney callinmullaney added 🎉 Passes Code Review Code is approved by the reviewer. 🎉 Ready to Merge Functionality is approved by the reviewer. and removed 👍 Ready for Review Work is ready for review. labels Mar 1, 2024
@mikeethedude mikeethedude merged commit 4b52844 into develop Mar 1, 2024
2 checks passed
@dependabot dependabot bot deleted the dependabot/npm_and_yarn/commander-12.0.0 branch March 1, 2024 21:07
Copy link

github-actions bot commented May 1, 2024

🎉 This PR is included in version 1.7.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file. 🎉 Passes Code Review Code is approved by the reviewer. 🎉 Passes Functional Review Functionality is approved by the reviewer. 🎉 Ready to Merge Functionality is approved by the reviewer. released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants