-
Notifications
You must be signed in to change notification settings - Fork 15
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
Feature/typescript #130
Feature/typescript #130
Conversation
Codecov Report
@@ Coverage Diff @@
## release/2.0.0 #130 +/- ##
=================================================
- Coverage 77.50% 75.32% -2.19%
=================================================
Files 28 27 -1
Lines 1218 1244 +26
Branches 182 243 +61
=================================================
- Hits 944 937 -7
- Misses 239 297 +58
+ Partials 35 10 -25
Continue to review full report at Codecov.
|
@brandongregoryscott going to try this out this afternoon, but after reading it through it looks awesome! phew, nice work 👏 |
}; | ||
|
||
const _installDevAlias = () => { | ||
const _installDevAlias = (): void => { |
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.
👍 good attention to detail on the install command needing to point to dist. -- in reading this again, I'm thinking we could update this function (in a later PR) to support passing the suffix (ie. dev, etc...). as a maintainer, I keep aliases that point to each of the contributors of this project (ie. and-cli-{github-username}
). Wondering if the workspace command could also setup/sync aliases too.
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.
That would be awesome! I'll add an issue to document this
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.
@brandongregoryscott knocked out testing a slew of the commands above. I've updated the checklist. I did catch a regression with what I believe is likely happening in the github module. It is likely something simple, but feel it should be investigated before merge.
Totally cool with a beta version 👍 perhaps this branch would end up being merged into a beta branch that we publish off of until we are ready to merge into main.
@@ -0,0 +1,216 @@ | |||
#!/usr/bin/env node |
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.
@brandongregoryscott I can't quite spot the breaking change without digging in further, but I am noticing a regression with the workspace
command's exiting. No matter the variation (even --help
) it hangs and I can't even ctrl+c
to exit.
Thing is... it eventually does exit. Just takes several minutes.
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.
Weird. I've been testing this out this morning and I did not see the slowness with the github
command, but I did with the workspace
command. I even stripped out almost everything (functions, imports, etc) from that command and it still seems to hang for ~30s to display the help menu... 🤔
const userPrompt = require("./user-prompt"); | ||
|
||
// #endregion Imports | ||
import { StringUtils } from "andculturecode-javascript-core"; |
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.
So upon further testing of the issue with exits hanging, it appears to be effecting both the github
and workspace
command series. The common denominator of course is the github
module. There is likely something in here causing the exits to hang. It does eventually exit. Just takes several minutes.
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.
Thanks for digging into that 👍 I'll take a further look
@wintondeshong I believe (at least part of) the slowdown is from the exports in
...which sucks. I was hoping to improve the consumer experience by exporting all of the available modules, but maybe there's another approach we can take. Update: moved all of the exports to |
I'm going to step through this here because mine isn't a matter of seconds. It finishes running the actual work from the command (ie. |
Let me know what you can find. If you have some free time this week, we can try to pair up on it. I have not seen that level of slowness on my Windows machine or Macbook, before or after the export changes. |
Here is my current timing...
|
@brandongregoryscott something seemed up so I re-cloned and did a fresh build of your branch and I'm no longer seeing that performance issue 🤷♂️
|
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.
@brandongregoryscott with the performance issue no longer an issue I'm good to approve. I tested the install
and nuget --publish
commands as well, which leaves basically the deploy
series of commands. Recommend getting someone to test those out who might have them in action presently, which would save us time testing.
So weird 🤔 well, glad it's not an issue!
Awesome! Thanks for helping out with the testing process. I'll reach out to some of the engineers that are leveraging the remaining deployment commands to see if they have capacity to smoke test the changes. |
Closes #14 Investigate feasibility/benefit of porting project to Typescript
Initial pass of the TS port for the project. All automated tests should be updated & passing. There are likely some missed areas of type narrowing/specification that can be filled in later.
A few things of note:
ts-node
for development. I was unable to use justts-node
to run anything but the main entrypoint file, and subcommands were not registered. It required a much longer command string pointing to the tsconfig file (see ts-node is not running sub-command tj/commander.js#955 (comment) for an example)watch
npm script as theand-cli-dev
alias now points to<repo>/dist/and-cli.js
.ts
, but theTestUtils
function that executes the CLI commands will also reference thedist
folder for executable js files.ts-jest
is throwing warnings about using jest <26. I believe jest v26+ requires node 10 and above, so we'd need to agree to move forward with that upgrade as a team - there are some implications with our Jenkins server that is still on node 8.16.3CoreUtils
,CollectionUtils
, etc.). So any plugin projects or older branches referencing them will need to be updated.and-cli.ts
) will now export all of the shared modules for consumer use, similar to how ourandculturecode-javascript-core
andandculturecode-javascript-react
packages export everything in theindex.ts
file.@wintondeshong This is a massive PR, so I don't expect you to scan everything line-by-line (some of the restructuring caused git to register the changes as new files entirely), but I'd love to get your input on some of this, too. In terms of releasing it, I was thinking we could release it as
2.0.0-beta
version(s) until we iron out any of the potential regressions with the port - what do you think?ts-jest
warningsInstructions for beta-testing
Command audit/testing checklist
copy
-d, --destination <destination>
-f, --flags <options>
-s, --source <source>
deploy
aws-beanstalk
--dotnet
--timeout <timeout>
--verbose
aws-s3
--destination <destination>
--profile <profile>
--public-url <url>
--publish
--source <source>
--webpack
azure-storage
--client-id <clientID>
--destination <destination>
--public-url <url>
--publish
--recursive
--secret <profile>
--source <source>
--tenant-id <tenantID>
--username <username>
--webpack
azure-web-app
--app-name <applicationName>
--branch <branch>
--client-id <clientID>
--force
--remote <remote>
--resource-group <resourceGroup>
--secret <profile>
--tenant-id <tenantID>
--username <username>
jenkins
--new
-i, --init
-p, --profile <profile>
dotnet
-b, --build
-c, --clean
-C, --cli
-k, --kill
-p, --publish
-R, --restore
-r, --run
-w, --watch
dotnet-test
--by-project
--ci
--coverage
-s, --skip-clean
github
--add-topic <topic>
--list-repos
--list-topics
--remove-topic <topic>
-r, --repo <repo>
-u, --username <username>
install
migration
-a, --add
-d, --delete
-r, --run
nuget
-p, --publish <version>
-u, --upgrade
webpack
-c, --clean
-p, --publish
-R, --restore
webpack-test
--ci
-c, --clean
-R, --restore
workspace
-c, --clone
-f, --fork
-u, --usernames <usernames>