Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add "v8 version" subcommand to llnode #431

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

Open
vprab wants to merge 1 commit into nodejs:main
base: main
Choose a base branch
Loading
from vprab:add_v8_version

Conversation

@vprab
Copy link

@vprab vprab commented Sep 30, 2023

Fixes: #194

tony-go reacted with thumbs up emoji
"src/node-constants.cc",
"src/settings.cc",
],
"cflags": [ '-DLLNODE_VERSION=<!(grep -Po \'"version": \K(".*")\' <(module_root_dir)/package.json)' ],
Copy link

@zhxinyu zhxinyu Sep 30, 2023
edited
Loading

Choose a reason for hiding this comment

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

Will the new feature support in Mac OS system? As far as I know, option P is not supported in grep in Mac OS, neither as \K

Copy link
Author

Choose a reason for hiding this comment

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

This is a compile-time step, so technically the feature would support any OS once we have a built artifact, but you're right that this wouldn't build on MacOS. We can change this line to:
"cflags": [ '-DLLNODE_VERSION=<!(grep \\"version\\" <(module_root_dir)/package.json | sed \'s/.*\\("[0-9\\.]*"\\).*/\1円/g\')' ],
if that works on Mac? Although I guess that also brings up the issue of Windows...

tony-go reacted with thumbs up emoji
Copy link

@zhxinyu zhxinyu Oct 4, 2023
edited
Loading

Choose a reason for hiding this comment

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

Yes. I confirm that it should work on Mac. and I think the double \ in \\"version\\" can be replaced by single \.

In particular, I tried grep "version" < package.json | sed 's/.*\("[0-9\.]*"\).*/1円/g' and echo "$(grep \"version\" < package.json | sed 's/.*\("[0-9\.]*"\).*/1円/g')"in cli.

tony-go reacted with thumbs up emoji
Copy link
Author

vprab commented Oct 3, 2023

Tagging @danielleadams for visibility 😄

danielleadams reacted with eyes emoji

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer

@zhxinyu zhxinyu zhxinyu requested changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

"v8 version" or "llnode --version"

2 participants

AltStyle によって変換されたページ (->オリジナル) /