mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
Support npm@5 and yarn (#6010)
* Support npm@5 and yarn Use package.default.json Partial #6008 - Overwrite package.json with package.default.json values - `dependencies` field is merged with package.default.json version taking precidence - `./nodebb upgrade` automatically does those things and runs `git pull` - use `./nodebb upgrade --dev` to avoid the `git pull` * added logic to preserve extraneous plugins installed in node_modules/ * Don't automatically git pull * Simplify package-install, run it on upgrade just in case
This commit is contained in:
committed by
Julian Lam
parent
e609e497b3
commit
dfad76120d
@@ -5,6 +5,7 @@ var assert = require('assert');
|
||||
var path = require('path');
|
||||
var nconf = require('nconf');
|
||||
var request = require('request');
|
||||
var fs = require('fs');
|
||||
|
||||
var db = require('./mocks/databasemock');
|
||||
var plugins = require('../src/plugins');
|
||||
@@ -128,6 +129,9 @@ describe('Plugins', function () {
|
||||
assert.equal(pluginData.active, false);
|
||||
assert.equal(pluginData.installed, true);
|
||||
|
||||
var packageFile = JSON.parse(fs.readFileSync(path.join(__dirname, '../package.json'), 'utf8'));
|
||||
assert(packageFile.dependencies[pluginName]);
|
||||
|
||||
done();
|
||||
});
|
||||
});
|
||||
@@ -160,6 +164,10 @@ describe('Plugins', function () {
|
||||
assert.ifError(err);
|
||||
assert.equal(pluginData.installed, false);
|
||||
assert.equal(pluginData.active, false);
|
||||
|
||||
var packageFile = JSON.parse(fs.readFileSync(path.join(__dirname, '../package.json'), 'utf8'));
|
||||
assert(!packageFile.dependencies[pluginName]);
|
||||
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user