Skip to content

pass in parent module from index.js#96

Merged
leo merged 1 commit intomasterfrom
fix/version
May 24, 2017
Merged

pass in parent module from index.js#96
leo merged 1 commit intomasterfrom
fix/version

Conversation

@TooTallNate
Copy link
Copy Markdown
Collaborator

Since this is the entry point to the module, we need
to grab module.parent from here and not in utils.js,
otherwise we would end up with the module object from
index.js and grab args' version instead of the CLI app's
version.

Since this is the entry point to the module, we need
to grab module.parent from here and not in utils.js,
otherwise we would end up with the module object from
index.js and grab args' version instead of the CLI app's
version.
@ntwcklng ntwcklng mentioned this pull request May 24, 2017
@leo leo merged commit f2744b3 into master May 24, 2017
@leo
Copy link
Copy Markdown
Owner

leo commented May 24, 2017

Thanks! ❤️

@leo leo deleted the fix/version branch May 24, 2017 14:56
@leo
Copy link
Copy Markdown
Owner

leo commented May 24, 2017

Released!

ntwcklng pushed a commit that referenced this pull request Apr 3, 2018
* fix(defaults): Process help and version defaults better

Also removes unnecessary "pkginfo" dependency

* fix(command): Pass any options that appear before a command

* task(version): Remove unnecessary parent parameter introduced in #96

feat(config): Add "exit" booleans for help and version

fix(help): Clone objects in array so original data is not altered

Fixes #95

* test(options): Add assertions to ensure "help" and "version" options work properly

* docs(options): Add ".showVersion()" method and "exit" configuration

* fix(generateDetails): Use Object.assign instead of spread for older node versions

* fix(version): Use process.mainModule instead of module.parent
leo pushed a commit that referenced this pull request May 1, 2022
Since this is the entry point to the module, we need
to grab module.parent from here and not in utils.js,
otherwise we would end up with the module object from
index.js and grab args' version instead of the CLI app's
version.
leo pushed a commit that referenced this pull request May 1, 2022
* fix(defaults): Process help and version defaults better

Also removes unnecessary "pkginfo" dependency

* fix(command): Pass any options that appear before a command

* task(version): Remove unnecessary parent parameter introduced in #96

feat(config): Add "exit" booleans for help and version

fix(help): Clone objects in array so original data is not altered

Fixes #95

* test(options): Add assertions to ensure "help" and "version" options work properly

* docs(options): Add ".showVersion()" method and "exit" configuration

* fix(generateDetails): Use Object.assign instead of spread for older node versions

* fix(version): Use process.mainModule instead of module.parent
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.

2 participants