Skip to content

Commit

Permalink
Merge pull request #26 from ginomiglio/can-nest-roots-version-check
Browse files Browse the repository at this point in the history
Watch nested addons when using new Watchman versions
  • Loading branch information
bertdeblock authored Jul 13, 2022
2 parents 946dd6d + 50dc496 commit ec2ab11
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 @@ -2944,7 +2944,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 ec2ab11

Please sign in to comment.