Skip to content

Commit

Permalink
fix: removed qs import to reduce dependent libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
soartec-lab committed Jun 4, 2024
1 parent 47bfd13 commit 805fbde
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions packages/fetch/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,6 @@ import {
isObject,
} from '@orval/core';

const PARAMS_SERIALIZER_DEPENDENCIES: GeneratorDependency[] = [
{
exports: [
{
name: 'qs',
default: true,
values: true,
syntheticDefaultImport: true,
},
],
dependency: 'qs',
},
];

export const getDependencies: ClientDependenciesBuilder = (
hasParamsSerializerOptions: boolean,
) => [...(hasParamsSerializerOptions ? PARAMS_SERIALIZER_DEPENDENCIES : [])];

const generateRequestFunction = (
{
queryParams,
Expand Down Expand Up @@ -154,7 +136,7 @@ export const generateClient: ClientBuilder = (verbOptions, options) => {

const fetchClientBuilder: ClientGeneratorsBuilder = {
client: generateClient,
dependencies: getDependencies,
dependencies: () => [],
};

export const builder = () => () => fetchClientBuilder;
Expand Down

0 comments on commit 805fbde

Please sign in to comment.