refactor: git-proxy-cli package to TS + ESM (v2)#1180
Conversation
✅ Deploy Preview for endearing-brigadeiros-63f9d0 canceled.
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1180 +/- ##
==========================================
- Coverage 84.09% 84.07% -0.03%
==========================================
Files 68 68
Lines 2943 2945 +2
Branches 374 375 +1
==========================================
+ Hits 2475 2476 +1
- Misses 408 409 +1
Partials 60 60 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
kriswest
left a comment
There was a problem hiding this comment.
Again, great work, happy to see this happen.
I think we should use the same types in the API and CLI, rather than creating additional copies. If we use different copies of type definitions between them, then changes in the API will not be obvious when working on the CLI, whereas, with common types the fields available are clear and changes (say to remove a field that is depended on in the CLI) will break the build (as it should).
…ada/git-proxy into refactor-cli-to-ts-redone
dcoric
left a comment
There was a problem hiding this comment.
I did some testing of the CLI functionality, and it is good. TS is compiled to JS on build and publish. The only thing that I had to update on my end to make it run is in package.json on the root project:
"scripts": {
"cli": "tsx ./packages/git-proxy-cli/index.ts",
"cli:js": "node ./packages/git-proxy-cli/dist/index.js",
To run the JS version, it has to happen from the dist folder, and it is possible to run the TS version with the tsx command.
|
@kriswest This should be ready for a final check - looking to merge this ASAP as it's blocking some of our team's PRs 🙏🏼 |
|
@kriswest Seems this PR requires a re-review on your end before merging! 🙂 |
kriswest
left a comment
There was a problem hiding this comment.
Mostly looks good, flagged one issue in the test utils/test where I think the type is wrong
Fixes #1064. Replaces #1065 due to merge conflicts.
I modified some things such as the CLI execution script because the original one (
npx -- @finos/git-proxy-cli), oddly, no longer works.I'd love to know better ways to handle the build/testing step and if the CLI flow works as it used to!