Skip to content

Commit

Permalink
chore: update deps (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
emmenko authored Jun 29, 2023
1 parent c427f1b commit d45b316
Show file tree
Hide file tree
Showing 4 changed files with 3,504 additions and 2,530 deletions.
5 changes: 5 additions & 0 deletions .changeset/happy-bats-joke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'omit-empty-es': patch
---

Update dependencies
56 changes: 28 additions & 28 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,37 +28,37 @@
"changeset:version-and-format": "changeset version && yarn prettier --write --parser json 'package.json' && YARN_ENABLE_IMMUTABLE_INSTALLS=false yarn install"
},
"dependencies": {
"@babel/runtime": "^7.17.8",
"@babel/runtime-corejs3": "^7.17.8"
"@babel/runtime": "^7.22.5",
"@babel/runtime-corejs3": "^7.22.5"
},
"devDependencies": {
"@babel/plugin-transform-runtime": "7.17.0",
"@babel/preset-env": "7.16.11",
"@babel/preset-typescript": "7.16.7",
"@changesets/changelog-github": "0.4.4",
"@changesets/cli": "2.22.0",
"@commitlint/cli": "16.2.3",
"@commitlint/config-conventional": "16.2.1",
"@preconstruct/cli": "2.1.5",
"@types/jest": "27.4.1",
"@types/node": "16.11.25",
"@typescript-eslint/eslint-plugin": "5.18.0",
"@typescript-eslint/parser": "5.18.0",
"babel-jest": "27.5.1",
"eslint": "8.12.0",
"eslint-config-prettier": "8.5.0",
"eslint-formatter-pretty": "4.1.0",
"eslint-import-resolver-typescript": "2.7.1",
"@babel/plugin-transform-runtime": "7.22.5",
"@babel/preset-env": "7.22.5",
"@babel/preset-typescript": "7.22.5",
"@changesets/changelog-github": "0.4.8",
"@changesets/cli": "2.26.1",
"@commitlint/cli": "17.6.5",
"@commitlint/config-conventional": "17.6.5",
"@preconstruct/cli": "2.7.0",
"@types/jest": "29.5.2",
"@types/node": "16.18.36",
"@typescript-eslint/eslint-plugin": "5.59.11",
"@typescript-eslint/parser": "5.59.11",
"babel-jest": "29.5.0",
"eslint": "8.43.0",
"eslint-config-prettier": "8.8.0",
"eslint-formatter-pretty": "5.0.0",
"eslint-import-resolver-typescript": "3.5.5",
"eslint-plugin-babel": "5.3.1",
"eslint-plugin-import": "2.25.4",
"eslint-plugin-jest": "26.1.3",
"eslint-plugin-prettier": "4.0.0",
"husky": "7.0.4",
"jest": "27.5.1",
"lint-staged": "12.3.7",
"prettier": "2.6.2",
"rimraf": "3.0.2",
"typescript": "4.6.3"
"eslint-plugin-import": "2.27.5",
"eslint-plugin-jest": "27.2.1",
"eslint-plugin-prettier": "4.2.1",
"husky": "8.0.3",
"jest": "29.5.0",
"lint-staged": "13.2.2",
"prettier": "2.8.8",
"rimraf": "5.0.1",
"typescript": "5.1.3"
},
"keywords": [
"clear",
Expand Down
5 changes: 3 additions & 2 deletions src/omit-empty.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const omitEmpty = <Output, Input = unknown>(
if (typeOf(value) === 'object') {
const result = {};
// eslint-disable-next-line no-restricted-syntax
// @ts-expect-error
for (const key of Object.keys(value)) {
// @ts-expect-error
const val = omit(value[key]);
Expand All @@ -43,7 +44,7 @@ const omitEmpty = <Output, Input = unknown>(
if (res === void 0) {
res = typeOf(obj) === 'object' ? {} : res;
}
return (res as unknown) as Output;
return res as unknown as Output;
};

function isEmpty<Input = unknown>(value: Input, omitZero: boolean) {
Expand All @@ -66,7 +67,6 @@ function isEmpty<Input = unknown>(value: Input, omitZero: boolean) {
// @ts-expect-error
return value.size === 0;
case 'number':
// @ts-expect-error
return omitZero ? value === 0 : false;
case 'error':
// @ts-expect-error
Expand All @@ -82,6 +82,7 @@ function isEmpty<Input = unknown>(value: Input, omitZero: boolean) {
return true;
case 'object':
// eslint-disable-next-line no-restricted-syntax
// @ts-expect-error
for (const key of Object.keys(value)) {
// @ts-expect-error
if (!isEmpty(value[key], omitZero)) {
Expand Down
Loading

0 comments on commit d45b316

Please sign in to comment.