code cleanup, add unit tests, hook up eslint and prettier#100
Merged
olblak merged 20 commits intoupdatecli:v2from Jul 22, 2022
Merged
code cleanup, add unit tests, hook up eslint and prettier#100olblak merged 20 commits intoupdatecli:v2from
olblak merged 20 commits intoupdatecli:v2from
Conversation
jetersen
commented
Jul 21, 2022
Member
Author
|
prefer squash :) Potentially pr title could be better 🤷♂️ |
lemeurherve
approved these changes
Jul 21, 2022
Member
|
Thank you very much @jetersen for this pullrequest. Your Javascript skills are from very far better than mine :) and I must admit I gave up before getting to this level. |
Member
Author
|
Release drafter has me sharpening my JavaScript skills 😅 |
Member
Author
|
Also! Very important GitHub copilot was very good at suggesting once it had context. I don't know what I would do without it. 😅 |
Member
Author
|
This updatecli replacepattern looks like it foobars: |
jetersen
commented
Jul 23, 2022
| spec: | ||
| file: tests/main.test.js | ||
| matchPattern: const version = '(.*)' | ||
| replaceWith: const version = '{{ source "updatecli" }}' |
Member
Author
There was a problem hiding this comment.
should have been replacepattern
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
reduces branching and cleans up the nested if statements and for loop.
Aligns the various logging between
linux,windowsanddarwinbrances.hook prettier into eslint.
align trailing comma style in prettier to existing
updatecliPackagesarray in index.jsremovedCould potentially also remove thecore.addPathinupdatecliDownloadas it is called inupdatecliVersion.tool.findandcore.addPathinupdatecliVersionand keepcore.addPathinupdatecliDownload- Doneuse top level await which node16 does support.