chore: release 1.2.3

This commit is contained in:
Yarmo Mackenbach 2023-10-03 13:47:26 +02:00
parent c5d6c2c9d9
commit 34688bb644
No known key found for this signature in database
GPG key ID: 3C57D093219103A3
9 changed files with 14 additions and 9 deletions

View file

@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased] ## [Unreleased]
## [1.2.3] - 2023-10-03
### Fixed
- Claim ambiguity logic
## [1.2.2] - 2023-10-03 ## [1.2.2] - 2023-10-03
### Fixed ### Fixed
- Service provider information for Lichess and Keybase - Service provider information for Lichess and Keybase

5
dist/doip.core.js vendored
View file

@ -5581,12 +5581,13 @@ var doip = (function (exports, openpgp$1, fetcher) {
* @returns {boolean} * @returns {boolean}
*/ */
isAmbiguous () { isAmbiguous () {
if (this._status === ClaimStatus.INIT) { if (this._status < ClaimStatus.MATCHED) {
throw new Error('The claim has not been matched yet') throw new Error('The claim has not been matched yet')
} }
if (this._matches.length === 0) { if (this._matches.length === 0) {
throw new Error('The claim has no matches') throw new Error('The claim has no matches')
} }
if (this._status >= 200 && this._status < 300) return false
return this._matches.length > 1 || this._matches[0].claim.uriIsAmbiguous return this._matches.length > 1 || this._matches[0].claim.uriIsAmbiguous
} }
@ -5602,7 +5603,7 @@ var doip = (function (exports, openpgp$1, fetcher) {
let displayServiceProviderName = null; let displayServiceProviderName = null;
let displayServiceProviderId = null; let displayServiceProviderId = null;
if (!this.isAmbiguous() || (this._status >= 200 && this._status < 300)) { if (this._status >= ClaimStatus.MATCHED && this._matches.length > 0 && !this.isAmbiguous()) {
displayName = this._matches[0].profile.display; displayName = this._matches[0].profile.display;
displayUrl = this._matches[0].profile.uri; displayUrl = this._matches[0].profile.uri;
displayServiceProviderName = this._matches[0].about.name; displayServiceProviderName = this._matches[0].about.name;

File diff suppressed because one or more lines are too long

View file

@ -2728,7 +2728,7 @@ var doipFetchers = (function (exports) {
* doip.js library version * doip.js library version
* @constant {string} * @constant {string}
*/ */
const version = '1.2.2'; const version = '1.2.3';
/* /*
Copyright 2022 Yarmo Mackenbach Copyright 2022 Yarmo Mackenbach

File diff suppressed because one or more lines are too long

View file

@ -2698,7 +2698,7 @@ var doipFetchers = (function (exports) {
* doip.js library version * doip.js library version
* @constant {string} * @constant {string}
*/ */
const version = '1.2.2'; const version = '1.2.3';
/* /*
Copyright 2022 Yarmo Mackenbach Copyright 2022 Yarmo Mackenbach

File diff suppressed because one or more lines are too long

View file

@ -1,6 +1,6 @@
{ {
"name": "doipjs", "name": "doipjs",
"version": "1.2.2", "version": "1.2.3",
"description": "Decentralized Online Identity Proofs library in Node.js", "description": "Decentralized Online Identity Proofs library in Node.js",
"type": "module", "type": "module",
"main": "./src/index.js", "main": "./src/index.js",

View file

@ -22,4 +22,4 @@ limitations under the License.
* doip.js library version * doip.js library version
* @constant {string} * @constant {string}
*/ */
export const version = '1.2.2' export const version = '1.2.3'