@scaleway/regex 3.2.0 → 4.0.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,28 @@
1
1
  # Change Log
2
2
 
3
+ ## 4.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [#1442](https://github.com/scaleway/scaleway-lib/pull/1442) [`c39764e`](https://github.com/scaleway/scaleway-lib/commit/c39764e869fcce3471d6c2c4e35272c86ad24f90) Thanks [@vincentaudebert](https://github.com/vincentaudebert)! - Rename few regex and camelcase all of them for more consistency. Also creates alphanumDashUnderscoreDots.
8
+
9
+ Here is the full list of changes:
10
+
11
+ - alphaLower -> alphaLowercase
12
+ - alphanumdash -> alphanumDash
13
+ - alphanumdashdots -> alphanumDashDots
14
+ - alphanumdashdotsorempty -> alphanumDashDotsOrEmpty
15
+ - alphanumdashdotsspaces -> alphanumDashDotsSpaces
16
+ - alphanumdashunderscore -> alphanumDashUnderscore
17
+ - alphanumdashunderscoredotsspacesparenthesis -> alphanumDashUnderscoreDotsSpacesParenthesis
18
+ - alphanumdashorempty -> alphanumDashOrEmpty
19
+ - alphanumdashspaces -> alphanumDashSpaces
20
+ - alphanumdots -> alphanumDots
21
+ - alphanumdashLowercase -> alphanumDashLowercase
22
+ - alphanumSpacesDotsUnderscoreDash -> alphanumDashUnderscoreDotsSpaces
23
+ - alphanumUnderscoreDash -> alphanumDashUnderscore
24
+ - alphanumUnderscoreDollarDash -> alphanumDashUnderscoreDollar
25
+
3
26
  ## 3.2.0
4
27
 
5
28
  ### Minor Changes
package/dist/index.d.ts CHANGED
@@ -1,22 +1,22 @@
1
1
  declare const accessKeyRegex: RegExp;
2
2
  declare const alpha: RegExp;
3
- declare const alphaLower: RegExp;
3
+ declare const alphaLowercase: RegExp;
4
4
  declare const alphanum: RegExp;
5
5
  declare const alphaDashes: RegExp;
6
- declare const alphanumdash: RegExp;
7
- declare const alphanumdashdots: RegExp;
8
- declare const alphanumdashdotsorempty: RegExp;
9
- declare const alphanumdashdotsspaces: RegExp;
10
- declare const alphanumdashunderscore: RegExp;
11
- declare const alphanumdashunderscoredotsspacesparenthesis: RegExp;
12
- declare const alphanumdashorempty: RegExp;
13
- declare const alphanumdashspaces: RegExp;
14
- declare const alphanumdots: RegExp;
6
+ declare const alphanumDash: RegExp;
7
+ declare const alphanumDashDots: RegExp;
8
+ declare const alphanumDashDotsOrEmpty: RegExp;
9
+ declare const alphanumDashDotsSpaces: RegExp;
10
+ declare const alphanumDashLowercase: RegExp;
11
+ declare const alphanumDashSpaces: RegExp;
12
+ declare const alphanumDashOrEmpty: RegExp;
13
+ declare const alphanumDashUnderscoreDots: RegExp;
14
+ declare const alphanumDashUnderscore: RegExp;
15
+ declare const alphanumDashUnderscoreDotsSpacesParenthesis: RegExp;
16
+ declare const alphanumDashUnderscoreDotsSpaces: RegExp;
17
+ declare const alphanumDashUnderscoreDollar: RegExp;
18
+ declare const alphanumDots: RegExp;
15
19
  declare const alphanumLowercase: RegExp;
16
- declare const alphanumdashLowercase: RegExp;
17
- declare const alphanumSpacesDotsUnderscoreDash: RegExp;
18
- declare const alphanumUnderscoreDash: RegExp;
19
- declare const alphanumUnderscoreDollarDash: RegExp;
20
20
  declare const absoluteLinuxPath: RegExp;
21
21
  declare const ascii: RegExp;
22
22
  declare const backupKey: RegExp;
@@ -43,4 +43,4 @@ declare const ipv6Cidr: RegExp;
43
43
  declare const reverseDNS: RegExp;
44
44
  declare const dashedIpv4: RegExp;
45
45
 
46
- export { absoluteLinuxPath, accessKeyRegex, advancedDomainName, alpha, alphaDashes, alphaLower, alphanum, alphanumLowercase, alphanumSpacesDotsUnderscoreDash, alphanumUnderscoreDash, alphanumUnderscoreDollarDash, alphanumdash, alphanumdashLowercase, alphanumdashdots, alphanumdashdotsorempty, alphanumdashdotsspaces, alphanumdashorempty, alphanumdashspaces, alphanumdashunderscore, alphanumdashunderscoredotsspacesparenthesis, alphanumdots, ascii, backupKey, basicDomain, cron, dashedIpv4, digits, email, fourDigitsCode, hexadecimal, ip, ipCidr, ipv4, ipv4Cidr, ipv6, ipv6Cidr, macAddress, phone, reverseDNS, s3BucketName, sixDigitsCode, spaces, uppercaseBasicDomain, url };
46
+ export { absoluteLinuxPath, accessKeyRegex, advancedDomainName, alpha, alphaDashes, alphaLowercase, alphanum, alphanumDash, alphanumDashDots, alphanumDashDotsOrEmpty, alphanumDashDotsSpaces, alphanumDashLowercase, alphanumDashOrEmpty, alphanumDashSpaces, alphanumDashUnderscore, alphanumDashUnderscoreDollar, alphanumDashUnderscoreDots, alphanumDashUnderscoreDotsSpaces, alphanumDashUnderscoreDotsSpacesParenthesis, alphanumDots, alphanumLowercase, ascii, backupKey, basicDomain, cron, dashedIpv4, digits, email, fourDigitsCode, hexadecimal, ip, ipCidr, ipv4, ipv4Cidr, ipv6, ipv6Cidr, macAddress, phone, reverseDNS, s3BucketName, sixDigitsCode, spaces, uppercaseBasicDomain, url };
package/dist/index.js CHANGED
@@ -1,22 +1,22 @@
1
1
  const accessKeyRegex = /^SCW[A-Z0-9]{17}$/i;
2
2
  const alpha = /^[a-zA-Z]*$/;
3
- const alphaLower = /^[a-z]+$/;
3
+ const alphaLowercase = /^[a-z]+$/;
4
4
  const alphanum = /^[a-zA-Z0-9]*$/;
5
5
  const alphaDashes = /^[a-zA-Z-]*$/;
6
- const alphanumdash = /^[a-zA-Z0-9-]*$/;
7
- const alphanumdashdots = /^[a-zA-Z0-9-.]*$/;
8
- const alphanumdashdotsorempty = /^$|^[a-zA-Z0-9-.]*$/;
9
- const alphanumdashdotsspaces = /^[a-zA-Z0-9-.\s]*$/;
10
- const alphanumdashunderscore = /^[a-zA-Z0-9-_]*$/;
11
- const alphanumdashunderscoredotsspacesparenthesis = /^[a-zA-Z0-9-_.()\s]*$/;
12
- const alphanumdashorempty = /^$|^[a-zA-Z0-9-]*$/;
13
- const alphanumdashspaces = /^[a-zA-Z0-9-\s]*$/;
14
- const alphanumdots = /^[a-zA-Z0-9.]*$/;
6
+ const alphanumDash = /^[a-zA-Z0-9-]*$/;
7
+ const alphanumDashDots = /^[a-zA-Z0-9-.]*$/;
8
+ const alphanumDashDotsOrEmpty = /^$|^[a-zA-Z0-9-.]*$/;
9
+ const alphanumDashDotsSpaces = /^[a-zA-Z0-9-.\s]*$/;
10
+ const alphanumDashLowercase = /^[a-z0-9-]+$/;
11
+ const alphanumDashSpaces = /^[a-zA-Z0-9-\s]*$/;
12
+ const alphanumDashOrEmpty = /^$|^[a-zA-Z0-9-]*$/;
13
+ const alphanumDashUnderscoreDots = /^[a-zA-Z0-9-._]*$/;
14
+ const alphanumDashUnderscore = /^[a-zA-Z0-9-_]*$/;
15
+ const alphanumDashUnderscoreDotsSpacesParenthesis = /^[a-zA-Z0-9-_.()\s]*$/;
16
+ const alphanumDashUnderscoreDotsSpaces = /^[a-zA-Z0-9-.\s_]*$/;
17
+ const alphanumDashUnderscoreDollar = /^[a-zA-Z0-9_$-]*$/;
18
+ const alphanumDots = /^[a-zA-Z0-9.]*$/;
15
19
  const alphanumLowercase = /^[a-z0-9]+$/;
16
- const alphanumdashLowercase = /^[a-z0-9-]+$/;
17
- const alphanumSpacesDotsUnderscoreDash = /^[a-zA-Z0-9-.\s_]*$/;
18
- const alphanumUnderscoreDash = /^[a-zA-Z0-9_-]*$/;
19
- const alphanumUnderscoreDollarDash = /^[a-zA-Z0-9_$-]*$/;
20
20
  const absoluteLinuxPath = /(^\/$|^(\/[a-zA-Z0-9_]+)*$)/;
21
21
  const ascii = /^[\x00-\x7F]+$/;
22
22
  const backupKey = /^[A-Z0-9]{32}$/;
@@ -59,4 +59,4 @@ const ipv6Cidr = new RegExp(`^${cidrv6}$`);
59
59
  const reverseDNS = /^[a-z0-9-]+(\.[a-z0-9-]{1,63})+(\.)$/;
60
60
  const dashedIpv4 = /(\b25[0-5]|\b2[0-4][0-9]|\b[01]?[0-9][0-9]?)(-(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}/;
61
61
 
62
- export { absoluteLinuxPath, accessKeyRegex, advancedDomainName, alpha, alphaDashes, alphaLower, alphanum, alphanumLowercase, alphanumSpacesDotsUnderscoreDash, alphanumUnderscoreDash, alphanumUnderscoreDollarDash, alphanumdash, alphanumdashLowercase, alphanumdashdots, alphanumdashdotsorempty, alphanumdashdotsspaces, alphanumdashorempty, alphanumdashspaces, alphanumdashunderscore, alphanumdashunderscoredotsspacesparenthesis, alphanumdots, ascii, backupKey, basicDomain, cron, dashedIpv4, digits, email, fourDigitsCode, hexadecimal, ip, ipCidr, ipv4, ipv4Cidr, ipv6, ipv6Cidr, macAddress, phone, reverseDNS, s3BucketName, sixDigitsCode, spaces, uppercaseBasicDomain, url };
62
+ export { absoluteLinuxPath, accessKeyRegex, advancedDomainName, alpha, alphaDashes, alphaLowercase, alphanum, alphanumDash, alphanumDashDots, alphanumDashDotsOrEmpty, alphanumDashDotsSpaces, alphanumDashLowercase, alphanumDashOrEmpty, alphanumDashSpaces, alphanumDashUnderscore, alphanumDashUnderscoreDollar, alphanumDashUnderscoreDots, alphanumDashUnderscoreDotsSpaces, alphanumDashUnderscoreDotsSpacesParenthesis, alphanumDots, alphanumLowercase, ascii, backupKey, basicDomain, cron, dashedIpv4, digits, email, fourDigitsCode, hexadecimal, ip, ipCidr, ipv4, ipv4Cidr, ipv6, ipv6Cidr, macAddress, phone, reverseDNS, s3BucketName, sixDigitsCode, spaces, uppercaseBasicDomain, url };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scaleway/regex",
3
- "version": "3.2.0",
3
+ "version": "4.0.0",
4
4
  "description": "A small utility to use regex",
5
5
  "type": "module",
6
6
  "engines": {