webui: package sidebar test cases

This commit is contained in:
Ayush Sharma 2017-12-20 09:40:53 +05:30 committed by juanpicado
parent c602a4c9e7
commit cbcd86efb4
24 changed files with 1022 additions and 10 deletions

View File

@ -17,7 +17,7 @@ module.exports = {
'global.js'
],
'testPathIgnorePatterns': [
'test/webui/components/__snapshots__/'
'__snapshots__'
],
'moduleNameMapper': {
'\\.(scss)$': '<rootDir>/node_modules/identity-obj-proxy',

View File

@ -136,8 +136,8 @@
"prepublish": "in-publish && npm run build:webui || not-in-publish",
"flow": "flow",
"pretest": "npm run code:build",
"test": "cross-env NODE_ENV=test BABEL_ENV=test jest",
"test:unit": "cross-env NODE_ENV=test BABEL_ENV=test jest '(/test/unit.*\\.spec|/test/webui/.*\\.spec)\\.js'",
"test": "cross-env NODE_ENV=test BABEL_ENV=test jest --maxWorkers 2",
"test:unit": "cross-env NODE_ENV=test BABEL_ENV=test jest --maxWorkers 2'(/test/unit.*\\.spec|/test/webui/.*\\.spec)\\.js'",
"pre:ci": "npm run lint && npm run build:webui",
"coverage:publish": "codecov",
"lint": "npm run flow && eslint .",

View File

@ -15,6 +15,7 @@ export default class PackageSidebar extends React.Component {
constructor(props) {
super(props);
this.loadPackageData = this.loadPackageData.bind(this);
}
async componentDidMount() {

View File

@ -9,12 +9,10 @@ import ModuleContentPlaceholder from '../../ModuleContentPlaceholder';
export default class Dependencies extends React.Component {
static propTypes = {
packageMeta: PropTypes.object
packageMeta: PropTypes.object.isRequired
};
get dependencies() {
if (!this.props.packageMeta) return {};
return _.get(this, 'props.packageMeta.latest.dependencies', {});
}

View File

@ -1,7 +1,7 @@
import React from 'react';
import PropTypes from 'prop-types';
import Module from '../../Module';
import datetime from '../../../../../utils/datetime';
import classes from './style.scss';
export default class LastSync extends React.Component {
@ -19,14 +19,14 @@ export default class LastSync extends React.Component {
}
});
return lastUpdate ? (new Date(lastUpdate)).toLocaleString() : '';
return lastUpdate ? datetime(lastUpdate) : '';
}
get recentReleases() {
let recentReleases = Object.keys(this.props.packageMeta.time).map((version) => {
return {
version,
time: new Date(this.props.packageMeta.time[version]).toLocaleString()
time: datetime(this.props.packageMeta.time[version])
};
});

View File

@ -8,7 +8,7 @@ import MaintainerInfo from './MaintainerInfo';
export default class Maintainers extends React.Component {
static propTypes = {
packageMeta: PropTypes.object
packageMeta: PropTypes.object.isRequired
};
state = {};

View File

@ -0,0 +1,16 @@
/**
* Date time in LocaleString
* @param {string} input
* @returns {string}
*/
export default function datetime(input) {
const date = new Date(input);
return date.toLocaleString('en-GB', {
month: 'short',
day: 'numeric',
year: 'numeric',
hour: 'numeric',
minute: 'numeric',
hour12: true
});
}

View File

@ -0,0 +1,3 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`<PackageSidebar /> : <Dependencies /> should load the package and match snapshot 1`] = `"<div class=\\"module dependenciesModule\\"><h2 class=\\"moduleTitle\\">Dependencies</h2><div><ul><li title=\\"Depend on version: 0.0.3\\"><a href=\\"nullblank/#/detail/@verdaccio/file-locking\\">@verdaccio/file-locking</a><span>, </span></li><li title=\\"Depend on version: 0.0.2\\"><a href=\\"nullblank/#/detail/@verdaccio/streams\\">@verdaccio/streams</a><span>, </span></li><li title=\\"Depend on version: ^1.1.1\\"><a href=\\"nullblank/#/detail/JSONStream\\">JSONStream</a><span>, </span></li><li title=\\"Depend on version: ^1.1.2\\"><a href=\\"nullblank/#/detail/apache-md5\\">apache-md5</a><span>, </span></li><li title=\\"Depend on version: ^2.0.1\\"><a href=\\"nullblank/#/detail/async\\">async</a><span>, </span></li><li title=\\"Depend on version: ^1.15.0\\"><a href=\\"nullblank/#/detail/body-parser\\">body-parser</a><span>, </span></li><li title=\\"Depend on version: ^1.8.0\\"><a href=\\"nullblank/#/detail/bunyan\\">bunyan</a><span>, </span></li><li title=\\"Depend on version: ^2.0.1\\"><a href=\\"nullblank/#/detail/chalk\\">chalk</a><span>, </span></li><li title=\\"Depend on version: ^2.11.0\\"><a href=\\"nullblank/#/detail/commander\\">commander</a><span>, </span></li><li title=\\"Depend on version: 1.6.2\\"><a href=\\"nullblank/#/detail/compression\\">compression</a><span>, </span></li><li title=\\"Depend on version: ^0.7.0\\"><a href=\\"nullblank/#/detail/cookies\\">cookies</a><span>, </span></li><li title=\\"Depend on version: ^2.8.3\\"><a href=\\"nullblank/#/detail/cors\\">cors</a><span>, </span></li><li title=\\"Depend on version: 4.15.3\\"><a href=\\"nullblank/#/detail/express\\">express</a><span>, </span></li><li title=\\"Depend on version: ^4.3.2\\"><a href=\\"nullblank/#/detail/global\\">global</a><span>, </span></li><li title=\\"Depend on version: 4.0.5\\"><a href=\\"nullblank/#/detail/handlebars\\">handlebars</a><span>, </span></li><li title=\\"Depend on version: ^1.4.0\\"><a href=\\"nullblank/#/detail/http-errors\\">http-errors</a><span>, </span></li><li title=\\"Depend on version: 1.0.1\\"><a href=\\"nullblank/#/detail/js-string-escape\\">js-string-escape</a><span>, </span></li><li title=\\"Depend on version: ^3.6.0\\"><a href=\\"nullblank/#/detail/js-yaml\\">js-yaml</a><span>, </span></li><li title=\\"Depend on version: ^7.4.1\\"><a href=\\"nullblank/#/detail/jsonwebtoken\\">jsonwebtoken</a><span>, </span></li><li title=\\"Depend on version: ^1.0.1\\"><a href=\\"nullblank/#/detail/lockfile\\">lockfile</a><span>, </span></li><li title=\\"Depend on version: 4.17.4\\"><a href=\\"nullblank/#/detail/lodash\\">lodash</a><span>, </span></li><li title=\\"Depend on version: ^0.7.0\\"><a href=\\"nullblank/#/detail/lunr\\">lunr</a><span>, </span></li><li title=\\"Depend on version: 0.3.6\\"><a href=\\"nullblank/#/detail/marked\\">marked</a><span>, </span></li><li title=\\"Depend on version: ^1.3.6\\"><a href=\\"nullblank/#/detail/mime\\">mime</a><span>, </span></li><li title=\\"Depend on version: ^3.0.2\\"><a href=\\"nullblank/#/detail/minimatch\\">minimatch</a><span>, </span></li><li title=\\"Depend on version: ^0.5.1\\"><a href=\\"nullblank/#/detail/mkdirp\\">mkdirp</a><span>, </span></li><li title=\\"Depend on version: ^0.4.0\\"><a href=\\"nullblank/#/detail/pkginfo\\">pkginfo</a><span>, </span></li><li title=\\"Depend on version: ^2.72.0\\"><a href=\\"nullblank/#/detail/request\\">request</a><span>, </span></li><li title=\\"Depend on version: ^5.1.0\\"><a href=\\"nullblank/#/detail/semver\\">semver</a><span>, </span></li><li title=\\"Depend on version: ^1.0.0\\"><a href=\\"nullblank/#/detail/unix-crypt-td-js\\">unix-crypt-td-js</a></li></ul></div></div>"`;

View File

@ -0,0 +1,3 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`<PackageSidebar /> : <LastSync /> should load the LastSync component and match snapshot 1`] = `"<div class=\\"module releasesModule\\"><h2 class=\\"moduleTitle\\">Last Sync<span>Dec 14, 2017, 3:43 PM</span></h2><div><ul><li><span>2.7.1</span><span>Dec 14, 2017, 3:43 PM</span></li><li><span>2.7.0</span><span>Dec 5, 2017, 11:25 PM</span></li><li><span>2.6.6</span><span>Nov 8, 2017, 10:47 PM</span></li></ul></div></div>"`;

View File

@ -0,0 +1,3 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`<PackageSidebar /> : <Maintainers /> <MaintainerInfo /> should load the component and match with snapshot 1`] = `"<div class=\\"maintainer\\" title=\\"test\\"><img src=\\"http://xyz.com/profile.jpg\\" alt=\\"test-title test&#x27;s avatar\\" title=\\"test-title test&#x27;s avatar\\"/><span>test</span></div>"`;

View File

@ -0,0 +1,3 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`<PackageSidebar /> : <Maintainers /> should match with the props 1`] = `"<div class=\\"module maintainersModule\\"><h2 class=\\"moduleTitle\\">Maintainers</h2><div><ul><div class=\\"maintainer\\" title=\\"Alex Kocharin\\"><img src=\\"https://www.gravatar.com/avatar/a5a236ba477ee98908600c40cda74f4a\\" alt=\\"Author Alex Kocharin's avatar\\" title=\\"Author Alex Kocharin's avatar\\"><span>Alex Kocharin</span></div><div class=\\"maintainer\\" title=\\"030\\"><img src=\\"https://www.gravatar.com/avatar/4ef03c2bf8d8689527903212d96fb45b\\" alt=\\"Contributors 030's avatar\\" title=\\"Contributors 030's avatar\\"><span>030</span></div><div class=\\"maintainer\\" title=\\"Alex Vernacchia\\"><img src=\\"https://www.gravatar.com/avatar/06975001f7f2be7052bcf978700c6112\\" alt=\\"Contributors Alex Vernacchia's avatar\\" title=\\"Contributors Alex Vernacchia's avatar\\"><span>Alex Vernacchia</span></div><div class=\\"maintainer\\" title=\\"Alexander Makarenko\\"><img src=\\"https://www.gravatar.com/avatar/d9acfc4ed4e49a436738ff26a722dce4\\" alt=\\"Contributors Alexander Makarenko's avatar\\" title=\\"Contributors Alexander Makarenko's avatar\\"><span>Alexander Makarenko</span></div><div class=\\"maintainer\\" title=\\"Alexandre-io\\"><img src=\\"https://www.gravatar.com/avatar/2e095c7cfd278f72825d0fed6e12e3b1\\" alt=\\"Contributors Alexandre-io's avatar\\" title=\\"Contributors Alexandre-io's avatar\\"><span>Alexandre-io</span></div><div class=\\"maintainer\\" title=\\"Aram Drevekenin\\"><img src=\\"https://www.gravatar.com/avatar/371edff6d79c39bb9e36bde39d41a4b0\\" alt=\\"Contributors Aram Drevekenin's avatar\\" title=\\"Contributors Aram Drevekenin's avatar\\"><span>Aram Drevekenin</span></div></ul><button class=\\"showAllContributors\\" title=\\"Current list only show the author and first 5 contributors unique by name\\">Show all contributor</button></div></div>"`;

View File

@ -0,0 +1,3 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`<PackageSidebar /> : <Module /> should load module component 1`] = `"<div class=\\"module module-component\\"><h2 class=\\"moduleTitle\\">Test title<span>Test description</span></h2><div><p>test children</p></div></div>"`;

View File

@ -0,0 +1,3 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`<PackageSidebar /> : <ModuleContentPlaceholder /> should load module component 1`] = `"<p class=\\"emptyPlaceholder\\">Test text</p>"`;

View File

@ -0,0 +1,3 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`<PackageSidebar /> component should load the packageMeta 1`] = `"<aside>Loading package information...</aside>"`;

View File

@ -0,0 +1,60 @@
/**
* Dependencies component
*/
import React from 'react';
import { mount, shallow } from 'enzyme';
import Dependencies from '../../../../src/webui/src/components/PackageSidebar/modules/Dependencies/';
import { packageMeta } from '../store/packageMeta';
console.error = jest.fn();
describe('<PackageSidebar /> : <Dependencies />', () => {
it('should throw error for the required props', () => {
mount(<Dependencies />);
expect(console.error).toBeCalled();
});
it('getter: should get dependencies from package meta', () => {
const wrapper = mount(<Dependencies packageMeta={packageMeta} />);
const dependencies = wrapper.instance().dependencies;
const result = {
'@verdaccio/file-locking': '0.0.3',
'@verdaccio/streams': '0.0.2',
JSONStream: '^1.1.1',
'apache-md5': '^1.1.2',
async: '^2.0.1',
'body-parser': '^1.15.0',
bunyan: '^1.8.0',
chalk: '^2.0.1',
commander: '^2.11.0',
compression: '1.6.2',
cookies: '^0.7.0',
cors: '^2.8.3',
express: '4.15.3',
global: '^4.3.2',
handlebars: '4.0.5',
'http-errors': '^1.4.0',
'js-string-escape': '1.0.1',
'js-yaml': '^3.6.0',
jsonwebtoken: '^7.4.1',
lockfile: '^1.0.1',
lodash: '4.17.4',
lunr: '^0.7.0',
marked: '0.3.6',
mime: '^1.3.6',
minimatch: '^3.0.2',
mkdirp: '^0.5.1',
pkginfo: '^0.4.0',
request: '^2.72.0',
semver: '^5.1.0',
'unix-crypt-td-js': '^1.0.0'
};
expect(dependencies).toEqual(result);
});
it('should load the package and match snapshot', () => {
const wrapper = shallow(<Dependencies packageMeta={packageMeta} />);
expect(wrapper.html()).toMatchSnapshot();
});
});

View File

@ -0,0 +1,34 @@
/**
* LastSync component
*/
import React from 'react';
import { mount, shallow } from 'enzyme';
import LastSync from '../../../../src/webui/src/components/PackageSidebar/modules/LastSync';
import { packageMeta } from '../store/packageMeta';
jest.mock(
'../../../../src/webui/utils/datetime',
() => require('../__mocks__/datetime').default
);
console.error = jest.fn();
describe('<PackageSidebar /> : <LastSync />', () => {
it('should load the component and check getters: lastUpdate, recentReleases with package data', () => {
const wrapper = mount(<LastSync packageMeta={packageMeta} />);
const instance = wrapper.instance();
const result = [
{ time: 'Dec 14, 2017, 3:43 PM', version: '2.7.1' },
{ time: 'Dec 5, 2017, 11:25 PM', version: '2.7.0' },
{ time: 'Nov 8, 2017, 10:47 PM', version: '2.6.6' }
];
expect(instance.lastUpdate).toEqual('Dec 14, 2017, 3:43 PM');
expect(instance.recentReleases).toEqual(result);
});
it('should load the LastSync component and match snapshot', () => {
const wrapper = shallow(<LastSync packageMeta={packageMeta} />);
expect(wrapper.html()).toMatchSnapshot();
});
});

View File

@ -0,0 +1,30 @@
/**
* MaintainerInfo component
*/
import React from 'react';
import { shallow } from 'enzyme';
import MaintainerInfo from '../../../../src/webui/src/components/PackageSidebar/modules/Maintainers/MaintainerInfo';
console.error = jest.fn();
describe('<PackageSidebar /> : <Maintainers /> <MaintainerInfo />', () => {
it('should throw error for required props', () => {
shallow(<MaintainerInfo />);
expect(console.error).toBeCalled();
});
it('should load the component and match with snapshot', () => {
const props = {
title: 'test-title',
name: 'test',
avatar: 'http://xyz.com/profile.jpg'
};
const wrapper = shallow(<MaintainerInfo {...props} />);
expect(wrapper.find('.maintainer').prop('title')).toEqual('test');
expect(wrapper.find('img').prop('src')).toEqual(
'http://xyz.com/profile.jpg'
);
expect(wrapper.html()).toMatchSnapshot();
});
});

View File

@ -0,0 +1,79 @@
/**
* Maintainers component
*/
import React from 'react';
import { mount } from 'enzyme';
import Maintainers from '../../../../src/webui/src/components/PackageSidebar/modules/Maintainers';
import { packageMeta } from '../store/packageMeta';
console.error = jest.fn();
describe('<PackageSidebar /> : <Maintainers />', () => {
let wrapper;
let instance;
beforeEach(() => {
wrapper = mount(<Maintainers packageMeta={packageMeta} />);
instance = wrapper.instance();
});
it('should match with the props', () => {
expect(wrapper.props().packageMeta).toEqual(packageMeta);
expect(wrapper.html()).toMatchSnapshot();
});
it('author shoule be equal to Alex Kocharin', () => {
expect(instance.author).toEqual({
avatar:
'https://www.gravatar.com/avatar/a5a236ba477ee98908600c40cda74f4a',
email: 'test@author.local',
name: 'Alex Kocharin'
});
});
it('should get all the contributors with false for showAllContributors', () => {
expect(instance.showAllContributors).toBeFalsy();
});
it('should get unique contributors', () => {
const result = [
{
avatar:
'https://www.gravatar.com/avatar/4ef03c2bf8d8689527903212d96fb45b',
email: 'test1@test.local',
name: '030'
},
{
avatar:
'https://www.gravatar.com/avatar/06975001f7f2be7052bcf978700c6112',
email: 'tes4@test.local',
name: 'Alex Vernacchia'
},
{
avatar:
'https://www.gravatar.com/avatar/d9acfc4ed4e49a436738ff26a722dce4',
email: 'test5@test.local',
name: 'Alexander Makarenko'
},
{
avatar:
'https://www.gravatar.com/avatar/2e095c7cfd278f72825d0fed6e12e3b1',
email: 'test6@test.local',
name: 'Alexandre-io'
},
{
avatar:
'https://www.gravatar.com/avatar/371edff6d79c39bb9e36bde39d41a4b0',
email: 'test7@test.local',
name: 'Aram Drevekenin'
}
];
expect(instance.uniqueContributors).toEqual(result);
});
it('should click on handleShowAllContributors', () => {
wrapper.find('button').simulate('click');
expect(wrapper.state('showAllContributors')).toBeTruthy();
});
});

View File

@ -0,0 +1,29 @@
/**
* Module component
*/
import React from 'react';
import { shallow } from 'enzyme';
import Module from '../../../../src/webui/src/components/PackageSidebar/Module';
console.error = jest.fn();
describe('<PackageSidebar /> : <Module />', () => {
it('should error for required props', () => {
shallow(<Module />);
expect(console.error).toBeCalled();
});
it('should load module component', () => {
const props = {
title: 'Test title',
description: 'Test description',
className: 'module-component'
};
const wrapper = shallow(
<Module {...props}>
<p>test children</p>
</Module>
);
expect(wrapper.html()).toMatchSnapshot();
});
});

View File

@ -0,0 +1,23 @@
/**
* ModuleContentPlaceholder component
*/
import React from 'react';
import { shallow } from 'enzyme';
import ModuleContentPlaceholder from '../../../../src/webui/src/components/PackageSidebar/ModuleContentPlaceholder';
console.error = jest.fn();
describe('<PackageSidebar /> : <ModuleContentPlaceholder />', () => {
it('should error for required props', () => {
shallow(<ModuleContentPlaceholder />);
expect(console.error).toBeCalled();
});
it('should load module component', () => {
const props = {
text: 'Test text'
};
const wrapper = shallow(<ModuleContentPlaceholder {...props} />);
expect(wrapper.html()).toMatchSnapshot();
});
});

View File

@ -0,0 +1,35 @@
/**
* Package Sidebar module
*/
import React from 'react';
import { mount } from 'enzyme';
import PackageSidebar from '../../../../src/webui/src/components/PackageSidebar';
import { packageMeta } from '../store/packageMeta';
jest.mock('../../../../src/webui/utils/api', () => ({
get: require('../__mocks__/api').default.get
}));
console.error = jest.fn();
describe('<PackageSidebar /> component', () => {
it('should throw error for the required props', () => {
const wrapper = mount(<PackageSidebar />);
const { loadPackageData } = wrapper.instance();
expect(console.error).toBeCalled();
loadPackageData().then(response => {
expect(response).toBeUndefined();
expect(wrapper.state()).toEqual({ failed: true });
});
});
it('should load the packageMeta', () => {
const wrapper = mount(<PackageSidebar packageName={'verdaccio'} />);
const { loadPackageData } = wrapper.instance();
loadPackageData('verdaccio').then(response => {
expect(wrapper.state('packageMeta')).toEqual(packageMeta);
});
expect(wrapper.html()).toMatchSnapshot();
});
});

View File

@ -3,6 +3,7 @@
*/
import logo from '../store/logo';
import login from '../store/login';
import { packageMeta } from '../store/packageMeta';
/**
* Register mock api endpoints
@ -19,6 +20,10 @@ const register = (method = 'get', endpoint, config = {}) => {
return logo();
}
if (endpoint === 'sidebar/verdaccio' && method === 'get') {
return Promise.resolve({ data: packageMeta });
}
return Promise.reject({ status: 404, data: 'Not found' });
};

View File

@ -0,0 +1,17 @@
/**
* Date time in LocaleString
* @param {string} input
* @returns {string}
*/
export default function datetime(input) {
const date = new Date(input);
return date.toLocaleString('en-GB', {
month: 'short',
day: 'numeric',
year: 'numeric',
hour: 'numeric',
minute: 'numeric',
hour12: true,
timeZone: 'Europe/London'
});
}

View File

@ -0,0 +1,664 @@
export const packageMeta = {
name: 'verdaccio',
'dist-tags': { latest: '2.7.1', beta: '2.4.1-beta' },
time: {
modified: '2017-12-14T15:43:27.317Z',
created: '2016-07-28T12:48:43.536Z',
'1.4.0': '2016-07-28T12:48:43.536Z',
'2.0.0': '2016-08-26T22:36:41.762Z',
'2.0.1': '2016-08-29T13:26:21.754Z',
'2.1.0': '2016-10-12T00:48:03.025Z',
'2.1.1': '2017-02-07T06:43:22.801Z',
'2.2.0-v20170212': '2017-02-12T14:48:27.322Z',
'2.1.2': '2017-03-09T06:25:28.107Z',
'2.1.3': '2017-03-29T20:03:36.850Z',
'2.1.4': '2017-04-13T20:08:41.131Z',
'2.1.5': '2017-04-22T09:07:39.821Z',
'2.1.6': '2017-05-12T07:43:36.616Z',
'2.1.7': '2017-05-14T13:50:14.016Z',
'2.1.10': '2017-06-03T09:53:52.449Z',
'2.2.0': '2017-06-08T19:02:53.618Z',
'2.2.1': '2017-06-17T16:23:14.158Z',
'2.2.2': '2017-07-02T13:13:13.304Z',
'2.2.3': '2017-07-04T20:43:59.442Z',
'2.2.4': '2017-07-05T17:28:07.187Z',
'2.2.5': '2017-07-05T17:34:11.089Z',
'2.2.6': '2017-07-13T05:04:54.418Z',
'2.2.7': '2017-07-15T23:27:24.523Z',
'2.3.0-beta': '2017-07-15T23:31:31.664Z',
'2.2.7-r': '2017-07-18T19:44:48.946Z',
'2.3.0-beta-1': '2017-07-22T16:27:45.025Z',
'2.3.0-beta-2': '2017-07-22T17:12:09.905Z',
'2.3.0-beta-3': '2017-07-22T17:35:05.771Z',
'2.3.0-beta-4': '2017-07-22T18:22:42.563Z',
'2.3.0': '2017-07-22T23:08:37.513Z',
'2.3.1-pre': '2017-07-24T05:50:40.852Z',
'2.3.1': '2017-07-25T05:24:27.651Z',
'2.3.2': '2017-07-28T23:05:36.431Z',
'2.3.3': '2017-07-29T10:05:30.120Z',
'2.3.4': '2017-07-29T10:18:44.061Z',
'2.3.5': '2017-08-14T06:22:57.686Z',
'2.3.6': '2017-08-17T04:30:44.872Z',
'2.4.0': '2017-09-23T08:01:22.780Z',
'2.4.1-beta': '2017-10-01T08:57:14.509Z',
'2.5.0': '2017-10-01T12:31:06.333Z',
'2.5.1': '2017-10-01T13:32:06.584Z',
'2.6.0': '2017-10-18T20:22:32.836Z',
'2.6.1': '2017-10-19T17:26:24.083Z',
'2.6.2': '2017-10-21T08:37:16.527Z',
'2.6.3': '2017-10-21T16:04:05.556Z',
'2.6.4': '2017-10-31T17:47:03.647Z',
'2.6.5': '2017-11-05T09:09:31.332Z',
'2.6.6': '2017-11-08T22:47:16.504Z',
'2.7.0': '2017-12-05T23:25:06.372Z',
'2.7.1': '2017-12-14T15:43:27.317Z'
},
_uplinks: { npmjs: { etag: '"5a272ad2-4f6b1"', fetched: 1513266232741 } },
_rev: '16-ba1b806df0298246',
_attachments: {},
latest: {
name: 'verdaccio',
version: '2.7.1',
description: 'Private npm repository server',
author: {
name: 'Alex Kocharin',
email: 'test@author.local',
avatar: 'https://www.gravatar.com/avatar/a5a236ba477ee98908600c40cda74f4a'
},
repository: {
type: 'git',
url: 'git://github.com/verdaccio/verdaccio.git'
},
main: 'index.js',
bin: { verdaccio: './bin/verdaccio' },
dependencies: {
'@verdaccio/file-locking': '0.0.3',
'@verdaccio/streams': '0.0.2',
JSONStream: '^1.1.1',
'apache-md5': '^1.1.2',
async: '^2.0.1',
'body-parser': '^1.15.0',
bunyan: '^1.8.0',
chalk: '^2.0.1',
commander: '^2.11.0',
compression: '1.6.2',
cookies: '^0.7.0',
cors: '^2.8.3',
express: '4.15.3',
global: '^4.3.2',
handlebars: '4.0.5',
'http-errors': '^1.4.0',
'js-string-escape': '1.0.1',
'js-yaml': '^3.6.0',
jsonwebtoken: '^7.4.1',
lockfile: '^1.0.1',
lodash: '4.17.4',
lunr: '^0.7.0',
marked: '0.3.6',
mime: '^1.3.6',
minimatch: '^3.0.2',
mkdirp: '^0.5.1',
pkginfo: '^0.4.0',
request: '^2.72.0',
semver: '^5.1.0',
'unix-crypt-td-js': '^1.0.0'
},
devDependencies: {
axios: '0.16.2',
'babel-cli': '6.24.1',
'babel-core': '6.25.0',
'babel-eslint': '7.2.3',
'babel-loader': '7.1.1',
'babel-plugin-flow-runtime': '0.11.1',
'babel-plugin-transform-decorators-legacy': '1.3.4',
'babel-plugin-transform-runtime': '6.23.0',
'babel-polyfill': '^6.26.0',
'babel-preset-env': '1.5.2',
'babel-preset-flow': '6.23.0',
'babel-preset-react': '6.24.1',
'babel-preset-stage-2': '6.24.1',
'babel-preset-stage-3': '6.24.1',
'babel-runtime': '6.23.0',
'codacy-coverage': '2.0.2',
codecov: '2.2.0',
coveralls: '2.13.1',
'css-loader': '0.28.4',
'element-react': '1.0.16',
'element-theme-default': '1.3.7',
eslint: '4.2.0',
'eslint-config-google': '0.8.0',
'eslint-loader': '1.8.0',
'eslint-plugin-babel': '4.1.1',
'eslint-plugin-flowtype': '2.35.0',
'eslint-plugin-import': '2.6.1',
'eslint-plugin-react': '7.1.0',
'extract-text-webpack-plugin': '3.0.0',
'file-loader': '0.11.2',
'flow-runtime': '0.13.0',
'friendly-errors-webpack-plugin': '1.6.1',
'fs-extra': '4.0.1',
'github-markdown-css': '2.8.0',
'html-webpack-plugin': '2.29.0',
'in-publish': '2.0.0',
'localstorage-memory': '1.0.2',
mocha: '3.4.2',
'mocha-lcov-reporter': '1.3.0',
'node-sass': '4.5.3',
'normalize.css': '7.0.0',
nyc: '11.0.3',
ora: '1.3.0',
'prop-types': '15.5.10',
react: '15.6.1',
'react-dom': '15.6.1',
'react-hot-loader': '3.0.0-beta.7',
'react-router-dom': '4.1.1',
'react-syntax-highlighter': '5.6.2',
rimraf: '2.6.1',
'sass-loader': '6.0.6',
'source-map-loader': '0.2.1',
'standard-version': '4.2.0',
'style-loader': '0.18.2',
stylelint: '7.13.0',
'stylelint-config-standard': '16.0.0',
'stylelint-webpack-plugin': '0.8.0',
'url-loader': '0.5.8',
webpack: '3.2.0',
'webpack-dev-server': '2.5.0',
'webpack-merge': '4.1.0'
},
keywords: [
'private',
'package',
'repository',
'registry',
'enterprise',
'modules',
'proxy',
'server'
],
scripts: {
release: 'standard-version -a -s',
prepublish: 'in-publish && npm run build:webui || not-in-publish',
test: 'mocha ./test/functional ./test/unit --reporter=spec --full-trace',
'pre:ci': 'npm run build:webui',
'test:ci': 'npm run test:coverage',
'test:only': 'mocha ./test/functional ./test/unit',
'test:coverage': 'nyc npm t',
'coverage:html': 'nyc report --reporter=html',
'coverage:publish': 'nyc report --reporter=lcov | codecov',
lint: 'eslint .',
'lint:css': "stylelint 'src/**/*.scss' --syntax scss",
'pre:webpack': 'npm run lint && rimraf static/*',
'dev:webui': 'babel-node tools/dev.server.js',
'build:webui':
'npm run pre:webpack && webpack --config tools/webpack.prod.config.babel.js',
'build:docker': 'docker build -t verdaccio . --no-cache',
'build:docker:rpi': 'docker build -f Dockerfile.rpi -t verdaccio:rpi .'
},
jest: { snapshotSerializers: ['jest-serializer-enzyme'] },
engines: { node: '>=4.6.1', npm: '>=2.15.9' },
preferGlobal: true,
publishConfig: { registry: 'http://localhost:4873/' },
license: 'WTFPL',
contributors: [
{
name: '030',
email: 'test1@test.local',
avatar:
'https://www.gravatar.com/avatar/4ef03c2bf8d8689527903212d96fb45b'
},
{
name: 'Alex Kocharin',
email: 'test2@test.local',
avatar:
'https://www.gravatar.com/avatar/a5a236ba477ee98908600c40cda74f4a'
},
{
name: 'Alex Kocharin',
email: 'test3@test.comu',
avatar:
'https://www.gravatar.com/avatar/41a61049006855759bd6ec82ef0543a0'
},
{
name: 'Alex Vernacchia',
email: 'tes4@test.local',
avatar:
'https://www.gravatar.com/avatar/06975001f7f2be7052bcf978700c6112'
},
{
name: 'Alexander Makarenko',
email: 'test5@test.local',
avatar:
'https://www.gravatar.com/avatar/d9acfc4ed4e49a436738ff26a722dce4'
},
{
name: 'Alexandre-io',
email: 'test6@test.local',
avatar:
'https://www.gravatar.com/avatar/2e095c7cfd278f72825d0fed6e12e3b1'
},
{
name: 'Aram Drevekenin',
email: 'test7@test.local',
avatar:
'https://www.gravatar.com/avatar/371edff6d79c39bb9e36bde39d41a4b0'
},
{
name: 'Bart Dubois',
email: 'test8@test.local',
avatar:
'https://www.gravatar.com/avatar/4acf72b14fcb459286c988c4523bafc8'
},
{
name: 'Barthélemy Vessemont',
email: 'test9@test.local',
avatar:
'https://www.gravatar.com/avatar/322cd2fad528a55c4351ec76d85ef525'
},
{
name: 'Brandon Nicholls',
email: 'test10@test.local',
avatar:
'https://www.gravatar.com/avatar/2d3b462f08f214ed459967aa7ef206f7'
},
{
name: 'Bren Norris',
email: 'test11@test.local',
avatar:
'https://www.gravatar.com/avatar/465a42204a22efada0f15b46a7cdad3a'
},
{
name: 'Brett Trotter',
email: 'test12@test.local',
avatar:
'https://www.gravatar.com/avatar/27a54519dcbe64c6d705f3cc4854595a'
},
{
name: 'Brian Peacock',
email: 'test13@test.local',
avatar:
'https://www.gravatar.com/avatar/3dd3d627330e7e048c13a7480f19842e'
},
{
name: 'Cedric Darne',
email: 'test14@test.local',
avatar:
'https://www.gravatar.com/avatar/0a617cebc6539940d7956c86e86c72a6'
},
{
name: 'Chad Killingsworth',
email: 'test15@test.local',
avatar:
'https://www.gravatar.com/avatar/a5825b2d69311e559e28a535e5f0d483'
},
{
name: 'Chris Breneman',
email: 'test16@test.local',
avatar:
'https://www.gravatar.com/avatar/3c5c3edef955c93edac672cbad04d7cd'
},
{
name: 'Cody Droz',
email: 'test17@test.local',
avatar:
'https://www.gravatar.com/avatar/b762ce4d14acfece36e783b1592d882b'
},
{
name: 'Daniel Rodríguez Rivero',
email: 'test18@test.local',
avatar:
'https://www.gravatar.com/avatar/ac7f548c31e8a002cfa41bd4c71e222d'
},
{
name: 'Denis Babineau',
email: 'test19@test.local',
avatar:
'https://www.gravatar.com/avatar/ee5a522e067759ba0403824ecebeab4d'
},
{
name: 'Emmanuel Narh',
email: 'test20@test.local',
avatar:
'https://www.gravatar.com/avatar/93a84a6120969fd181785ff9de834f0a'
},
{
name: 'Fabio Poloni',
email: 'test21@test.local',
avatar:
'https://www.gravatar.com/avatar/f9a05677360e5f52fcca6e1af9b0f2ee'
},
{
name: 'Facundo Chambó',
email: 'test22@test.local',
avatar:
'https://www.gravatar.com/avatar/ec9e7c590ba4081c25fcf197f90a4ea0'
},
{
name: 'Guilherme Bernal',
email: 'test23@test.local',
avatar:
'https://www.gravatar.com/avatar/e5d55dcf2495618e8b9f8778f8353ee0'
},
{
name: 'Jakub Jirutka',
email: 'test24@test.local',
avatar:
'https://www.gravatar.com/avatar/061bdb74aa4a543108658b277a257b4b'
},
{
name: 'James Newell',
email: 'test25@test.local',
avatar:
'https://www.gravatar.com/avatar/825190aaae6ec7fd95085e1fb6f261d2'
},
{
name: 'Jan Vansteenkiste',
email: 'test26@test.local',
avatar:
'https://www.gravatar.com/avatar/41835625a324201c796a0a0cffe4796b'
},
{
name: 'Jannis Achstetter',
email: 'test27@test.local',
avatar:
'https://www.gravatar.com/avatar/92d1cce007b032f4a63c6df764f18030'
},
{
name: 'Jeremy Moritz',
email: 'test28@test.local',
avatar:
'https://www.gravatar.com/avatar/008127e8f10293f43e62de3b7b3520e1'
},
{
name: 'John Gozde',
email: 'test29@test.local',
avatar:
'https://www.gravatar.com/avatar/3e8927c60cb043a56fdd6531cfcaddbc'
},
{
name: 'Jon de la Motte',
email: 'test30@test.local',
avatar:
'https://www.gravatar.com/avatar/126c1ea4fdb20bbb85c3ff735b7b0964'
},
{
name: 'Joseph Gentle',
email: 'test31@test.local',
avatar:
'https://www.gravatar.com/avatar/484f0b8ba8b7cc43db0be8f910a91254'
},
{
name: 'José De Paz',
email: 'test32@test.local',
avatar:
'https://www.gravatar.com/avatar/2532122835f5ebf1642b707ae088c895'
},
{
name: 'Juan Carlos Picado',
email: 'test33@test.local',
avatar:
'https://www.gravatar.com/avatar/c676605ff39f9c7a43f5518a8ce54e12'
},
{
name: 'Juan Carlos Picado',
email: 'test34@test.local',
avatar:
'https://www.gravatar.com/avatar/fba48015a688c38cc84e5b55b07858c0'
},
{
name: 'Juan Picado',
email: 'test35@test.local',
avatar:
'https://www.gravatar.com/avatar/fba48015a688c38cc84e5b55b07858c0'
},
{
name: 'Juan Picado @jotadeveloper',
email: 'test36@test.local',
avatar:
'https://www.gravatar.com/avatar/fba48015a688c38cc84e5b55b07858c0'
},
{
name: 'Kalman Speier',
email: 'test37@test.local',
avatar:
'https://www.gravatar.com/avatar/272806ba17639e2fbf811e51eb8bfb99'
},
{
name: 'Keyvan Fatehi',
email: 'test38@test.local',
avatar:
'https://www.gravatar.com/avatar/22735d1ba5765955914eb2d597dfaab5'
},
{
name: 'Kody J. Peterson',
email: 'test39@test.local',
avatar:
'https://www.gravatar.com/avatar/918a15afc52e9b0a67b2651191b23d04'
},
{
name: 'Madison Grubb',
email: 'test40@test.local',
avatar:
'https://www.gravatar.com/avatar/73b84fdf661c11d48d3370bfa197162b'
},
{
name: 'Manuel de Brito Fontes',
email: 'test41@test.local',
avatar:
'https://www.gravatar.com/avatar/8798ca0a499428e5e8f25d3614ac8b6e'
},
{
name: 'Mark Doeswijk',
email: 'test42@test.local',
avatar:
'https://www.gravatar.com/avatar/0d70ebd6c46dc01502bfab5f8c2d2bc5'
},
{
name: 'Meeeeow',
email: 'test43@test.local',
avatar:
'https://www.gravatar.com/avatar/baa061890d7b352ba121082272419a8a'
},
{
name: 'Meeeeow',
email: 'test44@test.local',
avatar:
'https://www.gravatar.com/avatar/12a36e093451d4c0f75d4240960ce29b'
},
{
name: 'Michael Arnel',
email: 'test45@test.local',
avatar:
'https://www.gravatar.com/avatar/5f9a5ed24c63609d52651258f6dd8c12'
},
{
name: 'Michael Crowe',
email: 'test46@test.local',
avatar:
'https://www.gravatar.com/avatar/eec9ee62019852da28a3bc91c57907f9'
},
{
name: 'Miguel Mejias',
email: 'test47@test.local',
avatar:
'https://www.gravatar.com/avatar/7289a01fedfdb9ddf855ee4dd4d41ae2'
},
{
name: 'Miroslav Bajtoš',
email: 'test48@test.local',
avatar:
'https://www.gravatar.com/avatar/b4d8831300713259f74aea79f842ca57'
},
{
name: 'Nate Ziarek',
email: 'test49@test.local',
avatar:
'https://www.gravatar.com/avatar/6442023756294fd43aa518bbe5cc6dcc'
},
{
name: 'Nick',
email: 'test50@test.local',
avatar:
'https://www.gravatar.com/avatar/8a810f12c9624ea2092852fe7c19f1ee'
},
{
name: 'Piotr Synowiec',
email: 'test51@test.local',
avatar:
'https://www.gravatar.com/avatar/87028f33a3e1e5b4201c371abddf93e2'
},
{
name: 'Rafael Cesar',
email: 'test52@test.local',
avatar:
'https://www.gravatar.com/avatar/204ed93fa5be7e2f9f299ad8bca6431f'
},
{
name: 'Robert Ewald',
email: 'test53@test.local',
avatar:
'https://www.gravatar.com/avatar/ec2166ce419f78fb354f128b01a4a44d'
},
{
name: 'Robert Groh',
email: 'test54@test.local',
avatar:
'https://www.gravatar.com/avatar/565ccb5374a3e0e31a75f11da2eb57aa'
},
{
name: 'Robin Persson',
email: 'test55@test.local',
avatar:
'https://www.gravatar.com/avatar/99da46e4d59664134b176869340f464b'
},
{
name: 'Romain Lai-King',
email: 'test56@test.local',
avatar:
'https://www.gravatar.com/avatar/69d0370c58399d0e0bbd15ccabfe1ec5'
},
{
name: 'Ryan Graham',
email: 'test57@test.local',
avatar:
'https://www.gravatar.com/avatar/8bd1dd86bbf8705a5a702b86a2f3a390'
},
{
name: 'Ryan Graham',
email: 'test58@test.local',
avatar:
'https://www.gravatar.com/avatar/e272ab422c1c629e9be26cba8b6c0166'
},
{
name: 'Sam Day',
email: 'test59@test.local',
avatar:
'https://www.gravatar.com/avatar/1886554b0562a0eeeb78a4d1f27917ea'
},
{
name: 'Tarun Garg',
email: 'test60@test.local',
avatar:
'https://www.gravatar.com/avatar/185e200c3451cfbe341f0e758626303a'
},
{
name: 'Thomas Cort',
email: 'test61@test.local',
avatar:
'https://www.gravatar.com/avatar/120d2921c33c1bd8dedfce67a28dcc63'
},
{
name: 'Tom Vincent',
email: 'test62@test.local',
avatar:
'https://www.gravatar.com/avatar/fb0c7faeda7f5d5632182a3d80381bfa'
},
{
name: 'Trent Earl',
email: 'test63@test.local',
avatar:
'https://www.gravatar.com/avatar/1e30abe66d21824b89c28d05e5b57d84'
},
{
name: 'Yannick Croissant',
email: 'test64@test.local',
avatar:
'https://www.gravatar.com/avatar/1e619ddb2a180222dd3d9f0348e65b9b'
},
{
name: 'Yannick Galatol',
email: 'test65@test.local',
avatar:
'https://www.gravatar.com/avatar/2f624f92326fef845bb2c07b392b7e48'
},
{
name: 'cklein',
email: 'test66@test.local',
avatar:
'https://www.gravatar.com/avatar/f8288370380881cf3afc5a92a63d652d'
},
{
name: 'danielo515',
email: 'test67@test.local',
avatar:
'https://www.gravatar.com/avatar/ac7f548c31e8a002cfa41bd4c71e222d'
},
{
name: 'jmwilkinson',
email: 'test68@test.local',
avatar:
'https://www.gravatar.com/avatar/3b99683f0a4c26a8906ecbe7968a4ade'
},
{
name: 'jotadeveloper',
email: 'test69@test.local',
avatar:
'https://www.gravatar.com/avatar/fba48015a688c38cc84e5b55b07858c0'
},
{
name: 'jotadeveloper',
email: 'test70@test.local',
avatar:
'https://www.gravatar.com/avatar/047ba1e853d20459e531619af5493c56'
},
{
name: 'maxlaverse',
email: 'test71@test.local',
avatar:
'https://www.gravatar.com/avatar/74324a2900906c45949a8c5cee6d0730'
},
{
name: 'saheba',
email: 'test72@test.local',
avatar:
'https://www.gravatar.com/avatar/77644c51856cab149e0f550c5f0c6ed8'
},
{
name: 'steve-p-com',
email: 'test73@test.local',
avatar:
'https://www.gravatar.com/avatar/bef1821d3036b8b9242c4999826c1c3c'
},
{
name: 'trent.earl',
email: 'test74@test.local',
avatar:
'https://www.gravatar.com/avatar/f84b8ae496f7c988dce5a71d773e75bb'
}
],
readmeFilename: 'README.md',
gitHead: '567dbe327819ed30afb96906f8d43f19740e2e3d',
bugs: { url: 'https://github.com/verdaccio/verdaccio/issues' },
homepage: 'https://github.com/verdaccio/verdaccio#readme',
_id: 'verdaccio@2.7.1',
_shasum: '958c919180e7f2ed6775f48d4ec64bd8de2a14df',
_from: '.',
_npmVersion: '3.10.10',
_nodeVersion: '6.9.5',
_npmUser: {},
dist: {
shasum: '958c919180e7f2ed6775f48d4ec64bd8de2a14df',
tarball: 'http://localhost:4873/verdaccio/-/verdaccio-2.7.1.tgz'
}
}
};