There're some weird predefined inputs

This commit is contained in:
Kir_Antipov 2021-09-26 18:54:02 +03:00
parent d8d4fd16a8
commit 810ff6d7dd
2 changed files with 4 additions and 4 deletions

View file

@ -11,7 +11,7 @@
],
"rules": {
"arrow-body-style": ["error", "as-needed"],
"complexity": ["warn", { "max": 20 }],
"complexity": ["warn", { "max": 30 }],
"curly": ["error", "multi-line", "consistent"],
"eqeqeq": ["error", "smart"],
"no-constant-condition": ["error", { "checkLoops": false }],

View file

@ -63,10 +63,10 @@ export default abstract class ModPublisher<TUniqueOptions = unknown> extends Pub
throw new Error(`Specified files (${typeof fileSelector === "string" ? fileSelector : fileSelector.primary}) were not found`);
}
const version = this.options.version || <string>releaseInfo?.tag_name || parseVersionFromFilename(files[0].name);
const version = (typeof this.options.version === "string" && this.options.version) || <string>releaseInfo?.tag_name || parseVersionFromFilename(files[0].name);
const versionType = this.options.versionType?.toLowerCase() || parseVersionTypeFromFilename(files[0].name);
const name = this.options.name || <string>releaseInfo?.name || version;
const changelog = (this.options.changelog ? await readChangelog(this.options.changelog) : <string>releaseInfo?.body) || "";
const name = (typeof this.options.name === "string" && this.options.name) || <string>releaseInfo?.name || version;
const changelog = ((typeof this.options.changelog === "string" || this.options.changelog?.file) ? (await readChangelog(this.options.changelog)) : <string>releaseInfo?.body) || "";
const loaders = processMultilineInput(this.options.loaders, /\s+/);
if (!loaders.length) {