Skip to content

Commit

Permalink
Watch nested addons when using new Watchman versions
Browse files Browse the repository at this point in the history
The semver check is no longer valid and was preventing newer versions of
Watchman from properly watching nested addons.
  • Loading branch information
ginomiglio committed Sep 7, 2021
1 parent fda6cf7 commit e785055
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
4 changes: 1 addition & 3 deletions lib/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use strict';

const tmp = require('tmp');
const semver = require('semver');
const SilentError = require('silent-error');

const POLLING = 'polling';
Expand All @@ -26,7 +25,7 @@ class WatchPreference {
watchmanWorks(details) {
this._watchmanInfo.enabled = true;
this._watchmanInfo.version = details.version;
this._watchmanInfo.canNestRoots = semver.satisfies(details.version, '>= 3.7.0');
this._watchmanInfo.canNestRoots = true;
}

get watchmanInfo() {
Expand Down Expand Up @@ -223,7 +222,6 @@ class WatchDetector {

result.watchmanWorks({
version,
canNestRoots: true,
});

return result;
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
},
"dependencies": {
"heimdalljs-logger": "^0.1.10",
"semver": "^6.3.0",
"silent-error": "^1.1.1",
"tmp": "^0.1.0"
},
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2942,7 +2942,7 @@ semver-diff@^2.0.0:
dependencies:
semver "^5.0.3"

[email protected], semver@^6.1.0, semver@^6.2.0, semver@^6.3.0:
[email protected], semver@^6.1.0, semver@^6.2.0:
version "6.3.0"
resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d"
integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==
Expand Down

0 comments on commit e785055

Please sign in to comment.