Skip to content

Commit 9bf2be6

Browse files
committed
chore: update dependencies
1 parent d9b2fe8 commit 9bf2be6

File tree

8 files changed

+436
-696
lines changed

8 files changed

+436
-696
lines changed

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ dist
66
coverage
77

88
test
9+
.eslintrc.js

.eslintrc.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ module.exports = {
1212
rules: {
1313
'@typescript-eslint/no-explicit-any': 'off',
1414
'@typescript-eslint/ban-ts-ignore': 'off',
15-
'tree-shaking/no-side-effects-in-initialization': 'error'
15+
'tree-shaking/no-side-effects-in-initialization': 'error',
16+
'@typescript-eslint/ban-ts-comment': 'off'
1617
}
1718
}

package-lock.json

Lines changed: 416 additions & 678 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "filter-anything",
3-
"version": "2.1.4",
3+
"version": "2.1.5",
44
"sideEffects": false,
55
"description": "A simple (TypeScript) integration of \"pick\" and \"omit\" to filter props of an object",
66
"main": "dist/index.cjs.js",
@@ -38,21 +38,21 @@
3838
},
3939
"homepage": "https://github.com/mesqueeb/filter-anything#readme",
4040
"dependencies": {
41-
"is-what": "^3.10.0",
42-
"ts-toolbelt": "6.12.2"
41+
"is-what": "^3.11.2",
42+
"ts-toolbelt": "8.0.6"
4343
},
4444
"devDependencies": {
45-
"@typescript-eslint/eslint-plugin": "^2.34.0",
46-
"@typescript-eslint/parser": "^2.34.0",
47-
"ava": "^3.10.1",
48-
"eslint": "^6.8.0",
45+
"@typescript-eslint/eslint-plugin": "^4.1.1",
46+
"@typescript-eslint/parser": "^4.1.1",
47+
"ava": "^3.12.1",
48+
"eslint": "^7.9.0",
4949
"eslint-config-prettier": "^6.11.0",
5050
"eslint-plugin-tree-shaking": "^1.8.0",
51-
"rollup": "^1.32.1",
52-
"rollup-plugin-typescript2": "^0.27.1",
51+
"rollup": "^2.27.1",
52+
"rollup-plugin-typescript2": "^0.27.2",
5353
"tsconfig-paths": "^3.9.0",
54-
"ts-node": "^8.10.2",
55-
"typescript": "^3.9.6"
54+
"ts-node": "^9.0.0",
55+
"typescript": "^4.0.2"
5656
},
5757
"ava": {
5858
"extensions": [

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { recursiveFilter } from './recursiveFilter'
1111
* @param {K[]} keys the prop names you want to keep
1212
* @returns {O.Pick<T, K>} a new object with just the picked props
1313
*/
14-
export function pick<T extends object, K extends string> (obj: T, keys: K[]): O.Pick<T, K> {
14+
export function pick<T extends Record<string, any>, K extends string> (obj: T, keys: K[]): O.Pick<T, K> {
1515
// @ts-ignore
1616
if (!keys.length) return {}
1717
// @ts-ignore
@@ -30,7 +30,7 @@ export const fillable = pick
3030
* @param {K[]} keys the prop names you want to omit
3131
* @returns {O.Omit<T, K>} a new object without the omitted props
3232
*/
33-
export function omit<T extends object, K extends string> (obj: T, keys: K[]): O.Omit<T, K> {
33+
export function omit<T extends Record<string, any>, K extends string> (obj: T, keys: K[]): O.Omit<T, K> {
3434
// @ts-ignore
3535
return recursiveFilter(obj, [], keys)
3636
}

src/recursiveFilter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { isPlainObject } from 'is-what'
22
import pathsAreEqual from './pathsAreEqual'
33

44
export function recursiveFilter<
5-
T extends object,
5+
T extends Record<string, any>,
66
KeysToKeep extends string[],
77
KeysToDelete extends string[]
88
> (obj: T, fillables: KeysToKeep, guarded: KeysToDelete, pathUntilNow = ''): T {

types/index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { O } from 'ts-toolbelt';
99
* @param {K[]} keys the prop names you want to keep
1010
* @returns {O.Pick<T, K>} a new object with just the picked props
1111
*/
12-
export declare function pick<T extends object, K extends string>(obj: T, keys: K[]): O.Pick<T, K>;
12+
export declare function pick<T extends Record<string, any>, K extends string>(obj: T, keys: K[]): O.Pick<T, K>;
1313
export declare const fillable: typeof pick;
1414
/**
1515
* omit returns a new object without the props you omit
@@ -21,5 +21,5 @@ export declare const fillable: typeof pick;
2121
* @param {K[]} keys the prop names you want to omit
2222
* @returns {O.Omit<T, K>} a new object without the omitted props
2323
*/
24-
export declare function omit<T extends object, K extends string>(obj: T, keys: K[]): O.Omit<T, K>;
24+
export declare function omit<T extends Record<string, any>, K extends string>(obj: T, keys: K[]): O.Omit<T, K>;
2525
export declare const guard: typeof omit;

types/recursiveFilter.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export declare function recursiveFilter<T extends object, KeysToKeep extends string[], KeysToDelete extends string[]>(obj: T, fillables: KeysToKeep, guarded: KeysToDelete, pathUntilNow?: string): T;
1+
export declare function recursiveFilter<T extends Record<string, any>, KeysToKeep extends string[], KeysToDelete extends string[]>(obj: T, fillables: KeysToKeep, guarded: KeysToDelete, pathUntilNow?: string): T;

0 commit comments

Comments
 (0)