Skip to content
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

Switch from bash scripts to higher language #771

Closed
Tracked by #101 ...
viceice opened this issue Mar 16, 2023 · 10 comments · Fixed by #998
Closed
Tracked by #101 ...

Switch from bash scripts to higher language #771

viceice opened this issue Mar 16, 2023 · 10 comments · Fixed by #998
Assignees
Labels
priority-2-important User-visible bugs or very important features status:in-progress Someone is working on implementation type:feature Feature (new functionality)

Comments

@viceice
Copy link
Member

viceice commented Mar 16, 2023

We need to decide to which higher language we switch, because we've some features which are prettey complex to implement inside bash scripts.

So Idea's / preferences?


@viceice viceice added type:feature Feature (new functionality) breaking Breaking change, requires major version bump priority-3-normal Default priority, "should be done" but isn't prioritised ahead of others status:requirements Full requirements are not yet known, so implementation should not be started labels Mar 16, 2023
@viceice viceice added priority-2-important User-visible bugs or very important features and removed priority-3-normal Default priority, "should be done" but isn't prioritised ahead of others labels Mar 16, 2023
@viceice viceice removed the breaking Breaking change, requires major version bump label Mar 17, 2023
@viceice
Copy link
Member Author

viceice commented Mar 17, 2023

We decided to use the node ecosystem and write our main code inside typescript. That way we can easily support customer tools via custom javascript files imported at runtime. Another benefit is that we can reuse renovate datasource code.

Compiling can be done with pkg so we get a single small binary.

We can probably maintain compabillity to old tools by leaving some helper shell scripts, which are called from node.

@viceice viceice closed this as completed Mar 17, 2023
@viceice viceice reopened this Mar 21, 2023
@viceice viceice added status:ready Ready to start implementation and removed status:requirements Full requirements are not yet known, so implementation should not be started labels Mar 21, 2023
@JamieMagee
Copy link
Contributor

I'm not sure it's viable right now, but Node.js is investigating making this a native feature. See:

@viceice
Copy link
Member Author

viceice commented Apr 15, 2023

yes, but it's not working when we need other native modules.

@JamieMagee
Copy link
Contributor

I threw together a proof-of-concept compiled with pkg: https://github.com/JamieMagee/containerbase-cli.

It doesn't do anything, except show how to compile to a single-file app.

@viceice
Copy link
Member Author

viceice commented May 16, 2023

I threw together a proof-of-concept compiled with pkg: https://github.com/JamieMagee/containerbase-cli.

It doesn't do anything, except show how to compile to a single-file app.

can we compile as esm instead of commonjs? otherwise we are again stuck from modern packages .

@JamieMagee
Copy link
Contributor

I can try, but it isn't officially supported. See vercel/pkg#1291

@JamieMagee
Copy link
Contributor

I managed to get ESM working 🎉

JamieMagee/containerbase-cli@4a4b080

@rarkins
Copy link
Member

rarkins commented May 17, 2023

FYI I've been using pkg for https://github.com/containerbase/runinstall

@viceice
Copy link
Member Author

viceice commented May 17, 2023

FYI I've been using pkg for https://github.com/containerbase/runinstall

Good old plain common js 🙈 😅

@Chumper
Copy link
Collaborator

Chumper commented May 17, 2023

Just as a note, deno now supports npm packages with deno compile: denoland/deno#19005

@viceice viceice added status:in-progress Someone is working on implementation and removed status:ready Ready to start implementation labels May 25, 2023
This was referenced May 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority-2-important User-visible bugs or very important features status:in-progress Someone is working on implementation type:feature Feature (new functionality)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants