Skip to content

Commit

Permalink
feat: Use @seamapi/url-search-params-serializer
Browse files Browse the repository at this point in the history
  • Loading branch information
razor-x committed Jan 10, 2024
1 parent 2d13758 commit 75c4bed
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 153 deletions.
11 changes: 11 additions & 0 deletions package-lock.json

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

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@
"devDependencies": {
"@seamapi/fake-seam-connect": "^1.44.2",
"@seamapi/types": "^1.58.0",
"@seamapi/url-search-params-serializer": "^1.1.0",
"@types/eslint": "^8.44.2",
"@types/node": "^20.8.10",
"ava": "^5.0.1",
Expand Down
1 change: 1 addition & 0 deletions src/connect.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export * from './lib/seam/connect/index.js'
export * from '@seamapi/url-search-params-serializer'
106 changes: 0 additions & 106 deletions src/lib/params-serializer.test.ts

This file was deleted.

44 changes: 0 additions & 44 deletions src/lib/params-serializer.ts

This file was deleted.

4 changes: 2 additions & 2 deletions src/lib/seam/connect/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import axios, { type AxiosInstance, type AxiosRequestConfig } from 'axios'
import axiosBetterStacktrace from 'axios-better-stacktrace'
import axiosRetry, { type AxiosRetry, exponentialDelay } from 'axios-retry'

import { paramsSerializer } from 'lib/params-serializer.js'
import { serializeUrlSearchParams } from '@seamapi/url-search-params-serializer'

import { errorInterceptor } from './error-interceptor.js'

Expand All @@ -17,7 +17,7 @@ type AxiosRetryConfig = Parameters<AxiosRetry>[1]

export const createClient = (options: ClientOptions): AxiosInstance => {
const client = axios.create({
paramsSerializer,
paramsSerializer: serializeUrlSearchParams,
...options.axiosOptions,
})

Expand Down
1 change: 0 additions & 1 deletion src/lib/seam/connect/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,3 @@ export {
isPersonalAccessToken,
isPublishableKey,
} from './token.js'
export * from 'lib/params-serializer.js'

0 comments on commit 75c4bed

Please sign in to comment.