@ditojs/utils 2.33.0 → 2.34.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ditojs/utils",
3
- "version": "2.33.0",
3
+ "version": "2.34.0",
4
4
  "type": "module",
5
5
  "description": "Dito.js Utility Functions – Dito.js is a declarative and modern web framework, based on Objection.js, Koa.js and Vue.js",
6
6
  "repository": "https://github.com/ditojs/dito/tree/master/packages/utils",
@@ -35,5 +35,5 @@
35
35
  "typescript": "^5.6.2"
36
36
  },
37
37
  "types": "types",
38
- "gitHead": "be8095460cbe9c035d10c994a1e1f89d9d5fbefe"
38
+ "gitHead": "0258ece4af0f7dfbb9c11102bdf9defec72b1f15"
39
39
  }
@@ -8,7 +8,7 @@ const isUrlRegExp = new RegExp(
8
8
  '(\\d{1,3}\\.){3}\\d{1,3}' + // ip
9
9
  '|' +
10
10
  '([0-9a-z_-]+\\.)*' + // sub-domain: www.
11
- '[0-9a-z][0-9a-z_-]{0,61}[0-9a-z]\\.' + // domain-name
11
+ '[0-9a-z](?:[0-9a-z_-]{0,61}[0-9a-z])?\\.' + // domain-name
12
12
  // tld - https://tools.ietf.org/id/draft-liman-tld-names-00.html#rfc.section.2
13
13
  '([a-z]{2,61}|xn--[0-9a-z][0-9a-z-]{0,61}[0-9a-z])' +
14
14
  ')' + // top level domain.
@@ -33,7 +33,8 @@ describe('isUrl()', () => {
33
33
  'http://foo--bar.com',
34
34
  'http://xn--j1aac5a4g.xn--j1amh',
35
35
  'http://xn------eddceddeftq7bvv7c4ke4c.xn--p1ai',
36
- 'test.com?ref=http://test2.com'
36
+ 'test.com?ref=http://test2.com',
37
+ 'x.com'
37
38
  // TODO: Support unicode URLs
38
39
  // 'http://høyfjellet.no',
39
40
  // 'http://кулік.укр',