@storybook/addon-svelte-csf 2.0.1 → 2.0.3

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,3 +1,27 @@
1
+ # v2.0.3 (Wed Apr 20 2022)
2
+
3
+ #### 🐛 Bug Fix
4
+
5
+ - Update peerdependencies to work with sb@next [#56](https://github.com/storybookjs/addon-svelte-csf/pull/56) ([@francoisromain](https://github.com/francoisromain))
6
+
7
+ #### Authors: 1
8
+
9
+ - François Romain ([@francoisromain](https://github.com/francoisromain))
10
+
11
+ ---
12
+
13
+ # v2.0.2 (Sun Apr 17 2022)
14
+
15
+ #### 🐛 Bug Fix
16
+
17
+ - Fix names with special char at end [#55](https://github.com/storybookjs/addon-svelte-csf/pull/55) ([@j3rem1e](https://github.com/j3rem1e))
18
+
19
+ #### Authors: 1
20
+
21
+ - Jérémie ([@j3rem1e](https://github.com/j3rem1e))
22
+
23
+ ---
24
+
1
25
  # v2.0.1 (Fri Apr 08 2022)
2
26
 
3
27
  #### 🐛 Bug Fix
@@ -25,7 +25,7 @@ function extractId(_ref) {
25
25
  return id;
26
26
  }
27
27
 
28
- var generated = name.replace(/\W+(.)/g, function (_, chr) {
28
+ var generated = name.replace(/\W+(.|$)/g, function (_, chr) {
29
29
  return chr.toUpperCase();
30
30
  });
31
31
 
@@ -8,6 +8,11 @@ describe('extract-id', function () {
8
8
  name: 'Name with spaces'
9
9
  })).toBe('NameWithSpaces');
10
10
  });
11
+ test('name with parenthesis', function () {
12
+ expect((0, _extractId.extractId)({
13
+ name: 'Name with (parenthesis)'
14
+ })).toBe('NameWithParenthesis');
15
+ });
11
16
  test('duplicates id', function () {
12
17
  expect((0, _extractId.extractId)({
13
18
  name: 'Button'
@@ -18,7 +18,7 @@ export function extractId(_ref) {
18
18
  return id;
19
19
  }
20
20
 
21
- var generated = name.replace(/\W+(.)/g, function (_, chr) {
21
+ var generated = name.replace(/\W+(.|$)/g, function (_, chr) {
22
22
  return chr.toUpperCase();
23
23
  });
24
24
 
@@ -5,6 +5,11 @@ describe('extract-id', function () {
5
5
  name: 'Name with spaces'
6
6
  })).toBe('NameWithSpaces');
7
7
  });
8
+ test('name with parenthesis', function () {
9
+ expect(extractId({
10
+ name: 'Name with (parenthesis)'
11
+ })).toBe('NameWithParenthesis');
12
+ });
8
13
  test('duplicates id', function () {
9
14
  expect(extractId({
10
15
  name: 'Button'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/addon-svelte-csf",
3
- "version": "2.0.1",
3
+ "version": "2.0.3",
4
4
  "description": "Allows to write stories in Svelte syntax",
5
5
  "keywords": [
6
6
  "storybook-addons",
@@ -68,14 +68,14 @@
68
68
  "typescript": "^3.9.7"
69
69
  },
70
70
  "peerDependencies": {
71
- "@storybook/addons": "^6.4.20",
72
- "@storybook/api": "^6.4.20",
73
- "@storybook/client-api": "^6.4.20",
74
- "@storybook/client-logger": "^6.4.20",
75
- "@storybook/components": "^6.4.20",
76
- "@storybook/core-events": "^6.4.20",
77
- "@storybook/svelte": "^6.4.20",
78
- "@storybook/theming": "^6.4.20",
71
+ "@storybook/addons": ">=6.4.20",
72
+ "@storybook/api": ">=6.4.20",
73
+ "@storybook/client-api": ">=6.4.20",
74
+ "@storybook/client-logger": ">=6.4.20",
75
+ "@storybook/components": ">=6.4.20",
76
+ "@storybook/core-events": ">=6.4.20",
77
+ "@storybook/svelte": ">=6.4.20",
78
+ "@storybook/theming": ">=6.4.20",
79
79
  "react": "^16.8.0 || ^17.0.0",
80
80
  "react-dom": "^16.8.0 || ^17.0.0",
81
81
  "svelte": "^3.46.6",