@appland/scanner 1.73.0 → 1.73.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ # [@appland/scanner-v1.73.1](https://github.com/getappmap/appmap-js/compare/@appland/scanner-v1.73.0...@appland/scanner-v1.73.1) (2022-11-29)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * Continue watching correctly after skipping files ([b5d7c2d](https://github.com/getappmap/appmap-js/commit/b5d7c2df6da78ae20b6547e0ddd23f41f20cb428))
7
+
1
8
  # [@appland/scanner-v1.73.0](https://github.com/getappmap/appmap-js/compare/@appland/scanner-v1.72.0...@appland/scanner-v1.73.0) (2022-11-28)
2
9
 
3
10
 
@@ -41,6 +41,7 @@ const chokidar = __importStar(require("chokidar"));
41
41
  const assert_1 = __importDefault(require("assert"));
42
42
  const path_1 = __importDefault(require("path"));
43
43
  const async_1 = require("async");
44
+ const node_util_1 = require("node:util");
44
45
  const formatReport_1 = require("./formatReport");
45
46
  const scanner_1 = __importDefault(require("./scanner"));
46
47
  const configurationProvider_1 = require("../../configuration/configurationProvider");
@@ -73,7 +74,9 @@ class Watcher {
73
74
  constructor(options) {
74
75
  this.options = options;
75
76
  this.scanEventEmitter = new events_1.default();
76
- this.queue = (0, async_1.queue)(this.scan.bind(this), 2);
77
+ // do not remove callbackify, apparently on windows
78
+ // passing plain async function doesn't work (?)
79
+ this.queue = (0, async_1.queue)((0, node_util_1.callbackify)(this.scan.bind(this)), 2);
77
80
  }
78
81
  watch() {
79
82
  return __awaiter(this, void 0, void 0, function* () {
@@ -134,7 +137,7 @@ class Watcher {
134
137
  return;
135
138
  this.queue.push(mtimePath);
136
139
  }
137
- scan(mtimePath, callback) {
140
+ scan(mtimePath) {
138
141
  return __awaiter(this, void 0, void 0, function* () {
139
142
  (0, assert_1.default)(this.config, `config should always be loaded before appmapWatcher triggers a scan`);
140
143
  const appmapFile = [path_1.default.dirname(mtimePath), 'appmap.json'].join('.');
@@ -153,10 +156,6 @@ class Watcher {
153
156
  this.scanEventEmitter.emit('scan', { scanResults: rawScanResults, elapsed });
154
157
  // Always report the raw data
155
158
  yield (0, promises_1.writeFile)(reportFile, (0, formatReport_1.formatReport)(rawScanResults));
156
- // tell the queue that the current task is complete
157
- if (callback) {
158
- callback();
159
- }
160
159
  });
161
160
  }
162
161
  reloadConfig() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appland/scanner",
3
- "version": "1.73.0",
3
+ "version": "1.73.1",
4
4
  "description": "Analyze AppMaps for code flaws",
5
5
  "bin": "built/cli.js",
6
6
  "files": [