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
Fix tarballs based commands not considering config from package.json #799
Fix tarballs based commands not considering config from package.json #799
Conversation
@jdxcode not sure why this check fails 🤔 anyway without this fix I have to add --no-xz and --targets to |
@mattgraham @chadian @RodEsp @oclif-bot anyone? |
@mdonnalley @pimterry @peternhale please help 🙏🏽 |
}), | ||
xz: Flags.boolean({description: 'also build xz', allowNo: true, default: true}), | ||
tarball: Flags.string({ char: 't', description: 'optionally specify a path to a tarball already generated by NPM', required: false }) | ||
targets: Flags.string({char: 't', description: 'comma-separated targets to pack (e.g.: linux-arm,win32-x64)'}), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer to not remove the default
here since that would be a breaking change
It might be a better solution to change this line to prefer updateConfig.node.targets
over options.targets
. However, that's not a great solution either since user's would never be able to override what's the configured targets
@peternhale @RodEsp Do you have any opinions on this? It looks like the default
for the targets
flag was added soon after the oclif-dev
commands were migrated into oclif
: #458
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mdonnalley Why is this a ״breaking change״?
Correct me if i'm wrong but it seems like if flags?.targets?
is undefined
the following line takes TARGETS
array as a fallback (if not defined on package.json) which is exactly the same behaviour.
Line 70 in 71c3690
const targets = compact(options.targets || updateConfig.node.targets || TARGETS) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This appears to be the correct; command flag then config then default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rannn505 you're right, I hadn't considered that
@mdonnalley I updated this branch from main and resolved all conflicts .. please re-approve this PR and lets handle the failing CI phase so we can go ahead and merge it .. I see more contributors complaining about that 🙏🏽 Thanks. Regardless of the scope of this PR, I'm willing to get more and more involved and help this project grow if you want me to do so |
@mdonnalley , I sent you an email, hope you received it, and I'm happy to help if you let me. Thanks in advance. |
Tarballs.buildConfig
to determine final config-t
char fortargets
andtarball
flags inoclif pack tarballs