did-resolver
Advanced tools
Comparing version 3.1.2 to 3.1.3
@@ -0,1 +1,8 @@ | ||
## [3.1.3](https://github.com/decentralized-identity/did-resolver/compare/3.1.2...3.1.3) (2021-10-26) | ||
### Bug Fixes | ||
* update regex to match DID specification ([#105](https://github.com/decentralized-identity/did-resolver/issues/105)) ([4f71bc5](https://github.com/decentralized-identity/did-resolver/commit/4f71bc5fa3806d97bfd6f0494b4aaa88d0ef39db)), closes [#104](https://github.com/decentralized-identity/did-resolver/issues/104) | ||
## [3.1.2](https://github.com/decentralized-identity/did-resolver/compare/3.1.1...3.1.2) (2021-09-29) | ||
@@ -2,0 +9,0 @@ |
@@ -52,5 +52,6 @@ // Copyright 2018 Consensys AG | ||
} | ||
const ID_CHAR = '[a-zA-Z0-9_.%-]'; | ||
const METHOD = '([a-zA-Z0-9_]+)'; | ||
const METHOD_ID = `(${ID_CHAR}+(:${ID_CHAR}+)*)`; | ||
const PCT_ENCODED = '(?:%[0-9a-fA-F]{2})'; | ||
const ID_CHAR = `(?:[a-zA-Z0-9._-]|${PCT_ENCODED})`; | ||
const METHOD = '([a-z0-9]+)'; | ||
const METHOD_ID = `((?:${ID_CHAR}*:)*(${ID_CHAR}+))`; | ||
const PARAM_CHAR = '[a-zA-Z0-9_.:%-]'; | ||
@@ -57,0 +58,0 @@ const PARAM = `;${PARAM_CHAR}+=${PARAM_CHAR}*`; |
@@ -40,5 +40,6 @@ function _extends() { | ||
} | ||
const ID_CHAR = '[a-zA-Z0-9_.%-]'; | ||
const METHOD = '([a-zA-Z0-9_]+)'; | ||
const METHOD_ID = `(${ID_CHAR}+(:${ID_CHAR}+)*)`; | ||
const PCT_ENCODED = '(?:%[0-9a-fA-F]{2})'; | ||
const ID_CHAR = `(?:[a-zA-Z0-9._-]|${PCT_ENCODED})`; | ||
const METHOD = '([a-z0-9]+)'; | ||
const METHOD_ID = `((?:${ID_CHAR}*:)*(${ID_CHAR}+))`; | ||
const PARAM_CHAR = '[a-zA-Z0-9_.:%-]'; | ||
@@ -45,0 +46,0 @@ const PARAM = `;${PARAM_CHAR}+=${PARAM_CHAR}*`; |
@@ -52,5 +52,6 @@ // Copyright 2018 Consensys AG | ||
} | ||
const ID_CHAR = '[a-zA-Z0-9_.%-]'; | ||
const METHOD = '([a-zA-Z0-9_]+)'; | ||
const METHOD_ID = `(${ID_CHAR}+(:${ID_CHAR}+)*)`; | ||
const PCT_ENCODED = '(?:%[0-9a-fA-F]{2})'; | ||
const ID_CHAR = `(?:[a-zA-Z0-9._-]|${PCT_ENCODED})`; | ||
const METHOD = '([a-z0-9]+)'; | ||
const METHOD_ID = `((?:${ID_CHAR}*:)*(${ID_CHAR}+))`; | ||
const PARAM_CHAR = '[a-zA-Z0-9_.:%-]'; | ||
@@ -57,0 +58,0 @@ const PARAM = `;${PARAM_CHAR}+=${PARAM_CHAR}*`; |
@@ -57,5 +57,6 @@ (function (global, factory) { | ||
} | ||
const ID_CHAR = '[a-zA-Z0-9_.%-]'; | ||
const METHOD = '([a-zA-Z0-9_]+)'; | ||
const METHOD_ID = `(${ID_CHAR}+(:${ID_CHAR}+)*)`; | ||
const PCT_ENCODED = '(?:%[0-9a-fA-F]{2})'; | ||
const ID_CHAR = `(?:[a-zA-Z0-9._-]|${PCT_ENCODED})`; | ||
const METHOD = '([a-z0-9]+)'; | ||
const METHOD_ID = `((?:${ID_CHAR}*:)*(${ID_CHAR}+))`; | ||
const PARAM_CHAR = '[a-zA-Z0-9_.:%-]'; | ||
@@ -62,0 +63,0 @@ const PARAM = `;${PARAM_CHAR}+=${PARAM_CHAR}*`; |
{ | ||
"name": "did-resolver", | ||
"version": "3.1.2", | ||
"version": "3.1.3", | ||
"description": "Resolve DID documents", | ||
@@ -70,4 +70,4 @@ "source": "src/resolver.ts", | ||
"resolutions": { | ||
"@babel/core": "7.15.5" | ||
"@babel/core": "7.15.8" | ||
} | ||
} |
@@ -88,3 +88,2 @@ // Copyright 2018 ConsenSys AG | ||
}) | ||
expect(parse('did:web:example.com%3A8443')).toEqual({ | ||
@@ -96,3 +95,2 @@ method: 'web', | ||
}) | ||
expect(parse('did:web:example.com:path:some%2Bsubpath')).toEqual({ | ||
@@ -104,3 +102,2 @@ method: 'web', | ||
}) | ||
expect( | ||
@@ -121,2 +118,14 @@ parse('did:example:test:21tDAKCERh95uGgKbJNHYp;service=agent;foo:bar=high/some/path?foo=bar#key1') | ||
}) | ||
expect(parse('did:123:test::test2')).toEqual({ | ||
method: '123', | ||
id: 'test::test2', | ||
didUrl: 'did:123:test::test2', | ||
did: 'did:123:test::test2', | ||
}) | ||
expect(parse('did:method:%12%AF')).toEqual({ | ||
method: 'method', | ||
id: '%12%AF', | ||
didUrl: 'did:method:%12%AF', | ||
did: 'did:method:%12%AF', | ||
}) | ||
}) | ||
@@ -131,2 +140,6 @@ | ||
expect(parse('2nQtiQG6Cgm1GYTBaaKAgr76uY7iSexUkqX')).toEqual(null) | ||
expect(parse('did:method:%12%1')).toEqual(null) | ||
expect(parse('did:method:%1233%Ay')).toEqual(null) | ||
expect(parse('did:CAP:id')).toEqual(null) | ||
expect(parse('did:method:id::anotherid%r9')).toEqual(null) | ||
}) | ||
@@ -133,0 +146,0 @@ }) |
@@ -157,5 +157,6 @@ // Copyright 2018 Consensys AG | ||
const ID_CHAR = '[a-zA-Z0-9_.%-]' | ||
const METHOD = '([a-zA-Z0-9_]+)' | ||
const METHOD_ID = `(${ID_CHAR}+(:${ID_CHAR}+)*)` | ||
const PCT_ENCODED = '(?:%[0-9a-fA-F]{2})' | ||
const ID_CHAR = `(?:[a-zA-Z0-9._-]|${PCT_ENCODED})` | ||
const METHOD = '([a-z0-9]+)' | ||
const METHOD_ID = `((?:${ID_CHAR}*:)*(${ID_CHAR}+))` | ||
const PARAM_CHAR = '[a-zA-Z0-9_.:%-]' | ||
@@ -162,0 +163,0 @@ const PARAM = `;${PARAM_CHAR}+=${PARAM_CHAR}*` |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
121414
1379