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

Add -v or --version option to print version of esbuild-runner #77

Open
trivikr opened this issue Dec 2, 2022 · 0 comments
Open

Add -v or --version option to print version of esbuild-runner #77

trivikr opened this issue Dec 2, 2022 · 0 comments

Comments

@trivikr
Copy link

trivikr commented Dec 2, 2022

Is your feature request related to a problem? Please describe.

I often use esbuild-runner CLI for running test code written in TypeScript. It's helpful to print esr version while sharing the test data and output for easy reproduction. However, esr does not have -v or --version option.

$ node -v
v16.18.1

$ esr -v
Usage: esr [options] <source-file> [file-options]

  --cache       Transform on a file per file basis and cache code
  --clearCache  Clear transform cache
  --help|-h     Display this help message
  
$ esr --version
Usage: esr [options] <source-file> [file-options]

  --cache       Transform on a file per file basis and cache code
  --clearCache  Clear transform cache
  --help|-h     Display this help message

Describe the solution you'd like

Add -v or --version option which prints version of the esbuild-runner being used.

Describe alternatives you've considered

I use fnm for managing node versions. I can run grep on package.json file

$ grep '"version"' /run/user/267807/fnm_multishells/22654_1669997929042/lib/node_modules/esbuild-runner/package.json
  "version": "2.2.2",

However, the package.json will be located on different path for nvm, or node installed directly.

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

No branches or pull requests

1 participant