Skip to content

Commit

Permalink
fix!: Remove semver check between local & global installs
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyler Kellen authored and phated committed Nov 21, 2021
1 parent 1f7394f commit 6155cb6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
11 changes: 2 additions & 9 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ function Liftoff (opts) {
cwdFlag: 'cwd',
preloadFlag: 'require',
completionFlag: 'completion',
completions: null,
cliPackage: null
completions: null
};
if(opts.name) {
if (!opts.processTitle) {
Expand Down Expand Up @@ -55,7 +54,6 @@ Liftoff.prototype.requireLocal = function (module, basedir) {
};

Liftoff.prototype.launch = function (fn, argv) {
console.log(this);
if(typeof fn !== 'function') {
throw new Error('You must provide a callback function.');
}
Expand Down Expand Up @@ -96,7 +94,7 @@ Liftoff.prototype.launch = function (fn, argv) {
configNameRegex: null,
configPath: null,
configBase: null,
localPackage: null,
modulePackage: null,
modulePath: null
};

Expand All @@ -117,11 +115,6 @@ Liftoff.prototype.launch = function (fn, argv) {
try {
env.modulePath = findLocal(this.moduleName, env.configBase);
env.modulePackage = require(findup('package.json', {cwd: env.modulePath}));

// check for semver difference between cli and local installation
if (semver.gt(this.cliPackage.version, env.modulePackage.version)) {
this.emit('versionMismatch', this.cliPackage.version, this.modulePackage.version);
}
} catch (e) {}
}

Expand Down
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@
"findup-sync": "~0.1.2",
"resolve": "~0.6.1",
"minimist": "0.0.5",
"semver": "~2.2.1",
"extend": "~1.2.1",
"lodash.merge": "~2.4.1"
"extend": "~1.2.1"
}
}

0 comments on commit 6155cb6

Please sign in to comment.