-
-
Notifications
You must be signed in to change notification settings - Fork 526
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
feat: configuration for seamless cli use in a typescript project #1438
Conversation
- In this commit, i have modified the templates and did other related changes to add support for typescript projects. - The new changes I made, will automatically detect if the project that uses sequelize-cli is on typescirpt or not and will switch logic based on it.
// examples: {'test', values}, {test}, {"test"} | ||
// codeql-disable-next-line | ||
const validValues = | ||
/^\{((('[A-z0-9 ]+')|("[A-z0-9 ]+")|([A-z0-9 ]+)))(, ?(('[A-z0-9 ]+')|("[A-z0-9 ]+")|([A-z0-9 ]+)))*\}$/; |
Check failure
Code scanning / CodeQL
Inefficient regular expression High
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.
it's a false positive, @WikiRik can you please dismiss this alert? I don't have access to do it myself.
// examples: {'test', values}, {test}, {"test"} | ||
// codeql-disable-next-line | ||
const validValues = | ||
/^\{((('[A-z0-9 ]+')|("[A-z0-9 ]+")|([A-z0-9 ]+)))(, ?(('[A-z0-9 ]+')|("[A-z0-9 ]+")|([A-z0-9 ]+)))*\}$/; |
Check warning
Code scanning / CodeQL
Overly permissive regular expression range Medium
// examples: {'test', values}, {test}, {"test"} | ||
// codeql-disable-next-line | ||
const validValues = | ||
/^\{((('[A-z0-9 ]+')|("[A-z0-9 ]+")|([A-z0-9 ]+)))(, ?(('[A-z0-9 ]+')|("[A-z0-9 ]+")|([A-z0-9 ]+)))*\}$/; |
Check warning
Code scanning / CodeQL
Overly permissive regular expression range Medium
// examples: {'test', values}, {test}, {"test"} | ||
// codeql-disable-next-line | ||
const validValues = | ||
/^\{((('[A-z0-9 ]+')|("[A-z0-9 ]+")|([A-z0-9 ]+)))(, ?(('[A-z0-9 ]+')|("[A-z0-9 ]+")|([A-z0-9 ]+)))*\}$/; |
Check warning
Code scanning / CodeQL
Overly permissive regular expression range Medium
// examples: {'test', values}, {test}, {"test"} | ||
// codeql-disable-next-line | ||
const validValues = | ||
/^\{((('[A-z0-9 ]+')|("[A-z0-9 ]+")|([A-z0-9 ]+)))(, ?(('[A-z0-9 ]+')|("[A-z0-9 ]+")|([A-z0-9 ]+)))*\}$/; |
Check warning
Code scanning / CodeQL
Overly permissive regular expression range Medium
// examples: {'test', values}, {test}, {"test"} | ||
// codeql-disable-next-line | ||
const validValues = | ||
/^\{((('[A-z0-9 ]+')|("[A-z0-9 ]+")|([A-z0-9 ]+)))(, ?(('[A-z0-9 ]+')|("[A-z0-9 ]+")|([A-z0-9 ]+)))*\}$/; |
Check warning
Code scanning / CodeQL
Overly permissive regular expression range Medium
// examples: {'test', values}, {test}, {"test"} | ||
// codeql-disable-next-line | ||
const validValues = | ||
/^\{((('[A-z0-9 ]+')|("[A-z0-9 ]+")|([A-z0-9 ]+)))(, ?(('[A-z0-9 ]+')|("[A-z0-9 ]+")|([A-z0-9 ]+)))*\}$/; |
Check warning
Code scanning / CodeQL
Overly permissive regular expression range Medium
going to re-open it with another branch |
In this commit, I have modified the templates and made other related changes to add support for typescript projects.
The new changes I made, will automatically detect if the project that uses sequelize-cli is on typescript or not and will switch logic based on it.
Pull Request check-list
Please make sure to review and check all of these items:
npm run test
pass with this change (including linting)?Description of change
Link to the issue: #1436
The sequelize-cli didn't have the support for typescript projects and in this PR I implemented certain changes that will make it capable of handling the CLI for both typescript and javascript files, additionally, I have improved the templates to be able to generate both
.ts
and.js
files for migrations, models, and seeds.