@scaleway/regex 4.2.0 → 5.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,17 @@
1
1
  # Change Log
2
2
 
3
+ ## 5.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [#1837](https://github.com/scaleway/scaleway-lib/pull/1837) [`5404963`](https://github.com/scaleway/scaleway-lib/commit/5404963ddd01fafe6ed9753d8324fb19849065ca) Thanks [@philibea](https://github.com/philibea)! - upgrade node version from 14 to 20
8
+
9
+ ## 4.2.1
10
+
11
+ ### Patch Changes
12
+
13
+ - [#1680](https://github.com/scaleway/scaleway-lib/pull/1680) [`c2fa21f`](https://github.com/scaleway/scaleway-lib/commit/c2fa21ffc7fe5d15a1f6cd24523d129ec1c445db) Thanks [@philibea](https://github.com/philibea)! - Update pathSegment regex
14
+
3
15
  ## 4.2.0
4
16
 
5
17
  ### Minor Changes
package/dist/index.js CHANGED
@@ -59,7 +59,7 @@ const ipv4Cidr = new RegExp(`^${cidrv4}$`);
59
59
  const ipv6Cidr = new RegExp(`^${cidrv6}$`);
60
60
  const reverseDNS = /^[a-z0-9-]+(\.[a-z0-9-]{1,63})+(\.)$/;
61
61
  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}/;
62
- const pathSegment = /^[_a-zA-Z0-9][-_.a-zA-Z0-9]*[_a-zA-Z0-9]$/;
62
+ const pathSegment = /^[_a-zA-Z0-9]([-_.a-zA-Z0-9]*[_a-zA-Z0-9])?$/;
63
63
  const absolutePath = /^\/(([\w. -]*)[^\s?]\/?)+$/;
64
64
 
65
65
  export { absoluteLinuxPath, absolutePath, 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, pathSegment, phone, reverseDNS, s3BucketName, sixDigitsCode, spaces, uppercaseBasicDomain, uppercaseBasicSubdomain, url };
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@scaleway/regex",
3
- "version": "4.2.0",
3
+ "version": "5.0.0",
4
4
  "description": "A small utility to use regex",
5
5
  "type": "module",
6
6
  "engines": {
7
- "node": ">=14.x"
7
+ "node": ">=20.x"
8
8
  },
9
9
  "sideEffects": false,
10
10
  "exports": {