histoire 0.15.7 → 0.15.9

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.
@@ -28,7 +28,7 @@ export function useCollectStories(options, ctx) {
28
28
  });
29
29
  const maxThreads = ctx.config.collectMaxThreads ?? cpus().length;
30
30
  const threadsCount = ctx.mode === 'dev'
31
- ? Math.max(Math.min(maxThreads, cpus().length / 2), 1)
31
+ ? Math.max(Math.min(maxThreads, Math.floor(cpus().length / 2)), 1)
32
32
  : Math.max(Math.min(maxThreads, cpus().length - 1), 1);
33
33
  console.log(pc.blue(`Using ${threadsCount} threads for story collection`));
34
34
  const threadPool = new Tinypool({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "histoire",
3
- "version": "0.15.7",
3
+ "version": "0.15.9",
4
4
  "description": "A fast story book powered by Vite",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -38,10 +38,10 @@
38
38
  },
39
39
  "dependencies": {
40
40
  "@akryum/tinypool": "^0.3.1",
41
- "@histoire/app": "^0.15.7",
42
- "@histoire/controls": "^0.15.7",
43
- "@histoire/shared": "^0.15.7",
44
- "@histoire/vendors": "^0.15.7",
41
+ "@histoire/app": "^0.15.8",
42
+ "@histoire/controls": "^0.15.8",
43
+ "@histoire/shared": "^0.15.8",
44
+ "@histoire/vendors": "^0.15.8",
45
45
  "@types/flexsearch": "^0.7.3",
46
46
  "@types/markdown-it": "^12.2.3",
47
47
  "birpc": "^0.1.1",
@@ -43,7 +43,7 @@ export function useCollectStories (options: UseCollectStoriesOptions, ctx: Conte
43
43
  const maxThreads = ctx.config.collectMaxThreads ?? cpus().length
44
44
 
45
45
  const threadsCount = ctx.mode === 'dev'
46
- ? Math.max(Math.min(maxThreads, cpus().length / 2), 1)
46
+ ? Math.max(Math.min(maxThreads, Math.floor(cpus().length / 2)), 1)
47
47
  : Math.max(Math.min(maxThreads, cpus().length - 1), 1)
48
48
  console.log(pc.blue(`Using ${threadsCount} threads for story collection`))
49
49