@tenjuu99/blog 0.2.52 → 0.2.54

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.
Files changed (2) hide show
  1. package/lib/indexer.js +3 -1
  2. package/package.json +2 -2
package/lib/indexer.js CHANGED
@@ -17,7 +17,9 @@ const collect = (dir, namePrefix = '', promises = []) => {
17
17
  const dirents = readdirSync(dir, { withFileTypes: true })
18
18
  dirents.forEach((dirent) => {
19
19
  if (dirent.isDirectory()) {
20
- collect(`${dirent.path}/${dirent.name}`, namePrefix + dirent.name + '/', promises)
20
+ // Node.js v22 compatibility: fallback to dirent.path if parentPath is unavailable
21
+ const basePath = dirent.parentPath ?? dirent.path ?? dir;
22
+ collect(`${basePath}/${dirent.name}`, namePrefix + dirent.name + '/', promises)
21
23
  } else {
22
24
  const regexp = `\\.(${config.allowedSrcExt})$`
23
25
  if (dirent.name.match(regexp)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tenjuu99/blog",
3
- "version": "0.2.52",
3
+ "version": "0.2.54",
4
4
  "description": "blog template",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -30,7 +30,7 @@
30
30
  },
31
31
  "type": "module",
32
32
  "engines": {
33
- "node": ">=21.7"
33
+ "node": ">=22"
34
34
  },
35
35
  "files": [
36
36
  "lib",