cli
cli copied to clipboard
No newline at end of file
What you are doing?
I use the sequelize command to generate models and migrations, for example:
sequelize model:create --name User --attributes name:string,state:boolean,birth:date,card:integer,role:enum:'{Admin,Guest}'
What do you expect to happen?
The generated text files do not contain whitespace errors and are well formed.
What is actually happening?
The generated files are missing the newline at EOF. This causes warnings with Git:
No newline at end of file
It might also cause unintended file changes with some editors (e.g. vim) that automatically insert a missing EOF newline character.
Dialect: mysql / postgres / sqlite / mssql / any Database version: n/a Sequelize CLI version: 5.4.0 Sequelize version: 4.43.0
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This is still an issue, both with sequelize-cli 5.5.1 and 6.0.0-beta.3.
I believe this is fixed, if not please let me know. I will close this issue after a few weeks.
Hi @WikiRik - Thanks for the update. I just tested again (using 6.3.0), and unfortunately the files are still generated with newline missing on the last line.
Hi @WikiRik - Thanks for the update. I just tested again (using
6.3.0), and unfortunately the files are still generated with newline missing on the last line.
Ah yes, upon generation it removes all empty lines while they are compiled correctly in the assets folder. I will take a look at this later