-
Notifications
You must be signed in to change notification settings - Fork 0
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
chore(deps): update deps to latest, drop old beachball and eslint deps, add new eslint config file #73
Conversation
CHANGELOG.json
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the data in this file need to be persisted in a different format?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no the last published version already used the contents of this file, which is put into CHANGELOG.md
. this is only a cache for beachball
webauthnDevices: expect.any(Array<WebAuthnDevices>), | ||
webauthnTypes: expect.any(Array<WebAuthnType>), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The other matchers here seem to be using constructors of primitive JS types.
What's the expected behavior of an expect.any(Array<FooType>)
match?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it matches against an array of objects whose shape (keys and key value types) conform to FooType
src/utils/apiConfiguration.ts
Outdated
@@ -13,7 +13,7 @@ export function apiConfiguration(config?: ConfigurationParameters): Configuratio | |||
fetchApi: fetch as unknown as ConfigurationParameters['fetchApi'], | |||
headers: { | |||
...config?.headers, | |||
'Authorization': `Bearer ${config?.accessToken}`, | |||
'Authorization': `Bearer ${config?.accessToken as string}`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the case of an undefined config need to be handled?
& a separate question, but why are accessToken
and headers.Authorization
both needed in this object?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
apiConfiguration
is only ever called internally when constructing codegen options
apiConfiguration: apiConfiguration({ |
and we take in our own values in PassageFlexConfig
to populate this function's parameters
export type PassageFlexConfig = { |
where we always throw on undefined for the api key before this function is called
passage-flex-node/src/classes/PassageFlex/PassageFlex.ts
Lines 23 to 24 in 7dae6eb
if (!config.apiKey) { | |
throw Error('A Passage API key is required. Please include {appId: YOUR_APP_ID, apiKey: YOUR_APP_ID}.'); |
so the value should never be undefined at this point. i changed the parameter to be required in 9b6211c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are accessToken and headers.Authorization both needed in this object?
good point, i've removed the header in de63778
6c99916
to
9b6211c
Compare
…files to appease linter issue where test file wasnt part of project service discovery
9b6211c
to
d64fa3c
Compare
d64fa3c
to
82e1b55
Compare
What's New?
Screenshots (if appropriate):
Type of change
Checklist:
Additional context