Skip to content

Commit 7dea5cb

Browse files
committed
chore: update lodash-es
1 parent 62766d3 commit 7dea5cb

32 files changed

+151
-158
lines changed

package-lock.json

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

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "swagger-typescript-api-es",
3-
"version": "0.0.6",
3+
"version": "0.0.7",
44
"license": "MIT",
55
"type": "module",
66
"main": "./dist/index.mjs",
@@ -38,15 +38,14 @@
3838
"devDependencies": {
3939
"@hunghg255/eslint-config-ts": "^0.0.8",
4040
"@types/js-yaml": "^4.0.9",
41-
"@types/lodash": "^4.14.202",
41+
"@types/lodash-es": "^4.17.12",
4242
"@types/node": "^18.19.3",
4343
"@types/prettier": "^3.0.0",
4444
"@types/swagger-schema-official": "^2.0.25",
4545
"@types/swagger2openapi": "^7.0.4",
4646
"bumpp": "^9.2.1",
4747
"esno": "^0.16.3",
4848
"git-scm-hooks": "^0.0.7",
49-
"lodash": "^4.17.21",
5049
"tslib": "^2.6.2",
5150
"unbuild": "^2.0.0",
5251
"verify-commit-msg": "^0.0.10",
@@ -69,6 +68,7 @@
6968
"cosmiconfig": "^9.0.0",
7069
"eta": "^2.2.0",
7170
"js-yaml": "^4.1.0",
71+
"lodash-es": "^4.17.21",
7272
"make-dir": "^4.0.0",
7373
"nanoid": "^5.0.6",
7474
"node-emoji": "^2.1.3",

play/api-axios-config.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ export interface ApiConfig<SecurityDataType = unknown>
8989
) => Promise<AxiosRequestConfig | void> | AxiosRequestConfig | void;
9090
secure?: boolean;
9191
format?: ResponseType;
92+
93+
instance?: AxiosInstance;
94+
injectHeaders?: (data: any) => any;
9295
}
9396

9497
export enum ContentType {
@@ -98,11 +101,6 @@ export enum ContentType {
98101
Text = 'text/plain',
99102
}
100103

101-
interface IHttpClient {
102-
instance?: AxiosInstance;
103-
injectHeaders: (data: any) => any;
104-
}
105-
106104
export class HttpClient<SecurityDataType = unknown> {
107105
public instance: AxiosInstance;
108106
private securityData: SecurityDataType | null = null;
@@ -118,7 +116,7 @@ export class HttpClient<SecurityDataType = unknown> {
118116
instance,
119117
injectHeaders,
120118
...axiosConfig
121-
}: ApiConfig<SecurityDataType | IHttpClient> = {}) {
119+
}: ApiConfig<SecurityDataType> = {}) {
122120
this.instance =
123121
instance ?? axios.create({ ...axiosConfig, baseURL: axiosConfig.baseURL || '' });
124122
this.secure = secure;

src/code-formatter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* eslint-disable indent */
2-
import reduceRight from 'lodash/reduceRight';
2+
import { reduceRight } from 'lodash-es';
33
import prettier from 'prettier';
44
import ts from 'typescript';
55

src/code-gen-process.ts

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,7 @@
22
/* eslint-disable unicorn/consistent-destructuring */
33
/* eslint-disable new-cap */
44
/* eslint-disable unicorn/no-null */
5-
import camelCase from 'lodash/camelCase';
6-
import compact from 'lodash/compact';
7-
import each from 'lodash/each';
8-
import get from 'lodash/get';
9-
import isEmpty from 'lodash/isEmpty';
10-
import isObject from 'lodash/isObject';
11-
import isString from 'lodash/isString';
12-
import isUndefined from 'lodash/isUndefined';
13-
import join from 'lodash/join';
14-
import lowerCase from 'lodash/lowerCase';
15-
import map from 'lodash/map';
16-
import merge from 'lodash/merge';
17-
import noop from 'lodash/noop';
18-
import replace from 'lodash/replace';
19-
import size from 'lodash/size';
20-
import sortBy from 'lodash/sortBy';
21-
import uniq from 'lodash/uniq';
22-
import upperCase from 'lodash/upperCase';
23-
import values from 'lodash/values';
5+
import { camelCase, compact, each, get, isEmpty, isObject, isString, isUndefined, join, lowerCase, map, merge, noop, replace, size, sortBy, uniq, upperCase, values } from 'lodash-es';
246
import ts from 'typescript';
257

268
import { CodeFormatter } from './code-formatter';

src/configuration.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@
66
import path from 'node:path';
77

88
import { cosmiconfigSync } from 'cosmiconfig';
9-
import cloneDeep from 'lodash/cloneDeep';
10-
import compact from 'lodash/compact';
11-
import join from 'lodash/join';
12-
import map from 'lodash/map';
13-
import merge from 'lodash/merge';
14-
import uniq from 'lodash/uniq';
9+
import {
10+
cloneDeep,
11+
compact,
12+
join,
13+
map,
14+
merge,
15+
uniq
16+
} from 'lodash-es';
1517
import ts from 'typescript';
1618

1719
import { ComponentTypeNameResolver } from './component-type-name-resolver';

src/schema-components-map.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/* eslint-disable unicorn/no-null */
22

3-
import filter from 'lodash/filter';
4-
import startsWith from 'lodash/startsWith';
3+
import { filter, startsWith } from 'lodash-es';
54

65
class SchemaComponentsMap {
76
/** @type {SchemaComponent[]} */

src/schema-parser/base-schema-parsers/array.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import isArray from 'lodash/isArray';
2-
import isObject from 'lodash/isObject';
1+
import { isArray, isObject } from 'lodash-es';
32

43
import { SCHEMA_TYPES } from '../../constants';
54
import { MonoSchemaParser } from '../mono-schema-parser';

src/schema-parser/base-schema-parsers/complex.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
import clone from 'lodash/clone';
2-
import compact from 'lodash/compact';
3-
import isObject from 'lodash/isObject';
4-
import keys from 'lodash/keys';
5-
import map from 'lodash/map';
6-
import omit from 'lodash/omit';
1+
import {
2+
clone,
3+
compact,
4+
isObject,
5+
keys,
6+
map,
7+
omit
8+
} from 'lodash-es';
79

810
import { SCHEMA_TYPES } from '../../constants';
911
import { MonoSchemaParser } from '../mono-schema-parser';

src/schema-parser/base-schema-parsers/discriminator.ts

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
/* eslint-disable @typescript-eslint/no-unused-vars */
22
/* eslint-disable unused-imports/no-unused-vars */
33
/* eslint-disable indent */
4-
import clone from 'lodash/clone';
5-
import cloneDeep from 'lodash/cloneDeep';
6-
import entries from 'lodash/entries';
7-
import get from 'lodash/get';
8-
import isArray from 'lodash/isArray';
9-
import isObject from 'lodash/isObject';
10-
import keys from 'lodash/keys';
11-
import omit from 'lodash/omit';
12-
import reduce from 'lodash/reduce';
4+
import {
5+
clone,
6+
cloneDeep,
7+
entries,
8+
get,
9+
isArray,
10+
isObject,
11+
keys,
12+
omit,
13+
reduce,
14+
} from 'lodash-es';
1315

1416
import { SCHEMA_TYPES } from '../../constants';
1517
import { MonoSchemaParser } from '../mono-schema-parser';

0 commit comments

Comments
 (0)