question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Extract dialects into own modules

See original GitHub issue

Currently, users have to manually install the driver they want to use. However, there is no version constraint on what version of these drivers work with sequelize. Any major release could break sequelize.

Nevertheless, when running npm install sequelize, users get a whole lot of code for dialects they will not use. A much better solution would be if every subfolder of the dialects folder was a seperate module, like sequelize-dialect-postgres. User would then install this, and it would have a dependency on the needed driver version and a peer dependency on sequelize. That way NPM will not allow users to have an old dialect version with a newer, incompatible sequelize version.

The unit tests for the specific dialects would also be moved and run in a seperate CI, which would reduce build time. The integration tests will probably still be run in the main sequelize repo for all dialects.

What do you think?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:9 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
felixfbeckercommented, Apr 19, 2017

Yes, I am. Death to monorepos.

0reactions
mattbrunetticommented, Apr 18, 2017

@felixfbecker @mickhansen @sushantdhiman Are you guys familiar with lerna? It’s a tool for managing multiple packages in a single repo (a “monorepo”), so all of the source code and tests are versioned together, but you can publish them separately to NPM.

Some other big projects mentioned in the link below manage to have monorepos without the tool, but the idea is the same.

https://github.com/lerna/lerna#about

Read more comments on GitHub >

github_iconTop Results From Across the Web

Modules, introduction
A module is just a file. One script is one module. As simple as that. Modules can load each other and use special...
Read more >
JavaScript modules - MDN Web Docs
This guide gives you all you need to get started with JavaScript module syntax.
Read more >
How To Write Modules in Python 3
This tutorial will guide you through writing Python modules for you or others to use within your program files.
Read more >
6. Modules — Python 3.11.1 documentation
Each module has its own private namespace, which is used as the global namespace by all functions defined in the module. Thus, the...
Read more >
Crates and Modules - The Rust Programming Language
Rust has two distinct terms that relate to the module system: 'crate' and 'module'. A crate is synonymous with a 'library' or 'package'...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found