Skip to content

Commit df630f8

Browse files
authored
Merge branch 'main' into renovate/eslint-monorepo
2 parents 1d51171 + 3779419 commit df630f8

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

.changeset/big-ligers-deliver.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@scaleway/regex": patch
3+
---
4+
5+
fix the cron regex

packages/regex/src/__tests__/index.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ const subDomain = 'sub.another-example.com'
6666
const dashStartDomain = '-sub.another-example.com'
6767
const uppercaseDomain = 'SUB.another-example.com'
6868
const longTldDomain = 'sub.another-example.verylongtld'
69-
const cronTest = '0 0 0 * * 0 1-4'
69+
const cronTest = '0 0 0 */5 * 0 1-4'
7070
const digitsTest = '0123456789'
7171
const elevenDigitsCodeTest = '01234567890'
7272
const emailTest = '[email protected]'

packages/regex/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export const uppercaseBasicSubdomain =
3434
export const advancedDomainName =
3535
/^(?:(?:(?:[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})?$/
3636

37-
export const cron = /^((((\d+,)+\d+|(\d+(\/|-)\d+)|\d+|\*) ?){5,7})$/
37+
export const cron = /^((((\d+,)+\d+|(\d+(\/|-)\d+)|\d+|\*|\*\/\d+) ?){5,7})$/
3838
export const digits = /^[0-9]*$/
3939
export const macAddress =
4040
/^([0-9a-fA-F][0-9a-fA-F]:){5}([0-9a-fA-F][0-9a-fA-F])$/

0 commit comments

Comments
 (0)