Skip to content

Commit

Permalink
Merge pull request #32 from superfaceai/types-deps
Browse files Browse the repository at this point in the history
fix(types): Add optional dependencies on @types/passport, @types/passport-oauth2
  • Loading branch information
jnv authored Jan 5, 2023
2 parents 35f9f23 + ca3f1e6 commit dd0ebc6
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased
### Fixed
- TypeScript support: Added optional dependencies on `@types/passport-oauth2` and `@types/passport` for correct typing. ([#25](https://github.com/superfaceai/passport-twitter-oauth2/issues/25))

## 1.2.2 - 2022-12-23
### Fixed
Expand Down
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,9 @@
},
"dependencies": {
"passport-oauth2": "^1.6.1"
},
"optionalDependencies": {
"@types/passport": "1.x",
"@types/passport-oauth2": ">=1.4"
}
}
4 changes: 2 additions & 2 deletions src/models/profile.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import * as passport from 'passport';
import type { Profile as PassportProfile } from 'passport';

/**
* @public
*/
export interface Profile extends passport.Profile {
export interface Profile extends PassportProfile {
username: string;
profileUrl: string;
}
Expand Down
4 changes: 2 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@
dependencies:
"@types/node" "*"

"@types/passport-oauth2@^1.4.11":
"@types/passport-oauth2@>=1.4":
version "1.4.11"
resolved "https://registry.yarnpkg.com/@types/passport-oauth2/-/passport-oauth2-1.4.11.tgz#fbca527ecb44258774d17bcb251630c321515fa9"
integrity sha512-KUNwmGhe/3xPbjkzkPwwcPmyFwfyiSgtV1qOrPBLaU4i4q9GSCdAOyCbkFG0gUxAyEmYwqo9OAF/rjPjJ6ImdA==
Expand All @@ -242,7 +242,7 @@
"@types/oauth" "*"
"@types/passport" "*"

"@types/passport@*", "@types/passport@^1.0.11":
"@types/passport@*", "@types/passport@1.x":
version "1.0.11"
resolved "https://registry.yarnpkg.com/@types/passport/-/passport-1.0.11.tgz#d046b41e28b280f4e7994614fb976e9b449cb7c6"
integrity sha512-pz1cx9ptZvozyGKKKIPLcVDVHwae4hrH5d6g5J+DkMRRjR3cVETb4jMabhXAUbg3Ov7T22nFHEgaK2jj+5CBpw==
Expand Down

0 comments on commit dd0ebc6

Please sign in to comment.