Skip to content

Commit

Permalink
chore(deps): update all non-major dependencies (#91)
Browse files Browse the repository at this point in the history
* chore(deps): update all non-major dependencies

* fix: type error after upgrade typescript@5.1

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: thundermiracle <cissoliu@gmail.com>
  • Loading branch information
renovate[bot] and thundermiracle authored Jun 11, 2023
1 parent 9df64cf commit 598f2bf
Show file tree
Hide file tree
Showing 28 changed files with 1,082 additions and 877 deletions.
13 changes: 13 additions & 0 deletions .changeset/renovate-92a29b2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
'filter-data': patch
---

Updated dependency `ramda` to `0.29.0`.
Updated dependency `@rollup/plugin-node-resolve` to `^15.1.0`.
Updated dependency `@types/node` to `^18.16.17`.
Updated dependency `@types/ramda` to `^0.29.2`.
Updated dependency `@web-configs/eslint-plugin` to `^0.5.1`.
Updated dependency `rimraf` to `^5.0.1`.
Updated dependency `tslib` to `^2.5.3`.
Updated dependency `tsx` to `^3.12.7`.
Updated dependency `typescript` to `^5.1.3`.
2 changes: 1 addition & 1 deletion dist/filterdata.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/filterdata.min.js.map

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions dist/lib/filterData.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { FilterDataOption, SearchConditionMultiple } from './lib/types';
/**
*
* @param {*array} allData: Array of object
* @param {*array} searchConditions
* @param {*object} optionsIn: { caseSensitive: false, includeNull: false, offset: undefined, limit: undefined }
*/
declare function filterData<T>(allData: ReadonlyArray<T>, searchConditions: SearchConditionMultiple[], optionsIn?: FilterDataOption): T[];
export default filterData;
10 changes: 10 additions & 0 deletions dist/lib/filters/equal.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import type { FilterFunction } from '../lib/types';
/**
* equal check for data
*
* @param {*object} searchCondition: { name, value }
* @param {*boolean} caseSensitive: false
* @param {*DataObject} data
*/
declare const equal: FilterFunction;
export default equal;
4 changes: 4 additions & 0 deletions dist/lib/filters/filtersMap.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import SearchType from '../lib/SearchType';
import type { FilterFunction } from '../lib/types';
declare const filtersMap: Record<SearchType, FilterFunction>;
export default filtersMap;
10 changes: 10 additions & 0 deletions dist/lib/filters/greater.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import type { FilterFunction } from '../lib/types';
/**
* greater check for data
*
* @param {*object} searchCondition: { name, value }
* @param {*boolean} caseSensitive: false
* @param {*DataObject} data
*/
declare const greater: FilterFunction;
export default greater;
9 changes: 9 additions & 0 deletions dist/lib/filters/greaterOrEqual.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/**
* greater or equal check for data
*
* @param {*object} searchCondition: { name, value }
* @param {*boolean} caseSensitive: false
* @param {*DataObject} data
*/
declare const greaterOrEqual: import("ts-toolbelt/out/Function/Curry").Curry<(searchCondition: import("../lib/types").SearchCondition, caseSensitive: boolean, data: import("../lib/types").DataObject) => boolean>;
export default greaterOrEqual;
1 change: 1 addition & 0 deletions dist/lib/filters/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from './filtersMap';
9 changes: 9 additions & 0 deletions dist/lib/filters/less.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/**
* less check for data
*
* @param {*object} searchCondition: { name, value }
* @param {*boolean} caseSensitive: false
* @param {*DataObject} data
*/
declare const less: import("ts-toolbelt/out/Function/Curry").Curry<(searchCondition: import("../lib/types").SearchCondition, caseSensitive: boolean, data: import("../lib/types").DataObject) => boolean>;
export default less;
9 changes: 9 additions & 0 deletions dist/lib/filters/lessOrEqual.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/**
* less or equal check for data
*
* @param {*object} searchCondition: { name, value }
* @param {*boolean} caseSensitive: false
* @param {*DataObject} data
*/
declare const lessOrEqual: import("ts-toolbelt/out/Function/Curry").Curry<(searchCondition: import("../lib/types").SearchCondition, caseSensitive: boolean, data: import("../lib/types").DataObject) => boolean>;
export default lessOrEqual;
10 changes: 10 additions & 0 deletions dist/lib/filters/like.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import type { SearchCondition, DataObject } from '../lib/types';
/**
* like check for data
*
* @param {*object} searchCondition: { name, value }
* @param {*boolean} caseSensitive: false
* @param {*DataObject} data
*/
declare const like: (searchCondition: SearchCondition, caseSensitive: boolean, data: DataObject) => boolean;
export default like;
9 changes: 9 additions & 0 deletions dist/lib/filters/notEqual.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/**
* not equal check for data
*
* @param {*object} searchCondition: { name, value }
* @param {*boolean} caseSensitive: false
* @param {*DataObject} data
*/
declare const notEqual: (conditions: import("../lib/types").SearchCondition, caseSensitive: boolean, data: import("../lib/types").DataObject) => boolean;
export default notEqual;
9 changes: 9 additions & 0 deletions dist/lib/filters/notLike.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/**
* not like check for data
*
* @param {*object} searchCondition: { name, value }
* @param {*boolean} caseSensitive: false
* @param {*DataObject} data
*/
declare const notLike: import("ts-toolbelt/out/Function/Curry").Curry<(searchCondition: import("../lib/types").SearchCondition, caseSensitive: boolean, data: import("../lib/types").DataObject) => boolean>;
export default notLike;
2 changes: 2 additions & 0 deletions dist/lib/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { default as SearchType } from './lib/SearchType';
export { default as filterData } from './filterData';
11 changes: 11 additions & 0 deletions dist/lib/lib/SearchType.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
declare enum SearchType {
EQ = "equal",
GT = "greater",
GTE = "greaterorequal",
LT = "less",
LTE = "lessorequal",
LK = "like",
NE = "notequal",
NLK = "notlike"
}
export default SearchType;
27 changes: 27 additions & 0 deletions dist/lib/lib/types.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import type SearchType from './SearchType';
export interface FilterDataOption {
caseSensitive?: boolean;
includeNull?: boolean;
offset?: number;
limit?: number;
}
export interface SearchCondition {
key: string | string[];
value: string | number;
type: SearchType;
}
export interface SearchConditionMultiple {
key: string | string[] | string[][];
value?: string | number;
type: SearchType;
}
export type DataObjectValues = string | number | (string | number)[];
export interface DataObject {
[key: string]: DataObjectValues | DataObject;
}
export type DataObjectWithNullValues = DataObjectValues | null;
export interface DataObjectWithNull {
[key: string]: DataObjectWithNullValues | DataObjectWithNull;
}
export type Predicator = (data: DataObject) => boolean;
export type FilterFunction = (conditions: SearchCondition, caseSensitive: boolean, data: DataObject) => boolean;
7 changes: 7 additions & 0 deletions dist/lib/lib/utils.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { transduce, filter, curry, complement, allPass, anyPass, drop, take } from 'ramda';
import type { DataObjectValues, DataObjectWithNull } from './types';
type AnyFunction = (...args: any[]) => any;
declare function listCombiner(list: any[], val: any): any[];
declare function compose(...fns: AnyFunction[]): (...args: any[]) => any[];
declare function getObjValue(data: DataObjectWithNull, key: string | string[]): DataObjectValues | undefined;
export { listCombiner, compose, transduce, filter, curry, complement, allPass, anyPass, drop, take, getObjValue, };
14 changes: 14 additions & 0 deletions dist/lib/prefilters/targetValueArray.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import type { F } from 'ts-toolbelt';
import type { SearchCondition, DataObject } from '../lib/types';
type PredicatorWithOptions = (searchCondition: SearchCondition, caseSensitive: boolean, data: DataObject) => boolean;
/**
* exclude data if targetValue is an array
*
* @param {*function} filterCallback
* @param {*object} searchCondition: { name, value }
* @param {*boolean} caseSensitive: false
* @param {*DataObject} data
*/
declare const excludeIfTargetValueIsArray: (predicator: PredicatorWithOptions, searchCondition: SearchCondition, caseSensitive: boolean, data: DataObject) => boolean;
declare const targetValueArray: F.Curry<typeof excludeIfTargetValueIsArray>;
export default targetValueArray;
3 changes: 3 additions & 0 deletions dist/lib/prefilters/targetValueNull.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import type { DataObjectWithNull, Predicator, SearchCondition } from '../lib/types';
declare const _default: import("ts-toolbelt/out/Function/Curry").Curry<(includeNull: boolean, { key }: SearchCondition, predicator: Predicator, data: DataObjectWithNull) => boolean>;
export default _default;
21 changes: 11 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,33 +47,34 @@
"cs:release": "pnpm build && changeset publish"
},
"dependencies": {
"ramda": "0.28.0"
"ramda": "0.29.0"
},
"devDependencies": {
"@changesets/changelog-github": "^0.4.8",
"@changesets/cli": "^2.26.1",
"@rollup/plugin-commonjs": "^25.0.1",
"@rollup/plugin-node-resolve": "^15.0.1",
"@rollup/plugin-node-resolve": "^15.1.0",
"@rollup/plugin-typescript": "^11.1.1",
"@swc/core": "^1.3.11",
"@swc/jest": "^0.2.23",
"@types/jest": "^29.2.1",
"@types/match-sorter": "^6.0.0",
"@types/node": "^18.15.11",
"@types/ramda": "^0.28.23",
"@web-configs/eslint-plugin": "^0.5.0",
"@types/node": "^18.16.17",
"@types/ramda": "^0.29.2",
"@web-configs/eslint-plugin": "^0.5.1",
"@web-configs/prettier": "^0.1.2",
"eslint": "^8.41.0",
"eslint": "^8.42.0",
"fuse.js": "^6.6.2",
"jest": "^29.2.2",
"match-sorter": "^6.3.1",
"prettier": "^2.8.8",
"rimraf": "^5.0.0",
"rimraf": "^5.0.1",
"rollup": "^2.79.1",
"rollup-plugin-terser": "^7.0.2",
"tslib": "^2.5.0",
"tsx": "^3.12.6",
"typescript": "^5.0.4"
"ts-toolbelt": "^9.6.0",
"tslib": "^2.5.3",
"tsx": "^3.12.7",
"typescript": "^5.1.3"
},
"prettier": "@web-configs/prettier"
}
Loading

0 comments on commit 598f2bf

Please sign in to comment.