histoire 0.15.3 → 0.15.4

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.
@@ -52,6 +52,11 @@ function getAbsoluteFilePath(relativeFilePath) {
52
52
  }
53
53
  export function addStory(relativeFilePath, virtualModuleCode) {
54
54
  const absoluteFilePath = getAbsoluteFilePath(relativeFilePath);
55
+ for (const file of context.storyFiles) {
56
+ if (file.path === absoluteFilePath) {
57
+ return file;
58
+ }
59
+ }
55
60
  const fileId = paramCase(relativeFilePath.toLowerCase());
56
61
  let fileName = basename(relativeFilePath);
57
62
  if (fileName.includes('.')) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "histoire",
3
- "version": "0.15.3",
3
+ "version": "0.15.4",
4
4
  "description": "A fast story book powered by Vite",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -37,10 +37,10 @@
37
37
  "histoire": "./bin.mjs"
38
38
  },
39
39
  "dependencies": {
40
- "@histoire/app": "^0.15.3",
41
- "@histoire/controls": "^0.15.3",
42
- "@histoire/shared": "^0.15.3",
43
- "@histoire/vendors": "^0.15.3",
40
+ "@histoire/app": "^0.15.4",
41
+ "@histoire/controls": "^0.15.4",
42
+ "@histoire/shared": "^0.15.4",
43
+ "@histoire/vendors": "^0.15.4",
44
44
  "@types/flexsearch": "^0.7.3",
45
45
  "@types/markdown-it": "^12.2.3",
46
46
  "birpc": "^0.1.1",
@@ -68,6 +68,13 @@ function getAbsoluteFilePath (relativeFilePath: string) {
68
68
 
69
69
  export function addStory (relativeFilePath: string, virtualModuleCode?: string) {
70
70
  const absoluteFilePath = getAbsoluteFilePath(relativeFilePath)
71
+
72
+ for (const file of context.storyFiles) {
73
+ if (file.path === absoluteFilePath) {
74
+ return file
75
+ }
76
+ }
77
+
71
78
  const fileId = paramCase(relativeFilePath.toLowerCase())
72
79
  let fileName = basename(relativeFilePath)
73
80
  if (fileName.includes('.')) {