-
Notifications
You must be signed in to change notification settings - Fork 816
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
Create Function - package.json name does not match regexp warning #7905
Comments
Hey @GeorgeBellTMH 👋 thanks for raising this! I also see this warning from npm regarding an invalid name field value. Thankfully this does not impact our deployments or usage, however it does not follow the spec for package.json name field. Marking this as a feature request to force the package name to all lowercase when adding a function with capital letters in the name. |
Hey @GeorgeBellTMH and @josefaidt, I am trying to reproduce the issue but have been unable to, has this been arising when deploying or when creating the function locally $ amplify add function Available advanced settings:
? Do you want to configure advanced settings? No It gives me a success message for lambda function |
Hey @studpeps 👋 this is an npm warning and does not impact creation or pushes of the Lambda function. It can be found in the function's |
Oh yes right, thank you @josefaidt |
I've opened #8051 as a revert. I do think we should address this issue, but I think we can do it in a less breaking way. |
At the least can we implement this on new functions? I would also suggest asking if it should be fixed on updates...there doesn't seem to be a lot of good reasons to have an incorrect package.json... |
Hey @cjihrig. I considered it as follows.
What do you think on this? |
@fossamagna that could potentially work. |
…o lower case in package.json improve function name matches spec for package.json name field fix aws-amplify#7905
Before opening, please confirm:
How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
latest
Amplify CLI Version
latest
What operating system are you using?
macOS
Amplify Categories
function
Amplify Commands
add
Describe the bug
When you create an amplify function with capitals, there is a warning that appears for the name field in package.json that is created...
String does not match the pattern of "^(?:@[a-z0-9-~][a-z0-9-.
]*/)?[a-z0-9-][a-z0-9-.~]*$".Expected behavior
No warning should appear...name field should be modified to lowercase...
Reproduction steps
Create a function called testFunction
GraphQL schema(s)
# Put schemas below this line
Log output
Additional information
No response
The text was updated successfully, but these errors were encountered: