Skip to content

Commit

Permalink
fix: issue with jest version
Browse files Browse the repository at this point in the history
  • Loading branch information
yknl committed Oct 9, 2020
1 parent 83fa782 commit ccd5f00
Show file tree
Hide file tree
Showing 12 changed files with 61 additions and 819 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
"tape": "^4.11.0",
"tape-promise": "^4.0.0",
"triplesec": "^4.0.3",
"ts-jest": "^24.3.0",
"ts-loader": "^6.2.1",
"ts-node": "^8.10.2",
"typedoc": "^0.15.1",
Expand Down Expand Up @@ -112,7 +113,6 @@
"rollup": "^2.28.2",
"schema-inspector": "^1.7.0",
"sha.js": "^2.4.11",
"ts-jest": "^24.3.0",
"tsdx": "^0.14.0",
"winston": "^3.2.1",
"zone-file": "^1.0.0"
Expand Down
4 changes: 2 additions & 2 deletions packages/auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@
"query-string": "^6.13.1"
},
"devDependencies": {
"@types/jest": "^26.0.0",
"jest": "^26.0.0",
"@types/jest": "^24.9.0",
"jest": "^24.9.0",
"jest-fetch-mock": "^3.0.3",
"ts-jest": "^26.4.1",
"tsdx": "^0.14.0"
Expand Down
23 changes: 23 additions & 0 deletions packages/auth/src/userSession.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import { AuthScope, DEFAULT_PROFILE, NAME_LOOKUP_PATH } from './constants';
import * as queryString from 'query-string';
import { UserData } from './userData';
import { StacksMainnet } from '@stacks/network';
import { protocolEchoReplyDetection } from './protocolEchoDetection';

/**
*
Expand Down Expand Up @@ -169,6 +170,28 @@ export class UserSession {
return '';
}

/**
* Check if there is a authentication request that hasn't been handled.
*
* Also checks for a protocol echo reply (which if detected then the page
* will be automatically redirected after this call).
*
* @return {Boolean} `true` if there is a pending sign in, otherwise `false`
*/
isSignInPending() {
try {
const isProtocolEcho = protocolEchoReplyDetection()
if (isProtocolEcho) {
Logger.info('protocolEchoReply detected from isSignInPending call, the page is about to redirect.')
return true
}
} catch (error) {
Logger.error(`Error checking for protocol echo reply isSignInPending: ${error}`)
}

return !!this.getAuthResponseToken()
}

/**
* Check if a user is currently signed in.
*
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@
"@types/express": "^4.16.1",
"@types/express-winston": "^3.0.1",
"@types/inquirer": "^6.5.0",
"@types/jest": "^26.0.0",
"@types/node-fetch": "^2.5.0",
"@types/ripemd160": "^2.0.0",
"jest": "^26.0.0",
"@types/jest": "^24.9.0",
"jest": "^24.9.0",
"minimist": ">=1.2.3",
"ts-jest": "^26.4.1"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
"cross-fetch": "^3.0.5"
},
"devDependencies": {
"@types/jest": "^26.0.0",
"jest": "^26.0.0",
"@types/jest": "^24.9.0",
"jest": "^24.9.0",
"jest-fetch-mock": "^3.0.3",
"ts-jest": "^26.4.1",
"tsdx": "^0.14.0"
Expand Down
4 changes: 2 additions & 2 deletions packages/encryption/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
"sha.js": "^2.4.11"
},
"devDependencies": {
"@types/jest": "^26.0.0",
"jest": "^26.0.0",
"@types/jest": "^24.9.0",
"jest": "^24.9.0",
"jest-fetch-mock": "^3.0.3",
"ts-jest": "^26.4.1",
"tsdx": "^0.14.0"
Expand Down
4 changes: 2 additions & 2 deletions packages/keychain/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@
"@babel/plugin-proposal-optional-chaining": "^7.9.0",
"@blockstack/prettier-config": "^0.0.6",
"@types/bn.js": "^4.11.6",
"@types/jest": "^26.0.0",
"@types/node": "^13.13.10",
"@types/triplesec": "^3.0.0",
"codecov": "^3.7.2",
"cross-env": "^6.0.3",
"depcheck": "^0.8.3",
"eslint": "^6.3.0",
"eslint-plugin-jest": "^23.8.2",
"jest": "^26.0.0",
"@types/jest": "^24.9.0",
"jest": "^24.9.0",
"jest-fetch-mock": "^2.1.2",
"npm-run-all": "^4.1.5",
"shx": "^0.3.2",
Expand Down
4 changes: 2 additions & 2 deletions packages/network/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
"tsdx": "^0.14.0"
},
"devDependencies": {
"@types/jest": "^26.0.0",
"jest": "^26.0.0",
"@types/jest": "^24.9.0",
"jest": "^24.9.0",
"jest-fetch-mock": "^3.0.3",
"ts-jest": "^26.4.1"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/profile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@
"zone-file": "^1.0.0"
},
"devDependencies": {
"@types/jest": "^26.0.0",
"jest": "^26.0.0",
"@types/jest": "^24.9.0",
"jest": "^24.9.0",
"jest-fetch-mock": "^3.0.3",
"ts-jest": "^26.4.1",
"tsdx": "^0.14.0"
Expand Down
4 changes: 2 additions & 2 deletions packages/storage/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
"codecov": "^3.7.2"
},
"devDependencies": {
"@types/jest": "^26.0.0",
"jest": "^26.0.0",
"@types/jest": "^24.9.0",
"jest": "^24.9.0",
"jest-fetch-mock": "^3.0.3",
"ts-jest": "^26.4.1",
"tsdx": "^0.14.0"
Expand Down
4 changes: 2 additions & 2 deletions packages/transactions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
"devDependencies": {
"@blockstack/eslint-config": "^1.0.5",
"@types/common-tags": "^1.8.0",
"@types/jest": "^26.0.0",
"@types/lodash": "^4.14.160",
"@types/node": "^13.13.15",
"@typescript-eslint/eslint-plugin": "^3.9.1",
Expand All @@ -41,7 +40,8 @@
"core-js": "^3.6.5",
"cross-env": "^5.2.1",
"eslint": "^6.8.0",
"jest": "^26.0.0",
"@types/jest": "^24.9.0",
"jest": "^24.9.0",
"jest-fetch-mock": "^3.0.3",
"npm-run-all": "^4.1.5",
"nyc": "^15.1.0",
Expand Down
Loading

0 comments on commit ccd5f00

Please sign in to comment.