@pgflow/dsl 0.1.10 → 0.1.12

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/dist/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @pgflow/dsl
2
2
 
3
+ ## 0.1.12
4
+
5
+ ### Patch Changes
6
+
7
+ - 7b1328e: Include invalid slug in validateSlug error message
8
+
9
+ ## 0.1.11
10
+
3
11
  ## 0.1.10
4
12
 
5
13
  ### Patch Changes
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pgflow/dsl",
3
- "version": "0.1.10",
3
+ "version": "0.1.12",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
package/dist/utils.js CHANGED
@@ -11,19 +11,19 @@
11
11
  */
12
12
  export function validateSlug(slug) {
13
13
  if (slug.length > 128) {
14
- throw new Error(`Slug cannot be longer than 128 characters`);
14
+ throw new Error(`Slug '${slug}' cannot be longer than 128 characters`);
15
15
  }
16
16
  if (/^\d/.test(slug)) {
17
- throw new Error(`Slug cannot start with a number`);
17
+ throw new Error(`Slug '${slug}' cannot start with a number`);
18
18
  }
19
19
  if (/^_/.test(slug)) {
20
- throw new Error(`Slug cannot start with an underscore`);
20
+ throw new Error(`Slug '${slug}' cannot start with an underscore`);
21
21
  }
22
22
  if (/\s/.test(slug)) {
23
- throw new Error(`Slug cannot contain spaces`);
23
+ throw new Error(`Slug '${slug}' cannot contain spaces`);
24
24
  }
25
25
  if (/[/:#\-?]/.test(slug)) {
26
- throw new Error(`Slug cannot contain special characters like /, :, ?, #, -`);
26
+ throw new Error(`Slug '${slug}' cannot contain special characters like /, :, ?, #, -`);
27
27
  }
28
28
  }
29
29
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pgflow/dsl",
3
- "version": "0.1.10",
3
+ "version": "0.1.12",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",