@scaleway/regex 5.7.0 → 5.8.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/.turbo/turbo-build.log +15 -9
- package/CHANGELOG.md +12 -0
- package/dist/.vite/license.md +3 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +7 -63
- package/package.json +1 -2
- package/.eslintignore +0 -4
- package/LICENSE.md +0 -21
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,20 +1,26 @@
|
|
|
1
1
|
|
|
2
|
-
> @scaleway/regex@5.
|
|
2
|
+
> @scaleway/regex@5.8.1 prebuild /home/runner/work/scaleway-lib/scaleway-lib/packages/regex
|
|
3
3
|
> shx rm -rf dist
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
> @scaleway/regex@5.
|
|
6
|
+
> @scaleway/regex@5.8.1 build /home/runner/work/scaleway-lib/scaleway-lib/packages/regex
|
|
7
7
|
> vite build --config vite.config.ts && pnpm run type:generate
|
|
8
8
|
|
|
9
|
-
[36mvite
|
|
10
|
-
|
|
11
|
-
[32m✓[39m 1 modules transformed.
|
|
9
|
+
[36mvite v8.0.0-beta.13 [32mbuilding client environment for production...[36m[39m
|
|
10
|
+
[2K
|
|
12
11
|
rendering chunks...
|
|
13
12
|
computing gzip size...
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
[32m✓ built in 115ms[39m
|
|
13
|
+
dist/.vite/license.md 0.06 kB
|
|
14
|
+
dist/index.js 5.09 kB │ gzip: 1.57 kB
|
|
17
15
|
|
|
18
|
-
|
|
16
|
+
[2K
|
|
17
|
+
rendering chunks...
|
|
18
|
+
computing gzip size...
|
|
19
|
+
dist/.vite/license.md 0.06 kB
|
|
20
|
+
dist/index.js 5.09 kB │ gzip: 1.57 kB
|
|
21
|
+
|
|
22
|
+
[32m✓ built in 187ms[39m
|
|
23
|
+
|
|
24
|
+
> @scaleway/regex@5.8.1 type:generate /home/runner/work/scaleway-lib/scaleway-lib/packages/regex
|
|
19
25
|
> tsc --declaration -p tsconfig.build.json
|
|
20
26
|
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 5.8.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#3024](https://github.com/scaleway/scaleway-lib/pull/3024) [`7fb782b`](https://github.com/scaleway/scaleway-lib/commit/7fb782b6217d6d2763fd66c7feaf2c87ee90b168) Thanks [@philibea](https://github.com/philibea)! - migrate from rollup to rolldown
|
|
8
|
+
|
|
9
|
+
## 5.8.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [#2975](https://github.com/scaleway/scaleway-lib/pull/2975) [`7f38853`](https://github.com/scaleway/scaleway-lib/commit/7f38853ffee6111a70e679452245dfe5369e2480) Thanks [@johnnydoubt](https://github.com/johnnydoubt)! - feat: add alphanumDashSegment regex for serverlessdb and datawarehouse resource names
|
|
14
|
+
|
|
3
15
|
## 5.7.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export declare const alphanumDashDots: RegExp;
|
|
|
8
8
|
export declare const alphanumDashDotsOrEmpty: RegExp;
|
|
9
9
|
export declare const alphanumDashDotsSpaces: RegExp;
|
|
10
10
|
export declare const alphanumDashLowercase: RegExp;
|
|
11
|
+
export declare const alphanumDashSegment: RegExp;
|
|
11
12
|
export declare const alphanumDashSpaces: RegExp;
|
|
12
13
|
export declare const alphaUpperUnderscore: RegExp;
|
|
13
14
|
export declare const alphanumDashOrEmpty: RegExp;
|
package/dist/index.js
CHANGED
|
@@ -8,6 +8,7 @@ const alphanumDashDots = /^[a-zA-Z0-9-.]*$/;
|
|
|
8
8
|
const alphanumDashDotsOrEmpty = /^$|^[a-zA-Z0-9-.]*$/;
|
|
9
9
|
const alphanumDashDotsSpaces = /^[a-zA-Z0-9-.\s]*$/;
|
|
10
10
|
const alphanumDashLowercase = /^[a-z0-9-]+$/;
|
|
11
|
+
const alphanumDashSegment = /^[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?$/;
|
|
11
12
|
const alphanumDashSpaces = /^[a-zA-Z0-9-\s]*$/;
|
|
12
13
|
const alphaUpperUnderscore = /^[A-Z_]+$/;
|
|
13
14
|
const alphanumDashOrEmpty = /^$|^[a-zA-Z0-9-]*$/;
|
|
@@ -40,9 +41,9 @@ const url = /^http(s)?:\/\/?[\w.-]+(?:\.[\w.-]+)+[\w\-._~:/?#[\]@!$&'()*+,;=.]+$
|
|
|
40
41
|
const hexadecimal = /^[0-9a-fA-F]+$/;
|
|
41
42
|
const s3BucketName = /^[a-z0-9][-.a-z0-9]{1,61}[a-z0-9]$/;
|
|
42
43
|
const uuid = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
var v4 = String.raw`(?: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}`;
|
|
45
|
+
var v6segment = String.raw`[a-fA-F\d]{1,4}`;
|
|
46
|
+
var v6 = `
|
|
46
47
|
(?:
|
|
47
48
|
(?:${v6segment}:){7}(?:${v6segment}|:)|
|
|
48
49
|
(?:${v6segment}:){6}(?:${v4}|:${v6segment}|:)|
|
|
@@ -54,8 +55,8 @@ const v6 = `
|
|
|
54
55
|
(?::(?:(?::${v6segment}){0,5}:${v4}|(?::${v6segment}){1,7}|:))
|
|
55
56
|
)(?:%[0-9a-zA-Z]{1,})?
|
|
56
57
|
`.replace(/\s*\/\/.*$/gm, "").replace(/\n/g, "").trim();
|
|
57
|
-
|
|
58
|
-
|
|
58
|
+
var cidrv4 = `${v4}\\/(3[0-2]|[12]?[0-9])`;
|
|
59
|
+
var cidrv6 = `${v6}\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])`;
|
|
59
60
|
const ip = new RegExp(`^(?:${v4}|${v6})$`);
|
|
60
61
|
const ipv4 = new RegExp(`^${v4}$`);
|
|
61
62
|
const ipv6 = new RegExp(`^${v6}$`);
|
|
@@ -70,61 +71,4 @@ const sgPortRange = /^(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1
|
|
|
70
71
|
const password = /^(?!@)[^`]*$/;
|
|
71
72
|
const kafkaUsernameRegex = /^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$/;
|
|
72
73
|
const webhostingUsernameEmailRegex = /^(?!.*\.\.)[a-zA-Z0-9_-][a-zA-Z0-9._-]*[a-zA-Z0-9_-]$/;
|
|
73
|
-
export {
|
|
74
|
-
absoluteLinuxPath,
|
|
75
|
-
absolutePath,
|
|
76
|
-
accessKeyRegex,
|
|
77
|
-
advancedDomainName,
|
|
78
|
-
alpha,
|
|
79
|
-
alphaDashes,
|
|
80
|
-
alphaLowercase,
|
|
81
|
-
alphaUpperUnderscore,
|
|
82
|
-
alphanum,
|
|
83
|
-
alphanumDash,
|
|
84
|
-
alphanumDashDots,
|
|
85
|
-
alphanumDashDotsOrEmpty,
|
|
86
|
-
alphanumDashDotsSpaces,
|
|
87
|
-
alphanumDashLowercase,
|
|
88
|
-
alphanumDashOrEmpty,
|
|
89
|
-
alphanumDashSpaces,
|
|
90
|
-
alphanumDashUnderscore,
|
|
91
|
-
alphanumDashUnderscoreDollar,
|
|
92
|
-
alphanumDashUnderscoreDots,
|
|
93
|
-
alphanumDashUnderscoreDotsSpaces,
|
|
94
|
-
alphanumDashUnderscoreDotsSpacesParenthesis,
|
|
95
|
-
alphanumDots,
|
|
96
|
-
alphanumLowercase,
|
|
97
|
-
ascii,
|
|
98
|
-
backupKey,
|
|
99
|
-
basicDomain,
|
|
100
|
-
cron,
|
|
101
|
-
dashedIpv4,
|
|
102
|
-
digits,
|
|
103
|
-
elevenDigitsCode,
|
|
104
|
-
email,
|
|
105
|
-
fourDigitsCode,
|
|
106
|
-
hexadecimal,
|
|
107
|
-
ip,
|
|
108
|
-
ipCidr,
|
|
109
|
-
ipv4,
|
|
110
|
-
ipv4Cidr,
|
|
111
|
-
ipv6,
|
|
112
|
-
ipv6Cidr,
|
|
113
|
-
kafkaUsernameRegex,
|
|
114
|
-
macAddress,
|
|
115
|
-
nineDigitsCode,
|
|
116
|
-
organizationAlias,
|
|
117
|
-
password,
|
|
118
|
-
pathSegment,
|
|
119
|
-
phone,
|
|
120
|
-
reverseDNS,
|
|
121
|
-
s3BucketName,
|
|
122
|
-
sgPortRange,
|
|
123
|
-
sixDigitsCode,
|
|
124
|
-
spaces,
|
|
125
|
-
uppercaseBasicDomain,
|
|
126
|
-
uppercaseBasicSubdomain,
|
|
127
|
-
url,
|
|
128
|
-
uuid,
|
|
129
|
-
webhostingUsernameEmailRegex
|
|
130
|
-
};
|
|
74
|
+
export { absoluteLinuxPath, absolutePath, accessKeyRegex, advancedDomainName, alpha, alphaDashes, alphaLowercase, alphaUpperUnderscore, alphanum, alphanumDash, alphanumDashDots, alphanumDashDotsOrEmpty, alphanumDashDotsSpaces, alphanumDashLowercase, alphanumDashOrEmpty, alphanumDashSegment, alphanumDashSpaces, alphanumDashUnderscore, alphanumDashUnderscoreDollar, alphanumDashUnderscoreDots, alphanumDashUnderscoreDotsSpaces, alphanumDashUnderscoreDotsSpacesParenthesis, alphanumDots, alphanumLowercase, ascii, backupKey, basicDomain, cron, dashedIpv4, digits, elevenDigitsCode, email, fourDigitsCode, hexadecimal, ip, ipCidr, ipv4, ipv4Cidr, ipv6, ipv6Cidr, kafkaUsernameRegex, macAddress, nineDigitsCode, organizationAlias, password, pathSegment, phone, reverseDNS, s3BucketName, sgPortRange, sixDigitsCode, spaces, uppercaseBasicDomain, uppercaseBasicSubdomain, url, uuid, webhostingUsernameEmailRegex };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleway/regex",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.8.1",
|
|
4
4
|
"description": "A small utility to use regex",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -34,7 +34,6 @@
|
|
|
34
34
|
"type:generate:go": "tsgo --declaration -p tsconfig.build.json",
|
|
35
35
|
"build": "vite build --config vite.config.ts && pnpm run type:generate",
|
|
36
36
|
"build:profile": "npx vite-bundle-visualizer -c vite.config.ts",
|
|
37
|
-
"lint": "eslint --report-unused-disable-directives --cache --cache-strategy content --ext ts,tsx .",
|
|
38
37
|
"test:unit": "vitest --run --config vite.config.ts",
|
|
39
38
|
"test:unit:coverage": "pnpm test:unit --coverage"
|
|
40
39
|
}
|
package/.eslintignore
DELETED
package/LICENSE.md
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2021 Scaleway
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|