@scaleway/regex 5.1.0 → 5.2.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.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#2132](https://github.com/scaleway/scaleway-lib/pull/2132) [`fbe702b`](https://github.com/scaleway/scaleway-lib/commit/fbe702b32aa734e46836d267c23ddcc960b2d550) Thanks [@JulienSaguez](https://github.com/JulienSaguez)! - Add `elevenDigitsCode` and `nineDigitsCode` regex
8
+
3
9
  ## 5.1.0
4
10
 
5
11
  ### Minor Changes
package/dist/index.d.ts CHANGED
@@ -32,6 +32,8 @@ export declare const fourDigitsCode: RegExp;
32
32
  export declare const phone: RegExp;
33
33
  export declare const spaces: RegExp;
34
34
  export declare const sixDigitsCode: RegExp;
35
+ export declare const nineDigitsCode: RegExp;
36
+ export declare const elevenDigitsCode: RegExp;
35
37
  export declare const url: RegExp;
36
38
  export declare const hexadecimal: RegExp;
37
39
  export declare const s3BucketName: RegExp;
package/dist/index.js CHANGED
@@ -32,6 +32,8 @@ const fourDigitsCode = /^[0-9]{4}$/;
32
32
  const phone = /^\+[0-9]*/;
33
33
  const spaces = /^\s*$/;
34
34
  const sixDigitsCode = /^[0-9]{6}$/;
35
+ const nineDigitsCode = /^[0-9]{9}$/;
36
+ const elevenDigitsCode = /^[0-9]{11}$/;
35
37
  const url = /^http(s)?:\/\/?[\w.-]+(?:\.[\w.-]+)+[\w\-._~:/?#[\]@!$&'()*+,;=.]+$/;
36
38
  const hexadecimal = /^[0-9a-fA-F]+$/;
37
39
  const s3BucketName = /^[a-z0-9][-.a-z0-9]{1,61}[a-z0-9]$/;
@@ -90,6 +92,7 @@ export {
90
92
  cron,
91
93
  dashedIpv4,
92
94
  digits,
95
+ elevenDigitsCode,
93
96
  email,
94
97
  fourDigitsCode,
95
98
  hexadecimal,
@@ -100,6 +103,7 @@ export {
100
103
  ipv6,
101
104
  ipv6Cidr,
102
105
  macAddress,
106
+ nineDigitsCode,
103
107
  pathSegment,
104
108
  phone,
105
109
  reverseDNS,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scaleway/regex",
3
- "version": "5.1.0",
3
+ "version": "5.2.0",
4
4
  "description": "A small utility to use regex",
5
5
  "type": "module",
6
6
  "engines": {
@@ -27,6 +27,7 @@
27
27
  },
28
28
  "license": "MIT",
29
29
  "scripts": {
30
+ "prebuild": "shx rm -rf dist",
30
31
  "typecheck": "tsc --noEmit",
31
32
  "type:generate": "tsc --declaration -p tsconfig.build.json",
32
33
  "build": "vite build --config vite.config.ts && pnpm run type:generate",