@storybook/core-server 6.5.0-beta.6 → 6.5.0-beta.7

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.
@@ -117,9 +117,13 @@ class StoryIndexGenerator {
117
117
 
118
118
  try {
119
119
  var importPath = (0, _slash.default)((0, _coreCommon.normalizeStoryPath)(relativePath));
120
- var defaultTitle = (0, _store.autoTitleFromSpecifier)(importPath, specifier);
120
+
121
+ var makeTitle = function (userTitle) {
122
+ return (0, _store.userOrAutoTitleFromSpecifier)(importPath, specifier, userTitle);
123
+ };
124
+
121
125
  var csf = (await (0, _csfTools.readCsfOrMdx)(absolutePath, {
122
- defaultTitle: defaultTitle
126
+ makeTitle: makeTitle
123
127
  })).parse();
124
128
  csf.stories.forEach(function ({
125
129
  id: id,
@@ -27,7 +27,7 @@ import path from 'path';
27
27
  import fs from 'fs-extra';
28
28
  import glob from 'globby';
29
29
  import slash from 'slash';
30
- import { autoTitleFromSpecifier, sortStoriesV7 } from '@storybook/store';
30
+ import { userOrAutoTitleFromSpecifier, sortStoriesV7 } from '@storybook/store';
31
31
  import { normalizeStoryPath } from '@storybook/core-common';
32
32
  import { logger } from '@storybook/node-logger';
33
33
  import { readCsfOrMdx, getStorySortParameter } from '@storybook/csf-tools';
@@ -90,9 +90,13 @@ export class StoryIndexGenerator {
90
90
 
91
91
  try {
92
92
  var importPath = slash(normalizeStoryPath(relativePath));
93
- var defaultTitle = autoTitleFromSpecifier(importPath, specifier);
93
+
94
+ var makeTitle = function (userTitle) {
95
+ return userOrAutoTitleFromSpecifier(importPath, specifier, userTitle);
96
+ };
97
+
94
98
  var csf = (await readCsfOrMdx(absolutePath, {
95
- defaultTitle: defaultTitle
99
+ makeTitle: makeTitle
96
100
  })).parse();
97
101
  csf.stories.forEach(function ({
98
102
  id: id,
@@ -27,7 +27,7 @@ import path from 'path';
27
27
  import fs from 'fs-extra';
28
28
  import glob from 'globby';
29
29
  import slash from 'slash';
30
- import { autoTitleFromSpecifier, sortStoriesV7 } from '@storybook/store';
30
+ import { userOrAutoTitleFromSpecifier, sortStoriesV7 } from '@storybook/store';
31
31
  import { normalizeStoryPath } from '@storybook/core-common';
32
32
  import { logger } from '@storybook/node-logger';
33
33
  import { readCsfOrMdx, getStorySortParameter } from '@storybook/csf-tools';
@@ -90,9 +90,13 @@ export class StoryIndexGenerator {
90
90
 
91
91
  try {
92
92
  var importPath = slash(normalizeStoryPath(relativePath));
93
- var defaultTitle = autoTitleFromSpecifier(importPath, specifier);
93
+
94
+ var makeTitle = function (userTitle) {
95
+ return userOrAutoTitleFromSpecifier(importPath, specifier, userTitle);
96
+ };
97
+
94
98
  var csf = (await readCsfOrMdx(absolutePath, {
95
- defaultTitle: defaultTitle
99
+ makeTitle: makeTitle
96
100
  })).parse();
97
101
  csf.stories.forEach(function ({
98
102
  id: id,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/core-server",
3
- "version": "6.5.0-beta.6",
3
+ "version": "6.5.0-beta.7",
4
4
  "description": "Storybook framework-agnostic API",
5
5
  "keywords": [
6
6
  "storybook"
@@ -40,17 +40,17 @@
40
40
  },
41
41
  "dependencies": {
42
42
  "@discoveryjs/json-ext": "^0.5.3",
43
- "@storybook/builder-webpack4": "6.5.0-beta.6",
44
- "@storybook/core-client": "6.5.0-beta.6",
45
- "@storybook/core-common": "6.5.0-beta.6",
46
- "@storybook/core-events": "6.5.0-beta.6",
43
+ "@storybook/builder-webpack4": "6.5.0-beta.7",
44
+ "@storybook/core-client": "6.5.0-beta.7",
45
+ "@storybook/core-common": "6.5.0-beta.7",
46
+ "@storybook/core-events": "6.5.0-beta.7",
47
47
  "@storybook/csf": "0.0.2--canary.4566f4d.1",
48
- "@storybook/csf-tools": "6.5.0-beta.6",
49
- "@storybook/manager-webpack4": "6.5.0-beta.6",
50
- "@storybook/node-logger": "6.5.0-beta.6",
48
+ "@storybook/csf-tools": "6.5.0-beta.7",
49
+ "@storybook/manager-webpack4": "6.5.0-beta.7",
50
+ "@storybook/node-logger": "6.5.0-beta.7",
51
51
  "@storybook/semver": "^7.3.2",
52
- "@storybook/store": "6.5.0-beta.6",
53
- "@storybook/telemetry": "6.5.0-beta.6",
52
+ "@storybook/store": "6.5.0-beta.7",
53
+ "@storybook/telemetry": "6.5.0-beta.7",
54
54
  "@types/node": "^14.0.10 || ^16.0.0",
55
55
  "@types/node-fetch": "^2.5.7",
56
56
  "@types/pretty-hrtime": "^1.0.0",
@@ -86,7 +86,7 @@
86
86
  "x-default-browser": "^0.4.0"
87
87
  },
88
88
  "devDependencies": {
89
- "@storybook/builder-webpack5": "6.5.0-beta.6",
89
+ "@storybook/builder-webpack5": "6.5.0-beta.7",
90
90
  "@types/compression": "^1.7.0",
91
91
  "@types/ip": "^1.1.0",
92
92
  "@types/serve-favicon": "^2.5.2",
@@ -111,6 +111,6 @@
111
111
  "publishConfig": {
112
112
  "access": "public"
113
113
  },
114
- "gitHead": "e86538e2acb3fbbf207d9113f58c1d1bb56138fd",
114
+ "gitHead": "14bb6d241c888cc3be6adba94c3e3a1ceddadf74",
115
115
  "sbmodern": "dist/modern/index.js"
116
116
  }