@sphido/core 2.0.5 → 2.0.8

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/lib/get-pages.js CHANGED
@@ -24,8 +24,10 @@ export async function getPages({path = 'content', include = isPage} = {}, ...ext
24
24
  page.children = await getPages({path: page.path, include}, ...extenders);
25
25
  }
26
26
 
27
- // Calling callbacks
28
- await Promise.all(extenders.filter(f => typeof f === 'function').map(f => f(page, dirent, path)));
27
+ // Calling callbacks in the series
28
+ for (const cb of extenders.filter(f => typeof f === 'function')) {
29
+ await cb(page, dirent, path);
30
+ }
29
31
 
30
32
  // Assign objects with page
31
33
  return Object.assign(page, ...extenders.filter(o => typeof o === 'object'));
package/lib/is-page.js CHANGED
@@ -6,7 +6,8 @@
6
6
  * - skip drafts files with underscore at the beginning
7
7
  * - accept only *.html and *.md files
8
8
  *
9
- * @param {object} dirent
9
+ * @param {Dirent} dirent
10
+ * @param {string} path
10
11
  * @returns {boolean}
11
12
  */
12
13
  export function isPage(dirent) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sphido/core",
3
- "version": "2.0.5",
3
+ "version": "2.0.8",
4
4
  "author": {
5
5
  "name": "Roman Ožana",
6
6
  "email": "roman@ozana.cz",
@@ -40,5 +40,10 @@
40
40
  "scripts": {
41
41
  "test": "ava"
42
42
  },
43
- "gitHead": "57879c77bfb85863be6b105414251cd78098531d"
43
+ "xo": {
44
+ "rules": {
45
+ "no-await-in-loop": 0
46
+ }
47
+ },
48
+ "gitHead": "824894e08a8007b0c36d75fe005b153ccfa7c5fc"
44
49
  }
package/readme.md CHANGED
@@ -153,4 +153,4 @@ for (const page of allPages(pages)) {
153
153
 
154
154
  ## Source codes
155
155
 
156
- https://github.com/sphido/sphido/tree/main/packages/sphido-core
156
+ [@sphido/core](https://github.com/sphido/sphido/tree/main/packages/sphido-core