-
Notifications
You must be signed in to change notification settings - Fork 52
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
Feature - Amazon Q Code Transform Update #648
Feature - Amazon Q Code Transform Update #648
Conversation
- Update allowedValues for definition to remove spaces from values - Update Typescript to NOT replace spaces in allowedValues with underscores
const modifiedVal = typeof v === "string" ? v.replace(/\s/g, "_") : v; | ||
return `'${modifiedVal}'` | ||
}).join(' | '), | ||
type: m.allowedValues.map(v => `'${v}'`).join(' | '), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can a small test be added for this https://github.com/aws/aws-toolkit-common/blob/main/telemetry/vscode/test/generator.test.ts
Edit: oh I missed #641
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible that allowedValues is undefined?
"NoPom", | ||
"NoJavaProject", | ||
"MixedLanguages", | ||
"UnsupportedJavaVersion", | ||
"NonMavenProject", | ||
"EmptyProject", | ||
"NonSsoLogin", | ||
"RemoteRunProject" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we map these values to a proper error message?
const modifiedVal = typeof v === "string" ? v.replace(/\s/g, "_") : v; | ||
return `'${modifiedVal}'` | ||
}).join(' | '), | ||
type: m.allowedValues.map(v => `'${v}'`).join(' | '), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible that allowedValues is undefined?
Problem
Sub PR for -> https://github.com/aws/aws-toolkit-common/pull/641/files
Solution
License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.