diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9901b1b..4ab6edf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -109,7 +109,7 @@ jobs: - name: Install Sequelize dependencies working-directory: ./.downloaded-sequelize - run: npm install + run: npm install --ignore-scripts - name: Provide the `sequelize-cockroachdb` patches # This script needs `fs-jetpack` as an extra dependency diff --git a/package.json b/package.json index 231f0f3..a7f35c5 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "mocha": "^8.2.0", "p-timeout": "^4.1.0", "prettier": "2.2.1", - "sequelize": "^6.3.5", + "sequelize": "^6.13.0", "sinon": "^9.2.4", "sinon-chai": "^3.5.0" }, diff --git a/source/index.js b/source/index.js index e5931fd..1ef71ad 100644 --- a/source/index.js +++ b/source/index.js @@ -51,7 +51,7 @@ if (semver.satisfies(sequelizeVersion, '5.x')) { //// [2] Disable `EXCEPTION` support -const PostgresDialect = require('sequelize/lib/dialects/postgres'); +const PostgresDialect = require('sequelize/lib/dialects/postgres/index'); // This prevents, for example, usage of CREATE/REPLACE FUNCTION when using Model.findOrCreate() PostgresDialect.prototype.supports.EXCEPTION = false; @@ -171,7 +171,7 @@ Model.findByPk = async function findByPk(param, options) { // Copied from: https://github.com/sequelize/sequelize/blob/29901187d9560e7d51ae1f9b5f411cf0c5d8994a/lib/model.js#L2270 Model.findOrCreate = async function findOrCreate(options) { const _ = require('lodash'); - const Utils = require('sequelize/lib/utils.js'); + const Utils = require('sequelize/lib/utils'); const { logger } = require('sequelize/lib/utils/logger'); const sequelizeErrors = require('sequelize/lib/errors');