Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Remove deprecated API #87

Merged
merged 48 commits into from
Feb 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
7461110
chore(deps): bump stripe from 8.4.1 to 8.7.0 in /example
dependabot-preview[bot] Jan 25, 2020
34a0905
chore(deps-dev): bump ts-node from 8.5.4 to 8.6.2 in /example
dependabot-preview[bot] Jan 25, 2020
7aaa9fb
chore(deps): bump @nestjs/core from 6.10.13 to 6.11.1 in /example
dependabot-preview[bot] Jan 25, 2020
b839869
chore(deps-dev): bump @types/node from 13.1.4 to 13.5.0 in /example
dependabot-preview[bot] Jan 25, 2020
14a4c26
chore(deps): bump @nestjs/platform-express in /example
dependabot-preview[bot] Jan 25, 2020
0717cfc
chore(deps-dev): bump @nestjs/core from 6.10.13 to 6.11.1
dependabot-preview[bot] Jan 26, 2020
534cd17
chore(deps-dev): bump typescript from 3.7.4 to 3.7.5
dependabot-preview[bot] Jan 26, 2020
bb877e5
chore(deps-dev): bump @nestjs/testing from 6.10.13 to 6.11.1
dependabot-preview[bot] Jan 26, 2020
cb51bf9
chore(deps-dev): bump stripe from 8.4.1 to 8.7.0
dependabot-preview[bot] Jan 26, 2020
bda96fc
chore(deps-dev): bump @types/node from 13.1.4 to 13.5.0
dependabot-preview[bot] Jan 26, 2020
d55e778
chore(deps-dev): bump ts-jest from 24.2.0 to 24.3.0
dependabot-preview[bot] Jan 26, 2020
941717f
chore(deps-dev): bump codecov from 3.6.1 to 3.6.2
dependabot-preview[bot] Jan 26, 2020
5325ecb
chore(deps-dev): bump @nestjs/common from 6.10.13 to 6.11.1
dependabot-preview[bot] Jan 26, 2020
202215b
chore(deps-dev): bump @types/jest from 24.0.25 to 24.9.1
dependabot-preview[bot] Jan 26, 2020
6efeb44
chore(deps): bump @nestjs/common from 6.10.13 to 6.11.1 in /example
dependabot-preview[bot] Jan 27, 2020
2104835
chore(deps): bump @nestjs/common from 6.11.1 to 6.11.4 in /example
dependabot-preview[bot] Jan 28, 2020
3d0da79
chore(deps-dev): bump rimraf from 3.0.0 to 3.0.1
dependabot-preview[bot] Jan 28, 2020
0229eb8
chore(deps-dev): bump @types/node from 13.5.0 to 13.5.1
dependabot-preview[bot] Jan 28, 2020
84391bd
chore(deps-dev): bump @nestjs/common from 6.11.1 to 6.11.4
dependabot-preview[bot] Jan 28, 2020
43e80b8
chore(deps): bump stripe from 8.7.0 to 8.8.0 in /example
dependabot-preview[bot] Jan 28, 2020
ccc07f5
chore(deps): bump @nestjs/core from 6.11.1 to 6.11.4 in /example
dependabot-preview[bot] Jan 28, 2020
85222b6
chore(deps-dev): bump @nestjs/testing from 6.11.1 to 6.11.4
dependabot-preview[bot] Jan 28, 2020
927749e
chore(deps-dev): bump @types/node from 13.5.0 to 13.5.1 in /example
dependabot-preview[bot] Jan 28, 2020
67aa616
chore(deps): bump @nestjs/platform-express in /example
dependabot-preview[bot] Jan 28, 2020
0879e97
chore(deps-dev): bump stripe from 8.7.0 to 8.8.0
dependabot-preview[bot] Jan 28, 2020
e644158
chore(deps-dev): bump @nestjs/core from 6.11.1 to 6.11.4
dependabot-preview[bot] Jan 28, 2020
077d23b
fix: remove deprecated api
9renpoto Jan 30, 2020
d7a23e0
fix: remove default appInfo settings
9renpoto Jan 30, 2020
8b6c997
chore(deps): [security] bump https-proxy-agent from 2.2.2 to 2.2.4
dependabot-preview[bot] Jan 30, 2020
9e8ebbf
chore(deps-dev): bump jest and ts-jest
dependabot-preview[bot] Jan 30, 2020
e046e99
chore(deps-dev): bump @types/jest from 24.9.1 to 25.1.1
dependabot-preview[bot] Jan 30, 2020
5c94ee2
chore(deps-dev): bump @types/node from 13.5.1 to 13.5.2
dependabot-preview[bot] Jan 30, 2020
7c12836
chore(deps): bump stripe from 8.8.0 to 8.9.0 in /example
dependabot-preview[bot] Jan 30, 2020
e5454f1
chore(deps-dev): bump @types/node from 13.5.1 to 13.5.2 in /example
dependabot-preview[bot] Jan 30, 2020
512f3b5
chore(deps-dev): bump stripe from 8.8.0 to 8.9.0
dependabot-preview[bot] Jan 30, 2020
4ba6524
chore: upgrade peerDependencies
9renpoto Jan 31, 2020
76c2128
chore(deps-dev): bump @types/node from 13.5.2 to 13.5.3 in /example
dependabot-preview[bot] Jan 31, 2020
3b272d4
chore(deps): bump @nestjs/platform-express in /example
dependabot-preview[bot] Jan 31, 2020
a9b21d2
chore(deps-dev): bump codecov from 3.6.2 to 3.6.3
dependabot-preview[bot] Jan 31, 2020
b36d7e1
chore(deps): bump @nestjs/core from 6.11.4 to 6.11.5 in /example
dependabot-preview[bot] Jan 31, 2020
87cb63b
chore(deps): bump stripe from 8.9.0 to 8.12.0 in /example
dependabot-preview[bot] Jan 31, 2020
51ee591
chore(deps-dev): bump @nestjs/core from 6.11.4 to 6.11.5
dependabot-preview[bot] Jan 31, 2020
38af71c
chore(deps): bump @nestjs/common from 6.11.4 to 6.11.5 in /example
dependabot-preview[bot] Jan 31, 2020
624aeba
chore(deps-dev): bump @types/node from 13.5.2 to 13.5.3
dependabot-preview[bot] Jan 31, 2020
3cbb62c
chore(deps-dev): bump stripe from 8.9.0 to 8.12.0
dependabot-preview[bot] Jan 31, 2020
9e05b4f
chore(deps-dev): bump @nestjs/common from 6.11.4 to 6.11.5
dependabot-preview[bot] Jan 31, 2020
8cbcacd
chore(deps-dev): bump @nestjs/testing from 6.11.4 to 6.11.5
dependabot-preview[bot] Jan 31, 2020
686fef1
fix: sort properties
9renpoto Feb 1, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@
"start": "ts-node --transpile-only -r tsconfig-paths/register src/index.ts"
},
"dependencies": {
"@nestjs/common": "6.10.13",
"@nestjs/core": "6.10.13",
"@nestjs/platform-express": "6.10.13",
"@nestjs/common": "6.11.5",
"@nestjs/core": "6.11.5",
"@nestjs/platform-express": "6.11.5",
"reflect-metadata": "0.1.13",
"rxjs": "6.5.4",
"stripe": "8.4.1"
"stripe": "8.12.0"
},
"devDependencies": {
"@types/node": "13.1.4",
"ts-node": "8.5.4",
"@types/node": "13.5.3",
"ts-node": "8.6.2",
"tsconfig-paths": "3.9.0",
"typescript": "3.7.4"
}
Expand Down
104 changes: 51 additions & 53 deletions example/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,39 @@
# yarn lockfile v1


"@nestjs/common@6.10.13":
version "6.10.13"
resolved "https://registry.yarnpkg.com/@nestjs/common/-/common-6.10.13.tgz#7b0adfe65a8b289e1544eb1d68e5bce4ecd6d441"
integrity sha512-x4pQGe30FZd/CcbvOJy130nv9RDSLamBGKqIzRhH6x7lrHEn99wferFGzbW2Ti5pwKoOfwquhh+9Loc/AquozA==
"@nestjs/common@6.11.5":
version "6.11.5"
resolved "https://registry.yarnpkg.com/@nestjs/common/-/common-6.11.5.tgz#02d8b85e1c494ec866fc8cec78a9f7b2d950767e"
integrity sha512-pCM3aK876ubnJS9g/ni44BpzNU3sja+dTw61H3VkYJTq1tBWjhn50fAe5ezTXEZPND4pG8HAO3gjdHFanEXH2g==
dependencies:
axios "0.19.0"
axios "0.19.2"
cli-color "2.0.0"
uuid "3.3.3"
tslib "1.10.0"
uuid "3.4.0"

"@nestjs/core@6.10.13":
version "6.10.13"
resolved "https://registry.yarnpkg.com/@nestjs/core/-/core-6.10.13.tgz#5c31f46201e527fbc44889fa92a42c87fd389e4b"
integrity sha512-NQX4GvIL9sEt3pYpspiBqg3tu+QGN8Nvodr8fp0DYFBhNZWLOoDHr7PfV7dQ9BS4YOfcmBDpBPn6VorQOLSR2A==
"@nestjs/core@6.11.5":
version "6.11.5"
resolved "https://registry.yarnpkg.com/@nestjs/core/-/core-6.11.5.tgz#13747f512175cc6253b774e7471019506b67dc0a"
integrity sha512-UFtMZBFXeNdSH3wdv9czCSZMO47nPcsauANf8xrzYP9m3amEOhhEMR+FIjwuFXZ5RralsLuz+U2LcaChWZjSHg==
dependencies:
"@nuxtjs/opencollective" "0.2.2"
fast-safe-stringify "2.0.7"
iterare "1.2.0"
object-hash "2.0.1"
uuid "3.3.3"
path-to-regexp "3.2.0"
tslib "1.10.0"
uuid "3.4.0"

"@nestjs/platform-express@6.10.13":
version "6.10.13"
resolved "https://registry.yarnpkg.com/@nestjs/platform-express/-/platform-express-6.10.13.tgz#8fb475fe3a906b24fd1376f4e7e5bf433fd8600f"
integrity sha512-eT/BmJOl/No1fJuW5GvoufxPofrmLVtrbyqiR05Dd1u24r4g5j7sU8WbA5jqetqRM5Jxtz+tqCH1Ketp5J2SFA==
"@nestjs/platform-express@6.11.5":
version "6.11.5"
resolved "https://registry.yarnpkg.com/@nestjs/platform-express/-/platform-express-6.11.5.tgz#c8c863ae1aacdc3e77dcd5155d7147a2134ab096"
integrity sha512-kPbUzlo7eN68LesTQ3Y1siJ1BJZo2DUINqdrv92hPv834nTX9P36+Ee4LNGHmO8I4vCdRweudrurxAYntuN+gw==
dependencies:
body-parser "1.19.0"
cors "2.8.5"
express "4.17.1"
multer "1.4.2"
tslib "1.10.0"

"@nuxtjs/[email protected]":
version "0.2.2"
Expand All @@ -46,15 +50,10 @@
resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee"
integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4=

"@types/[email protected]":
version "13.1.4"
resolved "https://registry.yarnpkg.com/@types/node/-/node-13.1.4.tgz#4cfd90175a200ee9b02bd6b1cd19bc349741607e"
integrity sha512-Lue/mlp2egZJoHXZr4LndxDAd7i/7SQYhV0EjWfb/a4/OZ6tuVwMCVPiwkU5nsEipxEf7hmkSU7Em5VQ8P5NGA==

"@types/node@^13.1.0":
version "13.1.8"
resolved "https://registry.yarnpkg.com/@types/node/-/node-13.1.8.tgz#1d590429fe8187a02707720ecf38a6fe46ce294b"
integrity sha512-6XzyyNM9EKQW4HKuzbo/CkOIjn/evtCmsU+MUM1xDfJ+3/rNjBttM1NgN7AOQvN6tP1Sl1D1PIKMreTArnxM9A==
"@types/[email protected]", "@types/node@>=8.1.0":
version "13.5.3"
resolved "https://registry.yarnpkg.com/@types/node/-/node-13.5.3.tgz#37f1f539b7535b9fb4ef77d59db1847a837b7f17"
integrity sha512-ZPnWX9PW992w6DUsz3JIXHaSb5v7qmKCVzC3km6SxcDGxk7zmLfYaCJTbktIa5NeywJkkZDhGldKqDIvC5DRrA==

accepts@~1.3.7:
version "1.3.7"
Expand Down Expand Up @@ -91,13 +90,12 @@ [email protected]:
resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2"
integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=

[email protected].0:
version "0.19.0"
resolved "https://registry.yarnpkg.com/axios/-/axios-0.19.0.tgz#8e09bff3d9122e133f7b8101c8fbdd00ed3d2ab8"
integrity sha512-1uvKqKQta3KBxIz14F2v06AEHZ/dIoeKfbTRkK1E5oqjDnuEerLmYTgJB5AiQZHJcljpg1TuRzdjDR06qNk0DQ==
[email protected].2:
version "0.19.2"
resolved "https://registry.yarnpkg.com/axios/-/axios-0.19.2.tgz#3ea36c5d8818d0d5f8a8a97a6d36b86cdc00cb27"
integrity sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==
dependencies:
follow-redirects "1.5.10"
is-buffer "^2.0.2"

[email protected]:
version "1.19.0"
Expand Down Expand Up @@ -459,11 +457,6 @@ [email protected]:
resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.0.tgz#37df74e430a0e47550fe54a2defe30d8acd95f65"
integrity sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA==

is-buffer@^2.0.2:
version "2.0.3"
resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.3.tgz#4ecf3fcf749cbd1e472689e109ac66261a25e725"
integrity sha512-U15Q7MXTuZlrbymiz95PJpZxu8IlipAp4dtS3wOdgPXx3mqBnslrWU14kxfHB+Py/+2PVKSr37dMAgM2A4uArw==

is-promise@^2.1:
version "2.1.0"
resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa"
Expand Down Expand Up @@ -632,6 +625,11 @@ [email protected]:
resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c"
integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=

[email protected]:
version "3.2.0"
resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-3.2.0.tgz#fa7877ecbc495c601907562222453c43cc204a5f"
integrity sha512-jczvQbCUS7XmS7o+y1aEO9OBVFeZBQ1MDSEqmO7xSoPgOPoowY/SxLpZ6Vh97/8qHZOteiCKb7gkG9gA2ZUxJA==

process-nextick-args@~2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2"
Expand Down Expand Up @@ -784,12 +782,12 @@ strip-bom@^3.0.0:
resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3"
integrity sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=

stripe@8.4.1:
version "8.4.1"
resolved "https://registry.yarnpkg.com/stripe/-/stripe-8.4.1.tgz#34b18d18443e01c58b1a542cfb921c0ddf35089e"
integrity sha512-UQuGkI+Ay/o7zVo+C/kP29HuZA4KZOoh46SdIrlUwz7VHuwJ7FTr9ghyBsNQrlqhY8r4IGEkdZfZep7+JtS2dw==
stripe@8.12.0:
version "8.12.0"
resolved "https://registry.yarnpkg.com/stripe/-/stripe-8.12.0.tgz#59af76668a2be884d6d7c940d99e22fd78fb7147"
integrity sha512-XFjrjSn96AYr/9aU35bKY5zI99opLBpYPjYLJ3m6ArlOAPvJk810+6pOZSPRQw1Sc5lFtJ+/acOhg3oBXKm72Q==
dependencies:
"@types/node" "^13.1.0"
"@types/node" ">=8.1.0"
qs "^6.6.0"

supports-color@^5.3.0:
Expand All @@ -812,16 +810,16 @@ [email protected]:
resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553"
integrity sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==

ts-node@8.5.4:
version "8.5.4"
resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-8.5.4.tgz#a152add11fa19c221d0b48962c210cf467262ab2"
integrity sha512-izbVCRV68EasEPQ8MSIGBNK9dc/4sYJJKYA+IarMQct1RtEot6Xp0bXuClsbUSnKpg50ho+aOAx8en5c+y4OFw==
ts-node@8.6.2:
version "8.6.2"
resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-8.6.2.tgz#7419a01391a818fbafa6f826a33c1a13e9464e35"
integrity sha512-4mZEbofxGqLL2RImpe3zMJukvEvcO1XP8bj8ozBPySdCUXEcU5cIRwR0aM3R+VoZq7iXc8N86NC0FspGRqP4gg==
dependencies:
arg "^4.1.0"
diff "^4.0.1"
make-error "^1.1.1"
source-map-support "^0.5.6"
yn "^3.0.0"
yn "3.1.1"

[email protected]:
version "3.9.0"
Expand All @@ -833,7 +831,7 @@ [email protected]:
minimist "^1.2.0"
strip-bom "^3.0.0"

tslib@^1.9.0:
tslib@1.10.0, tslib@^1.9.0:
version "1.10.0"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a"
integrity sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==
Expand Down Expand Up @@ -876,10 +874,10 @@ [email protected]:
resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713"
integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=

uuid@3.3.3:
version "3.3.3"
resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.3.tgz#4568f0216e78760ee1dbf3a4d2cf53e224112866"
integrity sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ==
uuid@3.4.0:
version "3.4.0"
resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee"
integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==

vary@^1, vary@~1.1.2:
version "1.1.2"
Expand All @@ -891,7 +889,7 @@ xtend@^4.0.0:
resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54"
integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==

yn@^3.0.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.0.tgz#fcbe2db63610361afcc5eb9e0ac91e976d046114"
integrity sha512-kKfnnYkbTfrAdd0xICNFw7Atm8nKpLcLv9AZGEt+kczL/WQVai4e2V6ZN8U/O+iI6WrNuJjNNOyu4zfhl9D3Hg==
yn@3.1.1:
version "3.1.1"
resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50"
integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==
28 changes: 13 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,27 +25,27 @@
"test": "jest"
},
"devDependencies": {
"@nestjs/common": "6.10.13",
"@nestjs/core": "6.10.13",
"@nestjs/testing": "6.10.13",
"@types/jest": "24.0.25",
"@types/node": "13.1.4",
"codecov": "3.6.1",
"jest": "24.9.0",
"@nestjs/common": "6.11.5",
"@nestjs/core": "6.11.5",
"@nestjs/testing": "6.11.5",
"@types/jest": "25.1.1",
"@types/node": "13.5.3",
"codecov": "3.6.3",
"jest": "25.1.0",
"prettier": "1.19.1",
"reflect-metadata": "0.1.13",
"rimraf": "3.0.0",
"rimraf": "3.0.1",
"rxjs": "6.5.4",
"stripe": "8.4.1",
"ts-jest": "24.2.0",
"typescript": "3.7.4"
"stripe": "8.12.0",
"ts-jest": "25.1.0",
"typescript": "3.7.5"
},
"peerDependencies": {
"@nestjs/common": "^6.7.2",
"@nestjs/core": "^6.7.2",
"reflect-metadata": "^0.1.12",
"rxjs": "^6.0.0",
"stripe": "^7.9.1"
"stripe": "^8.0.0"
},
"keywords": [
"nestjs",
Expand All @@ -66,7 +66,5 @@
"coverageDirectory": "../coverage",
"testEnvironment": "node"
},
"dependencies": {
"https-proxy-agent": "4.0.0"
}
"dependencies": {}
}
20 changes: 16 additions & 4 deletions src/util/getStripeClient.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,22 @@ import { getStripeClient } from './getStripeClient';
describe('getStripeClient', () => {
const apiKey = 'test';

describe('when `apiKey` is provided', () => {
it('should return the stripe client', () => {
const stripeClient = getStripeClient({ apiKey });
expect(stripeClient).toBeInstanceOf(Stripe);
it('should return the stripe client', () => {
const stripeClient = getStripeClient({ apiKey });
expect(stripeClient).toBeInstanceOf(Stripe);
});

it('should return the stripe client with customize', () => {
const stripeClient = getStripeClient({
apiKey,
appInfo: {
name: 'name',
url: 'url',
version: 'version',
},
telemetry: false,
timeout: 10000,
});
expect(stripeClient).toBeInstanceOf(Stripe);
});
});
8 changes: 0 additions & 8 deletions src/util/getStripeClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import Stripe from 'stripe';

import { StripeOptions } from './../interfaces';

const packageJson = require('./../../package.json');

export function getStripeClient({
apiKey,
apiVersion = '2019-12-03',
Expand All @@ -16,11 +14,5 @@ export function getStripeClient({
...options,
});

stripeClient.setAppInfo({
name: packageJson.name,
url: packageJson.repository,
version: packageJson.version,
});

return stripeClient;
}
Loading