@scaleway/regex 5.1.0 → 5.2.1
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 +12 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +6 -0
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 5.2.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`be2d1a8`](https://github.com/scaleway/scaleway-lib/commit/be2d1a82fc21f3c04fddfcf2217c8ccc5e2e492e) Thanks [@Lawndlwd](https://github.com/Lawndlwd)! - Add new regex underscore uppercase
|
|
8
|
+
|
|
9
|
+
## 5.2.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [#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
|
|
14
|
+
|
|
3
15
|
## 5.1.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export declare const alphanumDashDotsOrEmpty: RegExp;
|
|
|
9
9
|
export declare const alphanumDashDotsSpaces: RegExp;
|
|
10
10
|
export declare const alphanumDashLowercase: RegExp;
|
|
11
11
|
export declare const alphanumDashSpaces: RegExp;
|
|
12
|
+
export declare const alphaUpperUnderscore: RegExp;
|
|
12
13
|
export declare const alphanumDashOrEmpty: RegExp;
|
|
13
14
|
export declare const alphanumDashUnderscoreDots: RegExp;
|
|
14
15
|
export declare const alphanumDashUnderscore: RegExp;
|
|
@@ -32,6 +33,8 @@ export declare const fourDigitsCode: RegExp;
|
|
|
32
33
|
export declare const phone: RegExp;
|
|
33
34
|
export declare const spaces: RegExp;
|
|
34
35
|
export declare const sixDigitsCode: RegExp;
|
|
36
|
+
export declare const nineDigitsCode: RegExp;
|
|
37
|
+
export declare const elevenDigitsCode: RegExp;
|
|
35
38
|
export declare const url: RegExp;
|
|
36
39
|
export declare const hexadecimal: RegExp;
|
|
37
40
|
export declare const s3BucketName: RegExp;
|
package/dist/index.js
CHANGED
|
@@ -9,6 +9,7 @@ const alphanumDashDotsOrEmpty = /^$|^[a-zA-Z0-9-.]*$/;
|
|
|
9
9
|
const alphanumDashDotsSpaces = /^[a-zA-Z0-9-.\s]*$/;
|
|
10
10
|
const alphanumDashLowercase = /^[a-z0-9-]+$/;
|
|
11
11
|
const alphanumDashSpaces = /^[a-zA-Z0-9-\s]*$/;
|
|
12
|
+
const alphaUpperUnderscore = /^[A-Z_]+$/;
|
|
12
13
|
const alphanumDashOrEmpty = /^$|^[a-zA-Z0-9-]*$/;
|
|
13
14
|
const alphanumDashUnderscoreDots = /^[a-zA-Z0-9-._]*$/;
|
|
14
15
|
const alphanumDashUnderscore = /^[a-zA-Z0-9-_]*$/;
|
|
@@ -32,6 +33,8 @@ const fourDigitsCode = /^[0-9]{4}$/;
|
|
|
32
33
|
const phone = /^\+[0-9]*/;
|
|
33
34
|
const spaces = /^\s*$/;
|
|
34
35
|
const sixDigitsCode = /^[0-9]{6}$/;
|
|
36
|
+
const nineDigitsCode = /^[0-9]{9}$/;
|
|
37
|
+
const elevenDigitsCode = /^[0-9]{11}$/;
|
|
35
38
|
const url = /^http(s)?:\/\/?[\w.-]+(?:\.[\w.-]+)+[\w\-._~:/?#[\]@!$&'()*+,;=.]+$/;
|
|
36
39
|
const hexadecimal = /^[0-9a-fA-F]+$/;
|
|
37
40
|
const s3BucketName = /^[a-z0-9][-.a-z0-9]{1,61}[a-z0-9]$/;
|
|
@@ -69,6 +72,7 @@ export {
|
|
|
69
72
|
alpha,
|
|
70
73
|
alphaDashes,
|
|
71
74
|
alphaLowercase,
|
|
75
|
+
alphaUpperUnderscore,
|
|
72
76
|
alphanum,
|
|
73
77
|
alphanumDash,
|
|
74
78
|
alphanumDashDots,
|
|
@@ -90,6 +94,7 @@ export {
|
|
|
90
94
|
cron,
|
|
91
95
|
dashedIpv4,
|
|
92
96
|
digits,
|
|
97
|
+
elevenDigitsCode,
|
|
93
98
|
email,
|
|
94
99
|
fourDigitsCode,
|
|
95
100
|
hexadecimal,
|
|
@@ -100,6 +105,7 @@ export {
|
|
|
100
105
|
ipv6,
|
|
101
106
|
ipv6Cidr,
|
|
102
107
|
macAddress,
|
|
108
|
+
nineDigitsCode,
|
|
103
109
|
pathSegment,
|
|
104
110
|
phone,
|
|
105
111
|
reverseDNS,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleway/regex",
|
|
3
|
-
"version": "5.1
|
|
3
|
+
"version": "5.2.1",
|
|
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",
|