Skip to content

Commit 31c9c9b

Browse files
committed
chore: use regular lodash
1 parent 3f49d41 commit 31c9c9b

File tree

13 files changed

+17
-42
lines changed

13 files changed

+17
-42
lines changed

babel.config.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

jest.config.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,8 @@ module.exports = {
66
'\\.css$': '<rootDir>/__mocks__/styleMock.js'
77
},
88
testMatch: ['<rootDir>/src/**/__tests__/*.(ts|js)?(x)'],
9-
transformIgnorePatterns: ['/node_modules/(?!lodash-es)/'],
109
transform: {
11-
'\\.tsx?$': 'ts-jest',
12-
'^.+\\.js$': 'babel-jest'
10+
'\\.tsx?$': 'ts-jest'
1311
},
1412
coveragePathIgnorePatterns: ['/node_modules/', '/__tests__/', '/__stories__/', '__mocks__/', 'types.ts'],
1513
collectCoverageFrom: ['src/**/*.{ts,tsx}'],

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,11 @@
4848
"@stoplight/tree-list": "file:.yalc/@stoplight/tree-list",
4949
"classnames": "^2.2.6",
5050
"json-schema-merge-allof": "https://github.com/stoplightio/json-schema-merge-allof",
51-
"lodash-es": "^4.17.15",
51+
"lodash": "^4.17.15",
5252
"mobx-react-lite": "^1.4.1",
5353
"pluralize": "^8.0.0"
5454
},
5555
"devDependencies": {
56-
"@babel/plugin-transform-modules-commonjs": "^7.5.0",
5756
"@emotion/core": "^10.0.16",
5857
"@emotion/styled": "^10.0.15",
5958
"@sambego/storybook-state": "^1.3.6",
@@ -66,7 +65,7 @@
6665
"@types/enzyme": "3.10.3",
6766
"@types/jest": "^24.0.18",
6867
"@types/json-schema": "^7.0.3",
69-
"@types/lodash-es": "^4.17.3",
68+
"@types/lodash": "^4.14.149",
7069
"@types/node": "^12.7.2",
7170
"@types/pluralize": "^0.0.29",
7271
"@types/react": "16.9.2",

src/components/shared/Property.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { isLocalRef } from '@stoplight/json';
22
import { JsonPath } from '@stoplight/types';
3-
import { size as _size } from 'lodash-es';
3+
import { size as _size } from 'lodash';
44
import * as React from 'react';
55
import { GoToRefHandler, IArrayNode, IObjectNode, SchemaKind, SchemaNode } from '../../types';
66
import { isArrayNodeWithItems, isCombinerNode, isRefNode } from '../../utils/guards';

src/tree/populateTree.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { isLocalRef } from '@stoplight/json';
22
import { TreeListNode, TreeListParentNode } from '@stoplight/tree-list';
33
import { JsonPath } from '@stoplight/types';
44
import { JSONSchema4 } from 'json-schema';
5-
import { isObject as _isObject } from 'lodash-es';
5+
import { isObject as _isObject } from 'lodash';
66
import { IArrayNode, IObjectNode, SchemaKind, SchemaNode, SchemaTreeListNode } from '../types';
77
import { mergeAllOf } from '../utils';
88
import { getPrimaryType } from '../utils/getPrimaryType';

src/tree/tree.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { isLocalRef, pointerToPath } from '@stoplight/json';
22
import { Tree, TreeListParentNode, TreeState } from '@stoplight/tree-list';
33
import { JsonPath } from '@stoplight/types';
44
import { JSONSchema4 } from 'json-schema';
5-
import { get as _get } from 'lodash-es';
5+
import { get as _get } from 'lodash';
66
import { SchemaNode } from '../types';
77
import { isRefNode } from '../utils/guards';
88
import { getNodeMetadata, metadataStore } from './metadata';

src/utils/getAnnotations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { JSONSchema4 } from 'json-schema';
2-
import { pick as _pick } from 'lodash-es';
2+
import { pick as _pick } from 'lodash';
33
import { JSONSchema4Annotations } from '../types';
44

55
const ANNOTATIONS: JSONSchema4Annotations[] = ['title', 'description', 'default', 'examples'];

src/utils/getMetadata.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { JSONSchema4 } from 'json-schema';
2-
import { pick as _pick } from 'lodash-es';
2+
import { pick as _pick } from 'lodash';
33
import { JSONSchema4Metadata } from '../types';
44

55
const METADATA: JSONSchema4Metadata[] = ['id', '$schema'];

src/utils/getValidations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Dictionary, Optional } from '@stoplight/types';
22
import { JSONSchema4, JSONSchema4TypeName } from 'json-schema';
3-
import { flatMap as _flatMap, pick as _pick } from 'lodash-es';
3+
import { flatMap as _flatMap, pick as _pick } from 'lodash';
44

55
export const COMMON_VALIDATION_TYPES = [
66
'enum', // https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1

src/utils/guards.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { JSONSchema4 } from 'json-schema';
2-
import { isObjectLike as _isObjectLike } from 'lodash-es';
2+
import { isObjectLike as _isObjectLike } from 'lodash';
33
import { IArrayNode, ICombinerNode, IRefNode, SchemaKind, SchemaNode } from '../types';
44

55
export const isArrayNodeWithItems = (

0 commit comments

Comments
 (0)