Skip to content

Remove babel, regenerator-runtime and some other outdated deps #2824

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

Merged
merged 3 commits into from
Jun 17, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 0 additions & 1 deletion babel.config.js

This file was deleted.

11 changes: 4 additions & 7 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ module.exports = {
testPathIgnorePatterns: [
'.*\\.fixtures\\.ts$',
'packages/cli/test/build/src/test/mappingHandler.test.ts',
"/node_modules/"
'/node_modules/',
],

// The regexp pattern or array of patterns that Jest uses to detect test files
Expand All @@ -194,10 +194,9 @@ module.exports = {
'^.+\\.(ts|tsx)?$': [
'ts-jest',
{
tsconfig: 'tsconfig.test.json'
}
tsconfig: 'tsconfig.test.json',
},
],
'^.+\\.(js|jsx)$': 'babel-jest',
},

// An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
Expand All @@ -206,9 +205,7 @@ module.exports = {
// "\\.pnp\\.[^\\/]+$"
// ],

"transformIgnorePatterns": [
"node_modules/(?!(@polkadot|@babel/runtime/helpers/esm)/)"
],
transformIgnorePatterns: ['node_modules/(?!(@polkadot)/)'],

// An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them
// unmockedModulePathPatterns: undefined,
Expand Down
3 changes: 0 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@
],
"devDependencies": {
"@actions/core": "^1.10.1",
"@babel/preset-env": "^7.16.11",
"@geut/chan": "^3.2.9",
"@octokit/request": "^8.4.1",
"@types/node": "^22.12.0",
"@typescript-eslint/eslint-plugin": "5",
"@typescript-eslint/parser": "5",
"babel-jest": "^29.7.0",
"eslint": "^8.8.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-header": "^3.1.1",
Expand All @@ -25,7 +23,6 @@
"lint-staged": "^15.2.7",
"prettier": "^3.3.3",
"pretty-quick": "^4.2.2",
"regenerator-runtime": "^0.13.11",
"ts-jest": "^29.2.4",
"ts-loader": "^9.5.1",
"ts-node": "^10.9.2",
Expand Down
2 changes: 0 additions & 2 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"@subql/utils": "workspace:*",
"chalk": "^4",
"ejs": "^3.1.10",
"fs-extra": "^11.2.0",
"fuzzy": "^0.1.3",
"glob": "^10.4",
"json5": "^2.2.3",
Expand Down Expand Up @@ -46,7 +45,6 @@
"@subql/common-stellar": "^4.2.2",
"@subql/common-substrate": "workspace:*",
"@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",
Expand Down
3 changes: 1 addition & 2 deletions packages/cli/src/controller/init-controller.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import * as fs from 'fs';
import path from 'path';
import {makeTempDir} from '@subql/common';
import {copySync} from 'fs-extra';
import {rimraf} from 'rimraf';
import git from 'simple-git';
import {parseDocument, Document} from 'yaml';
Expand Down Expand Up @@ -102,7 +101,7 @@ describe('Cli can create project', () => {
await git(tempPath).raw('sparse-checkout', 'set', `${projects[0].path}`);
await git(tempPath).raw('pull', 'origin', 'd2868e9e46371f0ce45e52acae2ace6cb97296a0');

copySync(path.join(tempPath, `${projects[0].path}`), projectPath);
await fs.promises.cp(path.join(tempPath, `${projects[0].path}`), projectPath, {recursive: true});
fs.rmSync(tempPath, {recursive: true, force: true});

const output = await testYAML(path.join(localPath, projectSpec.name), projectSpec);
Expand Down
3 changes: 1 addition & 2 deletions packages/cli/src/controller/init-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import * as path from 'path';
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 git from 'simple-git';
import {parseDocument, YAMLMap, YAMLSeq} from 'yaml';
Expand Down Expand Up @@ -133,7 +132,7 @@ export async function cloneProjectTemplate(
await git(tempPath).raw('sparse-checkout', 'set', selectedProject.path);
await git(tempPath).raw('pull', 'origin', 'main');
// Copy content to project path
copySync(path.join(tempPath, selectedProject.path), projectPath);
await fs.promises.cp(path.join(tempPath, selectedProject.path), projectPath, {recursive: true});
// Clean temp folder
fs.rmSync(tempPath, {recursive: true, force: true});
return projectPath;
Expand Down
1 change: 0 additions & 1 deletion test/jest-setup.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'reflect-metadata';
import 'regenerator-runtime/runtime';

// Causes the logger to be init
(global as any).__TEST__ = true;
Loading
Loading