Replies: 7 comments 9 replies
-
IMO I'd want to stick with the "tried and true" Node.js runtime. I'd rather avoid As far as I suppose the question from here is TS or JS? TBH I've started growing away from TS -- when you know what you're doing, it can make the dev process feel cumbersome. I like types for communicating intent (I'd love if this proposal landed), not so much for providing confidence that the code is written properly. However, having one syntax to write is nice. With JS you then have to ask "do I use So I'm on the fence right now about TS vs JS.
|
Beta Was this translation helpful? Give feedback.
-
@spenserblack actually, with my primary concern of parsing a url-like string no longer relevant thanks to #67 and #68 i think we can/should stick with basic bash for a while longer i was originally concerned that the complexity of string & url manip here would be unmanageable in bash repository: jcbhmr/my-mega-project
repository: github.com/jcbhmr/my-mega-project
repository: github-enterprise.com/jcbhmr/my-mega-project
repository: http://gh.enterprise.com/jcbhmr/my-mega-project
repository: https://github.enterprise.com/jcbhmr/my-mega-project |
Beta Was this translation helpful? Give feedback.
-
im reopening this because of three factors combined that I think put us into js/ts territory:
I think that if we only needed 2 of the 3, id still say stick with bash, but all combined? that's a bit much. @spenserblack thoughts? |
Beta Was this translation helpful? Give feedback.
-
btw heres a real world example of a |
Beta Was this translation helpful? Give feedback.
-
we could also use a deno wrapper like
basically use local, download if needed here's a steps:
- run: ./denow index.ts
shell: bash |
Beta Was this translation helpful? Give feedback.
-
turns out it's not too bad! I did all the things that I thought would be tough and it worked out great in Bash. Keeping it simple and using default values that you can just pass through and not do https://github.com/Andrew-Chen-Wang/github-wiki-action/releases/tag/v4.0.0
gist is that this CAN BE DONE and DONE WELL and READABLE in bash and we don't need js/ts yet. hopefully never considering the scope of this github wiki action but you never know! 🤷♀️ marking as resolved for now. open later if this arises again. |
Beta Was this translation helpful? Give feedback.
-
Rewritten with TS. With this the freeze for features and bugfixes is over. |
Beta Was this translation helpful? Give feedback.
-
I think we are approaching this point.
new URL()
url parsernew URL().password = getInput("token")
try {} finally {}
control flow to cleanup thingsOf particular interest is Deno! You don't need to compile TypeScript ➡ JavaScript, so you can just literally deploy raw .ts files (typechecking is disabled by default; add
deno run --check
to typecheck at runtime) or if you really want, you can deploy a NATIVE BINARY for each platform!Point is, this would work!
look at that! no compile step!
Or we can stick with the tried-and-true Node.js path. This also allows up native access to the post-action hooks (so does Docker, but Docker doesn't work on Windows runners). https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#runspost
Here's some supporting tooling for JavaScript/TypeScript-based actions:
The challenge seems to be how best to handle the
dist/
folder for releasesBeta Was this translation helpful? Give feedback.
All reactions