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

Deprecate command:* command and event #1612

Merged

Conversation

shadowspawn
Copy link
Collaborator

Pull Request

Problem

The command events are an original implementation detail which has changed. They have been shown in the README to supply some missing functionality, so we keep them working.

The .command('*') and .on('command:*') events in particular are no longer needed as there are newer more explicit ways of doing what they were used for.

This PR prompt by confusion in: #1609

I have not tracked down the commits that removed them, but back in v4 the README had these two code fragments:

// error on unknown commands
program.on('command:*', function () {
  console.error('Invalid command: %s\nSee --help for a list of available commands.', program.args.join(' '));
  process.exit(1);
});
program
  .command('*')
  .action(function(env){
    console.log('deploying "%s"', env);
  });

Solution

Remove from README and add to deprecated.

ChangeLog

  • deprecated: .command('*')
  • deprecated: on('command:*')

Copy link
Collaborator

@abetomo abetomo left a comment

Choose a reason for hiding this comment

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

👍

@shadowspawn shadowspawn merged commit a546970 into tj:develop Sep 25, 2021
@shadowspawn shadowspawn added the pending release Merged into a branch for a future release, but not released yet label Sep 25, 2021
@shadowspawn shadowspawn deleted the feature/deprecate-command-asterisk branch September 25, 2021 01:51
@shadowspawn shadowspawn removed the pending release Merged into a branch for a future release, but not released yet label Oct 22, 2021
tathamoddie added a commit to beanni/beanni that referenced this pull request Jan 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants