Skip to content

Commit

Permalink
fix(deps): update all non-major linting dependencies (5.x) (#2885)
Browse files Browse the repository at this point in the history
* fix(deps): update all non-major linting dependencies

* fix lint issues

* chore: increase timeout

* chore: increase timeout

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Juan Picado <juanpicado19@gmail.com>
  • Loading branch information
3 people committed Jan 9, 2022
1 parent 1ec77e7 commit 23d0bd7
Show file tree
Hide file tree
Showing 164 changed files with 1,311 additions and 685 deletions.
872 changes: 596 additions & 276 deletions .pnp.js

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/ajv-npm-7.2.1-e72dc4e752-34044f60ca.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ module.exports = {
"padded-blocks": "off",
"require-jsdoc": "off",
"valid-jsdoc": "off",
"import/order": ["error"],
"import/order": ["warn"],
"eol-last": "error",
"no-irregular-whitespace": "error",
"no-mixed-spaces-and-tabs": ["error", "smart-tabs"],
Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"dayjs": "1.10.7",
"debug": "^4.3.2",
"envinfo": "7.8.1",
"eslint-import-resolver-node": "0.3.4",
"eslint-import-resolver-node": "0.3.6",
"express": "4.17.2",
"express-rate-limit": "5.5.1",
"fast-safe-stringify": "2.0.8",
Expand Down Expand Up @@ -101,8 +101,8 @@
"@types/pino": "6.3.12",
"@types/request": "2.48.5",
"@types/semver": "7.3.4",
"@typescript-eslint/eslint-plugin": "4.13.0",
"@typescript-eslint/parser": "4.13.0",
"@typescript-eslint/eslint-plugin": "4.33.0",
"@typescript-eslint/parser": "4.33.0",
"@verdaccio/eslint-config": "^8.5.0",
"@verdaccio/types": "10.2.2",
"all-contributors-cli": "6.20.0",
Expand All @@ -112,12 +112,12 @@
"babel-plugin-dynamic-import-node": "2.3.3",
"cross-env": "7.0.3",
"detect-secrets": "1.0.6",
"eslint": "7.26.0",
"eslint": "7.32.0",
"eslint-config-google": "0.14.0",
"eslint-config-prettier": "7.2.0",
"eslint-plugin-babel": "5.3.1",
"eslint-plugin-import": "2.22.1",
"eslint-plugin-jest": "24.3.6",
"eslint-plugin-import": "2.25.4",
"eslint-plugin-jest": "24.7.0",
"eslint-plugin-simple-import-sort": "7.0.0",
"eslint-plugin-verdaccio": "9.6.1",
"fs-extra": "10.0.0",
Expand All @@ -131,7 +131,7 @@
"nock": "12.0.3",
"node-mocks-http": "^1.10.1",
"pinst": "2.1.6",
"prettier": "2.3.2",
"prettier": "2.5.1",
"puppeteer": "5.5.0",
"rimraf": "3.0.2",
"selfsigned": "1.10.11",
Expand Down
2 changes: 1 addition & 1 deletion src/api/debug/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { $ResponseExtend, $RequestExtend, $NextFunctionVer } from '../../../types';
import _ from 'lodash';
import { Application } from 'express';
import { $ResponseExtend, $RequestExtend, $NextFunctionVer } from '../../../types';

export default (app: Application, selfPath: string): void => {
// Hook for tests only
Expand Down
10 changes: 5 additions & 5 deletions src/api/endpoint/api/dist-tags.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
import mime from 'mime';
import _ from 'lodash';
import { Router } from 'express';
import { VerdaccioError } from '@verdaccio/commons-api';
import { Package } from '@verdaccio/types';
import { media, allow } from '../../middleware';
import {
IAuth,
Expand All @@ -12,6 +7,11 @@ import {
IStorageHandler
} from '../../../../types';
import { API_MESSAGE, HTTP_STATUS, DIST_TAGS } from '../../../lib/constants';
import mime from 'mime';
import _ from 'lodash';
import { Router } from 'express';
import { VerdaccioError } from '@verdaccio/commons-api';
import { Package } from '@verdaccio/types';

export default function (route: Router, auth: IAuth, storage: IStorageHandler): void {
const can = allow(auth);
Expand Down
6 changes: 3 additions & 3 deletions src/api/endpoint/api/package.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
import _ from 'lodash';
import { Router } from 'express';
import { Config, Package } from '@verdaccio/types';
import { allow } from '../../middleware';
import { convertDistRemoteToLocalTarballUrls, getVersion, ErrorCode } from '../../../lib/utils';
import { HEADERS, DIST_TAGS, API_ERROR } from '../../../lib/constants';
Expand All @@ -11,6 +8,9 @@ import {
$NextFunctionVer,
IStorageHandler
} from '../../../../types';
import { Config, Package } from '@verdaccio/types';
import { Router } from 'express';
import _ from 'lodash';

const downloadStream = (
packageName: string,
Expand Down
2 changes: 1 addition & 1 deletion src/api/endpoint/api/ping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* @flow
*/

import { Router } from 'express';
import { $RequestExtend, $ResponseExtend, $NextFunctionVer } from '../../../../types';
import { Router } from 'express';

export default function (route: Router): void {
route.get(
Expand Down
10 changes: 5 additions & 5 deletions src/api/endpoint/api/publish.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
import Path from 'path';
import _ from 'lodash';
import buildDebug from 'debug';
import mime from 'mime';

import { Router } from 'express';
import { Config, Callback, MergeTags, Version, Package } from '@verdaccio/types';
import { API_MESSAGE, HEADERS, DIST_TAGS, API_ERROR, HTTP_STATUS } from '../../../lib/constants';
import { validateMetadata, isObject, ErrorCode, hasDiffOneKey, isRelatedToDeprecation } from '../../../lib/utils';
import { media, expectJson, allow } from '../../middleware';
Expand All @@ -14,6 +9,11 @@ import { IAuth, $ResponseExtend, $RequestExtend, $NextFunctionVer, IStorageHandl
import { logger } from '../../../lib/logger';
import { isPublishablePackage } from '../../../lib/storage-utils';
import star from './star';
import { Config, Callback, MergeTags, Version, Package } from '@verdaccio/types';
import { Router } from 'express';
import mime from 'mime';
import buildDebug from 'debug';
import _ from 'lodash';

const debug = buildDebug('verdaccio:publish');

Expand Down
6 changes: 3 additions & 3 deletions src/api/endpoint/api/star.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// @flow

import { Response } from 'express';
import _ from 'lodash';
import buildDebug from 'debug';
import { USERS, HTTP_STATUS } from '../../../lib/constants';
import { $RequestExtend, $NextFunctionVer, IStorageHandler } from '../../../../types';
import { logger } from '../../../lib/logger';
import { Response } from 'express';
import _ from 'lodash';
import buildDebug from 'debug';

const debug = buildDebug('verdaccio:star');
export default function (storage: IStorageHandler): (req: $RequestExtend, res: Response, next: $NextFunctionVer) => void {
Expand Down
4 changes: 2 additions & 2 deletions src/api/endpoint/api/stars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
* @prettier
*/
import { USERS, HTTP_STATUS } from '../../../lib/constants';
import { $RequestExtend, $NextFunctionVer, IStorageHandler } from '../../../../types';
import _ from 'lodash';
import { Response, Router } from 'express';
import { Package } from '@verdaccio/types';
import { USERS, HTTP_STATUS } from '../../../lib/constants';
import { $RequestExtend, $NextFunctionVer, IStorageHandler } from '../../../../types';

type Packages = Package[];

Expand Down
8 changes: 4 additions & 4 deletions src/api/endpoint/api/user.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import _ from 'lodash';
import Cookies from 'cookies';

import { Config, RemoteUser } from '@verdaccio/types';
import express, { Response, Router } from 'express';
import { ErrorCode } from '../../../lib/utils';
import { API_ERROR, API_MESSAGE, HEADERS, HTTP_STATUS } from '../../../lib/constants';
import { createRemoteUser, createSessionToken, getApiToken, getAuthenticatedMessage, validatePassword } from '../../../lib/auth-utils';
import { logger } from '../../../lib/logger';

import { $RequestExtend, $ResponseExtend, $NextFunctionVer, IAuth } from '../../../../types';
import { limiter } from '../../rate-limiter';
import express, { Response, Router } from 'express';
import { Config, RemoteUser } from '@verdaccio/types';
import Cookies from 'cookies';
import _ from 'lodash';

export default function (route: Router, auth: IAuth, config: Config): void {
/* eslint new-cap:off */
Expand Down
2 changes: 1 addition & 1 deletion src/api/endpoint/api/v1/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Response, Router } from 'express';
import profile from './profile';
import token from './token';
import { Response, Router } from 'express';

export default (auth, storage, config) => {
const route = Router(); /* eslint new-cap: 0 */
Expand Down
4 changes: 2 additions & 2 deletions src/api/endpoint/api/v1/profile.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import _ from 'lodash';
import { Response, Router } from 'express';
import { API_ERROR, APP_ERROR, HTTP_STATUS, SUPPORT_ERRORS } from '../../../../lib/constants';
import { ErrorCode } from '../../../../lib/utils';
import { validatePassword } from '../../../../lib/auth-utils';

import { $NextFunctionVer, $RequestExtend, IAuth } from '../../../../../types';
import { limiter } from '../../../rate-limiter';
import { Response, Router } from 'express';
import _ from 'lodash';

export interface Profile {
tfa: boolean;
Expand Down
4 changes: 2 additions & 2 deletions src/api/endpoint/api/v1/search.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { logger } from '../../../../lib/logger';
import { HTTP_STATUS } from '../../../../lib/constants';
import semver from 'semver';
import _ from 'lodash';
import { Package } from '@verdaccio/types';
import { logger } from '../../../../lib/logger';
import { HTTP_STATUS } from '../../../../lib/constants';

type PublisherMaintainer = {
username: string;
Expand Down
8 changes: 4 additions & 4 deletions src/api/endpoint/api/v1/token.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
import _ from 'lodash';
import buildDebug from 'debug';
import { Response, Router } from 'express';
import { Config, RemoteUser, Token } from '@verdaccio/types';
import { HEADERS, HTTP_STATUS, SUPPORT_ERRORS } from '../../../../lib/constants';
import { ErrorCode, mask } from '../../../../lib/utils';
import { getApiToken } from '../../../../lib/auth-utils';
Expand All @@ -10,6 +6,10 @@ import { logger } from '../../../../lib/logger';

import { $NextFunctionVer, $RequestExtend, IAuth, IStorageHandler } from '../../../../../types';
import { limiter } from '../../../rate-limiter';
import { Config, RemoteUser, Token } from '@verdaccio/types';
import { Response, Router } from 'express';
import buildDebug from 'debug';
import _ from 'lodash';

const debug = buildDebug('verdaccio:token');
export type NormalizeToken = Token & {
Expand Down
2 changes: 1 addition & 1 deletion src/api/endpoint/api/whoami.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Response, Router } from 'express';
import { $RequestExtend, $NextFunctionVer } from '../../../../types';
import { Response, Router } from 'express';

export default function (route: Router): void {
route.get('/whoami', (req: $RequestExtend, res: Response, next: $NextFunctionVer): void => {
Expand Down
8 changes: 4 additions & 4 deletions src/api/endpoint/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
import { Config } from '@verdaccio/types';
import _ from 'lodash';
import express from 'express';
import bodyParser from 'body-parser';
import { IAuth, IStorageHandler } from '../../../types';
import whoami from './api/whoami';
import ping from './api/ping';
Expand All @@ -13,6 +9,10 @@ import pkg from './api/package';
import stars from './api/stars';
import npmV1 from './api/v1';
import v1Search from './api/v1/search';
import bodyParser from 'body-parser';
import express from 'express';
import _ from 'lodash';
import { Config } from '@verdaccio/types';

const { match, validateName, validatePackage, encodeScopePackage, antiLoop } = require('../middleware');

Expand Down
12 changes: 6 additions & 6 deletions src/api/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
import _ from 'lodash';
import express, { Application } from 'express';
import compression from 'compression';
import cors from 'cors';
import { HttpError } from 'http-errors';
import { Config as IConfig, IPluginMiddleware, IPluginStorageFilter } from '@verdaccio/types';
import Storage from '../lib/storage';
import loadPlugin from '../lib/plugin-loader';
import Auth from '../lib/auth';
Expand All @@ -17,6 +11,12 @@ import web from './web';
import apiEndpoint from './endpoint';
import hookDebug from './debug';
import { log, final, errorReportingMiddleware, serveFavicon } from './middleware';
import { Config as IConfig, IPluginMiddleware, IPluginStorageFilter } from '@verdaccio/types';
import { HttpError } from 'http-errors';
import cors from 'cors';
import compression from 'compression';
import express, { Application } from 'express';
import _ from 'lodash';

const defineAPI = function (config: IConfig, storage: IStorageHandler): any {
const auth: IAuth = new Auth(config);
Expand Down
10 changes: 5 additions & 5 deletions src/api/middleware.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import fs from 'fs';
import path from 'path';
import { validateName as utilValidateName, validatePackage as utilValidatePackage, getVersionFromTarball, isObject, ErrorCode } from '../lib/utils';
import { API_ERROR, HEADER_TYPE, HEADERS, HTTP_STATUS, TOKEN_BASIC, TOKEN_BEARER } from '../lib/constants';
import { stringToMD5 } from '../lib/crypto-utils';
import { $ResponseExtend, $RequestExtend, $NextFunctionVer, IAuth } from '../../types';
import { logger } from '../lib/logger';
import _ from 'lodash';
import buildDebug from 'debug';
import validator from 'validator';

import { Config, Package, RemoteUser } from '@verdaccio/types';
import { VerdaccioError } from '@verdaccio/commons-api';
import { validateName as utilValidateName, validatePackage as utilValidatePackage, getVersionFromTarball, isObject, ErrorCode } from '../lib/utils';
import { API_ERROR, HEADER_TYPE, HEADERS, HTTP_STATUS, TOKEN_BASIC, TOKEN_BEARER } from '../lib/constants';
import { stringToMD5 } from '../lib/crypto-utils';
import { $ResponseExtend, $RequestExtend, $NextFunctionVer, IAuth } from '../../types';
import { logger } from '../lib/logger';

const debug = buildDebug('verdaccio');

Expand Down
6 changes: 3 additions & 3 deletions src/api/web/api.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { Router } from 'express';
import bodyParser from 'body-parser';
import { Config } from '@verdaccio/types';
import Search from '../../lib/search';
import { match, validateName, validatePackage, setSecurityWebHeaders } from '../middleware';
import { IAuth, IStorageHandler } from '../../../types';
import webApi from './endpoint';
import { Config } from '@verdaccio/types';
import bodyParser from 'body-parser';
import { Router } from 'express';

const route = Router(); /* eslint new-cap: 0 */

Expand Down
2 changes: 1 addition & 1 deletion src/api/web/endpoint/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Response, Router } from 'express';
import { limiter } from '../../rate-limiter';
import packageApi from './package';
import search from './search';
import user from './user';
import { Response, Router } from 'express';

export default (auth, storage, config) => {
const route = Router(); /* eslint new-cap: 0 */
Expand Down
6 changes: 3 additions & 3 deletions src/api/web/endpoint/package.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
import _ from 'lodash';
import { Router } from 'express';
import { Config, Package } from '@verdaccio/types';
import {
addScope,
addGravatarSupport,
Expand All @@ -18,6 +15,9 @@ import { DIST_TAGS, HEADER_TYPE, HEADERS, HTTP_STATUS } from '../../../lib/const
import { generateGravatarUrl } from '../../../utils/user';
import { logger } from '../../../lib/logger';
import { IAuth, $ResponseExtend, $RequestExtend, $NextFunctionVer, IStorageHandler, $SidebarPackage } from '../../../../types';
import { Config, Package } from '@verdaccio/types';
import { Router } from 'express';
import _ from 'lodash';

const getOrder = (order = 'asc') => {
return order === 'asc';
Expand Down
4 changes: 2 additions & 2 deletions src/api/web/endpoint/search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
* @flow
*/

import { Router } from 'express';
import { Package } from '@verdaccio/types';
import Search from '../../../lib/search';
import { DIST_TAGS } from '../../../lib/constants';
import { IAuth, $ResponseExtend, $RequestExtend, $NextFunctionVer, IStorageHandler } from '../../../../types';
import { Package } from '@verdaccio/types';
import { Router } from 'express';

function addSearchWebApi(storage: IStorageHandler, auth: IAuth): Router {
const route = Router(); /* eslint new-cap: 0 */
Expand Down
6 changes: 3 additions & 3 deletions src/api/web/endpoint/user.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
/**
* @prettier
*/
import _ from 'lodash';

import express, { Router, Response, Request } from 'express';
import { Config, RemoteUser, JWTSignOptions } from '@verdaccio/types';
import { API_ERROR, APP_ERROR, HEADERS, HTTP_STATUS } from '../../../lib/constants';
import { IAuth, $NextFunctionVer } from '../../../../types';
import { ErrorCode } from '../../../lib/utils';
import { getSecurity, validatePassword } from '../../../lib/auth-utils';
import { Config, RemoteUser, JWTSignOptions } from '@verdaccio/types';
import express, { Router, Response, Request } from 'express';
import _ from 'lodash';

function addUserAuthApi(auth: IAuth, config: Config): Router {
const route = Router(); /* eslint new-cap: 0 */
Expand Down
6 changes: 3 additions & 3 deletions src/api/web/html/renderHTML.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { URL } from 'url';
import path from 'path';
import { getPublicUrl, isHTTPProtocol } from '../../../lib/utils';
import { WEB_TITLE } from '../../../lib/constants';
import renderTemplate from './template';
import buildDebug from 'debug';
import LRU from 'lru-cache';
import { HEADERS } from '@verdaccio/commons-api';

import { getPublicUrl, isHTTPProtocol } from '../../../lib/utils';
import { WEB_TITLE } from '../../../lib/constants';
import renderTemplate from './template';

const pkgJSON = require('../../../../package.json');
const DEFAULT_LANGUAGE = 'es-US';
Expand Down
Loading

0 comments on commit 23d0bd7

Please sign in to comment.