Socket
Socket
Sign inDemoInstall

sequelize

Package Overview
Dependencies
Maintainers
8
Versions
623
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sequelize - npm Package Compare versions

Comparing version 6.16.3 to 6.17.0

10

lib/dialects/postgres/query.js

@@ -53,9 +53,9 @@ "use strict";

queryResult = await query;
} catch (err) {
if (err.code === "ECONNRESET") {
} catch (error) {
if (error.code === "ECONNRESET" || /Unable to set non-blocking to true/i.test(error) || /SSL SYSCALL error: EOF detected/i.test(error) || /Local: Authentication failure/i.test(error)) {
connection._invalid = true;
}
err.sql = sql;
err.parameters = parameters;
throw this.formatError(err, errForStack.stack);
error.sql = sql;
error.parameters = parameters;
throw this.formatError(error, errForStack.stack);
}

@@ -62,0 +62,0 @@ complete();

{
"name": "sequelize",
"description": "Sequelize is a promise-based Node.js ORM tool for Postgres, MySQL, MariaDB, SQLite, Microsoft SQL Server, Amazon Redshift and Snowflake’s Data Cloud. It features solid transaction support, relations, eager and lazy loading, read replication and more.",
"version": "6.16.3",
"version": "6.17.0",
"funding": [

@@ -42,5 +42,6 @@ {

"@types/debug": "^4.1.7",
"@types/validator": "^13.7.1",
"debug": "^4.3.3",
"dottie": "^2.0.2",
"inflection": "^1.13.1",
"inflection": "^1.13.2",
"lodash": "^4.17.21",

@@ -67,3 +68,2 @@ "moment": "^2.29.1",

"@types/sinon": "^10.0.6",
"@types/validator": "^13.7.1",
"@typescript-eslint/eslint-plugin": "^5.8.1",

@@ -70,0 +70,0 @@ "@typescript-eslint/parser": "^5.8.1",

@@ -489,3 +489,3 @@ import { DataType } from '../../data-types';

*/
public upsert(
public upsert<M extends Model>(
tableName: TableName,

@@ -495,4 +495,3 @@ insertValues: object,

where: object,
model: ModelType,
options?: QueryOptions
options?: QueryOptionsWithModel<M>
): Promise<object>;

@@ -499,0 +498,0 @@

@@ -163,3 +163,3 @@ import { HookReturn, Hooks, SequelizeHooks } from './hooks';

readonly ssl: boolean;
readonly replication: boolean;
readonly replication: ReplicationOptions | false;
readonly dialectModulePath: null | string;

@@ -311,3 +311,3 @@ readonly keepDefaultTimezone?: boolean;

*/
replication?: ReplicationOptions;
replication?: ReplicationOptions | false;

@@ -314,0 +314,0 @@ /**

@@ -130,10 +130,10 @@ import { DataType } from './data-types';

/**
* Returns all shallow properties that accept `undefined`.
* Does not include Optional properties, only `undefined`.
* Returns all shallow properties that accept `undefined` or `null`.
* Does not include Optional properties, only `undefined` or `null`.
*
* @example
* type UndefinedProps = UndefinedPropertiesOf<{
* type UndefinedProps = NullishPropertiesOf<{
* id: number | undefined,
* createdAt: string | undefined,
* firstName: string,
* firstName: string | null, // nullable properties are included
* lastName?: string, // optional properties are not included.

@@ -144,10 +144,12 @@ * }>;

*
* type UndefinedProps = 'id' | 'createdAt';
* type UndefinedProps = 'id' | 'createdAt' | 'firstName';
*/
export type UndefinedPropertiesOf<T> = {
[P in keyof T]-?: undefined extends T[P] ? P : never
export type NullishPropertiesOf<T> = {
[P in keyof T]-?: undefined extends T[P] ? P
: null extends T[P] ? P
: never
}[keyof T];
/**
* Makes all shallow properties of an object `optional` if they accept `undefined` as a value.
* Makes all shallow properties of an object `optional` if they accept `undefined` or `null` as a value.
*

@@ -157,3 +159,4 @@ * @example

* id: number | undefined,
* name: string,
* firstName: string,
* lastName: string | null,
* }>;

@@ -166,3 +169,5 @@ *

* id?: number | undefined,
* name: string,
* firstName: string,
* // this property is optional.
* lastName?: string | null,
* };

@@ -172,2 +177,2 @@ */

// source: https://stackoverflow.com/questions/51691235/typescript-map-union-type-to-another-union-type
export type MakeUndefinedOptional<T extends object> = T extends any ? Optional<T, UndefinedPropertiesOf<T>> : never;
export type MakeNullishOptional<T extends object> = T extends any ? Optional<T, NullishPropertiesOf<T>> : never;

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc