@algolia/client-common
Advanced tools
Comparing version 4.5.1 to 4.6.0
@@ -59,8 +59,9 @@ 'use strict'; | ||
function addMethods(base, methods) { | ||
Object.keys(methods !== undefined ? methods : {}).forEach(key => { | ||
// @ts-ignore | ||
if (!methods) { | ||
return base; | ||
} | ||
Object.keys(methods).forEach(key => { | ||
// eslint-disable-next-line functional/immutable-data, no-param-reassign | ||
base[key] = methods[key](base); | ||
}); | ||
// @ts-ignore | ||
return base; | ||
@@ -74,3 +75,3 @@ } | ||
const version = '4.5.1'; | ||
const version = '4.6.0'; | ||
@@ -77,0 +78,0 @@ const destroy = (base) => { |
@@ -8,8 +8,8 @@ import { Headers } from '@algolia/transporter'; | ||
export declare function addMethods<TBase, TMethods extends { | ||
readonly [key: string]: (base: TBase) => (...args: any) => any; | ||
}>(base: TBase, methods?: TMethods): TBase & { | ||
[key in keyof TMethods extends string ? keyof TMethods : never]: ReturnType<TMethods[key]>; | ||
declare type AddedMethods<TBase, TMethods extends Methods<TBase>> = TBase & { | ||
[TKey in keyof TMethods extends string ? keyof TMethods : never]: ReturnType<TMethods[TKey]>; | ||
}; | ||
export declare function addMethods<TBase extends {}, TMethods extends Methods<TBase>>(base: TBase, methods?: TMethods): AddedMethods<TBase, TMethods>; | ||
export declare type Auth = { | ||
@@ -71,5 +71,9 @@ /** | ||
declare type Methods<TBase> = { | ||
readonly [key: string]: (base: TBase) => (...args: any[]) => any; | ||
}; | ||
export declare function shuffle<TData>(array: TData[]): TData[]; | ||
export declare const version = "4.5.1"; | ||
export declare const version = "4.6.0"; | ||
@@ -76,0 +80,0 @@ export declare type Wait<TResponse> = ( |
@@ -55,8 +55,9 @@ function createAuth(authMode, appId, apiKey) { | ||
function addMethods(base, methods) { | ||
Object.keys(methods !== undefined ? methods : {}).forEach(key => { | ||
// @ts-ignore | ||
if (!methods) { | ||
return base; | ||
} | ||
Object.keys(methods).forEach(key => { | ||
// eslint-disable-next-line functional/immutable-data, no-param-reassign | ||
base[key] = methods[key](base); | ||
}); | ||
// @ts-ignore | ||
return base; | ||
@@ -70,3 +71,3 @@ } | ||
const version = '4.5.1'; | ||
const version = '4.6.0'; | ||
@@ -73,0 +74,0 @@ const destroy = (base) => { |
{ | ||
"name": "@algolia/client-common", | ||
"version": "4.5.1", | ||
"version": "4.6.0", | ||
"private": false, | ||
@@ -19,5 +19,5 @@ "repository": { | ||
"dependencies": { | ||
"@algolia/requester-common": "4.5.1", | ||
"@algolia/transporter": "4.5.1" | ||
"@algolia/requester-common": "4.6.0", | ||
"@algolia/transporter": "4.6.0" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10554
260
+ Added@algolia/cache-common@4.6.0(transitive)
+ Added@algolia/logger-common@4.6.0(transitive)
+ Added@algolia/requester-common@4.6.0(transitive)
+ Added@algolia/transporter@4.6.0(transitive)
- Removed@algolia/cache-common@4.5.1(transitive)
- Removed@algolia/logger-common@4.5.1(transitive)
- Removed@algolia/requester-common@4.5.1(transitive)
- Removed@algolia/transporter@4.5.1(transitive)
Updated@algolia/transporter@4.6.0