@scaleway/regex 5.2.1 → 5.3.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.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#2514](https://github.com/scaleway/scaleway-lib/pull/2514) [`69dc566`](https://github.com/scaleway/scaleway-lib/commit/69dc566a431ebb9e8d2e8cd4c58508f9a9409b03) Thanks [@alexandre-combemorel](https://github.com/alexandre-combemorel)! - Add new regex for port security group handling
8
+
9
+ ## 5.2.2
10
+
11
+ ### Patch Changes
12
+
13
+ - [#2461](https://github.com/scaleway/scaleway-lib/pull/2461) [`3779419`](https://github.com/scaleway/scaleway-lib/commit/3779419f6cec8271d99638e0377106bc23a5b75e) Thanks [@Lawndlwd](https://github.com/Lawndlwd)! - fix the cron regex
14
+
3
15
  ## 5.2.1
4
16
 
5
17
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -48,3 +48,4 @@ export declare const reverseDNS: RegExp;
48
48
  export declare const dashedIpv4: RegExp;
49
49
  export declare const pathSegment: RegExp;
50
50
  export declare const absolutePath: RegExp;
51
+ export declare const sgPortRange: RegExp;
package/dist/index.js CHANGED
@@ -25,7 +25,7 @@ const basicDomain = /^[a-z0-9-]+(\.[a-z0-9-]{1,63})+$/;
25
25
  const uppercaseBasicDomain = /^(?![-])+[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]{1,63})+$/;
26
26
  const uppercaseBasicSubdomain = /^(?![-])+[a-zA-Z0-9-]+\.[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]{1,63})+$/;
27
27
  const advancedDomainName = /^(?:(?:(?:[a-zA-Z0-9À-ÖØ-öø-ÿ](?:[a-zA-Z0-9À-ÖØ-öø-ÿ-]{0,61}[a-zA-Z0-9À-ÖØ-öø-ÿ])?)\.)+[a-zA-Z]{2,}|(?:[0-9]{1,3}\.){3}[0-9]{1,3})(?::[\d]{1,5})?$/;
28
- const cron = /^((((\d+,)+\d+|(\d+(\/|-)\d+)|\d+|\*) ?){5,7})$/;
28
+ const cron = /^((((\d+,)+\d+|(\d+(\/|-)\d+)|\d+|\*|\*\/\d+) ?){5,7})$/;
29
29
  const digits = /^[0-9]*$/;
30
30
  const macAddress = /^([0-9a-fA-F][0-9a-fA-F]:){5}([0-9a-fA-F][0-9a-fA-F])$/;
31
31
  const email = /^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/;
@@ -64,6 +64,7 @@ const reverseDNS = /^[a-z0-9-]+(\.[a-z0-9-]{1,63})+(\.)$/;
64
64
  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}/;
65
65
  const pathSegment = /^[_a-zA-Z0-9]([-_.a-zA-Z0-9]*[_a-zA-Z0-9])?$/;
66
66
  const absolutePath = /^\/(([\w. -]*)[^\s?]\/?)+$/;
67
+ 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}))?$/;
67
68
  export {
68
69
  absoluteLinuxPath,
69
70
  absolutePath,
@@ -110,6 +111,7 @@ export {
110
111
  phone,
111
112
  reverseDNS,
112
113
  s3BucketName,
114
+ sgPortRange,
113
115
  sixDigitsCode,
114
116
  spaces,
115
117
  uppercaseBasicDomain,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scaleway/regex",
3
- "version": "5.2.1",
3
+ "version": "5.3.0",
4
4
  "description": "A small utility to use regex",
5
5
  "type": "module",
6
6
  "engines": {
package/vite.config.ts CHANGED
@@ -1,7 +1,13 @@
1
1
  import { defineConfig, mergeConfig } from 'vite'
2
2
  import { defaultConfig } from '../../vite.config'
3
+ import { defaultConfig as vitestDefaultConfig } from '../../vitest.config'
3
4
 
4
- export default mergeConfig(defineConfig(defaultConfig), {
5
+ const config = {
6
+ ...defineConfig(defaultConfig),
7
+ ...vitestDefaultConfig,
8
+ }
9
+
10
+ export default mergeConfig(config, {
5
11
  build: {
6
12
  target: ['node20'],
7
13
  },