Skip to content

Commit

Permalink
fix: update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
sf-v committed Dec 10, 2024
1 parent 737cd32 commit 5aec9ff
Show file tree
Hide file tree
Showing 32 changed files with 189 additions and 240 deletions.
10 changes: 10 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@
"ecmaVersion": 9
},
"rules": {
"@typescript-eslint/no-unused-vars": [
"error",
{
"argsIgnorePattern": "^_",
"caughtErrorsIgnorePattern": "^_",
"destructuredArrayIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"ignoreRestSiblings": true
}
],
"block-scoped-var": "error",
"no-alert": "warn",
"no-buffer-constructor": "error",
Expand Down
9 changes: 3 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"devDependencies": {
"@babel/core": "^7.26.0",
"@babel/eslint-parser": "^7.25.9",
"@babel/plugin-proposal-class-properties": "^7.18.6",
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
"@babel/preset-typescript": "^7.26.0",
Expand All @@ -16,13 +17,12 @@
"@types/jsonwebtoken": "^9.0.7",
"@types/micromatch": "^4.0.9",
"@types/mime-types": "^2.1.4",
"@types/mkdirp": "^0.5.2",
"@types/ncp": "^2.0.8",
"@types/node": "^22.10.1",
"@types/tar": "^6.1.13",
"@types/yargs": "^17.0.33",
"@typescript-eslint/eslint-plugin": "6.1.0",
"@typescript-eslint/parser": "6.1.0",
"@typescript-eslint/eslint-plugin": "^8.18.0",
"@typescript-eslint/parser": "^8.18.0",
"babel-jest": "^29.7.0",
"conventional-changelog-cli": "^5.0.0",
"eslint": "8.57.0",
Expand All @@ -49,9 +49,6 @@
"type": "git",
"url": "https://github.com/salesforce/best.git"
},
"resolutions": {
"webpack": "^5.96.1"
},
"scripts": {
"build:docs": "yarn workspace @best/docs build",
"build:frontends": "lerna exec --scope @best/agent-frontend --scope @best/frontend -- yarn build",
Expand Down
2 changes: 1 addition & 1 deletion packages/@best/agent-frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
"socket.io-client": "4.7.5"
},
"devDependencies": {
"@babel/helper-create-class-features-plugin": "^7.25.9",
"@lwc/compiler": "^8.12.0",
"@lwc/engine": "^1.17.6",
"@lwc/engine-dom": "^8.12.0",
"@lwc/module-resolver": "^8.12.0",
"@lwc/rollup-plugin": "8.12.0",
"@lwc/synthetic-shadow": "^8.12.0",
"@lwc/wire-service": "8.12.0",
"@babel/helper-create-class-features-plugin": "^7.25.9",
"copy-webpack-plugin": "^12.0.2",
"html-webpack-plugin": "^5.0.0",
"lwc-webpack-plugin": "^2.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/@best/agent/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"express": "^4.21.1",
"mime": "3.0.0",
"socket.io": "4.7.5",
"socket.io-client": "4.7.5",
"socket.io-client": "4.7.5" ,
"tar": "^7.4.3"
},
"description": "Best Agent",
Expand Down
8 changes: 4 additions & 4 deletions packages/@best/agent/src/utils/socket.io-file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const mime = require('mime');

function mkdirSyncRecursively(dir, mode) {
try {
var result = fs.mkdirSync(dir, mode);
fs.mkdirSync(dir, mode);
} catch (e) {
if (e.code === 'ENOENT') {
mkdirSyncRecursively(path.dirname(dir), mode); // if does not exists, create all parents recursively
Expand All @@ -29,7 +29,7 @@ function mkdirSyncRecursively(dir, mode) {
function createDirectoryIfNotExists(dir) {
try {
fs.accessSync(dir, fs.F_OK);
} catch (e) {
} catch (_e) {
// create directory if not exists
mkdirSyncRecursively(dir, '0755');
}
Expand Down Expand Up @@ -270,7 +270,7 @@ export function SocketIOFile(socket, options) {
try {
fs.accessSync(uploadDir, fs.F_OK);
isFileExists = true;
} catch (e) {
} catch (_e) {
// console.log('File is not exists, so create new one.');
}

Expand Down Expand Up @@ -299,7 +299,7 @@ export function SocketIOFile(socket, options) {
var writeStream = uploadingFiles[id].writeStream;

function write() {
const result = uploadingFiles[id].wrote + chunk.length > self.maxFileSize;
uploadingFiles[id].wrote + chunk.length > self.maxFileSize;

if (uploadingFiles[id].wrote + chunk.length > self.maxFileSize) {
return sendError(
Expand Down
8 changes: 4 additions & 4 deletions packages/@best/api-db/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,21 +38,21 @@ export interface Snapshot extends TemporarySnapshot {
}

export class ApiDBAdapter {
constructor(config: ApiDatabaseConfig) {}
constructor(_config: ApiDatabaseConfig) {}

fetchProjects(): Promise<Project[]> {
throw new Error('ApiDB.fetchProjects() not implemented');
}

fetchSnapshots(projectId: number, since: Date | undefined): Promise<Snapshot[]> {
fetchSnapshots(_projectId: number, _since: Date | undefined): Promise<Snapshot[]> {
throw new Error('ApiDB.fetchSnapshots() not implemented');
}

saveSnapshots(snapshots: TemporarySnapshot[], projectName: string): Promise<boolean> {
saveSnapshots(_snapshots: TemporarySnapshot[], _projectName: string): Promise<boolean> {
throw new Error('ApiDB.saveSnapshots() not implemented');
}

updateLastRelease(projectName: string, release: string | Date): Promise<boolean> {
updateLastRelease(_projectName: string, _release: string | Date): Promise<boolean> {
throw new Error('ApiDB.updateLastRelease() not implemented');
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function resolveModuleEntryFromPackage(module: string) {
let modulePath;
try {
modulePath = require.resolve(`${module}/dist/index.js`);
} catch (e) {
} catch (_e) {
// intentional noop
}

Expand Down
2 changes: 1 addition & 1 deletion packages/@best/cli/src/cli/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export async function runCLI(argsCLI: CliConfig, projects: string[]) {
const { buildStaticFrontend } = await import('@best/frontend');
const projectConfig = configs[0];
await buildStaticFrontend(results, globalConfig, projectConfig, process.stdout);
} catch (err) {
} catch (_err) {
throw new Error(
'You passed the `--generateHTML` flag, but `@best/frontend` is not a dependency. Make sure you include it as a dependency.',
);
Expand Down
2 changes: 1 addition & 1 deletion packages/@best/cli/src/run_compare.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export async function runCompare(
try {
storageProvider = require(externalStorage);
storageProvider.initialize({});
} catch (err) {
} catch (_err) {
throw new Error(`Can't resolve the externalStorage ${externalStorage}`);
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/@best/config/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export async function readConfig(
if (!parentConfigPath) {
try {
gitConfig = await getGitInfo(options.rootDir);
} catch (e) {
} catch (_e) {
console.log('[WARN] - Unable to get git information');
/* Unable to get git info */
}
Expand Down
2 changes: 1 addition & 1 deletion packages/@best/frontend/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// eslint-disable-next-line @typescript-eslint/no-var-requires
// eslint-disable-next-line
const COMMON = require('../../../scripts/jest/common.config');

module.exports = {
Expand Down
8 changes: 4 additions & 4 deletions packages/@best/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@
"jsonwebtoken": "9.0.2",
"plotly.js-basic-dist-min": "2.35.2",
"query-string": "^7.1.1",
"redux": "4.2.1",
"redux-thunk": "2.4.2",
"redux": "^5.0.1",
"redux-thunk": "^3.1.0",
"rollup": "^4.28.0"
},
"devDependencies": {
"@lwc/compiler": "^8.12.0",
"@lwc/engine": "^1.17.6",
"@lwc/engine-dom": "^8.12.0",
"@lwc/eslint-plugin-lwc": "1.9.0",
"@lwc/jest-preset": "^16.1.0",
"@lwc/module-resolver": "^8.12.0",
"@lwc/rollup-plugin": "8.12.0",
"@lwc/synthetic-shadow": "^8.12.0",
"@lwc/wire-service": "8.12.0",
"@lwc/eslint-plugin-lwc": "1.9.0",
"@lwc/jest-preset": "^16.1.0",
"@salesforce/eslint-config-lwc": "3.6.0",
"@salesforce/eslint-plugin-lightning": "1.0.0",
"@types/compression": "^1.7.5",
Expand Down
2 changes: 1 addition & 1 deletion packages/@best/frontend/server/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default (config: FrontendConfig): Router => {
profileImage: response.data.author.avatar_url,
},
});
} catch (err) {
} catch (_err) {
res.send({
error: {
reason: 'GitHub integration failed.',
Expand Down
2 changes: 1 addition & 1 deletion packages/@best/frontend/server/static/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export const buildStaticFrontend = async (
await asyncWrite(indexPath, html);

outputStream.writeln(`Done generating static, URL: ${indexPath}`);
} catch (err) {
} catch (_err) {
outputStream.writeln('Error while trying to generate static HTML.');
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/@best/frontend/server/static/mocker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const bestMocker = (options: MockerOptions): rollup.Plugin => ({
if (mockTemplate && mockedData) {
return mockTemplate.replace('INSERT_MOCKED_DATA', JSON.stringify(mockedData));
}
} catch (err) {
} catch (_err) {
return null;
}
}
Expand Down
4 changes: 2 additions & 2 deletions packages/@best/frontend/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
*/

import { buildCustomElementConstructor, register } from 'lwc';
import { registerWireService } from '@lwc/wire-service';
import { buildCustomElementConstructor } from 'lwc';
import { registerWireService, register } from '@lwc/wire-service';

import App from 'view/app';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import configureMockStore from 'redux-mock-store';
import thunk from 'redux-thunk';
import { thunk } from 'redux-thunk';
import fetchMock from 'fetch-mock';

import * as types from 'store/shared';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import configureMockStore from 'redux-mock-store';
import thunk from 'redux-thunk';
import { thunk } from 'redux-thunk';
import fetchMock from 'fetch-mock';

import * as types from 'store/shared';
Expand Down
2 changes: 1 addition & 1 deletion packages/@best/frontend/src/modules/store/store/store.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createStore, applyMiddleware, combineReducers } from 'redux';
import thunk from 'redux-thunk';
import { thunk } from 'redux-thunk';

import * as reducers from './reducers';
import * as urlstorage from './urlstorage';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export const loadState = () => {
export const saveState = ({ projects: { selectedProjectId }, view }) => {
try {
updateProjectsPathIfNeeded(selectedProjectId);
} catch (err) {
} catch (_err) {
// log error or something
}
updateViewQueryIfNeeded(view);
Expand Down
11 changes: 2 additions & 9 deletions packages/@best/frontend/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
// module.exports = {
// devServer: {
// proxy: {
// '/api': 'http://localhost:3000',
// },
// historyApiFallback: true,
// },
// };

/* eslint-disable */
const HtmlWebpackPlugin = require('html-webpack-plugin');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const LwcWebpackPlugin = require('lwc-webpack-plugin');
const path = require('path');
const webpack = require('webpack');
/* eslint-enable */

const mode = process.env.NODE_ENV || 'production';

Expand Down
2 changes: 1 addition & 1 deletion packages/@best/github-integration/src/analyze.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ export function generateComparisonComment(result: BenchmarkComparison) {
// this takes all the results and recursively goes through them
// then it creates a flat list of all of the percentages of change
export function generatePercentages(stats: ResultComparison): number[] {
return generateRowsFromComparison(stats, (node, parentName) => {
return generateRowsFromComparison(stats, (node, _parentName) => {
const rows: number[] = [];

Object.keys(node.metrics).map((metricName) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/@best/github-integration/src/git-app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ class GithubFactory {
return response.data.token;
}

async authenticateAsAppAndInstallation(git: { repo: string; owner: string }, gitOpts = this.gitOpts) {
async authenticateAsAppAndInstallation(git: { repo: string; owner: string }, _gitOpts = this.gitOpts) {
const gitAppAuth = await this.authenticateAsApplication();

const repoInstallation = await gitAppAuth.apps.getRepoInstallation(git);
Expand Down
2 changes: 1 addition & 1 deletion packages/@best/github-integration/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export async function updateLatestRelease(projectNames: string[], globalConfig:
}),
);
}
} catch (err) {
} catch (_err) {
return false;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ class TestRunner extends AbstractRunner {
async (
benchmarkBuilds: BuildConfig[],
projectConfig: FrozenProjectConfig,
globalConfig: FrozenGlobalConfig,
runnerLogStream: RunnerStream,
interruption?: Interruption,
_globalConfig: FrozenGlobalConfig,
_runnerLogStream: RunnerStream,
_interruption?: Interruption,
): Promise<BenchmarkResultsSnapshot[]> => {
for (const benchmarkInfo of benchmarkBuilds) {
const { benchmarkEntry, benchmarkRemoteEntry } = benchmarkInfo;
Expand Down
6 changes: 3 additions & 3 deletions packages/@best/runner-remote/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
"@best/console-stream": "13.0.0",
"@best/runner-abstract": "13.0.0",
"@best/shared": "13.0.0",
"debug": "4.3.7",
"socket.io-client": "4.7.5",
"tar": "7.4.3"
"debug": "^4.4.0",
"socket.io-client": "^4.8.1",
"tar": "^7.4.3"
},
"description": "Best Runner (Headless)",
"files": [
Expand Down
2 changes: 1 addition & 1 deletion packages/@best/runner-remote/src/runner-remote.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ export class RunnerRemote {

log_rpc(`${BENCHMARK_UPLOAD_REQUEST} - Sending: ${benchmarkConfig.benchmarkSignature}`);

this.socket.emit(BEST_RPC.BENCHMARK_UPLOAD_RESPONSE, benchmarkConfig, async (benchmarkSignature: string) => {
this.socket.emit(BEST_RPC.BENCHMARK_UPLOAD_RESPONSE, benchmarkConfig, async (_benchmarkSignature: string) => {
const { benchmarkName, benchmarkEntry, benchmarkRemoteEntry } = benchmarkConfig;
const bundleDirname = path.dirname(benchmarkRemoteEntry || benchmarkEntry);
const tarBundle = path.resolve(bundleDirname, `${benchmarkName}.tgz`);
Expand Down
2 changes: 1 addition & 1 deletion packages/@best/runner/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function loadRunnerModule(benchmarkRunner: string): ConcreteRunner {
try {
const RunnerModule: any = require(benchmarkRunner);
return RunnerModule.Runner || RunnerModule.default || RunnerModule;
} catch (e) {
} catch (_e) {
throw new Error(`Runner "${benchmarkRunner}" not found.`);
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/@best/runtime/src/run_iteration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const executeBenchmark = async (
endMeasure(markName, BenchmarkMeasureType.Execute);
resolve(null);
}
} catch (e) {
} catch (_e) {
benchmarkNode.aggregate = -1;
endMeasure(markName, BenchmarkMeasureType.Execute);
reject();
Expand Down
4 changes: 2 additions & 2 deletions packages/@best/store/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"dependencies": {
"json2md": "~1.5.11",
"mkdirp": "3.0.1",
"mkdirp": "^3.0.1",
"ncp": "^2.0.0",
"rimraf": "6.0.1"
"rimraf": "^6.0.1"
},
"devDependencies": {
"@types/json2md": "1.5.4"
Expand Down
2 changes: 1 addition & 1 deletion packages/@best/utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"dependencies": {
"chalk": "~2.4.2",
"https-proxy-agent": "^5.0.1",
"is-ci": "^3.0.1",
"is-ci": "^4.1.0",
"picocolors": "^1.1.1",
"systeminformation": "^5.23.6",
"winston": "^3.17.0"
Expand Down
Loading

0 comments on commit 5aec9ff

Please sign in to comment.