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

v4.0 #441

Closed
14 of 21 tasks
sushantdhiman opened this issue Mar 25, 2017 · 34 comments
Closed
14 of 21 tasks

v4.0 #441

sushantdhiman opened this issue Mar 25, 2017 · 34 comments

Comments

@sushantdhiman
Copy link
Contributor

sushantdhiman commented Mar 25, 2017

Milestone v4.0.0

  • Drop gulp dependency
  • Drop coffee script support
  • Cross platform CI (Linux and Windows)
  • Drop support for Node v0.12 or below
  • Codebase
    • ES 2015/2017, either use Node v4 base or babel build
    • Migrate codebase
    • Migrate tests
    • Use lodash/fp or ramda
  • Sequelize v4 Support moving model.associate outside classMethods due to sequelize@4.0.0 #470
  • Better documentation
    • Contribution Docs
    • Section in https://docs.sequelizejs.com
    • Explain available QueryGenerator functions like bulkInsert etc and how to properly use them
    • FAQs
  • Features / Support
    • db:create / db:drop
    • Proper error codes
    • Association support
    • Atomic migrations (using transactions, as far as database supports it)
    • TypeScript support (needs to be community contributed, after v4 is released)
@sushantdhiman
Copy link
Contributor Author

@Americas
Copy link
Collaborator

@sushantdhiman yeah, I noticed after I asked 😛

@danielsalles
Copy link

What is left of the drop gulp? I'm not finding the issue of discussion.

@borislemke
Copy link

TypeScript support would be superb. Is there a discussion I can follow? I'd love to contribute to this particular feature.

@danielsalles
Copy link

@borislemke TypeScript? I think not :(

@sushantdhiman
Copy link
Contributor Author

I have never used TypeScript so I dont know what is expected out of TypeScript Support. @borislemke you may follow #328

@borislemke
Copy link

@danielsalles @sushantdhiman but it's listed in the Milestone? Optional.TypeScript support

@AminTizdastAzar
Copy link

The models created by sequelize-cli v3 is not compatible with last version of sequelize and you explained this in docs. I want to know what is the estimation time for launching sequelize-cli V4? because older version generates files that I need to change them again manually.
Thanks

@sushantdhiman
Copy link
Contributor Author

@aminTiz I simply dont owe you any estimates, I work in my free time :). If you want things to progress faster help me out with implementing things.

@AminTizdastAzar
Copy link

@sushantdhiman I will be more than happy to help you. Just give me the guidelines to start please.

@sushantdhiman
Copy link
Contributor Author

@aminTiz For starters you can start with #222, Its a long standing issue but should be easy to fix. Just verify attributes generated are having a type which is valid in Sequelize, around here

attributes: this.transformAttributes(args.attributes),

Please read our contribution guide https://github.com/sequelize/cli/blob/master/CONTRIBUTING.md#fixing-bugs-or-implementing-features to setup your development environment

@leodutra
Copy link

leodutra commented Oct 5, 2017

@sushantdhiman Will remove classMethods from model template?

@sushantdhiman
Copy link
Contributor Author

@leodutra yea, Its already mentioned as Sequelize v4 support

@andrewoons
Copy link

Is anyone currently working on association support? If not, I could start working on it.

@Khanji
Copy link

Khanji commented Jan 4, 2018

Any indication when v4 is released?

@silent-tan
Copy link

mark

@YGKtech
Copy link

YGKtech commented Jan 5, 2018

is this being worked on, or do I need to stop using this library? The cli and the core module have been out of sync for the better part of a year now, and it's not a minor technical discrepancy with a few edge cases, it's a lot of important functionality that's simply not working.

You have a line at the bottom of the readme that says support for v4 is experimental. 'experimental' is a deceptive way to say about 50% of the functions throw cryptic errors, we haven't documented which ones, and nobody seems to working on fixing it.

I know I'm not paying for this and nobody owes me anything, but if you aren't going to support v4 in any sort of reasonable time frame, please make that clear so people can either stick with v3, or find another solution.

@sciblo
Copy link

sciblo commented Jan 13, 2018

Tell me, please, what should I do? I have this message:

PS C:\Users\Константин\Desktop\Задание от Яндекса\entrance-task-1-master> node_modules/.bin/sequelize

Sequelize CLI [Node: 9.2.0, CLI: 3.2.0, ORM: 4.27.0]

WARNING: This version of Sequelize CLI is not fully compatible with Sequelize v4.

@MicroDroid
Copy link

@sciblo You have to ignore the warning and wait for the v4.0 release.

@buddylindsey
Copy link
Contributor

Out of curiosity what doesn't work for others that you need day-to-day that is preventing you from using the library? I have been using v3 of the cli successfully with v4 of sequelize once I understood the differences.

Basically I use the cli to create models and migrations, simple migration files, and run the migrations forwards and back. That is 90% of what I do day to day. I just know that I need to tweak the relationship stuff when I create a new model. Other than that it seems to work fine.

It would be nice if this was at v4, but I don't think it precludes the use of the cli and v4 of the orm.

@YGKtech
Copy link

YGKtech commented Jan 16, 2018

@buddylindsey : for me about half of the migrations I write fail with cryptic errors. Notably things like modifying columns or adding indexes. It works fine for creating new tables and such, but simple things like making a column unique will fail.

@milkchocolate
Copy link

How can I try cli 4.0?

@johnkpaul
Copy link

@buddylindsey For me, it's not clear how to understand the differences. I am new to using sequelize, so I don't have v3 usage to compare to and understand what tweaks I need to make.

Is there a reference or blog post or something to follow to find the tweaks?

@ryanburnette
Copy link

ryanburnette commented Feb 1, 2018

I'm new too, but I'm using cli v3 with Sequelize v4. I used cli generators, then went line by line in the generated code, cross-referencing the results against the v4 changes posted in the Sequelize docs. It's time-consuming, but it lets you get most of the benefits of cli v3 and learn a lot about Sequelize v4 in the process.

It would have taken me several times as long to get the prototype app I was working on built and it wouldn't have been nearly as good if I hadn't taken this approach.

@johnkpaul
Copy link

@ryanburnette thank you, that's really helpful both as a link to docs and as an attitude toward learning. After going through that I'm much more clear on how to continue to use the cli v3.

@sascha1337
Copy link

When release need this so much folks
Any working branch ? cmon

@sushantdhiman
Copy link
Contributor Author

Sorry for all this delay guys, I am busy with Sequelize and I am afraid there is no change in that. In short term future my contribution to CLI will be very limited.

Here is my immediate plan for CLI, #470 (comment), @buddylindsey offered help to fix classMethods / instanceMethods , once that PR is merged I will release new version of v4.

For long term future and completing featured listed in v4 milestone and other issues, I would like your help. If you use CLI and would like to improve it please send some PRs, I will be very happy to share push access to repository so you can eventually maintain it.

Notes for future maintainers

  1. CLI currently does not attract much traffic, So 2 hour (more if you want to write patches) a week should be enough to maintain it. I am not forcing you to commit some time weekly but some active maintenance work now and then will be much better than dead project. (For example, For Sequelize I usually give 1 hour a day for issue triage, Whole Saturday for patch work or fixes)
  2. You use CLI for your projects, so you already know its shortcomings and improve it for your own good
  3. Writing patches is easiest thing, maintaining issues and reviews will be consuming most of your time

@buddylindsey
Copy link
Contributor

FYI @sushantdhiman has pushed a v4 of sequelize-cli to npm.

@leodutra
Copy link

leodutra commented Jun 19, 2018

IMHO, please consider this for 4.0:

  • add to documentation Postgres (and maybe others) does not order ascending by default, on findAll();
  • enforce { foreignKey: { allowNull: false } } for relations where null is not expected;
  • underscore: true expectations underscore / camelcase option should control all fields and table name generation sequelize#6423;
  • sequelize migrations does not create automigrations like Django, but there's a lib covering it (which Sequelize should embrace and colaborate... or at least not break compatibility for a while);
  • async await incompatibilities due to node-continuation-local-storage. Use cls-hooked for transactions on ES6+ node setups;
  • way to safe query tables with sensitive information like password Attribute scoping proposal sequelize#1462. I solved this with toJSON and sequelize hooks... but it would be to have seen something like this in the docs;
  • set table plural/singular names for really effective setter/getter generation on languages others than english. Portuguese, as an example, has "Organização" and "Organizações" (plural) and we would not have a setOrganizacoes, of course, without that setup.

Just went from zero to 5 services using Sequelize, in 2 organizations, and those were the most persistent issues/tricks across them. A lot of Google queries and Github issues (not really issues but questions)...

@sushantdhiman
Copy link
Contributor Author

sushantdhiman commented Jun 19, 2018

Not much time at hand @leodutra , all I can do is accept PRs

@leodutra
Copy link

leodutra commented Jun 19, 2018

Ok... at least is reported for whenever I/community get some spare time.
And, thank you for the amazing work.

@greyscaled
Copy link

I want to start getting involved with what I can with the project. One of the things that's deterring me, however, is that I cannot get the tests to run locally (I'm on Windows, if that makes a difference). The documentation for contributing simply states:

Start with cloning Sequelize CLI repo
...
Make sure you have all required dependencies, you will need
- Node v4 or above
- NPM v3 or above
...
npm install
npm test

but this crashes on windows - even with sqlite etc installed. Was there a change to installation requirements along the way?

I have been pushing to my own playground branch to run tests on Travis, as that's all I can really do.

The point is, if there's going to be a slow shift in repository maintenance/community involvement, I think this is something that needs to be perhaps be updated or addressed (or at least listed as linux-only) in the contributing docs.

@sushantdhiman
Copy link
Contributor Author

I am trying to get CI running against windows #657, Hopefully that will iron out any platform related issues.

Apart from some filesystem related issues its almost ready, see if you can help us with that @vapurrmaid , Just take my commits, open a new PR and try to fix remaining tests

@greyscaled
Copy link

I'll certainly see if I can help there - thanks for the link

codetriage-readme-bot pushed a commit to codetriage-readme-bot/cli that referenced this issue Jun 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests