Skip to content

Commit

Permalink
build: update dependencies (#1630)
Browse files Browse the repository at this point in the history
* chore: update dependencies

* chore: update secrets
  • Loading branch information
juanpicado authored and verdacciobot committed Dec 23, 2019
1 parent 5189254 commit 7fe943f
Show file tree
Hide file tree
Showing 20 changed files with 1,360 additions and 1,140 deletions.
3 changes: 2 additions & 1 deletion .eslintrc
Expand Up @@ -12,6 +12,7 @@
"@typescript-eslint/array-type": ["warn"],
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/indent": 0,
"@typescript-eslint/interface-name-prefix": 0
"@typescript-eslint/interface-name-prefix": 0,
"import/order": 0
}
}
10 changes: 5 additions & 5 deletions .secrets-baseline
Expand Up @@ -3,7 +3,7 @@
"files": null,
"lines": null
},
"generated_at": "2019-08-03T08:33:13Z",
"generated_at": "2019-12-23T08:20:53Z",
"plugins_used": [
{
"name": "AWSKeyDetector"
Expand Down Expand Up @@ -265,12 +265,12 @@
"test/unit/modules/api/api.spec.ts": [
{
"hashed_secret": "97752a468368b0d6b192140d6a140c38fd0cbd8b",
"line_number": 293,
"line_number": 305,
"type": "Secret Keyword"
},
{
"hashed_secret": "364bdf2ed77a8544d3b711a03b69eeadcc63c9d7",
"line_number": 802,
"line_number": 829,
"type": "Secret Keyword"
}
],
Expand Down Expand Up @@ -326,7 +326,7 @@
},
{
"hashed_secret": "195a8aef5c5b2397fdbf5fb429a517b089745309",
"line_number": 96,
"line_number": 97,
"type": "Secret Keyword"
}
],
Expand All @@ -345,7 +345,7 @@
},
{
"hashed_secret": "fed915afaba64ebcdfeb805d59ea09a33275c423",
"line_number": 178,
"line_number": 205,
"type": "Secret Keyword"
}
],
Expand Down
42 changes: 21 additions & 21 deletions package.json
Expand Up @@ -20,18 +20,18 @@
"url": "https://opencollective.com/verdaccio"
},
"dependencies": {
"@verdaccio/commons-api": "8.3.0",
"@verdaccio/local-storage": "8.4.2",
"@verdaccio/readme": "8.4.2",
"@verdaccio/streams": "8.2.0",
"@verdaccio/commons-api": "8.5.0",
"@verdaccio/local-storage": "8.5.0",
"@verdaccio/readme": "8.5.0",
"@verdaccio/streams": "8.5.0",
"@verdaccio/ui-theme": "0.3.9",
"JSONStream": "1.3.5",
"async": "3.1.0",
"body-parser": "1.19.0",
"bunyan": "1.8.12",
"commander": "3.0.2",
"compression": "1.7.4",
"cookies": "0.7.3",
"cookies": "0.8.0",
"cors": "2.8.5",
"dayjs": "1.8.17",
"envinfo": "7.5.0",
Expand All @@ -51,9 +51,9 @@
"mv": "2.1.1",
"pkginfo": "0.4.1",
"request": "2.87.0",
"semver": "6.3.0",
"verdaccio-audit": "8.1.4",
"verdaccio-htpasswd": "8.2.0"
"semver": "7.1.1",
"verdaccio-audit": "8.5.0",
"verdaccio-htpasswd": "8.5.0"
},
"devDependencies": {
"@commitlint/cli": "8.2.0",
Expand All @@ -63,21 +63,21 @@
"@types/bunyan": "1.8.6",
"@types/express": "4.17.1",
"@types/http-errors": "1.6.3",
"@types/jest": "24.0.23",
"@types/lodash": "4.14.148",
"@types/jest": "24.0.24",
"@types/lodash": "4.14.149",
"@types/mime": "2.0.1",
"@types/minimatch": "3.0.3",
"@types/node": "12.7.8",
"@types/node": "12.12.21",
"@types/request": "2.48.3",
"@types/semver": "6.2.0",
"@typescript-eslint/eslint-plugin": "2.11.0",
"@verdaccio/babel-preset": "8.1.0",
"@verdaccio/eslint-config": "8.1.0",
"@verdaccio/types": "8.1.0",
"@typescript-eslint/eslint-plugin": "2.12.0",
"@verdaccio/babel-preset": "8.5.0",
"@verdaccio/eslint-config": "8.5.0",
"@verdaccio/types": "8.5.0",
"codecov": "3.6.1",
"cross-env": "6.0.3",
"detect-secrets": "1.0.5",
"eslint": "5.16.0",
"eslint": "6.8.0",
"fs-extra": "8.1.0",
"get-stdin": "7.0.0",
"husky": "2.7.0",
Expand All @@ -87,15 +87,15 @@
"jest-junit": "9.0.0",
"lint-staged": "8.2.1",
"nock": "11.7.0",
"prettier": "1.18.2",
"prettier": "1.19.1",
"puppeteer": "1.8.0",
"rimraf": "3.0.0",
"standard-version": "7.0.0",
"standard-version": "7.0.1",
"supertest": "4.0.2",
"typescript": "3.7.1-rc",
"verdaccio": "latest",
"verdaccio-auth-memory": "8.3.0",
"verdaccio-memory": "8.2.0"
"verdaccio": "4.4.0",
"verdaccio-auth-memory": "8.5.0",
"verdaccio-memory": "8.5.0"
},
"keywords": [
"private",
Expand Down
7 changes: 5 additions & 2 deletions src/lib/auth.ts
Expand Up @@ -19,7 +19,7 @@ import {
import { convertPayloadToBase64, ErrorCode } from './utils';
import { getMatchedPackagesSpec } from './config-utils';

import { Config, Logger, Callback, IPluginAuth, RemoteUser, JWTSignOptions, Security, AuthPluginPackage } from '@verdaccio/types';
import { Config, Logger, Callback, IPluginAuth, RemoteUser, JWTSignOptions, Security, AuthPluginPackage, AllowAccess, PackageAccess } from '@verdaccio/types';
import { NextFunction } from 'express';
import { $RequestExtend, $ResponseExtend, IAuth, AESPayload } from '../../types';

Expand Down Expand Up @@ -150,7 +150,9 @@ class Auth implements IAuth {
let method = 'adduser';
if (_.isFunction(plugin[method]) === false) {
method = 'add_user';
self.logger.warn('the plugin method add_user in the auth plugin is deprecated and will be removed in next major release, notify to the plugin author');
}

if (_.isFunction(plugin[method]) === false) {
next();
} else {
Expand All @@ -175,7 +177,8 @@ class Auth implements IAuth {
*/
public allow_access({ packageName, packageVersion }: AuthPluginPackage, user: RemoteUser, callback: Callback): void {
const plugins = this.plugins.slice(0);
const pkg = Object.assign({ name: packageName, version: packageVersion }, getMatchedPackagesSpec(packageName, this.config.packages));
const pkgAllowAcces: AllowAccess = { name: packageName, version: packageVersion };
const pkg = Object.assign({}, pkgAllowAcces, getMatchedPackagesSpec(packageName, this.config.packages)) as AllowAccess & PackageAccess;
const self = this;
this.logger.trace({ packageName }, 'allow access for @{packageName}');

Expand Down
1 change: 1 addition & 0 deletions src/lib/notify/index.ts
Expand Up @@ -39,6 +39,7 @@ export function handleNotify(metadata: Package, notifyEntry, remoteUser: RemoteU
notifyEntry.headers.map(function(item): void {
if (Object.is(item, item)) {
for (const key in item) {
/* eslint no-prototype-builtins: 0 */
if (item.hasOwnProperty(key)) {
header[key] = item[key];
}
Expand Down
6 changes: 5 additions & 1 deletion test/.eslintrc
Expand Up @@ -25,6 +25,10 @@
],
"no-useless-escape": 0,
"@typescript-eslint/explicit-function-return-type": 0,
"@typescript-eslint/no-empty-function": 0
"@typescript-eslint/no-empty-function": 0,
"handle-callback-err": 0,
"import/order": 0,
"prefer-const": 0,
"prefer-promise-reject-errors": 1
}
}
2 changes: 2 additions & 0 deletions test/e2e/puppeteer_environment.js
@@ -1,3 +1,5 @@
/* eslint new-cap: 0 */

const { yellow } = require('kleur');
const NodeEnvironment = require('jest-environment-node');
const puppeteer = require('puppeteer');
Expand Down
2 changes: 1 addition & 1 deletion test/functional/uplinks/cache.ts
Expand Up @@ -26,7 +26,7 @@ export default function (server, server2, server3) {

describe('storage tarball cache test', () => {

//more info #131
// more info #131
beforeAll(function () {
return server.addPackage(PKG_GH131);
});
Expand Down
2 changes: 1 addition & 1 deletion test/functional/uplinks/timeout.ts
Expand Up @@ -7,7 +7,7 @@ export default function (server, server2, server3) {

describe('uplink connection timeouts', () => {

//more info: https://github.com/verdaccio/verdaccio/pull/1331
// more info: https://github.com/verdaccio/verdaccio/pull/1331

jest.setTimeout(20000);
beforeAll(async () => {
Expand Down
139 changes: 0 additions & 139 deletions test/types-test/plugins/storage/example.storage.plugin.js

This file was deleted.

4 changes: 2 additions & 2 deletions test/unit/__helper/api.ts
Expand Up @@ -114,9 +114,9 @@ export function addUser(request: any, user: string, credentials: any,
}

export async function getNewToken(request: any, credentials: any): Promise<string> {
/* eslint no-async-promise-executor: 0 */
return new Promise(async (resolve) => {
const [err, res] = await
addUser(request, credentials.name, credentials);
const [err, res] = await addUser(request, credentials.name, credentials);
expect(err).toBeNull();
const {token, ok} = res.body;
expect(ok).toBeDefined();
Expand Down
9 changes: 5 additions & 4 deletions test/unit/modules/api/api.spec.ts
Expand Up @@ -258,7 +258,8 @@ describe('endpoint unit test', () => {
}

expect(res.body.error).toBeDefined();
//FIXME: message is not 100% accurate
// FIXME: message is not 100% accurate
/* eslint new-cap: 0 */
expect(res.body.error).toMatch(API_ERROR.PASSWORD_SHORT());
done();
});
Expand Down Expand Up @@ -596,7 +597,7 @@ describe('endpoint unit test', () => {
.del('/-/package/jquery/dist-tags/verdaccio-tag')
.set('accept-encoding', HEADERS.JSON)
.set(HEADER_TYPE.CONTENT_TYPE, HEADERS.JSON)
//.expect(HEADER_TYPE.CONTENT_TYPE, HEADERS.JSON_CHARSET)
// .expect(HEADER_TYPE.CONTENT_TYPE, HEADERS.JSON_CHARSET)
.expect(HTTP_STATUS.CREATED)
.end(function(err, res) {
if (err) {
Expand All @@ -620,14 +621,14 @@ describe('endpoint unit test', () => {
.get('/-/all/since?stale=update_after&startkey=' + cacheTime)
// .set('accept-encoding', HEADERS.JSON)
// .set(HEADER_TYPE.CONTENT_TYPE, HEADERS.JSON)
//.expect(HEADER_TYPE.CONTENT_TYPE, HEADERS.JSON_CHARSET)
// .expect(HEADER_TYPE.CONTENT_TYPE, HEADERS.JSON_CHARSET)
.expect(HTTP_STATUS.OK)
.end(function(err) {
if (err) {
expect(err).toBeNull();
return done(err);
}
//TODO: we have to catch the stream check whether it returns something
// TODO: we have to catch the stream check whether it returns something
// we should not spend much time on this api since is deprecated somehow.
done();
});
Expand Down

0 comments on commit 7fe943f

Please sign in to comment.