Skip to content

Commit

Permalink
backport sequelize#15400 to v6
Browse files Browse the repository at this point in the history
  • Loading branch information
esetnik committed Dec 19, 2022
1 parent 1247c01 commit 5a5668e
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -57,7 +57,7 @@
"moment": "^2.29.1",
"moment-timezone": "^0.5.34",
"pg-connection-string": "^2.5.0",
"retry-as-promised": "^6.1.0",
"retry-as-promised": "^7.0.3",
"semver": "^7.3.5",
"sequelize-pool": "^7.1.0",
"toposort-class": "^1.0.1",
Expand Down
8 changes: 3 additions & 5 deletions src/sequelize.d.ts
@@ -1,3 +1,4 @@
import type { Options as RetryAsPromisedOptions } from 'retry-as-promised';
import { HookReturn, Hooks, SequelizeHooks } from './hooks';
import { ValidationOptions } from './instance-validator';
import {
Expand Down Expand Up @@ -31,6 +32,8 @@ import { Op } from './index';
import { Cast, Col, DeepWriteable, Fn, Json, Literal, Where } from './utils';
import { ConnectionManager } from './dialects/abstract/connection-manager';

export type RetryOptions = RetryAsPromisedOptions;

/**
* Additional options for table altering during sync
*/
Expand Down Expand Up @@ -171,11 +174,6 @@ export interface Config {

export type Dialect = 'mysql' | 'postgres' | 'sqlite' | 'mariadb' | 'mssql' | 'db2' | 'snowflake' | 'oracle';

export interface RetryOptions {
match?: (RegExp | string | Function)[];
max?: number;
}

/**
* Options for the constructor of Sequelize main class
*/
Expand Down
2 changes: 1 addition & 1 deletion src/sequelize.js
Expand Up @@ -3,7 +3,7 @@
const url = require('url');
const path = require('path');
const pgConnectionString = require('pg-connection-string');
const retry = require('retry-as-promised');
const retry = require('retry-as-promised').default;
const _ = require('lodash');

const Utils = require('./utils');
Expand Down
7 changes: 7 additions & 0 deletions yarn.lock
Expand Up @@ -7252,10 +7252,17 @@ restore-cursor@^3.1.0:
onetime "^5.1.0"
signal-exit "^3.0.2"

<<<<<<< HEAD
retry-as-promised@^6.1.0:
version "6.1.0"
resolved "https://registry.yarnpkg.com/retry-as-promised/-/retry-as-promised-6.1.0.tgz#11eca9a0f97804d552ec8e74bc4eb839bd226dc4"
integrity sha512-Hj/jY+wFC+SB9SDlIIFWiGOHnNG0swYbGYsOj2BJ8u2HKUaobNKab0OIC0zOLYzDy0mb7A4xA5BMo4LMz5YtEA==
=======
retry-as-promised@^7.0.3:
version "7.0.3"
resolved "https://registry.yarnpkg.com/retry-as-promised/-/retry-as-promised-7.0.3.tgz#ca3c13b15525a7bfbf0f56d2996f0e75649d068b"
integrity sha512-SEvMa4khHvpU/o6zgh7sK24qm6rxVgKnrSyzb5POeDvZx5N9Bf0s5sQsQ4Fl+HjRp0X+w2UzACGfUnXtx6cJ9Q==
>>>>>>> f2574ae4c (feat(types): use retry-as-promised types for retry options to match documentation (#15400))

retry@^0.12.0:
version "0.12.0"
Expand Down

0 comments on commit 5a5668e

Please sign in to comment.