Skip to content
New issue

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

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

Already on GitHub? # to your account

fix(update dependencies): Update dependencies and adjust code and settings #252

Merged
merged 3 commits into from
Jan 29, 2021

Conversation

Retro64
Copy link
Collaborator

@Retro64 Retro64 commented Jan 29, 2021

close #251

@Retro64 Retro64 requested review from ISO50 and bzums January 29, 2021 07:59
src/utils.ts Outdated
@@ -111,7 +111,7 @@ const extractAccessToken = (authHeader: string): string | undefined => {
const setTokeninfo = (req: Request): (data: Token) => void => {
return (data: Token) => {

const tokeninfo = { ...data };
const tokeninfo = { ...data, ...{access_token: undefined} };
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: TS 4.x.x enforces the property to be deleted needs to be an optional - I guess this is less invasive than making the property optional in the type

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const tokeninfo = { ...data, access_token: undefined };

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const tokeninfo = { ...data, ...{access_token: undefined} };
const tokeninfo = {
...data,
access_token: undefined
};

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same idea, oneline or multiline doesn't matter for me, but destructuring shouldn't be needed.

@Retro64
Copy link
Collaborator Author

Retro64 commented Jan 29, 2021

👍

"@types/mocha": "8.2.0",
"@types/node-fetch": "2.5.8",
"@types/sinon-chai": "3.2.5",
"@types/sinonjs__fake-timers": "6.0.2",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What the difference to "@sinonjs/fake-timers": "7.0.2",?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just learned this when having a look at koa...this is the way you name @types packages which are already scoped (@sinonjs in this case - yeah, that is not nice...)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are the types - sinon is currently implementing types on their own, but are not completely done yet - see https://github.com/sinonjs/fake-timers#help-us-get-our-typescript-definitions-production-ready

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Therefore also the distinct commit

@Retro64
Copy link
Collaborator Author

Retro64 commented Jan 29, 2021

👍

1 similar comment
@ISO50
Copy link
Collaborator

ISO50 commented Jan 29, 2021

👍

@ISO50 ISO50 merged commit 06fc752 into master Jan 29, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update dependencies
3 participants