Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (!this.options.description && !this.options.productDescription) {
throw new Error("No Description or ProductDescription provided. Please set either a description in the app's package.json or provide it in the this.options.")
}
if (this.options.description) {
this.options.description = this.normalizeDescription(this.options.description)
}
if (this.options.productDescription) {
this.options.productDescription = this.normalizeExtendedDescription(this.options.productDescription)
}
// Create array with unique values from default & user-supplied dependencies
for (const prop of ['depends', 'recommends', 'suggests', 'enhances', 'preDepends']) {
this.options[prop] = common.mergeUserSpecified(this.userSupplied, prop, this.defaults)
}
return this.options
}
if (!this.options.description && !this.options.productDescription) {
throw new Error("No Description or ProductDescription provided. Please set either a description in the app's package.json or provide it in the options.")
}
if (this.options.description) {
// Do not end with a period
this.options.description = this.options.description.replace(/\.*$/, '')
}
// Wrap the extended description to avoid rpmlint warning about
// `description-line-too-long`.
this.options.productDescription = wrap(this.options.productDescription, { width: 80, indent: '' })
// Merges user and default dependencies
this.options.requires = common.mergeUserSpecified(this.userSupplied, 'requires', this.defaults)
this.normalizeVersion()
}