From 4cb0424d23a0e967bc0594c4f13361b690331697 Mon Sep 17 00:00:00 2001 From: "Juan Picado @jotadeveloper" Date: Thu, 25 May 2017 13:04:09 +0200 Subject: [PATCH] #103 Rename variables, organize methods, privates goes to the bottom --- lib/local-storage.js | 4 +--- lib/storage.js | 3 ++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/local-storage.js b/lib/local-storage.js index b12af15b4..a3520e23c 100644 --- a/lib/local-storage.js +++ b/lib/local-storage.js @@ -40,11 +40,9 @@ class Storage { /** * Constructor * @param {Object} config config list of properties - * @param {LocalData} localList reference */ - constructor(config, localList) { + constructor(config) { this.config = config; - this.localList = localList; // local data handler is linked with the configuration handler this.localList = new LocalData(Path.join(Path.resolve(Path.dirname(config.self_path || ''), config.storage), // FUTURE: the database might be parameterizable from config.yaml diff --git a/lib/storage.js b/lib/storage.js index fea3106d6..f6b996728 100644 --- a/lib/storage.js +++ b/lib/storage.js @@ -7,9 +7,9 @@ const Error = require('http-errors'); const semver = require('semver'); const Crypto = require('crypto'); const Stream = require('stream'); +const LocalStorage = require('./local-storage'); const Search = require('./search'); -const LocalStorage = require('./local-storage'); const Logger = require('./logger'); const MyStreams = require('./streams'); const Proxy = require('./up-storage'); @@ -561,6 +561,7 @@ class Storage { if (Object.prototype.hasOwnProperty.call(up_res.versions, i)) { // this won't be serialized to json, // kinda like an ES6 Symbol + // FIXME: perhaps Symbol('_verdaccio_uplink') here? Object.defineProperty(up_res.versions[i], '_verdaccio_uplink', { value: up.upname, enumerable: false,