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

Can't deploy @org packages #538

Closed
mwcz opened this issue Feb 11, 2021 · 3 comments · Fixed by #539
Closed

Can't deploy @org packages #538

mwcz opened this issue Feb 11, 2021 · 3 comments · Fixed by #539
Labels

Comments

@mwcz
Copy link

mwcz commented Feb 11, 2021

Deploying a package with an @org-scoped name like @myorg/mypackage fails currently with:

ERROR "name" in package.json can only consist lower-case letters, numbers, and dashes. It must start with a letter and can't end with a -.

Since these are valid npm package names, it would be nice if they could be supported.

I assume that allowing @org/pkg names naively would interfere with nodeshift's automatic name generation for resources within openshift. Maybe a transform like this would suffice?

@org/pkg -> org__pkg
@lholmquist
Copy link
Member

@mwcz nice catch. yea, we should take scopes into account for the validation. we could test out how "@org/pkg" works and if it does cause issues, then your suggestion of "org_pkg" should work fine

@lholmquist lholmquist added the bug label Feb 11, 2021
lholmquist added a commit to lholmquist/nodeshift that referenced this issue Feb 11, 2021
* This modifies the logic that was used to determine if an applications package name was valid.  Previously, nodeshift would error when using scoped packages.  Since @org/pkg is valid in npm,  this is now valid with nodeshift.  scoped package names will be updated to org-pkg for the Openshift Objects the CLI creates.

fixes nodeshift#538
lholmquist added a commit that referenced this issue Feb 12, 2021
* fix(config): Allow scoped applications in the package name.

* This modifies the logic that was used to determine if an applications package name was valid.  Previously, nodeshift would error when using scoped packages.  Since @org/pkg is valid in npm,  this is now valid with nodeshift.  scoped package names will be updated to org-pkg for the Openshift Objects the CLI creates.

fixes #538
@lholmquist
Copy link
Member

@mwcz I just published 8.0.1 which should fix this

@mwcz
Copy link
Author

mwcz commented Mar 30, 2021

Awesome, thanks Luke.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants