Skip to content

TS rewrite #31

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

Closed
wants to merge 0 commits into from
Closed

Conversation

cyrilchapon
Copy link

Project changes

  • Full rewrite to TS
  • Change build from babel to tsc
  • Remove .editorconfig, add prettier, and change eslint-config-google to eslint-config-prettier
    (and configured properly, inspired by Nest.js config)
  • Change pre-commit in favor of more robust husky hooks
  • Refactored source (mostly splits and renames)
  • Removed JSDoc arguments docs in favor of TS ones
    (which fixes options in the process, essentially missing queryInterfaces and queryOptionss)
  • Removed "global" logic for mocha and chai utils,
    they are now simply imported
  • Removed .travisyml in favor of github actions config
  • Added .nvmrc with node 18, configured everything (the build) for Node 18 too
  • Kept the 0 runtime dependency strategy, and added some dev ones accordingly
  • Added sequelize 6.x as a peerDependency (⚠️ Not sure about that one)
  • (Fixed and improved documentation)
  • (Bump major to 2.0.1)

API changes

  • All calls are now curryfied with queryInterface
      replaceEnum(queryInterface)({ /* args */ })
  • sequelizeOptions are now splitted into transactionOptions and queryOptions
    (respectively used for transaction generation, and queries options)
      replaceEnum(queryInterface)({
        // Mainly used for passing enclosing transaction
        // (auto generating a sub-transaction)
        transactionOptions: { transaction: t },
    
        // Used for various query options
        // passed to to all sub-queries
        queryOptions: { logging: true }
    
        // ...other args
      })

@abelosorio
Copy link
Owner

Hi @cyrilchapon, thanks for your contribution. Would you mind solving the conflicts so that I can merge it?

Thanks.

@cyrilchapon
Copy link
Author

cyrilchapon commented Oct 29, 2022

The new merged feature "use existing transaction" is basically useless and less robust than the already built in subtransaction support. The only use-case I could think of is a fallback for dbs in which subtransactions are not available; which is a nonsense since this library is focused on Postgres.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants