diff --git a/CHANGELOG.md b/CHANGELOG.md index 3507dcf107..b6ac86d232 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - GPU.js constructor needs to be provided directly to engine configuration. (#355) +- A deprecated config option vlookupThreshold has been removed. (#620) ### Added - Added support for row and column reordering. (#343) diff --git a/src/Config.ts b/src/Config.ts index 73c1f4b88f..ec360a71f4 100644 --- a/src/Config.ts +++ b/src/Config.ts @@ -309,18 +309,6 @@ export interface ConfigParams { * @category Engine */ useStats: boolean, - /** - * Determines minimum number of elements a range must have in order to use binary search. - * Shorter ranges will be searched naively. - * Used by VLOOKUP, HLOOKUP and MATCH functions. - * - * @default 20 - * - * @category Engine - * - * @deprecated Use {@link binarySearchThreshold} instead. - */ - vlookupThreshold: number, /** * Determines minimum number of elements a range must have in order to use binary search. * Shorter ranges will be searched naively. @@ -421,7 +409,6 @@ export class Config implements ConfigParams, ParserConfig { precisionRounding: 14, useColumnIndex: false, useStats: false, - vlookupThreshold: 20, binarySearchThreshold: 20, nullDate: {year: 1899, month: 12, day: 30}, undoLimit: 20, @@ -493,8 +480,6 @@ export class Config implements ConfigParams, ParserConfig { /** @inheritDoc */ public readonly useStats: boolean /** @inheritDoc */ - public readonly vlookupThreshold: number - /** @inheritDoc */ public readonly binarySearchThreshold: number /** @inheritDoc */ public readonly nullDate: SimpleDate @@ -567,7 +552,6 @@ export class Config implements ConfigParams, ParserConfig { precisionEpsilon, precisionRounding, useColumnIndex, - vlookupThreshold, binarySearchThreshold, nullDate, useStats, @@ -611,9 +595,7 @@ export class Config implements ConfigParams, ParserConfig { this.validateNumberToBeAtLeast(this.precisionEpsilon, 'precisionEpsilon', 0) this.useColumnIndex = this.valueFromParam(useColumnIndex, 'boolean', 'useColumnIndex') this.useStats = this.valueFromParam(useStats, 'boolean', 'useStats') - this.vlookupThreshold = this.valueFromParam(vlookupThreshold, 'number', 'vlookupThreshold') - this.validateNumberToBeAtLeast(this.vlookupThreshold, 'vlookupThreshold', 1) - this.binarySearchThreshold = this.valueFromParam(binarySearchThreshold ?? vlookupThreshold, 'number', 'vlookupThreshold') + this.binarySearchThreshold = this.valueFromParam(binarySearchThreshold, 'number', 'binarySearchThreshold') this.validateNumberToBeAtLeast(this.binarySearchThreshold, 'binarySearchThreshold', 1) this.parseDateTime = this.valueFromParam(parseDateTime, 'function', 'parseDateTime') this.stringifyDateTime = this.valueFromParam(stringifyDateTime, 'function', 'stringifyDateTime') @@ -641,8 +623,6 @@ export class Config implements ConfigParams, ParserConfig { }) this.validateNumberToBeAtLeast(this.maxColumns, 'maxColumns', 1) - this.warnDeprecatedIfUsed(vlookupThreshold, 'vlookupThreshold', 'v.0.3.0', 'binarySearchThreshold') - this.checkIfParametersNotInConflict( {value: this.decimalSeparator, name: 'decimalSeparator'}, {value: this.functionArgSeparator, name: 'functionArgSeparator'}, diff --git a/test/config.spec.ts b/test/config.spec.ts index b40a3712b0..9127c3c587 100644 --- a/test/config.spec.ts +++ b/test/config.spec.ts @@ -154,13 +154,6 @@ describe('Config', () => { expect(() => new Config({ undoLimit: -1 })).toThrowError('Config parameter undoLimit should be at least 0') }) - it('#vlookupThreshold', () => { - expect(() => new Config({ vlookupThreshold: 1 })).not.toThrowError() - expect(() => new Config({ vlookupThreshold: 42 })).not.toThrowError() - expect(() => new Config({ vlookupThreshold: Infinity })).not.toThrowError() - expect(() => new Config({ vlookupThreshold: 0 })).toThrowError('Config parameter vlookupThreshold should be at least 1') - }) - it('#binarySearchThreshold', () => { expect(() => new Config({ binarySearchThreshold: 1 })).not.toThrowError() expect(() => new Config({ binarySearchThreshold: 42 })).not.toThrowError()