Skip to content
This repository has been archived by the owner on Oct 6, 2023. It is now read-only.

Commit

Permalink
refactor: use lodash-es over lodash (#242)
Browse files Browse the repository at this point in the history
  • Loading branch information
kanadgupta authored Sep 21, 2023
1 parent 5844f76 commit a10197a
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 8 deletions.
3 changes: 1 addition & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

"unicorn/prefer-node-protocol": "error",

"you-dont-need-lodash-underscore/get": "off",
"you-dont-need-lodash-underscore/set": "off"
"you-dont-need-lodash-underscore/get": "off"
}
}
32 changes: 30 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"dependencies": {
"@readme/data-urls": "^3.0.0",
"@readme/oas-extensions": "^20.0.0",
"lodash": "^4.17.21",
"lodash-es": "^4.17.21",
"oas": "^21.1.1",
"qs": "^6.11.2",
"remove-undefined-objects": "^4.0.1"
Expand All @@ -58,7 +58,7 @@
"@readme/eslint-config": "^12.2.1",
"@readme/oas-examples": "^5.12.0",
"@types/har-format": "^1.2.12",
"@types/lodash": "^4.14.198",
"@types/lodash-es": "^4.17.9",
"@types/qs": "^6.9.8",
"@vitest/coverage-v8": "^0.34.4",
"eslint": "^8.49.0",
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import type {

import { parse as parseDataUrl } from '@readme/data-urls';
import { getExtension, PROXY_ENABLED, HEADERS } from '@readme/oas-extensions';
import { get as lodashGet, set as lodashSet } from 'lodash'; // eslint-disable-line no-restricted-imports
import { get as lodashGet, set as lodashSet } from 'lodash-es';
import { Operation, utils } from 'oas';
import { isRef } from 'oas/rmoas.types';
import removeUndefinedObjects from 'remove-undefined-objects';
Expand Down
2 changes: 1 addition & 1 deletion src/lib/utils.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { JSONSchema, SchemaObject } from 'oas/rmoas.types';

import { get as lodashGet } from 'lodash'; // eslint-disable-line no-restricted-imports
import { get as lodashGet } from 'lodash-es';

/**
* Determine if a schema `type` is, or contains, a specific discriminator.
Expand Down

0 comments on commit a10197a

Please sign in to comment.