directory-tree 3.5.0 → 3.5.1

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,4 +28,5 @@ jobs:
28
28
  cache: 'npm'
29
29
  - run: npm ci
30
30
  - run: npm run build --if-present
31
- - run: npm test
31
+ - run: npm test
32
+ - run: npm run test-ts
package/README.md CHANGED
@@ -1,5 +1,3 @@
1
- [![Build Status](https://api.travis-ci.com/mihneadb/node-directory-tree.svg?branch=master)](https://api.travis-ci.com/mihneadb/node-directory-tree.svg?branch=master)
2
-
3
1
  # directory-tree
4
2
 
5
3
  Creates a JavaScript object representing a directory tree.
package/index.d.ts CHANGED
@@ -34,7 +34,7 @@ declare namespace directoryTree {
34
34
  depth?: number;
35
35
  }
36
36
 
37
- export type DirectoryTreeCallback<TCustom extends IObj = IObj> = (
37
+ export type DirectoryTreeCallback<TCustom extends Record<string, any> = Record<string, any>> = (
38
38
  item: DirectoryTree<TCustom>,
39
39
  path: string,
40
40
  stats: Stats
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "directory-tree",
3
- "version": "3.5.0",
3
+ "version": "3.5.1",
4
4
  "description": "Convert a directory tree to a JS object.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -22,14 +22,17 @@
22
22
  "command-line-usage": "^6.1.1"
23
23
  },
24
24
  "devDependencies": {
25
+ "@types/node": "^18.11.17",
25
26
  "chai": "^2.3.0",
26
- "mocha": "^8.3.2"
27
+ "mocha": "^10.2.0",
28
+ "typescript": "^4.9.4"
27
29
  },
28
30
  "bin": "bin/index.js",
29
31
  "engines": {
30
32
  "node": ">=10.0"
31
33
  },
32
34
  "scripts": {
33
- "test": "mocha"
35
+ "test": "mocha",
36
+ "test-ts": "./node_modules/.bin/tsc index.d.ts"
34
37
  }
35
38
  }
package/.travis.yml DELETED
@@ -1,3 +0,0 @@
1
- language: node_js
2
- node_js:
3
- - "10.0"