@scaleway/regex 5.6.0 → 5.7.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/.turbo/turbo-build.log +20 -0
- package/CHANGELOG.md +12 -0
- package/biome.json +12 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +6 -4
- package/package.json +3 -1
- package/tsconfig.build.json +6 -5
- package/vite.config.ts +2 -5
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
|
|
2
|
+
> @scaleway/regex@5.7.0 prebuild /home/runner/work/scaleway-lib/scaleway-lib/packages/regex
|
|
3
|
+
> shx rm -rf dist
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
> @scaleway/regex@5.7.0 build /home/runner/work/scaleway-lib/scaleway-lib/packages/regex
|
|
7
|
+
> vite build --config vite.config.ts && pnpm run type:generate
|
|
8
|
+
|
|
9
|
+
[36mvite v7.3.1 [32mbuilding client environment for production...[36m[39m
|
|
10
|
+
transforming...
|
|
11
|
+
[32m✓[39m 1 modules transformed.
|
|
12
|
+
rendering chunks...
|
|
13
|
+
computing gzip size...
|
|
14
|
+
[2mdist/[22m[36mindex.js [39m[1m[2m5.12 kB[22m[1m[22m[2m │ gzip: 1.57 kB[22m
|
|
15
|
+
[2mdist/[22m[36mindex.js [39m[1m[2m5.12 kB[22m[1m[22m[2m │ gzip: 1.57 kB[22m
|
|
16
|
+
[32m✓ built in 115ms[39m
|
|
17
|
+
|
|
18
|
+
> @scaleway/regex@5.7.0 type:generate /home/runner/work/scaleway-lib/scaleway-lib/packages/regex
|
|
19
|
+
> tsc --declaration -p tsconfig.build.json
|
|
20
|
+
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 5.7.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#2846](https://github.com/scaleway/scaleway-lib/pull/2846) [`abe485e`](https://github.com/scaleway/scaleway-lib/commit/abe485e07c8ac15bf9af8e63b991961d5f12c309) Thanks [@MathildeJolly](https://github.com/MathildeJolly)! - feat: add webhosting username email regex
|
|
8
|
+
|
|
9
|
+
## 5.6.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#2872](https://github.com/scaleway/scaleway-lib/pull/2872) [`5a4a5dc`](https://github.com/scaleway/scaleway-lib/commit/5a4a5dc80a8404abb7e76ed54082f5c0c8de3b0b) Thanks [@philibea](https://github.com/philibea)! - Isolated modules, better export of types generated by typescript
|
|
14
|
+
|
|
3
15
|
## 5.6.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/biome.json
ADDED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -19,7 +19,7 @@ const alphanumDashUnderscoreDollar = /^[a-zA-Z0-9_$-]*$/;
|
|
|
19
19
|
const alphanumDots = /^[a-zA-Z0-9.]*$/;
|
|
20
20
|
const alphanumLowercase = /^[a-z0-9]+$/;
|
|
21
21
|
const absoluteLinuxPath = /(^\/$|^(\/[a-zA-Z0-9_]+)*$)/;
|
|
22
|
-
const ascii = /^[\
|
|
22
|
+
const ascii = /^[\u0000-\u007F]+$/;
|
|
23
23
|
const organizationAlias = /^[a-z0-9]{2,32}$/;
|
|
24
24
|
const backupKey = /^[A-Z0-9]{8}$|^[A-Z0-9]{32}$/;
|
|
25
25
|
const basicDomain = /^[a-z0-9-]+(\.[a-z0-9-]{1,63})+$/;
|
|
@@ -40,8 +40,8 @@ const url = /^http(s)?:\/\/?[\w.-]+(?:\.[\w.-]+)+[\w\-._~:/?#[\]@!$&'()*+,;=.]+$
|
|
|
40
40
|
const hexadecimal = /^[0-9a-fA-F]+$/;
|
|
41
41
|
const s3BucketName = /^[a-z0-9][-.a-z0-9]{1,61}[a-z0-9]$/;
|
|
42
42
|
const uuid = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
43
|
-
const v4 =
|
|
44
|
-
const v6segment =
|
|
43
|
+
const 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}`;
|
|
44
|
+
const v6segment = String.raw`[a-fA-F\d]{1,4}`;
|
|
45
45
|
const v6 = `
|
|
46
46
|
(?:
|
|
47
47
|
(?:${v6segment}:){7}(?:${v6segment}|:)|
|
|
@@ -69,6 +69,7 @@ const absolutePath = /^\/(([\w. -]*)[^\s?]\/?)+$/;
|
|
|
69
69
|
const sgPortRange = /^(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5]?[0-9]{1,4})(-(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5]?[0-9]{1,4}))?$/;
|
|
70
70
|
const password = /^(?!@)[^`]*$/;
|
|
71
71
|
const kafkaUsernameRegex = /^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$/;
|
|
72
|
+
const webhostingUsernameEmailRegex = /^(?!.*\.\.)[a-zA-Z0-9_-][a-zA-Z0-9._-]*[a-zA-Z0-9_-]$/;
|
|
72
73
|
export {
|
|
73
74
|
absoluteLinuxPath,
|
|
74
75
|
absolutePath,
|
|
@@ -124,5 +125,6 @@ export {
|
|
|
124
125
|
uppercaseBasicDomain,
|
|
125
126
|
uppercaseBasicSubdomain,
|
|
126
127
|
url,
|
|
127
|
-
uuid
|
|
128
|
+
uuid,
|
|
129
|
+
webhostingUsernameEmailRegex
|
|
128
130
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleway/regex",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.7.0",
|
|
4
4
|
"description": "A small utility to use regex",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -29,7 +29,9 @@
|
|
|
29
29
|
"scripts": {
|
|
30
30
|
"prebuild": "shx rm -rf dist",
|
|
31
31
|
"typecheck": "tsc --noEmit",
|
|
32
|
+
"typecheck:go": "tsgo --noEmit",
|
|
32
33
|
"type:generate": "tsc --declaration -p tsconfig.build.json",
|
|
34
|
+
"type:generate:go": "tsgo --declaration -p tsconfig.build.json",
|
|
33
35
|
"build": "vite build --config vite.config.ts && pnpm run type:generate",
|
|
34
36
|
"build:profile": "npx vite-bundle-visualizer -c vite.config.ts",
|
|
35
37
|
"lint": "eslint --report-unused-disable-directives --cache --cache-strategy content --ext ts,tsx .",
|
package/tsconfig.build.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
-
"extends": "./tsconfig.json",
|
|
3
2
|
"compilerOptions": {
|
|
4
|
-
"noEmit": false,
|
|
5
3
|
"emitDeclarationOnly": true,
|
|
6
|
-
"
|
|
7
|
-
"
|
|
4
|
+
"isolatedDeclarations": true,
|
|
5
|
+
"noEmit": false,
|
|
6
|
+
"outDir": "dist",
|
|
7
|
+
"rootDir": "src"
|
|
8
8
|
},
|
|
9
9
|
"exclude": [
|
|
10
10
|
"*.config.ts",
|
|
@@ -12,5 +12,6 @@
|
|
|
12
12
|
"**/__tests__",
|
|
13
13
|
"**/__mocks__",
|
|
14
14
|
"src/**/*.test.tsx"
|
|
15
|
-
]
|
|
15
|
+
],
|
|
16
|
+
"extends": "./tsconfig.json"
|
|
16
17
|
}
|
package/vite.config.ts
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { mergeConfig } from 'vite'
|
|
2
2
|
import { defaultConfig } from '../../vite.config'
|
|
3
3
|
import { defaultConfig as vitestDefaultConfig } from '../../vitest.config'
|
|
4
4
|
|
|
5
|
-
const config =
|
|
6
|
-
...defineConfig(defaultConfig),
|
|
7
|
-
...vitestDefaultConfig,
|
|
8
|
-
}
|
|
5
|
+
const config = mergeConfig(defaultConfig, vitestDefaultConfig)
|
|
9
6
|
|
|
10
7
|
export default mergeConfig(config, {
|
|
11
8
|
build: {
|