@appland/scanner 1.59.1 → 1.59.2

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/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ # [@appland/scanner-v1.59.2](https://github.com/applandinc/appmap-js/compare/@appland/scanner-v1.59.1...@appland/scanner-v1.59.2) (2022-06-29)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * Use absolute paths when creating watchers ([afc81e0](https://github.com/applandinc/appmap-js/commit/afc81e03f1e5004288acda75c89bb61a1857c462))
7
+
1
8
  # [@appland/scanner-v1.59.1](https://github.com/applandinc/appmap-js/compare/@appland/scanner-v1.59.0...@appland/scanner-v1.59.1) (2022-06-15)
2
9
 
3
10
 
@@ -44,6 +44,7 @@ const fs_1 = require("fs");
44
44
  const util_1 = require("util");
45
45
  const configurationProvider_1 = require("../../configuration/configurationProvider");
46
46
  const assert_1 = __importDefault(require("assert"));
47
+ const path_1 = __importDefault(require("path"));
47
48
  class Watcher {
48
49
  constructor(options) {
49
50
  this.options = options;
@@ -57,10 +58,14 @@ class Watcher {
57
58
  this.configWatcher
58
59
  .on('add', this.reloadConfig.bind(this))
59
60
  .on('change', this.reloadConfig.bind(this));
60
- this.appmapWatcher = chokidar.watch(`${this.options.appmapDir}/**/mtime`, {
61
+ // Chokidar struggles with relative paths. Make sure the watch pattern is absolute.
62
+ const watchPattern = path_1.default.resolve(this.options.appmapDir, '**', 'mtime');
63
+ this.appmapWatcher = chokidar.watch(watchPattern, {
61
64
  ignoreInitial: true,
62
65
  });
63
- this.appmapWatcher.on('add', this.scan.bind(this)).on('change', this.scan.bind(this));
66
+ this.appmapWatcher
67
+ .on('add', (filePath) => this.scan(filePath))
68
+ .on('change', (filePath) => this.scan(filePath));
64
69
  });
65
70
  }
66
71
  close() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appland/scanner",
3
- "version": "1.59.1",
3
+ "version": "1.59.2",
4
4
  "description": "",
5
5
  "bin": "built/cli.js",
6
6
  "files": [