-
Notifications
You must be signed in to change notification settings - Fork 17
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
Address minor TODOs #55
Conversation
Generate changelog in
|
for (const version of versions) { | ||
|
||
const semver = await import("semver"); | ||
const sortedVersions = semver.rsort(versions.filter(v => semver.valid(v))); |
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.
We can probably assume the versions are enforced semver given the timelines?
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 think its better to leave it and I could clarify with a comment. I personally have few broken apps that have LOOSE versions stored
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.
Yeah I guess the point is that after a certain point in time in the future we're not going to have the control to filter this and it will be on the service layer to decide how to handle this instead
const version = gitVersion.trim().replace(prefixRegex, ""); | ||
if (!isValidSemver(version)) { | ||
throw new ExitProcessError( | ||
2, |
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.
From earlier comments we don't actually do anything with this errorCode
information on the error and it's inconsistent on what it means where some of the net code uses it as a HTTP status code and here it seems like we're using it as an exit code. What should we do with it?
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 actually think it doesn't add any value as well. So I could remove the passing of errorCode in a FLUP. Unless you foresee a usecase where we could benefit from it consistently?
for (const version of versions) { | ||
|
||
const semver = await import("semver"); | ||
const sortedVersions = semver.rsort(versions.filter(v => semver.valid(v))); |
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.
Yeah I guess the point is that after a certain point in time in the future we're not going to have the control to filter this and it will be on the service layer to decide how to handle this instead
`The version string ${version} is not SemVer compliant.`, | ||
); | ||
gitVersion = stdout; | ||
} catch (error: any) { |
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.
Hmm, have you tested for this new execAsync change that it throws? If it does not throw on non-zero exit code is the error message on stderr instead?
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.
Tested and throws 👍
…tions * origin/main: Update api-gateway definitions (#38) Update copyright to use new Date() (#66) fix generate type restrict object : add bulk no params options Autorelease Autorelease Update ExitProcessError tips and use option instead of argument (#63) Harmonize usage of options `foundryUrl` & `clientId` across all cli commands (#50) Address minor TODOs (#55) CLI error tips (#61) Include repository link in package.json (#60) Handle version/autoVersion selection in the parsing layer (#52) Add generated changelog entries Add helper Add generated changelog entries remove commented out code one more change add intersects Autorelease Refactor site link consola box code (#58) Prompt user for destructive commands (#56) Display site link after deploy (#57) Review CLI wording (#54) use helper function remove anys Fix bulk action type Add generated changelog entries one more refactor refactor bulk actions fix second attempt bulk actions
This PR addresses few TODOs