@scaleway/regex 5.4.0 → 5.5.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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Change Log
2
2
 
3
+ ## 5.5.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#2736](https://github.com/scaleway/scaleway-lib/pull/2736) [`9019322`](https://github.com/scaleway/scaleway-lib/commit/90193222e74c116016d52ef50d9c278d3bae522f) Thanks [@JulienSaguez](https://github.com/JulienSaguez)! - feat(regex): add regex organizationAlias and uuid
8
+
3
9
  ## 5.4.0
4
10
 
5
11
  ### Minor Changes
package/dist/index.d.ts CHANGED
@@ -20,6 +20,7 @@ export declare const alphanumDots: RegExp;
20
20
  export declare const alphanumLowercase: RegExp;
21
21
  export declare const absoluteLinuxPath: RegExp;
22
22
  export declare const ascii: RegExp;
23
+ export declare const organizationAlias: RegExp;
23
24
  export declare const backupKey: RegExp;
24
25
  export declare const basicDomain: RegExp;
25
26
  export declare const uppercaseBasicDomain: RegExp;
@@ -38,6 +39,7 @@ export declare const elevenDigitsCode: RegExp;
38
39
  export declare const url: RegExp;
39
40
  export declare const hexadecimal: RegExp;
40
41
  export declare const s3BucketName: RegExp;
42
+ export declare const uuid: RegExp;
41
43
  export declare const ip: RegExp;
42
44
  export declare const ipv4: RegExp;
43
45
  export declare const ipv6: RegExp;
package/dist/index.js CHANGED
@@ -20,6 +20,7 @@ const alphanumDots = /^[a-zA-Z0-9.]*$/;
20
20
  const alphanumLowercase = /^[a-z0-9]+$/;
21
21
  const absoluteLinuxPath = /(^\/$|^(\/[a-zA-Z0-9_]+)*$)/;
22
22
  const ascii = /^[\x00-\x7F]+$/;
23
+ const organizationAlias = /^[a-z0-9]{2,32}$/;
23
24
  const backupKey = /^[A-Z0-9]{8}$|^[A-Z0-9]{32}$/;
24
25
  const basicDomain = /^[a-z0-9-]+(\.[a-z0-9-]{1,63})+$/;
25
26
  const uppercaseBasicDomain = /^(?![-])+[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]{1,63})+$/;
@@ -38,6 +39,7 @@ const elevenDigitsCode = /^[0-9]{11}$/;
38
39
  const url = /^http(s)?:\/\/?[\w.-]+(?:\.[\w.-]+)+[\w\-._~:/?#[\]@!$&'()*+,;=.]+$/;
39
40
  const hexadecimal = /^[0-9a-fA-F]+$/;
40
41
  const s3BucketName = /^[a-z0-9][-.a-z0-9]{1,61}[a-z0-9]$/;
42
+ const uuid = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
41
43
  const v4 = "(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}";
42
44
  const v6segment = "[a-fA-F\\d]{1,4}";
43
45
  const v6 = `
@@ -108,6 +110,7 @@ export {
108
110
  ipv6Cidr,
109
111
  macAddress,
110
112
  nineDigitsCode,
113
+ organizationAlias,
111
114
  password,
112
115
  pathSegment,
113
116
  phone,
@@ -118,5 +121,6 @@ export {
118
121
  spaces,
119
122
  uppercaseBasicDomain,
120
123
  uppercaseBasicSubdomain,
121
- url
124
+ url,
125
+ uuid
122
126
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scaleway/regex",
3
- "version": "5.4.0",
3
+ "version": "5.5.0",
4
4
  "description": "A small utility to use regex",
5
5
  "type": "module",
6
6
  "engines": {