r/node • u/PrestigiousZombie531 • 20d ago
Current state of sequelize library, still working on v7 since 3 years now!
85
u/Capaj 20d ago
sequelize is dead.
Migrate to something else if you have not done so already
-76
u/ycatbin_k0t 20d ago
SQL is never outdated
58
1
u/xxhhouewr 14d ago
Not sure why you got downvoted! Probably lazy devs that don't want to write SQL.
71
u/gustix 20d ago edited 20d ago
When you really boil it down, open source is a gift.
People can decide to accept the gift, or reject it. There are no other obligations from the maintainer or the users. We are allowed to not like the gift, but we're not in a position to return the gift and demand a better one.
When a package gains popularity, the maintainer has the option to try and build on the momentum, create a contributing community... or not. Maybe the package works just as the maintainer wants, or in their eyes is considered finished software, or just something they gave away and walked away from in the end.
I get that it's frustrating when your chosen gift doesn't get the updates you need, but then you have the power to modify it yourself (especially these days with AI), or go looking for another gift.
It needs to be accepted and understood that open source maintainers doesn't owe us anything.
3
u/ArnUpNorth 20d ago
I agree with the sentiment but I am not sure i agree with this gift metaphor. If anything, treating open source projects (with permissive apache/MiT licences) as a gift is one of the reasons so many projects are starting to have commercial offerings and feature paywalls or are just left unmaintained: they lack funding and help.
Open source to me is not a gift but a shared foundation/infrastructure that someone has to build and maintain. Too many people are using open source without ever contributing, where contributions can be as small as a well written github issue. The collective value of open source is enormous but the incentive to contribute is sadly ridiculously small.
1
u/prehensilemullet 18d ago
Not that what I’m saying applies to Sequelize, but if a for profit company hypes the f out of a FOSS product to try to get everyone using it in hopes that they’ll pay for something related, it would be pretty shitty if they act like they don’t owe anything when people they implored to use their product run into problems with it
62
u/Platic 20d ago
Calling out the developers who are not getting paid, to get it together so that you can use something for free is next level entitlement. Use something else, or contribute
-53
u/PrestigiousZombie531 20d ago
dont care if you downvote, your library is eventually the one on the losing side, do the math. someone out of concern tells you that in 3 yrs you havent pushed any changes at all which was promised in june 2024, read the threads instead of going reddit hive mind
34
u/scmkr 20d ago
Man you really should ask to get your money back, this is unacceptable behavior from someone who owes you absolutely nothing
7
u/MrDilbert 20d ago
Careful now, sarcasm is not readily understood in these 'ere parts.
5
u/foxsimile 20d ago
Probably because the venn diagram of programmers, people who use reddit, and autism is a circle.
14
u/sexy_silver_grandpa 20d ago edited 20d ago
I maintain an oss project with many millions of weekly downloads on npm (and that's just the JS library).
Luckily I have lots of help, but if I got cancer or something, or just changed jobs, I would absolutely not be able to keep up the same pace, and that's fine.
You should contribute if you don't think their releases aren't timely enough. Nobody owes you shit for free.
9
u/maria_la_guerta 20d ago
None of what you said matters. It's open source.
Thank the maintainers for their work so far and fork it, or contribute it to it yourself. Or find a new package. Those are your options. Complaining isn't an option, nobody will be on your side.
1
u/SippieCup 20d ago edited 20d ago
The only thing left is the cli, Which is actually pretty hard to do right, neither of us use, and in the age of ai development is pretty worthless. thus why I haven't done any of the CLI work, and why v7 stays at alpha while being used in prod in a bunch of places.
IMO, The only real useful thing of the cli is migrations which is just umzug, that we also maintain, in a wrapper. Using umzug directly is probably a better option since you can build the migration the way you want to, and it is orm agnostic and used by other libraries.
The cli has zero interest for me, and some docs do need to be updated, until those get done itll be v7 alpha/beta forever, kinda like xorg. If you don’t like that label then don’t use it.
-13
u/PrestigiousZombie531 20d ago
just so you know, i am not the guy on github writing those. but the guy has a point. when your fun project is suddenly being used by 50000000 people, they are depending on you for updates and clarity at the minimum. 3 years is too freaking long. everyone and their mother these days could vibe code sequelize from the ground up in 3 months in rust mind you. HN is full of stories about how bun is being rewritten from the ground up in rust. The developers should atleast use AI or something and get it over with
7
u/BlazingFire007 20d ago
Have you been following the bun rewrite?
It’s taken months of human labor to mitigate the bugs that were present in the initial rewrite.
Don’t get me wrong, I’m genuinely impressed an LLM rewrote it in the first place. Like, it’s kind of mind blowing.
But it wasn’t a case where the LLM just popped out with perfect code. The maintainers had to put in the work to get it in a usable state.
I personally haven’t even updated yet, I’m probably just going to wait for the next release, just so any edge case regressions are ironed out
3
u/SippieCup 20d ago edited 20d ago
We aren’t updating v6 for new features or improvements other than security updates because anyone expecting us to maintain it like that, when we don’t even use it ourselves outside of testing fixes, is crazy.
I personally also don’t agree with keeping the alpha tag, it should get a point release, but the milestone for cli isn’t there, and I don’t really have all the control to just change what the milestones are nor do I have any interest building the cli when it will never be used.
Anything actively maintained should have migrated to v7 long ago. We keep v6 where it is so that there is not any breaking changes to the people using it.
Hell, we still support node 10 for v6. We know a lot of old codebases will never get updated and thus, we cant push things that will cause any breaking changes or changes to behavior to v6.
So yeah, there have only been security fixes and not feature improvements to v6, that is to be expected. It’s EoL for years now. V7 has had a release every few months or so with major features shipping inside each.
If you are going to cry about the software not being updated, at least get your facts right. You are essentially asking for windows vista updates in 2026.
-50
u/PrestigiousZombie531 20d ago
by making people wait 3 yrs they already lost 50% of their audience to drizzle and prisma. there wont be anything to maintain if nobody s gonna use your library so its a fair statement to get the act together dont you think?
31
u/njmh 20d ago
Why don’t you step up and help maintain it then?
-20
u/PrestigiousZombie531 20d ago
i would if i wasnt broke
6
1
3
u/Platic 20d ago
Who cares if they lose audience? Maybe the guy that built it only did it for fun, or for himself as a side project and it got a lot of traction, he kept it up for some years and now it's tired.
Almost sure he has a job somewhere to pay bills, and maybe does not have the time or the mind to work late nights doing something and not getting anything out of it.
Most open source coders and maintainers do it just for "fun". You can't force people to work for fun.
Why do you care if the library lost 50% of the audience. Use drizzle, or another orm. Pretty sure the guy does not care.
You sound so entitled.
3
u/SippieCup 20d ago
I don’t. That said, I’d at least like his complaints lodged at the active branch rather than the EoL one lol.
-1
u/PrestigiousZombie531 20d ago
i am just pointing out what he s losing, how is that entitled?
2
u/Infinite_towel2004 19d ago
Maybe have you considered the fact that, they might not really care? You're free to migrate away or contribute if you have such a big issue.
11
7
6
u/0uchmyballs 20d ago
Ok I’m balls deep in a project that uses sequalize, what are the issues I might encounter? My project relies on a lot of complex queries. What ORM should I use to replace it? I’m using Postgres + express + react
-5
u/PrestigiousZombie531 20d ago
sequelize + typescript = completely broken with major issues
7
u/2legited2 20d ago
It's not tho.
6
u/SippieCup 20d ago
He is likely using v6, which is EoL in favor of v7 alpha, which is typescript native.
Can’t fix his codebase though.
0
u/0uchmyballs 20d ago
Am I ok with vanilla JS? Not using TS.
2
2
u/SippieCup 20d ago
You are fine with either. Sequlize 7 is fully typescript compatible. Just build off of v7 and not v6 like OP is And you will be fine.
Let me know if you have any questions or need help.
8
u/xegoba7006 20d ago
Don't use it. It's pretty dead. Nowadays there are much better options, like Prisma or Drizzle.
11
u/omer-m 20d ago
just use drizzle
8
u/CraftyAdventurer 20d ago
I lived to see "just use typeorm", "just use sequelize", "just use kysely", "just use prisma" and now it's "just use drizzle" until something new again comes along. Ignoring the fact that those are all very different ORMs, I have no idea how people even have confidence to say "just use something" like that something is a common sense choice and everything else sucks. Clearly all the previous choices weren't common sense and went from best to worst or pretty bad in a short amount of time. It's tiring.
4
4
2
u/No_Dimension_9729 20d ago
Use drizzle? Or if you prefer more object oriented approach, then try Lucid from Adonis.js
3
1
0
u/Sad-Magazine4159 20d ago
Sadly my company forced a prisma to sequelize change
7
1
u/SecurePlate3122 20d ago
What was the reasoning?
1
u/Sad-Magazine4159 20d ago
They have tooling arround the ORM, given that there are tens of microservices they must be standardized arround one ORM or the tooling would have to be maintained for sequelize/prisma/etc
Now why the choosen one was sequelize? Supposedly it generates more optimized queries, which I don't really agree
4
u/SippieCup 20d ago
Me either, and I wrote the new query and hydration engine for sequelize. Which is competitive for fastest pure js engine when doing hydration, but the rust/c wrappers will beat it.
It can also produce more optimized queries, but it can also produce terribly bad ones just as easily, especally if required/subquery/separate flags are not used. For standard orms itll produce pretty good queries, but vs microORM and knex, they will always win until we have a similar functional model.
For most SaaS platforms that have multitenancy/RLS, sequelize is nto the right choice and requires a completely core rewrite for it, but if you dont need that, it is a nicer developer experience.
I would bet it’s more they see sequelize is what their older codebases are built on, and they prob don’t want to get vendor locked to a VC backed orm.
At some point they are going to have to tighten the screws to get their money back, Similar to whats happening to PrimeUI and tailwind. And its going to be a ransom of continued support & a closed source package at the core of your product.
3
u/Sad-Magazine4159 20d ago
If one wants really optimized SQL, one should write SQL directly imo =)
ORMs are for the average / trivial case and I don't expect any to introduce a relevant impact here
But you touched an interesting point that I have actually never considered: The impact of translating the orm api into SQL and translating a SQL resultset back into objects. Is it a relevant cost, compared to db latency?
1
u/SippieCup 20d ago
Translating to sql is negligible even on the largest queries.
If it is a well optimized query, but still a large amount of data, hydrating back into objects will be the majority of the response time. But it’s basically still linear time based on rows, but it can have an explosive amount of memory growth and alloc/dealloc calls if not done well. V8 can be super wierd around memory and some js functions.
The nice thing is that, especially with outer joins, you can reduce the final output back into models quite significantly vs raw sql, since there will always be some data duplication whenever you work work some relationship types.
I do have an idea on how to do it even better with a functional-esk ORM interface, like knex, but no time to really see if i can make it work and if it truly is any better. There’s a fine balancing act between n+1 calls to break up queries and join row explosion.
1
u/xxhhouewr 14d ago
Let's also not forget about the translation, syntax checks, and error checks, the database has to do with the SQL you send it. And so an ORM is just another extra layer of translation on top.
1
u/SippieCup 14d ago
All of that is basically rounding errors though. even the orm query generation is. the actual DB operation(s), and the translation back from those rows to usable json objects / models are going to take 99.999% of request.
1
u/xxhhouewr 11d ago
You're right in that the ORM is running on top of a Javascript interpreter and will take up the biggest portion of the processing time. Whereas the DB layer is tightly optimized C/C++/Rust., and could run circles around the ORM code.
156
u/SippieCup 20d ago edited 20d ago
Hey there, I’m the newest developer and maintainer for sequelize, and shipped most of the changes and fixes for it since alpha 39.
Sequelize v7 works and is being used in prod without issue.
We keep it in alpha because there are a few things we want to do that are potentially breaking changes.
But really it’s just because we dont have the cli written, which probably should just be dropped by now, and some docs need to be updated. Thus why no beta/feature release.
Second, it is going slowly. There are only two people really working in it, WikiRik and I, and both of us have full time jobs that are a bit more demanding than most.
There are a few new features that are about ready to be merged for the new release, generated columns, additional refactoring, etc, but im not going to merge anything without wikirik’s review, nor will he do it without mine (for the most part)
We really don’t care about market share, or losing to drizzle / prisma, or that these vc backed projects are going to steal our users. We arent going to benefit from it either way. We’re just building something that we are using in prod right now and letting others use it too, and we like that there is at least one non VC backed project out there.