Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update many dependencies #2518

Merged
merged 4 commits into from
Aug 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 16 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,15 @@
"packages/*"
],
"devDependencies": {
"@actions/core": "^1.10.0",
"@actions/core": "^1.10.1",
"@babel/preset-env": "^7.16.11",
"@geut/chan": "^3.2.9",
"@octokit/request": "^5.6.3",
"@types/cron-converter": "^1",
"@types/node": "^18.16.10",
"@types/node-fetch": "2.6.2",
"@octokit/request": "^9.1.3",
"@types/node": "^18.19.42",
"@types/node-fetch": "2.6.11",
"@typescript-eslint/eslint-plugin": "5",
"@typescript-eslint/parser": "5",
"babel-jest": "^29.5.0",
"babel-jest": "^29.7.0",
"eslint": "^8.8.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-header": "^3.1.1",
Expand All @@ -24,20 +23,20 @@
"eslint-plugin-sort-destructure-keys": "^1.4.0",
"husky": "^7.0.4",
"jest": "^29.5.0",
"lint-staged": "^12.3.3",
"node-fetch": "2.6.7",
"prettier": "^3.2.5",
"pretty-quick": "^3.1.3",
"regenerator-runtime": "^0.13.9",
"ts-jest": "^29.1.1",
"ts-loader": "^9.2.6",
"ts-node": "^10.4.0",
"tsconfig-paths": "^3.12.0",
"lint-staged": "^15.2.7",
"node-fetch": "2.7.0",
"prettier": "^3.3.3",
"pretty-quick": "^4.0.0",
"regenerator-runtime": "^0.13.11",
"ts-jest": "^29.2.4",
"ts-loader": "^9.5.1",
"ts-node": "^10.9.2",
"tsconfig-paths": "^4.2.0",
"typescript": "^5.5.4"
},
"resolutions": {
"@polkadot/api": "11.2.1",
"@polkadot/util": "12.6.2",
"@polkadot/api": "12.2.3",
"@polkadot/util": "13.0.2",
"node-fetch": "2.6.7"
},
"scripts": {
Expand Down
1 change: 1 addition & 0 deletions packages/cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- Update inquirer dependencies (#2501)
- Improve endpoint type to be based on core type (#2511)
- Update dependencies (#2518)

### Fixed
- Not being able to select a custom repo when initializing a project (#2501)
Expand Down
51 changes: 26 additions & 25 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,49 +8,50 @@
},
"bugs": "https://github.com/subquery/subql/issues",
"dependencies": {
"@inquirer/prompts": "^5.3.2",
"@oclif/core": "^2.15.0",
"@inquirer/prompts": "^5.3.6",
"@oclif/core": "^2.16.0",
"@subql/common": "workspace:*",
"@subql/utils": "workspace:*",
"boxen": "5.1.2",
"cli-ux": "^6.0.9",
"ejs": "^3.1.10",
"fs-extra": "^11.2.0",
"fuzzy": "^0.1.3",
"json5": "^2.2.3",
"node-fetch": "2.6.7",
"rimraf": "^3.0.2",
"semver": "^7.5.4",
"simple-git": "^3.16.0",
"terser-webpack-plugin": "^5.3.7",
"ts-loader": "^9.2.6",
"ts-node": "^10.9.1",
"tslib": "^2.3.1",
"typescript": ">=5.2.2",
"update-notifier": "5.1.0",
"webpack": "^5.76.0",
"webpack-merge": "^5.8.0",
"websocket": "^1.0.34",
"yaml": "^2.2.2",
"yaml-loader": "^0.6.0"
"node-fetch": "2.7.0",
"rimraf": "^5.0.10",
"semver": "^7.6.3",
"simple-git": "^3.25.0",
"terser-webpack-plugin": "^5.3.10",
"ts-loader": "^9.5.1",
"ts-node": "^10.9.2",
"tslib": "^2.6.3",
"typescript": "^5.5.4",
"update-notifier": "^5.1.0",
"webpack": "^5.93.0",
"webpack-merge": "^6.0.1",
"websocket": "^1.0.35",
"yaml": "^2.5.0",
"yaml-loader": "^0.8.1"
},
"devDependencies": {
"@subql/common-algorand": "^4.0.0",
"@subql/common-concordium": "^4.0.1",
"@subql/common-cosmos": "^5.0.0",
"@subql/common-ethereum": "^4.1.0",
"@subql/common-cosmos": "^5.0.1",
"@subql/common-ethereum": "^4.5.0",
"@subql/common-near": "^4.0.0",
"@subql/common-stellar": "^4.0.0",
"@subql/common-substrate": "workspace:*",
"@types/ejs": "^3.1.0",
"@types/node": "^18.16.10",
"@types/rimraf": "^3.0.2",
"@types/semver": "^7",
"@types/ejs": "^3.1.5",
"@types/fs-extra": "^11.0.4",
"@types/node": "^18.19.42",
"@types/semver": "^7.5.8",
"@types/update-notifier": "^6",
"@types/websocket": "^1",
"eslint": "^8.8.0",
"eslint-config-oclif": "^4.0.0",
"eslint-config-oclif-typescript": "^1.0.2",
"ethers": "^5.7.0",
"eslint-config-oclif-typescript": "^1.0.3",
"ethers": "^5.7.2",
"oclif": "^3.15.0"
},
"engines": {
Expand Down
5 changes: 2 additions & 3 deletions packages/cli/src/commands/migrate.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@

import fs from 'fs';
import path from 'path';
import {promisify} from 'util';
import {makeTempDir} from '@subql/common';
import rimraf from 'rimraf';
import {rimraf} from 'rimraf';
import {DEFAULT_SUBQL_MANIFEST} from '../constants';
import Migrate from './migrate';

Expand All @@ -20,7 +19,7 @@ describe('Intergration test - Migrate', () => {
afterAll(async () => {
try {
if (!projectDir) return;
await promisify(rimraf)(projectDir);
await rimraf(projectDir);
} catch (e) {
console.warn('Failed to clean up tmp dir after test', e);
}
Expand Down
5 changes: 2 additions & 3 deletions packages/cli/src/commands/publish.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@

import fs from 'fs';
import path from 'path';
import {promisify} from 'util';
import rimraf from 'rimraf';
import {rimraf} from 'rimraf';
import {createTestProject} from '../createProject.fixtures';
import Publish from './publish';

Expand All @@ -19,7 +18,7 @@ describe('Intergration test - Publish', () => {
afterAll(async () => {
try {
if (!projectDir) return;
await promisify(rimraf)(projectDir);
await rimraf(projectDir);
} catch (e) {
console.warn('Failed to clean up tmp dir after test', e);
}
Expand Down
5 changes: 2 additions & 3 deletions packages/cli/src/controller/add-chain-controller.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@
import fs, {existsSync} from 'fs';
import os from 'os';
import path from 'path';
import {promisify} from 'util';
import {DEFAULT_MULTICHAIN_MANIFEST} from '@subql/common';
import {MultichainProjectManifest, ProjectManifestV1_0_0} from '@subql/types-core';
import * as yaml from 'js-yaml';
import rimraf from 'rimraf';
import {rimraf} from 'rimraf';
import {YAMLSeq} from 'yaml';
import {loadMultichainManifest, validateAndAddChainManifest} from './add-chain-controller';

Expand Down Expand Up @@ -135,7 +134,7 @@ describe('MultiChain - ADD', () => {

afterEach(async () => {
try {
await promisify(rimraf)(projectDir);
await rimraf(projectDir);
} catch (e) {
console.warn('Failed to clean up tmp dir after test', e);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/controller/codegen-controller.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import fs from 'fs';
import path from 'path';
import rimraf from 'rimraf';
import {rimraf} from 'rimraf';
import {codegen, processFields, validateEntityName} from './codegen-controller';

jest.mock('fs', () => {
Expand Down
6 changes: 2 additions & 4 deletions packages/cli/src/controller/codegen-controller.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,14 @@

import fs from 'fs';
import path from 'path';
import {promisify} from 'util';

import rimraf from 'rimraf';
import {rimraf} from 'rimraf';
import {codegen} from './codegen-controller';

jest.setTimeout(30000);

describe('Codegen can generate schema', () => {
afterEach(async () => {
await promisify(rimraf)(path.join(__dirname, '../../test/schemaTest/src'));
await rimraf(path.join(__dirname, '../../test/schemaTest/src'));
});

it('codegen with correct schema should pass', async () => {
Expand Down
5 changes: 2 additions & 3 deletions packages/cli/src/controller/codegen-cosmos.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@

import fs from 'fs';
import path from 'path';
import {promisify} from 'util';
import {loadFromJsonOrYaml} from '@subql/common';
import {projectCodegen} from '@subql/common-cosmos';
import {ProjectManifestV1_0_0} from '@subql/types-core';
import type {CosmosDatasource, CustomDatasourceTemplate, RuntimeDatasourceTemplate} from '@subql/types-cosmos';
import {upperFirst} from 'lodash';
import rimraf from 'rimraf';
import {rimraf} from 'rimraf';
import {prepareDirPath, renderTemplate} from '../utils';

const PROJECT_PATH = path.join(__dirname, '../../test/protoTest1');
Expand All @@ -28,7 +27,7 @@ jest.setTimeout(30000);

describe('Able to generate cosmos types from protobuf', () => {
afterEach(async () => {
await promisify(rimraf)(path.join(__dirname, '../../test/protoTest1/src'));
await rimraf(path.join(__dirname, '../../test/protoTest1/src'));
});

const manifest = loadFromJsonOrYaml(path.join(PROJECT_PATH, 'project.yaml')) as ProjectManifestV1_0_0<
Expand Down
9 changes: 4 additions & 5 deletions packages/cli/src/controller/generate-controller.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@

import fs from 'fs';
import path from 'path';
import {promisify} from 'util';
import {EventFragment, FunctionFragment} from '@ethersproject/abi';
import {DEFAULT_TS_MANIFEST, loadFromJsonOrYaml, NETWORK_FAMILY} from '@subql/common';
import {getAbiInterface} from '@subql/common-ethereum';
import {SubqlRuntimeDatasource as EthereumDs} from '@subql/types-ethereum';
import rimraf from 'rimraf';
import {rimraf} from 'rimraf';
import {Document, stringify} from 'yaml';
import Generate, {SelectedMethod, UserInput} from '../commands/codegen/generate';
import {loadDependency} from '../modulars';
Expand Down Expand Up @@ -176,9 +175,9 @@ jest.setTimeout(30000);
describe('CLI codegen:generate, Can write to file', () => {
afterEach(async () => {
await Promise.all([
promisify(rimraf)(path.join(__dirname, '../../test/schemaTest/src')),
promisify(rimraf)(path.join(__dirname, '../../test/schemaTest/abis/abis.json')),
promisify(rimraf)(path.join(__dirname, '../../test/ts-manifest/mock-project.ts')),
rimraf(path.join(__dirname, '../../test/schemaTest/src')),
rimraf(path.join(__dirname, '../../test/schemaTest/abis/abis.json')),
rimraf(path.join(__dirname, '../../test/ts-manifest/mock-project.ts')),
fs.promises.writeFile(path.join(PROJECT_PATH, MANIFEST_PATH), stringify(originalManifestData), {
encoding: 'utf8',
flag: 'w',
Expand Down
7 changes: 3 additions & 4 deletions packages/cli/src/controller/init-controller.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@

import * as fs from 'fs';
import path from 'path';
import {promisify} from 'util';
import {makeTempDir} from '@subql/common';
import {copySync} from 'fs-extra';
import rimraf from 'rimraf';
import {rimraf} from 'rimraf';
import git from 'simple-git';
import {parseDocument, Document} from 'yaml';
import {isProjectSpecV0_2_0, isProjectSpecV1_0_0, ProjectSpecBase} from '../types';
Expand Down Expand Up @@ -111,7 +110,7 @@ describe('Cli can create project', () => {
expect(output.new).not.toEqual(output.old);
expect(output.new.toString()).toContain('# The genesis hash of the network (hash of block 0)');

await promisify(rimraf)(localPath);
await rimraf(localPath);
});

it('prepare correctly applies project details', async () => {
Expand All @@ -126,7 +125,7 @@ describe('Cli can create project', () => {
//expect(projectSpec.specVersion).toEqual(specVersion);
expect(projectSpec.author).toEqual(author);
expect(projectSpec.description).toEqual(description);
await promisify(rimraf)(tempPath);
await rimraf(tempPath);
});

it('allow git from sub directory', async () => {
Expand Down
5 changes: 2 additions & 3 deletions packages/cli/src/controller/init-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@
import childProcess, {execSync} from 'child_process';
import fs from 'fs';
import * as path from 'path';
import {promisify} from 'util';
import {DEFAULT_MANIFEST, DEFAULT_TS_MANIFEST, loadFromJsonOrYaml, makeTempDir, NETWORK_FAMILY} from '@subql/common';
import {ProjectManifestV1_0_0, ProjectNetworkConfig} from '@subql/types-core';
import axios from 'axios';
import {copySync} from 'fs-extra';
import rimraf from 'rimraf';
import {rimraf} from 'rimraf';
import git from 'simple-git';
import {parseDocument, YAMLMap, YAMLSeq} from 'yaml';
import {BASE_TEMPLATE_URl, CAPTURE_CHAIN_ID_REG, CHAIN_ID_REG, ENDPOINT_REG} from '../constants';
Expand Down Expand Up @@ -179,7 +178,7 @@ export async function prepare(projectPath: string, project: ProjectSpecBase): Pr
throw new Error('Failed to prepare read or write package.json while preparing the project');
}
try {
await promisify(rimraf)(`${projectPath}/.git`);
await rimraf(`${projectPath}/.git`);
} catch (e) {
throw new Error('Failed to remove .git from template project');
}
Expand Down
5 changes: 2 additions & 3 deletions packages/cli/src/controller/publish-controller.spec.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
// Copyright 2020-2024 SubQuery Pte Ltd authors & contributors
// SPDX-License-Identifier: GPL-3.0

import {promisify} from 'util';
import {mapToObject, ReaderFactory, toJsonObject} from '@subql/common';
import {parseProjectManifest} from '@subql/common-substrate';
import rimraf from 'rimraf';
import {rimraf} from 'rimraf';
import {createMultiChainTestProject, createTestProject} from '../createProject.fixtures';
import {getDirectoryCid, uploadToIpfs} from './publish-controller';

Expand All @@ -26,7 +25,7 @@ describe('Cli publish', () => {
afterAll(async () => {
try {
if (!projectDir) return;
await promisify(rimraf)(projectDir);
await rimraf(projectDir);
} catch (e) {
console.warn('Failed to clean up tmp dir after test', e);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/utils/build.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {existsSync, readFileSync, writeFileSync} from 'fs';
import path from 'path';
import {MultichainProjectManifest} from '@subql/types-core';
import * as yaml from 'js-yaml';
import rimraf from 'rimraf';
import {rimraf} from 'rimraf';
import {buildManifestFromLocation} from './build';

describe('Manifest generation', () => {
Expand Down
5 changes: 2 additions & 3 deletions packages/cli/src/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import assert from 'assert';
import fs, {existsSync, readFileSync} from 'fs';
import os from 'os';
import path from 'path';
import {promisify} from 'util';
import {input} from '@inquirer/prompts';
import {
DEFAULT_ENV,
Expand All @@ -19,7 +18,7 @@ import {
import axios from 'axios';
import ejs from 'ejs';
import JSON5 from 'json5';
import rimraf from 'rimraf';
import {rimraf} from 'rimraf';
import {ACCESS_TOKEN_PATH} from '../constants';

export async function delay(sec: number): Promise<void> {
Expand Down Expand Up @@ -91,7 +90,7 @@ export async function renderTemplate(templatePath: string, outputPath: string, t

export async function prepareDirPath(path: string, recreate: boolean): Promise<void> {
try {
await promisify(rimraf)(path);
await rimraf(path);
if (recreate) {
await fs.promises.mkdir(path, {recursive: true});
}
Expand Down
2 changes: 2 additions & 0 deletions packages/common-substrate/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Changed
- Update dependencies (#2518)

## [4.2.0] - 2024-08-01
### Added
Expand Down
Loading
Loading