Skip to content

JS-implementation of getting runtime + version #2081

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

Merged
merged 3 commits into from
Jul 21, 2025
Merged

JS-implementation of getting runtime + version #2081

merged 3 commits into from
Jul 21, 2025

Conversation

malice00
Copy link
Collaborator

The implementation just added only supported NodeJS and was calling the binary to check. This version is fully implemented in JavaScript and can handle Deno and Bun as well.

@malice00 malice00 requested a review from prabhu as a code owner July 21, 2025 13:07
bin/cdxgen.js Outdated
? "(security doesn't allow retrieval')"
: result.stdout.trim();
version = `${version}\nNode: ${process.execPath}, version: ${nodeVersion}`;
if (typeof globalThis.Deno !== "undefined" && globalThis.Deno.version?.deno) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we move this to envcontext.collectNodeInfo and convert the returned object to a string? This way the correct information will be captured even for --include-formulation invocations.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at envcontext.collectNodeInfo -- not sure if that is the best place to put this. We're also getting information about npm there, which might not necessarily be available...

@malice00 malice00 marked this pull request as draft July 21, 2025 13:27
malice00 added 2 commits July 21, 2025 16:02
Signed-off-by: Roland Asmann <roland.asmann@gmail.com>
Signed-off-by: Roland Asmann <roland.asmann@gmail.com>
@malice00 malice00 force-pushed the version branch 2 times, most recently from 78e6dd1 to 9cc208c Compare July 21, 2025 16:21
…ontext as well

Signed-off-by: Roland Asmann <roland.asmann@gmail.com>
@malice00 malice00 marked this pull request as ready for review July 21, 2025 16:46
@malice00
Copy link
Collaborator Author

@prabhu What do you think of this?

Copy link
Collaborator

@prabhu prabhu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@malice00 malice00 merged commit d880192 into master Jul 21, 2025
80 checks passed
@malice00 malice00 deleted the version branch July 21, 2025 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants