@allurereport/directory-watcher 3.0.0-beta.9 → 3.0.0
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/dist/index.d.ts +3 -2
- package/dist/index.js +1 -1
- package/dist/watcher.js +3 -3
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import type { EventName } from "chokidar/handler.js";
|
|
2
|
+
declare const watchDirectory: (directory: string, handler: (eventName: EventName, path: string) => void | Promise<void>, options?: {
|
|
2
3
|
usePolling?: boolean;
|
|
3
4
|
ignoreInitial?: boolean;
|
|
4
5
|
}) => () => Promise<void>;
|
|
5
6
|
export default watchDirectory;
|
|
6
7
|
export type { Watcher } from "./watcher.js";
|
|
7
|
-
export { newFilesInDirectoryWatcher, allureResultsDirectoriesWatcher, delayedFileProcessingWatcher, } from "./watcher.js";
|
|
8
|
+
export { findMatching, newFilesInDirectoryWatcher, allureResultsDirectoriesWatcher, delayedFileProcessingWatcher, } from "./watcher.js";
|
package/dist/index.js
CHANGED
|
@@ -12,4 +12,4 @@ const watchDirectory = (directory, handler, options = {}) => {
|
|
|
12
12
|
return () => watcher.close();
|
|
13
13
|
};
|
|
14
14
|
export default watchDirectory;
|
|
15
|
-
export { newFilesInDirectoryWatcher, allureResultsDirectoriesWatcher, delayedFileProcessingWatcher, } from "./watcher.js";
|
|
15
|
+
export { findMatching, newFilesInDirectoryWatcher, allureResultsDirectoriesWatcher, delayedFileProcessingWatcher, } from "./watcher.js";
|
package/dist/watcher.js
CHANGED
|
@@ -22,8 +22,8 @@ export const findMatching = async (watchDirectory, existingResults, match, maxim
|
|
|
22
22
|
try {
|
|
23
23
|
const dir = await opendir(watchDirectory);
|
|
24
24
|
for await (const dirent of dir) {
|
|
25
|
-
const path = join(dirent.parentPath, dirent.name);
|
|
26
|
-
if (dirent.name.at(0) === "." || dirent.name === "
|
|
25
|
+
const path = join(dirent.parentPath ?? dirent.path, dirent.name);
|
|
26
|
+
if (dirent.name.at(0) === "." || dirent.name === "node_modules") {
|
|
27
27
|
continue;
|
|
28
28
|
}
|
|
29
29
|
if (existingResults.has(path)) {
|
|
@@ -53,7 +53,7 @@ const findFiles = async (watchDirectory, existingResults, onNewFile, recursive)
|
|
|
53
53
|
if (dirent.isDirectory()) {
|
|
54
54
|
continue;
|
|
55
55
|
}
|
|
56
|
-
const path = join(dirent.parentPath, dirent.name);
|
|
56
|
+
const path = join(dirent.parentPath ?? dirent.path, dirent.name);
|
|
57
57
|
if (existingResults.has(path)) {
|
|
58
58
|
continue;
|
|
59
59
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@allurereport/directory-watcher",
|
|
3
|
-
"version": "3.0.0
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "File system watcher for directories",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"allure",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"test": "rimraf ./out && vitest run"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"chokidar": "^4.0.
|
|
33
|
+
"chokidar": "^4.0.3"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@stylistic/eslint-plugin": "^2.6.1",
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"@types/node": "^20.17.9",
|
|
39
39
|
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
|
40
40
|
"@typescript-eslint/parser": "^8.0.0",
|
|
41
|
-
"@vitest/runner": "^2.1.
|
|
42
|
-
"allure-vitest": "^3.
|
|
41
|
+
"@vitest/runner": "^2.1.9",
|
|
42
|
+
"allure-vitest": "^3.3.3",
|
|
43
43
|
"eslint": "^8.57.0",
|
|
44
44
|
"eslint-config-prettier": "^9.1.0",
|
|
45
45
|
"eslint-plugin-import": "^2.29.1",
|
|
@@ -50,6 +50,6 @@
|
|
|
50
50
|
"rimraf": "^6.0.1",
|
|
51
51
|
"ts-node": "^10.9.2",
|
|
52
52
|
"typescript": "^5.6.3",
|
|
53
|
-
"vitest": "^2.1.
|
|
53
|
+
"vitest": "^2.1.9"
|
|
54
54
|
}
|
|
55
55
|
}
|