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

Allow package name to contain hyphens, even on win32 #39

Open
benjamin-heasly opened this issue Jul 13, 2022 · 0 comments
Open

Allow package name to contain hyphens, even on win32 #39

benjamin-heasly opened this issue Jul 13, 2022 · 0 comments

Comments

@benjamin-heasly
Copy link

Could get-package-info output the package name as-is on all platforms, instead of replacing the hyphens - with underscores _ on win32?

This question is motivated by recent honeycomb work with electron-forge v6. I found that the electron-forge Windows package maker @electron-forge/maker-squirrel is outputting installer names like
hello-honeycomb-2.3.1 Setup.exe
Where the file name preserves the hyphen in the package name, hello-honeycomb.

Using get-package-info I could almost construct this name as

${{ steps.package_info.outputs.package_name }}-${{ steps.package_info.outputs.package_version }} Setup.exe

But since the package_name had its hyphen converted to an underscore, the closest I could get was
hello_honeycomb-2.3.1 Setup.exe

I think this is a (new?) use case where we'd want to keep the hypen, even on win32.

Instead of having platform-specific behavior, could get-package-info provide both versions of the name outputs? Perhaps:

  • package_name -- the name from package.json as-is
  • package_name_with_underscores -- the name with hypens replaced with underscores

Then from any platform, win32 or other, users could consume the value they need.

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